Файл: modules/news.php
Строк: 51
<?php
////////////////////////////////////////
///// Основа ApiCMS //////
///// Автор биллинга - IvanDanilov /////
///// Автор биллинга - IvanDanilov /////
///// ICQ 936545, mail: KyberID@ya.ru //
////////////////////////////////////////
$query = mysql_query("SELECT * FROM `news` ORDER BY time DESC LIMIT 1");
while ($newsone = mysql_fetch_assoc($query)){
$koms = mysql_result(mysql_query("SELECT COUNT(*) FROM `news_comm` WHERE `id_news` = '$newsone[id]'"),0);
if ($koms==0)$koms=NULL;
else $koms = ' +'.$koms.'';
$ank=mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE `id` = '$newsone[id_user]' LIMIT 1"));
echo '<div class="content"><div class="descr">';
echo ' <img src="/design/menu/news_m.png"/> <a href="/modules/all_news.php"><strong><font color=#ffffff><i>'.apicms_smiles(apicms_bb_code(apicms_br(htmlspecialchars($newsone['name'])))).'</i></font></strong></a> <span style="float:right"><small> '.apicms_data($newsone['time']).' </small></span> </br> '.apicms_smiles(apicms_bb_code(apicms_br(htmlspecialchars($newsone['txt'])))).'';
echo '<hr> <img src="/design/menu/all_comms.png"/> <a href="/modules/news_comm.php?id='.$newsone['id'].'"><small><font color=#ffffff>Комментарии '.$koms.'</font></small></a> <span style="float:right"> <small>'.htmlspecialchars($ank['login']).'</small> <img src="/design/menu/rsnews.png"/></span> </div></div>';
}
///////////////////////////////////
?>