<header class="c-layout-header c-layout-header-default c-layout-header-default-mobile">
    <div class="c-navbar fix-p-menu">
        <div class="container">
            <!-- BEGIN: BRAND -->
            <div class="c-navbar-wrapper clearfix">
                <div class="c-brand c-pull-left">
                    <a href="/" class="c-logo m-logo">
                        <img src="assets/base/img/layout/logos/logo-1.png" alt="" class="c-desktop-logo m-logo-s2">
                        <img src="assets/base/img/layout/logos/logo-1.png" alt="" class="c-desktop-logo-inverse m-logo-s">
                        <img src="assets/base/img/layout/logos/logo-1.png" alt="" class="c-mobile-logo m-logo-s">
                    </a>
                    <button class="c-hor-nav-toggler" type="button" data-target=".c-mega-menu">
                        <span class="c-line"></span>
                        <span class="c-line"></span>
                        <span class="c-line"></span>
                    </button>
                    <button class="c-search-toggler" type="button">
                        <i class="fa fa-search"></i>
                    </button>
                </div>
                <!-- END: BRAND -->
                <!-- BEGIN: QUICK SEARCH -->
                <form class="c-quick-search" action="#">
                    <input type="text" name="query" placeholder="Type to search..." value="" class="form-control" autocomplete="off">
                    <span class="c-theme-link">&times;</span>
                </form>
                <!-- END: QUICK SEARCH -->
                <!-- BEGIN: HOR NAV -->
                <!-- BEGIN: LAYOUT/HEADERS/MEGA-MENU -->
                <!-- BEGIN: MEGA MENU -->
                <nav class="c-mega-menu c-pull-right c-mega-menu-dark c-mega-menu-dark-mobile c-fonts-uppercase c-fonts-bold">
                    <!-- BEGIN: MEGA MENU -->
                    <ul class="nav navbar-nav c-theme-nav">


                        <?php
                        $emenu=$db->query("SELECT * FROM m_user_menu where usergroup = '0' and parent = '0' AND position=2  order BY id ASC");
                        while($menu=$db->fetchNextArray($emenu)){
                            $emenu1=$db->query("SELECT * FROM m_user_menu where usergroup = '0' and parent = '".$menu['id']."' AND position=2  order BY id ASC");
                            $menu1c = mysql_num_rows($emenu1);

                            if($menu1c>0){?>
                                <li class="c-menu-type-classic">
                                    <a href="<?php echo $globalConfig['baseurl'];?>/<?php echo $menu['link'];?>"
                                       class="c-link dropdown-toggle"><?php echo $menu['title']; ?></a>
                                    <ul class="dropdown-menu c-menu-type-classic c-pull-left">
                                        <?php while($menu1=$db->fetchNextArray($emenu1)){?>
                                            <li>
                                                <a href="<?php echo $globalConfig['baseurl'];?>/<?php echo $menu1['link'];?>"><?php echo $menu1['title']; ?></a>
                                            </li>

                                        <?php } ?>

                                    </ul>
                                </li>

                            <?php }else{?>

                            <?php } } ?>
                        <li class="c-search-toggler-wrapper">
                            <a href="#" class="c-btn-icon c-search-toggler"><i class="fa fa-search"></i></a>
                        </li>
                        <li>
                            <a href="javascript:;" data-toggle="modal" data-target="#login-form" class="c-btn-border-opacity-04 c-btn btn-no-focus c-btn-header btn btn-sm c-btn-border-1x c-btn-white c-btn-circle c-btn-uppercase c-btn-sbold"><i class="fa fa-share-square-o"></i>social</a>
                        </li>
                    </ul>
                    <!-- END MEGA MENU -->
                </nav>
                <!-- END: MEGA MENU -->
                <!-- END: LAYOUT/HEADERS/MEGA-MENU -->
                <!-- END: HOR NAV -->
            </div>
        </div>
    </div>
</header>