Source for file mod_cal.php
Documentation is available at mod_cal.php
* @package linea21.modules
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
include_once("../lib/input_helpers.php");
if(isset ($_POST['id'])) $id= $_POST['id'];
if(isset ($_GET['id'])) $id= $_GET['id'];
//////////// Check Inclusion de pages ////////////
include_once("../lib/lib_common.php");
//////////// Check Droits utilisateur ////////////
$link_add_cal = $rub_link . "&todo=add_cal&id=";
$link_det = $rub_link . "&todo=det&id=";
if(isset ($_POST['task_id'])) $task_id= $_POST['task_id'];
if(isset ($_GET['task_id'])) $task_id= $_GET['task_id'];
//$result_task=$calendar_object->GetOneTask($task_id, $sql_object);
$result_task = $sql_object -> DBSelect($req_task);
$form_date= $result_task[0]['date_t'];
$form_task= formatText($result_task[0]['workcal_task'], '2FIELD');
$display_title_task= formatText($result_task[0]['workcal_task'], '2FIELD');
$form_task_details= formatText($result_task[0]['workcal_task_details'], '2FIELD');
$result_workshop= $sql_object->DBSelect($req_det_workshop);
$workshop_denomination= formatText($result_workshop[0]['workshop_denomination'], '2FIELD');
$link_cancel= $rub_link. "&todo=list_cal&id=". $id;
//$workshop_object= new workshop;
if(isset ($_POST['enregistrer'])) {
$result= $calendar_object->ModifyTask($task_id, $data_table, $sql_object);
$link_confirm= "confirm.php?rub=". $rub. "&todo=". $todo. "&id=". $id;
if($result) header("Location: ". $link_confirm);
if(isset ($_POST['valider'])) {
$table[0] = $_POST['date'];
$table[1] = $_POST['task'];
$table[2] = $_POST['task_details'];
$table[3] = $_POST['id'];
$integrity= $calendar_object->CheckDataIntegrity($table, $sql_object);
$form_task= formatText($_POST['task'], $text_format);
$form_task_details= formatText($_POST['task_details'], $text_format);
$form_date = $_POST['date'];
include_once("quickicons.php");
$navtitle= $GLOBALS['lang']['workshop']['mod_cal']. " : ". $display_title_task;
<a href="index.php"> <? echo $GLOBALS['lang']['way']['home'] ?></a>
<a href=" <?php echo $rub_link; ?>"> <? echo $GLOBALS['lang']['menu']['workshop']?></a>
<span> <? echo formatnavTitle($navtitle); ?></span>
<script type="text/javascript" charset="utf-8">
Date.format = ' <?php echo DATE_FORMAT ?>';
TEXT_PREV_YEAR : ' <?php echo $GLOBALS['lang']['datePicker']['TEXT_PREV_YEAR']; ?>',
TEXT_PREV_MONTH : ' <?php echo $GLOBALS['lang']['datePicker']['TEXT_PREV_MONTH']; ?>',
TEXT_NEXT_YEAR : ' <?php echo $GLOBALS['lang']['datePicker']['TEXT_NEXT_YEAR']; ?>',
TEXT_NEXT_MONTH : ' <?php echo $GLOBALS['lang']['datePicker']['TEXT_NEXT_MONTH']; ?>',
TEXT_CLOSE : ' <?php echo $GLOBALS['lang']['datePicker']['TEXT_CLOSE']; ?>',
TEXT_CHOOSE_DATE : ' <?php echo $GLOBALS['lang']['datePicker']['TEXT_CHOOSE_DATE']; ?>'
$('.date-pick').datePicker();
if(!isset ($integrity) || is_string($integrity)) {
<div class="contentcontainer">
include_once($dir. "/menurub.php");
<? echo formatTitleh2($GLOBALS['lang']['workshop']['name']. " : ". $workshop_denomination); ?>
<form id="addtask" action=" <?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
<label for="task"> <? echo $GLOBALS['lang']['workshop']['task']; ?> * : </label>
<input name="task" type="text" class="textfield" id="task" maxlength="200" value=" <?php echo $form_task; ?>" />
<label for="task_details"> <? echo $GLOBALS['lang']['workshop']['task_details']; ?> * : </label>
<textarea id="task_details" name="task_details" <?php echo AREA_SETTINGS; ?> class="largetextfield" > <?php echo $form_task_details; ?></textarea>
<label for="date" > <? echo $GLOBALS['lang']['workshop']['date']; ?> :</label>
<input name="date" type="text" maxlength="10" id="date" class="date-pick shorttextfield date-text" value=" <?php echo $form_date; ?>" />
<input name="task_id" type="hidden" value=" <?php echo $task_id; ?>" id="task_id" />
<input name="id" type="hidden" value=" <?php echo $id; ?>" id="id" />
<input name="rub" type="hidden" value=" <?php echo $rub; ?>" id="rub" />
<input name="todo" type="hidden" value=" <?php echo $todo; ?>" id="todo" />
<input name="valider" type="submit" value=" <? echo $GLOBALS['lang']['btn']['valid'] ?>" class="button" id="valider" />
<?php include_once($dir. "/help.php"); ?>
if(empty($form_task)) $display_form_task= $GLOBALS['lang']['workshop']['recap_nc'];
else $display_form_task= formatText($form_task, $text_format);
if(empty($form_task_details)) $display_form_task_details= $GLOBALS['lang']['workshop']['recap_nc'];
else $display_form_task_details= formatText($form_task_details, $text_format);
<div class="contentcontainer">
include_once($dir. "/menurub.php");
<h2> <? echo $GLOBALS['lang']['recap']['title'] ?></h2>
echo "<dl class=\"dl3\">\n";
echo "<dt>". $GLOBALS['lang']['workshop']['task']. "</dt>\n";
echo "<dd>". $display_form_task. "</dd>\n";
echo "<dt>". $GLOBALS['lang']['workshop']['task_details']. "</dt>\n";
echo "<dd>". $display_form_task_details. "</dd>\n";
echo "<dt>". $GLOBALS['lang']['workshop']['date']. " :</dt>\n";
echo "<dd>". $form_date. "</dd>\n";
<form id="addtask" action=" <?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
<input name="task_id" type="hidden" value=" <?php echo $task_id; ?>" id="id" />
<input name="id" type="hidden" value=" <?php echo $id; ?>" id="id" />
<input name="rub" type="hidden" value=" <?php echo $rub; ?>" id="rub" />
<input name="todo" type="hidden" value=" <?php echo $todo; ?>" id="todo" />
<input name="data_table" type="hidden" value=" <?php echo $table; ?>" id="data_table" />
<input name="retour" type="button" value=" <? echo $GLOBALS['lang']['btn']['preview'] ?>" class="button" id="retour" onclick="history.go(-1);" />
<input name="enregistrer" type="submit" value=" <? echo $GLOBALS['lang']['btn']['save'] ?>" class="button" id="valider" />
<?php include_once($dir. "/help.php"); ?>
|