<style>
	.dd-item > button[data-action="collapse"]:before {
		content: '≡';
	}
	.dd-item > button:before {
		content: '≡';
	}
	.dd-handle:hover {
		cursor: -webkit-grab; cursor: grab;
	}
</style>
<?php 
$scats = json_decode(GetArr("s","categories"), true);
$hcats = json_decode(GetArr("h","categories"), true);
$ucats = json_decode(GetArr("u","categories"), true);
$xcats = json_decode(GetArr("x","xmodules","",""), true);
$sitems = json_decode(GetArr("sayfa","",""), true);
?>
<div class="inner-wrapper">
	<section role="main" class="content-body">
		<header class="page-header">
			<h2>Menü Yönetimi</h2>
			
			<div class="right-wrapper text-right">
				<ol class="breadcrumbs">
					<li>
						<a href=".">
							<i class="fa fa-home"></i>
						</a>
					</li>
					<li><span>Crm +Plus</span></li>
					<li><span><?php echo translate("Menü Yönetimi")?></span></li>
				</ol>
				
				<a class="sidebar-right-toggle" data-open="sidebar-right"><i class="fa fa-chevron-left"></i></a>
			</div>
		</header>
		<div class="alert alert-warning" id="err" style="display:none;"></div>
		<div class="row">
			<div class="col p0">
				<section class="card" style="margin-top: -15px;">
					<header class="card-header v3-bg-info">
						<div class="card-actions" id="v-menu">
							<a href="?ne=<?php echo $_GET["ne"]?>&islem=<?php echo $_GET["islem"]?>" class="btn btn-warning btn-sm fa fa-plus" style="font-size:14px; margin-top: 5px; margin-right: 5px;"></a>
							<!--<a onclick="AjaxGResult('modules/menu/save.php?durum=clear','#err','#err');" class="btn btn-danger  btn-sm fa fa-eraser" style="font-size:14px; margin-top: 5px; margin-right: 5px;"></a>-->
						</div>
						
						<h2 class="card-title">
							<?php echo translate("Menü Yönetimi")?>
							<a class="fa fa-info-circle cp" data-container="body" data-toggle="popover" data-placement="top" data-content="Menü Yönetimi"></a>
						</h2>
					</header>
					<div class="card-body">
						<div class="row">
							<div class="col-lg-6">
								<?php $sql=mysqli_query($conn, "select * from genel where id=".$_GET["id"].""); $rs=mysqli_fetch_assoc($sql);$jslf = json_decode($rs["n1"],true);$jsi = json_decode($rs["n17"],true);?>
								<form class="form" id="aform" name="rall">
									<fieldset class="grey-bg mt10">
										<legend><?php echo translate("Menü Yönetimi")?></legend>
										<fieldset class="">
											<legend> <?php echo translate("Başlık")?>; <span style="font-size:8px; color:#ccc;">(n1)</span> </legend>
											<input type="text" name="lang1" id="n1" value="<?php echo $jslf["lang1"]?>" title="" class="form-control" placeholder="<?php echo translate("Başlık")?>">
										</fieldset>
										<fieldset class="">
											<legend> <?php echo translate("Bağlantı Adresi (Manuel Link Ekle)")?>; <span style="font-size:8px; color:#ccc;">(n5-t6)</span> </legend>
											<div class="v3-row">
												<div class="v3-col-md-8 v3-col-xs-8">
													<input type="text" list="ln5" class="form-control" name="n5" value="<?php echo $rs["n5"];?>" placeholder="http://www." autocomplete="off">
													<datalist id="ln5" style="display: none;">
														<option value="">...</option>
														<?php
														if($d10<>0){
															foreach($scats as $xkey=>$xvalue){$jscx = json_decode($xvalue["n1"],true);
															if(($xvalue["ne"]=="skategori" or $xvalue["ne"]=="".$_GET["ne"][0]."kategori") or ($xvalue["t1"]=="".$_GET["ne"]."")){
																?>
																<option class="c0" value="<?php echo linked("a",$xvalue["id"]);?>" title="<?php echo $xvalue["item"];?>" style="color:#6699FF">+ <?php echo ctranslate($xvalue["item"]);?></option>
															<?php }?>
													<?php }?>
													<?php
													foreach($sitems as $skey=>$svalue){
														if($svalue["ne"]=="sayfa"){
															?>
															<option value="<?php echo linked("s",$svalue["id"]);?>" title="<?php echo $svalue["t1"];?>" alt="<?php echo $svalue["t1"];?>" style="color:#6699FF !important">- <?php echo $svalue["t1"];?></option>
														<?php }}?>
												<?php }?>
												<?php
												if($b1<>0){
													foreach($hcats as $xkey=>$xvalue){
														if($xvalue["ne"]=="hkategori"  or ($xvalue["t1"]=="haber")){
															?>
															<option class="c0" value="<?php echo linked("b",$xvalue["id"]);?>" title="<?php echo $xvalue["item"];?>" style="color:#6699FF">+ <?php echo ctranslate($xvalue["item"]);?></option>
														<?php }}?>
												<?php }?>
												<?php
												foreach($xcats as $mkey=>$mvalue){
													if($mvalue["ne"]=="xmodules"){
														foreach($xcats as $xkey=>$xvalue){
															if($xvalue["ne"]=="".$mvalue["n4"]."kategori" or ($xvalue["t1"]==$mvalue["n2"])){
																?>
																<option class="c0" value="<?php echo linked($mvalue["n2"][0],$xvalue["id"]);?>" title="<?php echo $xvalue["item"];?>" style="color:#6699FF">+ <?php echo ctranslate($xvalue["item"]);?></option>
															<?php }}?>
															<?php
															foreach($xcats as $skey=>$svalue){
																if($mvalue["n2"]=="".$svalue["ne"]."" and $svalue["type"]=="page"){
																	?>
																	<option class="c0" value="<?php echo linked($mvalue["n2"][0],$svalue["id"]);?>" title="<?php echo $svalue["item"];?>" style="color:#6699FF">- <?php echo ctranslate($svalue["item"]);?></option>
																<?php }}?>
														<?php }}?>
														<?php
														if($a4<>0){
															foreach($ucats as $xkey=>$xvalue){
																if($xvalue["ne"]=="ukategori" or ($xvalue["t1"]=="kayit" and $xvalue["s1"]=="0")){
																	?>
																	<option class="c0" value="<?php echo linked("x",$xvalue["id"]);?>" title="<?php echo $xvalue["item"];?>" style="color:#6699FF">+ <?php echo ctranslate($xvalue["item"]);?></option>
																	<?php foreach($ucats as $ykey=>$yvalue){?>
																		<?php if((($yvalue["ne"]=="ualt_kategori") and $yvalue["c1"]=="".$xvalue["id"]."") or (($yvalue["t1"]=="kayit" and $yvalue["s1"]=="".$xvalue["id"]."") and $yvalue["s2"]=="0")){?>
																			<option class="c1" value="<?php echo linked("y",$yvalue["id"]);?>" title="<?php echo $yvalue["item"];?>" style="color:#6699FF">- <?php echo ctranslate($yvalue["item"]);?></option>
																			<?php foreach($ucats as $zkey=>$zvalue){?>
																				<?php if((($zvalue["ne"]=="ualt2_kategori") and $zvalue["c2"]=="".$yvalue["id"]."") or ($zvalue["t1"]=="kayit" and $zvalue["s2"]=="".$yvalue["id"]."" and $zvalue["s3"]=="0")){?>
																					<option class="c2" value="<?php echo linked("z",$zvalue["id"]);?>" title="<?php echo $zvalue["item"];?>" style="color:#6699FF">. <?php echo ctranslate($zvalue["item"]);?></option>
																				<?php }}?>
																			<?php }}?>
																		<?php }?>
																	<?php }?>
															<?php }?>
														</datalist>
													</div>
													<div class="v3-col-md-2 v3-col-xs-2"></div>
													<div class="v3-col-md-2 v3-col-xs-4">
														<select size="1" name="t6" class="form-control">
															<option value="<?php echo $rs["t6"];?>">
																<?php if($rs["t6"]==""){echo "Target";}else{echo $rs["t6"];}?>
															</option>
															<option value="_self">_self</option>
															<option value="_blank">_blank</option>
															<option value="_top">_top</option>
															<option value="myModal">Modal</option>
														</select>
													</div>
												</div>
											</fieldset>
											<fieldset class="">
												<legend> <?php echo translate("Bağlantı Sayfası / Grup")?>; <span style="font-size:8px; color:#ccc;">(s3-t2)</span> </legend>
												<div class="v3-row">
													<div class="v3-col-md-8 v3-col-xs-8">
														<select size="1" name="s3" data-plugin-selecttwo="" class="form-control populate">
															<option value="0"><?php echo $sdil[221]; //Lütfen Seçiniz?></option>
															<?php
															if($d10<>0){
																$sqla=mysqli_query($conn, "select Cat_ID,Cat_".$_SESSION['lang'].",ne from kategoriler where (ne='skategori' or ne='".$_GET["ne"][0]."kategori') order by sira asc");
																if(mysqli_num_rows($sqla)>0){
																	?>
																	<optgroup label="<?php echo $t21s[0];?> <?php echo $sdil[12]; //Kategori?>">
																		<?php while($rsa=mysqli_fetch_assoc($sqla)){?>
																			<option class="c0" value="<?php echo $rsa["Cat_ID"];?>,<?php echo $rsa["ne"];?>" title="<?php echo $rsa["Cat_".$_SESSION['lang'].""];?>" alt="<?php echo $rsa["Cat_".$_SESSION['lang'].""];?>" style="color:#6699FF" <?php if($rs["s3"]==$rsa["Cat_ID"]){echo "selected";}?>>+ <?php echo $rsa["Cat_".$_SESSION['lang'].""];?> [<?php echo $rsa["Cat_ID"];?>]</option>
																			<?php $sqlb=mysqli_query($conn, "select Cat_ID,Cat_".$_SESSION['lang']." from kategoriler where (ne='skategori' or ne='".$_GET["ne"][0]."alt_kategori') and c1=".$rsa["Cat_ID"]." order by sira asc"); while($rsb=mysqli_fetch_assoc($sqlb)){?>
																				<option class="c1" value="<?php echo $rsb["Cat_ID"];?>,<?php echo $rsb["ne"];?>" title="<?php echo $rsb["Cat_".$_SESSION['lang'].""];?>" alt="<?php echo $rsb["Cat_".$_SESSION['lang'].""];?>" style="color:#6699FF" <?php if($rs["s3"]==$rsb["Cat_ID"]){echo "selected";}?>>- <?php echo $rsb["Cat_".$_SESSION['lang'].""];?> [<?php echo $rsb["Cat_ID"];?>]</option>
																				<?php $sqlc=mysqli_query($conn, "select Cat_ID,Cat_".$_SESSION['lang']." from kategoriler where (ne='skategori' or ne='".$_GET["ne"][0]."alt_kategori2') and c2='".$rsb["Cat_ID"]."' order by sira asc"); while($rsc=mysqli_fetch_assoc($sqlc)){?>
																					<option class="c2" value="<?php echo $rsc["Cat_ID"];?>,<?php echo $rsc["ne"];?>" title="<?php echo $rsc["Cat_".$_SESSION['lang'].""];?>" alt="<?php echo $rsc["Cat_".$_SESSION['lang'].""];?>" style="color:#6699FF" <?php if($rs["s3"]==$rsc["Cat_ID"]){echo "selected";}?>>. <?php echo $rsc["Cat_".$_SESSION['lang'].""];?> [<?php echo $rsc["Cat_ID"];?>]</option>
																				<?php }?>
																			<?php }?>
																		<?php }?>
																	</optgroup>
																<?php }?>
																<?php
																$sqlsa=mysqli_query($conn, "select * from ".$_SESSION["lang"]." where (ne='sayfa' or ne='".$_GET["ne"]."') and s5=1 order by s1 asc");
																if(mysqli_num_rows($sqlsa)>0){
																	?>
																	<optgroup label="<?php echo telefon($t21);?>">
																		<?php while($rssa=mysqli_fetch_assoc($sqlsa)){?>
																			<option value="<?php echo $rssa["id"];?>,<?php echo $rssa["ne"];?>" title="<?php echo $rssa["t1"];?>" alt="<?php echo $rssa["t1"];?>" style="color:#6699FF !important" <?php if($rs["s3"]==$rssa["id"]){echo "selected";}?>>- <?php echo $rssa["t1"];?> [<?php echo $rssa["ne"][0];?><?php echo $rssa["id"];?>]</option>
																		<?php }?>
																	</optgroup>
																<?php }?>
															<?php }?>
															<?php
															if($b1<>0){
																$sqlha=mysqli_query($conn, "select Cat_ID,Cat_".$_SESSION['lang'].",ne from kategoriler where ne='hkategori' order by sira asc");
																if(mysqli_num_rows($sqlha)>0){
																	?>
																	<optgroup label="<?php echo $t22s[0];?> <?php echo $sdil[12]; //Kategori?>">
																		<?php while($rsa=mysqli_fetch_assoc($sqlha)){?>
																			<option value="<?php echo $rsa["Cat_ID"];?>,<?php echo $rsa["ne"];?>" title="<?php echo $rsa["Cat_".$_SESSION['lang'].""];?>" alt="<?php echo $rsa["Cat_".$_SESSION['lang'].""];?>" style="color:#6699FF" <?php if($rs["s3"]==$rsa["Cat_ID"]){echo "selected";}?>>+ <?php echo $rsa["Cat_".$_SESSION['lang'].""];?> [<?php echo $rsa["Cat_ID"];?>]</option>
																			<?php $sqlhb=mysqli_query($conn, "select Cat_ID,Cat_".$_SESSION['lang']." from kategoriler where ne='halt_kategori' and c1='".$rsa["Cat_ID"]."' order by sira asc"); while($rsb=mysqli_fetch_assoc($sqlhb)){?>
																				<option value="<?php echo $rsb["Cat_ID"];?>,<?php echo $rsb["ne"];?>" title="<?php echo $rsb["Cat_".$_SESSION['lang'].""];?>" alt="<?php echo $rsb["Cat_".$_SESSION['lang'].""];?>" style="color:#6699FF" <?php if($rs["s3"]==$rsb["Cat_ID"]){echo "selected";}?>>- <?php echo $rsb["Cat_".$_SESSION['lang'].""];?> [<?php echo $rsb["Cat_ID"];?>]</option>
																			<?php }?>
																		<?php }?>
																	</optgroup>
																<?php }?>
															<?php }?>
															<?php
															if($d10<>0){
																$sqlma=mysqli_query($conn, "select Cat_ID,Cat_".$_SESSION['lang'].",ne from kategoriler where ne='mkategori' order by sira asc"); 
																if(mysqli_num_rows($sqlma)>0){
																	?>
																	<optgroup label="<?php echo $n8s[0];?> <?php echo $sdil[12]; //Kategori?>">
																		<?php while($rsa=mysqli_fetch_assoc($sqlma)){?>
																			<option class="c0" value="<?php echo $rsa["Cat_ID"];?>,<?php echo $rsa["ne"];?>" title="<?php echo $rsa["Cat_".$_SESSION['lang'].""];?>" alt="<?php echo $rsa["Cat_".$_SESSION['lang'].""];?>" style="color:#6699FF" <?php if($rs["s3"]==$rsa["Cat_ID"]){echo "selected";}?>>+ <?php echo $rsa["Cat_".$_SESSION['lang'].""];?> [<?php echo $rsa["Cat_ID"];?>]</option>
																			<?php $sqlmb=mysqli_query($conn, "select Cat_ID,Cat_".$_SESSION['lang']." from kategoriler where ne='malt_kategori' and c1=".$rsa["Cat_ID"]." order by sira asc"); while($rsb=mysqli_fetch_assoc($sqlmb)){?>
																				<option class="c1" value="<?php echo $rsb["Cat_ID"];?>,<?php echo $rsb["ne"];?>" title="<?php echo $rsb["Cat_".$_SESSION['lang'].""];?>" alt="<?php echo $rsb["Cat_".$_SESSION['lang'].""];?>" style="color:#6699FF" <?php if($rs["s3"]==$rsb["Cat_ID"]){echo "selected";}?>>- <?php echo $rsb["Cat_".$_SESSION['lang'].""];?> [<?php echo $rsb["Cat_ID"];?>]</option>
																				<?php $sqlmc=mysqli_query($conn, "select Cat_ID,Cat_".$_SESSION['lang']." from kategoriler where (ne='malt_kategori2') and c2='".$rsb["Cat_ID"]."' order by sira asc"); while($rsc=mysqli_fetch_assoc($sqlmc)){?>
																					<option class="c2" value="<?php echo $rsc["Cat_ID"];?>,<?php echo $rsc["ne"];?>" title="<?php echo $rsc["Cat_".$_SESSION['lang'].""];?>" alt="<?php echo $rsc["Cat_".$_SESSION['lang'].""];?>" style="color:#6699FF" <?php if($rs["s3"]==$rsc["Cat_ID"]){echo "selected";}?>>. <?php echo $rsc["Cat_".$_SESSION['lang'].""];?> [<?php echo $rsc["Cat_ID"];?>]</option>
																				<?php }?>
																			<?php }?>
																		<?php }?>
																	</optgroup>
																<?php }?>
																<?php
																$sqlms=mysqli_query($conn, "select Cat_ID,Cat_".$_SESSION['lang'].",ne from ".$_SESSION["lang"]." where ne='msayfa' and s5=1 order by s1 asc");
																if(mysqli_num_rows($sqlms)>0){
																	?>
																	<optgroup label="<?php echo $n8s[0];?>">
																		<?php while($rss=mysqli_fetch_assoc($sqlms)){?>
																			<option value="<?php echo $rss["id"];?>,<?php echo $rss["ne"];?>" title="<?php echo $rss["t1"];?>" alt="<?php echo $rss["t1"];?>" style="color:#6699FF !important" <?php if($rs["s3"]==$rss["id"]){echo "selected";}?>>- <?php echo $rss["t1"];?> [<?php echo $rss["ne"][0];?><?php echo $rss["id"];?>]</option>
																		<?php }?>
																	</optgroup>
																<?php }?>
															<?php }?>
															<?php
															if($a4<>0){
																$sqlx=mysqli_query($conn, "select Cat_ID,Cat_".$_SESSION['lang'].",ne from kategoriler where ne='ukategori' order by sira asc");
																if(mysqli_num_rows($sqlx)>0){
																	?>
																	<optgroup label="<?php echo $t24s[0];?> <?php echo $sdil[12]; //Kategori?>">
																		<?php while($rsx=mysqli_fetch_assoc($sqlx)){?>
																			<option class="c0" value="<?php echo $rsx["Cat_ID"];?>,<?php echo $rsx["ne"];?>" title="<?php echo $rsx["Cat_".$_SESSION['lang'].""];?>" alt="<?php echo $rsx["Cat_".$_SESSION['lang'].""];?>" style="color:#6699FF" <?php if($rs["s3"]==$rsx["Cat_ID"]){echo "selected";}?>>x) <?php echo $rsx["Cat_".$_SESSION['lang'].""];?> [<?php echo $rsx["Cat_ID"];?>]</option>
																			<?php $sqly=mysqli_query($conn, "select Cat_ID,Cat_".$_SESSION['lang']." from kategoriler where ne='ualt_kategori' and c1=".$rsc["Cat_ID"]." order by sira asc"); while($rsy=mysqli_fetch_assoc($sqly)){?>
																				<option class="c1" value="<?php echo $rsy["Cat_ID"];?>,<?php echo $rsy["ne"];?>" title="<?php echo $rsy["Cat_".$_SESSION['lang'].""];?>" alt="<?php echo $rsy["Cat_".$_SESSION['lang'].""];?>" style="color:#6699FF" <?php if($rs["s3"]==$rsy["Cat_ID"]){echo "selected";}?>>y) <?php echo $rsy["Cat_".$_SESSION['lang'].""];?> [<?php echo $rsy["Cat_ID"];?>]</option>
																				<?php $sqlz=mysqli_query($conn, "select Cat_ID,Cat_".$_SESSION['lang']." from kategoriler where ne='ualt_kategori2' and c2=".$rsy["Cat_ID"]." order by sira asc"); while($rsz=mysqli_fetch_assoc($sqlz)){?>
																					<option class="c2" value="<?php echo $rsz["Cat_ID"];?>,<?php echo $rsz["ne"];?>" title="<?php echo $rsz["Cat_".$_SESSION['lang'].""];?>" alt="<?php echo $rsz["Cat_".$_SESSION['lang'].""];?>" style="color:#6699FF" <?php if($rs["s3"]==$rsz["Cat_ID"]){echo "selected";}?>>z) <?php echo $rsz["Cat_".$_SESSION['lang'].""];?> [<?php echo $rsz["Cat_ID"];?>]</option>
																				<?php }?>
																			<?php }?>
																		<?php }?>
																	</optgroup>
																<?php }?>
															<?php }?>
														</select>
													</div>
													<div class="v3-col-md-2 v3-col-xs-4">
														<select size="1" name="t7" class="form-control">
															<option value="">...</option>
															<option value="dashboard" <?php if($rs["t7"]=="dashboard" or $_GET["status"]=="short" or $_SESSION["t7"]=="dashboard"){echo "selected";}?>><?php echo ctranslate("Crm Dashboard")?></option>
															<option value="menu" <?php if($rs["t7"]=="menu" or $_SESSION["t7"]=="menu"){echo "selected";}?>><?php echo ctranslate("Crm Menü")?></option>
															<option value="report" <?php if($rs["t7"]=="report" or $_SESSION["t7"]=="report"){echo "selected";}?>><?php echo ctranslate("Rapor")?></option>
															<option value="request" <?php if($rs["t7"]=="request" or $_SESSION["t7"]=="request"){echo "selected";}?>><?php echo ctranslate("Request")?></option>
															<option value="app" <?php if($rs["t7"]=="app" or $_SESSION["t7"]=="app"){echo "selected";}?>><?php echo ctranslate("App Menü")?></option>
															<option value="oim" <?php if($rs["t7"]=="oim" or $_SESSION["t7"]=="oim"){echo "selected";}?>><?php echo ctranslate("Oim Menü")?></option>
															<option value="pay" <?php if($rs["t7"]=="pay" or $_SESSION["t7"]=="pay"){echo "selected";}?>><?php echo ctranslate("Tahsilat Menü")?></option>
															<option value="odash" <?php if($rs["t7"]=="odash" or $_SESSION["t7"]=="odash"){echo "selected";}?>><?php echo ctranslate("Oim Dashboard")?></option>
														</select>
													</div>
													<div class="v3-col-md-2 v3-col-xs-12">
														<select size=1 name="s19" class="form-control">
															<option value="0">Admin</option>
															<?php if($module["uye_editor"]=="1" or $g10=="1"){?>
																<?php $sql=mysqli_query($conn, "select s2,id,t1 from t5 where s9=1 $luye"); while($rsm=mysqli_fetch_assoc($sql)){?>
																	<option class="" value="<?php echo $rsm["id"];?>" title="<?php echo $rsm["t1"];?>" alt="<?php echo $rsm["t1"];?>" style="color:#6699FF" <?php if($rs["s19"]==$rsm["id"]){echo "Selected";}?>><?php echo $rsm["t1"];?></option>
																<?php }?>
															<?php }?>
														</select>
													</div>
												</div>
											</fieldset>
											<fieldset class="">
												<legend> <?php echo translate("ikon / Class")?>; <span style="font-size:8px; color:#ccc;">(t3-t4)</span> </legend>
												<div class="row">
													<div class="col-lg-5 col-xs-5 dn">
														<select size="1" name="s4" data-plugin-selecttwo="" class="form-control populate">
															<option value="0"><?php echo $sdil[221]; //Lütfen Seçiniz?></option>
															<?php $sql=mysqli_query($conn, "select * from kategoriler where ne='skategori' order by sira asc"); while($rsc=mysqli_fetch_assoc($sql)){?>
																<option value="<?php echo $rsc["Cat_ID"];?>" title="<?php echo $rsc["Cat_".$_SESSION['lang'].""];?>" alt="<?php echo $rsc["Cat_".$_SESSION['lang'].""];?>" style="color:#6699FF" <?php if($rs["s4"]==$rsc["Cat_ID"]){echo "selected";}?>>+ <?php echo $rsc["Cat_".$_SESSION['lang'].""];?> [<?php echo $rsc["Cat_ID"];?>]</option>
															<?php }?>
														</select>
													</div>
													<div class="v3-col-md-3 v3-col-xs-3">
														<i class="<?php echo $rs["t3"];?>" style="float: left; margin-top: 8px;"></i> <input type="text" class="form-control" id="t3" onkeyup="icons(this);" onBlur="hide('#icons')" list="icons" name="t3" style="width:90%;" value="<?php echo $rs["t3"];?>" placeholder="fas fa-" autocomplete="off">
														<ul class="icons" id="icons" data-input="t3" style="display:none;z-index: 999;"></ul>
													</div>
													<div class="v3-col-md-3 v3-col-xs-3">
														<input type="text" class="form-control" name="t4" style="" value="<?php echo $rs["t4"];?>" placeholder="class">
													</div>
													<div class="v3-col-md-3 v3-col-xs-3">
														<input type="text" class="form-control" name="t5" id="t6" style="" value="<?php echo $rs["t5"];?>" placeholder="img" onclick="window.open('modules/upload/upload_all.php?ne=menu&file=dosya', 'Upload', 'width=450,height=300')">
													</div>
													<div class="v3-col-md-3 v3-col-xs-3">
													<?php if(mysqli_num_rows($client_project)<>0){?>
														<select size="1" name="iclient_project" class="form-control" title="iclient_project">
														<?php $client_project=mysqli_query($conn, "select id,t1 from ".$_SESSION["lang"]." where ne='client_project' and s13=1 $xmod order by t1 asc"); while($rscp=mysqli_fetch_assoc($client_project)){?>
															<option value="0">...</option>
															<option value="<?php echo $rscp["id"];?>" <?= ($rscp["id"] == $jsi["iclient_project"] || $rscp["id"] == $_SESSION["ProjeID"]) ? 'selected' : ''; ?>><?php echo $rscp["t1"]?></option>
														<?php }?>
														</select>
													<?php }?>
													</div>
												</div>
											</fieldset>
											<fieldset class="">
												<legend> <?php echo translate("Açıklama")?>; <span style="font-size:8px; color:#ccc;">(n2)</span> </legend>
												<div class="row">
													<div class="col-lg-12 col-xs-12">
														<input type="text" class="form-control" name="n2" value="<?php echo $rs["n2"];?>" placeholder="Açıklama">
													</div>
												</div>
											</fieldset>
											<div class="v3-row">
												<div class="v3-col-md-10 v3-col-xs-6">
													<button type="button" onclick="AjaxPResult('modules/menu/save.php?durum=kaydet&id=<?php echo $_GET["id"]?>','#aform','#err');" class="btn btn-warning"><?php echo translate("Ekle/Güncelle")?></button>
												</div>
												<div class="v3-col-md-2 v3-col-xs-6 tac" title="Tüm yetkililere Göster">
													<label for="ct8"><input id="ct8" type="checkbox" name="t8" value="free" <?php if($rs["t8"]=="free"){echo "checked";}?> style="display:none;"> <i class="fas fa-eye<?php if($rs["t8"]==""){echo "-slash";}?> faeye" onclick="jQuery(this).toggleClass('fa-eye fa-eye-slash')"></i></label>
												</div>
											</div>
										</fieldset>
									</form>
								</div>
								<div class="col-lg-6">
									<?php
									$alerts=array("","#ffc1071a","#17a2b829","#e91e631f","#8bc34a21");
									$results = array();
									$a=0;$sqlsc=mysqli_query($conn, "select * from kategoriler where ne='skategori' order by sira asc"); while($rssc=mysqli_fetch_assoc($sqlsc)){$a++;
										$results = $results + array($rssc["Cat_ID"] => $alerts[$a]);
									}
									?>
									<div class="dd" id="nestable" style="margin-top:20px;">
										<ol class="dd-list">
											<?php if ($_SESSION["ProjeID"] != "") { $mqry = "AND n17 LIKE '%\"iclient_project\":".$_SESSION["ProjeID"]."%'";}?>
											<?php $sqla=mysqli_query($conn, "select * from genel where ne='menu' and s2=0 $mqry order by s3 desc,s1 asc"); while($rsa=mysqli_fetch_assoc($sqla)){$jsla = json_decode($rsa["n1"],true);?>
											<li class="dd-item" data-id="<?php echo $rsa["id"]?>">
												<a class="pa" style="right:100px;margin-top:7px"><?php if($rsa["t7"]<>""){echo $rsa["t7"];}else{echo kategori($rsa["s3"],"")." #".$rsa["s3"]."";}?></a>
												<a class="fa fa-pencil btn btn-warning pa" style="right:40px; margin-top:7px" href="?ne=<?php echo $_GET["ne"]?>&islem=<?php echo $_GET["islem"]?>&durum=duzenle&id=<?php echo $rsa["id"]?>"></a>
												<a class="fa fa-times btn btn-danger pa" style="right:10px; margin-top:7px" onclick="AjaxGResult('modules/menu/save.php?durum=sil&id=<?php echo $rsa["id"]?>','#err','#err');"></a>
												<div class="dd-handle <?php if($rsa["t7"]=="app"){echo "v3-bg-success";}elseif($rsa["t7"]=="oim"){echo "v3-bg-warning";}elseif($rsa["t7"]=="dashboard"){echo "v3-bg-danger";}elseif($rsa["t7"]=="menu" or $rsa["t7"]=="request"){echo "v3-bg-primary";}?>" style="background:<?php echo $results[$rsa["s3"]]?>"><?php if($rsa["t3"]<>""){echo "<i class=\"".$rsa["t3"]."\" style=\"opacity: 0.2;\"></i>";}?> <?php echo $jsla[$_SESSION["lang"]]?> <?php if($rsa["n5"]<>""){echo "<i class=\"fa fa-link\" style=\"opacity: 0.2;\" title=\"".$rsa["n5"]."\"></i>";}?></div>
												<ol class="dd-list">
													<?php $sqlb=mysqli_query($conn, "select * from genel where ne='menu' and s2=".$rsa["id"]." order by s1 asc"); while($rsb=mysqli_fetch_assoc($sqlb)){$jslb = json_decode($rsb["n1"],true);?>
													<li class="dd-item" data-id="<?php echo $rsb["id"]?>">
														<a class="pa" style="right:100px;margin-top:7px"><?php echo $rsa["t7"];?></a>
														<a class="fa fa-pencil btn btn-warning pa" style="right:40px;margin-top:7px" href="?ne=<?php echo $_GET["ne"]?>&islem=<?php echo $_GET["islem"]?>&durum=duzenle&id=<?php echo $rsb["id"]?>"></a>
														<a class="fa fa-times btn btn-danger pa" style="right:10px;margin-top:7px" onclick="AjaxGResult('modules/menu/save.php?durum=sil&id=<?php echo $rsb["id"]?>','#err','#err');"></a>
														<div class="dd-handle <?php if($rsa["t7"]=="app"){echo "v3-bg-success";}elseif($rsa["t7"]=="oim"){echo "v3-bg-warning";}elseif($rsa["t7"]=="dashboard"){echo "v3-bg-danger";}elseif($rsa["t7"]=="menu" or $rsa["t7"]=="request"){echo "v3-bg-primary";}?>"><?php if($rsb["t3"]<>""){echo "<i class=\"".$rsb["t3"]."\" style=\"opacity: 0.2;\"></i>";}?> <?php echo $jslb[$_SESSION["lang"]]?> <?php if($rsb["n5"]<>""){echo "<i class=\"fa fa-link\" style=\"opacity: 0.2;\" title=\"".$rsb["n5"]."\"></i>";}?></div>
														<ol class="dd-list">
															<?php $sqlc=mysqli_query($conn, "select * from genel where ne='menu' and s2=".$rsb["id"]." order by s1 asc"); while($rsc=mysqli_fetch_assoc($sqlc)){$jslc = json_decode($rsc["n1"],true);?>
															<li class="dd-item" data-id="<?php echo $rsc["id"]?>">
																<a class="pa" style="right:100px;margin-top:7px"><?php echo $rsa["t7"];?></a>
																<a class="fa fa-pencil btn btn-warning pa" style="right:40px;margin-top:7px" href="?ne=<?php echo $_GET["ne"]?>&islem=<?php echo $_GET["islem"]?>&durum=duzenle&id=<?php echo $rsc["id"]?>"></a>
																<a class="fa fa-times btn btn-danger pa" style="right:10px;margin-top:7px"  onclick="AjaxGResult('modules/menu/save.php?durum=sil&id=<?php echo $rsc["id"]?>','#err','#err');"></a>
																<div class="dd-handle"><?php if($rsc["t3"]<>""){echo "<i class=\"".$rsc["t3"]."\" style=\"opacity: 0.2;\"></i>";}?>  <?php echo $jslc[$_SESSION["lang"]]?> <?php if($rsc["n5"]<>""){echo "<i class=\"fa fa-link\" style=\"opacity: 0.2;\" title=\"".$rsc["n5"]."\"></i>";}?></div>
																<ol class="dd-list">
																	<?php $sqld=mysqli_query($conn, "select * from genel where ne='menu' and s2=".$rsc["id"]." order by s1 asc"); while($rsd=mysqli_fetch_assoc($sqld)){$jsld = json_decode($rsd["n1"],true);?>
																	<li class="dd-item" data-id="<?php echo $rsd["id"]?>">
																		<a class="pa" style="right:100px;margin-top:7px"><?php echo $rsa["t7"];?></a>
																		<a class="fa fa-pencil btn btn-warning pa" style="right:40px;margin-top:7px" href="?ne=<?php echo $_GET["ne"]?>&islem=<?php echo $_GET["islem"]?>&durum=duzenle&id=<?php echo $rsd["id"]?>"></a>
																		<a class="fa fa-times btn btn-danger pa" style="right:10px;margin-top:7px"  onclick="AjaxGResult('modules/menu/save.php?durum=sil&id=<?php echo $rsd["id"]?>','#err','#err');"></a>
																		<div class="dd-handle"><?php if($rsd["t3"]<>""){echo "<i class=\"".$rsd["t3"]."\" style=\"opacity: 0.2;\"></i>";}?>  <?php echo $jsld[$_SESSION["lang"]]?> <?php if($rsd["n5"]<>""){echo "<i class=\"fa fa-link\" style=\"opacity: 0.2;\" title=\"".$rsd["n5"]."\"></i>";}?></div>
																		<ol class="dd-list">
																			<?php $sqle=mysqli_query($conn, "select * from genel where ne='menu' and s2=".$rsd["id"]." order by s1 asc"); while($rse=mysqli_fetch_assoc($sqle)){$jsle = json_decode($rse["n1"],true);?>
																			<li class="dd-item" data-id="<?php echo $rse["id"]?>"> 
																				<a class="pa" style="right:100px;margin-top:7px"><?php echo $rsa["t7"];?></a>
																				<a class="fa fa-pencil btn btn-warning pa" style="right:40px;margin-top:7px" href="?ne=<?php echo $_GET["ne"]?>&islem=<?php echo $_GET["islem"]?>&durum=duzenle&id=<?php echo $rse["id"]?>"></a>
																				<a class="fa fa-times btn btn-danger pa" style="right:10px;margin-top:7px"  onclick="AjaxGResult('modules/menu/save.php?durum=sil&id=<?php echo $rse["id"]?>','#err','#err');"></a>
																				<div class="dd-handle"><?php //if($rse["t3"]<>""){echo "<i class=\"".$rse["t3"]."\" style=\"opacity: 0.2;\"></i>";}?>  <?php echo $jsle[$_SESSION["lang"]]?> <?php if($rse["n5"]<>""){echo "<i class=\"fa fa-link\" style=\"opacity: 0.2;\" title=\"".$rse["n5"]."\"></i>";}?></div>
																			</li>
																		<?php }?>
																	</ol>
																</li>
															<?php }?>
														</ol>
													</li>
												<?php }?>
											</ol>
										</li>
									<?php }?>
								</ol>
							</li>
						<?php }?>
					</ol>
					<textarea id="nestable-output" class="form-control dn"></textarea>
				</div>
			</div>
		</div>
	</div>
</section>
</div>
</div>
<!-- end: page -->
</section>
</div>
<aside id="sidebar-right" class="sidebar-right">
	<div class="nano">
		<div class="nano-content">
			<a href="#" class="mobile-close d-md-none">
				Collapse <i class="fa fa-chevron-right"></i>
			</a>
			<div class="sidebar-right-wrapper">
				...
			</div>
		</div>
	</div>
</aside>
</section>
<script>
	jQuery('.dd').on('change', function() {
		jQuery("#preload").show();
		setTimeout(function(){
			var dataString = {  data : jQuery("#nestable-output").val(), };
			jQuery.ajax({
				type: "POST",
				url: "modules/menu/save.php",
				data: dataString,
				cache : false,
				success: function(data){  
					jQuery("#preload").hide(); 
				} ,error: function(xhr, status, error) { alert(error); },
			});
		}, 1000);
	});
</script>
<script src="assets/vendor/jquery-nestable/jquery-nestable.js"></script>
<script src="assets/js/examples/examples.nestable.js"></script>