File size: 1.32Kb
<?php
// MyForum - Сервис форумов
// Copyright © A'lex и KO. All Rights Reserved
// По всем вопросам обращайтесь на email [email protected] или в асю 376920428
include 'config.php';
include 'functions.php';
if(!$moder) {exit;}
$r = mysql_query("SELECT * FROM {$table}{$f}_bannick");
for($i=0; $i<mysql_numrows($r); $i++) {
$a=mysql_fetch_array($r);
if (!lastdate($a['Date'], $date)) {mysql_query("DELETE FROM {$table}{$f}_bannick WHERE Nick='{$a['Nick']}'");}
}
$r = mysql_query("SELECT * FROM {$table}{$f}_banip");
for($i=0; $i<mysql_numrows($r); $i++) {
$a=mysql_fetch_array($r);
if (!lastdate($a['Date'], $date)) {mysql_query("DELETE FROM {$table}{$f}_banip WHERE IP='{$a['IP']}' AND UserAgent='{$a['UserAgent']}'");}
}
if($mode=='del') {
if (mysql_query("DELETE FROM {$table}{$f}_banip WHERE IP='$ip' AND UserAgent='$useragent'")) {$body='Удалено!<br/>';}
}
$r = mysql_query("SELECT * FROM {$table}{$f}_banip");
for($i=0; $i<mysql_numrows($r); $i++) {
$a=mysql_fetch_array($r);
$ip=$a['Nick'];
$useragent=$a['Nick'];
$body.="$bnick<a href=\"banip.php?mode=del&ip=$ip&useragent=$useragent&f=$f$isid\">x</a><br/>\n";
}
displaytext('Бан по IP', $Banner, $body, "<a href=\"index.php?f=$f$isid\">Назад</a>", $w);
mysql_close($lnk);
?>