File size: 2.67Kb
<?php
header("Content-type: text/vnd.wap.xhtml+xml; charset=utf-8");
header("Cache-control: no-cache;");
header("Pragma: no-cache;");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=utf-8"/>
<meta http-equiv="Content-Style-Type" content="text/css"/>
<title>Статьи
</title>
</head>
<body>
<p align="left" style="background-color:green">
<span style="color:white"><small>Статьи на различную тематику:</small>
</span>
</p>
<p align="left" style="background-color:white">
<?php
list($msec, $sec) = explode(chr(32), microtime());
$time = $sec + $msec;
require('config.ini');
require('Navigator.class.php');
$q=mysql_query("SELECT count(*) FROM articles");
$all=mysql_result($q,0,0);
if(empty($all)) {
echo '<span style="color:green"><small>Статей пока нет...</small>
</span>'; }
if ($all)
{
$pnumber=$coll;
$n=new Navigator($all,$pnumber);
$q=mysql_query("SELECT * FROM articles ORDER by id DESC LIMIT {$n->start()},$pnumber");
while (false!==($res=mysql_fetch_assoc($q)))
{
echo '<a href="./art.php?id='.$res['id'].'"><span style="color:green"><small>'.htmlspecialchars($res['name']).'</small>
</span></a><br />';
}
echo '<span style="color:green"><small>'.$n->navi().'</small>
</span>';
}
list($msec, $sec) = explode(chr(32), microtime());
echo '<br /><span style="color:green"><small>Генерация скрипта '.round(($sec + $msec) - $time, 4).' секунд</small>
</span>';
echo '</p>
<p align="center" style="background-color:green">
<span style="color:white"><small>All rights reserved 2008</small>
</span>
</p>
</body>
</html>';