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. if(isset($_POST['id']))    $id=$_POST['id'];
  20. if(isset($_GET['id']))    $id=$_GET['id'];
  21.  
  22. //////////// Check Droits utilisateur ////////////
  23. if (!HaveRight('workshop')) ReloadIndex('admin');
  24. if(!AuthUser4Workshop($id$sql_object&& !IsSuperAdmin()) ReloadIndex('admin');
  25. ////////////
  26.  
  27.  
  28. $result=$sql_object->DBSelect($req_det);
  29. if(count($result)>1exit();
  30.  
  31. $workrep_title=formatText($result[0]['workrep_title']'2HTML');
  32. $workrep_workshop_name=formatText($result[0]['workshop_denomination']'2HTML');
  33. $workshop_title=' ('.$workrep_workshop_name.')';
  34. $work_id=$result[0]['workrep_workshop_id'];
  35.  
  36.  
  37. if(isset($_POST['valider'])) {
  38.     $workshop_report_object new workshop_report;
  39.     $link_confirm="confirm.php?rub=".$rub."&todo=".$todo."&id=".$work_id;
  40.     $result=$workshop_report_object->DeleteWorkshopReport($id$sql_object);
  41.     if($resultheader("Location: ".$link_confirm);
  42.     else  system_error();
  43. }
  44.  
  45.  
  46. $rub_link="index.php?rub=workshop";
  47. ?>
  48. <div id="chemin">
  49.     <ul>
  50.         <li>
  51.             <a href="index.php" class="chemin_home"><? echo _t('way','home')?></a>
  52.         </li>
  53.         <li>
  54.                <a href="<?php echo $rub_link?>" id="chemin_<? echo $rub?>" class="chemin_rub"><? echo _t('menu','workshop')?></a>
  55.         </li>
  56.         <li>
  57.             <span><? echo formatnavTitle(_t('workshoprep','sup')." : "$workrep_title.$workshop_title)?></span>
  58.         </li>
  59.     </ul>
  60. </div>
  61. <!--end barre haute -->
  62. <?php
  63. include_once(THEME_ADMIN_PATH."quickicons.php");
  64. ?>
  65. <div class="contentcontainer">
  66. <?php
  67. include_once($dir."/menurub.php");
  68. ?>
  69. <div id="content">
  70. <? echo "<h2>".formatTitleh2($workrep_title.$workshop_title)."</h2>"?>
  71. <form id="supworkshoprep" action="<?php echo $_SERVER['SCRIPT_NAME']?>" method="post">
  72. <p class="info"><?php echo _t('divers','sup_confirm')?></p>
  73. <div>
  74. <input name="id" type="hidden" value="<?php echo $id?>" />
  75. <input name="rub" type="hidden" value="<?php echo $rub?>" id="rub" />
  76. <input name="todo" type="hidden" value="<?php echo $todo?>" id="todo" />
  77. <?php echo cancel_button('javascript:history.go(-1);')?>
  78. <input name="valider" type="submit" value="<? echo _t('btn','valid'?>" class="button" id="valider" />
  79. </div>
  80. </form>
  81. </div>
  82. <?php include_once($dir."/help.php")?>
  83. </div>

Documentation generated on Fri, 16 Oct 2009 09:39:19 +0200 by phpDocumentor 1.4.1