<?php
if($_GET["islem"]=="duye"){
	$konum="uyeler";
	if ($jsi["is6"]==1 or $authority==0){
		$style="disabled";
		$btn_img="lock";
	}
}elseif($_GET["islem"]=="dkayit"){
	$konum="kayitlar";
	if ($authority==0){
		$style="disabled";
		$btn_img="lock";
	}
}elseif($_GET["islem"]=="dform"){
	$konum="form";
}elseif($_GET["islem"]=="dservice"){
	$konum="dservice";
	if ($authority==0){
		$style="disabled";
		$btn_img="lock";
	}
}elseif($_GET["islem"]=="dgorev"){
	$konum="gorev";
	if ($authority==0){
		$style="disabled";
		$btn_img="lock";
	}
}elseif ($_GET["islem"]=="dsayfa" and $_GET["ne"]=="sayfa"){
	$konum="sayfa";
	if ($authority==0 or $rs["s6"]==1){
		$style="disabled";
		$btn_img="lock";
	}
}elseif ($_GET["islem"]=="dsayfa" and $_GET["ne"]=="haber"){
	$konum="sayfa";
	if ($authority==0 or $rs["s6"]==1){
		$style="disabled";
		$btn_img="lock";
	}
}elseif ($_GET["islem"]=="dsayfa" and $_GET["ne"]=="msayfa"){
	$konum="sayfa";
}elseif ($_GET["islem"]=="dsayfa" and ($_GET["ne"]<>"sayfa" or $_GET["ne"]<>"haber" or $_GET["ne"]<>"msayfa")){
	$konum="sayfa";
}elseif ($_GET["islem"]=="s_detay"){
	$konum="siparis";
	if ($authority==0){
		$style="disabled";
		$btn_img="lock";
	}
}elseif ($_GET["islem"]=="dreklam"){
	$konum="reklam";
	if ($authority==0 or $rs["s6"]==1){
		$style="disabled";
		$btn_img="lock";
	}
}elseif ($_GET["islem"]=="ifatura"){
	$konum="ifatura";
	if ($authority==0){
		$style="disabled";
		$btn_img="lock";
	}
}elseif ($_GET["islem"]=="afatura"){
	$konum="afatura";
	if ($authority==0){
		$style="disabled";
		$btn_img="lock";
	}
}elseif ($_GET["islem"]=="sfatura"){
	$konum="sfatura";
	if ($authority==0){
		$style="disabled";
		$btn_img="lock";
	}
}
if($_GET["sayfa"]<>""){$_SESSION["sayfa"]=$_GET["sayfa"];}
if($_GET["s2"]<>""){$_SESSION["s2"]=$_GET["s2"];}
if($_GET["s9"]<>""){$_SESSION["s9"]=$_GET["s9"];}
if($_GET["key"]<>""){$_SESSION["key"]=$_GET["key"];}
?>
<div id="control-bar" class="grey-bg clearfix  no-margin">
	<div class="container_12">
		<div class="float-left">
			<button class="btn btn-default hvr-bounce-to-right" type="button" onClick="location.href='?ne=<?php echo $_GET["ne"]?>&islem=<?php echo $konum?>&sayfa=<?php echo $_SESSION["sayfa"]?>&s2=<?php echo $_SESSION["s2"]?>&s9=<?php echo $_SESSION["s9"]?>&key=<?php echo $_SESSION["key"]?>'"><i class="fa fa-chevron-circle-left" aria-hidden="true"></i><span class="mdn"> <?php echo $sdil[205]; //Geri?></span></button>
		</div>
		<div class="float-right">
				<?php if($_GET["islem"]=="ayarlar" or $_GET["islem"]=="design"){?>
					<button data-href="#set" class="scroller btn btn-success hvr-sweep-to-right savebtn hvr-bounce-to-right" type="button" onclick="Pcke('modules/public/settings_ajax.php?ne=<?php echo $_GET["ne"]?>&islem=<?php echo $_GET["islem"]?>&id=<?php echo $_GET["id"]?>&durum=kaydet','#asave','#err','2000','cke');" <?php if($authority==0){echo "disabled"; }?>>
				<?php }else{?>
					<button class="btn btn-success hvr-sweep-to-right savebtn" id="savebtn" <?php if($_GET["islem"]=="dsayfa" || $_GET["islem"]=="dkayit" || $_GET["islem"]=="duye" || $_GET["islem"]=="dreklam" || (($_GET["islem"]=="dservice" || $_GET["islem"]=="sfatura" || $_GET["islem"]=="afatura" || $_GET["islem"]=="ifatura") and $_GET["id"]<>"")){?>type="button" onclick="AjaxKaydet('','');"<?php }else{?>type="submit"<?php }?> <?php //if($authority==0){echo "disabled"; }?>>
				<?php }?>
					<?php if($_GET["islem"]=="tmail" or $_GET["islem"]=="tsms"){?><i class="fa fa-paper-plane" aria-hidden="true"></i> Gönder<?php }elseif(substr($_GET["islem"],0,6)=="fatura" and $_GET["id"]==""){?><i class="fa fa-plus" aria-hidden="true"></i> Ekle<?php }else{?><i class="fa fa-refresh" aria-hidden="true"></i> <?php echo $sdil[203]; //Güncelle?><?php }?>
				</button>
				<button class="scroller btn btn-success hvr-sweep-to-right hvr-bounce-to-right" data-toggle="dropdown" style="margin-left: -5px; border-left: 0px; border-radius: 0px 5px 5px 0px;"><i class="fa fa-ellipsis-v"></i></button>
				<div class="dropdown-menu dropdown-menu-right btn-edit-row" x-placement="top-end" style="position: absolute; transform: translate3d(105px, -2px, 0px); top: 0px; left: 0px; will-change: transform;">
					<a style="cursor:pointer;" class="v3-btn v3-btn-warning dropdown-item tal mfrm" data-toggle="modal" data-target="#myModal" data-width="50%" data-url="modules/public/add.php?ne=<?php echo $_GET['ne'];?>&islem=<?php echo $sislem;?>&durum=y<?php echo $_GET['ne'];?>" data-title="<?php echo $sdil[200]; //Yeni?> <?php echo $nedir;?>" onclick="AjaxKaydet('','');" <?php if($authority==0){echo "disabled"; }?>><i class="fa fa-pencil "></i> <?php echo $sdil[198]; //Kaydet & Yeni?></a>
				</div>
				<?php if($_GET["islem"]=="dsayfa" or $_GET["islem"]=="dkayit"){?>
					<?php if($_GET["ne"]<>"ayarlar"){?>
					<button class="btn btn-danger hvr-sweep-to-right hvr-bounce-to-right" type="button" <?php if($authority<>0){?>onClick="if(confirm('#<?php echo $sdil[215]; //onay ??>')) window.location.href='?ne=<?php echo $_GET["ne"]?>&islem=<?php echo $konum?>&id=<?php echo $_GET["id"]?>&sip_no=<?php echo $_GET["sip_no"]?>&durum=s<?php echo $_GET["ne"]?>';"<?php }?> <?php if($authority==0){echo "disabled"; }?>><i class="fa fa-<?php if($btn_img<>""){?><?php echo $btn_img?><?php }else{?>trash-o<?php }?>" aria-hidden="true"></i> <?php echo $sdil[204]; //Kaldir?></button>
					<?php }?>
<!--
					<button tabindex="-1" data-toggle="dropdown" class="btn btn-warning" style="margin-left: 2px;" type="button" aria-expanded="false">
						<i class="fa fa-ellipsis-v"></i>	<span class="mdn"><?php echo $sdil[213]; //İşlemler?> </span>
					</button>
					<div class="dropdown-menu dropdown-menu-right btn-edit-row" x-placement="top-end" style="position: absolute; transform: translate3d(105px, -2px, 0px); top: 0px; left: 0px; will-change: transform;">
						<a style="cursor:pointer;" class="v3-btn v3-btn-warning dropdown-item  tal" onclick="AjaxKaydetYeni('','');" title="<?php echo $sdil[199]; //Düzenle?>"><i class="fa fa-pencil "></i> <?php echo $sdil[198]; //Kaydet & Yeni?></a>
					<?php if($_GET["ne"]<>"ayarlar"){?>
						<a style="cursor:pointer;" class="v3-btn v3-btn-danger dropdown-item mt2 mmt2  tal" <?php if($authority<>0){?>onClick="if(confirm('#<?php echo $sdil[215]; //onay ??>')) window.location.href='?ne=<?php echo $_GET["ne"]?>&islem=<?php echo $konum?>&id=<?php echo $_GET["id"]?>&sip_no=<?php echo $_GET["sip_no"]?>&durum=s<?php echo $_GET["ne"]?>';"<?php }?> title="<?php echo $sdil[204]; //Kaldir?>"><i class="fa fa-<?php if($btn_img<>""){?><?php echo $btn_img?><?php }else{?>trash-o<?php }?>  " aria-hidden="true"></i> <?php echo $sdil[204]; //Kaldir?></a>
					<?php }?>					
					</div>
-->
					<?php if($s7==1){ //Ajax Save?>
						<button class="btn btn-info hvr-sweep-to-right dn" id="savebtn" <?php if($_GET["islem"]=="dsayfa" || $_GET["islem"]=="dkayit" || $_GET["islem"]=="duye" || $_GET["islem"]=="dreklam" || (($_GET["islem"]=="dservice" || $_GET["islem"]=="sfatura" || $_GET["islem"]=="afatura" || $_GET["islem"]=="ifatura") and $_GET["id"]<>"")){?>type="button" onclick="AjaxKaydetYeni('','');"<?php }else{?>type="submit"<?php }?> <?php if($authority==0){echo "disabled"; }?>>
							<i class="fa fa-plus" aria-hidden="true"></i>
						<?php }else{?>
							<button class="btn btn-info hvr-sweep-to-right" onclick="jQuery('form#asave').attr('action','?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $_GET["id"];?>&durum=ykaydet');" type="submit" <?php if($authority==0){echo "disabled"; }?>><i class="fa fa-plus" aria-hidden="true"></i>
							<?php }?>
							<span class="mdn"><?php echo $sdil[198]; //Kaydet & Yeni?></span>
						</button>
					<?php }?>
					<?php if($_GET["ne"]<>"ayarlar" and $_GET["islem"]<>"dsayfa" and $_GET["islem"]<>"dkayit" and $_GET["islem"]<>"siparis"){?>
						<button class="btn btn-danger hvr-sweep-to-right" id="delbtn" type="button" <?php if($authority==0){echo "disabled"; }?> onClick="if(confirm('#<?php echo $sdil[215]; //onay ??>')) window.location.href='?ne=<?php echo $_GET["ne"]?>&islem=<?php echo $konum?>&id=<?php echo $_GET["id"]?>&sip_no=<?php echo $_GET["sip_no"]?>&durum=s<?php echo $_GET["ne"]?>';" class="red" <?php echo $style?>> <i class="fa fa-<?php if($btn_img<>""){?><?php echo $btn_img?><?php }else{?>trash-o<?php }?>" aria-hidden="true"></i><span class="mdn"><?php echo $sdil[204]; //Kaldır?></span></button>
					<?php }?>
					<?php
					if($_GET["islem"]=="dkayit" or $_GET["islem"]=="dsayfa"){
						$sqlp=mysqli_query($conn, "select id,t1 from ".$_SESSION['lang']." where ne='".$_GET["ne"]."' and id<".$_GET["id"]." and s13=1 order by id desc"); $rsp=mysqli_fetch_assoc($sqlp); $rspc=mysqli_num_rows($sqlp);
						if(mysqli_num_rows($sqlp)>0){echo "<a href=\"?islem=".$_GET["islem"]."&ne=".$_GET["ne"]."&id=".$rsp["id"]."&s2=".$_GET["s2"]."&s9=".$_GET["s9"]."&s10=".$_GET["s10"]."&key=".$_GET["key"]."&order=".$_GET["order"]."&sayfa=".$_GET["sayfa"]."\" class=\"btn btn-default\" id=\"data-prev\" title=\"".$rsp["t1"]."\"><div style=\"position: absolute; font-size: 9px; margin-top: -10px; background: #d2322d; color: white; padding: 0px 2px; border-radius: 3px;\">".$rspc."</div> <i class=\"fa fa-angle-double-left\" aria-hidden=\"true\"></i></a>";}
						$sqln=mysqli_query($conn, "select id,t1 from ".$_SESSION['lang']." where ne='".$_GET["ne"]."' and id>".$_GET["id"]." and s13=1 order by id asc"); $rsn=mysqli_fetch_assoc($sqln); $rsnc=mysqli_num_rows($sqln);
						if(mysqli_num_rows($sqln)>0){echo "<a href=\"?islem=".$_GET["islem"]."&ne=".$_GET["ne"]."&id=".$rsn["id"]."&s2=".$_GET["s2"]."&s9=".$_GET["s9"]."&s10=".$_GET["s10"]."&key=".$_GET["key"]."&order=".$_GET["order"]."&sayfa=".$_GET["sayfa"]."\" class=\"btn btn-default\" id=\"data-next\" title=\"".$rsn["t1"]."\"><div style=\"position: absolute; font-size: 9px; margin-top: -10px; background: #d2322d; color: white; padding: 0px 2px; border-radius: 3px;\">".$rsnc."</div> <i class=\"fa fa-angle-double-right\" aria-hidden=\"true\"></i></a>";}
					}
					if($_GET["islem"]=="dreklam"){
						$sqlp=mysqli_query($conn, "select id,t1 from genel where ne='reklam' and id<".$_GET["id"]." and s13=1 $luye order by id desc"); $rsp=mysqli_fetch_assoc($sqlp); $rspc=mysqli_num_rows($sqlp);
						if(mysqli_num_rows($sqlp)>0){echo "<a href=\"?islem=".$_GET["islem"]."&ne=".$_GET["ne"]."&id=".$rsp["id"]."&s2=".$_GET["s2"]."&s9=".$_GET["s9"]."&s10=".$_GET["s10"]."&key=".$_GET["key"]."&order=".$_GET["order"]."&sayfa=".$_GET["sayfa"]."\" class=\"btn btn-default\" id=\"data-prev\" title=\"".$rsp["t1"]."\"><div style=\"position: absolute; font-size: 9px; margin-top: -10px; background: #d2322d; color: white; padding: 0px 2px; border-radius: 3px;\">".$rspc."</div> <i class=\"fa fa-angle-double-left\" aria-hidden=\"true\"></i></a>";}
						$sqln=mysqli_query($conn, "select id,t1 from genel where ne='reklam' and id>".$_GET["id"]." and s13=1 $luye order by id asc"); $rsn=mysqli_fetch_assoc($sqln); $rsnc=mysqli_num_rows($sqln);
						if(mysqli_num_rows($sqln)>0){echo "<a href=\"?islem=".$_GET["islem"]."&ne=".$_GET["ne"]."&id=".$rsn["id"]."&s2=".$_GET["s2"]."&s9=".$_GET["s9"]."&s10=".$_GET["s10"]."&key=".$_GET["key"]."&order=".$_GET["order"]."&sayfa=".$_GET["sayfa"]."\" class=\"btn btn-default\" id=\"data-next\" title=\"".$rsn["t1"]."\"><div style=\"position: absolute; font-size: 9px; margin-top: -10px; background: #d2322d; color: white; padding: 0px 2px; border-radius: 3px;\">".$rsnc."</div> <i class=\"fa fa-angle-double-right\" aria-hidden=\"true\"></i></a>";}
					}
					if($_GET["islem"]=="duye"){
						$sqlp=mysqli_query($conn, "select id,t1 from t5 where id<".$_GET["id"]." $luye order by id desc"); $rsp=mysqli_fetch_assoc($sqlp); $rspc=mysqli_num_rows($sqlp);
						if(mysqli_num_rows($sqlp)>0){echo "<a href=\"?islem=".$_GET["islem"]."&ne=".$_GET["ne"]."&id=".$rsp["id"]."&s2=".$_GET["s2"]."&s9=".$_GET["s9"]."&s10=".$_GET["s10"]."&key=".$_GET["key"]."&order=".$_GET["order"]."&sayfa=".$_GET["sayfa"]."\" class=\"btn btn-default\" id=\"data-prev\" title=\"".$rsp["t1"]."\"><div style=\"position: absolute; font-size: 9px; margin-top: -10px; background: #d2322d; color: white; padding: 0px 2px; border-radius: 3px;\">".$rspc."</div> <i class=\"fa fa-angle-double-left\" aria-hidden=\"true\"></i></a>";}
						$sqln=mysqli_query($conn, "select id,t1 from t5 where id>".$_GET["id"]." $luye order by id asc"); $rsn=mysqli_fetch_assoc($sqln); $rsnc=mysqli_num_rows($sqln);
						if(mysqli_num_rows($sqln)>0){echo "<a href=\"?islem=".$_GET["islem"]."&ne=".$_GET["ne"]."&id=".$rsn["id"]."&s2=".$_GET["s2"]."&s9=".$_GET["s9"]."&s10=".$_GET["s10"]."&key=".$_GET["key"]."&order=".$_GET["order"]."&sayfa=".$_GET["sayfa"]."\" class=\"btn btn-default\" id=\"data-next\" title=\"".$rsn["t1"]."\"><div style=\"position: absolute; font-size: 9px; margin-top: -10px; background: #d2322d; color: white; padding: 0px 2px; border-radius: 3px;\">".$rsnc."</div> <i class=\"fa fa-angle-double-right\" aria-hidden=\"true\"></i></a>";}
					}
					?>
				</div>
			</div>
		</div>