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

Размер файла: 2.06Kb
  1. <?php
  2. // (c) vavok.net
  3. require_once"../include/startup.php";
  4.  
  5. if (!empty($_GET['action'])) {
  6. $action = check($_GET["action"]);
  7. } else {
  8. $action = '';
  9. }
  10. if (!empty($_GET['page'])) {
  11. $page = check($_GET["page"]);
  12. } else {
  13. $page = '';
  14. }
  15. if (!empty($_GET['view'])) {
  16. $view = check($_GET["view"]);
  17. } else {
  18. $view = '';
  19. }
  20.  
  21. if (!isset($config_banlist)) {
  22. $config_banlist = 10;
  23. }
  24.  
  25. if (!$users->is_reg() || (!$users->is_administrator() && !$users->is_moderator(103))) {
  26. redirect_to("../index.php?error");
  27. }
  28.  
  29. $my_title = $lang_admin['banlist'];
  30. require_once BASEDIR . "themes/" . MY_THEME . "/index.php";
  31.  
  32. echo '<img src="../images/img/partners.gif" alt=""> <b>' . $lang_admin['banlist'] . '</b><br><br>';
  33.  
  34. $noi = $db->count_row('vavok_users', "banned='1' OR banned='2'");
  35. $items_per_page = 10;
  36.  
  37. $navigation = new Navigation($items_per_page, $noi, $page, 'banlist.php?'); // start navigation
  38.  
  39. $limit_start = $navigation->start()['start']; // starting point
  40.  
  41. $sql = "SELECT id, name, banned FROM vavok_users WHERE banned='1' OR banned='2' ORDER BY banned LIMIT $limit_start, $items_per_page";
  42.  
  43. if ($noi > 0) {
  44. foreach ($db->query($sql) as $item) {
  45. if ($item['banned'] == '1') {
  46. $banned_profil = $db->get_data('vavok_profil', "id='" . $item['id'] . "'", 'bantime, bandesc');
  47.  
  48. $lnk = "<div class=\"a\"><a href=\"../pages/user.php?uz=" . $item['name'] . "\" class=\"sitelink\">" . $item['name'] . "</a> <small>" . $lang_admin['banduration'] . ": " . date_fixed($banned_profil['bantime'], "d.m.y.") . " | " . $lang_admin['bandesc'] . ": " . $banned_profil['bandesc'] . "</small></div>";
  49. echo $lnk . "<br>";
  50. }
  51. }
  52. } else {
  53. echo '<img src="../images/img/reload.gif" alt="" /> ' . $lang_admin['noentry'] . '!<br><br>';
  54. }
  55.  
  56. echo $navigation->get_navigation();
  57.  
  58. echo '<p><a href="index.php" class="btn btn-outline-primary sitelink">' . $lang_home['admpanel'] . '</a><br>';
  59. echo '<a href="../" class="btn btn-primary homepage">' . $lang_home['home'] . '</a></p>';
  60.  
  61. require_once BASEDIR . "themes/" . MY_THEME . "/foot.php";
  62.  
  63. ?>