Файл: vtulun.ru/loads/top.php
Строк: 108
<?php
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';
$set['title']='Топ 20';
include_once '../sys/inc/thead.php';
err();
aut();
echo "<div class='foot'>Сортировка: ";
echo "<a href="new.php">| Новинки |</a>n";
echo "Топ 20 |</a><br />n";
echo'</div>';
echo "<table class='post'>n";
$q = mysql_query("SELECT * FROM `loads_list` ORDER BY `loads` DESC LIMIT 20;");
if (mysql_num_rows($q)==0){
echo " <tr>n";
echo " <td class='p_t'>n";
echo "Нет файловn";
echo " </td>n";
echo " </tr>n";
}
while ($post = mysql_fetch_assoc($q))
{
$i=passgen();
echo " <tr>n";
$l=$post['path'];
$l=ereg_replace("./|/.",NULL,$l);
$l=ereg_replace("(/){1,}","/",$l);
$l=ereg_replace("(^(/){1,})|((/){1,}$)","",$l);
$dir_loads=H.'sys/loads/files/'.$l;
$dirlist[$i]=$post['name'];
if (function_exists('iconv'))$dirlist[$i]=iconv('utf-8', 'windows-1251', $dirlist[$i]);
$ras=strtolower(eregi_replace('^.*.', NULL, $dirlist[$i]));
$name=eregi_replace('.[^.]*$', NULL, $dirlist[$i]);
if (is_file($dir_loads.'/'.$dirlist[$i].'.name'))
$name2=trim(esc(file_get_contents($dir_loads.'/'.$dirlist[$i].'.name')));
elseif (function_exists('iconv'))
$name2=iconv('windows-1251', 'utf-8', $name);
else $name2=$name;
$name2=htmlspecialchars($name2);
$size=$post['size'];
if ($set['set_show_icon']==2){
echo " <td rowspan='2' class='icon48'>n";
include H.'loads/inc/icon48.php';
echo " </td>n";
}
elseif ($set['set_show_icon']==1){
echo " <td class='icon14'>n";
include H.'loads/inc/icon48.php';
echo " </td>n";
}
echo " <td class='p_t'>n";
if ($set['echo_rassh']==1)$ras2=".$ras";else $ras2=NULL;
echo "<a href='/loads/?d=".urlencode("$l")."&scr=1&f=".urlencode("$dirlist[$i]")."'>$name2$ras2</a>n";
echo " </td>n";
echo " </tr>n";
echo " <tr>n";
if ($set['set_show_icon']==1)echo " <td class='p_m' colspan='2'>n"; else echo " <td class='p_m'>n";
include H.'loads/inc/opis.php';
echo " </td>n";
echo " </tr>n";
}
echo "</table>n";
if ($k_page>1)str('?',$k_page,$page); // Вывод страниц
echo "<div class="foot">n";
echo "«<a href='/loads/'>Загрузки</a><br />n";
echo "</div>n";
include_once '../sys/inc/tfoot.php';
?>