File size: 2.29Kb
<?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');
echo '<?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">Правила форума</a>]</small><hr />';
$arr=file('themes.dat');
$cnt=count($arr);
if($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><br />';}
if($n>$ns){print'<<<a href="index.php';
if($pas!=''){print'?pas='.$pas;}
echo'">В начало</a><hr />';}
elseif($n<$cnt){print'>><a href="index.php?';
if($pas!=''){print'pas='.$pas.'&';}
print'n='.($cnt-$ns).'">В конец</a>';}
if($n<$cnt){ echo'<hr />'; }
echo'[<a href="new.php';
if($pas!=''){print'?pas='.$pas;}
echo'">Новая тема</a>]<br />
[<a href="smile.php';
if($pas!=''){print'?pas='.$pas;}
echo'">Смайлы</a>]<br />';
if($pas==$admp){print'[<a href="banlist.php?pas='.$pas.'">Бан-лист</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');
print'</a></div>[<a href="'.$site.'">На главную</a>]</div></body></html>';
?>