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. <p>
  392.       <label for="sdi_detail_viz"><?php echo mb_ucfirst(_t('sdi','detail_viz')) ?> : *</label>
  393.       <?php echo $select_detail_viz?>
  394. </p>
  395.  
  396. <p>
  397.     <label for="sdi_theme"><?php echo mb_ucfirst(_t('sdi','theme')) ?> : *</label> 
  398.     <?php echo $select_theme?>
  399. </p>
  400.  
  401. <div class="label"><?php echo mb_ucfirst(_t('divers','statut'))?> : *</div>
  402. <div class="rightpanel">
  403.   <input name="sdi_statut" type="radio" id="statut_P" value="P" <?php echo $mask_statut_P?> />
  404.   <label for="statut_P"><?php echo mb_ucfirst(_t('statut','public'))?></label>
  405.   <input name="sdi_statut" type="radio" id="statut_D" value="D" <?php echo $mask_statut_D?> />
  406.   <label for="statut_D"><?php echo mb_ucfirst(_t('statut','draft'))?></label>
  407. </div>
  408. <?php
  409. /** ?><p>
  410. <label for="range" ><?php echo _t('sdi','range') ?> * :</label>
  411. <input name="range" type="text" size="47" id="range" maxlength="150" value="<?php echo $form_range;
  412. ?>" />
  413. </p>
  414. <?php */?>
  415. <p>
  416.     <label for="description"><?php echo mb_ucfirst(_t('sdi','description')) ?> : *</label>
  417.     <textarea id="description" name="description" class="largetextfield"><?php echo $form_description?></textarea>
  418. </p>
  419. <p>
  420.     <label for="goal"><?php echo mb_ucfirst(_t('sdi','goal'))?> :</label>
  421.     <textarea id="goal" name="goal" <?php echo AREA_SETTINGS?> class="largetextfield"><?php echo $form_goal?></textarea>
  422. </p>
  423. <p>
  424.     <label for="consulting"><?php echo mb_ucfirst(_t('sdi','consulting'))?> :</label>
  425.     <textarea id="consulting" name="consulting" <?php echo AREA_SETTINGS?> class="largetextfield"><?php echo $form_consulting?></textarea>
  426. </p>
  427. <p>
  428.     <label for="attached_to_dashboard"><?php echo mb_ucfirst(_t('sdi','attached_to_dashboard'))?> :</label>
  429.     <input type="checkbox" name="attached_to_dashboard" value="1" id="attached_to_dashboard" <?php echo $mask_dashboard?> />
  430. </p>
  431. <p>
  432.     <label for="comment"><?php echo mb_ucfirst(_t('sdi','comment'))?> :</label>
  433.     <textarea id="comment" name="comment" <?php echo AREA_SETTINGS?> class="largetextfield"><?php echo $form_comment?></textarea>
  434. </p>
  435.  
  436. <h3 class="part"><?php echo mb_ucfirst(_t('sdi','info_mesure'))?></h3>
  437.  
  438. <p>
  439.     <label for="unit"><?php echo mb_ucfirst(_t('sdi','unit'))?> * :</label>
  440.     <input name="unit" type="text" class="textfield" id="unit" maxlength="100" value="<?php echo $form_unit?>" />
  441. </p>
  442. <p>
  443.     <label for="min_value"><?php echo mb_ucfirst(_t('sdi','min_value'))?> :</label>
  444.     <input name="min_value" type="text" class="textfield" id="min_value" maxlength="100" value="<?php echo $form_min_value?>" />
  445. </p>
  446. <p>
  447.     <label for="max_value"><?php echo mb_ucfirst(_t('sdi','max_value'))?> :</label>
  448.     <input name="max_value" type="text" class="textfield" id="max_value" maxlength="100" value="<?php echo $form_max_value?>" />
  449. </p>
  450. <p>
  451.     <label for="threshold_value"><?php echo mb_ucfirst(_t('sdi','initial_threshold_value'))?> :</label>
  452.     <input name="threshold_value" type="text" class="textfield" id="threshold_value" maxlength="100" value="<?php echo $form_threshold_value?>" />
  453. </p>
  454. <p>
  455.     <label for="frequency"><?php echo mb_ucfirst(_t('sdi','frequency'))?> * :</label>
  456.     <input name="frequency" type="text" class="textfield" id="frequency" maxlength="11" value="<?php echo $form_frequency?>" />
  457. </p>
  458.  
  459. <div class="label"><?php echo mb_ucfirst(_t('sdi','threshold_relative'))?> * :</div>
  460. <div class="rightpanel">
  461.   <input type="checkbox" name="threshold_relative" value="1" id="threshold_relative" <?php echo $mask_threshold_relative?> />
  462.   <label for="threshold_relative"><?php echo mb_ucfirst(_t('sdi','threshold_relative_comment'))?></label>
  463. </div>
  464. <div>
  465.     <input name="rub" type="hidden" value="<?php echo $rub?>"    id="rub" />
  466.     <input name="todo" type="hidden" value="<?php echo $todo?>" id="todo" />
  467.     <?php echo cancel_button($rub_link."&amp;todo=list")?>
  468.     <input name="enregistrer2" type="submit" value="<?php echo _t('sdi','btn_fin'?>" class="button" id="enregistrer2" />
  469.     <input name="valider1" type="submit" value="<?php echo _t('sdi','btn_step1'?>" class="button" id="valider" />
  470. </div>
  471. </form>
  472. </div>
  473. <?php include_once(override($dir.'/help.php'THEME_ADMIN_PATH))?></div>
  474. <?php
  475. // Récapitulatif
  476. else {
  477.   if (!isset($integrity2|| is_string($integrity2)) {
  478. ?>
  479. <div class="contentcontainer">
  480. <?php
  481. include_once(override($dir.'/menurub.php'THEME_ADMIN_PATH));
  482. ?>
  483. <div id="content">
  484. <?php
  485. if (isset($integrity2&& is_string($integrity2)) display_errors($integrity2);
  486.  
  487. ?>
  488. <div class="stepcontent">
  489.   <div class="step">
  490.     <img src="<?php echo THEME_ADMIN_PATH?>images/step1_pas.gif" alt="step1" /><br />
  491.     <span class="steppas"><?php echo _t('sdi','add_step1')?></span>
  492.   </div>
  493.   <div class="step">
  494.     <img src="<?php echo THEME_ADMIN_PATH?>images/step2_act.gif" alt="step2" /><br />
  495.     <span class="stepact"><?php echo _t('sdi','add_step2')?></span>
  496.   </div>
  497.   <div class="step">
  498.     <img src="<?php echo THEME_ADMIN_PATH?>images/step3_pas.gif" alt="step3" /><br />
  499.     <span class="steppas"><?php echo _t('sdi','add_step3')?></span>
  500.   </div>
  501.   <div class="step">
  502.     <img src="<?php echo THEME_ADMIN_PATH?>images/step4_pas.gif" alt="step4" /><br />
  503.     <span class="steppas"><?php echo _t('sdi','add_step4')?></span>
  504.   </div>
  505. </div>
  506. <br class="brendstep" />
  507.  
  508. <h2><?php echo _t('sdi','add_title2'?></h2>
  509.  
  510. <form id="addsdi2" action="<?php echo $_SERVER['SCRIPT_NAME']?>" method="post">
  511. <p>
  512.     <label for="e_scale_compare"><?php echo mb_ucfirst(_t('sdi','e_scale_compare')) ?> * :</label>
  513.     <input name="e_scale_compare" type="text" class="textfield" id="e_scale_compare" maxlength="3" value="<?php echo $form_e_scale_compare?>" />
  514. </p>
  515. <p>
  516.     <label for="e_fiability"><?php echo mb_ucfirst(_t('sdi','e_fiability')) ?> * :</label>
  517.     <input name="e_fiability" type="text" class="textfield" id="e_fiability" maxlength="3" value="<?php echo $form_e_fiability?>" />
  518. </p>
  519. <p>
  520.     <label for="e_accessibility"><?php echo mb_ucfirst(_t('sdi','e_accessibility')) ?> * :</label>
  521.     <input name="e_accessibility" type="text" class="textfield" id="e_accessibility" maxlength="3" value="<?php echo $form_e_accessibility?>" />
  522. </p>
  523. <p>
  524.     <label for="e_lisibility"><?php echo mb_ucfirst(_t('sdi','e_lisibility')) ?> * :</label>
  525.     <input name="e_lisibility" type="text" class="textfield" id="e_lisibility" maxlength="3" value="<?php echo $form_e_lisibility?>" />
  526. </p>
  527. <p>
  528.     <label for="e_relevance"><?php echo mb_ucfirst(_t('sdi','e_relevance')) ?> * :</label>
  529.     <input name="e_relevance" type="text" class="textfield" id="e_relevance" maxlength="3" value="<?php echo $form_e_relevance?>" />
  530. </p>
  531. <p>
  532.     <label for="e_global_performance"><?php echo mb_ucfirst(_t('sdi','e_global_performance')) ?> * : </label>
  533.     <input name="e_global_performance" type="text" class="textfield" id="e_global_performance" maxlength="3" value="<?php echo $form_e_global_performance?>" />
  534. </p>
  535.  
  536. <div>
  537.   <input name="table" type="hidden" value="<?php echo $table?>" id="table" />
  538.   <input name="rub" type="hidden" value="<?php echo $rub?>" id="rub" />
  539.   <input name="todo" type="hidden" value="<?php echo $todo?>" id="todo" />
  540.   <?php echo cancel_button($rub_link."&amp;todo=list")?>
  541.   <input name="valider2" type="submit" value="<?php echo _t('sdi','btn_step2'?>" class="button" id="valider" />
  542. </div>
  543. </form>
  544. </div>
  545. <?php include_once(override($dir.'/help.php'THEME_ADMIN_PATH))?>
  546. </div>
  547. <?php
  548. else {
  549.     if (!isset($integrity3|| is_string($integrity3)) {
  550. ?>
  551. <div class="contentcontainer">
  552. <?php
  553. include_once(override($dir.'/menurub.php'THEME_ADMIN_PATH));
  554. ?>
  555. <div id="content">
  556. <?php
  557. if (isset($integrity3&& is_string($integrity3)) display_errors($integrity3);
  558. ?>
  559.  
  560. <div class="stepcontent">
  561.   <div class="step">
  562.     <img src="<?php echo THEME_ADMIN_PATH?>images/step1_pas.gif" alt="step1" /><br />
  563.     <span class="steppas"><?php echo _t('sdi','add_step1')?></span>
  564.   </div>
  565.   <div class="step">
  566.     <img src="<?php echo THEME_ADMIN_PATH?>images/step2_pas.gif" alt="step2" /><br />
  567.     <span class="steppas"><?php echo _t('sdi','add_step2')?></span>
  568.   </div>
  569.   <div class="step">
  570.     <img src="<?php echo THEME_ADMIN_PATH?>images/step3_act.gif" alt="step3" /><br />
  571.     <span class="stepact"><?php echo _t('sdi','add_step3')?></span>
  572.   </div>
  573.   <div class="step">
  574.     <img src="<?php echo THEME_ADMIN_PATH?>images/step4_pas.gif" alt="step4" /><br />
  575.     <span class="steppas"><?php echo _t('sdi','add_step4')?></span>
  576.   </div>
  577. </div>
  578. <br class="brendstep" />
  579.  
  580. <h2><?php echo _t('sdi','add_title3'?></h2>
  581.  
  582. <form id="addsdi3" action="<?php echo $_SERVER['SCRIPT_NAME']?>" method="post">
  583. <p>
  584.     <label for="p_name"><?php echo mb_ucfirst(_t('sdi','p_name')) ?> * :</label>
  585.     <input name="p_name" type="text" class="textfield" id="p_name" maxlength="255" value="<?php echo $form_p_name?>" />
  586. </p>
  587. <p>
  588.     <label for="p_service"><?php echo mb_ucfirst(_t('sdi','p_service')) ?> :</label>
  589.     <input name="p_service" type="text" class="textfield" id="p_service" maxlength="255" value="<?php echo $form_p_service?>" />
  590. </p>
  591. <p>
  592.     <label for="p_incharge"><?php echo mb_ucfirst(_t('sdi','p_incharge')) ?> :</label>
  593.     <input name="p_incharge" type="text" class="textfield" id="p_incharge" maxlength="150" value="<?php echo $form_p_incharge?>" />
  594. </p>
  595. <p>
  596.     <label for="p_address"><?php echo mb_ucfirst(_t('sdi','p_address')) ?> * :</label>
  597.     <textarea id="p_address" name="p_address" <?php echo AREA_SETTINGS?> class="largetextfield"><?php echo $form_p_address?></textarea>
  598. </p>
  599. <p>
  600.     <label for="p_phone"><?php echo mb_ucfirst(_t('sdi','p_phone')) ?> :</label>
  601.     <input name="p_phone" type="text" class="textfield" id="p_phone" maxlength="10" value="<?php echo $form_p_phone?>" />
  602. </p>
  603. <p>
  604.     <label for="p_fax"><?php echo mb_ucfirst(_t('sdi','p_fax')) ?> :</label>
  605.     <input name="p_fax" type="text" class="textfield" id="p_fax" maxlength="10" value="<?php echo $form_p_fax?>" />
  606. </p>
  607. <p>
  608.     <label for="p_email"><?php echo mb_ucfirst(_t('sdi','p_email')) ?> * :</label>
  609.     <input name="p_email" type="text" class="textfield" id="p_email" maxlength="200" value="<?php echo $form_p_email?>" />
  610. </p>
  611. <p>
  612.     <label for="p_description"><?php echo mb_ucfirst(_t('sdi','p_description')) ?> :</label>
  613.     <textarea id="p_description" name="p_description" <?php echo AREA_SETTINGS?> class="largetextfield"><?php echo $form_p_description?></textarea>
  614. </p>
  615. <div>
  616.     <input name="table" type="hidden" value="<?php echo $table?>" id="table" />
  617.     <input name="rub" type="hidden" value="<?php echo $rub?>" id="rub" />
  618.     <input name="todo" type="hidden" value="<?php echo $todo?>" id="todo" />
  619.     <?php echo cancel_button($rub_link."&amp;todo=list")?>
  620.     <input name="valider3" type="submit" value="<?php echo _t('sdi','btn_step3'?>" class="button" id="valider" />
  621. </div>
  622. </form>
  623. </div>
  624. <?php include_once(override($dir.'/help.php'THEME_ADMIN_PATH))?>
  625. </div>
  626. <?php
  627.     else {
  628.       if (!isset($integrity4|| is_string($integrity4)) {
  629. ?>
  630. <div class="contentcontainer">
  631. <?php
  632. include_once(override($dir.'/menurub.php'THEME_ADMIN_PATH));
  633. ?>
  634. <div id="content">
  635. <?php
  636. if (isset($integrity4&& is_string($integrity4)) display_errors($integrity4);
  637. ?>
  638.  
  639. <div class="stepcontent">
  640.   <div class="step">
  641.     <img src="<?php echo THEME_ADMIN_PATH?>images/step1_pas.gif" alt="step1" /><br />
  642.     <span class="steppas"><?php echo _t('sdi','add_step1')?></span>
  643.   </div>
  644.   <div class="step">
  645.     <img src="<?php echo THEME_ADMIN_PATH?>images/step2_pas.gif" alt="step2" /><br />
  646.     <span class="steppas"><?php echo _t('sdi','add_step2')?></span>
  647.   </div>
  648.   <div class="step">
  649.     <img src="<?php echo THEME_ADMIN_PATH?>images/step3_pas.gif" alt="step3" /><br />
  650.     <span class="steppas"><?php echo _t('sdi','add_step3')?></span>
  651.   </div>
  652.   <div class="step">
  653.     <img src="<?php echo THEME_ADMIN_PATH?>images/step4_act.gif" alt="step4" /><br />
  654.     <span class="stepact"><?php echo _t('sdi','add_step4')?></span>
  655.   </div>
  656. </div>
  657. <br class="brendstep" />
  658.  
  659. <h2><?php echo _t('sdi','add_title4'?></h2>
  660.  
  661. <form id="addsdi4" action="<?php echo $_SERVER['SCRIPT_NAME']?>" method="post">
  662. <p>
  663.     <label for="r_title"><?php echo mb_ucfirst(_t('sdi','r_title')) ?> * :</label>
  664.     <input name="r_title" type="text" class="textfield" id="r_title" maxlength="255" value="<?php echo $form_r_title?>" />
  665. </p>
  666. <p>
  667.     <label for="r_body"><?php echo mb_ucfirst(_t('sdi','r_body')) ?> * :</label>
  668.     <textarea id="r_body" name="r_body" <?php echo AREA_SETTINGS?> class="largetextfield"><?php echo $form_r_body?></textarea>
  669. </p>
  670. <p>
  671.     <label for="r_referer_uri"><?php echo mb_ucfirst(_t('sdi','r_referer_uri')) ?> :</label>
  672.     <input name="r_referer_uri" type="text" class="textfield" id="r_referer_uri" maxlength="255" value="<?php echo $form_r_referer_uri?>" />
  673. </p>
  674. <p>
  675.     <label for="r_mask_uri"><?php echo mb_ucfirst(_t('sdi','r_mask_uri')) ?> :</label>
  676.     <input name="r_mask_uri" type="text" class="textfield" id="r_mask_uri" maxlength="255" value="<?php echo $form_r_mask_uri?>" />
  677. </p>
  678.  
  679. <div>
  680.   <input name="table" type="hidden" value="<?php echo $table;  ?>" id="table" />
  681.   <input name="rub" type="hidden" value="<?php echo $rub?>" id="rub" />
  682.   <input name="todo" type="hidden" value="<?php echo $todo?>" id="todo" />
  683.   <?php echo cancel_button($rub_link."&amp;todo=list")?>
  684.   <input name="valider4" type="submit" value="<?php echo _t('btn','valid'?>" class="button" id="valider" />
  685. </div>
  686. </form>
  687. </div>
  688. <?php include_once(override($dir.'/help.php'THEME_ADMIN_PATH))?></div>
  689. <?php
  690.       else {
  691.         if (!isset($integrity5|| is_string($integrity5)) {
  692.  
  693.  
  694.           $table=unserialize(urldecode($table));
  695.           $display_sdi_name formatText(empty_nc($table[0])'2HTML');
  696.           $display_sdi_description =formatText(empty_nc($table[1])'2HTML');
  697.           $display_sdi_comment =formatText(empty_nc($table[2])'2HTML');
  698.           //$display_sdi_range = empty_nc($table[4]);
  699.           $display_sdi_goal formatText(empty_nc($table[5])'2HTML');
  700.           $display_sdi_consulting formatText(empty_nc($table[6])'2HTML');
  701.           $display_sdi_unit formatText(empty_nc($table[7])'2HTML');
  702.           $display_sdi_max_value empty_nc($table[8]);
  703.           $display_sdi_min_value empty_nc($table[9]);
  704.           $display_sdi_threshold_value empty_nc($table[10]);
  705.           $display_sdi_frequency empty_nc($table[11]);
  706.           $display_sdi_statut empty_nc($table[12]);
  707.           $display_e_scale_compare empty_nc($table[13]);
  708.           $display_e_fiability empty_nc($table[14]);
  709.           $display_e_accessibility empty_nc($table[15]);
  710.           $display_e_lisibility empty_nc($table[16]);
  711.           $display_e_relevance empty_nc($table[17]);
  712.           $display_e_global_performance empty_nc($table[18]);
  713.           $display_p_name formatText(empty_nc($table[19])'2HTML');
  714.           $display_p_service formatText(empty_nc($table[20])'2HTML');
  715.           $display_p_description =formatText(empty_nc($table[21])'2HTML');
  716.           $display_p_incharge formatText(empty_nc($table[22])'2HTML');
  717.           $display_p_address =formatText(empty_nc($table[23])'2HTML');
  718.           $display_p_phone =empty_nc($table[24]);
  719.           $display_p_fax empty_nc($table[25]);
  720.           $display_p_email empty_nc($table[26]);
  721.           $display_r_title =formatText(empty_nc($table[27])'2HTML');
  722.           $display_r_body formatText(empty_nc($table[28])'2HTML');
  723.           $display_r_referer_uri empty_nc($table[29]);
  724.           $display_r_mask_uri formatText(empty_nc($table[30])'2HTML');
  725.  
  726.           if ($table[32]=='Y'$display_sdi_threshold_relative _t('sdi','threshold_relative_Y');
  727.           else $display_sdi_threshold_relative _t('sdi','threshold_relative_N');
  728.           
  729.           if ($table[33]=='Y'$display_attached_to_dashboard _t('divers','yes');
  730.           else $display_attached_to_dashboard _t('divers','no');
  731.           
  732.           $display_sdi_type formatText($lang['sdi']['select_type'][$table[34]]'2HTML');
  733.           $display_sdi_dashboard_viz formatText($lang['sdi']['select_dashboard_viz'][$table[35]]'2HTML');
  734.           $display_sdi_detail_viz formatText($lang['sdi']['select_detail_viz'][$table[36]]'2HTML');
  735.               
  736.           $onetheme SQL_getOnesditheme($table[3]);
  737.           $onetheme $sql_object -> DBSelect($onetheme);
  738.           $display_sdi_theme formatText(empty_nc($onetheme[0]['theme_name'])'2HTML');
  739.  
  740.           $table urlencode(serialize($table));
  741.  
  742.           ?>
  743. <div class="contentcontainer">
  744. <?php
  745. include_once(override($dir.'/menurub.php'THEME_ADMIN_PATH));
  746.  
  747. ?>
  748. <div id="content">
  749. <h2><?php echo _t('recap','title'?></h2>
  750. <h3 class="part"><?php echo _t('sdi','add_step1')?></h3>
  751. <dl class="summary">
  752.     <dt><?php echo mb_ucfirst(_t('sdi','name2'))?> :</dt>
  753.     <dd><?php echo $display_sdi_name?></dd>
  754.     <?php /*
  755.     <dt><?php echo mb_ucfirst(_t('sdi','type')) ?> : </dt>
  756.     <dd><?php echo mb_ucfirst($display_sdi_type);?></dd>
  757.     */ ?>
  758.     <dt><?php echo mb_ucfirst(_t('sdi','dashboard_viz')) ?> : </dt>
  759.     <dd><?php echo mb_ucfirst($display_sdi_dashboard_viz);?></dd>
  760.     <dt><?php echo mb_ucfirst(_t('sdi','detail_viz')) ?> : </dt>
  761.     <dd><?php echo mb_ucfirst($display_sdi_detail_viz);?></dd>
  762.     <dt><?php echo mb_ucfirst(_t('divers','statut'))?> :</dt>
  763.     <dd><?php echo display_statut($display_sdi_statut)?></dd>
  764.     <dt><?php echo mb_ucfirst(_t('sdi','theme'));    ?> :</dt>
  765.     <dd><?php echo $display_sdi_theme;    ?></dd>
  766.     <?php 
  767.     /** <dt><?php echo _t('sdi','range'); ?> :</dt>
  768.     <dd><?php echo $display_sdi_range;?></dd> */ 
  769.     ?>
  770.     <dt><?php echo mb_ucfirst(_t('sdi','description'))?> :</dt>
  771.     <dd><?php echo $display_sdi_description?></dd>
  772.     <dt><?php echo mb_ucfirst(_t('sdi','goal'));    ?> :</dt>
  773.     <dd><?php echo $display_sdi_goal;    ?>    </dd>
  774.     <dt><?php echo mb_ucfirst(_t('sdi','consulting'));    ?> :</dt>
  775.     <dd><?php echo $display_sdi_consulting;    ?></dd>
  776.     <dt><?php echo mb_ucfirst(_t('sdi','attached_to_dashboard'));    ?> :</dt>
  777.     <dd><?php echo $display_attached_to_dashboard;    ?></dd>
  778.     <dt><?php echo mb_ucfirst(_t('sdi','comment'))?> :</dt>
  779.     <dd><?php echo $display_sdi_comment?></dd>
  780. </dl>
  781.  
  782. <h3 class="part"><?php echo _t('sdi','info_mesure')?></h3>
  783. <dl>
  784.     <dt><?php echo mb_ucfirst(_t('sdi','unit'));    ?> :</dt>
  785.     <dd><?php echo $display_sdi_unit;    ?></dd>
  786.     <dt><?php echo mb_ucfirst(_t('sdi','min_value'));    ?> :</dt>
  787.     <dd><?php echo $display_sdi_min_value;    ?></dd>
  788.     <dt><?php echo mb_ucfirst(_t('sdi','max_value'));    ?> :</dt>
  789.     <dd><?php echo $display_sdi_max_value;    ?>    </dd>
  790.     <dt><?php echo mb_ucfirst(_t('sdi','initial_threshold_value'));    ?> :</dt>
  791.     <dd><?php echo $display_sdi_threshold_value;    ?></dd>
  792.     <dt><?php echo mb_ucfirst(_t('sdi','threshold_relative'));    ?> :</dt>
  793.     <dd><?php echo $display_sdi_threshold_relative;    ?></dd>
  794.     <dt><?php echo mb_ucfirst(_t('sdi','frequency'));    ?> :</dt>
  795.     <dd><?php echo $display_sdi_frequency;    ?></dd>
  796. </dl>
  797.  
  798. <h3 class="part"><?php echo _t('sdi','add_step2')?></h3>
  799. <dl class="summary">
  800.     <dt><?php echo mb_ucfirst(_t('sdi','e_scale_compare'));    ?> :</dt>
  801.     <dd><?php echo $display_e_scale_compare?></dd>
  802.     <dt><?php echo mb_ucfirst(_t('sdi','e_fiability'));    ?> :</dt>
  803.     <dd><?php echo $display_e_fiability?></dd>
  804.     <dt><?php echo mb_ucfirst(_t('sdi','e_accessibility'));    ?> :</dt>
  805.     <dd><?php echo $display_e_accessibility?></dd>
  806.     <dt><?php echo mb_ucfirst(_t('sdi','e_lisibility'))?> :</dt>
  807.     <dd><?php echo $display_e_lisibility?></dd>
  808.     <dt><?php echo mb_ucfirst(_t('sdi','e_relevance'));    ?> :</dt>
  809.     <dd><?php echo $display_e_relevance?></dd>
  810.     <dt><?php echo mb_ucfirst(_t('sdi','e_global_performance'))?> :</dt>
  811.     <dd><?php echo $display_e_global_performance?></dd>
  812. </dl>
  813.  
  814. <h3 class="part"><?php echo _t('sdi','add_step3')?></h3>
  815. <dl class="summary">
  816.     <dt><?php echo mb_ucfirst(_t('sdi','p_name'));    ?> :</dt>
  817.     <dd><?php echo $display_p_name;    ?></dd>
  818.     <dt><?php echo mb_ucfirst(_t('sdi','p_service'));    ?> :</dt>
  819.     <dd><?php echo $display_p_service;    ?></dd>
  820.     <dt><?php echo mb_ucfirst(_t('sdi','p_description'));    ?> :</dt>
  821.     <dd><?php echo $display_p_description;    ?></dd>
  822.     <dt><?php echo mb_ucfirst(_t('sdi','p_incharge'));    ?> :</dt>
  823.     <dd><?php echo $display_p_incharge;    ?></dd>
  824.     <dt><?php echo mb_ucfirst(_t('sdi','p_address'))?> :</dt>
  825.     <dd><?php echo $display_p_address?></dd>
  826.     <dt><?php echo mb_ucfirst(_t('sdi','p_phone'));    ?> :</dt>
  827.     <dd><?php echo $display_p_phone?></dd>
  828.     <dt><?php echo mb_ucfirst(_t('sdi','p_fax'))?> :</dt>
  829.     <dd><?php echo $display_p_fax;    ?></dd>
  830.     <dt><?php echo mb_ucfirst(_t('sdi','p_email'));    ?> :</dt>
  831.     <dd><?php echo $display_p_email?></dd>
  832. </dl>
  833.  
  834. <h3 class="part"><?php echo _t('sdi','add_step4')?></h3>
  835. <dl class="summary">
  836.     <dt><?php echo mb_ucfirst(_t('sdi','r_title'));    ?> :</dt>
  837.     <dd><?php echo $display_r_title?></dd>
  838.     <dt><?php echo mb_ucfirst(_t('sdi','r_body'));    ?> :</dt>
  839.     <dd><?php echo $display_r_body;    ?></dd>
  840.     <dt><?php echo mb_ucfirst(_t('sdi','r_referer_uri'));    ?> :</dt>
  841.     <dd><?php echo $display_r_referer_uri;    ?></dd>
  842.     <dt><?php echo mb_ucfirst(_t('sdi','r_mask_uri'));    ?> :</dt>
  843.     <dd><?php echo $display_r_mask_uri;    ?></dd>
  844. </dl>
  845.  
  846. <form id="addsdi5" action="<?php echo $_SERVER['SCRIPT_NAME']?>" method="post">
  847.   <div>
  848.     <input name="rub" type="hidden" value="<?php echo $rub?>" id="rub" />
  849.     <input name="todo" type="hidden" value="<?php echo $todo?>" id="todo" />
  850.     <input name="data_table" type="hidden" value="<?php echo $table?>" id="data_table" />
  851.     <?php echo cancel_button($rub_link."&amp;todo=list")?>
  852.     <input name="retour" type="button" value="<?php echo _t('btn','preview'?>" class="button" id="retour" onclick="history.go(-1);" />
  853.     <input name="enregistrer" type="submit" value="<?php echo _t('btn','save'?>" class="button" id="valider" />
  854.   </div>
  855. </form>
  856. </div>
  857. <?php include_once(override($dir.'/help.php'THEME_ADMIN_PATH))?></div>
  858. <?php
  859.         }
  860.       }
  861.     }
  862.   }
  863. }
  864. ?>

Documentation generated on Thu, 20 Mar 2014 16:45:50 +0100 by phpDocumentor 1.4.1