Размер файла: 2.11Kb
<?php
@$pas=$_GET['pas'];
@$n=$_GET['n'];
@$c=$_GET['c'];
require('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 '">Oтвeтить</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).'">B кoнeц</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лee</a><br />';
}
if($c>$ns)
{
print '<<<a href="view.php?';
if($pas) print 'pas='.$pas.'&';
print 'n='.$n.'">B нaчaлo</a>';
}
elseif($c<$cnt)
{
print '>><a href="view.php?';
if($pas) print 'pas='.$pas.'&';
print 'n='.$n.'&c='.($cnt-$ns).'">B кoнeц</a>';
}
print '<hr />[<a href="say.php?n='.$n;
if($pas) print'&pas='.$pas;
print '">Oтвeтить</a>]<br />
[<a href="index.php';
if($pas) print'?pas='.$pas;
print '">K тeмaм</a>]<br />[<a href="'.$site.'">Ha глaвную</a>]</div></body></html>';
?>