Advertisement
DarkEvolution

Dashboard

Jun 6th, 2015
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.71 KB | None | 0 0
  1. <?php
  2. $result = $db->query('SELECT * FROM user WHERE username="'.$_SESSION["username"].'"');
  3. while($userinfos = $result->fetch_array(MYSQLI_ASSOC))
  4. {
  5.     $adminrang = $userinfos["admin"];
  6. }
  7.  if($_SESSION['adminrang'] > 2)
  8.   {
  9.     $adminPath = System_Dir."pages/admin/";
  10.    
  11.     if(isset($_GET['a']) && !empty($_GET['a']))
  12.     {
  13.       if(file_exists($adminPath.$_GET['a'].".php"))
  14.       {
  15.         include($adminPath.$_GET['a'].".php");
  16.       }
  17.       else {
  18.         include($adminPath."index.php");
  19.       }
  20.     } else
  21.     {
  22.       include($adminPath."index.php");
  23.     }
  24.   }
  25.   else
  26.   {
  27.     echo'<center><h2><p class="meldung">Sie sind nicht fΓΌr diesen Bereich berechtigt.</p></h2></center>';
  28.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement