<?php
$papka_id = '10';
$music_count = @ mysql_result(mysql_query("SELECT COUNT(*) FROM `downfiles` WHERE `pathid` = $papka_id "), 0);
echo '<div class="phdr">Musiqalar <span class="count_phdr">' .$music_count. '</span></div>';

$qiymat = mysql_query("SELECT * FROM `downfiles` WHERE `pathid` = $papka_id      AND `status` = '1' ORDER BY `time` DESC LIMIT " . $start . "," . $kmess); 
$gsm = mysql_fetch_array($qiymat); 
$gsm['name'] = str_replace('||||','',$gsm['name']); 
$gsm['name'] .= str_replace($gsm['name'],'','_www_bmaster_net'); 
$totalk = mysql_result(mysql_query("SELECT COUNT(*) FROM `downkomm` WHERE `fileid` = '" . $gsm['id'] . "';"), 0);
do { 
    echo '
        <a href="/download/loadfile.php?down=' .$gsm['way']. '">
            <div class="cmenu">
                <img style="width: 24px;vertical-align: middle;height: 17px;" src="/download/img/music.png" /> 
                ' .$gsm['name']. '
                <span class="news_time">
                    (Yuklanid: ' .$gsm['count']. ')
                </span>
            </div>
        </a>
    ';
} 
while($gsm = mysql_fetch_array($qiymat));

if ($qiymat > $kmess){
    echo'<div class="topmenu">' . functions::display_pagination('index.php?sahifa=gsm&amp;', $start, $qiymat, $kmess) . '</div>';
}
?>