<?php
	header('Content-Type: text/html; charset=utf-8');
	error_reporting(0);
	$path="../../";
	include("../../map.php");
	include("../../scripts.php");
	include("../../secure.php");
	//findDirectoryPath("deppo")
$sql=mysqli_query($conn, "select * from genel where ne='reklam' and id=".$_GET["id"].""); $rs=mysqli_fetch_assoc($sql);
if($rboyut = getimagesize(findDirectoryPath("deppo")."/rimage/".$rs["t6"]."")){$rw=$rboyut[0]; $rh=$rboyut[1];}
$jsi = json_decode($rs["n17"], true);
$rcats = json_decode(GetArr("r","categories"), true);
$scats = json_decode(GetArr("s","categories"), true);
$hcats = json_decode(GetArr("h","categories"), true);
$mcats = json_decode(GetArr("m","categories"), true);
$ccats = json_decode(GetArr("k","categories"), true);
$ucats = json_decode(GetArr("u","categories"), true);
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo $reklam[0]; //Reklam?> <?php echo $sdil[119]; //İşlemleri?></title>
<style>
	#tab-view img{height:unset !important}
</style>
</head>
<body>
    <div class="qmodal">
        <div class="qmodal-content">
            <!-- Header with Action Buttons -->
            <div class="qmodal-header">
				<div class="header-title">
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item"><a href="?"><i class="fa fa-home"></i></a></li>
                            <li class="breadcrumb-item"><a href="#"><?php echo $reklam[0]; //Reklam?></a></li>
                            <li class="breadcrumb-item active" aria-current="page"><?php echo $rs["t1"];?></li>
                        </ol>
                    </nav>
                </div>
                <button type="button" class="btn btn-warning" onclick="AjaxKaydet('','');"><i class="fas fa-save"></i> Kaydet</button>
				<?php if($module["ads_multiple"]=="1"){?>
					<button type="button" class="mb-1 mt-1 mr-1 btn btn-success mfrm" style="color:white;" data-toggle="modal" data-ajax="mresim" data-width="40%" data-target="#myModal" onclick="location.href='#tab-resim'" data-url="<?php echo $weburl."/".$crmpath."/"?>modules/upload/upload_image.php?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $_GET["id"]; ?>" <?php if($authority==0){echo "disabled"; }?>><strong><i class="fa fa-cloud-upload" aria-hidden="true"></i><span class="mdn"> <?php echo $sdil[75]; //Resim Ekle?></span></strong></button>
					<button type="button" class="mb-1 mt-1 mr-1 btn btn-danger mfrm" style="color:white;" data-toggle="modal" data-ajax="mvideo" data-width="40%" data-target="#myModal" onclick="location.href='#tab-video'" data-url="<?php echo $weburl."/".$crmpath."/"?>modules/video/video_add.php?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $_GET["id"]; ?>" <?php if($authority==0){echo "disabled"; }?>><strong><i class="fa fa-play" aria-hidden="true"></i><span class="mdn"> <?php echo $sdil[76]; //Video Ekle?></span></strong></button>
				<?php }?>
            </div>
			<form class="form" id="asave" name="rall" method="post" action="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $_GET["id"];?>&durum=kaydet">
            <!-- Left Tab Menu -->
            <div class="v8-columns">
							<div class="v8-col200pxL-left">
								<ul class="v8-side-tabs v8-js-tabs v8-same-height">
									<li><a href="#tab-detay"><i class="fa fa-bookmark"></i><span> <?php echo $reklam[0]; //Reklam?> <?php echo $sdil[207]; //Detay?></span></a></li>
								<?php if($module["ads_multiple"]=="1"){?>
									<li><a href="#tab-resim"><i class="fa fa-file-image-o" aria-hidden="true"></i><span> <?php echo $sdil[209]; //Resimler?></span></a></li>
									<li><a href="#tab-video"><i class="fa fa-file-video-o" aria-hidden="true"></i><span> <?php echo $sdil[210]; //Videolar?></span></a></li>
								<?php }?>
									<li><a href="#tab-view"><i class="fa fa-eye"></i><span> <?php echo ctranslate("Önizleme")?></span></a></li>
									<li style="<?php if($rs["t7"]<>"0"){echo "text-decoration:line-through";}?>"><a href="#tab-report"><i class="fa fa-line-chart"></i><span> <?php echo $sdil[38]; //Rapor?></span></a></li>
								</ul>
								
								<fieldset class="grey-bg" style="background-color: #fdfdfdf0;">
									<legend><?php echo $sdil[220]; //Aktif/Pasif?> <span style="font-size:8px; color:#ccc;">(s13)</span></legend>
									<select size="1" name="s13" class="form-control">
										<option value="0" <?php echo ($rs["s13"] == 0) ? 'selected' : ''; ?>>[0] <?php echo ctranslate("#Taslak"); ?></option>
										<option value="1" <?php echo ($rs["s13"] == 1) ? 'selected' : ''; ?>>[1] <?php echo ctranslate("#Yayında"); ?></option>
									</select>
								</fieldset>
								<fieldset class="grey-bg" style="<?php if($MSA<>1){echo "display:none;";}?>background-color: #fdfdfdf0;">
									<legend>Silinmez <span style="font-size:8px; color:#ccc;">(s6)</span></legend>
									<select size="1" name="s6" class="form-control">
										<option value="0" <?php echo ($rs["s6"] == 0) ? 'selected' : ''; ?>>...</option>
										<option value="1" <?php echo ($rs["s6"] == 1) ? 'selected' : ''; ?>>Silinmez</option>
									</select>
								</fieldset>
								<fieldset class="grey-bg e" style="background-color: #fdfdfdf0;">
									<legend><i class="fa fa-user-plus" aria-hidden="true"></i> <?php echo translate("İşlem Sorumlusu")?> <span style="font-size:8px; color:#ccc;">(s19)</span></legend>
									<select size=1 name="s19" class="form-control chosen-select">
										<option value="0">Admin</option>
										<?php $sql=mysqli_query($conn, "select * from t5"); while($rsm=mysqli_fetch_assoc($sql)){?>
											<option class="<?php if(kategori($rsm["s2"], "n3")<>""){echo "alert alert-".kategori($rsm["s2"], "n3")."";}?>" value="<?php echo $rsm["id"];?>" title="<?php echo $rsm["t1"];?>" alt="<?php echo $rsm["t1"];?>" style="color:#6699FF" <?php if (($rs["s19"]=="" and $rsm["id"]==$_SESSION["user_id"]) or ($rsm["id"]==$rs["s19"])) {?>Selected<?php }?>><?php echo $rsm["t1"];?></option>
										<?php }?>
									</select>
								</fieldset>
								<fieldset class="grey-bg" style="background-color: #fdfdfdf0;">
									<legend><?php echo translate("Reklam Ölçüleri");?> <span style="font-size:8px; color:#ccc;">(t4-t5)</span></legend>
									<div class="v3-col-md-6 v3-col-xs-6">
										<input type="text" id="t4" class="form-control" name="t4" size="20" value="<?php echo $rs["t4"];?>" style="" title="<?php echo $sdil[117]; //Genişlik?>" class="with-tip" placeholder="<?php echo $sdil[117]; //Genişlik?>">
									</div>
									<div class="v3-col-md-6 v3-col-xs-6">
										<input type="text" id="t5" class="form-control" name="t5" size="20" value="<?php echo $rs["t5"];?>" style="" title="<?php echo $sdil[118]; //Yükseklik?>" class="with-tip" placeholder="<?php echo $sdil[118]; //Yükseklik?>">
									</div>
								</fieldset>
							</div>
							<div class="v8-col200pxL-right" ts1="<?php echo dtarih($rs["ts1"],"gg.ka.yy time");?>" ts2="<?php echo dtarih($rs["ts2"],"gg.ka.yy time");?>" ts3="<?php echo dtarih($rs["ts3"],"gg.ka.yy time");?>">
								<div id="tab-detay" class="v8-tabs-content">
									<fieldset class="grey-bg">
										<legend><?php echo $sdil[39]; //Başlık?> <span style="font-size:8px; color:#ccc;">(t1)</span></legend>
										<?php $rt1="".trim($sdil[200])." ".trim($nedir)."";?>
										<div class="v3-col-md-10 v3-col-xs-10">
											<input type="text" class="form-control" name="t1" value="<?php echo $rs["t1"];?>" onfocus="if(this.value == '<?php echo $rt1 //Reklam?>') { this.value = ''} "  onblur="if(this.value == '') { this.value='<?php echo $rt1 //Reklam?>'; }" placeholder="<?php echo $rt1 //Reklam?>">
										</div>
										<div class="v3-col-md-2 v3-col-xs-2">
											<input type="text" class="form-control" name="s12" value="<?php echo $rs["s12"];?>" onfocus="if(this.value == '0') { this.value = ''} "  onblur="if(this.value == '') { this.value='0'; }">
										</div>
									</fieldset>
									<fieldset class="grey-bg">
										<legend><?php echo ctranslate("Reklam Görseli")?> <span style="font-size:8px; color:#ccc;">(t6)</span></legend>
										<div class="v3-col-md-3" style="position:relative;" onclick="window.open('../upload/upload_all.php?ne=reklam&file=rek-lam&input=t6&id=<?php echo $_GET["id"]?>', 'Upload', 'width=450,height=300')">
											<a class="v3-btn" style="position: absolute; right: 15px; top:3px; border-radius: 0px 5px 5px 0px;"><?php echo ctranslate("Gözat")?></a>
											<input type="text" class="form-control" name="t6" id="t6" value="<?php echo $rs["t6"];?>"  style="" placeholder="<?php echo ctranslate("Görsel Ekle")?>">
										</div>
										<div class="v3-col-md-3" style="position:relative;" onclick="window.open('../upload/upload_all.php?ne=reklam&file=rek-lam&input=t16&id=<?php echo $_GET["id"]?>', 'Upload', 'width=450,height=300')">
											<a class="v3-btn" style="position: absolute; right: 15px; top:3px; border-radius: 0px 5px 5px 0px;"><?php echo ctranslate("Gözat")?></a>
											<input type="text" class="form-control" name="t16" id="t16" value="<?php echo $rs["t16"];?>" style="" placeholder="Mobil <?php echo ctranslate("Görsel Ekle")?>">
										</div>
										<div class="v3-col-md-3 v3-col-xs-6">
											<input type="number" min="1" class="form-control modalads" name="t9" value="<?php echo $rs["t9"];?>" placeholder="Süresiz (ms)" style="<?php if($rs["s1"]<>"1000"){echo "display:none";}?>">
										</div>
										<div class="v3-col-md-3">
											<select name="s7" class="form-control modalads" style="<?php if($rs["s1"]<>"1000"){echo "display:none";}?>">
												<option value="0" <?php if($rs["s7"]=="0"){?>Selected<?php }?>>Gösterim</option>
												<option value="1" <?php if($rs["s7"]=="1"){?>Selected<?php }?>>Birkez</option>
												<option value="2" <?php if($rs["s7"]=="2"){?>Selected<?php }?>>Sürekli</option>
											</select>
										</div>
									</fieldset>
									<fieldset class="grey-bg">
										<legend><?php echo $sdil[113]; //Türü?> <span style="font-size:8px; color:#ccc;">(t3-s1)</span></legend>
										<div class="v3-col-md-3 v3-col-xs-6">
											<select name="t3" class="form-control">
												<option value="image" <?php if($rs["t3"]=="image"){?>Selected<?php }?>>Image</option>
												<option value="video" <?php if($rs["t3"]=="video"){?>Selected<?php }?>>Video</option>
												<option value="text" <?php if($rs["t3"]=="text"){?>Selected<?php }?>>Text</option>
												<option value="kod" <?php if($rs["t3"]=="kod"){?>Selected<?php }?>>Code</option>
											</select>
										</div>
										<div class="v3-col-md-3 v3-col-xs-6">
											<select name="s1" style=""  class="form-control chosen-select" id="s1">
												<option value="0" style="color:#f00;">#<?php echo $sdil[73]; //Reklam Alanları?></option>
												<option value="1000" <?php if($rs["s1"]=="1000"){?>Selected<?php }?>>Modal Ads</option>
												<option value="1001" <?php if($rs["s1"]=="1001"){?>Selected<?php }?>>Top Ads</option>
												<option value="1002" <?php if($rs["s1"]=="1002"){?>Selected<?php }?>>App Login Ads</option>
												<option value="1003" <?php if($rs["s1"]=="1003"){?>Selected<?php }?>>Login Ads</option>
												<option value="1004" <?php if($rs["s1"]=="1004"){?>Selected<?php }?>>OIM Ads</option>
												<?php
												if($d10<>0){
													echo "<optgroup label=\"".ctranslate($reklam[0]." Grupları")."\">";
													foreach($rcats as $xkey=>$xvalue){$jscx = json_decode($xvalue["n1"],true);
													if(($xvalue["ne"]=="rkategori") or ($xvalue["t1"]=="reklam")){
														?>
														<option class="c0" value="<?php echo $xvalue["id"];?>" title="<?php echo $xvalue["item"];?>" style="color:#6699FF" <?php if($xvalue["id"]==$rs["s1"]){echo "Selected";}?>>+ <?php echo ctranslate($xvalue["item"]);?> [<?php echo $xvalue["id"];?>]</option>
													<?php }}?>
												</optgroup>
											<?php }?>
												<?php
													echo "<optgroup label=\"".ctranslate($t21s[0]." Grupları")."\">";
													foreach($scats as $xkey=>$xvalue){$jscx = json_decode($xvalue["n1"],true);
													if(($xvalue["ne"]=="skategori") or ($xvalue["t1"]=="sayfa")){
														?>
														<option class="c0" value="<?php echo $xvalue["id"];?>" title="<?php echo $xvalue["item"];?>" style="color:#6699FF" <?php if($xvalue["id"]==$rs["s1"]){echo "Selected";}?>>+ <?php echo ctranslate($xvalue["item"]);?> [<?php echo $xvalue["id"];?>]</option>
													<?php }}?>
												</optgroup>
											<?php
											if($b1<>0){
												echo "<optgroup label=\"".ctranslate($t22s[0]." Grupları")."\">";
												foreach($hcats as $xkey=>$xvalue){
													if($xvalue["ne"]=="hkategori"  or ($xvalue["t1"]=="haber")){
														?>
														<option class="c0" value="<?php echo $xvalue["id"];?>" title="<?php echo $xvalue["item"];?>" style="color:#6699FF" <?php if($xvalue["id"]==$rs["s1"]){echo "Selected";}?>>+ <?php echo ctranslate($xvalue["item"]);?> [<?php echo $xvalue["id"];?>]</option>
													<?php }}?>
												</optgroup>
											<?php }?>
											<?php
											foreach($xcats as $mkey=>$mvalue){
												if($mvalue["ne"]=="xmodules"){
													echo "<optgroup label=\"".ctranslate($mvalue["item"])." Grupları\">";
													foreach($xcats as $xkey=>$xvalue){
														if($xvalue["ne"]=="".$mvalue["n4"]."kategori" or ($xvalue["t1"]==$mvalue["n2"])){
															?>
															<option class="c0" value="<?php echo $xvalue["id"];?>" title="<?php echo $xvalue["item"];?>" style="color:#6699FF" <?php if($xvalue["id"]==$rs["s1"]){echo "Selected";}?>>+ <?php echo ctranslate($xvalue["item"]);?> [<?php echo $xvalue["id"];?>]</option>
														<?php }}?>
														</optgroup>
													<?php }}?>
													<?php
													if($a4<>0){
														echo "<optgroup label=\"".ctranslate($t24s[0]." Grupları")."\">";
														foreach($ucats as $xkey=>$xvalue){
															if($xvalue["ne"]=="ukategori" or ($xvalue["t1"]=="kayit" and $xvalue["s1"]==0)){
																?>
																<option class="c0" value="<?php echo $xvalue["id"];?>" title="<?php echo $xvalue["item"];?>" style="color:#6699FF" <?php if($xvalue["id"]==$rs["s1"]){echo "Selected";}?>>+ <?php echo ctranslate($xvalue["item"]);?> [<?php echo $xvalue["id"];?>]</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 $yvalue["item"];?>" title="<?php echo $yvalue["item"];?>" style="color:#6699FF" <?php if($yvalue["id"]==$rs["s1"]){echo "Selected";}?>>- <?php echo ctranslate($yvalue["item"]);?> [<?php echo $yvalue["id"];?>]</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 $zvalue[$ckat];?>" title="<?php echo $zvalue["item"];?>" style="color:#6699FF" <?php if($zvalue["id"]==$rs["s1"]){echo "Selected";}?>>. <?php echo ctranslate($zvalue["item"]);?> [<?php echo $zvalue["id"];?>]</option>
																			<?php }}?>
																		<?php }}?>
																	<?php }?>
															<?php }?>
														</optgroup>
													<?php }?>
												</select>
												</div>
												<div class="v3-col-md-3 v3-col-xs-6">
													<select name="t2" id="t2" class="form-control">
														<option value="All" <?php if ($rs["t2"]=="" or $rs["t2"]=="All"){?>Selected<?php }?>>[0] <?php echo $sdil[132] //Tüm?></option>
														<?php $i = 0;$diller = explode(',',$m1); foreach($diller as $dil) {$i++; if($i > 99) {$i = 1;}?>
														<option value="lang<?php echo $i?>" <?php if ($rs["t2"]=="lang".$i."" or ($rs["t2"]=="" and $_SESSION["lang"]=="lang".$i."")){?>Selected<?php }?>>[<?php echo $i;?>] <?php echo $dil;?></option>
														<?php }?>
													</select>
													</div>
													<div class="v3-col-md-3 v3-col-xs-6">
														<input type="date" class="form-control" name="t12" size="20" value="<?php echo $rs["t12"];?>" class="with-tip" placeholder="Tarih">
													</div>
												</fieldset>
												<fieldset class="grey-bg txtads" style="<?php if($rs["t3"]<>"text"){echo "display:none;";}?>">
													<legend><a><?php echo $sdil[207]; //Detay?> <span style="font-size:8px; color:#ccc;">(n1)</span></a></legend>
													<textarea name="n1" class="rte form-control" id="rte" style="height:150px" placeholder="<?php echo $sdil[25]; //Reklam?> Text"><?php echo $rs["n1"];?></textarea>
												</fieldset>
												<div style="margin-right: -15px; margin-left: -15px;">
													<div class="v3-col-md-12" id="inputs">
														<img src="../assets/img/loading.gif">
														<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>
													</div>
												</div>
												<script type="text/JavaScript" language="JavaScript">
													jQuery(document).ready(function () { loadFunction('../ajax/ajax_inputs.php','#inputs'); });
													jQuery('#s1').on('change', function() { divload('../ajax/ajax_inputs.php?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $_GET["id"];?>&s1=' + this.value + '','#inputs'); });
												</script>
												<fieldset class="grey-bg codeads" style="<?php if($rs["t3"]<>"kod"){echo "display:none;";}?>">
													<legend><?php echo $reklam[0]; //Reklam?> Code <span style="font-size:8px; color:#ccc;">(n3)</span></legend>
													<textarea name="n3" class="form-control" style="height:50px" placeholder="<?php echo $sdil[25]; //Reklam?> Code"><?php echo trim($rs["n3"]);?></textarea>
													<p>Kod olarak verilen reklam Tipi için</p>
												</fieldset>
												<fieldset class="grey-bg v3-col-md-6">
													<legend>a Attributes <span style="font-size:8px; color:#ccc;">(t10)</span></legend>
													<textarea name="t10" class="form-control" style="height:34px" placeholder="a Attr"><?php echo trim($rs["t10"]);?></textarea>
													<p>a Class / Css</p>
												</fieldset>
												<fieldset class="grey-bg v3-col-md-6">
													<legend>image Attributes <span style="font-size:8px; color:#ccc;">(n4)</span></legend>
													<textarea name="n4" class="form-control" style="height:34px" placeholder="image Attr"><?php echo trim($rs["n4"]);?></textarea>
													<p>image Class / Css</p>
												</fieldset>
												<fieldset class="grey-bg">
													<legend><?php echo $sdil[83]; //Link?> <span style="font-size:8px; color:#ccc;">(n2-t8)</span></legend>
													<div class="v3-col-md-6 v3-col-xs-12">
														<input type="text" class="form-control" name="n2" size="20" value="<?php echo $rs["n2"];?>" style="" placeholder="Url">
													</div>
													<div class="v3-col-md-3 v3-col-xs-6">
														<select size="1" class="form-control" name="t8" style="">
															<option value="_self" <?php if($rs["t8"]=="_self"){?>Selected<?php }?>>_Self</option>
															<option value="_blank" <?php if($rs["t8"]=="_blank"){?>Selected<?php }?>>_Blank</option>
														</select>
													</div>
													<div class="v3-col-md-3 v3-col-xs-6">
														<select size="1" class="form-control" name="t7" style="">
															<option value="0" <?php if($rs["t7"]=="0"){?>Selected<?php }?>>Raporlu</option>
															<option value="1" <?php if($rs["t7"]=="1"){?>Selected<?php }?>>Direk</option>
														</select>
														<p>Tıklanma sayısı için "Raporlu" seçilmeli</p>
													</div>
												</fieldset>
											</div>
											<div id="tab-view" class="v8-tabs-content" style="">
												<?php echo reklam($_GET["id"],$rs["s12"])?>
											</div>
											<div id="tab-report" class="v8-tabs-content" style="">
												<?php include("report.php");?>
											</div>
											</form>
											<?php if($module["ads_multiple"]=="1"){?>
											<div id="tab-resim" class="v8-tabs-content" style="min-height:500px; position:relative;">
												<fieldset id="uploadarea" class="row" style="border: 2px dashed #d9d9d9;">
													<legend><?php echo $sdil[209]; //Resimler?></legend>
													<script type="text/JavaScript" language="JavaScript">
														jQuery(document).ready(function () {
															loadFunction('../ajax/ajax_medya.php','#mresim', 'resim');
														});
														document.write("<div id=\"mresim\" class=\"medias\" style=\"width:100%\"></div>");
													</script>
												</fieldset>
												</div>
												<div id="tab-video" class="v8-tabs-content" style="min-height:500px; position:relative;">
												<fieldset class="v3-row" style="border: 2px dashed #d9d9d9;">
													<legend><?php echo $sdil[210]; //Videolar?></legend>
													<script type="text/JavaScript" language="JavaScript">
														jQuery(document).ready(function () {
															loadFunction('../ajax/ajax_medya.php','#mvideo', 'video');
														});
														document.write("<div id=\"mvideo\" class=\"medias\" style=\"width:100%\"></div>");
													</script>
												</fieldset>
											</div>
											<?php }?>
										</div>
									</div>
								</div>
							</div>
						</div>
                 </div>
            </div>
</form>
</body>
<script src="../../assets/js/tabs.js"></script>
<?php echo $footer?>
</html>
<script>
jQuery('#asave').on('change',function(){
	var t3 = jQuery('[name="t3"]').val();
	var s1 = jQuery('[name="s1"]').val();
	if(t3=="kod"){jQuery('.codeads').css('display','block');}else{jQuery('.codeads').css('display','none');}
	if(t3=="text"){jQuery('.txtads').css('display','block');}else{jQuery('.txtads').css('display','none');}
	if(s1=="1000"){jQuery('.modalads').css('display','block');}else{jQuery('.modalads').css('display','none');}
}); 
</script>
<?php
//-------------------------------------------------------------------------/İşlem Ekle/
if($_GET["durum"] == "kaydet"){
	if(!empty($_POST["s1"])){$ss1=$_POST["s1"];}else{$ss1="0";}
	if(!empty($_POST["s2"])){$ss2=$_POST["s2"];}else{$ss2="0";}
	if(!empty($_POST["s3"])){$ss3=$_POST["s3"];}else{$ss3="0";}
	if(!empty($_POST["s4"])){$ss4=$_POST["s4"];}else{$ss4="0";}
	if(!empty($_POST["s5"])){$ss5=$_POST["s5"];}else{$ss5="0";}
	if(!empty($_POST["s6"])){$ss6=$_POST["s6"];}else{$ss6="0";}
	if(!empty($_POST["s7"])){$ss7=$_POST["s7"];}else{$ss7="0";}
	if(!empty($_POST["s12"])){$ss12=$_POST["s12"];}else{$ss12="0";}
	if(!empty($_POST["s13"])){$ss13=$_POST["s13"];}else{$ss13="0";}
	if(!empty($_POST["s19"])){$ss19=$_POST["s19"];}else{$ss19="0";}
	$iarr = array();
	foreach ($_POST as $key => $value){
		if(substr($key,0,1)=="i"){
			$iarr = $iarr + array( $key => $value);
		}
	}
	$rjsi = json_encode($iarr, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);
	$Rs = mysqli_query($conn, "update genel set t1='".$_POST["t1"]."', t2='".$_POST["t2"]."', t3='".$_POST["t3"]."', t4='".$_POST["t4"]."', t5='".$_POST["t5"]."', t6='".$_POST["t6"]."', t16='".$_POST["t16"]."', t7='".$_POST["t7"]."', t8='".$_POST["t8"]."', t9='".$_POST["t9"]."', t10='".addslashes(stripslashes($_POST["t10"]))."', t12='".$_POST["t12"]."', n1='".addslashes(stripslashes($_POST["n1"]))."', n2='".$_POST["n2"]."', n3='".addslashes(stripslashes($_POST["n3"]))."', n4='".addslashes(stripslashes($_POST["n4"]))."', n5='".$_POST["n5"]."', n17='".addslashes(stripslashes($rjsi))."', s1='".$ss1."', s2='".$ss2."', s3='".$ss3."', s4='".$ss4."', s5='".$ss5."', s6='".$ss6."', s7='".$ss7."', s12='".$ss12."', s13='".$ss13."', s19='".$ss19."', ts2=now() where id=".$_GET["id"]."");
if($_POST["ts3"]<>""){
	$Rs = mysqli_query($conn, "update genel set ts3='".$_POST["ts3"]."' where id=".$_GET["id"]."");
}
	echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&id=".$_GET["id"]."&durum=ok",self,500,1);
}
include("../public/log.php");
?>