<?php
//include_once $SERVER['DOCUMENT_ROOT'].'download/functions.php';
echo '<div class="phdr">Узбекская Музыка</a></div>';
$cat ='1';
$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' => ''); 
} 
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `downfiles` WHERE `type` != 1 AND `status` = 1 && `way` LIKE '" . $cat_inf['way'] ."%'"), 0); 
$zap = mysql_query("SELECT * FROM downfiles WHERE type != 1 AND status= 1 && way LIKE '" . $cat_inf['way'] ."%' ORDER BY time DESC LIMIT 10");
while ($ok = mysql_fetch_array($zap)) { 
echo '<div class="menu">';
$i; 
$ok['name'] = str_replace('||||','',$ok['name']); 
$new = mysql_result(mysql_query("SELECT COUNT(*) FROM `downfiles` WHERE `time` > '" . (time() - 86400) . "' AND `id` = '" . $ok['id'] . "'"), 0); 
$scr = mysql_result(mysql_query("SELECT COUNT(*) FROM `downscreen` WHERE `fileid` = '".$viewf."'"), 0);
    if ($scr)
    {
        
        $screen = mysql_query("SELECT * FROM `downscreen` WHERE `fileid` = '".$viewf."'");
        $i = 1;
        while ($screen1 = mysql_fetch_array($screen))
        {
            if ($i == 1)
            {
 if ($down_setting['screenshot'])

echo "<img style='border: 2px #6c6666 solid;
   border-radius: 50%;
   box-shadow:
   0 1px 4px rgba(0, 0, 0, .3),
   -23px 0 20px -23px rgba(0, 0, 0, .8),
   23px 0 20px -23px rgba(0, 0, 0, .8),
   0 0 40px rgba(0, 0, 0, .1) inset;'
   src='/graftemp/" . $screen1[way] . " width='45' height='45' >
 <a href='/download/" . str_replace(' ', '_', $ok['name']) . "_".$ok['id'].".html'> ".$ok['name']." </font></a><div style='float: right;'><br><a href='/download/files/".$ok['way']."'><i class='fa fa-download' aria-hidden='true'></i></a></div>";

          }
} 
 } else { echo "<img style='border: 2px #6c6666 solid;
   border-radius: 50%;
   box-shadow:
   0 1px 4px rgba(0, 0, 0, .3),
   -23px 0 20px -23px rgba(0, 0, 0, .8),
   23px 0 20px -23px rgba(0, 0, 0, .8),
   0 0 40px rgba(0, 0, 0, .1) inset;'
   src='/images/cower.png' width='45' height='45' >
 <a href='/download/" . str_replace(' ', '_', $ok['name']) . "_".$ok['id'].".html'> ".$ok['name']." </font></a><div style='float: right;'><br><a href='/download/files/".$ok['way']."'><i class='fa fa-download' aria-hidden='true'></i></a></div>"; }

if($ok['count'] > 50){
echo '<img src="Davlat/hit.png">';
}

echo "</div>";


}

if ($total > $kmess){ 
echo '<div class="menu">' . functions::display_pagination('?get=fayl&amp;', $start, $total, $kmess) . '</div>';	}

echo '<div class="menu"><i class="fa fa-toggle-on" aria-hidden="true"></i><a href="/download/dir_1.html"> Barchasini ko\'rish...</a></div>';

?>