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

Размер файла: 3.09Kb
  1. <?php
  2. // (c) vavok.net
  3. require_once"../include/startup.php";
  4. if (!empty($_GET['action'])) {
  5. $action = check($_GET["action"]);
  6. } else {
  7. $action = '';
  8. }
  9. if (isset($_GET['start'])) {
  10. $start = check($_GET['start']);
  11. }
  12.  
  13. if ($users->is_reg()) {
  14. if ($_SESSION['permissions'] == 101 || $_SESSION['permissions'] == 102) {
  15. $my_title = "IP ban";
  16. require_once BASEDIR . "themes/" . MY_THEME . "/index.php";
  17.  
  18. echo '<img src="../images/img/menu.gif" alt=""> <b>IP ban panel</b><br><br>';
  19.  
  20. if (empty($action)) {
  21. $file = file("../used/ban.dat");
  22. $total = count($file);
  23. if (empty($_GET['start'])) $start = 0;
  24. else $start = $_GET['start'];
  25. if ($total < $start + 10) {
  26. $end = $total;
  27. } else {
  28. $end = $start + 10;
  29. }
  30. for ($i = $start; $i < $end; $i++) {
  31. $file = file("../used/ban.dat");
  32. $file = array_reverse($file);
  33. $data = explode("|", $file[$i]);
  34. $i2 = round($i + 1);
  35.  
  36. $num = $total - $i-1;
  37.  
  38. echo $i2 . '. ' . $data[1] . ' <br><a href="process.php?action=razban&amp;start=' . $start . '&amp;id=' . $num . '" class="btn btn-outline-primary sitelink">' . $lang_admin['delban'] . '</a><hr>';
  39. }
  40.  
  41. if ($total < 1) {
  42. echo'<br><img src="../images/img/reload.gif" alt="" /> ' . $lang_admin['emptylist'] . '<br><br>';
  43. }
  44.  
  45. if ($start != 0) {
  46. echo '<a href="ban.php?start=' . ($start - 10) . '" class="btn btn-outline-primary sitelink">&lt; ' . $lang_home['back'] . '</a> ';
  47. } else {
  48. echo'&lt; ' . $lang_home['back'] . ' ';
  49. }
  50. echo'|';
  51. if ($total > $start + 10) {
  52. echo ' <a href="ban.php?start=' . ($start + 10) . '" class="btn btn-outline-primary sitelink">' . $lang_home['forw'] . ' &gt;</a>';
  53. } else {
  54. echo' ' . $lang_home['forw'] . ' &gt;';
  55. }
  56.  
  57. echo '<hr><form method="post" action="process.php?action=zaban&amp;start=' . $start . '">';
  58. echo '' . $lang_admin['iptoblock'] . ':<br><input name="ips" /><br><br>';
  59. echo '<input value="' . $lang_home['confirm'] . '" type="submit" /></form>';
  60.  
  61. echo '<hr>';
  62. echo '' . $lang_admin['ipbanexam'] . '<br><br>';
  63. echo '<br>' . $lang_admin['allbanips'] . ': ' . $total . '<br><br><br>';
  64. if ($total > 1) {
  65. echo'<br><a href="process.php?action=delallip" class="btn btn-outline-primary sitelink">' . $lang_admin['dellist'] . '</a>';
  66. }
  67. }
  68.  
  69. echo'<br><a href="./" class="btn btn-outline-primary sitelink">' . $lang_home['admpanel'] . '</a><br>';
  70. echo'<a href="../" class="btn btn-primary homepage">' . $lang_home['home'] . '</a><br>';
  71. } else {
  72. header ("Location: ../index.php?error");
  73. exit;
  74. }
  75. } else {
  76. header ("Location: ../index.php?error");
  77. exit;
  78. }
  79.  
  80. require_once BASEDIR . "themes/" . MY_THEME . "/foot.php";
  81.  
  82. ?>