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

Source for file rap.php

Documentation is available at rap.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 (!class_exists('auth')) {
  13.   include_once("../lib/lib_common.php");
  14.   ReloadIndex('admin');
  15. }
  16. // //////////
  17.  
  18. //////////// Check Droits utilisateur ////////////
  19. if (!$l21auth->hasRight('dashboard')) ReloadIndex('admin');
  20. ////////////
  21.  
  22. $result $sql_object->DBSelect($req_list_theme);
  23. $sdi_object new sdi;
  24. $req_sdi SQL_getListSdi($filter "R"$valueparam 0);
  25. $result_sdi $sql_object->DBSelect($req_sdi);
  26.  
  27. /**
  28.  * DEBUG_informations
  29.  * to access debug informations
  30.  * uncomment code and change the value
  31.  * of form action to post data
  32.  * on the same page
  33.  */
  34. /**
  35.  if (isset($_POST['valider'])) {
  36.  if (isset($_POST['graphic'])) $graphic = 1;
  37.  else $graphic = 'N';
  38.  
  39.  if (isset($_POST['table_value'])) $table_value = $_POST['table_value'];
  40.  else $table_value = 'non';
  41.  
  42.  if (isset($_POST['notpublished'])) $notpublished = $_POST['notpublished'];
  43.  else $notpublished = 'N';
  44.  
  45.  if (isset($_POST['provider'])) $provider = $_POST['provider'];
  46.  else $provider = 'N';
  47.  
  48.  if (isset($_POST['reglementation'])) $reglementation = $_POST['reglementation'];
  49.  else $reglementation = 'N';
  50.  
  51.  if (isset($_POST['evaluation'])) $evaluation = $_POST['evaluation'];
  52.  else $evaluation = 'N';
  53.  
  54.  if ($_POST['scale']=='det')
  55.  {
  56.  print_r($_POST['eachscale']);
  57.  }
  58.  else echo "scale ALL<br>\n";
  59.  
  60.  if ($_POST['sdi']=='det')
  61.  {
  62.  while (list(, $value) = each ($_POST['eachsdi'])) {
  63.  echo "sdi Valeur: $value<br>\n";
  64.  }
  65.  }
  66.  else echo "sdi ALL<br>\n";
  67.  
  68.  
  69.  $report_title = $_POST['title_report'];
  70.  $report_author = $_POST['author'];
  71.  $report_mail = $_POST['mail_author'];
  72.  $report_service = $_POST['service_author'];
  73.  $report_adress = $_POST['adresse_author'];
  74.  
  75.  echo "<br />" . $graphic;
  76.  echo "<br />" . $table_value;
  77.  echo "<br />" . $notpublished;
  78.  echo "<br />" . $provider;
  79.  echo "<br />" . $reglementation;
  80.  echo "<br />" . $evaluation;
  81.  echo "<br />" . $report_title;
  82.  echo "<br />" . $report_author;
  83.  echo "<br />" . $report_mail;
  84.  echo "<br />" . $report_service;
  85.  echo "<br />" . $report_adress;
  86.  echo "<br />" . $_POST['scale'];
  87.  echo "<br />" . $_POST['sdi'];
  88.  }
  89.  */
  90.  
  91. if (!isset($_REQUEST['scale_id'])) {
  92.   $scale_id 1;
  93. else {
  94.   $scale_id $_REQUEST['scale_id'];
  95. }
  96.  
  97. $listing "";
  98. // affichage liste échelle
  99. $resultscale $sql_object->DBSelect($req_list_scale);
  100. $listing .= "<div><h2>" _t('dashboard','rap_scale_choice'"</h2></div>";
  101.  
  102. $listing .= "<div class=\"contboxgray\"><ul>\n";
  103. $listing .= "\t<li>\n";
  104. $listing .= "<input type=\"radio\" name=\"scale\" value=\"all\"  onclick=\"ShowReportScale('')\" checked=\"checked\" id=\"scale_all\" />
  105.             <label for=\"scale_all\" class=\"autowidth\">" _t('dashboard','rap_scale_all'"</label>\n";
  106. $listing .= "<br /><input type=\"radio\" name=\"scale\" value=\"det\" onclick=\"ShowReportScale('display_scale')\" id=\"scale_det\"  />
  107.             <label for=\"scale_det\" class=\"autowidth\">" _t('dashboard','rap_scale_det'" </label>\n";
  108. $listing .= "\t</li></ul>\n";
  109. $listing .= "</div>\n";
  110.  
  111. $listing .= "<div class=\"contboxwhite\" id=\"display_scale\" style=\"display:none;\">\n";
  112. $listing .= "<ul>\n";
  113. for ($i 0;$i count($resultscale);$i++{
  114.   $listing .= "\t<li>\n";
  115.   $listing .= "<input type=\"checkbox\" name=\"eachscale[]\" id=\"eachscale" $resultscale[$i]['scale_id'"\" value=\"" $resultscale[$i]['scale_id'"\" />
  116.             <label for=\"eachscale" $resultscale[$i]['scale_id'"\" class=\"autowidth\">" formatText($resultscale[$i]['scale_denomination']'2HTML'"</label>\n";
  117.   $listing .= "\t</li>\n";
  118. }
  119. $listing .= "</ul>\n";
  120. $listing .= "</div>\n";
  121. // affichage liste indicateur en fonction des thèmes
  122. $current_sdtheme '';
  123. $listing .= "<div><h2>" _t('dashboard','rap_sdi_choice'"</h2></div>";
  124.  
  125. $listing .= "<div class=\"contboxgray\"><ul>\n";
  126. $listing .= "\t<li>\n";
  127. $listing .= "<input type=\"radio\" name=\"sdi\" value=\"all\"  onclick=\"ShowReportSdi('')\" checked=\"checked\" id=\"sdi_all\"/>
  128.             <label for=\"sdi_all\" class=\"autowidth\">" _t('dashboard','rap_sdi_all'"</label>\n";
  129. $listing .= "<br /><input type=\"radio\" name=\"sdi\" value=\"det\"  onclick=\"ShowReportSdi('display_sdi')\" id=\"sdi_det\" />
  130.             <label for=\"sdi_det\" class=\"autowidth\">" _t('dashboard','rap_sdi_det'"</label>\n";
  131. $listing .= "\t</li></ul>\n";
  132. $listing .= "</div>\n";
  133.  
  134. $listing .= "<div class=\"contboxwhite\" id=\"display_sdi\" style=\"display:none;\">\n";
  135. $listing .= "<ul>\n";
  136. for ($i 0;$i count($result);$i++{
  137.   for ($j 0;$j count($result_sdi);$j++{
  138.     if ($result[$i]['theme_id'== $result_sdi[$j]['sdii_theme']{
  139.       $listing .= "\t<li>\n";
  140.       $listing .= "<input type=\"checkbox\" name=\"eachsdi[]\" id=\"eachsdi" $result_sdi[$j]['sdii_id'"\" value=\"" $result_sdi[$j]['sdii_id'"\" /><label for=\"eachsdi" $result_sdi[$j]['sdii_id'"\" class=\"autowidth\">" formatText($result_sdi[$j]['sdii_name']'2HTML'"</label>\n";
  141.       if ($result_sdi[$j]['sdii_statut'== 'D'$listing .= "<span class=\"state\"> / " _t('statut','draft'"</span>\n";
  142.       if ($result_sdi[$j]['sdii_to_dashboard'== 'N'$listing .= "<span class=\"state\"> / " _t('sdi','not_attached_to_dashboard'"</span>\n";
  143.       $listing .= "\t</li>\n";
  144.     }
  145.   }
  146. }
  147. $listing .= "</ul>\n";
  148. $listing .= "</div>\n";
  149. // affichage liste infos
  150. $listing .= "<div><h2>" _t('dashboard','rap_comp_choice'"</h2></div>";
  151. $listing .= "<div class=\"contboxgray\">\n";
  152. $listing .= "\t<ul><li>\n";
  153.  
  154. $listing .= "<input type=\"checkbox\" name=\"graphic\" id=\"graphic\" checked=\"checked\" />
  155.             <label for=\"graphic\" class=\"autowidth\">" _t('dashboard','rap_graph_values'"</label>\n";
  156. $listing .= "\t</li>\n";
  157. $listing .= "\t<li>\n";
  158. $listing .= "<input type=\"checkbox\" name=\"table_value\" id=\"table_value\" checked=\"checked\" />
  159.             <label for=\"table_value\" class=\"autowidth\">" _t('dashboard','rap_table_values'"</label>\n";
  160. $listing .= "\t</li>\n";
  161. $listing .= "\t<li>\n";
  162. $listing .= "<input type=\"checkbox\" name=\"notpublished\" id=\"notpublished\" checked=\"checked\" />
  163.             <label for=\"notpublished\" class=\"autowidth\">" _t('dashboard','rap_notpublished_values'"</label>\n";
  164. $listing .= "\t</li>\n";
  165. $listing .= "\t<li>\n";
  166. $listing .= "<input type=\"checkbox\" name=\"provider\" id=\"provider\" checked=\"checked\" />
  167.             <label for=\"provider\" class=\"autowidth\">" _t('dashboard','rap_provider_info'"</label>\n";
  168. $listing .= "\t</li>\n";
  169. $listing .= "\t<li>\n";
  170. $listing .= "<input type=\"checkbox\" name=\"reglementation\" id=\"reglementation\" checked=\"checked\" />
  171.             <label for=\"reglementation\" class=\"autowidth\">" _t('dashboard','rap_rules_info'"</label>\n";
  172. $listing .= "\t</li>\n";
  173. $listing .= "\t<li>\n";
  174. $listing .= "<input type=\"checkbox\" name=\"evaluation\" id=\"evaluation\" checked=\"checked\" />
  175.             <label for=\"evaluation\" class=\"autowidth\">" _t('dashboard','rap_eval_info'"</label>\n";
  176. $listing .= "\t</li>\n";
  177. $listing .= "\t<li>\n";
  178. $listing .= "<input type=\"checkbox\" name=\"summary\" id=\"summary\" checked=\"checked\" />
  179.             <label for=\"summary\" class=\"autowidth\">" _t('dashboard','rap_summary_info'"</label>\n";
  180. $listing .= "\t</li>\n";
  181. $listing .= "\t<li>\n";
  182. $listing .= "<input type=\"checkbox\" name=\"publi_info\" id=\"publi_info\" checked=\"checked\" />
  183.             <label for=\"publi_info\" class=\"autowidth\">" _t('dashboard','rap_publi_info'"</label>\n";
  184. $listing .= "\t</li>\n";
  185. $listing .= "\t</ul>\n";
  186. $listing .= "</div>\n";
  187.  
  188. ?>
  189. <div id="chemin">
  190. <ul>
  191.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home')?></a></li>
  192.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>" class="chemin_rub"><?php echo _t('menu','dashboard')?></a></li>
  193.     <li><span><?php echo _t('dashboard','rap')?></span></li>
  194. </ul>
  195. </div>
  196. <!--end barre haute -->
  197.     <?php
  198.     include_once(THEME_ADMIN_PATH."quickicons.php");
  199.  
  200.     ?>
  201. <div class="contentcontainer"><?php include_once(override($dir.'/menurub.php'THEME_ADMIN_PATH));
  202. ?>
  203. <div id="content">
  204.   <h2><?php echo _t('dashboard','rap')?></h2>
  205.   <form id="addrap" action="../report_sdi/sdi_report.php" method="post">
  206.   <p>
  207.     <label for="title_report"><?php echo _t('dashboard','rap_title')?> : </label>
  208.     <input name="title_report" type="text" class="textfield" id="title_report" maxlength="255" value="" />
  209.    </p>
  210.   <p>
  211.     <label for="author"><?php echo _t('dashboard','rap_author')?> : </label>
  212.     <input name="author" type="text" class="textfield" id="author" maxlength="255" value="" />
  213.   </p>
  214.   <p>
  215.     <label for="mail_author"><?php echo _t('dashboard','rap_mail_author');?> : </label>
  216.     <input name="mail_author" type="text" class="textfield"    id="mail_author" maxlength="255" value="" />
  217.   </p>
  218.   <p>
  219.     <label for="service_author"><?php echo _t('dashboard','rap_service')?> : </label>
  220.     <input name="service_author" type="text" class="textfield" id="service_author" maxlength="255" value="" />
  221.   </p>
  222.   <p>
  223.     <label for="adress_author"><?php echo _t('dashboard','rap_adress')?> : </label>
  224.     <textarea id="adress_author" name="adress_author" class="no-wysiwyg" <?php echo AREA_SETTINGS?>></textarea>
  225.   </p>
  226.   <?php
  227.   echo $listing;
  228.   ?>
  229.   <div>
  230.     <input name="annuler" type="button" value="<?php echo _t('btn','annul')?>" onclick="window.location='javascript:history.go(-1);'" class="button" id="annuler" /> 
  231.     <input name="generer" type="submit" value="<?php echo _t('dashboard','rap_generate'?>" class="button" id="generer" />
  232.     <input name="sauver" type="submit" value="<?php echo _t('dashboard','rap_save'?>" class="button" id="sauver" />
  233.   </div>
  234. </form>
  235. </div>
  236. <?php include_once(override($dir.'/help.php'THEME_ADMIN_PATH))?></div>

Documentation generated on Mon, 08 Apr 2013 18:16:14 +0200 by phpDocumentor 1.4.1