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

Documentation generated on Fri, 16 Oct 2009 09:39:03 +0200 by phpDocumentor 1.4.1