<?php
defined('_IN_JOHNCMS') or die('Error: restricted access');

$headmod = isset($headmod) ? mysql_real_escape_string($headmod) : '';
$textl = isset($textl) ? $textl : 'MMUZON MEDIA';
/*
-----------------------------------------------------------------
Выводим HTML заголовки страницы, подключаем CSS файл
-----------------------------------------------------------------
*/
echo'<!doctype html>' .
    "\n" . '<!--[if IE 8]><html class="ie8 lt-ie10"><![endif]-->' .
    "\n" . '<!--[if IE 9]><html class="ie9 lt-ie10"><![endif]-->' .
    "\n" . '<!--[if gt IE 9]><!--><html lang="en"><!--<![endif]-->' .
    "\n" . '<head>' .
    "\n" . '<meta charset="utf-8">' .
    "\n" . '<meta http-equiv="X-UA-Compatible" content="IE=edge">' .
    "\n" . '<meta name="viewport" content="width=device-width, initial-scale=1">' .
    "\n" . '' .
    "\n" . '<!-- CSRF Token -->' .
    "\n" . '<meta name="csrf-token" content="">' .
    "\n" . '<link rel="icon" type="image/png" href="'.$set['homeurl'].'/icons/favicon.png">' .
    "\n" . '' .
    "\n" . '<title>'.$textl.'</title>' .
    "\n" . '' .
    "\n" . '<!-- Styles -->' .
    "\n" . '<link href="'.$set['homeurl'].'/css/app.css" rel="stylesheet">' .
    "\n" . ''.
    "\n" . '<!-- Custom styles for this template -->' .
    "\n" . '<link rel="stylesheet" type="text/css" href="'.$set['homeurl'].'/fonts/font-awesome-4.7.0/css/font-awesome.min.css">' .
    "\n" . '<link rel="stylesheet" type="text/css" href="'.$set['homeurl'].'/css/akmyradoffsoft.css">' .
    "\n" . '<link rel="stylesheet" type="text/css" href="'.$set['homeurl'].'/dist/assets/owl.carousel.min.css">' .
    "\n" . '<link rel="stylesheet" type="text/css" href="'.$set['homeurl'].'/dist/assets/owl.theme.default.min.css">' .
    "\n" . '' .
    "\n" . '<link href="'.$set['homeurl'].'/css/slideout.css" rel="stylesheet">' .
    "\n" . '<link href="'.$set['homeurl'].'/css/yeketak.css" rel="stylesheet">' .
    "\n" . '</head>' .
    "\n" . '<body>' . core::display_core_errors();

echo '<nav id="menu">
    <div class="header">
        <div class="logo">
            <img src="'.$set['homeurl'].'/icons/MMUZON.svg" alt="mmuzon-logo"style="height: 48px;">
        </div>
    </div>

    <div class="sidebar-menu">
        <a href="'.$set['homeurl'].'/audios" class="menu-item">
            <img src="'.$set['homeurl'].'/icons/drawer-music.svg" alt="songs" width="20px"> Aýdymlar
        </a>

        <a href="'.$set['homeurl'].'/videos" class="menu-item">
            <img src="'.$set['homeurl'].'/icons/drawer_clips.svg" alt="video" width="20px"> Şekiller
        </a>

        <a href="'.$set['homeurl'].'/hits" class="menu-item">
            <img src="'.$set['homeurl'].'/icons/drawer_hits.svg" alt="hits" width="20px"> Hitlar
        </a>
        <hr>

        <a href="'.$set['homeurl'].'/contact" class="menu-item">
            <img src="'.$set['homeurl'].'/icons/drawer_contact.svg" alt="music" width="20px"> Habarlaşmak
        </a>
    </div>

    <div class="footer">
        developed at <a target="_blank" href="https://yeketak.ru/@akmyradoffsoft" class="footer-link">AkmyradoffSoft</a>
    </div>
</nav>';



if ($headmod == 'login' || $headmod == 'register'){
echo '<main id="panel" style="background-image: url('.$set['homeurl'].'/icons/login_bg.png);
      background-repeat: no-repeat;
      background-size: cover">
<header class="fixedheader" style="position: fixed!important;">
        <div class="header header_dark" id="head" >';
}else{
echo '<main id="panel">
    <header class="fixedheader">
   <div class="header" id="head">';
}

           echo '<div class="hamburg js-slideout-toggle">
                <img src="'.$set['homeurl'].'/icons/drawer.svg" alt="hamburger">
            </div>

            <div class="logo">
                <a href="'.$set['homeurl'].'"><img src="'.$set['homeurl'].'/icons/MMUZON.svg" alt="saylanan-logo" width="140px"></a>
            </div>

            <div class="profile">
                <ul class="navbar-nav ml-auto">
                                            <li class="nav-item" style="">
                            <a style="text-decoration: none;" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                <img src="'.$set['homeurl'].'/icons/profile_img.svg" alt="profile-icon">
                            </a>';
if($user_id){
                       echo '<div class="dropdown-menu" aria-labelledby="navbarDropdown">
                                <a class="dropdown-item" href="'.$set['homeurl'].'/logout">
                                    Çyk
                                </a>
                             </div>';
}else{
                       echo '<div class="dropdown-menu" aria-labelledby="navbarDropdown">
                            <a class="dropdown-item" href="'.$set['homeurl'].'/login">Içeri gir</a>
                            <a class="dropdown-item" href="'.$set['homeurl'].'/register">Täze hasap döret</a>
                        </div>';
}
                                echo '<form id="logout-form" action="'.$set['homeurl'].'/logout" method="POST" style="display: none;">
                                    <input type="hidden" name="_token" value="">
                                </form>
                            
                        </li>
                                        </ul>
            </div>

            <div class="clearfix"></div>
        </div>
    </header>';
if ($headmod == 'login' || $headmod == 'register' || $headmod == 'contact' || $headmod == 'mediafile'){
}else{
echo '<section id="app" class="py-4" style="padding-bottom: 2px!important;">
            <div class="container">
        <form action="'.$home.'/download/search.php" method="GET">
            <div class="form-group">
                <div class="input-group">
                    <input class="form-control search" type="text" name="search" value="" placeholder="Gözleg"/>
                    <button class="btn btn-warning search-icon" type="submit"><img src="'.$home.'/icons/search.svg" alt="search"></button>
                </div>
            </div>
        </form>
';
}