Source for file mod.php
Documentation is available at mod.php
* @package linea21.modules
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
//////////// Check Inclusion de pages ////////////
include_once("../lib/lib_common.php");
include_once("../lib/input_helpers.php");
if(!isset ($_GET['id']) && !isset ($_POST['id'])) {
if(isset ($_POST['id'])) $id= $_POST['id'];
if(isset ($_GET['id'])) $id= $_GET['id'];
$link_mod_e= $rub_link. "&todo=mod_e&id=";
$link_mod_r= $rub_link. "&todo=mod_r&id=";
$link_mod_p= $rub_link. "&todo=mod_p&id=";
if (isset ($_POST['enregistrer'])) {
$data_table_sdi[$j]= $data_table[$i];
$result= $sdi_object->ModifySdi($ID= $id, $data_table_sdi, $sql_object);
$link_confirm= "confirm.php?rub=". $rub. "&todo=". $todo. "&id=". $id;
if(isset ($result)) header("Location: ". $link_confirm);
$data_form_sdi = $sql_object -> DBSelect($req_sdii);
//$data_form_sdi=$sdi_object->GetInfoSdi($id, $sql_object);
$form_name = formatText($data_form_sdi[0]['sdii_name'], '2FIELD');
$form_theme = $data_form_sdi[0]['sdii_theme'];
//$form_range = $data_form_sdi[0]['sdii_range'];
$form_description = formatText($data_form_sdi[0]['sdii_description'], '2FIELD');
$form_comment = formatText($data_form_sdi[0]['sdii_comment'], '2FIELD');
$form_goal = formatText($data_form_sdi[0]['sdii_goal'], '2FIELD');
$form_consulting = formatText($data_form_sdi[0]['sdii_consulting'], '2FIELD');
$form_unit = formatText($data_form_sdi[0]['sdii_unit'], '2FIELD');
$form_max_value = $data_form_sdi[0]['sdii_max_value'];
$form_min_value = $data_form_sdi[0]['sdii_min_value'];
$form_threshold_value = $data_form_sdi[0]['sdii_threshold_value'];
$form_frequency = $data_form_sdi[0]['sdii_frequency'];
$form_threshold_relative= $data_form_sdi[0]['sdii_threshold_relative'];
if($data_form_sdi[0]['sdii_statut']== 'D') $mask_statut_D= "checked=\"checked\""; else $mask_statut_D= '';
if($data_form_sdi[0]['sdii_statut']== 'P') $mask_statut_P= "checked=\"checked\""; else $mask_statut_P= '';
if (isset ($_POST['valider1'])) {
$table[0] = $_POST['sdi_name'];
$table[1] = $_POST['description'];
$table[2] = $_POST['comment'];
$table[3] = $_POST['sdi_theme'];
//$table[4] = $_POST['range'];
$table[5] = $_POST['goal'];
$table[6] = $_POST['consulting'];
$table[7] = $_POST['unit'];
$table[8] = $_POST['max_value'];
$table[9] = $_POST['min_value'];
$table[10]= $_POST['threshold_value'];
$table[11]= $_POST['frequency'];
$table[12]= $_POST['sdi_statut'];
if (isset ($_POST['threshold_relative'])) {
$integrity = $sdi_object -> CheckDataIntegrity_info($table);
$form_name = formatText($_POST['sdi_name'], '2FIELD');
$form_theme = $_POST['sdi_theme'];
$form_statut = $_POST['sdi_statut'];
//$form_range = $_POST['range'];
$form_description = formatText($_POST['description'], '2FIELD');
$form_comment = formatText($_POST['comment'], '2FIELD');
$form_goal = formatText($_POST['goal'], '2FIELD');
$form_consulting = formatText($_POST['consulting'], '2FIELD');
$form_unit = formatText($_POST['unit'], '2FIELD');
$form_max_value = $_POST['max_value'];
$form_min_value = $_POST['min_value'];
$form_threshold_value = $_POST['threshold_value'];
$form_threshold_relative= $table[13];
$form_frequency = $_POST['frequency'];
if($form_statut== 'D') $mask_statut_D= "checked=\"checked\""; else $mask_statut_D= '';
if($form_statut== 'P') $mask_statut_P= "checked=\"checked\""; else $mask_statut_P= '';
include_once("quickicons.php");
$data = $sql_object -> DBSelect($req_list_theme);
$data_sdi_name = $sql_object -> DBSelect($req_list_sdiname);
$navtitle= $GLOBALS['lang']['sdi']['mod_e']. " : ". $data_sdi_name[0]['sdii_name'];
<a href="index.php"> <?php echo $GLOBALS['lang']['way']['home'] ?></a>
<a href=" <?php echo $rub_link;
?>"> <?php echo $GLOBALS['lang']['menu']['sdi']?></a>
<span> <?php echo formatnavTitle($navtitle) ?></span>
if (!isset ($integrity) || is_string($integrity)) {
<div class="contentcontainer">
include_once($dir . "/menurub.php");
<a href=" <? echo $link_mod_e. $id ;?>"> <?echo $GLOBALS['lang']['sdi']['modify_sdi_e'];?></a> |
<a href=" <? echo $link_mod_p. $id ;?>"> <?echo $GLOBALS['lang']['sdi']['modify_sdi_p'];?></a> |
<a href=" <? echo $link_mod_r. $id ;?>"> <?echo $GLOBALS['lang']['sdi']['modify_sdi_r'];?></a>
<br class="brendstep" /><h2> <?php echo formatTitleh2($data_sdi_name[0]['sdii_name']); ?></h2>
<form id="addsdi" action=" <?php echo $_SERVER['SCRIPT_NAME'];
<label for="sdi_name" > <?php echo $GLOBALS['lang']['sdi']['name2'] ?> * :</label>
<input name="sdi_name" type="text" class="textfield" id="sdi_name" maxlength="255" value=" <?php echo $form_name;
<label for="sdi_theme" > <?php echo $GLOBALS['lang']['sdi']['theme'] ?> * : </label>
<?php echo $select_theme;
<label for="statut_P"> <? echo $GLOBALS['lang']['divers']['statut']; ?> * : </label>
<input name="sdi_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="sdi_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="range" ><?php echo $GLOBALS['lang']['sdi']['range'] ?> * :</label>
<input name="range" type="text" class="textfield" id="range" maxlength="150" value="<?php echo $form_range;
<label for="description" > <?php echo $GLOBALS['lang']['sdi']['description'] ?> * :</label>
<textarea id="description" name="description" <?php echo AREA_SETTINGS; ?> class="largetextfield" > <?php echo $form_description;
<label for="comment" > <?php echo $GLOBALS['lang']['sdi']['comment'] ?> :</label>
<textarea id="comment" name="comment" <?php echo AREA_SETTINGS; ?> class="largetextfield" > <?php echo $form_comment;
<label for="goal" > <?php echo $GLOBALS['lang']['sdi']['goal'] ?> :</label>
<textarea id="goal" name="goal" <?php echo AREA_SETTINGS; ?> class="largetextfield" > <?php echo $form_goal;
<label for="consulting" > <?php echo $GLOBALS['lang']['sdi']['consulting'] ?> :</label>
<textarea id="consulting" name="consulting" <?php echo AREA_SETTINGS; ?> class="largetextfield" > <?php echo $form_consulting;
<? echo $GLOBALS['lang']['sdi']['info_mesure']; ?>
<label for="unit" > <?php echo $GLOBALS['lang']['sdi']['unit'] ?> * :</label>
<input name="unit" type="text" class="textfield" id="unit" maxlength="100" value=" <?php echo $form_unit;
<label for="max_value" > <?php echo $GLOBALS['lang']['sdi']['max_value'] ?> * :</label>
<input name="max_value" type="text" class="textfield" id="max_value" maxlength="6" value=" <?php echo $form_max_value;
<label for="min_value" > <?php echo $GLOBALS['lang']['sdi']['min_value'] ?> * :</label>
<input name="min_value" type="text" class="textfield" id="min_value" maxlength="100" value=" <?php echo $form_min_value;
<label for="threshold_value" > <?php echo $GLOBALS['lang']['sdi']['threshold_value'] ?> * :</label>
<input name="threshold_value" type="text" class="textfield" id="threshold_value" maxlength="100" value=" <?php echo $form_threshold_value;
<label for="frequency" > <?php echo $GLOBALS['lang']['sdi']['frequency'] ?> * :</label>
<input name="frequency" type="text" class="textfield" id="frequency" maxlength="11" value=" <?php echo $form_frequency;
<label for="threshold_relative" > <?php echo $GLOBALS['lang']['sdi']['threshold_relative'] ?> * :</label>
<input type="checkbox" name="threshold_relative" id="threshold_relative" <? if ($form_threshold_relative== 'Y') echo " checked=\"checked\"" ?> />
<div class="chekbox"> <?php echo $GLOBALS['lang']['sdi']['threshold_relative_comment'] ?></div>
<input name="id" type="hidden" value=" <?php echo $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="valider1" type="submit" value=" <?php echo $GLOBALS['lang']['btn']['valid'] ?>" class="button" id="valider" />
<?php include_once($dir . "/help.php");
if (!isset ($integrity5) || is_string($integrity5)) {
//$display_sdi_range = empty_nc($table[4]);
$display_sdi_max_value = empty_nc($table[8]);
$display_sdi_min_value = empty_nc($table[9]);
$display_sdi_threshold_value = empty_nc($table[10]);
$display_sdi_frequency = empty_nc($table[11]);
$display_sdi_statut = empty_nc($table[12]);
$onetheme = $sql_object -> DBSelect($onetheme);
$display_sdi_theme = formatText($onetheme[0]['theme_name'], '2HTML');
if ($table[13]== 'Y') $display_sdi_threshold_relative = $GLOBALS['lang']['sdi']['threshold_relative_Y'];
else $display_sdi_threshold_relative = $GLOBALS['lang']['sdi']['threshold_relative_N'];
<div class="contentcontainer">
include_once($dir . "/menurub.php");
<h2> <?php echo $GLOBALS['lang']['recap']['title'] ;
<dt> <?php echo $GLOBALS['lang']['sdi']['name2'] ;
<dd> <?php echo $display_sdi_name ;
<dt> <?php echo $GLOBALS['lang']['divers']['statut'] ;
<dt> <?php echo $GLOBALS['lang']['sdi']['theme'] ;
<dd> <?php echo $display_sdi_theme ;
<?php /*<dt><?php echo $GLOBALS['lang']['sdi']['range'] ;
<dd><?php echo $display_sdi_range ;
<dt> <?php echo $GLOBALS['lang']['sdi']['description'] ;
<dd> <?php echo $display_sdi_description ;
<dt> <?php echo $GLOBALS['lang']['sdi']['comment'] ;
<dd> <?php echo $display_sdi_comment ;
<dt> <?php echo $GLOBALS['lang']['sdi']['goal'] ;
<dd> <?php echo $display_sdi_goal ;
<dt> <?php echo $GLOBALS['lang']['sdi']['consulting'] ;
<dd> <?php echo $display_sdi_consulting ;
<dt> <?php echo $GLOBALS['lang']['sdi']['unit'] ;
<dd> <?php echo $display_sdi_unit ;
<dt> <?php echo $GLOBALS['lang']['sdi']['max_value'] ;
<dd> <?php echo $display_sdi_max_value ;
<dt> <?php echo $GLOBALS['lang']['sdi']['min_value'] ;
<dd> <?php echo $display_sdi_min_value ;
<dt> <?php echo $GLOBALS['lang']['sdi']['threshold_value'] ;
<dd> <?php echo $display_sdi_threshold_value ;
<dt> <?php echo $GLOBALS['lang']['sdi']['threshold_relative'] ;
<dd> <?php echo $display_sdi_threshold_relative ;
<dt> <?php echo $GLOBALS['lang']['sdi']['frequency'] ;
<dd> <?php echo $display_sdi_frequency ;
<form id="addsdi5" action=" <?php echo $_SERVER['SCRIPT_NAME'];
<input name="rub" type="hidden" value=" <?php echo $rub;
<input name="todo" type="hidden" value=" <?php echo $todo;
<input name="id" type="hidden" value=" <?php echo $id;
<input name="data_table" type="hidden" value=" <?php echo $table;
<input name="retour" type="button" value=" <?php echo $GLOBALS['lang']['btn']['preview'] ?>" class="button" id="retour" onclick="history.go(-1);" />
<input name="enregistrer" type="submit" value=" <?php echo $GLOBALS['lang']['btn']['save'] ?>" class="button" id="valider" />
<?php include_once($dir . "/help.php");
|