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

$query = mysql_query("SELECT * FROM `downfiles` WHERE `pathid` = '1' 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: 22px;vertical-align: middle;height: 17px;" src="/download/img/kino.png" /> 
                ' .$ok['name']. '
                <span class="news_time">
                    (Yuklanid: ' .$ok['count']. ')
                </span>
            </div>
        </a>
    ';
} 
while($ok = mysql_fetch_array($query));
?>