Просмотр файла Soo_by_las/comm/top_new.php

Размер файла: 3.69Kb
<?php
#-----------------------------------------------------#
#             ******   Сообщества    ******           #
#                    Site   :  http://cobwap.net      #
#                   E-mail  :  [email protected]          #
#                 Для связи :  8(909)651-0-222        #
#                      ICQ  :  384181109              #
#            Автор скрипта  :  LAS                    #
#-----------------------------------------------------#
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'])!=""){

$gid=check($gid);
$soo=check($soo);
$them=check($them);
$soo = $_GET['soo'];
$them = $_GET['them'];
$start = abs((int)$_GET['start']);
$action = $_GET['action'];

echo '<br><div class=b><img src="../images/img/partners.gif" alt=""> <b>Новые сообщества за 3 дня</b></div><br>';

$dir = opendir ("../local/comm");
while ($file = readdir ($dir)){
$fal = @file("../local/comm/$file");
$udat = explode(":||:",$fal[0]);
$filtime=trim($udat[4]);
$filtime=$filtime+(3600*24*3);
$ttime=time();
if($filtime>=$ttime){$a[]=$file;}
} 
closedir ($dir);
$total = count($a);
$a=str_replace(".soo","",$a);
if (empty($start)) $start = 0; # для вывода
else $start = $start;
if ($total < $start + 10){ $end = $total; }else {$end = $start + 10; }
for ($i = $start; $i < $end; $i++){
$falim = @file("../local/comm/$a[$i].soo");
$datas = explode(":||:",$falim[0]);


echo'<div class=h><img src="../act.gif" alt=""> <a href="view.php?soo='.$soo.'&them='.$a[$i].'&amp;'.SID.'"> '.$datas[1].'</a> <br></div> ';


}
if($total=="0"){echo'В течении пяти дней новых сообществ не было!';}
################################

echo '<br> <div class=b>';
if ($start !== 0) {echo '<a href="top_new.php?start='.($start - 10).'&amp;'.SID.'"><< </a> ';}else{echo'<< ';}
$ba=ceil($total/10);
$ba2=$ba*10-10;
echo"[ Стр:";
$asd=$start-(10*4);
$asd2=$start+(10*5);
if($asd<$total && $asd>0){echo " <a href=\"top_new.php?start=0&amp;".SID."\">1</a>  ...  ";}
for($i1=$asd; $i1<$asd2;){
if($i1<$total && $i1>=0){
$ii=floor(1+$i1/10);
if ($start==$i1) {echo " <b>$ii</b>";}else {
echo " <a href=\"top_new.php?start=$i1&amp;".SID."\">$ii</a>";}}
$i1=$i1+10;}
if($asd2<$total){echo " ... <a href=\"top_new.php?start=$ba2&amp;".SID."\"> $ba</a>";}
echo ' ] ';
if ($total > $start + 10) {echo ' <a href="top_new.php?start='.($start + 10).'&amp;'.SID.'"> >></a>';}else{echo'>> ';} 
echo '</div>';

############################
$nn=round(($start/10)+2);
$nn2=round(($start/10)+1);
echo ' Всего новых сообществ: '.$total.' <br>';
$stri=ceil($total/10);
echo ' Всего страниц: '.$stri.' <br>';
}else{echo '<br>Вы не выполнили <a href="../pages/vhod.php?'.SID.'">вход</a></b> или в начале вам нужно <b> <a href="../pages/registration.php?'.SID.'">зарегистрироваться</a></b><br> ';}
echo'<br><img src="../images/img/back.gif" alt=""> <a href="index.php?'.SID.'">Сообщества</a>';
echo'<br><img src="../images/img/homepage.gif" alt=""> <a href="../index.php?'.SID.'">На главную</a>';

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