File size: 2.11Kb
<?php
@$pas=$_GET['pas'];
@$n=$_GET['n'];
@$c=$_GET['c'];
include'ini.php';
$thf=file('themes.dat');
$thfa=explode(':||:',strtok($thf[$n],"\n"));
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>'.$thfa[1].'</title><link rel="stylesheet" type="text/css" href="style.css" /></head><body><div>';
print'[<a href="say.php?n='.$n;
if($pas!=''){print'&pas='.$pas;}
print'">Ответить</a>]<br />';
$arr=file('data/'.$thfa[0]);
$cnt=count($arr);
if($c==''){$c=0;}
if(($c+$ns)<$cnt){print'>><a href="view.php?';
if($pas!=''){print'pas='.$pas.'&';}
print'n='.$n.'&c='.($cnt-$ns).'">В конец</a><hr />';}
for($r=1;$r<=$ns;$c++){
if($c==$cnt){break;}
$str=$arr[$c];
$darr=explode(':||:',strtok($str,"\n"));
echo '<span class="bl">'.$darr[0].'</span>:';
if($pas==$admp){echo'[<a href="del.php?pas='.$pas.'&t='.$n.'&n='.$c.'">D</a>][<a href="edit.php?pas='.$pas.'&t='.$n.'&n='.$c.'">E</a>][<a href="ban.php?pas='.$pas.'&t='.$n.'&n='.$c.'">B</a>]';}
echo'<div class="fr">'.$darr[1].'</div><span class="dn">'.$darr[2].' ';
if($pas==$admp){echo strtok($darr[3],' ');}
echo'</span><hr />';
$r++;
}
if($c<$cnt){print'><a href="view.php?';
if($pas!=''){print'pas='.$pas.'&';}
print'n='.$n.'&c='.$c.'">Далее</a><br />';}
if($c>$ns){print'<<<a href="view.php?';
if($pas!=''){print'pas='.$pas.'&';}
print'n='.$n.'">В начало</a>';}
elseif($c<$cnt){print'>><a href="view.php?';
if($pas!=''){print'pas='.$pas.'&';}
print'n='.$n.'&c='.($cnt-$ns).'">В конец</a>';}
print'<hr />[<a href="say.php?n='.$n;
if($pas!=''){print'&pas='.$pas;}
print'">Ответить</a>]<br />';
print'[<a href="index.php';
if($pas!=''){print'?pas='.$pas;}
print'">К темам</a>]<br />[<a href="'.$site.'">На главную</a>]</div></body></html>';
?>