File size: 3.84Kb
<?php
// mod by Golem http://veplog.ru
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/antidos.php";
require_once"../template/cookies.php";
require_once"../template/gzip.php";
require_once"../template/header.php";
require_once"../template/referer.php";
include_once"../themes/$config_themes/index.php";
include_once"../template/isset.php";
if ($provlog==$_SESSION['log'] && $provpar==md5($_SESSION['par']) && $_SESSION['log']!="" && md5($_SESSION['par'])!="") {
if ($dostup==101 || $dostup==102 || $dostup==103){
//---------------------- ------------------------------//
if(!isset($action)){
echo '<div class="tp">Список забаненых</div><div class="body">';
foreach (glob(BASEDIR."local/profil/*.prof") as $filename) {
$array_allusers[] = basename($filename);
}
foreach($array_allusers as $value){
$tex = file_get_contents("../local/profil/$value");
$data = explode(":||:",$tex);
if($data[37]>=1 && $data[38]>$sitetime){
$dat_user[]=$data[0];
$dat_time[]=formattime(round($data[38]-$sitetime));
$dat_pri[]=$data[39];
$dat_banned[]=$data[52];
if(ctype_digit($data[52])){$dat_date[]=date("j.m.y/H:i",check($data[52]));}
$dat_who[]=$data[63];
}}
arsort($dat_banned);
foreach($dat_banned as $k=>$v){$gg++;
$in_ban[]='|'.$gg.'|'.$dat_user[$k].'|'.$dat_time[$k].'|'.$dat_who[$k].'|'.$dat_date[$k].'|'.$dat_pri[$k].'|';
}
}
$total = count($in_ban);
$start = (int)$_GET['start'];
if($start < 0 || $start > $total){$start = 0;}
if ($total < $start + $config_banlist){ $end = $total; }
else {$end = $start + $config_banlist; }
for ($i = $start; $i < $end; $i++){
$bandata = explode("|",$in_ban[$i]);
if($bandata[5]==""){$bandata[5]='Отсутствует';}
echo '<div class="r0"> '.$bandata[1].'. <b><a href="../pages/anketa.php?uz='.$bandata[2].'&'.SID.'"> '.$bandata[2].'</a></b> ';
echo '(Дата: '.$bandata[5].')<br>';
echo '(Осталось '.$bandata[3].')<br>';
echo 'Забанил: <b>'.$bandata[4].'</b> (Причина:'.$bandata[6].')<br>';
echo '<img src="../images/img/edit.gif" alt=""> [<a href="zaban.php?action=edit&users='.$bandata[2].'&'.SID.'">Разбанить</a>]';
if ($dostup==101 || $dostup==102){
echo ' [<a href="users.php?action=edit&users='.$bandata[2].'&'.SID.'">Профиль</a>]';
}
echo '<hr>';
}
if ($start != 0) {echo '<a href="banlist.php?start='.($start - $config_banlist).'&'.SID.'"><пред. </a> ';}else{echo'<пред. ';}
echo'|';
if ($total > $start + $config_banlist) {echo ' <a href="banlist.php?start='.($start + $config_banlist).'&'.SID.'"> след.></a>';}else{echo' след.>';}
if($total>0){
$ba=ceil($total/$config_userlist);
$ba2=$ba*$config_banlist-$config_banlist;
echo '<br>Стр.:';
$asd=$start-($config_banlist*4);
$asd2=$start+($config_banlist*5);
if($asd<$total && $asd>0){echo ' <a href="banlist.php?start=0&'.SID.'">1</a> ... ';}
for($i=$asd; $i<$asd2;)
{
if($i<$total && $i>=0){
$ii=floor(1+$i/$config_banlist);
if ($start==$i) {
echo ' <b>('.$ii.')</b>';
}
else {
echo ' <a href="banlist.php?start='.$i.'&'.SID.'">'.$ii.'</a>';
}}
$i=$i+$config_banlist;}
if($asd2<$total){echo ' ... <a href="banlist.php?start='.$ba2.'&'.SID.'">'.$ba.'</a>';}
}
echo '</div><div class="panel">Всего юзеров в бане: '.(int)$total.'</div>';
echo'<div class="btm">[<a href="index.php?'.SID.'">В админку</a>]<br>';
echo'[<a href="../index.php?'.SID.'">На главную</a>]</div>';
} else {header ("Location: ../index.php?isset=404&".SID);}
} else {header ("Location: ../index.php?isset=404&".SID);}
include_once"../themes/$config_themes/foot.php";
?>