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

Source for file sup_com.php

Documentation is available at sup_com.php

  1. <?php
  2. /**
  3.  * @package linea21.modules
  4.  * @subpackage workshop
  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. if(isset($_POST['id']))    $id=$_POST['id'];
  12. if(isset($_GET['id']))    $id=$_GET['id'];
  13.  
  14. if(isset($_POST['com_id']))    $com_id=$_POST['com_id'];
  15. if(isset($_GET['com_id']))    $com_id=$_GET['com_id'];
  16.  
  17. if(isset($_POST['mes_id']))    $mes_id=$_POST['mes_id'];
  18. if(isset($_GET['mes_id']))    $mes_id=$_GET['mes_id'];
  19.  
  20. //////////// Check Inclusion de pages ////////////
  21. if (!function_exists('AuthenthificationProcess')){
  22.   include_once("../lib/lib_common.php");
  23.   ReloadIndex('admin');
  24. }
  25. ////////////
  26.  
  27. //////////// Check Droits utilisateur ////////////
  28. if (isWorkgroupOrganiser(GetSessionElement('id')$sql_object$id)<>true && !IsSuperAdmin())
  29. ReloadIndex('admin');
  30. ////////////
  31.  
  32.  
  33. $link_det=$rub_link."&amp;todo=det&amp;id=";
  34. $link_add_com=$rub_link."&amp;todo=add_com&amp;id=".$id."&amp;com_id=";
  35. $link_list_com=$rub_link."&todo=list_com&id=".$id."";
  36.  
  37. if($com_id <> 0$link_cancel=$rub_link."&amp;todo=det_com&amp;id=".$id."&amp;com_id=".$com_id;
  38. else $link_cancel=$rub_link."&amp;todo=list_com&amp;id=".$id;
  39.  
  40. if(isset($_POST['annuler'])) {
  41.   header("Location: ".$link_list_com);
  42. }
  43.  
  44. $workshop_com_objectnew workshop_com;
  45.  
  46. $req_com_mes SQL_getOnetopicWorkcom($id$mes_id$mes_id);
  47. $result_com_mes $sql_object -> DBSelect($req_com_mes);
  48. $com_root_subject=formatText($result_com_mes[0]['workcom_subject']'2HTML');
  49.  
  50. if(isset($_POST['valider'])) {
  51.  
  52.   $result=$workshop_com_object->DeleteCom($id$mes_id$com_id$sql_object);
  53.   $link_confirm="confirm.php?rub=".$rub."&todo=".$todo."&id=".$id."&com_id=".$com_id;
  54.   if($com_id == $mes_id$link_confirm.="&all=true";
  55.   if($resultheader("Location: ".$link_confirm);
  56.   else  system_error();
  57. }
  58.  
  59. $result=$sql_object->DBSelect($req_det);
  60.  
  61. if(count($result)>1exit();
  62. $workshop_denomination=FormatText($result[0]['workshop_denomination']'2HTML');
  63.  
  64. if ($com_id==0{
  65.   $navtitle=_t('workshop','add_com')." : ".$workshop_denomination;
  66.   $titleh2=_t('workshop','name')." : ".$workshop_denomination;
  67. }
  68. else {
  69.   $navtitle=_t('workshop','add_com_mes')." : ".$com_root_subject." (".$workshop_denomination.")";
  70.   $titleh2=_t('workshop','com_name')." : ".$com_root_subject." ("._t('workshop','name')." :".$workshop_denomination.")";
  71. }
  72. ?>
  73. <div id="chemin">
  74. <ul>
  75.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home'?></a>
  76.     </li>
  77.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>"
  78.         class="chemin_rub"><?php echo _t('menu','workshop')?></a></li>
  79.     <li><span><?php 
  80.     if ($com_id==0echo _t('workshop','sup_com')." : "$com_root_subject;
  81.     else  echo _t('workshop','sup_com_mes')." : "$com_root_subject?></span>
  82.     </li>
  83. </ul>
  84. </div>
  85. <!--end barre haute -->
  86.     <?php
  87.     include_once(THEME_ADMIN_PATH."quickicons.php");
  88.     ?>
  89. <div class="contentcontainer"><?php
  90. include_once($dir."/menurub.php");
  91. ?>
  92. <div id="content"><?php afflinkbar($todo,$id$lang)?> <?php 
  93. if ($com_id==0{
  94.  
  95.   echo "<h2>".$com_root_subject." ("._t('workshop','name')." : ".$workshop_denomination.")</h2>"?>
  96. <form id="supcom" action="<?php echo $_SERVER['SCRIPT_NAME']?>"
  97.     method="post">
  98. <div class="info" id="truetransfert1"><?php echo _t('workshop','sup_com_warning')
  99. ?></div>
  100. <div class="info" id="truetransfert2"><?
  101. echo _t('workshop','sup_com_warning2');
  102. }
  103. else {
  104.   echo "<h2>".$com_root_subject." ("._t('workshop','name')." : ".$workshop_denomination.")</h2>"?>
  105. <form id="supcom" action="<?php echo $_SERVER['SCRIPT_NAME']?>"
  106.     method="post">
  107. <div class="info" id="truetransfert1"><?php echo _t('workshop','sup_com_mes_warning')
  108. ?></div>
  109. <div><input name="id" type="hidden" value="<?php echo $id?>" /> <input
  110.     name="mes_id" type="hidden" value="<?php echo $mes_id?>" /> <input
  111.     name="com_id" type="hidden" value="<?php echo $com_id?>" /> <input
  112.     name="rub" type="hidden" value="<?php echo $rub?>" id="rub" /> <input
  113.     name="todo" type="hidden" value="<?php echo $todo?>" id="todo" /> <?php echo cancel_button($link_cancel)?>
  114. <input name="valider" type="submit"
  115.     value="<?php echo _t('btn','valid'?>" class="button" id="valider" />
  116. </div>
  117. </form>
  118. </div>
  119. <?php include_once($dir."/help.php")?>
  120.  
  121. </div>

Documentation generated on Thu, 03 May 2012 15:07:42 +0200 by phpDocumentor 1.4.1