View file love/otvety/newinclude.php

File size: 1.03Kb
<?

echo '</a>&raquo;Вопросы:<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 "&raquo;<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";

echo '<br/>';
}
echo "<a href='add.php?rid=$_GET[rid]'>У меня есть вопрос<br/> \n";



?>