View file includes/wap/news.php

File size: 929B
<?php
if ($user=='') $upbutton='<do name="m" type="options" label="На главную"><go href="/?'.$id.'"/></do>';
else           $upbutton='<do name="x" type="options" label="xPanel"><go href="/?'.$id.'"/></do>';

$newspart=$query1;
if ($newspart<1) $newspart=1;

$news=file($rootpath.'news.dat');

print $head.cyr2utf('<card id="main" title="Новости">'.$upbutton.'<p><small>');

for ($i=($newspart*10-10);$i<($newspart*10);$i++)
	{
	$_tmp=explode("\t",trim($news[$i]),2);
	if ($_tmp[0]!='') print '<b>'.$_tmp[0].'</b> <br/>'.cyr2utf($_tmp[1]).' <br/> <br/>';
	}

print '</small>';

if ($newspart>1) print cyr2utf('<a href="/?'.$id.'/news/'.($newspart-1).'">&lt;&lt;&lt;</a> <br/>');
if (($newspart*10)<sizeof($news)) print cyr2utf('<a href="/?'.$id.'/news/'.($newspart+1).'">&gt;&gt;&gt;</a> <br/> <br/>');

print cyr2utf('<a href="/?'.$id.'">Вернуться</a>');
print cyr2utf('</p></card></wml>');

exit();
?>