Просмотр файла forum/mbanlist.php

Размер файла: 3.88Kb
<?php
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"setforum.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 || $dostup==105){


//-----------------------------------------------//
if(!isset($action)){
	
	
echo '<img src="../images/img/partners.gif" alt=""> <b>Список забаненых</b><br><br>';

foreach (glob(BASEDIR."local/dataforumset/dataforumuser/*.dat") as $filename) {
$array_allusers[] = basename($filename);}

foreach($array_allusers as $value){
$tex = file_get_contents("../local/dataforumset/dataforumuser/$value");
$data = explode(":||:",$tex);
if($data[42]>=1 && $data[43]>$sitetime){
$dat_user[]=$data[48];
$dat_time[]=formattime(round($data[43]-$sitetime));
$dat_pri[]=$data[44];
$dat_banned[]=$data[45];
if(ctype_digit($data[45])){$dat_date[]=date("j.m.y/H:i",check($data[45]));}
$dat_who[]=$data[46];}}
	
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 '<img src="../images/img/chel.gif" alt=""> '.$bandata[1].'. <b><a href="../pages/anketa.php?uz='.$bandata[2].'&amp;'.SID.'"> '.$bandata[2].'</a></b> ';
echo '<br>Дата: '.$bandata[5].'';
echo '<br>Осталось: '.$bandata[3].'';
echo '<br>Забанил: <b>'.nickname($bandata[4]).'</b>';
echo'<br>Причина: '.$bandata[6].'<br>';
echo '<img src="../images/img/edit.gif" alt=""> [<a href="mzaban.php?action=edit&amp;users='.$bandata[2].'&amp;'.SID.'">Разбанить</a>]';
echo '<hr>';
}

if ($start != 0) {echo '<a href="mbanlist.php?start='.($start - $config_banlist).'&amp;'.SID.'">&lt;-Назад </a> ';}else{echo'&lt;-Назад ';}
echo'|'; 
if ($total > $start + $config_banlist) {echo ' <a href="mbanlist.php?start='.($start + $config_banlist).'&amp;'.SID.'"> Далее-&gt;</a>';}else{echo' Далее-&gt;';} 


if($total>0){

$ba=ceil($total/$config_userlist);
$ba2=$ba*$config_banlist-$config_banlist;

echo '<br><hr>Страницы:';
$asd=$start-($config_banlist*4);
$asd2=$start+($config_banlist*5);

if($asd<$total && $asd>0){echo ' <a href="mbanlist.php?start=0&amp;'.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="mbanlist.php?start='.$i.'&amp;'.SID.'">'.$ii.'</a>';
                     }}


$i=$i+$config_banlist;}
if($asd2<$total){echo ' ... <a href="mbanlist.php?start='.$ba2.'&amp;'.SID.'">'.$ba.'</a>';}
}


echo '<br><br>Всего юзеров в бане: '.(int)$total.'<br>';



echo'<br><img src="../images/imgfor/barrow.gif" alt=""> <a href="index.php?'.SID.'">Форум</a><br>';
echo'<img src="../images/img/homepage.gif" alt=""> <a href="../index.php?'.SID.'">На главную</a><br>';

} else {header ("Location: index.php?isset=404&".SID);}
} else {header ("Location: index.php?isset=404&".SID);}

include_once"../themes/$config_themes/foot.php";
?>