File size: 1.03Kb
<?
echo '</a>»Вопросы:<br/>';
echo "<a href='new.php'><u>Новые</u><a>\n";
echo "<a href='iindex.php'><u>Все</u><a>\n";
echo '<hr color="DeepSkyBlue1" hr noshade size="1"></font>';
$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){
$num=0;
}else{
$num=1;}
echo "»<a href=\"iindex.php?tid=$otv[id]&rid=$otv[id_razdel]\">$otv[name]</a> (".mysql_result(mysql_query("SELECT COUNT(*) FROM `otvety_p` WHERE `id_them` = '$otv[id]'"),0).")\n";
echo '<br/>';
}
echo "<a href='add.php?rid=$_GET[rid]'>У меня есть вопрос<br/> \n";
?>