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

Source for file lock_com.php

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

Documentation generated on Thu, 03 May 2012 15:06:04 +0200 by phpDocumentor 1.4.1