Просмотр файла public_html/str/newlist.php

Размер файла: 4.93Kb
<?php
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";

$col="10";
if(!empty($start2)){$start=round(($start2-1)*$col);}
if (!$_SESSION['log']=="" && !md5($_SESSION['par'])=="" && md5($_SESSION['par'])==$provpar && $_SESSION['log']==$provlog ) {
echo"<center>";
echo'<h3>Новые странички</h3><br>';
echo"</center>";
$f=check($f);
if($f==1 || $f==""){
    $mh=2;
echo'<img src="images/search.gif" alt=""> <a href="newlist.php?f='.$mh.'&amp;'.SID.'">По возрастанию</a>';}
else{
    $mh=1;
echo'<img src="images/search.gif" alt=""> <a href="newlist.php?f='.$mh.'&amp;'.SID.'">По убыванию</a>';}
$dir = opendir ("base");
 while ($file = readdir ($dir))
{if (( $file != ".") && ($file != "..") && ($file != ".htaccess") && ($file != "index.php"))
{$tex = @file("base/$file");
$data = explode(":||:",$tex[0]);

if (($data[2]!="")&&($sitetime-$data[2])<640000){$a[]=$file;}}}
closedir ($dir);
$total = count($a);
if($total==0)
{
    echo'<h3>Новых страничек нет!</h3>';	echo '<br><img src="../images/img/homepage.gif" alt=""> <a href="index.php?'.SID.'">В странички</a>';
	include_once"../themes/$config_themes/foot.php";
	exit;
}


for ($i = 0; $i < $total; $i++){
$tex = @file("rating/$a[$i]");
$data = explode(":||:",$tex[0]);


$dat_log[]=$data[0];
$dat_ball[]=$data[10];
}
if($f==2){
asort($dat_ball);}
else{
arsort($dat_ball);}

foreach($dat_ball as $k=>$v)
{$uz=$dat_log[$k];    $postsall=$dat_ball[$k];

include"../template/statuses.php";
$usersum="0";

$dat_log3[]=$dat_log[$k];
$dat_ball3[]=(int)$dat_ball[$k];
$dat_status3[]=$statuses;
    }

foreach($dat_ball3 as $k2=>$v2)
{

if(@file("music/$dat_log3[$k2].dat")){
$af = @file("music/$dat_log3[$k2].dat");
$ac = count($af);
}else{$ac=0;}

if(@file("clauses/$dat_log3[$k2].dat")){
$af1 = @file("clauses/$dat_log3[$k2].dat");
$ac1 = count($af1);
}else{$ac1=0;}

if(@file("foto/$dat_log3[$k2].dat")){
$af2 = @file("foto/$dat_log3[$k2].dat");
$ac2 = count($af2);
}else{$ac2=0;}

if(@file("video/$dat_log3[$k2].dat")){
$af3 = @file("video/$dat_log3[$k2].dat");
$ac3 = count($af3);
}else{$ac3=0;}

if(@file("img/$dat_log3[$k2].dat")){
$af4 = @file("img/$dat_log3[$k2].dat");
$ac4 = count($af4);
}else{$ac4=0;}

if(@file("prog/$dat_log3[$k2].dat")){
$af5 = @file("prog/$dat_log3[$k2].dat");
$ac5 = count($af5);
}else{$ac5=0;}

$ff=$ac+$ac1+$ac2+$ac3+$ac4+$ac5;

$datt_log3[$k2]=nickname($dat_log3[$k2]);
if ($dostup==101){
if($dat_log3[$k2]=="" ||eregi("[^a-z0-9-]",$dat_log3[$k2])){}else{$dat_ball2[]="</div><div class=b><img src=\"images/chel.gif\" alt=\"\"> <a href=\"pages.php?page=$dat_log3[$k2]&amp;".SID."\">$datt_log3[$k2]</a>[<a href=\"del.php?m=$dat_log3[$k2]&amp;".SID."\">del</a>]</div><div>
*   Популярность: <font color=red>$dat_ball3[$k2]</font><br>
*   Файлы:<font color=red> $ff</font><br>";}}
else{if($dat_log3[$k2]=="" ||eregi("[^a-z0-9-]",$dat_log3[$k2])){}else{$dat_ball2[]="</div><div class=b><img src=\"images/chel.gif\" alt=\"\"> <a href=\"pages.php?page=$dat_log3[$k2]&amp;".SID."\">$datt_log3[$k2]</a></div><div>
*   Популярность: <font color=red>$dat_ball3[$k2]</font><br>
*   Файлы:<font color=red> $ff</font><br>";}}

}

if ($start=="") {$start = 0;}
if ($total < $start + $col){ $end = $total; }
else {$end = $start + $col; }
for ($i = $start; $i < $end; $i++){
echo $dat_ball2[$i];
}

echo"<hr>";
if ($start != 0) {echo ' <a href="newlist.php?f='.$f.'&amp;start='.($start - $col).'&amp;'.SID.'">Назад</a> ||';}
if ($total > $start + $col) {echo ' <a href="newlist.php?f='.$f.'&amp;start='.($start + $col).'&amp;'.SID.'">Далее</a><br> ';}



$nn=round(($start/10)+2);
$nn2=round(($start/10)+1);
echo'Страничка <font color="blue">'.$nn2.'</font><br>';


//////////////////////////////////////////////////////////////////

echo'<hr>';
if(@file("base/$log.dat"))
{
echo'<img src="images/key.gif" alt=""> <a href="createpage.php?'.SID.'">Вход в Мастерскую</a><br/>';
}
else
{
echo'<img src="images/panel.gif" alt=""> <a href="newmusicant.php?'.SID.'">Создать свою страничку!</a><br/>';
}
}else
{
echo "Для начала Вам необходимо <a href=\"../pages/vhod.php?".SID."\">авторизоваться</a> или <a href=\"../pages/registration.php?\">зарегестрироваться</a><br />\r\n";
echo '<br><img src="../images/img/homepage.gif" alt=""> <a href="index.php?'.SID.'">В странички</a>';
include_once"../themes/$config_themes/foot.php";
exit;
}
echo'<img src="images/home.gif" alt=""> <a href="index.php?'.SID.'">В странички</a>';
include_once"../themes/$config_themes/foot.php";
?>