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 project
  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. //////////// Check Inclusion de pages ////////////
  12. if (!function_exists('AuthenthificationProcess')){
  13.   include_once("../lib/lib_common.php");
  14.   ReloadIndex('admin');
  15. }
  16. ////////////
  17.  
  18. //////////// Check Droits utilisateur ////////////
  19. if (!IsSuperAdmin()) ReloadIndex('admin');
  20. ////////////
  21.  
  22. if(isset($_POST['id']))    $id=$_POST['id'];
  23. if(isset($_GET['id']))    $id=$_GET['id'];
  24. $link_det=$rub_link."&amp;todo=det&amp;id=".$id;
  25.  
  26.  
  27. if(isset($_POST['valider'])) {
  28.   $project_object new project;
  29.   $link_confirm="confirm.php?rub=".$rub."&todo=".$todo;
  30.   $result=$project_object->DeleteProject($id$sql_object);
  31.   if($resultheader("Location: ".$link_confirm);
  32.   else  system_error();
  33. }
  34.  
  35. $querySQL_getProjectName($id);
  36. $result=$sql_object->DBSelect($query);
  37. $project_name=FormatText($result[0]['project_name']);
  38. $project_owner=FormatText($result[0]['project_posted_by']);
  39.  
  40. //////////// Check Droits utilisateur ////////////
  41. if (!hasRight('project')) ReloadIndex('admin');
  42. if (GetSessionElement('id')!= $project_owner && !IsSuperAdmin()) ReloadIndex('admin');
  43. ////////////
  44. ?>
  45.  
  46. <div id="chemin">
  47. <ul>
  48.     <li><a href="index.php" class="chemin_home"><?php echo _t('way','home')?></a>
  49.     </li>
  50.     <li><a href="<?php echo $rub_link?>" id="chemin_<?php echo $rub?>"
  51.         class="chemin_rub"><?php echo _t('menu','project')?></a></li>
  52.     <li><span><?php echo formatNavTitle(_t('project','sup')." : "$project_name)?></span>
  53.     </li>
  54. </ul>
  55. </div>
  56. <!--end barre haute -->
  57. <?php
  58. include_once(THEME_ADMIN_PATH."quickicons.php");
  59. ?>
  60. <div class="contentcontainer"><?php
  61. include_once($dir."/menurub.php");
  62. ?>
  63. <div id="content"><?php echo "<h2>"formatTitleh2($project_name)."</h2>"?>
  64. <form id="suptheme" action="<?php echo $_SERVER['SCRIPT_NAME']?>"
  65.     method="post">
  66. <p class="info"><?php echo _t('divers','sup_confirm')?></p>
  67. <div><input name="id" type="hidden" value="<?php echo $id?>" /> <input
  68.     name="rub" type="hidden" value="<?php echo $rub?>" id="rub" /> <input
  69.     name="todo" type="hidden" value="<?php echo $todo?>" id="todo" /> <?php echo cancel_button('javascript:history.go(-1);')?>
  70. <input name="valider" type="submit"
  71.     value="<?php echo _t('btn','valid')?>" class="button" id="valider" />
  72. </div>
  73. </form>
  74. </div>
  75. <?php include_once($dir."/help.php")?></div>

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