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['value_id']) && !isset ($_POST['value_id'])) {
if (isset ($_POST['value_id'])) $value_id = $_POST['value_id'];
if (isset ($_GET['value_id'])) $value_id = $_GET['value_id'];
if (!isset ($_GET['id']) && !isset ($_POST['id'])) {
if (isset ($_POST['id'])) $id = $_POST['id'];
if (isset ($_GET['id'])) $id = $_GET['id'];
if (!isset ($_GET['scale_id']) && !isset ($_POST['scale_id'])) {
if (isset ($_POST['scale_id'])) $scale_id = $_POST['scale_id'];
if (isset ($_GET['id'])) $scale_id = $_GET['scale_id'];
$result_value = $sql_object -> DBSelect($req_sdiov);
//$result_value = $sdi_object -> GetOneValue($value_id, $sql_object);
$link_mod_sdi = "index.php?&rub=sdi&todo=det&id=";
$link_cancel= $rub_link. "&todo=det&id=". $id. "&scale_id=". $scale_id;
if (isset ($_POST['enregistrer'])) {
$result = $sdi_object -> ModifyValue($value_id, $data_table, $sql_object);
$link_confirm= "confirm.php?rub=". $rub. "&todo=". $todo. "&id=". $id. "&scale_id=". $scale_id;
if (isset ($result)) header("Location: " . $link_confirm);
$form_value = $result_value[0]['sdiv_value'];
$form_scale_id = $scale_id;
$form_date = $result_value[0]['date_p'];
$form_statut = $result_value[0]['sdiv_statut'];
$form_comment = $result_value[0]['sdiv_comment'];
$form_statutc = $result_value[0]['sdiv_comment_display'];
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= '';
if($form_statutc== 'Y') $mask_statutc_public= "checked=\"checked\""; else $mask_statutc_public= '';
if($form_statutc== 'N') $mask_statutc_private= "checked=\"checked\""; else $mask_statutc_private= '';
if (isset ($_POST['valider1'])) {
$table[0] = $_POST['value'];
$table[1] = $_POST['id'];
$table[2] = $_POST['scale'];
$table[3] = $_POST['date'];
$table[4] = $_POST['statut'];
$table[5] = $_POST['comment'];
$table[6] = $_POST['statutc'];
$integrity = $sdi_object -> CheckDataIntegrity_value($table, $sql_object);
$form_value = $_POST['value'];
$form_sdi_id = $_POST['id'];
$form_scale_id = $_POST['scale'];
$form_date = $_POST['date'];
$form_statut = $_POST['statut'];
$form_statutc = $_POST['statutc'];
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= '';
if($form_statutc== 'Y') $mask_statutc_public= "checked=\"checked\""; else $mask_statutc_public= '';
if($form_statutc== 'N') $mask_statutc_private= "checked=\"checked\""; else $mask_statutc_private= '';
include_once(THEME_ADMIN_PATH. "quickicons.php");
$resultscale = $sql_object -> DBSelect($req_list_scale);
$result_sdii = $sql_object -> DBSelect($req_sdii);
$navtitle= _t('dashboard','mod'). " : ". $result_sdii[0]['sdii_name'];
footerAddJS('../lib/js/jquery.datePicker.l10n/jquery.ui.datepicker-'. U_L. '.js');
<li><a href="index.php" class="chemin_home"> <?php echo _t('way','home'); ?></a></li>
<li><a href=" <?php echo $rub_link; ?>" id="chemin_ <?php echo $rub; ?>" class="chemin_rub"> <?php echo _t('menu','dashboard'); ?></a></li>
<li><span> <?php echo formatnavTitle($navtitle); ?></span></li>
<script type="text/javascript">
var dateFormat = " <?php echo DATE_FORMAT; ?>";
dateFormat = dateFormat.replace("yyyy", "yy");
$(".date-pick").datepicker({
buttonImage: "../lib/js/calendar.png",
dateMin: new Date(2000, 1 - 1, 1)
$( ".date-pick" ).datepicker( $.datepicker.regional[ " <?php echo U_L; ?>" ] );
if (!isset ($integrity) || is_string($integrity)) {
<div class="contentcontainer">
include_once($dir . "/menurub.php");
<a href=" <?php echo $link_mod_sdi . $id ; ?>"> <?php echo _t('dashboard','det_sdi');?></a>
<h2> <?php echo formatTitleh2($result_sdii[0]['sdii_name']); ?></h2>
<form id="addvalue" action=" <?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
<label for="value"> <?php echo _t('dashboard','value') ?> * ( <?php echo formatText($result_sdii[0]['sdii_unit'], '2HTML'); ?>) :</label>
<input name="value" type="text" id="value" maxlength="255" value=" <?php echo $form_value; ?>" class="textfield" />
<label for="scale"> <?php echo _t('dashboard','scale') ?> * : </label>
<div class="label"> <?php echo _t('divers','statut'); ?> * : </div>
<input name="statut" type="radio" id="statut_P" value="P" <?php echo $mask_statut_P; ?> />
<label for="statut_P"> <?php echo _t('statut','public'); ?></label>
<input name="statut" type="radio" id="statut_D" value="D" <?php echo $mask_statut_D; ?> />
<label for="statut_D"> <?php echo _t('statut','draft'); ?></label>
<label for="date"> <?php echo _t('dashboard','date'); ?> : </label>
<input name="date" type="text" maxlength="10" id="date" class="date-pick shorttextfield" value=" <?php echo $form_date; ?>" />
<label for="comment"> <?php echo _t('dashboard','comment') ?> : </label>
<textarea id="comment" name="comment" <?php echo AREA_SETTINGS; ?> class="largetextfield"> <?php echo $form_comment; ?></textarea>
<div class="label"> <?php echo _t('dashboard','comment_status'); ?> * : </div>
<input name="statutc" type="radio" id="statutc_P" value="Y" <?php echo $mask_statutc_public; ?> />
<label for="statutc_P"> <?php echo _t('dashboard','public'); ?></label>
<input name="statutc" type="radio" id="statutc_D" value="N" <?php echo $mask_statutc_private; ?> />
<label for="statutc_D"> <?php echo _t('dashboard','private'); ?></label>
<a name="affeval" id="affeval" style="display: none;"></a> <a href="#affeval" onclick="$('#evaluation').slideToggle();"> <?php echo _t('sdi','info_mesure'); ?></a>
<div id="evaluation" style="display: none;"><br class="brendstep" />
<table cellspacing="0" cellpadding="3">
echo "<td>" . _t('sdi','unit') . "</td>\n";
echo "<td>" . _t('sdi','max_value') . "</td>\n";
echo "<td>" . _t('sdi','min_value') . "</td>\n";
echo "<td>" . _t('sdi','threshold_value') . "</td>\n";
echo "<td>" . $result_sdii[0]['sdii_unit'] . "</td>\n";
echo "<td>" . $result_sdii[0]['sdii_max_value'] . "</td>\n";
echo "<td>" . $result_sdii[0]['sdii_min_value'] . "</td>\n";
echo "<td>" . $result_sdii[0]['sdii_threshold_value'] . "</td>\n";
<input name="id" type="hidden" value=" <?php echo $id; ?>" id="id" />
<input name="scale_id" type="hidden" value=" <?php echo $scale_id; ?>" id="scale_id" />
<input name="value_id" type="hidden" value=" <?php echo $value_id; ?>" id="value_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 _t('btn','valid') ?>" class="button" id="valider" />
<?php include_once($dir . "/help.php");
if (!isset ($integrity5) || is_string($integrity5)) {
$resultscale2 = $sql_object -> DBSelect($req_scale);
$display_comment = formatText($_POST['comment'], '2HTML');
($form_statutc == 'Y') ? $display_comment_status = _t('dashboard', 'public') : $display_comment_status = _t('dashboard', 'private');
$display_sdi_value = $table[0];
$display_sdi_scale = formatText($resultscale2[0]['scale_denomination'], '2HTML');
$display_sdi_date = $table[3];
$display_sdi_statut = $table[4];
<div class="contentcontainer">
include_once($dir . "/menurub.php");
<h2> <?php echo _t('recap','title') ;?></h2>
<dt> <?php echo _t('dashboard','value'); ?> :</dt>
<dd> <?php echo $display_sdi_value . " " . $result_sdii[0]['sdii_unit']; ?>
<dt> <?php echo _t('sdi','name2'); ?> :</dt>
<dd> <?php echo formatText($result_sdii[0]['sdii_name'], '2HTML'); ?> </dd>
<dt> <?php echo _t('divers','statut'); ?> :</dt>
<dt> <?php echo _t('dashboard','date'); ?> :</dt>
<dd> <?php echo $display_sdi_date; ?></dd>
<dt> <?php echo _t('dashboard','scale'); ?> :</dt>
<dd> <?php echo $display_sdi_scale; ?></dd>
<dt> <?php echo _t('dashboard','comment'); ?> :</dt>
<dd> <?php echo $display_comment ;?></dd>
<dt> <?php echo _t('dashboard','comment_status'); ?> :</dt>
<dd> <?php echo $display_comment_status ;?></dd>
<form id="addvalue2" action=" <?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
<input name="rub" type="hidden" value=" <?php echo $rub; ?>" id="rub" />
<input name="todo" type="hidden" value=" <?php echo $todo; ?>" id="todo" />
<input name="id" type="hidden" value=" <?php echo $id; ?>" id="id" />
<input name="scale_id" type="hidden" value=" <?php echo $scale_id; ?>" id="scale_id" />
<input name="value_id" type="hidden" value=" <?php echo $value_id; ?>" id="value_id" />
<input name="data_table" type="hidden" value=" <?php echo $table; ?>" id="data_table" />
<input name="retour" type="button" value=" <?php echo _t('btn','preview') ?>" class="button" id="retour" onclick="history.go(-1);" />
<input name="enregistrer" type="submit" value=" <?php echo _t('btn','save') ?>" class="button" id="valider" />
include_once($dir . "/help.php");
|