<?php
define('_IN_JOHNCMS', 1);
$headmod = 'music';
require_once '../incfiles/core.php';
require_once 'functions.php';

$cat = $_GET['saylaw'];

if($cat == 'singer'){
$textl = 'Aýdymçylar';
}
if($cat == 'likes'){
$textl = 'Halananlar';
}
if($cat == 'aydym'){
$textl = 'Aýdymlar';
}
if($cat == 'video'){
$textl = 'Klipler';
}

require_once '../incfiles/head.php';







if($cat == 'likes'){
echo '
<main class="mt-3 pt-2 px-2 p-xl-5">
    <aside class="container col-12 col-lg-7 p-2 p-xl-5">
	<div class="d-flex justify-content-center ">
        <h4 class="music-title ">
           <img src="'.$home.'/dist/img/like.svg" width="22">
           Halananlar
        </h4>
    </div>
     <section>';


$req = mysql_query("SELECT * FROM `yuklemeler` WHERE `cat` = '1' AND `status` = '1' AND `like` >= '6' ORDER BY `time` DESC LIMIT 10");
while ($res = mysql_fetch_array($req)) {

$foto = mysql_query("SELECT * FROM `skreen` WHERE `fid` = '" . $res['id'] . "'");
$surat = mysql_fetch_array($foto);

if(empty($surat['url'])){
$mfoto = ''.$home.'/dist/img/logo.png';
}else{
$mfoto = ''.$home.'/uploads/music/img/'.$surat['url'].'';
}
echo '

            <div class="card-music d-flex align-items-center ">
            <img src="'.$mfoto.'" alt="'.$res['singer'].' - '.$res['name'].'" width="40px">
            <a href="'.$home.'/musics/'.$res['link'].'">
                <span class="d-flex flex-column ml-3">
                    <span class="music-name">
                        '.$res['name'].'
                    </span>
                    <span class="music-author pt-2">
                        '.$res['singer'].'
                    </span>
                </span>
                
            </a><div class="ml-auto">
            	<a href="'.$home.'/yukle/'.$res['link'].'" class="music-download mr-4">
                    <svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" size="25" height="25" width="25" xmlns="http://www.w3.org/2000/svg"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>
            	</a>
            </div>
        </div>
';
}


echo '

    </section>

</aside></main>
';
}

if($cat == 'aydym'){
echo '
<main class="mt-3 pt-2 px-2 p-xl-5">
    <aside class="container col-12 col-lg-7 p-2 p-xl-5">
	<div class="d-flex justify-content-center ">
        <h4 class="music-title ">
           <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><g><path fill="none" d="M0 0h24v24H0z"></path><path d="M12 13.535V3h8v2h-6v12a4 4 0 1 1-2-3.465zM10 19a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"></path></g></svg>
           Aýdymlar
        </h4>
    </div>
     <section>';


$req = mysql_query("SELECT * FROM `yuklemeler` WHERE `cat` = '1' AND `status` = '1' ORDER BY `time` DESC LIMIT 10");
while ($res = mysql_fetch_array($req)) {

$foto = mysql_query("SELECT * FROM `skreen` WHERE `fid` = '" . $res['id'] . "'");
$surat = mysql_fetch_array($foto);

if(empty($surat['url'])){
$mfoto = ''.$home.'/dist/img/logo.png';
}else{
$mfoto = ''.$home.'/uploads/music/img/'.$surat['url'].'';
}
echo '

            <div class="card-music d-flex align-items-center ">
            <img src="'.$mfoto.'" alt="'.$res['singer'].' - '.$res['name'].'" width="40px">
            <a href="'.$home.'/musics/'.$res['link'].'">
                <span class="d-flex flex-column ml-3">
                    <span class="music-name">
                        '.$res['name'].'
                    </span>
                    <span class="music-author pt-2">
                        '.$res['singer'].'
                    </span>
                </span>
                
            </a><div class="ml-auto">
            	<a href="'.$home.'/yukle/'.$res['link'].'" class="music-download mr-4">
                    <svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" size="25" height="25" width="25" xmlns="http://www.w3.org/2000/svg"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>
            	</a>
            </div>
        </div>
';
}


echo '

    </section>

</aside></main>
';
}

if($cat == 'video'){
echo '
<main class="mt-3 pt-2 px-2 p-xl-5">
    <aside class="container col-12 col-lg-7 p-2 p-xl-5">
	<div class="d-flex justify-content-center ">
        <h4 class="music-title ">
             <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M719.4 499.1l-296.1-215A15.9 15.9 0 0 0 398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 0 0 0-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"></path></svg>
             Klipler
        </h4>
    </div>
     <section>';


$req = mysql_query("SELECT * FROM `yuklemeler` WHERE `cat` = '2' AND `status` = '1' ORDER BY `time` DESC LIMIT 10");
while ($res = mysql_fetch_array($req)) {

$foto = mysql_query("SELECT * FROM `skreen` WHERE `fid` = '" . $res['id'] . "'");
$surat = mysql_fetch_array($foto);

if(empty($surat['url'])){
$mfoto = ''.$home.'/dist/img/logo.png';
}else{
$mfoto = ''.$home.'/uploads/video/img/'.$surat['url'].'';
}
echo '

            <div class="card-music d-flex align-items-center ">
            <img src="'.$mfoto.'" alt="'.$res['singer'].' - '.$res['name'].'" width="40px">
            <a href="'.$home.'/videos/'.$res['link'].'">
                <span class="d-flex flex-column ml-3">
                    <span class="music-name">
                        '.$res['name'].'
                    </span>
                    <span class="music-author pt-2">
                        '.$res['singer'].'
                    </span>
                </span>
                
            </a><div class="ml-auto">
            	<a href="'.$home.'/yukle/'.$res['link'].'" class="music-download mr-4">
                    <svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" size="25" height="25" width="25" xmlns="http://www.w3.org/2000/svg"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>
            	</a>
            </div>
        </div>
';
}

echo '

    </section>

</aside></main>
';
}





require_once '../incfiles/end.php';
?>