<?php
	header('Content-Type: text/html; charset=utf-8');
	error_reporting(0);
	$path="../../";
	include("../../map.php");
	include("../../scripts.php");
	include("../../secure.php");
	$sql=mysqli_query($conn, "select * from ".$_SESSION['lang']." where id=".$_GET["id"].""); $rs=mysqli_fetch_assoc($sql);
	$jstn = json_decode($rs["n1"], true); $jssi = json_decode($rs["n2"], true); $jsa = json_decode($rs["n3"], true); $jsi = json_decode($rs["n17"], true);
	if($rs["m2"]=="form" or $rs["m2"]==""){$nedir=$form[0];}elseif($rs["m2"]=="survey"){$nedir=translate("Anket");}elseif($rs["m2"]=="exam"){$nedir=translate("Sınav"); }
	//findDirectoryPath("deppo")
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo $sdil[119]; //Yönetimi?></title>
</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="<?php echo $weburl?>" target="_blank"><i class="fa fa-home"></i></a></li>
                            <li class="breadcrumb-item active" aria-current="page"><?php echo $sdil[119]; //Yönetimi?></li>
                        </ol>
                    </nav>
                </div>
                <button type="button" class="btn btn-warning" onclick="AjaxKaydet('','');"><i class="fas fa-save"></i> Kaydet</button>
				<button type="button" class="btn btn-default" href="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $_GET["id"]; ?>&durum=klonla" class="with-tip" <?php if($authority==0){echo "disabled"; }?>><strong><i class="fa fa-files-o" aria-hidden="true"></i></strong></button>
            </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-bilgi"><i class="fa fa-file"></i><span> <?php echo $nedir?> <?php echo $sdil[207]; //Bilgileri?></span></a></li>
                <li><a href="#tab-icerik"><i class="fa fa-list-ul"></i><span> <?php echo $form[0]; //Formlar?></span></a></li>
                <li><a href="#tab-view"><i class="fa fa-eye"></i><span> <?php echo $form[0];?> Önizleme</span></a></li>
                <?php if($rs["m2"]=="form"){?>
                  <li><a href="#tab-answer"><i class="fa fa-list-ul"></i><span> <?php echo translate("Otomatik Cevap")?></span></a></li>
                <?php }elseif($rs["m2"]=="survey"){?>
                  <li><a class="mfrm" data-toggle="modal" data-target="#myModal" data-url="../forms/report.php?ne=<?php echo $_GET["ne"]?>&islem=<?php echo $_GET["islem"]?>&id=<?php echo $_GET["id"]?>" href="#" title="<?php echo translate("Filtre")?>"><i class="fa fa-list-ul"></i><span> <?php echo translate("Anket Raporu")?></span></a></li>
                <?php }?>
                <li class="ddn"><a href="#" onclick="show('switchs')"><i class="fa fa-chevron-right" aria-hidden="true"></i></a></li>
              </ul>
              <div id="switchs">
                <div class="v3-alert v3-alert-warning ddn">
                  <i class="fas fa-arrow-right" onclick="hide('switchs')"></i>
                </div>
              </div>
            </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-bilgi" class="v8-tabs-content">
                <div class="v3-row">
                  <div class="col-md-8 fl">
                    <fieldset class="grey-bg">
                      <legend><?php echo $nedir?> <?php echo $sdil[39]; //Başlık?> <span style="font-size:10px">*başlık</span></legend>
                      <?php $ft1="".trim($sdil[200])." ".trim($nedir)."";?>
                      <input class="form-control" type="text" name="m1" id="simple-required" value="<?php echo $rs["m1"];?>"  style="" placeholder="<?php echo $ft1;?>"  onfocus="if(this.value == '<?php echo $ft1;?>') { this.value = ''} "  onblur="if(this.value == '') { this.value='<?php echo $ft1;?>'; }">
                    </fieldset>
                  </div>
				<div class="col-md-4 fl">
                    <fieldset class="grey-bg">
                      <legend><?php echo $form[0]?> <?php echo $sdil[113]; //Türü?></legend>
                      <div class="v3-col-md-6">
                        <select size="1" name="m2" class="form-control" style="float: left;">
                          <option value="form" <?php if($rs["m2"]=="form"){?>Selected<?php }?>>Form</option>
                          <option value="survey" <?php if($rs["m2"]=="survey"){?>Selected<?php }?>><?php echo translate("Anket"); //Anket?></option>
                          <option value="exam" <?php if($rs["m2"]=="exam"){?>Selected<?php }?>><?php echo translate("Sınav"); //Sınav?></option>
                        </select>
                      </div>
                      <div class="v3-col-md-6">
                        <select size="1" name="m4" class="form-control" style="float: left;">
                         <option value="">..</option>
                         <option value="fmesaj" <?php if($rs["m4"]=="fmesaj"){?>Selected<?php }?>><?php echo translate("Mesaj Formu")?></option>
                          <option value="request" <?php if($rs["m4"]=="request"){?>Selected<?php }?>><?php echo translate("Talep Formu");?></option>
                        </select>
                      </div>
                    </fieldset>
                  </div>
                </div>
                <div class="row">
                  
                  <div class="col-md-4 <?php if($rs["m2"]<>"survey"){echo "dn";}?>">
                    <fieldset class="grey-bg">
                      <legend>Sonuçları Gizle</legend>
                      <div class="switch switch-sm switch-success">
                        <input type="checkbox" data-plugin-ios-switch="" name="qt6" id="qt6" value="1" class="switch" <?php if($rs["t6"]=="1") {?>checked<?php }?>>
                      </div>
                    </fieldset>
                  </div>
                  <div class="col-md-4 <?php if($rs["m2"]<>"survey"){echo "dn";}?>">
                    <fieldset class="grey-bg">
                      <legend>Ip Kontrol</legend>
                      <div class="switch switch-sm switch-success">
                        <input type="checkbox" data-plugin-ios-switch="" name="qt7" id="qt7" value="1" class="switch" <?php if($rs["t7"]=="1") {?>checked<?php }?>>
                      </div>
                    </fieldset>
                  </div>
                  <div class="col-md-4 <?php if($rs["m2"]<>"" and $rs["m2"]<>"form"){echo "dn";}?>">
                    <fieldset class="grey-bg">
                      <legend>Alıcı</legend>
                      <input class="form-control" type="text" name="qt2" id="simple-required" value="<?php echo $rs["t2"];?>"  style="" placeholder="Alıcı">
                    </fieldset>
                  </div>
                  <div class="col-md-4 <?php if($rs["m2"]<>"" and $rs["m2"]<>"form"){echo "dn";}?>">
                    <fieldset class="grey-bg">
                      <legend>Cc</legend>
                      <input class="form-control" type="text" name="qt3" id="simple-required" value="<?php echo $rs["t3"];?>"  style="" placeholder="Cc">
                    </fieldset>
                  </div>
                  <div class="col-md-4 <?php if($rs["m2"]<>"" and $rs["m2"]<>"form"){echo "dn";}?>">
                    <fieldset class="grey-bg">
                      <legend>Bcc</legend>
                      <input class="form-control" type="text" name="qt5" id="simple-required" value="<?php echo $rs["t5"];?>"  style="" placeholder="Bcc">
                    </fieldset>
                  </div>
                </div>
                <div class="row">
                  <?php $skat="id"; $ckat="Cat_ID"; ?>
                  <div class="v3-col-md-4">
                    <fieldset class="grey-bg" style="height:115px">
                      <legend>Mesaj iletildi metni</legend>
                      <textarea name="qt9" class="form-control" placeholder="Mesaj iletildi metni"><?php echo $rs["t9"];?></textarea>
                    </fieldset>
                  </div>
                  <div class="v3-col-md-4">
                    <fieldset class="grey-bg" style="height:115px">
                      <legend>Form BackURL</legend>
                      <textarea name="qt10" class="form-control" placeholder="Form BackURL"><?php echo $rs["t10"];?></textarea>
						<?php if($rs["t10"]=="1"){echo "<p>* ".$rs["t10"]."</p>";}?>
                    </fieldset>
                  </div>
                  <div class="v3-col-md-4">
                    <fieldset class="grey-bg" style="height:115px">
						<legend><?php echo translate("Form Ayarları")?></legend>
						<div class="col-md-4 col-xs-4 tal mtal"><label><?php echo translate("Sonuç / Result")?></label><input type="checkbox" name="m6" value="1" <?php if($rs["m6"]==1){echo "checked";}?>></div>
						<div class="col-md-4 col-xs-4 tal mtal"><label><?php echo translate("Boş Veri")?></label><input type="checkbox" name="m7" value="1" <?php if($rs["m7"]==1){echo "checked";}?>></div>
						<div class="col-md-4 col-xs-4 tal mtal"><label><?php echo translate("Mail Gönderme")?></label><input type="checkbox" name="m8" value="1" <?php if($rs["m8"]==1){echo "checked";}?>></div>
						<?php if($rs["m6"]=="1"){echo "<p>* ?result/{requestID}</p>";}?>
                    </fieldset>
                  </div>
				</div>
                <div class="row">
                  <?php $skat="id"; $ckat="Cat_ID"; ?>
                  <div class="v3-col-md-4">
                    <fieldset class="grey-bg" style="height:115px">
                      <legend>Class</legend>
                      <textarea name="qt4" class="form-control" placeholder="Class"><?php echo $rs["t4"];?></textarea>
                    </fieldset>
                  </div>
                  <div class="v3-col-md-4">
                    <fieldset class="grey-bg" style="height:115px">
                      <legend>Style</legend>
                      <textarea name="qn4" class="form-control" placeholder="Style"><?php echo $rs["n4"];?></textarea>
                    </fieldset>
                  </div>
                  <div class="v3-col-md-4">
                    <fieldset class="grey-bg" style="height:115px">
                      <legend><?php echo ctranslate("İlişkidekiler")?></legend>
                      <select name="qt8[]" data-placeholder="<?php echo ctranslate("Seçiniz")?>" multiple="multiple" class="form-control chosen-select" data-plugin-selecttwo="" tabindex="8">
                        <?php
							$tid = explode(',',$rs["t8"]);
							$sqlsa=mysqli_query($conn, "select * from ".$_SESSION["lang"]." where (ne='sayfa') order by s1 asc"); while($rssa=mysqli_fetch_assoc($sqlsa)){
                        ?>
                          <option value="<?php echo $rssa["id"];?>" <?php foreach($tid as $n0) {?><?php if($rssa["id"]==$n0){?>Selected<?php }}?>>+<?php echo ctranslate($rssa["t1"]);?> [#<?php echo $rssa["id"];?>]</option>
						<?php $sqlx=mysqli_query($conn, "select * from t1 where ne='isayfa' and s1=".$rssa["id"]." order by s10 asc"); while($rsx=mysqli_fetch_assoc($sqlx)){?>
							<option value="<?php echo $rsx["id"];?>" <?php foreach($tid as $n0) {?><?php if($rsx["id"]==$n0){?>Selected<?php }}?>>-<?php echo ctranslate($rsx["t1"]);?> [#<?php echo $rsx["id"];?>]</option>
                        <?php }?>
                        <?php }?>
                        <?php
                        $sqlxm=mysqli_query($conn, "select * from genel where ne='xmodules' order by id asc"); while($rsxm=mysqli_fetch_assoc($sqlxm)){
                          $sqlxs=mysqli_query($conn, "select * from ".$_SESSION["lang"]." where ne='".$rsxm["n2"]."' order by s1 asc"); while($rsxs=mysqli_fetch_assoc($sqlxs)){
                            ?>
                            <option value="<?php echo $rsxs["id"];?>" <?php foreach($tid as $n0) {?><?php if($rsxs["id"]==$n0){?>Selected<?php }}?>><?php echo ctranslate($rsxs["t1"]);?> [#<?php echo $rsxs["id"];?>]</option>
                          <?php }}?>
                        </select>
                      </fieldset>
                    </div>
                    <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>
                    <script type="text/JavaScript" language="JavaScript">
                      jQuery(document).ready(function () { loadFunction('../ajax/ajax_inputs.php','#inputs'); });
                      jQuery('#s2').on('change', function() { divload('../ajax/ajax_inputs.php?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $_GET["id"];?>&s2=' + this.value + '','#inputs'); });
                      jQuery('#s3').on('change', function() { divload('../ajax/ajax_inputs.php?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $_GET["id"];?>&s3=' + this.value + '','#inputs'); });
                    </script>
                  </div>
                </div>
                <?php if($rs["m2"]=="form"){?>
                  <div id="tab-answer" class="v8-tabs-content" style="">
                    <div class="v3-row">
                      <fieldset class="grey-bg">
                        <legend><?php echo $sdil[40]; //Açıklama?></legend>
                        <textarea name="qn5" id="rte" class="rte form-control" placeholder="<?php echo $sdil[40]; //Açıklama?>"><?php echo $rs["n5"];?></textarea>
                      </fieldset>
                    </div>
                  </div>
                <?php }?>
                <div id="tab-icerik" class="v8-tabs-content" style="">
					<div class="v3-row" style="height: 30px; margin-bottom:5px">
						<div class="v3-alert v3-alert-warning" style="padding: 5px; border: 2px dashed;"><i class="fas fa-exclamation-triangle"></i> Input text'ler benzeşmesi gerekirse, Input name değiştirilmelidir</div>
					</div>
                  <div class="v3-row">
                    <?php $f=1; for ( $i=1; $i < 99 ; $i++ ){?>
                      <fieldset id="fi<?php echo $i; ?>" class="grey-bg" style="<?php if($i==1 or $jstn["t".$i.""]<>""){$f++;}else{?>display:none;<?php }?>">
                        <legend>input <span style="font-size:8px; font-family:Arial; color:#ccc;"> (t<?php echo $i; ?>)</span></legend>
                        <div class="v3-col-md-5">
                          <input type="text" class="form-control" name="t<?php echo $i; ?>" id="simple-required" value="<?php echo $jstn["t".$i.""];?>" class="with-tip" title="t<?php echo $i; ?>" placeholder="Input Text">
                        </div>
                        <div class="v3-col-md-2">
                          <input type="text" class="form-control" name="v<?php echo $i; ?>" id="simple-required" value="<?php echo $jstn["v".$i.""];?>" class="with-tip" title="v<?php echo $i; ?>" placeholder="Value">
                        </div>
                        <div class="v3-col-md-2">
                          <input type="text" class="form-control" name="c<?php echo $i; ?>" id="simple-required" value="<?php if($jstn["c".$i.""]==""){echo "12";}else{echo $jstn["c".$i.""];};?>" class="with-tip" title="c<?php echo $i; ?>" placeholder="col-md-">
                        </div>
                        <div class="v3-col-md-2">
                          <select size="1" name="i<?php echo $i; ?>" class="form-control" title="i<?php echo $i; ?>">
                            <option value="0" <?php if($jssi["i".$i.""]=="0"){?>Selected<?php }?>>input</option>
                            <option value="1" <?php if($jssi["i".$i.""]=="1"){?>Selected<?php }?>>textarea</option>
                            <option value="2" <?php if($jssi["i".$i.""]=="2"){?>Selected<?php }?>>Select</option>
                            <option value="3" <?php if($jssi["i".$i.""]=="3"){?>Selected<?php }?>>Radio</option>
                            <option value="4" <?php if($jssi["i".$i.""]=="4"){?>Selected<?php }?>>Checkbox</option>
                            <option value="5" <?php if($jssi["i".$i.""]=="5"){?>Selected<?php }?>>file</option>
                            <option value="6" <?php if($jssi["i".$i.""]=="6"){?>Selected<?php }?>>text</option>
                          </select>
                        </div>
                        <div class="v3-col-md-1">
                          <div class="switch switch-sm switch-success">
                            <input type="checkbox" name="s<?php echo $i; ?>" value="1" data-plugin-ios-switch="" title="(s<?php echo $i; ?>) <?php echo $sdil[174]; //Zorunlu?>" <?php if($jssi["s".$i.""]=="1"){?>Checked<?php }?>><br />
                          </div>
							<!--<a onclick="toggle('#attr<?php echo $i; ?>')" class="fa fa-edit" style="position: absolute; top: 5px; right: 15px; font-size: 20px;"></a>-->
                        </div>
                        <div class="v3-col-md-11">
                          <input type="text" class="form-control" name="n<?php echo $i; ?>" id="simple-required" value="<?php echo $jstn["n".$i.""];?>" title="n<?php echo $i; ?>" style="margin-top:3px;" placeholder="Input <?php echo $sdil[40]; //Açıklama?>, <?php echo $sdil[173]; //Seçenek?>">
                        </div>
                        <div class="v3-col-md-1">
                          <i class="fa fa-angle-double-down cp" onclick="toggle('#attr<?php echo $i; ?>')"></i>
                        </div>
                        <div style="display:none;" id="attr<?php echo $i; ?>" style="">
                          <div class="v3-col-md-2">
                            <input type="text" class="form-control" name="p<?php echo $i; ?>" id="simple-required" value="<?php echo $jstn["p".$i.""];?>" class="with-tip" title="p<?php echo $i; ?>" placeholder="Placeholder">
                          </div>
                          <div class="v3-col-md-2">
                            <input type="text" class="form-control" name="name<?php echo $i; ?>" value="<?php echo $jstn["name".$i.""];?>" class="with-tip" title="name<?php echo $i; ?>" placeholder="Name">
                          </div>
                          <div class="v3-col-md-1">
                            <input type="text" class="form-control" name="id<?php echo $i; ?>" id="id<?php echo $i;?>" value="<?php echo $jstn["id".$i.""];?>" class="with-tip" title="class<?php echo $i; ?>" placeholder="ID">
                            <datalist id="lid<?php echo $i;?>">
                              <option>country</option>
                            </datalist>
                          </div>
                          <div class="v3-col-md-2">
                            <input type="text" class="form-control" name="class<?php echo $i; ?>" id="simple-required" value="<?php echo $jstn["class".$i.""];?>" class="with-tip" title="class<?php echo $i; ?>" placeholder="Class">
                          </div>
                          <div class="v3-col-md-2">
                            <input type="text" class="form-control" name="attr<?php echo $i; ?>" id="simple-required" value="<?php echo $jstn["attr".$i.""];?>" class="with-tip" title="attr<?php echo $i; ?>" placeholder="Attr">
                          </div>
                          <div class="v3-col-md-2">
                            <input type="text" list="mask<?php echo $i; ?>" class="form-control" name="mask<?php echo $i; ?>" id="simple-required" value="<?php echo $jstn["mask".$i.""];?>" class="with-tip" title="mask<?php echo $i; ?>" placeholder="Mask">
                            <datalist id="mask<?php echo $i; ?>">
                              <option>(999) 999 9999</option>
                            </datalist>
                          </div>
                          <div class="v3-col-md-1">
                            <input type="text" class="form-control" list="type<?php echo $i; ?>" name="type<?php echo $i; ?>" id="simple-required" value="<?php echo $jstn["type".$i.""];?>" class="with-tip" title="type<?php echo $i; ?>" placeholder="type">
                            <datalist id="type<?php echo $i; ?>">
                              <option>text</option>
                              <option>number</option>
                              <option>email</option>
                              <option>tel</option>
                              <option>url</option>
                              <option>date</option>
                              <option>datetime-local</option>
                              <option>grup</option>
                            </datalist>
                          </div>
                        </div>
                        <a class="v3-btn v3-btn-xs v3-btn-warning" id="fn<?php echo $i; ?>" style="position: absolute; right: 12px; margin-top: <?php if($mobile==""){echo "110";}else{echo "24";}?>px; cursor:pointer; <?php if($jstn["t".$i.""]<>"" and $jstn["t".$f.""]<>""){echo "display:none;";}?>" onclick="show('fi<?php echo $i+1; ?>'); hide('fn<?php echo $i; ?>')"><i class="fa fa-plus"></i> <?php echo translate("Form Satırı Ekle")?></a>
                      </fieldset>
                    <?php }?>
                  </div>
                </div>
              </form>
				<div id="tab-view" class="v8-tabs-content" style="">
					<?php $fid=$_GET["id"]; include(findDirectoryPath("deppo")."/tools/script/form.php")?>
				</div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </form>
                 </div>
            </div>
</body>
<script src="../../assets/js/tabs.js"></script>
<?php echo $footer?>
</html>
<?php
//-------------------------------------------------------------------------/İşlem Ekle/
if($_GET["durum"] == "kaydet"){
  $qt8 = implode(',',$_POST["qt8"]);
  if($_POST["m6"]==""){$m6="0";}else{$m6=$_POST["m6"];}
  if($_POST["m7"]==""){$m7="0";}else{$m7=$_POST["m7"];}
  if($_POST["m8"]==""){$m8="0";}else{$m7=$_POST["m8"];}
  $iarr = array();
  foreach ($_POST as $key => $value){
    if(substr($key,0,1)=="q"){
      $iarr = $iarr + array( $key => $value);
    }
  }
  $rjsi = json_encode($iarr, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);
  $tnarr = array();
  foreach ($_POST as $key => $value){
    if(substr($key,0,1)=="t" or substr($key,0,1)=="n" or substr($key,0,1)=="p" or substr($key,0,1)=="v" or substr($key,0,1)=="c" or substr($key,0,1)=="m" or substr($key,0,1)=="i"){
      $tnarr = $tnarr + array( $key => $value);
    }
  }
  $tnarr = json_encode($tnarr, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);
  $siarr = array();
  foreach ($_POST as $key => $value){
    if(substr($key,0,1)=="s" or substr($key,0,1)=="i"){
      $siarr = $siarr + array( $key => $value);
    }
  }
  $siarr = json_encode($siarr, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);
  $Rsq = mysqli_query($conn, "update ".$_SESSION['lang']." set m3='".addslashes($_POST["m3"])."', n1='".addslashes(stripslashes($tnarr))."', n5='".addslashes(stripslashes($_POST["qn5"]))."'  where id=".$_GET["id"]."");
  for ($l = 1; $l <= $lx; $l++) {
    $Rsq = mysqli_query($conn, "update lang".$l." set t2='".$_POST["qt2"]."', t3='".$_POST["qt3"]."', t4='".$_POST["qt4"]."', t5='".$_POST["qt5"]."', t6='".$_POST["qt6"]."', t7='".$_POST["qt7"]."', t8='".$qt8."', t9='".addslashes(stripslashes($_POST["qt9"]))."', t10='".addslashes(stripslashes($_POST["qt10"]))."', m1='".addslashes(stripslashes($_POST["m1"]))."', m2='".addslashes($_POST["m2"])."', m4='".$_POST["m4"]."', m5='".$_POST["m5"]."', m6='".$m6."', m7='".$m7."', m8='".$m8."', n2='".addslashes(stripslashes($siarr))."', n4='".$_POST["qn4"]."', n17='".addslashes(stripslashes($rjsi))."'  where id=".$_GET["id"]."");
  }
  if($_POST["qt8"]<>""){
    $qt8s = explode(',',$qt8);
    foreach($qt8s as $id) {
      for ($l = 1; $l <= $lx; $l++) {
        $Rsq = mysqli_query($conn, "update lang".$l." set s16='".$_GET["id"]."'  where id=".$id."");
      }
    }
  }
  echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&id=".$_GET["id"]."&durum=ok#&tab-icerik",self,500,1);
}elseif($_GET["durum"] == "sjson"){
  unset($jsa[$_GET["jsid"]]);
  $aform = json_encode($jsa, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);
  $sql2 = mysqli_query($conn, "update ".$_SESSION["lang"]." set n3='".addslashes(stripslashes($aform))."' where id=".$_GET["id"]."");
  echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&id=".$_GET["id"]."&durum=ok#&tab-survey",self,500,1);
}elseif($_GET["durum"] == "clear"){
  $Rsq = mysqli_query($conn, "update ".$_SESSION['lang']." set n3='' where id=".$_GET["id"]."");
  echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&id=".$_GET["id"]."&durum=ok#&tab-icerik",self,500,1);
}elseif($_GET["durum"] == "klonla"){
	for ($l = 1; $l <= $lx; $l++) {
		$Sql = $conn->query("insert into lang".$l." (t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16,s17,s18,s19,s20,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n16,n17,m1,m2,m3,m4,m5,pb1,pb2,pb3,pb4,pb5,ne,ts1) values ('".$rs["t1"]."', '".$rs["t2"]."', '".$rs["t3"]."', '".$rs["t4"]."', '".$rs["t5"]."', '".$rs["t6"]."', '".$rs["t7"]."', '".$rs["t8"]."', '".$rs["t9"]."', '".$rs["t10"]."', '".$rs["s1"]."', '".$rs["s2"]."', '".$rs["s3"]."', '".$rs["s4"]."', '".$rs["s5"]."', '".$rs["s6"]."', '".$rs["s7"]."', '".$rs["s8"]."', '".$rs["s9"]."', '".$rs["s10"]."', '".$rs["s11"]."', '".$rs["s12"]."', '".$rs["s13"]."', '".$rs["s14"]."', '".$rs["s15"]."', '".$rs["s16"]."', '".$rs["s17"]."', '".$rs["s18"]."', '".$rs["s19"]."', '".$rs["s20"]."', '".$rs["n1"]."', '".$rs["n2"]."', '".$rs["n3"]."', '".$rs["n4"]."', '".$rs["n5"]."', '".$rs["n6"]."', '".$rs["n7"]."', '".$rs["n8"]."', '".$rs["n9"]."', '".$rs["n10"]."', '".$rs["n16"]."', '".$rs["n17"]."', '".$rs["m1"]."', '".$rs["m2"]."', '".$rs["m3"]."', '".$rs["m4"]."', '".$rs["m5"]."', '".$rs["pb1"]."', '".$rs["pb2"]."', '".$rs["pb3"]."', '".$rs["pb4"]."', '".$rs["pb5"]."', '".$rs["ne"]."', now())");
	}
	$sql=mysqli_query($conn, "select * from ".$_SESSION['lang']." where ne='".$_GET["ne"]."' order by id desc"); $rs=mysqli_fetch_assoc($sql);
	echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&id=".$rs["id"]."&durum=c_ok",self,500,1);
}
?>