Advertisement
DarkEvolution

Untitled

May 31st, 2015
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. // dashboard.php
  2.  
  3. <?php
  4. if($adminrang>=5)
  5. {
  6. $adminPath = "../pages/admin/";
  7.  
  8. if(isset($_GET['a']) && !empty($_GET['a']))
  9. {
  10. if(file_exists($adminPath.$_GET['a'].".php"))
  11. {
  12. include($adminPath.$_GET['a'].".php");
  13. }
  14. else {
  15. include($adminPath."index.php");
  16. }
  17. } else
  18. {
  19. include($adminPath."index.php");
  20. }
  21. }
  22. else
  23. {
  24. echo'<center><h2><p class="meldung">Sie sind nicht f�r diesen Bereich berechtigt.</p></h2></center>';
  25. }
  26.  
  27. //index.php
  28.  
  29. $query2 = $db->query('SELECT id FROM user WHERE username="'.$_SESSION["username"].'"');
  30. while($userinfos = mysqli_fetch_array($query2))
  31. {
  32. $adminrang = $userinfos["admin"];
  33. $mail = $userinfos["mail"];
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement