Размер файла: 1.36Kb
<?
session_start();
$title="Новости\n";
include ("../header.php");
include ("../func/aut.php");
echo $div["ten"];
if(empty($startan)) $startan = 0;
$startan=intval($startan);
if($startan<0) $startan=0; $num_msgs_an=10;
$arr = mysql_query("select * from `news2`");
$qi = mysql_query("select * from `news2` order by `id` desc limit $startan,$num_msgs_an;;");
if (mysql_affected_rows()==0)
{
echo "Новостей пока нет...<br/>";
}
else
{
while($row=mysql_fetch_array($qi))
{
echo "<b>".$row['date']."</b><br/>".$row['msg']."<br/>";
print '<a href="mnenie.php?ide='.$row['id'].'&'.session_name()."=".session_id().'">Комментарии</a> <br/><br/>'."\n";
}
}
$i = @mysql_num_rows($arr);
if($startan!=0)
echo "<a href=\"news.php?".session_name()."=".session_id()."&startan=".($startan-$num_msgs_an)."\">".htmlspecialchars("<<-- Предыдущая")."</a><br/>";
if($i>$startan+$num_msgs_an)
echo "<a href=\"news.php?".session_name()."=".session_id()."&startan=".($startan+$num_msgs_an)."\">".htmlspecialchars("Следующая -->>")."</a><br/>";;
if ($autorize) {echo "<img src=\"pics/st.gif\" alt=\"*\"/>";echo "<a href=\"index.php?".session_name()."=".session_id()."\">На биржу</a><br/>";}
echo $div["end"];
include ("footer.php");
?>