Source for file add.php
Documentation is available at add.php
* @package linea21.modules
* @subpackage workshoprep
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
* 'Workshoprep' (as Workshop Report) module is used by 'Workshop' modules
//////////// Check Inclusion de pages ////////////
include_once("../lib/lib_common.php");
if(isset ($_GET['work_id'])) $work_id= $_GET['work_id'];
if(isset ($_POST['work_id'])) $work_id= $_POST['work_id'];
$cancel_action_link= "?rub=workshop&todo=det&id=". $work_id;
$result= $sql_object->DBSelect($requete);
if(count($result)> 1) exit();
$workrep_workshop_name= $result[0]['workshop_denomination'];
//////////// Check Droits utilisateur ////////////
$rub_link= "index.php?rub=workshop";
<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($GLOBALS['lang']['workshoprep']['add']. " (" . $workrep_workshop_name. ")"); ?></span>
$mask_statut_D= "checked=\"checked\"";
if(isset ($_POST['enregistrer'])) {
$result= $workshop_report_object->AddWorkshopReport($data_table, $sql_object);
$link_confirm= "confirm.php?rub=". $rub. "&todo=". $todo. "&id=". $result;
if(isset ($_POST['valider'])) {
$table[0]= $_POST['workrep_title'];
$table[1]= $_POST['workrep_resume'];
$table[2]= $_POST['workrep_comment'];
$table[3]= $_POST['workrep_statut'];
$table[4]= $_POST['work_id'];
$integrity= $workshop_report_object->CheckDataIntegrity($table, $sql_object);
$form_title= formatText($_POST['workrep_title'], $text_format);
$form_resume= formatText($_POST['workrep_resume'], $text_format);
$form_comment= formatText($_POST['workrep_comment'], $text_format);
if($_POST['workrep_statut']== 'D') $mask_statut_D= "checked=\"checked\""; else $mask_statut_D= '';
if($_POST['workrep_statut']== 'P') $mask_statut_P= "checked=\"checked\""; else $mask_statut_P= '';
include_once("quickicons.php");
if(!isset ($integrity) || is_string($integrity)) {
<div class="contentcontainer">
include_once($dir. "/menurub.php");
<h2> <? echo formatTitleh2($GLOBALS['lang']['workshoprep']['add_title']. " (" . $workrep_workshop_name. ")"); ?></h2>
<form id="addworkrep" action=" <?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
<label for="workrep_title"> <? echo $GLOBALS['lang']['workshoprep']['title']; ?> : *</label>
<input name="workrep_title" type="text" class="textfield" id="workrep_title" maxlength="200" value=" <?php echo $form_title; ?>" />
<label for="workrep_resume"> <? echo $GLOBALS['lang']['workshoprep']['resume']; ?> : *</label>
<textarea id="workrep_resume" name="workrep_resume" class="largetextfield" <?php echo AREA_SETTINGS; ?>> <?php echo $form_resume; ?></textarea>
<label for="statut_D"> <? echo $GLOBALS['lang']['workshoprep']['statut']; ?> : *</label>
<input name="workrep_statut" type="radio" id="statut_P" value="P" <?php echo $mask_statut_P; ?> /><span class="radio"> <?php echo $GLOBALS['lang']['statut']['public']; ?></span>
<input name="workrep_statut" type="radio" id="statut_D" value="D" <?php echo $mask_statut_D; ?> /><span class="radio"> <?php echo $GLOBALS['lang']['statut']['draft']; ?></span>
<label for="workrep_comment"> <? echo $GLOBALS['lang']['workshoprep']['comment']; ?> : </label>
<textarea id="workrep_comment" name="workrep_comment" class="largetextfield" <?php echo AREA_SETTINGS; ?>> <?php echo $form_comment; ?></textarea>
<input name="work_id" type="hidden" value=" <?php echo $work_id; ?>" id="work_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_comment)) $display_form_comment= $GLOBALS['lang']['divers']['none'];
else $display_form_comment= $form_comment;
<div class="contentcontainer">
include_once($dir. "/menurub.php");
<h2> <? echo $GLOBALS['lang']['recap']['title'] ?></h2>
echo "<dl class=\"dl3\">\n";
echo "<dt>". $GLOBALS['lang']['workshoprep']['title']. "</dt>\n";
echo "<dd>". $form_title. "</dd>\n";
echo "<dt>". $GLOBALS['lang']['workshoprep']['resume']. "</dt>\n";
echo "<dd>". $form_resume. "</dd>\n";
echo "<dt>". $GLOBALS['lang']['divers']['statut'] . "</dt>\n";
echo "<dt>". $GLOBALS['lang']['workshoprep']['comment'] . "</dt>\n";
echo "<dd>". $display_form_comment. "</dd>\n";
<form id="addworkrep" action=" <?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
<input name="work_id" type="hidden" value=" <?php echo $work_id; ?>" id="work_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"); ?>
|