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

Source for file sup.php

Documentation is available at sup.php

  1. <?php
  2. /**
  3.  * @package linea21.modules
  4.  * @subpackage workshoprep
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  *  'Workshoprep' (as Workshop Report) module is used by 'Workshop' modules
  10.  */
  11.  
  12. //////////// Check Inclusion de pages ////////////
  13. if (!function_exists('AuthenthificationProcess')) {
  14.   include_once("../lib/lib_common.php");
  15.   ReloadIndex('admin');
  16. }
  17. ////////////
  18.  
  19.  
  20. if(isset($_POST['id']))    $id=$_POST['id'];
  21. if(isset($_GET['id']))    $id=$_GET['id'];
  22.  
  23. //////////// Check Droits utilisateur ////////////
  24. if (!hasRight('workshop')) ReloadIndex('admin');
  25. if(!AuthUser4Workshop($id$sql_object&& !IsSuperAdmin()) ReloadIndex('admin');
  26. ////////////
  27.  
  28.  
  29. $result=$sql_object->DBSelect($req_det);
  30. if(count($result)>1exit();
  31.  
  32. $workrep_title=formatText($result[0]['workrep_title']'2HTML');
  33. $workrep_workshop_name=formatText($result[0]['workshop_denomination']'2HTML');
  34. $workshop_title=' ('.$workrep_workshop_name.')';
  35. $work_id=$result[0]['workrep_workshop_id'];
  36.  
  37.  
  38. if(isset($_POST['valider'])) {
  39.   $workshop_report_object new workshop_report;
  40.   $link_confirm="confirm.php?rub=".$rub."&todo=".$todo."&id=".$work_id;
  41.   $result=$workshop_report_object->DeleteWorkshopReport($id$sql_object);
  42.   if($resultheader("Location: ".$link_confirm);
  43.   else  system_error();
  44. }
  45.  
  46.  
  47. $rub_link="index.php?rub=workshop";
  48. ?>
  49. <div id="chemin">
  50. <ul>
  51.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home')?></a>
  52.     </li>
  53.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>"
  54.         class="chemin_rub"><?php echo _t('menu','workshop')?></a></li>
  55.     <li><span><?php echo formatnavTitle(_t('workshoprep','sup')." : "$workrep_title.$workshop_title)?></span>
  56.     </li>
  57. </ul>
  58. </div>
  59. <!--end barre haute -->
  60. <?php
  61. include_once(THEME_ADMIN_PATH."quickicons.php");
  62. ?>
  63. <div class="contentcontainer"><?php
  64. include_once($dir."/menurub.php");
  65. ?>
  66. <div id="content"><?php echo "<h2>".formatTitleh2($workrep_title.$workshop_title)."</h2>"?>
  67. <form id="supworkshoprep"
  68.     action="<?php echo $_SERVER['SCRIPT_NAME']?>" method="post">
  69. <p class="info"><?php echo _t('divers','sup_confirm')?></p>
  70. <div><input name="id" type="hidden" value="<?php echo $id?>" /> <input
  71.     name="rub" type="hidden" value="<?php echo $rub?>" id="rub" /> <input
  72.     name="todo" type="hidden" value="<?php echo $todo?>" id="todo" /> <?php echo cancel_button('javascript:history.go(-1);')?>
  73. <input name="valider" type="submit"
  74.     value="<?php echo _t('btn','valid'?>" class="button" id="valider" />
  75. </div>
  76. </form>
  77. </div>
  78. <?php include_once($dir."/help.php")?></div>

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