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

Source for file sup_u.php

Documentation is available at sup_u.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. if(isset($_POST['u_id']))    $u_id=$_POST['u_id'];
  14. if(isset($_GET['u_id']))    $u_id=$_GET['u_id'];
  15.  
  16. //////////// Check Inclusion de pages ////////////
  17. if (!function_exists('AuthenthificationProcess')){
  18.   include_once("../lib/lib_common.php");
  19.   ReloadIndex('admin');
  20. }
  21. ////////////
  22.  
  23. //////////// Check Droits utilisateur ////////////
  24. if (isWorkgroupOrganiser(GetSessionElement('id')$sql_object$id)<>true && !IsSuperAdmin())
  25. ReloadIndex('admin');
  26. ////////////
  27. if (isWorkgroupOrganiser($u_id$sql_object$id)==true && !IsSuperAdmin())
  28. ReloadIndex('admin');
  29. ///////////
  30.  
  31. $link_det=$rub_link."&amp;todo=det&amp;id=".$id;
  32. $link_cancel=$rub_link."&amp;todo=det&amp;id=".$id;
  33.  
  34. if(isset($_POST['valider'])) {
  35.   $workshop_object new workshop;
  36.   $link_confirm="confirm.php?rub=".$rub."&todo=".$todo."&id=".$id;
  37.   $result=$workshop_object->DeleteUserWorkshop($u_id$id$sql_object);
  38.   if($resultheader("Location: ".$link_confirm);
  39.   else  system_error();
  40. }
  41.  
  42. $result=$sql_object->DBSelect($req_det);
  43. $req_det_u=SQL_getoneUser($u_id);
  44. $result_user=$sql_object->DBSelect($req_det_u);
  45. if(count($result_user)>1exit();
  46. $workshop_denomination=FormatText($result[0]['workshop_denomination']);
  47. $user_login=FormatText($result_user[0]['user_login']);
  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 _t('workshop','del_user')." : "$user_login?></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 afflinkbar($todo,$id$lang)?> <?php echo "<h2>".$user_login." ("._t('workshop','name')." : ".$workshop_denomination.") </h2>"?>
  67. <form id="supworkshop" action="<?php echo $_SERVER['SCRIPT_NAME']?>"
  68.     method="post">
  69. <div class="info" id="truetransfert1"><?php echo _t('workshop','del_user_warning')?>
  70. </div>
  71. <div><input name="id" type="hidden" value="<?php echo $id?>" /> <input
  72.     name="u_id" type="hidden" value="<?php echo $u_id?>" /> <input
  73.     name="rub" type="hidden" value="<?php echo $rub?>" id="rub" /> <input
  74.     name="todo" type="hidden" value="<?php echo $todo?>" id="todo" /> <?php echo cancel_button($link_cancel)?>
  75. <input name="valider" type="submit"
  76.     value="<?php echo _t('btn','valid'?>" class="button" id="valider" />
  77. </div>
  78. </form>
  79. </div>
  80. <?php include_once($dir."/help.php")?></div>

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