File size: 2.31Kb
<?php
require 'incs/header.php';
require 'incs/ini.php';
$c = intval(@$_GET['c']);
if(!isset($_SESSION['sgb_admp'])) include('incs/bcheck.php');
ob_start();
include 'fig/head.php';
echo '<div class="hu2"><a href="'.$CONF['home'].'">На галавную</a> | <a href="say.php'.psid().'">нaпиcaть</a> |<a href="index.php?r='.date('s').'&'.SID.'">обнoвить</a><br /><hr />';
$arr = file('incs/book.dat');
$cnt = count($arr);
for($i=0; $i<$CONF['ns']; $i++){
if($c==$cnt) break;
$post=unserialize($arr[$c]);
$post['text'] = preg_replace("#[(http|https|ftp)]+[(://)]+[0-9a-zA-Z_.-]+.[a-zA-Z]{2,4}#i",$CONF['anti'],$post['text']);
$post['text'] = clean(mat($post['text']));
$post['br'] = brauzer($post['br']);
echo '<a href="say.php?n='.$c.'"><span class="w">'.$post['nick'].'</span></a>';
if($post['sity']!='') {echo '<small>('.$post['sity'].')</small><br />';}
else { echo '<br />'; }
echo $post['time'].'<div class="m">'.$post['text'].'<br />';
if($post['mail']!='') {echo '<span style="color: green;">Почта: '.$post['mail'].'</span>';}
echo '</div>';
if(isset($_SESSION['sgb_admp'])) { echo '<small>[
<a href="del.php?n='.$c.'&'.SID.'">Удл</a>
-<a href="ban.php?n='.$c.'&'.SID.'">Бан</a>
-<a href="edit.php?n='.$c.'&'.SID.'">Отв/ред</a>
]</small><br />'; }
echo '<span class="op">'.strtok($post['br'],' ').'</span>';
if(isset($post['answ'])) print('<br /><small><span style="color: black;">'.$CONF['admin'].'</span><span style="color: red;">(Adm)</span>: '.$post['answ'].'</small>');
echo '<br /><center><span style="color: #00df64;">******</span></center>';
$c++;
}
if($c<$cnt) print('>><a href="index.php?c='.$c.'&'.SID.'">Дaлee</a><br />');
if($c>$CONF['ns']) print('<<<a href="index.php?c='.($c-$CONF['ns']-$i).'&'.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&'.SID.'">Oчиcтить</a>]<br />');
}
if($CONF['skoka'] == 'yes'){
echo 'Сообщений всего: '.(sizeof(file('incs/book.dat')));
}
$onl = new online;
$onl->add();
echo '<center>(Online: <a href="who.php'.psid().'">'.$onl->cnt.'</a>)</center><hr />';
include 'fig/nizz.php';
ob_end_flush();
?>