Просмотр файла guest.BIZ.ver_1.1/index.php

Размер файла: 3.66Kb
<?php
#-----------------------------------------------------#
#            +++++++++ WaP-Koder +++++++++++          #
#             Made by   :  BIZON                      #
#               E-mail  :  [email protected]            #
#                 Site  :  www.w-sl.ru                #
#        Запрещено вносить изменения в код скрипта    #
#-----------------------------------------------------#
if(file_exists("setup.php"))
{
header ("Location: ./setup.php"); exit;
}
require_once("./sistem/ini.php");
require_once("./sistem/funcion.php");
require_once("./sistem/gzip.php");
header("Content-type: text/vnd.wap.wml; charset=utf-8");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache, must-relative");
echo ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
echo ("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.3//EN\" \"http://www.wapforum.org/DTD/wml13.dtd\">");
echo ("<wml><head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>");
echo ('<card id="index" title="'.$arr_falas[2].'"><p>');
if($arr_falas[7]==2){echo ('<small>');}
elseif($arr_falas[7]==3){echo ('<big>');}
else{}
echo ('<center>'.$arr_falas[3].'</center><br/>');
echo ('<img src="'.DER.'images/add.gif" alt="" align="middle"/><a href="'.DER.'add.php">Добавить</a><br/>');
echo ('-----<br/>');
if(isset($_GET['s'])) 
$s=(int)$_GET['s'];
else 
$s = 0;
$total = 0;
if(!($dp = opendir(DER."post/")));
$file_array = array(); 
while ($file = readdir ($dp))
{
if(stristr($file,'.dat'))
{
$file_array[] =  $file;
}
}
$file_count = count($file_array);
if($arr_falas[6]==1)rsort($file_array);
else
sort($file_array);
$total_pages = ceil($file_count/$arr_falas[5]);
$pageof = $s + 1;
if ($file_count > 0)
{
$first_record = $s * $arr_falas[5];
$last_record = $first_record + $arr_falas[5];

while (list($fileIndexValue, $file_name) = each($file_array))
{
if (($fileIndexValue >= $first_record) && ($fileIndexValue < $last_record))
{
$fela=file(DER."post/$file_name");
$messtyr=explode("|",$fela[0]);
echo('<b>'.$messtyr[1].'</b> ['.date_fixed($messtyr[4],"d/m/y G:i").']<br /><img src="'.DER.'images/mail.gif" alt="" align="middle"/>'.$messtyr[2].'<br/>
<strong>E-mail:</strong> '.$messtyr[3].'<br/>
<strong>Ip:</strong> '.$messtyr[5].'<br/>
<strong>Браузер:</strong> '.$messtyr[6]);
if(!empty($messtyr[7])){ echo('<strong><br/><u>Админ:</u> '.$messtyr[7].' </strong>');}
echo('<br/>*****<br/>');
}
}
if($file_count>$arr_falas[5]){ echo('Стр.: ');
if (($file_count > 0) AND ($s != 0))
{
$prev_page = $s -1;
echo('|<a href="?s='.$prev_page.'"><img src="'.DER.'images/first.gif" alt="'.htmlspecialchars("<<<").'" align="middle"/></a>| ');
}
$stmax=round(($file_count/$arr_falas[5])+0.45);
$stn=$s+1;
$siska=$s+1;
for($inn=$stn-1;$inn<$stmax;$inn++)
{
if($inn+1<($stn+6)){
if($stn==$inn+1)
echo("<b>&nbsp;".($inn+1).".</b>");
else
echo('<a href="?s='.$inn.'">&nbsp;'.($inn+1).'.</a>');
}
}
if (($file_count > 0) && ($last_record < $file_count))
{
$next_page = $s + 1;
echo(' |<a href="?s='.$next_page.'"><img src="'.DER.'images/last.gif" alt="'.htmlspecialchars(">>>").'" align="middle"/></a>|');
}
}}
echo ('<br/>Всего: <strong>'.$file_count.'</strong>');
closedir($dp);
echo ('<br/>-----<br/>');
echo ('<img src="'.DER.'images/info.gif" alt="" align="middle"/><a href="'.DER.'help.php">Справка</a><br/>');
list($msec, $sec) = explode(chr(32), microtime());
echo ("<center>[".round(($sec + $msec) - $headtime, 5)."]</center><br/>");
if($arr_falas[7]==2){echo ('</small>');}
elseif($arr_falas[7]==3){echo ('</big>');}
else{}
echo ("</p></card></wml>");
?>