Просмотр файла love/new.php

Размер файла: 1.61Kb
<?
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']='Ответы/Новые вопросы';
include_once '../sys/inc/thead.php';
title();
aut(); // форма авторизации


$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `otvety_t`"),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 `otvety_t` ORDER BY `time` DESC  LIMIT $start, $set[p_str]");
if (mysql_num_rows($q)==0) {
echo "Нет вопросов<br/>\n";
}

while ($otv = mysql_fetch_array($q))
{
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = $otv[id_user] LIMIT 1"));

if($num==1){ 
 echo '<br/>';
$num=0;
}else{ 
 echo '<br/>';
$num=1;}

echo "".online($ank['id'])." \n";
echo "<span style=\"color:$ank[ncolor]\">$ank[nick]<br/>\n";
echo "<a href=\"iindex.php?tid=$otv[id]&amp;rid=$otv[id_razdel]\">$otv[name]</a> (".mysql_result(mysql_query("SELECT COUNT(*) FROM `otvety_p` WHERE `id_them` = '$otv[id]'"),0).")\n";


}
if ($k_page>1)str("index.php?tid=$otv[id]&rid=$otv[id_razdel]",$k_page,$page); // Вывод страниц


echo '<hr color="DeepSkyBlue1" hr noshade size="1"></font>';
echo "&laquo;<a href='/love/index.php'>В знакомства</a><br/>\n";

include_once '../sys/inc/tfoot.php';
?>