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

Source for file sup_cal.php

Documentation is available at sup_cal.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. //////////// Check Inclusion de pages ////////////
  15. if (!function_exists('AuthenthificationProcess')){
  16.   include_once("../lib/lib_common.php");
  17.   ReloadIndex('admin');
  18. }
  19. ////////////
  20.  
  21. //////////// Check Droits utilisateur ////////////
  22. if (isWorkgroupOrganiser(GetSessionElement('id')$sql_object$id)<>true && !IsSuperAdmin())
  23. ReloadIndex('admin');
  24. ////////////
  25.  
  26. if(isset($_POST['task_id']))    $task_id=$_POST['task_id'];
  27. if(isset($_GET['task_id']))    $task_id=$_GET['task_id'];
  28.  
  29.  
  30. $link_add_cal $rub_link "&amp;todo=add_cal&amp;id=";
  31. $link_det $rub_link "&amp;todo=det&amp;id=";
  32. $link_cancel=$rub_link."&amp;todo=list_cal&amp;id=".$id;
  33.  
  34. $calendar_object new calendar;
  35. $req_task=SQL_getOneTask($task_id);
  36. $result_task $sql_object -> DBSelect($req_task);
  37. $display_title_task=formatText($result_task[0]['workcal_task']'2HTML');
  38.  
  39. if(isset($_POST['valider'])) {
  40.  
  41.   $link_confirm="confirm.php?rub=".$rub."&todo=".$todo."&id=".$id;
  42.   $result=$calendar_object->DeleteTask($task_id$sql_object);
  43.   if($resultheader("Location: ".$link_confirm);
  44.   else  system_error();
  45. }
  46.  
  47. $result=$sql_object->DBSelect($req_det);
  48. if(count($result)>1exit();
  49. $workshop_denomination=FormatText($result[0]['workshop_denomination']'2HTML');
  50.  
  51. $navtitle=_t('workshop','sup_cal')." : "$display_title_task;
  52. $titleh2=$display_title_task." ("._t('workshop','name')." : ".$workshop_denomination.")";
  53. ?>
  54. <div id="chemin">
  55. <ul>
  56.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home'?></a>
  57.     </li>
  58.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>"
  59.         class="chemin_rub"><?php echo _t('menu','workshop')?></a></li>
  60.     <li><span><?php echo formatnavTitle($navtitle)?></span></li>
  61. </ul>
  62. </div>
  63. <!--end barre haute -->
  64. <?php
  65. include_once(THEME_ADMIN_PATH."quickicons.php");
  66. ?>
  67. <div class="contentcontainer"><?php
  68. include_once($dir."/menurub.php");
  69. ?>
  70. <div id="content"><?php afflinkbar($todo,$id$lang)?> <?php echo "<h2>"formatTitleh2($titleh2)."</h2>"?>
  71. <form id="supworkshop" action="<?php echo $_SERVER['SCRIPT_NAME']?>"
  72.     method="post">
  73. <div class="info" id="truetransfert1"><?php echo _t('workshop','sup_cal_warning')?>
  74. </div>
  75. <div><input name="id" type="hidden" value="<?php echo $id?>" /> <input
  76.     name="task_id" type="hidden" value="<?php echo $task_id?>" /> <input
  77.     name="rub" type="hidden" value="<?php echo $rub?>" id="rub" /> <input
  78.     name="todo" type="hidden" value="<?php echo $todo?>" id="todo" /> <?php echo cancel_button($link_cancel)?>
  79. <input name="valider" type="submit"
  80.     value="<?php echo _t('btn','valid'?>" class="button" id="valider" />
  81. </div>
  82. </form>
  83. </div>
  84. <?php include_once($dir."/help.php")?></div>

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