Файл: soc-set/moduls/fermer/news/index.php
Строк: 79
<?
include_once '../../sys/inc/start.php';
include_once '../../sys/inc/compress.php';
include_once '../../sys/inc/sess.php';
include_once '../../sys/inc/home.php';
include_once '../../sys/inc/settings.php';
include_once '../../sys/inc/db_connect.php';
include_once '../../sys/inc/ipua.php';
include_once '../../sys/inc/fnc.php';
include_once '../../sys/inc/user.php';
$set['title']='Новости';
error_reporting (0);
include_once '../../sys/inc/thead.php';
title();
aut(); // форма авторизации
//header("Content-type: application/vnd.wap.xhtml+xml");
header("Content-type: text/html");
echo "<link rel='stylesheet' href='../style.css' type='text/css' /><center>";
echo "<div class='grad32'><img src='../fermer.gif'></div><div class='ferm3'><br/><div class='grad16'>Новости</div>";
if(isset($user)){
//if (mysql_result(mysql_query("SELECT COUNT(*) FROM `2news` LIMIT 1",$db), 0)==0){header("Location: /index.php?".SID);exit;}
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `2news`"),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
$q=mysql_query("SELECT * FROM `2news` ORDER BY `id` DESC LIMIT $start, $set[p_str]");
echo "<table class='post'>n";
if ($k_post==0)
{
echo " <tr>n";
echo " <td class='p_t'>n";
echo "Нет новостейn";
echo " </td>n";
echo " </tr>n";
}
while ($post = mysql_fetch_assoc($q))
{
echo " <tr>n";
echo " <td class='p_t'>n";
echo "$post[title]n";
echo "(".vremja($post['time']).")n";
echo " </td>n";
echo " </tr>n";
echo " <tr>n";
echo " <td class='p_m'>n";
echo output_text($post['msg'])."<br />n";
if ($post['link']!=NULL)echo "<a href='".htmlentities($post['link'], ENT_QUOTES, 'UTF-8')."'>Подробности</a><br />n";
echo "<a href='komm.php?id=$post[id]'>Комментарии</a> (".mysql_result(mysql_query("SELECT COUNT(*) FROM `2news_komm` WHERE `id_2news` = '$post[id]'"),0).")<br />n";
echo " </td>n";
echo " </tr>n";
}
echo "</table>n";
echo "» <a href='../'>На ферму</a><br/>n";
if ($k_page>1)str('index.php?',$k_page,$page); // Вывод страниц
}else{
echo '<div class="msg">Данная игра доступна только для авторизованых пользователей!<br/>Пожалуйста <a href="../../aut.php">авторизуйтесь</a> или пройдите процесс <a href="../../reg.php">регистрации</a>.</div>';
};
include_once '../../sys/inc/tfoot.php';
?>