<?php
 $url=$_SERVER['REQUEST_URI'];
?>
<header id="header">
                <div class="wpo-site-header">
                    <nav class="navigation navbar navbar-expand-lg navbar-light">
                        <div class="container-fluid">
                            <div class="row align-items-center">
                                <div class="col-lg-3 col-md-3 col-3 d-lg-none dl-block">
                                    <div class="mobail-menu">
                                        <button type="button" class="navbar-toggler open-btn">
                                            <span class="sr-only">Toggle navigation</span>
                                            <span class="icon-bar first-angle"></span>
                                            <span class="icon-bar middle-angle"></span>
                                            <span class="icon-bar last-angle"></span>
                                        </button>
                                    </div>
                                </div>
                                <div class="col-lg-2 col-md-6 col-6">
                                    <div class="navbar-header">
                                        <a class="navbar-brand" href="./"><img src="resimler/<?=$ayar['logo']?>" alt="<?=$ayar['site_title']?>"></a>
                                    </div>
                                </div>
                                <div class="col-lg-8 col-md-1 col-1">
                                    <div id="navbar" class="collapse navbar-collapse navigation-holder">
                                        <button class="menu-close"><i class="ti-close"></i></button>
                                        <ul class="nav navbar-nav mb-2 mb-lg-0">
                                            <li >
                                                <a <?php if($url=='/'){?>class="active"<?php }?> href="./">Anasayfa</a>
                                               
                                            </li>
                                            <li class="menu-item-has-children">
                                                <a href="#">Kurumsal</a>
                                                <ul class="sub-menu">
                                                      
                            <?php
                            $cek=$db->query("select * from sayfalar where durum='on' order by sira asc")->fetchAll(PDO::FETCH_ASSOC);
							foreach($cek as $goster){
							?>
                                                    <li><a href="<?=$goster['seo']?>"><?=$goster['adi']?></a></li>
                                                 <?php }?>
                                                </ul>
                                            </li>
                                           
                                            <li><a  <?php if($url=='/galeri'){?>class="active"<?php }?> href="galeri">Albümler</a></li>
                                             <li><a  <?php if($url=='/referanslar'){?>class="active"<?php }?> href="referanslar">Referanslar</a></li>
                                             <li><a   <?php if($url=='/canli-yayin'){?>class="active"<?php }?>href="canli-yayin">Canlı Yayın</a></li>
                                            <li class="menu-item-has-children">
                                                <a href="#">Hizmetler</a>
                                                <ul class="sub-menu">
                                                                                     
                            <?php
                            $cek=$db->query("select * from hizmet_kategori where durum='on' and kategori='0' order by sira asc")->fetchAll(PDO::FETCH_ASSOC);
							foreach($cek as $goster){
							?>
                                                    <li class="menu-item-has-children">
                                                        <a href="#"><?=$goster['adi']?> </a>
                                                        <ul class="sub-menu">
                                                            
                                                                  <?php
                                                                  $hid = $goster['id'];
                            $cek=$db->query("select * from hizmet_kategori where durum='on' and kategori='$hid' order by sira asc")->fetchAll(PDO::FETCH_ASSOC);
							foreach($cek as $goster){
							?>
                                                            <li><a href="<?=$goster['seo']?>"><?=$goster['adi']?></a>
                                                            </li>
                                                              <?php }?>
                                                        </ul>
                                                    </li>
                                                    <?php }?>
                                                </ul>
                                            </li>
                                            <li><a  <?php if($url=='/iletisim'){?>class="active"<?php }?> href="iletisim">İletişim</a></li>
                                        </ul>

                                    </div>
                                </div>
                                <div class="col-lg-2 col-md-2 col-2">
                                    <div class="header-right">
                                        <div class="header-search-form-wrapper">
                                            <div class="cart-search-contact">
                                                <button class="search-toggle-btn"><i class="fi flaticon-search"></i></button>
                                                <div class="header-search-form">
                                                    <form>
                                                        <div>
                                                            <input type="text" class="form-control" placeholder="Search here...">
                                                            <button type="submit"><i class="fi flaticon-search"></i></button>
                                                        </div>
                                                    </form>
                                                </div>
                                            </div>
                                        </div>
                                        
                                    </div>
                                </div>
                            </div>
                        </div>
                    </nav>
                </div>
            </header>