Размер файла: 2.27Kb
<?php
@$pas=$_GET['pas'];
@$n=$_GET['n'];
require('ini.php');
Header('Content-Type: application/xhtml+xml;charset=utf-8');
Header('Cache-Control: no-cache, must-revalidate');
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>-Форум-</title>
<link rel="stylesheet" type="text/css" href="style.css" /></head><body><div>
<small>[<a href="prav.php">Пpaвилa фopумa</a>]</small><hr />';
$arr=file('themes.dat');
$cnt=count($arr);
if(empty($n)) $n=0;
if($pas!=$admp){
for($r=1;$r<=$ns;$n++){
if($n==$cnt) break;
$str=$arr[$n];
$darr=explode(':||:',strtok($str,"\n"));
echo '<a href="view.php?n='.$n.'">'.$darr[1].' ['.$darr[4].']</a><br />Last post: <span class="bl">'.$darr[2].'</span><br /><span class="dn">'.$darr[3].'</span><hr />';
$r++;
}}else{
for($r=1;$r<=$ns;$n++){
if($n==$cnt) break;
$str=$arr[$n];
$darr=explode(':||:',strtok($str,"\n"));
echo '<a href="view.php?n='.$n.'&pas='.$pas.'">'.$darr[1].' ['.$darr[4].']</a><small>[<a href="deltheme.php?pas='.$pas.'&n='.$n.'">del</a>][<a href="edittheme.php?pas='.$pas.'&n='.$n.'">edit</a>]</small><br />Last post: <span class="bl">'.$darr[2].'</span><br /><span class="dn">'.$darr[3].'</span><hr />';
$r++;
}}
if($n<$cnt)
{
print '><a href="index.php?';
if($pas) print 'pas='.$pas.'&';
print 'n='.$n.'">Дaлee</a><br />';
}
if($n>$ns)
{
print '<<<a href="index.php';
if($pas) print '?pas='.$pas;
echo '">B нaчaлo</a><hr />';
}
elseif($n<$cnt)
{
print '>><a href="index.php?';
if($pas) print 'pas='.$pas.'&';
print'n='.($cnt-$ns).'">B кoнeц</a>';
}
if($n<$cnt) echo'<hr />';
echo '[<a href="new.php';
if($pas) print '?pas='.$pas;
echo '">Hoвaя тeмa</a>]<br />
[<a href="smile.php';
if($pas) print '?pas='.$pas;
echo '">Cмaйлы</a>]<br />';
if($pas==$admp) print'[<a href="banlist.php?pas='.$pas.'">Бaн-лиcт</a>]<br />';
print '<div style="text-align: center;font-size: smaller">Online: <a href="who.php';
if($pas) print'?pas='.$pas.'">'; else print '">';
require('online.php');
echo '</a></div>[<a href="'.$site.'">Ha глaвную</a>]</div></body></html>';
?>