Просмотр файла vavok-1.5.3/adminpanel/adminlist.php

Размер файла: 1.98Kb
  1. <?php
  2. // (c) vavok.net
  3. require_once"../include/startup.php";
  4.  
  5. if (!$users->is_reg() || !$users->check_permissions(basename(__FILE__))) {
  6. header ("Location: ../pages/input.php?action=exit");
  7. exit;
  8. }
  9.  
  10. if (!empty($_GET['action'])) {
  11. $action = check($_GET["action"]);
  12. } else {
  13. $action = '';
  14. }
  15. if (!empty($_GET['page'])) {
  16. $page = check($_GET["page"]);
  17. } else {
  18. $page = '';
  19. }
  20. if (!empty($_GET['view'])) {
  21. $view = check($_GET["view"]);
  22. } else {
  23. $view = '';
  24. }
  25.  
  26. $my_title = $lang_admin['modlist'];
  27.  
  28. require_once BASEDIR . "themes/" . MY_THEME . "/index.php";
  29.  
  30.  
  31. if (empty($action)) {
  32.  
  33. echo '<img src="../images/img/user.gif" alt=""> <b>' . $lang_admin['adminlistl'] . '</b><br><br>';
  34.  
  35. $num_items = $db->count_row('vavok_users', "perm='101' OR perm='102' OR perm='103' OR perm='105'");
  36. $items_per_page = 10;
  37.  
  38. $navigation = new Navigation($items_per_page, $num_items, $page, 'adminlist.php?'); // start navigation
  39.  
  40. $limit_start = $navigation->start()['start']; // starting point
  41. $end = $navigation->start()['end']; // ending point
  42.  
  43. if ($num_items > 0) {
  44. foreach ($db->query("SELECT id, name, perm FROM vavok_users WHERE perm='101' OR perm='102' OR perm='103' OR perm='105' OR perm='106' ORDER BY perm LIMIT $limit_start, $items_per_page") as $item) {
  45. if ($item['perm'] == '101' or $item['perm'] == '102' or $item['perm'] == '103' or $item['perm'] == '105' or $item['perm'] == '106') {
  46. $lnk = "<div class=\"a\"><a href=\"../pages/user.php?uz=" . $item['id'] . "\" class=\"sitelink\">" . $item['name'] . "</a> - " . user_status($item['perm']) . "</div>";
  47. echo $lnk . "<br>";
  48. }
  49. }
  50. }
  51.  
  52. echo $navigation->get_navigation();
  53.  
  54. }
  55. echo '<p><a href="index.php" class="btn btn-outline-primary sitelink">' . $lang_home['admpanel'] . '</a><br>';
  56. echo '<a href="../" class="btn btn-primary homepage">' . $lang_home['home'] . '</a></p>';
  57.  
  58. require_once BASEDIR . "themes/" . MY_THEME . "/foot.php";
  59.  
  60. ?>