Файл: sys/inc/otvet_new_vopros.php
Строк: 14
<?
if ($user['index6']!=0){
$v=mysql_query("SELECT * FROM `otvet` ORDER BY `time` DESC LIMIT 3");
if(mysql_num_rows($v)==0)msg("Нет новых вопросов.");
while ($otvet=mysql_fetch_array($v)){
$icon="<img src='/otvet/img/vopros.png'>";
$ank=get_user($otvet['id_user']);
echo "<a href='/otvet/vopros.php?id=".$otvet['id']."'><div class='forum'>$icon ".output_text($otvet['name'])." n";
echo" <span style='float:right;border:1px solid gray;backgraund:whitesmoke;border-radius:10px'><b>".mysql_result(mysql_query("SELECT COUNT(*) FROM `otvet_post` WHERE `id_otvet` = '$otvet[id]'"),0)."</b></span><br/>";
echo "<b>$ank[nick]</b> | <b>".vremja($otvet['time'])."</b>";
echo "</div></a>";
}
}
?>