File size: 3.46Kb
<?php
#-----------------------------------------------------#
# ********* WAP-MOTORS ********* #
# Made by : VANTUZ #
# E-mail : [email protected] #
# Site : http://pizdec.ru #
# WAP-Site : http://visavi.net #
# ICQ : 36-44-66 #
# Вы не имеете право вносить изменения в код скрипта #
#-----------------------------------------------------#
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/maincore.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";
$text = @file("../local/profil/$log.prof");
if ($text!=""){
$udata = explode(":||:",$text[0]);
$provlog=trim($udata[0]);
$provpar=trim($udata[1]);
$privat=trim($udata[10]);}
$date=date("d.m");
if (!$_SESSION['log']=="" && !md5($_SESSION['par'])=="" && md5($_SESSION['par'])==$provpar && $_SESSION['log']==$provlog ) {
if($udata[10]>0){
echo'<img src="../images/img/mail.gif" alt=""> <b><a href="../pages/privat.php?'.SID.'"><font color="red">Приватное сообщение! ('.$privat.')</font></a></b><br>';}}
echo '<img src="../images/img/menu.gif" alt=""> Топ популярных тем<br><br>';
if(!isset($action)){
$dir = opendir ("../local/dataforum");
while ($file = readdir ($dir))
{if (ereg (".dat$", $file) && !ereg("^top", $file)&& !ereg("^main", $file))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);
$a=str_replace(".dat","",$a);
for ($i = 0; $i < $total; $i++){
$tex = file("../local/dataforum/$a[$i].dat");
$summa=count($tex);
$dat_total[]=$summa;
$dat_count[]=$a[$i];
}
arsort($dat_total);
foreach($dat_total as $k=>$v)
{
$tex = file("../local/dataforum/$dat_count[$k].dat");
$fs=count($tex)-1;
$data = explode("|",$tex[$fs]);
if ($data[5]==$date) {$data[5]='Сегодня';}
if(!$dat_count[$k]==""){$vk++;
$dat_ball2[]='<div class=b><b><img src="../images/img/files.gif" alt=""> '.$vk.'.
<a href="index.php?fid='.$data[8].'&id='.$dat_count[$k].'&'.SID.'">'.$data[3].'</a></b></div>
Всего сообщений: '.$v.'<br>
Посл. сообщение: <b>'.$data[0].'</b> ('.$data[5].'/'.$data[6].')<br>
';} }
$total=count($dat_ball2);
if($total>20){$total="50";}
if ($start=="") {$start = 0;}
if ($total < $start + $config_forumtem){ $end = $total; }
else {$end = $start + $config_forumtem; }
for ($i = $start; $i < $end; $i++){
echo $dat_ball2[$i];
}
echo'<hr>';
if ($start != 0) {echo '<a href="top.php?start='.($start - $config_forumtem).'&'.SID.'"><-Назад</a> ';}else{echo'<-Назад';}
echo ' | ';
if ($total > $start + $config_forumtem) {echo ' <a href="top.php?start='.($start + $config_forumtem).'&'.SID.'">Далее-></a>';}else{echo'Далее->';}
}
echo '<br><br><img src="../images/img/back.gif" alt=""> <a href="index.php?'.SID.'">В форум</a><br>';
echo '<img src="../images/img/homepage.gif" alt=""> <a href="../index.php?'.SID.'">На главную</a>';
include_once"../themes/$config_themes/foot.php";
?>