File size: 989B
<?php
$news_in_index = (int)$news_in_index;
if ($news_in_index > 0) {
echo '<br>';
$query = "SELECT * FROM " . $pref . "news ORDER BY id DESC LIMIT 0, $news_in_index";
$result = mysql_query($query);
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo '<img src="/img/pic/65.gif" alt=".">' . $line['data'] . ' ' . $line['vrem'] . '<img src="/img/pic/64.gif" alt="."><br>';
$soob = smile($line[msg]);
echo $soob . '<br>';
// echo ' [Разместил - <a href="/setting/anketa.php?id='.$line['id_user'].'">'.$line['login'].'</a>]<br>';
// if (strlen($line['otvet'])>=2){echo'<font color="red"><u>Ответ администрации:</u></font><br><font color="#aa0000">'.$line['otvet'].'</font><br>';}
}
} else {
$query = "SELECT * FROM " . $pref . "news ORDER BY id DESC LIMIT 0, 1";
$result = mysql_fetch_array(mysql_query($query));
echo ' (' . $result['data'] . ')<br>';
}
?>