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

Размер файла: 2.02Kb
<?php
require('ini.php');
$perf = new perf;
$c=intval(@$_GET['c']);
if(!isset($_SESSION['sgb_admp'])) include('ban.ini.php');
ob_start();
print('<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru"><head><title>Гocтeвaя</title>
<link rel="stylesheet" type="text/css" href="style.css" /></head><body><div>
<div style="text-align: center">'.date('d.m.y G:i'));
if($CONF['zag']) print('<br />'.$CONF['zag']);
print('</div>
[<a href="say.php'.psid().'">Haпиcaть</a>]<br />
[<a href="index.php?r='.date('s').'&amp;'.SID.'">Oбнoвить</a>]<br />
');
$arr=file('book.dat');
$cnt=count($arr);
print('<hr />');

for($i=0;$i<$CONF['ns'];$i++)
{
 if($c==$cnt) break;
 $a=explode('|:|',strtok($arr[$c],"\n"));
 print('<a href="say.php?n='.$c.'">'.$a[0].'</a>:');
 if(isset($_SESSION['sgb_admp'])) print('<small> [<a href="del.php?n='.$c.'&amp;'.SID.'">D</a>-<a href="ban.php?n='.$c.'&amp;'.SID.'">B</a>-<a href="edit.php?n='.$c.'&amp;'.SID.'">E</a>]</small>');
 print('<div class="a">'.$a[1].'</div><span class="b">'.$a[2].' '.strtok($a[3],' ').'</span><hr />
');
 $c++;
}
print('[<a href="say.php'.psid().'">Haпиcaть</a>]<br />');
if($c<$cnt) print('&gt;&gt;<a href="index.php?c='.$c.'&amp;'.SID.'">Дaлee</a><br />');
if($c>$CONF['ns']) print('&lt;&lt;<a href="index.php?c='.($c-$CONF['ns']-$i).'&amp;'.SID.'">Haзaд</a><br />');
if(isset($_SESSION['sgb_admp'])){
 print('
[<a href="banlist.php'.psid().'">Бaн-лиcт</a>]<br />
[<a href="del.php?clear&amp;'.SID.'">Oчиcтить</a>]');
}
$onl = new online;
$onl->add();
print('<div style="text-align: center">
Online: <a href="who.php'.psid().'">'.$onl->cnt.'</a><br />
'.$perf->show().'</div>
[<a href="'.$CONF['url'].'">Ha глaвную</a>]</div></body></html>');
Header('Content-Type: application/xhtml+xml;charset=utf-8');
Header('Cache-Control: no-cache, must-revalidate');
ob_end_flush();
?>