<?php
$muzika_count = @ mysql_result(mysql_query("SELECT COUNT(*) FROM `downfiles` WHERE `pathid` = '3'"), 0);
echo '<div class="phdr">Musiqalar <span class="count_phdr">' .$muzika_count. '</span></div>';
/*
=====================================
Faylni yuklash
=====================================
*/
/*
$query = mysql_query("SELECT * FROM `downfiles` WHERE `pathid` = '3' AND `status` = '1' ORDER BY `time` DESC LIMIT 5"); 
$ok = mysql_fetch_array($query); 
$ok['name'] = str_replace('||||','',$ok['name']); 
$totalk = mysql_result(mysql_query("SELECT COUNT(*) FROM `downkomm` WHERE `fileid` = '" . $ok['id'] . "';"), 0);
do { 
    echo '
        <a href="/download/loadfile.php?down=' .$ok['way']. '">
            <div class="cmenu">
                <img style="width: 15px;vertical-align: middle;height: 15px;" src="/download/img/music.png" /> 
                ' .$ok['name']. '
                <span style="font-size: 10px;">
                    (Yuklanid: ' .$ok['count']. ')
                </span>
                <span class="news_time">
                    Hajmi:'.size_convert($ok['size']).'
                </span>
            </div>
        </a>
    ';
} 
while($ok = mysql_fetch_array($query));
*/
/*
=====================================
Faylni yuklash uchun sahifaga o'tish
=====================================
*/
$query = mysql_query("SELECT * FROM `downfiles` WHERE `pathid` = '3' AND `status` = '1' ORDER BY `time` DESC LIMIT " . $start . "," . $kmess); 
while($ok = mysql_fetch_array($query)) {
    $okway = str_replace('.png', '_'.$ok['id'].'.html', $ok['way']);
    $okway = str_replace('.jpg', '_'.$ok['id'].'.html', $ok['way']);
    $okway = str_replace('.gif', '_'.$ok['id'].'.html', $ok['way']);
    $okway = str_replace('rasmlar/', '', $okway);
    $ok['name'] = str_replace('||||','',$ok['name']); 
    $totalk = mysql_result(mysql_query("SELECT COUNT(*) FROM `downkomm` WHERE `fileid` = '" . $ok['id'] . "';"), 0);
    echo '
        <a href="/download/' .$okway  . '">
            <div class="cmenu"> <img style="float: right;margin-left: 10px;" src="/download/img/new.png" alt="." />
                <img style="width: 15px;vertical-align: middle;height: 15px;" src="/download/img/music.png" /> 
                ' .$ok['name']. '
                <span style="font-size: 10px;">
                    (Yuklanid: ' .$ok['count']. ')
                </span>
                <span class="news_time">
                    Hajmi:'.size_convert($ok['size']).'
                </span>
                
            </div>
        </a>
    ';
} 
        if ($muzika_count > $kmess){
            echo'<div class="topmenu">';
            echo '' . functions::display_pagination('index.php?cat='.$cat.'&amp;', $start, $muzika_count, $kmess) . '</div>';
        }

?>