<?php
$path="../../"; include("../../map.php");
$sql=mysqli_query($conn, "select * from t5 where id=".$_GET["id"].""); $rs=mysqli_fetch_assoc($sql);
$jsi = json_decode($rs["n17"], true);
$jsl = json_decode($rs["n16"], true);
$jsm = json_decode($rs["n18"], true);
?>
<a class="v3-btn v3-btn-xs v3-btn-default sam" style="" target="_blank" href="?ne=ayarlar&islem=inputs&nedir=<?php echo $_GET["ne"]?>&kid=<?php echo $_GET["id"]?>"><i class="fa fa-wrench" aria-hidden="true"></i></a>
<?php $i=0;$sqli=mysqli_query($conn, "select * from genel where ne='inputs' $linputs and n3='".$_GET["ne"]."' and n4<>'switch' and (n2='0' or n2='".$_GET["s2"]."' or n2='".$rs["s2"]."') and s1=0 $luye order by s10,id asc"); while($rsi=mysqli_fetch_assoc($sqli)){$i++;?>
	<fieldset class="v3-col-md-3" style="">
		<legend><i class="<?php echo $rsi["n14"]?>"></i> <?php echo ctranslate($rsi["n1"]);?> <span style="font-size:8px; color:#ccc;"> (i<?php echo $i;?>)</span></legend>
		<?php if($rsi["n4"]=="input"){?>
			<input class="form-control <?php echo $rsi["n13"]?>" type="<?php echo $rsi["n5"]?>" name="i<?php echo $i;?>" value="<?php if($jsi["i".$i.""]<>""){echo $jsi["i".$i.""];}else{echo $rsi["n12"];}?>" placeholder="<?php echo $rsi["n11"]?>" style="" <?php echo $rsi["n8"]?> <?php echo $rsi["n6"]?>>
		<?php }elseif($rsi["n4"]=="textarea"){?>
			<textarea class="form-control <?php echo $rsi["n13"]?>" name="i<?php echo $i;?>" placeholder="<?php echo $rsi["n11"]?>" <?php echo $rsi["n8"]?> <?php echo $rsi["n6"]?>><?php echo $jsi["i".$i.""];?></textarea>
		<?php }elseif($rsi["n4"]=="select"){?>
			<select class="form-control <?php echo $rsi["n13"]?> populate" data-plugin-selecttwo="" name="i<?php echo $i;?>[]" style="" <?php echo $rsi["n8"]?> <?php echo $rsi["n6"]?>>
				<option value=""><?php echo $sdil[221]; //Lütfen Seçiniz?></option>
				<?php $o=0;$sqlo=mysqli_query($conn, "select * from genel where ne='inputs' and s1=".$rsi["id"]." order by s10 asc"); while($rso=mysqli_fetch_assoc($sqlo)){$o++;?>
					<option value="<?php echo $rso["n2"]?>" <?php $q="";foreach($jsi["i".$i.""] as $q){?><?php if($q==$rso["n2"]){echo "selected";}} if($jsi["i".$i.""][0]=="" and $rso["n3"]=="1"){echo "selected";}?>><?php echo $rso["n1"]?></option>
				<?php }?>
			</select>
		<?php }elseif($rsi["n4"]=="radio"){?>
			<?php $o=0;$sqlo=mysqli_query($conn, "select * from genel where ne='inputs' and s1=".$rsi["id"]." order by s10 asc"); while($rso=mysqli_fetch_assoc($sqlo)){$o++;?>
				<div style="float:left; margin-right: 5px;">
					<label style="float:left; margin-right:5px;"><?php echo $rso["n1"];?>
					<input type="radio" name="i<?php echo $i;?>" value="<?php echo $rso["n2"];?>" <?php echo $rsi["n8"]?> <?php if($jsi["i".$i.""]==$rso["n2"] or $rso["n3"]==1){echo "checked";}?>></label>
				</div>
			<?php }?>
		<?php }elseif($rsi["n4"]=="checkbox"){?>
			<ul class="clist" style="z-index:99999;position:absolute; display:none;height: 200px; overflow: auto;width: 95.5%;" id="cl<?php echo $rsi["id"];?>">
				<?php $o=0;$sqlo=mysqli_query($conn, "select * from genel where ne='inputs' and s1=".$rsi["id"]." order by s10 asc"); while($rso=mysqli_fetch_assoc($sqlo)){$o++;?>
					<li onclick="cbox('#cl<?php echo $rsi["id"];?>c<?php echo $o;?>')" style="cursor:pointer;"><input type="checkbox" onclick="cbox('#cl<?php echo $rsi["id"];?>c<?php echo $o;?>')" id="cl<?php echo $rsi["id"];?>c<?php echo $o;?>" name="i<?php echo $i;?>[]" value="<?php echo $rso["n2"];?>" <?php echo $rsi["n8"]?> <?php foreach($jsi["i".$i.""] as $q){if($q==$rso["n2"] or $rso["n3"]==1){echo "checked"; $ql .="".$q.", ";}}?>> <?php echo $rso["n1"];?></li>
				<?php }?>
			</ul>
			<div style="cursor:pointer;height: 60px; overflow: auto;" onclick="toggle('#cl<?php echo $rsi["id"];?>')"><?php if($ql<>""){echo substr($ql,0,-2);}else{echo $sdil[221];} //Lütfen Seçiniz?> <i class="fa fa-angle-down" style="float:right;"></i></div>
			<?php $ql="";$q="";}?>
			<p style="font-size:10px;"><?php echo $rsi["n9"];?></p>
		</fieldset>
	<?php }?>
	<?php $w=0;$sqlw=mysqli_query($conn, "select * from genel where ne='inputs' and (t2='All' or t2='".$_SESSION["lang"]."') and n3='".$_GET["ne"]."' and n4='switch' and (n2='0' or n2='".$rs["id"]."' or n2='".$rs["s9"]."' or n2='".$rs["s10"]."') and s1=0 order by s10 asc"); while($rsw=mysqli_fetch_assoc($sqlw)){$w++;?>
		<fieldset class="grey-bg v3-col-md-3" style="">
			<legend><i class="<?php echo $rsi["n14"]?>"></i>  <?php echo $rsw["n1"];?><span style="font-size:8px; color:#ccc;">(m<?php echo $w;?>)</span></legend>
			<div class="switch switch-sm switch-success">
				<input type="checkbox" name="m<?php echo $w;?>" data-plugin-ios-switch="" value="1" class="switch" <?php if($jsm["m".$w.""]=="1"){?>Checked<?php }?>>
			</div>
		</fieldset>
	<?php }?>
	<script src="assets/js/theme.init.js"></script>