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

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