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

Source for file add.php

Documentation is available at add.php

  1. <?php
  2. /**
  3.  * @package linea21.modules
  4.  * @subpackage sdi
  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->isSuperAdmin()) ReloadIndex('admin');
  20. ////////////
  21. ?>
  22. <div id="chemin">
  23.   <ul>
  24.       <li><a href="index.php" class="chemin_home"><?php echo _t('way','home'?></a></li>
  25.       <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>" class="chemin_rub"><?php echo _t('menu','sdi')?></a></li>
  26.       <li><span><?php echo formatnavTitle(_t('sdi','add')) ?></span></li>
  27.   </ul>
  28. </div>
  29. <!--end barre haute -->
  30. <?php
  31. include_once("../lib/input_helpers.php");
  32. $sdi_objectnew sdi;
  33.  
  34. if (isset($_POST['enregistrer'])) {
  35.   $integrity 1;
  36.   $integrity2 1;
  37.   $integrity3 1;
  38.   $integrity4 1;
  39.   $integrity5 1;
  40.   $data_table unserialize(urldecode($_POST['data_table']));
  41.   $j=0;
  42.   // from $data_table[0] to $data_table[12], it goes on Info
  43.   for ($i=0;$i<13;$i++){
  44.     $data_table_sdi[$j]=$data_table[$i];
  45.     $j++;
  46.   }
  47.   // ugly but was added after ... Need to fill up array with 
  48.   // threshold_relative and attached_to_dashboard values
  49.   // type, dashboard_viz, detail_viz
  50.   $data_table_sdi[13]=$data_table[32];
  51.   $data_table_sdi[14]=$data_table[33];
  52.   $data_table_sdi[15]=$data_table[34];
  53.   $data_table_sdi[16]=$data_table[35];
  54.   $data_table_sdi[17]=$data_table[36];
  55.   // from $data_table[13] to $data_table[18], it goes on Evaluation
  56.   $j=0;
  57.   for ($i=13;$i<19;$i++){
  58.     $data_table_e[$j]=$data_table[$i];
  59.     $j++;
  60.   }
  61.   // from $data_table[19] to $data_table[26], it goes on Provider
  62.   $j=0;
  63.   for ($i=19;$i<27;$i++){
  64.     $data_table_p[$j]=$data_table[$i];
  65.     $j++;
  66.   }
  67.   // from $data_table[27] to $data_table[30], it goes on Rules
  68.   $j=0;
  69.   for ($i=27;$i<=30;$i++){
  70.     $data_table_r[$j]=$data_table[$i];
  71.     $j++;
  72.   }
  73.  
  74.   $result=$sdi_object->AddSdi($data_table_sdi$sql_object);
  75.   $result_e=$sdi_object->ModifyParam($result$data_table_e"E"$sql_object);
  76.   $result_p=$sdi_object->ModifyParam($result$data_table_p"P"$sql_object);
  77.   $result_r=$sdi_object->ModifyParam($result$data_table_r"R"$sql_object);
  78.  
  79.   $link_confirm="confirm.php?rub=".$rub."&todo=".$todo;
  80.   if(is_numeric($result)) header("Location: ".$link_confirm);
  81.   else  system_error();
  82. }
  83.  
  84. $form_type = -1;
  85. $form_dashboard_viz = -1;
  86. $form_detail_viz = -1;
  87. $form_name '';
  88. $form_theme '';
  89. $form_statut '';
  90. $mask_statut_P="checked=\"checked\"";
  91. $mask_statut_D='';
  92. $mask_dashboard="checked=\"checked\"";
  93. $mask_threshold_relative "";
  94.  
  95. //$form_range = '';
  96. $form_description '';
  97. $form_comment '';
  98. $form_goal '';
  99. $form_consulting '';
  100. $form_unit '';
  101. $form_max_value '';
  102. $form_min_value '';
  103. $form_threshold_value '';
  104. $form_frequency '';
  105.  
  106. $form_e_scale_compare '';
  107. $form_e_fiability '';
  108. $form_e_accessibility '';
  109. $form_e_lisibility '';
  110. $form_e_relevance '';
  111. $form_e_global_performance '';
  112.  
  113. $form_p_name '';
  114. $form_p_service '';
  115. $form_p_description '';
  116. $form_p_incharge '';
  117. $form_p_address '';
  118. $form_p_phone '';
  119. $form_p_fax '';
  120. $form_p_email '';
  121.  
  122. $form_r_title '';
  123. $form_r_body '';
  124. $form_r_referer_uri '';
  125. $form_r_mask_uri '';
  126.  
  127. if (isset($_POST['valider1'])) {
  128.  
  129.   $table[0$_POST['sdi_name'];
  130.   $table[1$_POST['description'];
  131.   $table[2$_POST['comment'];
  132.   $table[3$_POST['sdi_theme'];
  133.   //$table[4] = $_POST['range'];
  134.   $table[40;
  135.   $table[5$_POST['goal'];
  136.   $table[6$_POST['consulting'];
  137.   $table[7$_POST['unit'];
  138.   $table[8$_POST['max_value'];
  139.   $table[9$_POST['min_value'];
  140.   $table[10]$_POST['threshold_value'];
  141.   $table[11]$_POST['frequency'];
  142.   $table[12]$_POST['sdi_statut'];
  143.   
  144.   if (isset($_POST['threshold_relative'])) {
  145.       $table[32]="Y";
  146.       $mask_threshold_relative="checked=\"checked\"";
  147.   else {
  148.       $table[32]="N";
  149.       $mask_threshold_relative="";
  150.   }
  151.   
  152.   if (isset($_POST['attached_to_dashboard'])) {
  153.       $table[33]="Y";
  154.       $mask_dashboard="checked=\"checked\"";
  155.   else {
  156.       $table[33]="N";
  157.       $mask_dashboard="";
  158.   }
  159.   $table[34]=$_POST['sdi_type'];
  160.   $table[35]=$_POST['sdi_dashboard_viz'];
  161.   $table[36]=$_POST['sdi_detail_viz'];
  162.   
  163.   $integrity $sdi_object -> CheckDataIntegrity_info($table);
  164.  
  165.  
  166.   $form_type $_POST['sdi_type'];
  167.   $form_dashboard_viz $_POST['sdi_dashboard_viz'];
  168.   $form_detail_viz $_POST['sdi_detail_viz'];
  169.   $form_name formatText($_POST['sdi_name']'2FIELD');
  170.   $form_theme $_POST['sdi_theme'];
  171.   $form_statut$_POST['sdi_statut'];
  172.   //$form_range = $_POST['range'];
  173.   $form_description formatText($_POST['description']'2FIELD');
  174.   $form_comment formatText($_POST['comment']'2FIELD');
  175.   $form_goal formatText($_POST['goal']'2FIELD');
  176.   $form_consulting formatText($_POST['consulting']'2FIELD');
  177.   $form_unit formatText($_POST['unit']'2FIELD');
  178.   $form_max_value =$_POST['max_value'];
  179.   $form_min_value $_POST['min_value'];
  180.   $form_threshold_value $_POST['threshold_value'];
  181.   $form_frequency $_POST['frequency'];
  182.   if($form_statut=='D'$mask_statut_D="checked=\"checked\""else $mask_statut_D='';
  183.   if($form_statut=='P'$mask_statut_P="checked=\"checked\""else $mask_statut_P='';
  184.  
  185.   $table urlencode(serialize($table));
  186.  
  187. }
  188.  
  189. if (isset($_POST['enregistrer2'])) {
  190.  
  191.   //intégrité des étapes 2,3,4 OK
  192.   $integrity2 1;
  193.   $integrity3 1;
  194.   $integrity4 1;
  195.  
  196.   $table[0$_POST['sdi_name'];
  197.   $table[1$_POST['description'];
  198.   $table[2$_POST['comment'];
  199.   $table[3$_POST['sdi_theme'];
  200.   //$table[4] = $_POST['range'];
  201.   $table[40;
  202.   $table[5$_POST['goal'];
  203.   $table[6$_POST['consulting'];
  204.   $table[7$_POST['unit'];
  205.   $table[8$_POST['max_value'];
  206.   $table[9$_POST['min_value'];
  207.   $table[10]$_POST['threshold_value'];
  208.   $table[11]$_POST['frequency'];
  209.   $table[12]$_POST['sdi_statut'];
  210.  
  211.   if (isset($_POST['threshold_relative'])) {
  212.       $table[32]="Y";
  213.       $mask_threshold_relative="checked=\"checked\"";
  214.   else {
  215.       $table[32]="N";
  216.       $mask_threshold_relative="";
  217.   }
  218.   
  219.   if (isset($_POST['attached_to_dashboard'])) {
  220.       $table[33]="Y";
  221.       $mask_dashboard="checked=\"checked\"";
  222.   else {
  223.       $table[33]="N";
  224.       $mask_dashboard="";
  225.   }
  226.   
  227.   $table[34]=$_POST['sdi_type'];
  228.   $table[35]=$_POST['sdi_dashboard_viz'];
  229.   $table[36]=$_POST['sdi_detail_viz'];
  230.   
  231.   // ugly array fill-up
  232.   for ($z=13;$z<31;$z++){
  233.     $table[$z]="";
  234.   }
  235.   
  236.   $integrity $sdi_object -> CheckDataIntegrity_info($table);
  237.  
  238.   $form_type $_POST['sdi_type'];
  239.   $form_dashboard_viz $_POST['sdi_dashboard_viz'];
  240.   $form_detail_viz $_POST['sdi_detail_viz'];
  241.   $form_name formatText($_POST['sdi_name']'2FIELD');
  242.   $form_theme $_POST['sdi_theme'];
  243.   $form_statut$_POST['sdi_statut'];
  244.   //$form_range = $_POST['range'];
  245.   $form_description formatText($_POST['description']'2FIELD');
  246.   $form_comment formatText($_POST['comment']'2FIELD');
  247.   $form_goal formatText($_POST['goal']'2FIELD');
  248.   $form_consulting formatText($_POST['consulting']'2FIELD');
  249.   $form_unit formatText($_POST['unit']'2FIELD');
  250.   $form_max_value =$_POST['max_value'];
  251.   $form_min_value $_POST['min_value'];
  252.   $form_threshold_value $_POST['threshold_value'];
  253.   $form_frequency $_POST['frequency'];
  254.   if($form_statut=='D'$mask_statut_D="checked=\"checked\""else $mask_statut_D='';
  255.   if($form_statut=='P'$mask_statut_P="checked=\"checked\""else $mask_statut_P='';
  256.  
  257.   $table urlencode(serialize($table));
  258. }
  259.  
  260. if (isset($_POST['valider2'])) {
  261.  
  262.   $integrity 1;
  263.   $table unserialize(urldecode($_POST['table']));
  264.   $table[13$_POST['e_scale_compare'];
  265.   $table[14$_POST['e_fiability'];
  266.   $table[15$_POST['e_accessibility'];
  267.   $table[16$_POST['e_lisibility'];
  268.   $table[17$_POST['e_relevance'];
  269.   $table[18$_POST['e_global_performance'];
  270.   $integrity2 $sdi_object -> CheckDataIntegrity_eval($table);
  271.   $form_e_scale_compare $_POST['e_scale_compare'];
  272.   $form_e_fiability $_POST['e_fiability'];
  273.   $form_e_accessibility $_POST['e_accessibility'];
  274.   $form_e_lisibility $_POST['e_lisibility'];
  275.   $form_e_relevance $_POST['e_relevance'];
  276.   $form_e_global_performance $_POST['e_global_performance'];
  277.  
  278.   $table urlencode(serialize($table));
  279. }
  280.  
  281. if (isset($_POST['valider3'])) {
  282.   $integrity 1;
  283.   $integrity2 1;
  284.   $table unserialize(urldecode($_POST['table']));
  285.   $table[19$_POST['p_name'];
  286.   $table[20$_POST['p_service'];
  287.   $table[21$_POST['p_description'];
  288.   $table[22$_POST['p_incharge'];
  289.   $table[23$_POST['p_address'];
  290.   $table[24$_POST['p_phone'];
  291.   $table[25$_POST['p_fax'];
  292.   $table[26$_POST['p_email'];
  293.   $integrity3 $sdi_object -> CheckDataIntegrity_provider($table);
  294.  
  295.   $form_p_name formatText($_POST['p_name']'2FIELD');
  296.   $form_p_service formatText($_POST['p_service']'2FIELD');
  297.   $form_p_description formatText($_POST['p_description']'2FIELD');
  298.   $form_p_incharge formatText($_POST['p_incharge']'2FIELD');
  299.   $form_p_address formatText($_POST['p_address']'2FIELD');
  300.   $form_p_phone $_POST['p_phone'];
  301.   $form_p_fax $_POST['p_fax'];
  302.   $form_p_email $_POST['p_email'];
  303.  
  304.   $table urlencode(serialize($table));
  305. }
  306.  
  307. if (isset($_POST['valider4'])) {
  308.  
  309.   $integrity 1;
  310.   $integrity2 1;
  311.   $integrity3 1;
  312.   $table unserialize(urldecode($_POST['table']));
  313.   $table[27$_POST['r_title'];
  314.   $table[28$_POST['r_body'];
  315.   $table[29$_POST['r_referer_uri'];
  316.   if ($_POST['r_mask_uri']=="")$table[30$table[29];
  317.   else $table[30]=$_POST['r_mask_uri'];
  318.   $integrity4 $sdi_object -> CheckDataIntegrity_reglementation($table);
  319.  
  320.   $form_r_title formatText($_POST['r_title']'2FIELD');
  321.   $form_r_body formatText($_POST['r_body']'2FIELD');
  322.   $form_r_referer_uri $_POST['r_referer_uri'];
  323.   if ($_POST['r_mask_uri']=="")$form_r_mask_uri $form_r_referer_uri;
  324.   else $form_r_mask_uri =$_POST['r_mask_uri'];
  325.  
  326.   $table urlencode(serialize($table));
  327. }
  328.  
  329. include_once(THEME_ADMIN_PATH."quickicons.php");
  330.  
  331. $data $sql_object -> DBSelect($req_list_theme);
  332. $select_theme=ThemeSelectBox($data"sdi_theme"$form_theme);
  333.  
  334. $select_type=selectBox($lang['sdi']['select_type']"sdi_type"$form_type);
  335. $select_dashboard_viz selectBox($lang['sdi']['select_dashboard_viz']"sdi_dashboard_viz"$form_dashboard_vizINDICATOR_DASHBOARD_VIZ);
  336. $select_detail_viz selectBox($lang['sdi']['select_detail_viz']"sdi_detail_viz"$form_detail_viz);
  337. ?>
  338.  
  339. <?php
  340. if (!isset($integrity|| is_string($integrity)) {
  341. ?>
  342. <div class="contentcontainer">
  343. <?php
  344. include_once(override($dir.'/menurub.php'THEME_ADMIN_PATH));
  345. ?>
  346. <div id="content">
  347. <?php
  348. if (isset($integrity&& is_string($integrity)) display_errors($integrity);
  349. ?>
  350. <div class="stepcontent">
  351.   <div class="step">
  352.       <img src="<?php echo THEME_ADMIN_PATH?>images/step1_act.gif" alt="step1" /><br />
  353.       <span class="stepact"><?php echo _t('sdi','add_step1')?></span>
  354.   </div>
  355.   <div class="step">
  356.       <img src="<?php echo THEME_ADMIN_PATH?>images/step2_pas.gif" alt="step2" /><br />
  357.     <span class="steppas"><?php echo _t('sdi','add_step2')?></span>
  358.   </div>
  359.   <div class="step">
  360.     <img src="<?php echo THEME_ADMIN_PATH?>images/step3_pas.gif" alt="step3" /><br />
  361.     <span class="steppas"><?php echo _t('sdi','add_step3')?></span>
  362.   </div>
  363.   <div class="step">
  364.     <img src="<?php echo THEME_ADMIN_PATH?>images/step4_pas.gif" alt="step4" /><br />
  365.     <span class="steppas"><?php echo _t('sdi','add_step4')?></span>
  366.   </div>
  367. </div>
  368. <br class="brendstep" />
  369.  
  370. <h2><?php echo _t('sdi','add_title1'?></h2>
  371.  
  372. <form id="addsdi" action="<?php echo $_SERVER['SCRIPT_NAME']?>" method="post">
  373. <p>
  374.       <label for="sdi_name"><?php echo mb_ucfirst(_t('sdi','name2')) ?> : *</label>
  375.       <input name="sdi_name" type="text" class="textfield" id="sdi_name" maxlength="255" value="<?php echo $form_name?>" />
  376. </p>
  377. <?php
  378. /** 
  379.  * @toodo remove <input type="hidden" /> below if displaying
  380. <p>
  381.       <label for="sdi_type"><?php echo mb_ucfirst(_t('sdi','type')) ?> : *</label>
  382.       <?php echo $select_type; ?>
  383. </p>
  384. */
  385. ?>
  386. <input name="sdi_type" type="hidden" id="sdi_type" value="quantitative" />
  387. <p>
  388.       <label for="sdi_dashboard_viz"><?php echo mb_ucfirst(_t('sdi','dashboard_viz')) ?> : *</label>
  389.       <?php echo $select_dashboard_viz?>
  390. </p>
  391. <?php
  392. /** 
  393.  * @toodo remove <input type="hidden" /> below if displaying
  394. <p>
  395.       <label for="sdi_detail_viz"><?php echo mb_ucfirst(_t('sdi','detail_viz')) ?> : *</label>
  396.       <?php echo $select_detail_viz; ?>
  397. </p>
  398. */
  399. ?>
  400. <input name="sdi_detail_viz" type="hidden" id="sdi_detail_viz" value="column" />
  401. <p>
  402.     <label for="sdi_theme"><?php echo mb_ucfirst(_t('sdi','theme')) ?> : *</label> 
  403.     <?php echo $select_theme?>
  404. </p>
  405.  
  406. <div class="label"><?php echo mb_ucfirst(_t('divers','statut'))?> : *</div>
  407. <div class="rightpanel">
  408.   <input name="sdi_statut" type="radio" id="statut_P" value="P" <?php echo $mask_statut_P?> />
  409.   <label for="statut_P"><?php echo mb_ucfirst(_t('statut','public'))?></label>
  410.   <input name="sdi_statut" type="radio" id="statut_D" value="D" <?php echo $mask_statut_D?> />
  411.   <label for="statut_D"><?php echo mb_ucfirst(_t('statut','draft'))?></label>
  412. </div>
  413. <?php
  414. /** ?><p>
  415. <label for="range" ><?php echo _t('sdi','range') ?> * :</label>
  416. <input name="range" type="text" size="47" id="range" maxlength="150" value="<?php echo $form_range;
  417. ?>" />
  418. </p>
  419. <?php */?>
  420. <p>
  421.     <label for="description"><?php echo mb_ucfirst(_t('sdi','description')) ?> : *</label>
  422.     <textarea id="description" name="description" class="largetextfield"><?php echo $form_description?></textarea>
  423. </p>
  424. <p>
  425.     <label for="goal"><?php echo mb_ucfirst(_t('sdi','goal'))?> :</label>
  426.     <textarea id="goal" name="goal" <?php echo AREA_SETTINGS?> class="largetextfield"><?php echo $form_goal?></textarea>
  427. </p>
  428. <p>
  429.     <label for="consulting"><?php echo mb_ucfirst(_t('sdi','consulting'))?> :</label>
  430.     <textarea id="consulting" name="consulting" <?php echo AREA_SETTINGS?> class="largetextfield"><?php echo $form_consulting?></textarea>
  431. </p>
  432. <p>
  433.     <label for="attached_to_dashboard"><?php echo mb_ucfirst(_t('sdi','attached_to_dashboard'))?> :</label>
  434.     <input type="checkbox" name="attached_to_dashboard" value="1" id="attached_to_dashboard" <?php echo $mask_dashboard?> />
  435. </p>
  436. <p>
  437.     <label for="comment"><?php echo mb_ucfirst(_t('sdi','comment'))?> :</label>
  438.     <textarea id="comment" name="comment" <?php echo AREA_SETTINGS?> class="largetextfield"><?php echo $form_comment?></textarea>
  439. </p>
  440.  
  441. <h3 class="part"><?php echo mb_ucfirst(_t('sdi','info_mesure'))?></h3>
  442.  
  443. <p>
  444.     <label for="unit"><?php echo mb_ucfirst(_t('sdi','unit'))?> * :</label>
  445.     <input name="unit" type="text" class="textfield" id="unit" maxlength="100" value="<?php echo $form_unit?>" />
  446. </p>
  447. <p>
  448.     <label for="max_value"><?php echo mb_ucfirst(_t('sdi','max_value'))?> :</label>
  449.     <input name="max_value" type="text" class="textfield" id="max_value" maxlength="100" value="<?php echo $form_max_value?>" />
  450. </p>
  451. <p>
  452.     <label for="min_value"><?php echo mb_ucfirst(_t('sdi','min_value'))?> :</label>
  453.     <input name="min_value" type="text" class="textfield" id="min_value" maxlength="100" value="<?php echo $form_min_value?>" />
  454. </p>
  455. <p>
  456.     <label for="threshold_value"><?php echo mb_ucfirst(_t('sdi','initial_threshold_value'))?> :</label>
  457.     <input name="threshold_value" type="text" class="textfield" id="threshold_value" maxlength="100" value="<?php echo $form_threshold_value?>" />
  458. </p>
  459. <p>
  460.     <label for="frequency"><?php echo mb_ucfirst(_t('sdi','frequency'))?> * :</label>
  461.     <input name="frequency" type="text" class="textfield" id="frequency" maxlength="11" value="<?php echo $form_frequency?>" />
  462. </p>
  463.  
  464. <div class="label"><?php echo mb_ucfirst(_t('sdi','threshold_relative'))?> * :</div>
  465. <div class="rightpanel">
  466.   <input type="checkbox" name="threshold_relative" value="1" id="threshold_relative" <?php echo $mask_threshold_relative?> />
  467.   <label for="threshold_relative"><?php echo mb_ucfirst(_t('sdi','threshold_relative_comment'))?></label>
  468. </div>
  469. <div>
  470.     <input name="rub" type="hidden" value="<?php echo $rub?>"    id="rub" />
  471.     <input name="todo" type="hidden" value="<?php echo $todo?>" id="todo" />
  472.     <?php echo cancel_button($rub_link."&amp;todo=list")?>
  473.     <input name="enregistrer2" type="submit" value="<?php echo _t('sdi','btn_fin'?>" class="button" id="enregistrer2" />
  474.     <input name="valider1" type="submit" value="<?php echo _t('sdi','btn_step1'?>" class="button" id="valider" />
  475. </div>
  476. </form>
  477. </div>
  478. <?php include_once(override($dir.'/help.php'THEME_ADMIN_PATH))?></div>
  479. <?php
  480. // Récapitulatif
  481. else {
  482.   if (!isset($integrity2|| is_string($integrity2)) {
  483. ?>
  484. <div class="contentcontainer">
  485. <?php
  486. include_once(override($dir.'/menurub.php'THEME_ADMIN_PATH));
  487. ?>
  488. <div id="content">
  489. <?php
  490. if (isset($integrity2&& is_string($integrity2)) display_errors($integrity2);
  491.  
  492. ?>
  493. <div class="stepcontent">
  494.   <div class="step">
  495.     <img src="<?php echo THEME_ADMIN_PATH?>images/step1_pas.gif" alt="step1" /><br />
  496.     <span class="steppas"><?php echo _t('sdi','add_step1')?></span>
  497.   </div>
  498.   <div class="step">
  499.     <img src="<?php echo THEME_ADMIN_PATH?>images/step2_act.gif" alt="step2" /><br />
  500.     <span class="stepact"><?php echo _t('sdi','add_step2')?></span>
  501.   </div>
  502.   <div class="step">
  503.     <img src="<?php echo THEME_ADMIN_PATH?>images/step3_pas.gif" alt="step3" /><br />
  504.     <span class="steppas"><?php echo _t('sdi','add_step3')?></span>
  505.   </div>
  506.   <div class="step">
  507.     <img src="<?php echo THEME_ADMIN_PATH?>images/step4_pas.gif" alt="step4" /><br />
  508.     <span class="steppas"><?php echo _t('sdi','add_step4')?></span>
  509.   </div>
  510. </div>
  511. <br class="brendstep" />
  512.  
  513. <h2><?php echo _t('sdi','add_title2'?></h2>
  514.  
  515. <form id="addsdi2" action="<?php echo $_SERVER['SCRIPT_NAME']?>" method="post">
  516. <p>
  517.     <label for="e_scale_compare"><?php echo mb_ucfirst(_t('sdi','e_scale_compare')) ?> * :</label>
  518.     <input name="e_scale_compare" type="text" class="textfield" id="e_scale_compare" maxlength="3" value="<?php echo $form_e_scale_compare?>" />
  519. </p>
  520. <p>
  521.     <label for="e_fiability"><?php echo mb_ucfirst(_t('sdi','e_fiability')) ?> * :</label>
  522.     <input name="e_fiability" type="text" class="textfield" id="e_fiability" maxlength="3" value="<?php echo $form_e_fiability?>" />
  523. </p>
  524. <p>
  525.     <label for="e_accessibility"><?php echo mb_ucfirst(_t('sdi','e_accessibility')) ?> * :</label>
  526.     <input name="e_accessibility" type="text" class="textfield" id="e_accessibility" maxlength="3" value="<?php echo $form_e_accessibility?>" />
  527. </p>
  528. <p>
  529.     <label for="e_lisibility"><?php echo mb_ucfirst(_t('sdi','e_lisibility')) ?> * :</label>
  530.     <input name="e_lisibility" type="text" class="textfield" id="e_lisibility" maxlength="3" value="<?php echo $form_e_lisibility?>" />
  531. </p>
  532. <p>
  533.     <label for="e_relevance"><?php echo mb_ucfirst(_t('sdi','e_relevance')) ?> * :</label>
  534.     <input name="e_relevance" type="text" class="textfield" id="e_relevance" maxlength="3" value="<?php echo $form_e_relevance?>" />
  535. </p>
  536. <p>
  537.     <label for="e_global_performance"><?php echo mb_ucfirst(_t('sdi','e_global_performance')) ?> * : </label>
  538.     <input name="e_global_performance" type="text" class="textfield" id="e_global_performance" maxlength="3" value="<?php echo $form_e_global_performance?>" />
  539. </p>
  540.  
  541. <div>
  542.   <input name="table" type="hidden" value="<?php echo $table?>" id="table" />
  543.   <input name="rub" type="hidden" value="<?php echo $rub?>" id="rub" />
  544.   <input name="todo" type="hidden" value="<?php echo $todo?>" id="todo" />
  545.   <?php echo cancel_button($rub_link."&amp;todo=list")?>
  546.   <input name="valider2" type="submit" value="<?php echo _t('sdi','btn_step2'?>" class="button" id="valider" />
  547. </div>
  548. </form>
  549. </div>
  550. <?php include_once(override($dir.'/help.php'THEME_ADMIN_PATH))?>
  551. </div>
  552. <?php
  553. else {
  554.     if (!isset($integrity3|| is_string($integrity3)) {
  555. ?>
  556. <div class="contentcontainer">
  557. <?php
  558. include_once(override($dir.'/menurub.php'THEME_ADMIN_PATH));
  559. ?>
  560. <div id="content">
  561. <?php
  562. if (isset($integrity3&& is_string($integrity3)) display_errors($integrity3);
  563. ?>
  564.  
  565. <div class="stepcontent">
  566.   <div class="step">
  567.     <img src="<?php echo THEME_ADMIN_PATH?>images/step1_pas.gif" alt="step1" /><br />
  568.     <span class="steppas"><?php echo _t('sdi','add_step1')?></span>
  569.   </div>
  570.   <div class="step">
  571.     <img src="<?php echo THEME_ADMIN_PATH?>images/step2_pas.gif" alt="step2" /><br />
  572.     <span class="steppas"><?php echo _t('sdi','add_step2')?></span>
  573.   </div>
  574.   <div class="step">
  575.     <img src="<?php echo THEME_ADMIN_PATH?>images/step3_act.gif" alt="step3" /><br />
  576.     <span class="stepact"><?php echo _t('sdi','add_step3')?></span>
  577.   </div>
  578.   <div class="step">
  579.     <img src="<?php echo THEME_ADMIN_PATH?>images/step4_pas.gif" alt="step4" /><br />
  580.     <span class="steppas"><?php echo _t('sdi','add_step4')?></span>
  581.   </div>
  582. </div>
  583. <br class="brendstep" />
  584.  
  585. <h2><?php echo _t('sdi','add_title3'?></h2>
  586.  
  587. <form id="addsdi3" action="<?php echo $_SERVER['SCRIPT_NAME']?>" method="post">
  588. <p>
  589.     <label for="p_name"><?php echo mb_ucfirst(_t('sdi','p_name')) ?> * :</label>
  590.     <input name="p_name" type="text" class="textfield" id="p_name" maxlength="255" value="<?php echo $form_p_name?>" />
  591. </p>
  592. <p>
  593.     <label for="p_service"><?php echo mb_ucfirst(_t('sdi','p_service')) ?> :</label>
  594.     <input name="p_service" type="text" class="textfield" id="p_service" maxlength="255" value="<?php echo $form_p_service?>" />
  595. </p>
  596. <p>
  597.     <label for="p_incharge"><?php echo mb_ucfirst(_t('sdi','p_incharge')) ?> :</label>
  598.     <input name="p_incharge" type="text" class="textfield" id="p_incharge" maxlength="150" value="<?php echo $form_p_incharge?>" />
  599. </p>
  600. <p>
  601.     <label for="p_address"><?php echo mb_ucfirst(_t('sdi','p_address')) ?> * :</label>
  602.     <textarea id="p_address" name="p_address" <?php echo AREA_SETTINGS?> class="largetextfield"><?php echo $form_p_address?></textarea>
  603. </p>
  604. <p>
  605.     <label for="p_phone"><?php echo mb_ucfirst(_t('sdi','p_phone')) ?> :</label>
  606.     <input name="p_phone" type="text" class="textfield" id="p_phone" maxlength="10" value="<?php echo $form_p_phone?>" />
  607. </p>
  608. <p>
  609.     <label for="p_fax"><?php echo mb_ucfirst(_t('sdi','p_fax')) ?> :</label>
  610.     <input name="p_fax" type="text" class="textfield" id="p_fax" maxlength="10" value="<?php echo $form_p_fax?>" />
  611. </p>
  612. <p>
  613.     <label for="p_email"><?php echo mb_ucfirst(_t('sdi','p_email')) ?> * :</label>
  614.     <input name="p_email" type="text" class="textfield" id="p_email" maxlength="200" value="<?php echo $form_p_email?>" />
  615. </p>
  616. <p>
  617.     <label for="p_description"><?php echo mb_ucfirst(_t('sdi','p_description')) ?> :</label>
  618.     <textarea id="p_description" name="p_description" <?php echo AREA_SETTINGS?> class="largetextfield"><?php echo $form_p_description?></textarea>
  619. </p>
  620. <div>
  621.     <input name="table" type="hidden" value="<?php echo $table?>" id="table" />
  622.     <input name="rub" type="hidden" value="<?php echo $rub?>" id="rub" />
  623.     <input name="todo" type="hidden" value="<?php echo $todo?>" id="todo" />
  624.     <?php echo cancel_button($rub_link."&amp;todo=list")?>
  625.     <input name="valider3" type="submit" value="<?php echo _t('sdi','btn_step3'?>" class="button" id="valider" />
  626. </div>
  627. </form>
  628. </div>
  629. <?php include_once(override($dir.'/help.php'THEME_ADMIN_PATH))?>
  630. </div>
  631. <?php
  632.     else {
  633.       if (!isset($integrity4|| is_string($integrity4)) {
  634. ?>
  635. <div class="contentcontainer">
  636. <?php
  637. include_once(override($dir.'/menurub.php'THEME_ADMIN_PATH));
  638. ?>
  639. <div id="content">
  640. <?php
  641. if (isset($integrity4&& is_string($integrity4)) display_errors($integrity4);
  642. ?>
  643.  
  644. <div class="stepcontent">
  645.   <div class="step">
  646.     <img src="<?php echo THEME_ADMIN_PATH?>images/step1_pas.gif" alt="step1" /><br />
  647.     <span class="steppas"><?php echo _t('sdi','add_step1')?></span>
  648.   </div>
  649.   <div class="step">
  650.     <img src="<?php echo THEME_ADMIN_PATH?>images/step2_pas.gif" alt="step2" /><br />
  651.     <span class="steppas"><?php echo _t('sdi','add_step2')?></span>
  652.   </div>
  653.   <div class="step">
  654.     <img src="<?php echo THEME_ADMIN_PATH?>images/step3_pas.gif" alt="step3" /><br />
  655.     <span class="steppas"><?php echo _t('sdi','add_step3')?></span>
  656.   </div>
  657.   <div class="step">
  658.     <img src="<?php echo THEME_ADMIN_PATH?>images/step4_act.gif" alt="step4" /><br />
  659.     <span class="stepact"><?php echo _t('sdi','add_step4')?></span>
  660.   </div>
  661. </div>
  662. <br class="brendstep" />
  663.  
  664. <h2><?php echo _t('sdi','add_title4'?></h2>
  665.  
  666. <form id="addsdi4" action="<?php echo $_SERVER['SCRIPT_NAME']?>" method="post">
  667. <p>
  668.     <label for="r_title"><?php echo mb_ucfirst(_t('sdi','r_title')) ?> * :</label>
  669.     <input name="r_title" type="text" class="textfield" id="r_title" maxlength="255" value="<?php echo $form_r_title?>" />
  670. </p>
  671. <p>
  672.     <label for="r_body"><?php echo mb_ucfirst(_t('sdi','r_body')) ?> * :</label>
  673.     <textarea id="r_body" name="r_body" <?php echo AREA_SETTINGS?> class="largetextfield"><?php echo $form_r_body?></textarea>
  674. </p>
  675. <p>
  676.     <label for="r_referer_uri"><?php echo mb_ucfirst(_t('sdi','r_referer_uri')) ?> :</label>
  677.     <input name="r_referer_uri" type="text" class="textfield" id="r_referer_uri" maxlength="255" value="<?php echo $form_r_referer_uri?>" />
  678. </p>
  679. <p>
  680.     <label for="r_mask_uri"><?php echo mb_ucfirst(_t('sdi','r_mask_uri')) ?> :</label>
  681.     <input name="r_mask_uri" type="text" class="textfield" id="r_mask_uri" maxlength="255" value="<?php echo $form_r_mask_uri?>" />
  682. </p>
  683.  
  684. <div>
  685.   <input name="table" type="hidden" value="<?php echo $table;  ?>" id="table" />
  686.   <input name="rub" type="hidden" value="<?php echo $rub?>" id="rub" />
  687.   <input name="todo" type="hidden" value="<?php echo $todo?>" id="todo" />
  688.   <?php echo cancel_button($rub_link."&amp;todo=list")?>
  689.   <input name="valider4" type="submit" value="<?php echo _t('btn','valid'?>" class="button" id="valider" />
  690. </div>
  691. </form>
  692. </div>
  693. <?php include_once(override($dir.'/help.php'THEME_ADMIN_PATH))?></div>
  694. <?php
  695.       else {
  696.         if (!isset($integrity5|| is_string($integrity5)) {
  697.  
  698.  
  699.           $table=unserialize(urldecode($table));
  700.           $display_sdi_name formatText(empty_nc($table[0])'2HTML');
  701.           $display_sdi_description =formatText(empty_nc($table[1])'2HTML');
  702.           $display_sdi_comment =formatText(empty_nc($table[2])'2HTML');
  703.           //$display_sdi_range = empty_nc($table[4]);
  704.           $display_sdi_goal formatText(empty_nc($table[5])'2HTML');
  705.           $display_sdi_consulting formatText(empty_nc($table[6])'2HTML');
  706.           $display_sdi_unit formatText(empty_nc($table[7])'2HTML');
  707.           $display_sdi_max_value empty_nc($table[8]);
  708.           $display_sdi_min_value empty_nc($table[9]);
  709.           $display_sdi_threshold_value empty_nc($table[10]);
  710.           $display_sdi_frequency empty_nc($table[11]);
  711.           $display_sdi_statut empty_nc($table[12]);
  712.           $display_e_scale_compare empty_nc($table[13]);
  713.           $display_e_fiability empty_nc($table[14]);
  714.           $display_e_accessibility empty_nc($table[15]);
  715.           $display_e_lisibility empty_nc($table[16]);
  716.           $display_e_relevance empty_nc($table[17]);
  717.           $display_e_global_performance empty_nc($table[18]);
  718.           $display_p_name formatText(empty_nc($table[19])'2HTML');
  719.           $display_p_service formatText(empty_nc($table[20])'2HTML');
  720.           $display_p_description =formatText(empty_nc($table[21])'2HTML');
  721.           $display_p_incharge formatText(empty_nc($table[22])'2HTML');
  722.           $display_p_address =formatText(empty_nc($table[23])'2HTML');
  723.           $display_p_phone =empty_nc($table[24]);
  724.           $display_p_fax empty_nc($table[25]);
  725.           $display_p_email empty_nc($table[26]);
  726.           $display_r_title =formatText(empty_nc($table[27])'2HTML');
  727.           $display_r_body formatText(empty_nc($table[28])'2HTML');
  728.           $display_r_referer_uri empty_nc($table[29]);
  729.           $display_r_mask_uri formatText(empty_nc($table[30])'2HTML');
  730.  
  731.           if ($table[32]=='Y'$display_sdi_threshold_relative _t('sdi','threshold_relative_Y');
  732.           else $display_sdi_threshold_relative _t('sdi','threshold_relative_N');
  733.           
  734.           if ($table[33]=='Y'$display_attached_to_dashboard _t('divers','yes');
  735.           else $display_attached_to_dashboard _t('divers','no');
  736.           
  737.           $display_sdi_type formatText($lang['sdi']['select_type'][$table[34]]'2HTML');
  738.           $display_sdi_dashboard_viz formatText($lang['sdi']['select_dashboard_viz'][$table[35]]'2HTML');
  739.           $display_sdi_detail_viz formatText($lang['sdi']['select_detail_viz'][$table[36]]'2HTML');
  740.               
  741.           $onetheme SQL_getOnesditheme($table[3]);
  742.           $onetheme $sql_object -> DBSelect($onetheme);
  743.           $display_sdi_theme formatText(empty_nc($onetheme[0]['theme_name'])'2HTML');
  744.  
  745.           $table urlencode(serialize($table));
  746.  
  747.           ?>
  748. <div class="contentcontainer">
  749. <?php
  750. include_once(override($dir.'/menurub.php'THEME_ADMIN_PATH));
  751.  
  752. ?>
  753. <div id="content">
  754. <h2><?php echo _t('recap','title'?></h2>
  755. <h3 class="part"><?php echo _t('sdi','add_step1')?></h3>
  756. <dl class="dl3">
  757.     <dt><?php echo mb_ucfirst(_t('sdi','name2'))?> :</dt>
  758.     <dd><?php echo $display_sdi_name?></dd>
  759.     <?php /*
  760.     <dt><?php echo mb_ucfirst(_t('sdi','type')) ?> : </dt>
  761.     <dd><?php echo mb_ucfirst($display_sdi_type);?></dd>
  762.     */ ?>
  763.     <dt><?php echo mb_ucfirst(_t('sdi','dashboard_viz')) ?> : </dt>
  764.     <dd><?php echo mb_ucfirst($display_sdi_dashboard_viz);?></dd>
  765.     <?php /*
  766.     <dt><?php echo mb_ucfirst(_t('sdi','detail_viz')) ?> : </dt>
  767.     <dd><?php echo mb_ucfirst($display_sdi_detail_viz);?></dd>
  768.     */ ?>
  769.     <dt><?php echo mb_ucfirst(_t('divers','statut'))?> :</dt>
  770.     <dd><?php echo display_statut($display_sdi_statut)?></dd>
  771.     <dt><?php echo mb_ucfirst(_t('sdi','theme'));    ?> :</dt>
  772.     <dd><?php echo $display_sdi_theme;    ?></dd>
  773.     <?php 
  774.     /** <dt><?php echo _t('sdi','range'); ?> :</dt>
  775.     <dd><?php echo $display_sdi_range;?></dd> */ 
  776.     ?>
  777.     <dt><?php echo mb_ucfirst(_t('sdi','description'))?> :</dt>
  778.     <dd><?php echo $display_sdi_description?></dd>
  779.     <dt><?php echo mb_ucfirst(_t('sdi','goal'));    ?> :</dt>
  780.     <dd><?php echo $display_sdi_goal;    ?>    </dd>
  781.     <dt><?php echo mb_ucfirst(_t('sdi','consulting'));    ?> :</dt>
  782.     <dd><?php echo $display_sdi_consulting;    ?></dd>
  783.     <dt><?php echo mb_ucfirst(_t('sdi','attached_to_dashboard'));    ?> :</dt>
  784.     <dd><?php echo $display_attached_to_dashboard;    ?></dd>
  785.     <dt><?php echo mb_ucfirst(_t('sdi','comment'))?> :</dt>
  786.     <dd><?php echo $display_sdi_comment?></dd>
  787. </dl>
  788.  
  789. <h3 class="part"><?php echo _t('sdi','info_mesure')?></h3>
  790. <dl>
  791.     <dt><?php echo mb_ucfirst(_t('sdi','unit'));    ?> :</dt>
  792.     <dd><?php echo $display_sdi_unit;    ?></dd>
  793.     <dt><?php echo mb_ucfirst(_t('sdi','max_value'));    ?> :</dt>
  794.     <dd><?php echo $display_sdi_max_value;    ?>    </dd>
  795.     <dt><?php echo mb_ucfirst(_t('sdi','min_value'));    ?> :</dt>
  796.     <dd><?php echo $display_sdi_min_value;    ?></dd>
  797.     <dt><?php echo mb_ucfirst(_t('sdi','initial_threshold_value'));    ?> :</dt>
  798.     <dd><?php echo $display_sdi_threshold_value;    ?></dd>
  799.     <dt><?php echo mb_ucfirst(_t('sdi','threshold_relative'));    ?> :</dt>
  800.     <dd><?php echo $display_sdi_threshold_relative;    ?></dd>
  801.     <dt><?php echo mb_ucfirst(_t('sdi','frequency'));    ?> :</dt>
  802.     <dd><?php echo $display_sdi_frequency;    ?></dd>
  803. </dl>
  804.  
  805. <h3 class="part"><?php echo _t('sdi','add_step2')?></h3>
  806. <dl class="dl3">
  807.     <dt><?php echo mb_ucfirst(_t('sdi','e_scale_compare'));    ?> :</dt>
  808.     <dd><?php echo $display_e_scale_compare?></dd>
  809.     <dt><?php echo mb_ucfirst(_t('sdi','e_fiability'));    ?> :</dt>
  810.     <dd><?php echo $display_e_fiability?></dd>
  811.     <dt><?php echo mb_ucfirst(_t('sdi','e_accessibility'));    ?> :</dt>
  812.     <dd><?php echo $display_e_accessibility?></dd>
  813.     <dt><?php echo mb_ucfirst(_t('sdi','e_lisibility'))?> :</dt>
  814.     <dd><?php echo $display_e_lisibility?></dd>
  815.     <dt><?php echo mb_ucfirst(_t('sdi','e_relevance'));    ?> :</dt>
  816.     <dd><?php echo $display_e_relevance?></dd>
  817.     <dt><?php echo mb_ucfirst(_t('sdi','e_global_performance'))?> :</dt>
  818.     <dd><?php echo $display_e_global_performance?></dd>
  819. </dl>
  820.  
  821. <h3 class="part"><?php echo _t('sdi','add_step3')?></h3>
  822. <dl class="dl3">
  823.     <dt><?php echo mb_ucfirst(_t('sdi','p_name'));    ?> :</dt>
  824.     <dd><?php echo $display_p_name;    ?></dd>
  825.     <dt><?php echo mb_ucfirst(_t('sdi','p_service'));    ?> :</dt>
  826.     <dd><?php echo $display_p_service;    ?></dd>
  827.     <dt><?php echo mb_ucfirst(_t('sdi','p_description'));    ?> :</dt>
  828.     <dd><?php echo $display_p_description;    ?></dd>
  829.     <dt><?php echo mb_ucfirst(_t('sdi','p_incharge'));    ?> :</dt>
  830.     <dd><?php echo $display_p_incharge;    ?></dd>
  831.     <dt><?php echo mb_ucfirst(_t('sdi','p_address'))?> :</dt>
  832.     <dd><?php echo $display_p_address?></dd>
  833.     <dt><?php echo mb_ucfirst(_t('sdi','p_phone'));    ?> :</dt>
  834.     <dd><?php echo $display_p_phone?></dd>
  835.     <dt><?php echo mb_ucfirst(_t('sdi','p_fax'))?> :</dt>
  836.     <dd><?php echo $display_p_fax;    ?></dd>
  837.     <dt><?php echo mb_ucfirst(_t('sdi','p_email'));    ?> :</dt>
  838.     <dd><?php echo $display_p_email?></dd>
  839. </dl>
  840.  
  841. <h3 class="part"><?php echo _t('sdi','add_step4')?></h3>
  842. <dl class="dl3">
  843.     <dt><?php echo mb_ucfirst(_t('sdi','r_title'));    ?> :</dt>
  844.     <dd><?php echo $display_r_title?></dd>
  845.     <dt><?php echo mb_ucfirst(_t('sdi','r_body'));    ?> :</dt>
  846.     <dd><?php echo $display_r_body;    ?></dd>
  847.     <dt><?php echo mb_ucfirst(_t('sdi','r_referer_uri'));    ?> :</dt>
  848.     <dd><?php echo $display_r_referer_uri;    ?></dd>
  849.     <dt><?php echo mb_ucfirst(_t('sdi','r_mask_uri'));    ?> :</dt>
  850.     <dd><?php echo $display_r_mask_uri;    ?></dd>
  851. </dl>
  852.  
  853. <form id="addsdi5" action="<?php echo $_SERVER['SCRIPT_NAME']?>" method="post">
  854.   <div>
  855.     <input name="rub" type="hidden" value="<?php echo $rub?>" id="rub" />
  856.     <input name="todo" type="hidden" value="<?php echo $todo?>" id="todo" />
  857.     <input name="data_table" type="hidden" value="<?php echo $table?>" id="data_table" />
  858.     <?php echo cancel_button($rub_link."&amp;todo=list")?>
  859.     <input name="retour" type="button" value="<?php echo _t('btn','preview'?>" class="button" id="retour" onclick="history.go(-1);" />
  860.     <input name="enregistrer" type="submit" value="<?php echo _t('btn','save'?>" class="button" id="valider" />
  861.   </div>
  862. </form>
  863. </div>
  864. <?php include_once(override($dir.'/help.php'THEME_ADMIN_PATH))?></div>
  865. <?php
  866.         }
  867.       }
  868.     }
  869.   }
  870. }
  871. ?>

Documentation generated on Mon, 08 Apr 2013 18:11:54 +0200 by phpDocumentor 1.4.1