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

Documentation generated on Fri, 16 Oct 2009 09:28:05 +0200 by phpDocumentor 1.4.1