linea21-modules
[ class tree: linea21-modules ] [ index: linea21-modules ] [ all elements ]

Source for file det.php

Documentation is available at det.php

  1. <?php
  2. /**
  3.  * @package linea21.modules
  4.  * @subpackage dashboard
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10.  
  11. //////////// Check Inclusion de pages ////////////
  12. if (!function_exists('AuthenthificationProcess')){
  13.   include_once("../lib/lib_common.php");
  14.   ReloadIndex('admin');
  15. }
  16. ////////////
  17.  
  18. if(!isset($_GET['id']&& !isset($_POST['id'])) {
  19.   $id="1";
  20. else {
  21.   if(isset($_POST['id']))    $id=$_POST['id'];
  22.   if(isset($_GET['id']))    $id=$_GET['id'];
  23. }
  24. if(!isset($_GET['scale_id']&& !isset($_POST['scale_id'])) {
  25.   $scale_id=1;
  26. else {
  27.   if(isset($_POST['scale_id']))    $scale_id=$_POST['scale_id'];
  28.   if(isset($_GET['scale_id']))    $scale_id=$_GET['scale_id'];
  29. }
  30.  
  31. $sdi_objectnew sdi;
  32. //$result_sdii=$sdi_object->GetInfoSdi($id, $sql_object);
  33. //$result_e=$sdi_object->GetEvaluation( $id, $sql_object, $ID=-1);
  34. //$result_p=$sdi_object->GetProvider( $id, $sql_object, $ID=-1);
  35. //$result_r=$sdi_object->GetRules( $id, $sql_object, $ID=-1);
  36. $req_sdii=SQL_getInfoSdi($id);
  37. $result_sdii $sql_object -> DBSelect($req_sdii);
  38.  
  39. $req_sdir=SQL_getRules$id$sql_object$ID=-1);
  40. $result_r $sql_object -> DBSelect($req_sdir);
  41.  
  42. $req_sdie=SQL_getEvaluation$id$sql_object$ID=-1);
  43. $result_e $sql_object -> DBSelect($req_sdie);
  44.  
  45. $req_sdip=SQL_getProvider$id$sql_object$ID=-1);
  46. $result_p $sql_object -> DBSelect($req_sdip);
  47.  
  48. $req_sdiav=SQL_getAllValue("SCA"$scale_id$id);
  49. $result_value $sql_object -> DBSelect($req_sdiav);
  50.  
  51. //$result_value=$sdi_object->GetAllValue("SCA", $scale_id, $id, $sql_object);
  52. $req_scale=SQL_getonescale($scale_id);
  53. $resultscale2 $sql_object -> DBSelect($req_scale);
  54.  
  55. $link_det=$rub_link."&amp;todo=det&amp;id=";
  56. $link_det_theme="index.php?rub=theme&amp;todo=det&amp;id=";
  57. $link_sup=$rub_link."&amp;todo=sup&amp;value_id=";
  58. $link_mod=$rub_link."&amp;todo=mod&amp;value_id=";
  59. $link_add=$rub_link."&amp;todo=add&amp;id=";
  60. $navtitle=_t('dashboard','det')." : ".$result_sdii[0]['sdii_name'];
  61. //valeur du graphique
  62. ?>
  63. <div id="chemin">
  64. <ul>
  65.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home'?></a>
  66.     </li>
  67.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>"
  68.         class="chemin_rub"><?php echo _t('menu','dashboard')?></a></li>
  69.     <li><span><?php echo formatnavTitle($navtitle);
  70.     ?></span></li>
  71. </ul>
  72. </div>
  73. <!--end barre haute -->
  74.     <?php
  75.     include_once(THEME_ADMIN_PATH."quickicons.php");
  76.     ?>
  77. <div class="contentcontainer"><?php
  78. include_once($dir."/menurub.php");
  79. ?>
  80. <div id="content">
  81. <h2><?php echo formatTitleh2($result_sdii[0]['sdii_name']);
  82. ?></h2>
  83. <div class="iconetodo2"><?php echo "<a href=\"".$link_add.$id."&amp;scale_id=".$scale_id."\" title=\""._t('dashboard','add')."\" class=\"ico_add2\">";?></a>
  84. </div>
  85.  
  86. <?php if ($result_value<>false{?> <br />
  87. <?php if (count($result_value)>2{?> <img
  88.     src="../dashboard/graph.php?id=<?php echo $id?>&amp;scale_id=<?php echo $scale_id?>"
  89.     id="imggraph" class="graph"
  90.     alt="<?php echo _t('dashboard','all_value');?>" />
  91. <?}
  92. ?>
  93. <h2><?php echo formatTitleh2(_t('dashboard','all_value')." / ".$resultscale2[0]['scale_denomination'])
  94. ?></h2>
  95. <table cellspacing="0" cellpadding="3">
  96.     <thead>
  97.         <tr>
  98.         <?
  99.         echo "<td>"._t('dashboard','date')."</td>\n";
  100.         echo "<td>"._t('dashboard','value')." (".formatText($result_sdii[0]['sdii_unit']'2HTML').")"."</td>\n";
  101.         echo "<td>"._t('dashboard','comment')."</td>\n";
  102.         echo "<td>&nbsp;</td>\n";
  103.         ?>
  104.         </tr>
  105.     </thead>
  106.     <tbody>
  107.     <?
  108.     for ($i=0;$i<count($result_value);$i++){
  109.       $comment '';
  110.       ($result_value[$i]['sdiv_comment_display'== 'Y'$comment_status _t('dashboard''public'$comment_status _t('dashboard''private');
  111.       if(!empty($result_value[$i]['sdiv_comment'])) {
  112.         $comment  '<div class="valuecomment">';
  113.         $comment .= '<img src="'.THEME_ADMIN_PATH.'images/infobull.gif" />';
  114.         $comment .= '<div class="cont"><strong>'.ucfirst(_t('dashboard''comment')).' ('.$comment_status.') :</strong> '.$result_value[$i]['sdiv_comment'].'</div>';
  115.         $comment .= '</div>';
  116.       }
  117.       echo "<tr>\n";
  118.       echo "<td>"formatText($result_value[$i]['date_p']'2HTML')."</td>\n";
  119.       echo "<td>"formatText($result_value[$i]['sdiv_value']'2HTML');
  120.  
  121.       if ($result_value[$i]['sdiv_statut']=='D'{
  122.         echo "<span class=\"state\">"._t('statut','draft')."</span>";
  123.       }
  124.       echo "</td>\n";
  125.       echo "<td>"$comment."</td>\n";
  126.       echo "<td><div class=\"iconetab\"><a href=\"".$link_sup.$result_value[$i]['sdiv_id']."&amp;id=".$id."&amp;scale_id=".$scale_id."\" title=\""._t('dashboard','sup')."\" class=\"ico_sup\"></a>";
  127.       echo "<a href=\"".$link_mod.$result_value[$i]['sdiv_id']."&amp;id=".$id."&amp;scale_id=".$scale_id."\" title=\""._t('dashboard','mod')."\" class=\"ico_mod\"></a></div></td>\n";
  128.       echo "</tr>\n";
  129.  
  130.     }
  131.     ?>
  132.     </tbody>
  133. </table>
  134.     <?php }
  135.     else echo "><div class=\"info\">"._t('dashboard','novalue').": ".formatText($resultscale2[0]['scale_denomination']'2HTML')."</div>";
  136.     ?>
  137.  
  138. <dl class="dl2">
  139.     <dt><?php echo _t('sdi','theme'?> :</dt>
  140.     <dd><?php 
  141.     if (IsSuperAdmin())
  142.     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>";
  143.     else echo formatText($result_sdii[0]['theme_name']'2HTML');
  144.     ?></dd>
  145.     <dt><?php echo _t('sdi','description'?> :</dt>
  146.     <dd><?php echo formatText($result_sdii[0]['sdii_description']'2HTML');?></dd>
  147.     <dt><?php echo _t('sdi','threshold_relative'?> :</dt>
  148.     <dd><?php 
  149.     if ($result_sdii[0]['sdii_threshold_relative']=='Y'echo _t('sdi','threshold_relative_Y');
  150.     else echo _t('sdi','threshold_relative_N');
  151.     ?></dd>
  152. </dl>
  153.  
  154.  
  155. <h2><?php echo _t('sdi','info_mesure')?></h2>
  156.  
  157. <table cellspacing="0" cellpadding="3">
  158.     <thead>
  159.         <tr>
  160.         <?
  161.         echo "<td>"._t('sdi','max_value')." (".formatText($result_sdii[0]['sdii_unit']'2HTML').")"."</td>\n";
  162.         echo "<td>"._t('sdi','min_value')." (".formatText($result_sdii[0]['sdii_unit']'2HTML').")"."</td>\n";
  163.         echo "<td>"._t('sdi','threshold_value')." (".formatText($result_sdii[0]['sdii_unit']'2HTML').")"."</td>\n";
  164.         echo "<td>"._t('sdi','frequency')."</td>\n";
  165.         ?>
  166.         </tr>
  167.     </thead>
  168.     <tbody>
  169.     <?echo "<tr>\n";
  170.     echo "<td>"formatText($result_sdii[0]['sdii_max_value']'2HTML')."</td>\n";
  171.     echo "<td>"formatText($result_sdii[0]['sdii_min_value']'2HTML')."</td>\n";
  172.     echo "<td>"formatText($result_sdii[0]['sdii_threshold_value']'2HTML')."</td>\n";
  173.     echo "<td>"formatText($result_sdii[0]['sdii_frequency']'2HTML')."</td>\n";
  174.     echo "</tr>\n";
  175.     ?>
  176.     </tbody>
  177. </table>
  178.  
  179. <div class="sdi_det"><a name="affinfoge" id="affinfoge"
  180.     style="display: none;"></a> <a href="#affinfoge"
  181.     onclick="$('#general').slideToggle();"><?echo _t('dashboard','det_sdi');?></a>
  182. </div>
  183. <div id="general" style="display: none;">
  184. <dl class="dl2">
  185.  
  186. <?php /*<dt><?php echo _t('sdi','range') ?> : </dt>
  187. <dd><?php echo formatText(empty_nc($result_sdii[0]['sdii_range']), '2HTML');?></dd> */ ?>
  188.     <dt><?php echo _t('sdi','comment'?> :</dt>
  189.     <dd><?php echo formatText(empty_nc($result_sdii[0]['sdii_comment'])'2HTML');?></dd>
  190.     <dt><?php echo _t('sdi','goal'?> :</dt>
  191.     <dd><?php echo formatText(empty_nc($result_sdii[0]['sdii_goal'])'2HTML');?></dd>
  192.     <dt><?php echo _t('sdi','consulting'?> :</dt>
  193.     <dd><?php echo formatText(empty_nc($result_sdii[0]['sdii_consulting'])'2HTML');?></dd>
  194.     <dt><?php echo _t('divers','statut'?> :</dt>
  195.     <dd><?php echo display_statut($result_sdii[0]['sdii_statut']);?></dd>
  196. </dl>
  197. </div>
  198.  
  199. <div class="sdi_det"><a name="affprovider" id="affprovider"
  200.     style="display: none;"></a> <a href="#affprovider"
  201.     onclick="$('#provider').slideToggle();"><?echo _t('sdi','aff_sdi_p');?></a>
  202. </div>
  203. <div id="provider" style="display: none;"><?php if ($result_p[0]['sdip_name']==""{
  204.   echo "<h2 class=\"info\">"._t('sdi','noresultp')."</h2>";
  205. }else {?> <?php
  206. if(empty($result_p[0]['sdip_email'])) {
  207.   $mailto_provider empty_nc($result_p[0]['sdip_email']);
  208. else {
  209.   $mailto_provider =  "<a href=\"mailto:".formatText(empty_nc($result_p[0]['sdip_email'])'2HTML')."\" title=\"".formatText(empty_nc($result_p[0]['sdip_email'])'2HTML')."\">".formatText(empty_nc($result_p[0]['sdip_email'])'2HTML')."</a>";
  210. }
  211. ?>
  212. <h2><?php echo formatText(empty_nc($result_p[0]['sdip_name'])'2HTML');?></h2>
  213. <dl class="dl2">
  214.     <dt><?php echo formatText(empty_nc(_t('sdi','p_service'))'2HTML'?>
  215.     :</dt>
  216.     <dd><?php echo formatText(empty_nc($result_p[0]['sdip_service'])'2HTML');?></dd>
  217.     <dt><?php echo formatText(empty_nc(_t('sdi','p_incharge'))'2HTML'?>
  218.     :</dt>
  219.     <dd><?php echo formatText(empty_nc($result_p[0]['sdip_incharge'])'2HTML');?></dd>
  220.     <dt><?php echo _t('sdi','p_address'?> :</dt>
  221.     <dd><?php echo formatText(empty_nc($result_p[0]['sdip_address'])'2HTML');?></dd>
  222.     <dt><?php echo _t('sdi','p_phone'?> :</dt>
  223.     <dd><?php echo formatText(empty_nc($result_p[0]['sdip_phone'])'2HTML');?></dd>
  224.     <dt><?php echo _t('sdi','p_fax'?> :</dt>
  225.     <dd><?php echo formatText(empty_nc($result_p[0]['sdip_fax'])'2HTML');?></dd>
  226.     <dt><?php echo _t('sdi','p_email'?> :</dt>
  227.     <dd><?php echo $mailto_provider?></dd>
  228.     <dt><?php echo _t('sdi','p_description'?> :</dt>
  229.     <dd><?php echo formatText(empty_nc($result_p[0]['sdip_description'])'2HTML');?></dd>
  230. </dl>
  231. <?php ?></div>
  232.  
  233. <div class="sdi_det"><a name="affeval" id="affeval"
  234.     style="display: none;"></a> <a href="#affeval"
  235.     onclick="$('#evaluation').slideToggle();"><?echo _t('sdi','aff_sdi_e');?></a>
  236. </div>
  237. <div id="evaluation" style="display: none;">
  238. <table cellspacing="0" cellpadding="3">
  239.     <thead>
  240.         <tr>
  241.         <?
  242.         echo "<td>"._t('sdi','e_scale_compare')."</td>\n";
  243.         echo "<td>"._t('sdi','e_fiability')."</td>\n";
  244.         echo "<td>"._t('sdi','e_accessibility')."</td>\n";
  245.         echo "<td>"._t('sdi','e_lisibility')."</td>\n";
  246.         echo "<td>"._t('sdi','e_relevance')."</td>\n";
  247.         echo "<td>"._t('sdi','e_global_performance')."</td>\n";
  248.         ?>
  249.         </tr>
  250.     </thead>
  251.     <tbody>
  252.     <?echo "<tr>\n";
  253.     echo "<td>"empty_nc($result_e[0]['sdie_scale_compare'])."</td>\n";
  254.     echo "<td>"empty_nc($result_e[0]['sdie_fiability'])."</td>\n";
  255.     echo "<td>"empty_nc($result_e[0]['sdie_accessibility'])."</td>\n";
  256.     echo "<td>"empty_nc($result_e[0]['sdie_lisibility'])."</td>\n";
  257.     echo "<td>"empty_nc($result_e[0]['sdie_relevance'])."</td>\n";
  258.     echo "<td>"empty_nc($result_e[0]['sdie_global_performance'])."</td>\n";
  259.     echo "</tr>\n";
  260.     ?>
  261.     </tbody>
  262. </table>
  263. </div>
  264.  
  265. <div class="sdi_det"><a name="affreg" id="affreg" style="display: none;"></a>
  266. <a href="#affreg" onclick="$('#reglementation').slideToggle();"><?echo _t('sdi','aff_sdi_r');?></a>
  267. </div>
  268. <div id="reglementation" style="display: none;"><?php if ($result_r[0]['sdir_title']==""{
  269.   echo "<h2 class=\"info\">"._t('sdi','noresultr')."</h2>";
  270. }else {?> <?php
  271. if(empty($result_r[0]['sdir_referer_uri'])) {
  272.   $rules_link empty_nc($result_r[0]['sdir_referer_uri']);
  273. else {
  274.   $rules_link "<a href=\"".formatText(empty_nc($result_r[0]['sdir_referer_uri'])'2HTML')."\" title=\"".formatText(empty_nc($result_r[0]['sdir_mask_uri'])'2HTML')."\" class=\"out\">".formatText(empty_nc($result_r[0]['sdir_mask_uri'])'2HTML')."</a>";
  275. }
  276. ?>
  277. <h2><?php echo formatText(empty_nc($result_r[0]['sdir_title'])'2HTML');?></h2>
  278. <dl class="dl2">
  279.     <dt><?php echo _t('sdi','r_referer_uri'?> :</dt>
  280.     <dd><?php echo $rules_link"</dd>"?>
  281.  
  282. </dl>
  283.  
  284. <div>
  285.   <?php echo formatText(empty_nc($result_r[0]['sdir_body'])'2HTML')?>
  286. </div>
  287. <?php ?>
  288. </div>
  289. </div>
  290. <?php include_once($dir."/help.php")?></div>
  291.  
  292. <script type="text/javascript">
  293. $(document).ready(function() {
  294.     $(".valuecomment").hover(
  295.         function() {
  296.             $('.cont', this).fadeIn();
  297.         },
  298.         function() {
  299.             $('.cont', this).hide();
  300.         }
  301.     );
  302. })
  303. </script>

Documentation generated on Thu, 03 May 2012 15:03:41 +0200 by phpDocumentor 1.4.1