Файл: vk.com_vhllam/forum/filesr.listr.php
Строк: 93
<?
require '../sys/inc/start.php';
require '../sys/inc/compress.php';
require '../sys/inc/sess.php';
require '../sys/inc/home.php';
require '../sys/inc/settings.php';
require '../sys/inc/db_connect.php';
require '../sys/inc/ipua.php';
require '../sys/inc/fnc.php';
require '../sys/inc/user.php';
$set['title']='Форум - TOP 20 файлов'; // заголовок страницы
require '../sys/inc/thead.php';
title();
aut();
?>
<div class='cont'>
<img src='/style/images/forums.xhata.png' alt='' class='xhata'/> <a href='/forum/'>Форум</a> | Топ 20 файлов
</div>
<?
if ($set['web'])
{
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_files`"), 0)>0)
{
?>
<table width='100%' border='1' align='center'>
<tr class='forum_file_table_title'>
<td width='14'>
</td>
<td>
Файл
</td>
<td>
Тип
</td>
<td width='50'>
Размер
</td>
<td width='50'>
Скачано
</td>
<td width='50'>
Рейтинг
</td>
<td width='50'>
</td>
</tr>
<?
$q_f=mysql_query("SELECT COUNT(`forum_files_rating`.`rating`) AS `c_rating`, SUM(`forum_files_rating`.`rating`) AS `rating`, `forum_files`.* FROM `forum_files` LEFT JOIN `forum_files_rating` ON
`forum_files`.`id` = `forum_files_rating`.`id_file` GROUP BY `forum_files`.`id` ORDER BY `rating` DESC LIMIT 20");
while ($file = mysql_fetch_assoc($q_f))
{
echo "<tr class='forum_file_table_file'>n";
echo "<td>n";
if (is_file(H.'style/themes/'.$set['set_them'].'/loads/14/'.$file['ras'].'.png'))
{
echo "<img src='/style/themes/$set[set_them]/loads/14/$file[ras].png' alt='$file[ras]' />n";
if ($set['echo_rassh_forum']==1)$ras=".$file[ras]";else $ras=NULL;
}
else
{
echo "<img src='/style/themes/$set[set_them]/forum/14/file.png' alt='' />n";
$ras=".$file[ras]";
}
echo "</td>n";
echo "<td>$file[name]$ras</td>n";
echo "<td>$file[type]</td>n";
echo "<td>".size_file($file['size'])."</td>n";
echo "<td style='text-align:center;'>$file[count]</td>n";
echo "<td style='text-align:center;'> ";
if ($file['rating']==null)$file['rating']=0;
echo " $file[rating]/$file[c_rating] ";
echo "</td>n";
echo "<td><a href='/forum/files/$file[id]/$file[name].$file[ras]'>Скачать</a></td>n";
echo "</tr>n";
}
echo "</table><br />n";
}
}
else
{
$q_f=mysql_query("SELECT COUNT(`forum_files_rating`.`rating`) AS `c_rating`, SUM(`forum_files_rating`.`rating`) AS `rating`, `forum_files`.* FROM `forum_files` LEFT JOIN `forum_files_rating` ON
`forum_files`.`id` = `forum_files_rating`.`id_file` GROUP BY `forum_files`.`id` ORDER BY `rating` DESC LIMIT 20");
while ($file = mysql_fetch_assoc($q_f))
{
if($num==1){
echo "<div class='x1'>n";
$num=0;
}else{
echo "<div class='x2'>n";
$num=1;}
if (is_file(H.'style/themes/'.$set['set_them'].'/loads/14/'.$file['ras'].'.png'))
{
echo "<img src='/style/themes/$set[set_them]/loads/14/$file[ras].png' alt='$file[ras]' />n";
if ($set['echo_rassh_forum']==1)$ras=".$file[ras]";else $ras=NULL;
}else{
echo "<img src='/style/themes/$set[set_them]/forum/14/file.png' alt='' />n";
$ras=".$file[ras]";
}
echo "<a href='/forum/files/$file[id]/$file[name].$file[ras]'>$file[name]$ras</a> (".size_file($file['size']).") n";
echo "<br />n";
echo "Рейтинг: ";
if ($file['rating']==null)$file['rating']=0;
echo " $file[rating]/$file[c_rating] ";
echo " | ";
echo "Скачали: $file[count] раз";
echo "</div>n";
}
}
?>
<div class='cont'>
<img src='/style/images/forums.xhata.png' alt='' class='xhata'/> <a href='/forum/'>Форум</a> | Топ 20 файлов
</div>
<?
require '../sys/inc/tfoot.php';
?>