Файл: mob-lave.ru/moduls/obmen/obmen_menu.php
Строк: 23
<?php
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `$system[perfix]_obmen_files`"),0) == false) echo '<div class="mess">Файлов нет</div>';
$q = mysql_query("SELECT * FROM `$system[perfix]_obmen_files` ORDER BY `id` DESC LIMIT 3");
while($post = mysql_fetch_assoc($q)){
$file = mysql_fetch_assoc(mysql_query("SELECT * FROM `$system[perfix]_user_files` WHERE `id` = '".num($post['id_file'])."'"));
$avtor = mysql_fetch_assoc(mysql_query("SELECT * FROM `$system[perfix]_users` WHERE `id` = '".num($file['id_user'])."'"));
$file_komm = mysql_result(mysql_query("SELECT COUNT(*) FROM `$system[perfix]_user_files_komm` WHERE `id_file` = '".num($file['id'])."'"),0);
$file_komm_new = mysql_result(mysql_query("SELECT COUNT(*) FROM `$system[perfix]_user_files_komm` WHERE `id_file` = '".num($file['id'])."'"),0);
if ($file_komm_new==0)$file_komm_new=NULL;else $file_komm_new='<font color=red><smile><sup>+'.$file_komm_new.'</sup></smile></font>';
echo '<div class="menu_touch"><a href="/moduls/obmen/file.php?id='.num($post['id_file']).'&dir='.num($post['id_dir']).'">';
echo '<b>'.htmlspecialchars($file['title']).'</b> ('.size_file($file['size']).') <span class="count">'.$file_komm.' '.$file_komm_new.'</span><br/>';
echo 'Загрузил: '.$avtor['login'].'';
echo '</a></div>';
}
?>