Вход Регистрация
Файл: news.php
Строк: 86
<?
session_start
();
$title="Новостиn";
$font='<font color="#ffd022">';
$fend='</font>';
include (
"header.php");
 echo 
$div["im"];
   echo 
"<img src="/logo.gif" alt=""/><br/>";
 echo 
$div["end"];

 echo 
$div["okcent"];

 echo 
$div["gif"];
//include ("aut.php");
if(empty($startan)) $startan 0;
$startan=intval($startan);
if(
$startan<0$startan=0$num_msgs_an=10;
$arr mysql_query("select * from `news`");
$qi mysql_query("select * from `news` order by `id` desc limit $startan,$num_msgs_an;;");
           if (
mysql_affected_rows()==0)
           {
echo 
$div["ten"];
           echo 
"Новостей пока нет...<br/>";
echo 
$div["end"];
           }
           else
           {
while(
$row=mysql_fetch_array($qi))
{
echo 
$div["ten"];
echo 
'<center>';
echo 
"$font<b>".$row['date']."</b>$fend <br/>";
echo 
'</center>';
echo 
"".$row['msg']."<br/>";
$d=$row['id'];
$q=mysql_query("select * from `news_com` where `nid`='$d'");
$xx=mysql_num_rows($q);
echo 
'<a href="mnenie.php?ide='.$row['id'].'&amp;'.session_name()."=".session_id().'">Комментарии</a> [';
echo 
$font;
echo 
$xx;
echo 
$fend;
echo 
"]<br/>";
echo 
$div["end"];
}
echo 
$div["ten"];
           }
$i = @mysql_num_rows($arr);
if(
$startan!=0)
echo 
"<a href="news.php?".session_name()."=".session_id()."&amp;startan=".($startan-$num_msgs_an)."">".htmlspecialchars("Назад")."</a> ";

if(
$i>$startan+$num_msgs_an)
echo 
" <a href="news.php?".session_name()."=".session_id()."&amp;startan=".($startan+$num_msgs_an)."">".htmlspecialchars("Далее")."</a><br/>";
echo 
$div["end"];;


if (
$autorize
{echo 
$div["ten"];
echo 
"<a href="enter.php?".session_name()."=".session_id()."">В панель</a><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
'<center>';
include (
"online.php");
echo 
'</center>';
echo 
$div["end"];
}


else 
{echo 
$div["ten"];
echo 
"<a href="index.php?".session_name()."=".session_id()."">На главную</a><br/>";
echo 
$div["end"];}


include (
"footer.php");
?>
Онлайн: 0
Реклама