<?php echo !defined("GUVENLIK") ? die("Erisim Engellendi!.") : null;?>
<?php
if(strip_tags(isset($_GET['id'])))
{
	$aSorgu = $db->prepare("SELECT * FROM hizmetler WHERE seo = ? AND durum = ? AND dil = ?");
	$aSorgu->execute(array($_GET['id'],1,$_SESSION['k_dil']));
	if($aSorgu->rowCount()){
		$aSonuc 		= $aSorgu->fetch(PDO::FETCH_ASSOC);
	}else{
		header("Location:".$url.(altklasor == "1" ? '/' : '')."404".$html."");
		exit();
	}
}
else
{
	$aSorgu = $db->prepare("SELECT * FROM hizmetler WHERE durum = ? AND dil = ? ORDER BY id ASC");
	$aSorgu->execute(array(1,$_SESSION['k_dil']));
	if($aSorgu->rowCount()){
		$aSonuc 		= $aSorgu->fetch(PDO::FETCH_ASSOC);
	}else{
		header("Location:".$url.(altklasor == "1" ? '/' : '')."404".$html."");
		exit();
	}
}
$menubul 	= $db->query("SELECT * FROM menu WHERE menu_url = '".$htc['hizmetdetayurl']."/".$aSonuc['seo']."' OR link = '".$htc['hizmetdetayurl']."/".$aSonuc['seo']."' AND dil = '{$_SESSION['k_dil']}'")->fetch(PDO::FETCH_ASSOC);
$menubas 	= $db->query("SELECT * FROM menu WHERE id = '{$menubul['menu_ust']}' AND dil = '{$_SESSION['k_dil']}'")->fetch(PDO::FETCH_ASSOC);		
?>
<!-- Start main-content -->
<div class="main-content">

	<!-- Section: inner-header -->
    <section class="inner-header bg-lighter">
		<div class="container pt-10 pb-10">
			<!-- Section Content -->
			<div class="section-content">
				<div class="row d-ortala">
					<div class="col-md-11">
						<h3 class="font-30 mb-0 mt-10"><?php echo $aSonuc['adi'];?></h3>
						<ol class="breadcrumb text-black mt-0 mb-10">
							<li><a href="<?php echo $htc['anaurl'];?><?php echo $html;?>"><?=@$dil['txt56'];?></a></li>
							<?php if($menubas['menu_isim'] != ""){?>
							<li><a href="<?php echo($menubas['menu_url'] == "0" ? $menubas['link'] : $menubas['menu_url'].$html);?>"><?php echo ilkbuyuk($menubas['menu_isim']);?></a></li>
							<?php }?>
							<li class="active text-theme-colored"><?php echo $aSonuc['adi'];?></li>
						</ol>
					</div>
					<div class="col-md-1">
						<a href="javascript:history.back();" class="sayfa-geri"><span class="icon"><i class="fas fa-arrow-left"></i></span><?=@$dil['txt57'];?></a>
					</div>
				</div>
			</div>
		</div>
	</section>

    <!-- Section: Blog -->
    <section>
        <div class="container pt-50 pb-50">
            <div class="row">
                <div class="col-md-8 blog-pull-right">
                    <div class="single-service">
						<?php if($aSonuc['resim'] != ""){?>
                        <img src="<?php echo tema;?>/uploads/hizmetler/<?php echo $aSonuc['resim'];?>" alt="<?php echo $aSonuc['adi']; ?>">
						<?php }?>
                        <h3 class="text-theme-colored line-bottom text-theme-colored"><?php echo $aSonuc['adi']; ?></h3>
                        <?php echo $aSonuc['aciklama']; ?>
                    </div>
                </div>
                <div class="col-sm-12 col-md-4">
                    <div class="sidebar sidebar-left mt-sm-30">
						<?php if($menubas['menu_isim'] != ""){?>
                        <div class="widget">
                            <h4 class="widget-title line-bottom"><a href="<?php echo($menubas['menu_url'] == "0" ? $menubas['link'] : $menubas['menu_url']);?>"><span class="text-theme-color-2"><?php echo $menubas['menu_isim'];?></span></a></h4>
                            <div class="services-list">
                                <ul class="list list-border angle-double-right">
								<?php $MENUSorgu = $db->prepare("SELECT * FROM menu WHERE menu_durum = ? AND menu_ust = ? AND dil = ?  ORDER BY menu_sira ASC");
								$MENUSorgu->execute(array("1",$menubul['menu_ust'],$_SESSION['k_dil']));
								$MENUislem = $MENUSorgu->fetchALL(PDO::FETCH_ASSOC);?>
									<?php foreach ( $MENUislem as $MENUSonuc ){?>
									<li class="<?php echo($MENUSonuc['menu_url'] == $aSonuc['seo'] ? 'active' : '' );?>"><a <?php echo($MENUSonuc['sekme'] == 1 ? 'target="_blank"' : '');?> href="<?php echo($MENUSonuc['menu_url'] == "0" ? $MENUSonuc['link'] : $MENUSonuc['menu_url']); ?>"><?php echo $MENUSonuc['menu_isim']; ?></a></li>
									<?php }?>
                                </ul>
                            </div>
                        </div>
						<?php }else{?>
						<div class="widget">
                            <h4 class="widget-title line-bottom"><a href="<?php echo $htc['hizmeturl'];?><?php echo $html;?>"><span class="text-theme-color-2"><?=@$dil['txt104'];?></span></a></h4>
                            <div class="services-list">
                                <ul class="list list-border angle-double-right">
								<?php $SSorgu = $db->prepare("SELECT * FROM hizmetler WHERE durum = ? AND dil = ? ORDER BY id DESC");
								$SSorgu->execute(array("1",$_SESSION['k_dil']));
								$islem = $SSorgu->fetchALL(PDO::FETCH_ASSOC);?>
									<?php foreach ( $islem as $SSonuc ){?>
                                    <li class="<?php echo($SSonuc['seo'] == $aSonuc['seo'] ? 'active' : '' );?>"><a href="<?php echo $htc['hizmetdetayurl']; ?>/<?php echo $SSonuc['seo']; ?><?php echo $html;?>"><?php echo $SSonuc['adi']; ?></a></li>
									<?php }?>
                                </ul>
                            </div>
                        </div>
						<?php }?>
						
						<?php if($moduller['alan23'] == "1"){?>
						<div class="col-box">
							<a href="<?php echo $htc['fotourl']; ?><?php echo $html;?>">
								<i class="icon fa fa-image"></i>
								<div class="photo"><img src="<?php echo tema;?>/uploads/arkaplan/arkaplan4/<?php echo $arkaplan['arkaplan4'];?>"></div>
								<div class="caption"><h1><?=@$dil['txt65'];?></h1></div>
							</a>
						</div>
						<?php }?>
						
						<?php if($moduller['alan24'] == "1"){?>
						<div class="col-box">
							<a href="<?php echo $htc['videourl']; ?><?php echo $html;?>">
								<i class="icon fa fa-play"></i>
								<div class="photo"><img src="<?php echo tema;?>/uploads/arkaplan/arkaplan5/<?php echo $arkaplan['arkaplan5'];?>"></div>
								<div class="caption"><h1><?=@$dil['txt66'];?></h1></div>
							</a>
						</div>
						<?php }?>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
<!-- end main-content -->