Просмотр файла pyramida/index.php

Размер файла: 2.86Kb
<?php
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]);
$dostup=trim($udata[7]);}

echo'<center><img src="icq.png" alt=""> ICQ пирамидка</center><br>';

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>';}}



$file = @file("../pyramida/pira.dat");
$total = count($file);
if (empty($_GET['start'])) $start = 0;
else $start = $_GET['start'];
if ($total < $start + $config_postnews){ $end = $total; }
else {$end = $start + $config_postnews; }
for ($fm = $start; $fm < $end; $fm++){

$file = @file("../pyramida/pira.dat");
$file = array_reverse($file);
$dt = explode("|",$file[$fm]);
$i2=round($fm+1);

$num=$total-$fm-1;

if($fm>=0){
echo'&raquo;<b> '.$dt[2].'</b>   {ICQ:'.$dt[1].'}: <i><font color="red">'.$dt[0].'</font></i><br>';



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

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

if($total>0){
echo'<br><hr>Страницы:';
$asd=$start-($config_postnews*3);
$asd2=$start+($config_postnews*4);

if($asd<$total && $asd>0){echo ' <a href="index.php?start=0&amp;'.SID.'">1</a> ... ';}

for($i=$asd; $i<$asd2;)
{
if($i<$total && $i>=0){
$ii=floor(1+$i/$config_postnews);

if ($start==$i) {
echo ' <b>'.$ii.'</b>';
               }
                else {
echo ' <a href="index.php?start='.$i.'&amp;'.SID.'">'.$ii.'</a>';
                     }}


$i=$i+$config_postnews;}
if($asd2<$total){echo ' ... <a href="index.php?start='.$ba2.'&amp;'.SID.'">'.$ba.'</a>';}
}
if ($dostup==101 || $dostup==102 || $dostup==103)
{
echo "<br />&raquo; <a href=\"piram.php?".SID."\">Управление</a>";
}
echo'<br><a href="../index.php?'.SID.'">На главную</a> ';
include_once"../themes/$config_themes/foot.php";
?>