Source for file det.php
Documentation is available at det.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");
//////////// Check Droits utilisateur ////////////
if (!$l21auth->hasRight('dashboard')) ReloadIndex('admin');
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['scale_id'])) $scale_id= $_GET['scale_id'];
//$result_sdii=$sdi_object->GetInfoSdi($id, $sql_object);
//$result_e=$sdi_object->GetEvaluation( $id, $sql_object, $ID=-1);
//$result_p=$sdi_object->GetProvider( $id, $sql_object, $ID=-1);
//$result_r=$sdi_object->GetRules( $id, $sql_object, $ID=-1);
$result_sdii = $sql_object -> DBSelect($req_sdii);
// setting $default_threshold value
// By default initial value
$default_threshold = $result_sdii[0]['sdii_threshold_value'];
$result_r = $sql_object -> DBSelect($req_sdir);
$result_e = $sql_object -> DBSelect($req_sdie);
$result_p = $sql_object -> DBSelect($req_sdip);
$result_value = $sql_object -> DBSelect($req_sdiav);
//$result_value=$sdi_object->GetAllValue("SCA", $scale_id, $id, $sql_object);
$resultscale2 = $sql_object -> DBSelect($req_scale);
$link_det= $rub_link. "&todo=det&id=";
$link_det_theme= "index.php?rub=theme&todo=det&id=";
$link_det_indicator= "index.php?rub=sdi&todo=det&id=";
$link_sup= $rub_link. "&todo=sup&value_id=";
$link_mod= $rub_link. "&todo=mod&value_id=";
$link_add= $rub_link. "&todo=add&id=";
$navtitle= _t('dashboard','det'). " : ". $result_sdii[0]['sdii_name'];
<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>
include_once(THEME_ADMIN_PATH. "quickicons.php");
<div class="contentcontainer"> <?php
include_once(override($dir. '/menurub.php', THEME_ADMIN_PATH));
<h2> <?php echo formatTitleh2($result_sdii[0]['sdii_name']); ?></h2>
<?php echo "<a href=\"". $link_add. $id. "&scale_id=". $scale_id. "\" title=\"". _t('dashboard','add'). "\" class=\"ico_add2\">";?><i class="icon-plus-circled"></i><span> <?php echo _t('dashboard','add'); ?></span></a>
<?php echo "<a href=\"". $link_det_indicator. $id. "\" title=\"". _t('sdi','det'). "\" class=\"ico_generic2 no-action\">";?><i class="icon-eye"></i><span> <?php echo _t('sdi','det'); ?></span></a>
<?php if ($result_value<> false) {?> <br />
<?php if (count($result_value) > 2) {?>
<img src=" <?php echo override('../dashboard/graph.php')?>?id= <?php echo $id; ?>&scale_id= <?php echo $scale_id; ?>&display=true" id="imggraph" class="graph" alt=" <?php echo _t('dashboard','all_value');?>" />
<h2> <?php echo formatTitleh2(_t('dashboard','all_value'). " / ". $resultscale2[0]['scale_denomination']); ?></h2>
<table cellspacing="0" cellpadding="3" class="multisort">
echo "<td>". mb_ucfirst(_t('dashboard','value')). " (". formatText($result_sdii[0]['sdii_unit'], '2HTML'). ")". "</td>\n";
echo "<td>". mb_ucfirst(_t('dashboard','threshold_value')). "</td>\n";
echo "<td>". mb_ucfirst(_t('dashboard','comment')). "</td>\n";
echo "<td class=\"sorter-false\"> </td>\n";
for ($i= 0;$i< count($result_value);$i++ ){
// if set, we get it from the table
if(!is_null($result_value[$i]['sdiv_threshold'])) {
$threshold = $result_value[$i]['sdiv_threshold'];
$threshold = $default_threshold;
if(isset ($result_value[$i+ 1]['sdiv_value']) && is_numeric($result_value[$i+ 1]['sdiv_value'])) {
$evol = ($result_value[$i]['sdiv_value'] - $result_value[$i+ 1]['sdiv_value']) / $result_value[$i+ 1]['sdiv_value'] * 100;
// _debug('rate : '. fnumber_format($evol, 2, ',', ' '). ' % - details : ('.$result_value[$i]['sdiv_value']. ' - ' . $result_value[$i+1]['sdiv_value']. ') / '. $result_value[$i+1]['sdiv_value']);
($result_value[$i]['sdiv_comment_display'] == 'Y') ? $comment_status = _t('dashboard', 'public') : $comment_status = _t('dashboard', 'private');
if(!empty($result_value[$i]['sdiv_comment'])) {
$comment = '<div class="valuecomment">';
$comment .= '<div class="cont"><strong>'. ucfirst(_t('dashboard', 'comment')). ' ('. $comment_status. ') :</strong> '. $result_value[$i]['sdiv_comment']. '</div>';
echo "<td>". formatText($result_value[$i]['date_p'], '2HTML'). "</td>\n";
echo "<td>". formatText($result_value[$i]['sdiv_value'], '2HTML');
if ($result_value[$i]['sdiv_statut']== 'D') {
echo "<span class=\"state\">". mb_ucfirst(_t('statut','draft')). "</span>";
echo "<td class=\"threshold\">". $threshold. "</td>\n";
echo "<td class=\"rate\">". $evol. "</td>\n";
echo "<td>". $comment. "</td>\n";
echo "<td><div class=\"iconetab\"><a href=\"". $link_sup. $result_value[$i]['sdiv_id']. "&id=". $id. "&scale_id=". $scale_id. "\" title=\"". _t('dashboard','sup'). "\" class=\"ico_sup\"><i class=\"icon-trash\"></i><span>" . _t('dashboard','sup') . "</span></a>";
echo "<a href=\"". $link_mod. $result_value[$i]['sdiv_id']. "&id=". $id. "&scale_id=". $scale_id. "\" title=\"". _t('dashboard','mod'). "\" class=\"ico_mod\"><i class=\"icon-pencil\"></i><span>" . _t('dashboard','mod') . "</span></a></div></td>\n";
footerAddJS('../lib/js/jquery.tablesorter/jquery.tablesorter.min.js');
$str = '$("table.multisort").tablesorter({ });';
else echo "<div class=\"info\">". _t('dashboard','novalue'). ": ". formatText($resultscale2[0]['scale_denomination'], '2HTML'). "</div>";
if ($l21auth->isSuperAdmin())
echo "<a href=\"". $link_det_theme. $result_sdii[0]['sdii_theme']. "\" title=\"". formatText($result_sdii[0]['theme_name'], '2HTML'). "\">". formatText($result_sdii[0]['theme_name'], '2HTML'). "</a>";
else echo formatText($result_sdii[0]['theme_name'], '2HTML');
<dt> <?php echo mb_ucfirst(_t('sdi','description')) ?> :</dt>
<dd> <?php echo formatText($result_sdii[0]['sdii_description'], '2HTML');?></dd>
<dt> <?php echo mb_ucfirst(_t('sdi','threshold_relative')) ?> :</dt>
if ($result_sdii[0]['sdii_threshold_relative']== 'Y') echo mb_ucfirst(_t('sdi','threshold_relative_Y'));
<h2> <?php echo _t('sdi','info_mesure'); ?></h2>
<table cellspacing="0" cellpadding="3">
echo "<td>". mb_ucfirst(_t('sdi','min_value')). " (". formatText($result_sdii[0]['sdii_unit'], '2HTML'). ")". "</td>\n";
echo "<td>". mb_ucfirst(_t('sdi','max_value')). " (". formatText($result_sdii[0]['sdii_unit'], '2HTML'). ")". "</td>\n";
echo "<td>". mb_ucfirst(_t('sdi','initial_threshold_value')). " (". formatText($result_sdii[0]['sdii_unit'], '2HTML'). ")". "</td>\n";
echo "<td>". formatText(empty_nc($result_sdii[0]['sdii_threshold_value']), '2HTML'). "</td>\n";
echo "<td>". formatText($result_sdii[0]['sdii_frequency'], '2HTML'). "</td>\n";
<div class="toggle_title">
<a href="" id="affinfoge"> <?php echo mb_ucfirst(_t('dashboard','det_sdi'));?></a>
<div id="general" style="display: none;">
<?php /*<dt><?php echo mb_ucfirst(_t('sdi','range')) ?> : </dt>
<dd><?php echo formatText(empty_nc($result_sdii[0]['sdii_range']), '2HTML');?></dd> */ ?>
<div class="toggle_title">
<a href="#" id="affprovider"> <?php echo _t('sdi','aff_sdi_p');?></a>
<div id="provider" style="display: none;"> <?php if ($result_p[0]['sdip_name']== "") {
echo "<h2 class=\"info\">". _t('divers','nodata'). "</h2>";
if(empty($result_p[0]['sdip_email'])) {
$mailto_provider = empty_nc($result_p[0]['sdip_email']);
<dd> <?php echo $mailto_provider; ?></dd>
<dt> <?php echo mb_ucfirst(_t('sdi','p_description')) ?> :</dt>
<div class="toggle_title">
<a href="#" id="affeval"> <?php echo _t('sdi','aff_sdi_e');?></a>
<div id="evaluation" style="display: none;">
<table cellspacing="0" cellpadding="3">
echo "<td>". mb_ucfirst(_t('sdi','e_scale_compare')). "</td>\n";
echo "<td>". mb_ucfirst(_t('sdi','e_accessibility')). "</td>\n";
echo "<td>". mb_ucfirst(_t('sdi','e_global_performance')). "</td>\n";
echo "<td>". empty_nc($result_e[0]['sdie_scale_compare']). "</td>\n";
echo "<td>". empty_nc($result_e[0]['sdie_fiability']). "</td>\n";
echo "<td>". empty_nc($result_e[0]['sdie_accessibility']). "</td>\n";
echo "<td>". empty_nc($result_e[0]['sdie_lisibility']). "</td>\n";
echo "<td>". empty_nc($result_e[0]['sdie_relevance']). "</td>\n";
echo "<td>". empty_nc($result_e[0]['sdie_global_performance']). "</td>\n";
<div class="toggle_title">
<a href="#" id="affreg"> <?php echo _t('sdi','aff_sdi_r');?></a>
<div id="reglementation" style="display: none;"> <?php if ($result_r[0]['sdir_title']== "") {
echo "<h2 class=\"info\">". _t('divers','nodata'). "</h2>";
if(empty($result_r[0]['sdir_referer_uri'])) {
$rules_link = empty_nc($result_r[0]['sdir_referer_uri']);
<dt> <?php echo mb_ucfirst(_t('sdi','r_referer_uri')) ?> :</dt>
<dd> <?php echo $rules_link; "</dd>"; ?>
<?php include_once(override($dir. '/help.php', THEME_ADMIN_PATH)); ?></div>
<script type="text/javascript">
$(document).ready(function() {
$(".valuecomment").hover(
$('.cont', this).fadeIn();
|