Файл: public_html/download/sek.php
Строк: 27
<?php
$cat = intval($_GET['cat']);
$cat_inf = mysql_query("SELECT * FROM `downpath` WHERE `id` = '" . $cat . "' LIMIT 1");
if(mysql_num_rows($cat_inf)){
$cat_inf = mysql_fetch_assoc($cat_inf);
}else{
$cat_inf = array('way' => '');
}
$totalfile = mysql_result(mysql_query("SELECT COUNT(*) FROM `downfiles` WHERE `type` != 1 AND `status` = 1 && `way` LIKE '" . $cat_inf['way'] ."%'"), 0);
if($totalfile > 100){ $totalfile = 100; }
$zap = mysql_query("SELECT * FROM `downfiles` WHERE `type` != 1 AND `status` = 1 && `way` LIKE '" . $cat_inf['way'] ."%' ORDER BY `time` DESC LIMIT " . $start . "," . $kmess);
while ($zap2 = mysql_fetch_array($zap)) {
echo ($i % 2) ? '<div class="menu">' : '<div class="menu">';
$i;
$tf = pathinfo($zap2['way'], PATHINFO_EXTENSION); // Тип файла
if($tf == 'mp3'){
$set_view = array('variant' => 1);
}else{
$set_view = array('variant' => 1,
'size' => 1, 'desc' => 1, 'count' => 1, 'div' => 1,
'comments' => 1, 'add_date' => 1, 'rating' => 1, 'way_to_path' => 1);
}
echo f_preview($zap2, $set_view, $tf);
echo '</div>';
}
if ($totalfile > $kmess){
echo '<div class="phdr">' . functions::display_pagination('index.php?act=new&cat='.$cat.'&', $start, $totalfile, $kmess) . '';
echo '</div>';}
?>