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

Documentation generated on Fri, 01 Apr 2011 09:27:18 +0200 by phpDocumentor 1.4.1