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

Source for file mod_p.php

Documentation is available at mod_p.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. $link_mod_r=$rub_link."&amp;todo=mod_r&amp;id=";
  19. $link_mod_e=$rub_link."&amp;todo=mod_e&amp;id=";
  20. $link_mod=$rub_link."&amp;todo=mod&amp;id=";
  21.  
  22. if(!isset($_GET['id']&& !isset($_POST['id'])) {
  23.     $id="1";
  24. else {
  25.     if(isset($_POST['id']))    $id=$_POST['id'];
  26.     if(isset($_GET['id']))    $id=$_GET['id'];
  27. }
  28.  
  29. if (isset($_POST['enregistrer'])) {
  30.     $data_table unserialize(urldecode($_POST['data_table']));
  31. $j=0;
  32.     for ($i=19;$i<27;$i++){
  33.     $data_table_p[$j]=$data_table[$i];
  34.     $j++;
  35.     }
  36.     $sdi_objectnew sdi;
  37.     $result=$sdi_object->ModifyParam($id$data_table_p"P"$sql_object);
  38.     $link_confirm="confirm.php?rub=".$rub."&todo=".$todo."&id=".$id;
  39.     if(isset($result)) header("Location: ".$link_confirm);
  40.     else  system_error();
  41.  
  42. $sdi_objectnew sdi;
  43. //$data_provider=$sdi_object->GetProvider($id_idd=$id, $sql_object, $ID="-1");
  44.  
  45. $req_sdip=SQL_getProvider($id_idd=$id$sql_object$ID="-1");
  46. $data_provider $sql_object -> DBSelect($req_sdip);
  47.  
  48.  
  49. $form_p_name formatText($data_provider[0]['sdip_name']'2FIELD');
  50. $form_p_service  formatText($data_provider[0]['sdip_service']'2FIELD');
  51. $form_p_description  formatText($data_provider[0]['sdip_description']'2FIELD');
  52. $form_p_incharge  formatText($data_provider[0]['sdip_incharge']'2FIELD');
  53. $form_p_address  formatText($data_provider[0]['sdip_address']'2FIELD');
  54. $form_p_phone  $data_provider[0]['sdip_phone'];
  55. $form_p_fax  $data_provider[0]['sdip_fax'];
  56. $form_p_email $data_provider[0]['sdip_email'];
  57.  
  58. if (isset($_POST['valider3'])) {
  59.  
  60.     //$table = unserialize(urldecode($_POST['table']));
  61.  
  62.     $table[19$_POST['p_name'];
  63.     $table[20$_POST['p_service'];
  64.     $table[21$_POST['p_description'];
  65.     $table[22$_POST['p_incharge'];
  66.     $table[23$_POST['p_address'];
  67.     $table[24$_POST['p_phone'];
  68.     $table[25$_POST['p_fax'];
  69.     $table[26$_POST['p_email'];
  70.  
  71.     $sdi_object new sdi;
  72.     $integrity3 $sdi_object -> CheckDataIntegrity_provider($table);
  73.  
  74.     $form_p_name formatText($_POST['p_name']'2FIELD');
  75.     $form_p_service formatText($_POST['p_service']'2FIELD');
  76.     $form_p_description formatText($_POST['p_description']'2FIELD');
  77.     $form_p_incharge formatText($_POST['p_incharge']'2FIELD');
  78.     $form_p_address formatText($_POST['p_address']'2FIELD');
  79.     $form_p_phone $_POST['p_phone'];
  80.     $form_p_fax $_POST['p_fax'];
  81.     $form_p_email $_POST['p_email'];
  82.  
  83.     $table urlencode(serialize($table));
  84. include_once(THEME_ADMIN_PATH."quickicons.php");
  85. $req_list_sdiname=SQL_getOnesdiname($id);
  86. $data_sdi_name $sql_object -> DBSelect($req_list_sdiname);
  87. $navtitle=_t('sdi','mod_p')." : ".$data_sdi_name[0]['sdii_name'];
  88.  ?>
  89.  <div id="chemin">
  90.     <ul>
  91.         <li>
  92.             <a href="index.php" class="chemin_home"><?php echo _t('way','home'?></a>
  93.         </li>
  94.         <li>
  95.                <a href="<?php echo $rub_link?>" id="chemin_<? echo $rub?>" class="chemin_rub"><?php echo _t('menu','sdi')?></a>
  96.         </li>
  97.         <li>
  98.             <span><?php echo formatnavTitle($navtitle?></span>
  99.         </li>
  100.     </ul>
  101. </div>
  102. <!--end barre haute -->
  103.  <?
  104.  if (!isset($integrity3|| is_string($integrity3)) {
  105. ?>
  106. <div class="contentcontainer">
  107.         <?php
  108.             include_once($dir "/menurub.php");
  109.  
  110.             ?>
  111.         <div id="content">
  112.             <?php 
  113.             
  114.             
  115.             if (isset($integrity3&& is_string($integrity3)) display_errors($integrity3);
  116.  
  117.             ?>
  118.                         <div class="mod_link">
  119.     <a href="<? echo $link_mod.$id ;?>"><?echo _t('sdi','mod');?></a> | 
  120.     <a href="<? echo $link_mod_e.$id ;?>"><?echo _t('sdi','modify_sdi_e');?></a> | 
  121.     <a href="<? echo $link_mod_r.$id ;?>"><?echo _t('sdi','modify_sdi_r');?></a>
  122.     </div>
  123.             <br class="brendstep" />
  124.             <h2><?php echo formatTitleh2($data_sdi_name[0]['sdii_name'])?></h2>
  125.             
  126.             <form id="addsdi3" action="<?php echo $_SERVER['SCRIPT_NAME'];
  127.             ?>" method="post">
  128.                 <p>
  129.                 <label for="p_name" ><?php echo _t('sdi','p_name'?> * :</label>
  130.                 <input name="p_name" type="text" class="textfield" id="p_name" maxlength="255" value="<?php echo $form_p_name;
  131.             ?>" />
  132.                 </p>
  133.                 <p>
  134.                 <label for="p_service" ><?php echo _t('sdi','p_service'?>  :</label>
  135.                 <input name="p_service" type="text" class="textfield" id="p_service" maxlength="255" value="<?php echo $form_p_service;
  136.             ?>" />
  137.                 </p>
  138.  
  139.                 <p>
  140.                 <label for="p_incharge" ><?php echo _t('sdi','p_incharge'?>  :</label>
  141.                 <input name="p_incharge" type="text" class="textfield" id="p_incharge" maxlength="150" value="<?php echo $form_p_incharge;
  142.             ?>" />
  143.                 </p>
  144.                 <p>
  145.                 <label for="p_address" ><?php echo _t('sdi','p_address'?> * :</label>
  146.                 <textarea id="p_address" name="p_address" <?php echo AREA_SETTINGS?> class="largetextfield" ><?php echo $form_p_address;
  147.             ?></textarea>
  148.                 </p>
  149.                 <p>
  150.                 <label for="p_phone" ><?php echo _t('sdi','p_phone'?>  :</label>
  151.                 <input name="p_phone" type="text" class="textfield" id="p_phone" maxlength="10" value="<?php echo $form_p_phone;
  152.             ?>" />
  153.                 </p>
  154.                 <p>
  155.                 <label for="p_fax" ><?php echo _t('sdi','p_fax'?>  :</label>
  156.                 <input name="p_fax" type="text" class="textfield" id="p_fax" maxlength="10" value="<?php echo $form_p_fax;
  157.             ?>" />
  158.                 </p>
  159.                 <p>
  160.                 <label for="p_email" ><?php echo _t('sdi','p_email'?> * :</label>
  161.                 <input name="p_email" type="text" class="textfield" id="p_email" maxlength="200" value="<?php echo $form_p_email;
  162.             ?>" />
  163.                 </p>
  164.                 <p>
  165.                 <label for="p_description" ><?php echo _t('sdi','p_description'?>  :</label>
  166.                 <textarea id="p_description" name="p_description" <?php echo AREA_SETTINGS?> class="largetextfield" ><?php echo $form_p_description;
  167.             ?></textarea>
  168.                 </p>
  169.                 <div>
  170.         <br />
  171.                 <? echo cancel_button($rub_link."&amp;todo=det&amp;id=".$id)?>
  172.                         <input name="rub" type="hidden" value="<?php echo $rub;
  173.             ?>" id="rub" />
  174.                 <input name="todo" type="hidden" value="<?php echo $todo;
  175.             ?>" id="todo" />
  176.                             <input name="id" type="hidden" value="<?php echo $id;
  177.             ?>" id="id" />
  178.                 <input name="valider3" type="submit" value="<?php echo _t('btn','valid'?>" class="button" id="valider" />
  179.                 </div>
  180.             </form>
  181.         </div>
  182. <?php include_once($dir "/help.php");
  183.             ?>
  184. </div>
  185.  
  186. <?php
  187.         else {
  188.                 if (!isset($integrity5|| is_string($integrity5)) {
  189.                 
  190.                 
  191.                     $table=unserialize(urldecode($table));
  192.                     $display_p_name formatText(empty_nc($table[19])'2HTML');
  193.                     $display_p_service formatText(empty_nc($table[20])'2HTML');
  194.                     $display_p_description =formatText(empty_nc($table[21])'2HTML');
  195.                     $display_p_incharge formatText(empty_nc($table[22])'2HTML');
  196.                     $display_p_address formatText(empty_nc($table[23])'2HTML');
  197.                     $display_p_phone empty_nc($table[24]);
  198.                     $display_p_fax empty_nc($table[25]);
  199.                     $display_p_email empty_nc($table[26]);
  200.                     $table urlencode(serialize($table));
  201.  
  202.                     ?>
  203. <div class="contentcontainer">
  204. <?php
  205.                     include_once($dir "/menurub.php");
  206.  
  207.                     ?>
  208. <div id="content">
  209.             <h2><?php echo _t('recap','title';
  210.                     ?></h2>
  211.             <dl class="dl3">
  212.                 <dt><?php echo _t('sdi','p_name';
  213.                     ?> : </dt>
  214.                 <dd><?php echo $display_p_name ;
  215.                     ?><br /></dd>
  216.                 <dt><?php echo _t('sdi','p_service';
  217.                     ?> : </dt>
  218.                 <dd><?php echo $display_p_service ;
  219.                     ?><br /></dd>
  220.                 <dt><?php echo _t('sdi','p_description';
  221.                     ?> : </dt>
  222.                 <dd><?php echo $display_p_description ;
  223.                     ?><br /></dd>
  224.                 <dt><?php echo _t('sdi','p_incharge';
  225.                     ?> : </dt>
  226.                 <dd><?php echo $display_p_incharge ;
  227.                     ?><br /></dd>
  228.                 <dt><?php echo _t('sdi','p_address';
  229.                     ?> : </dt>
  230.                 <dd><?php echo $display_p_address ;
  231.                     ?><br /></dd>
  232.                 <dt><?php echo _t('sdi','p_phone';
  233.                     ?> : </dt>
  234.                 <dd><?php echo $display_p_phone ;
  235.                     ?><br /></dd>
  236.                 <dt><?php echo _t('sdi','p_fax';
  237.                     ?> : </dt>
  238.                 <dd><?php echo $display_p_fax ;
  239.                     ?><br /></dd>
  240.                 <dt><?php echo _t('sdi','p_email';
  241.                     ?> : </dt>
  242.                 <dd><?php echo $display_p_email ;
  243.                     ?><br /></dd>
  244.             </dl>
  245.             <form id="addsdi5" action="<?php echo $_SERVER['SCRIPT_NAME'];
  246.                     ?>" method="post">
  247.                 <div>
  248.                 <input name="rub" type="hidden" value="<?php echo $rub;
  249.                     ?>" id="rub" />
  250.                 <input name="todo" type="hidden" value="<?php echo $todo;
  251.                     ?>" id="todo" />
  252.                     <input name="id" type="hidden" value="<?php echo $id;
  253.             ?>" id="id" />
  254.             <br />
  255.                 <? echo cancel_button($rub_link."&amp;todo=det&amp;id=".$id)?>
  256.                 
  257.                 <input name="data_table" type="hidden" value="<?php echo $table;
  258.                     ?>" id="data_table" />
  259.                 <input name="retour" type="button" value="<?php echo _t('btn','preview'?>" class="button" id="retour" onclick="history.go(-1);" />
  260.                 <input name="enregistrer" type="submit" value="<?php echo _t('btn','save'?>" class="button" id="valider" />
  261.                 </div>
  262.             </form>
  263.         </div>
  264.     <?php include_once($dir "/help.php");
  265.                     ?>
  266. </div>
  267. <?php
  268.                 
  269.             
  270. ?>

Documentation generated on Fri, 16 Oct 2009 09:37:25 +0200 by phpDocumentor 1.4.1