<?php
	header('Content-Type: text/html; charset=utf-8');
	error_reporting(0);
	$path="../../";
	include("../../map.php");
	include("../../secure.php");
	include("../../scripts.php");
?>
<!DOCTYPE html>
<html lang="tr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo $sdil[31]; //Şifreler?></title>
</head>
<body>
	<div id="result" style="display:none;"></div>
            <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 active" aria-current="page"><?php echo $sdil[31]; //Şifreler?></li>
						</ol>
					</nav>
				</div>
				<input type="text" id="tableFilter" class="filter-input" placeholder="Tabloda ara...">
                <button type="button" class="btn btn-warning" onclick="location.href='?'"><i class="fas fa-home"></i></button>
                <button type="button" class="btn btn-danger msa" onclick="location.href='?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&durum=syncJson'" title="Subdomainleri Güncelle"><i class="fas fa-refresh"></i></button>
                <button type="button" class="btn btn-info mfrm msa" data-toggle="modal" data-width="50%" data-target="#myModal" data-url="../../fonksiyon.php?islem=guide&keys=<?php echo $_SESSION["user"]?>/<?php echo $_GET["ne"]?>/<?php echo $_GET["islem"]?>/<?php echo $_GET["id"]?>"><i class="fas fa-info"></i></button>
            </div>
    <div class="" style="padding:0px 15px;">
        <div class="row">
            <!-- İçerik alanı -->
            <div class="col-12">
                <div class="tab-content" id="pills-tabContent">
                    <div class="tab-pane show active" id="pills-content-1" role="tabpanel" aria-labelledby="pills-tab-1">
							<table class="table filterable" style="min-width:1000px;">
								<form method="POST" action="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&durum=ekle" autocomplete="off" id="tform" name="tform">
									<tr class="addtr">
										<td class="w13 mw13"><input type="text" name="n1" id="n1" title="Tanım-1 [n1]" class="form-control b1o"></td>
										<td class="w13 mw13"><input type="text" name="n2" id="n2" title="Tanım-2 [n2]" class="form-control b1o"></td>
										<td class="w13 mw13"><input type="text" name="n3" id="n3" list="dln3" title="Tanım-3 [n3]" class="form-control b1o"><datalist id="dln3"></datalist></td>
										<td class="w13 mw13"><input type="text" name="n6" id="n6" list="dln6" title="Tanım-6 [n6]" class="form-control b1o"><datalist id="dln6"></datalist></td>
										<td class="w13 mw13"><input type="text" name="n4" id="n4" list="dln4" title="Tanım-4 [n4]" class="form-control b1o"><datalist id="dln4"></datalist></td>
										<td class="w13 mw13"><input type="text" name="n5" id="n5" title="Tanım-5 [n5]" class="form-control b1o"></td>
										<td class="w10 mw10">
											<input type="text" list="lt2" id="t2" name="t2" title="Nedir? [t2]" placeholder="<?php echo ctranslate("Tanım Seçiniz")?>" class="form-control b1o down">
											<datalist id="lt2">
												<option value="">Tanım Seçiniz</option>
												<option value="email">Mail</option>
												<option value="mailing">Mailing</option>
												<?php if($m6==1 or $MSA==1){?>
													<option value="sms">Sms</option>
												<?php }?>
												<?php if($MA==1){?>
													<option value="domain">Domain</option>
												<?php }?>
												<?php if($MSA==1){?>
													<option value="cpanel">Cpanel</option>
												<?php }?>
												<?php if($MSA==1){?>
													<option value="pay">Pay</option>
													<option value="extre">Ekstre</option>
													<option value="sp">Sanal Pazar</option>
													<option value="xml">Xml</option>
												<?php }?>
												<?php if($MSA==1){?>
													<option value="efatura">E-Fatura</option>
													<option value="pdf">Pdf (Export)</option>
													<option value="crmc">Crm Change</option>
												<?php }?>
												<?php if($module["crm"]<>1){?>
													<option value="mkey">Maps</option>
													<option value="youtube">Youtube Api</option>
													<option value="dogrula">Doğrulama</option>
													<option value="analytics">Analytics</option>
													<option value="gtm">Google Tag Manager</option>
													<option value="glogin">Google Login</option>
													<option value="flogin">Facebook Login</option>
													<option value="metrica">Metrica</option>
													<option value="dadwords">Adwords Dönüş</option>
													<option value="fdadwords">Adwords Dönüş Form</option>
												<?php }?>
												<?php if($f1==1){?>
													<option value="pfacebook">Facebook Paylaş</option>
													<option value="ptwitter">Twitter Paylaş</option>
												<?php }?>
													<option value="finstagram">Instagram Feed</option>
											</datalist>
										</td>
										<td class="w5 mw5"><input style="" type="text" name="s10" title="No" value="0" class="form-control b1o"></td>
										<td class="w8 mw8">
											<div class="input-group-btn">
												<button tabindex="-1" class="btn btn-warning" type="submit" <?php if ($authority==0){?>disabled<?php }?>><i class="fa fa-plus"></i></button>
											</div>
										</td>
										<tr>
										</form>
										<script type='text/javascript'>
											jQuery(document).ready(function(){
												jQuery('.ibtn').attr('disabled',true);
											});
											jQuery("#t2").change(function(){
												jQuery('.ibtn').attr('disabled', false);
												var t2 = jQuery('#t2').val();
												if (t2 == "domain") {
													document.getElementById("n1").value = "<?php echo $_SERVER['SERVER_NAME']?>";
												}else{
													document.getElementById("n1").value = "";
												}
												if (t2 == "email" || t2 == "mailbox") {
													document.getElementById("n1").placeholder = "Mail Adresi *";
													document.getElementById("n2").placeholder = "Mail Şifre *";
													document.getElementById("n3").placeholder = "Mail Sunucu *";
													document.getElementById("n4").placeholder = "Domain";
													document.getElementById("n5").placeholder = "all,order,form,noreply,payment,seo";
													document.getElementById("n6").placeholder = "port {465,587}";
													jQuery("#info").html('<?php echo ctranslate("Mail Tanımlarınızı ilgili kutulara giriniz")?>');
													jQuery('#dln3').html('<option value="<?php echo "mail." . preg_replace("/^(https?:\/\/|\/\/|www\.)/", '', $weburl);?>">Yerel Sunucu</option><option value="smtp.yandex.com.tr">Yandex</option><option value="smtp.google.com">Google</option>');
												}else if(t2 == "efatura") {
													document.getElementById("n1").placeholder = "Kullanıcı *";
													document.getElementById("n2").placeholder = "Şifre *";
													document.getElementById("n3").placeholder = "";
													document.getElementById("n4").placeholder = "";
													document.getElementById("n5").placeholder = "Servis Sağlayıcı *";
													document.getElementById("n6").placeholder = "";
													jQuery("#info").html('<?php echo ctranslate("Diğer Bilgiler için Detay Alanını Kullanınız")?>');
												}else if(t2 == "xml") {
													document.getElementById("n1").placeholder = "Kullanıcı *";
													document.getElementById("n2").placeholder = "Şifre *";
													document.getElementById("n3").placeholder = "MerchantId/Api Key";
													document.getElementById("n4").placeholder = "";
													document.getElementById("n5").placeholder = "Servis Sağlayıcı *";
													document.getElementById("n6").placeholder = "Secret Key";
													jQuery("#info").html('<?php echo ctranslate("Diğer Bilgiler için Detay Alanını Kullanınız")?>');
												}else if(t2 == "sms") {
													document.getElementById("n1").placeholder = "";
													document.getElementById("n2").placeholder = "";
													document.getElementById("n3").placeholder = "";
													document.getElementById("n4").placeholder = "Domain";
													document.getElementById("n5").placeholder = "";
													document.getElementById("n6").placeholder = "Servis Sağlayıcı *";
													jQuery("#info").html('<?php echo ctranslate("Sms Tanımlarınızı ilgili kutulara giriniz, Asist için extra UserCode,AccountId, smsvitrini için Api key girilmelidir.")?>');
													jQuery('#dln6').html('<option value="smsvitrini">Sms Vitrini</option><option value="netgsm">NetGsm</option><option value="iletimerkezi">İleti Merkezi</option>');
												}else if(t2 == "mailing") {
													document.getElementById("n1").placeholder = "Api Key *";
													document.getElementById("n2").placeholder = "Api Şifre *";
													document.getElementById("n3").placeholder = "Orginatör/Kullanıcı";
													document.getElementById("n4").placeholder = "Domain";
													document.getElementById("n5").placeholder = "UserCode,AccountId";
													document.getElementById("n6").placeholder = "Servis Sağlayıcı *";
													jQuery("#info").html('<?php echo ctranslate("Mailing tanımlarınızı ilgili kutulara giriniz,")?>');
												}else if(t2 == "crmc") {
													document.getElementById("n1").placeholder = "Domain";
													document.getElementById("n2").placeholder = "Sunucu";
													document.getElementById("n3").placeholder = "Mysql Name";
													document.getElementById("n4").placeholder = "Mysql User";
													document.getElementById("n5").placeholder = "Mysql Pass";
													document.getElementById("n6").placeholder = "";
												}else if(t2 == "sp") {
													document.getElementById("n1").placeholder = "User";
													document.getElementById("n2").placeholder = "Pass";
													document.getElementById("n3").placeholder = "MerchantID";
													document.getElementById("n6").placeholder = "Secret Key";
													document.getElementById("n4").placeholder = "SanalPazar";
													document.getElementById("n5").placeholder = "";
													jQuery("#info").html('<?php echo ctranslate("Diğer Bilgiler için Detay Alanını Kullanınız")?>');
												}else if(t2 == "cpanel") {
													document.getElementById("n1").placeholder = "UserName *";
													document.getElementById("n2").placeholder = "Pass *";
													document.getElementById("n3").placeholder = "Port *";
													document.getElementById("n4").placeholder = "";
												}else if(t2 == "domain") {
													document.getElementById("n1").placeholder = "Domain *";
													document.getElementById("n2").placeholder = "<?php if($s8==1){echo "langx";}?>";
													document.getElementById("n3").placeholder = "<?php if($s8==1){echo "İlçe/şehir";}?>";
													document.getElementById("n4").placeholder = "<?php if($s8==1){echo "şehir";}?>";
													document.getElementById("n5").placeholder = "<?php if($s8==1){echo "tr/en";}?>";
													document.getElementById("n6").placeholder = "UserID";
												}else if(t2 == "pay") {
													document.getElementById("n1").placeholder = "";
													document.getElementById("n2").placeholder = "";
													document.getElementById("n3").placeholder = "";
													document.getElementById("n4").placeholder = "Firma *";
													jQuery('#dln4').html('<option value="paytr">PayTr</option><option value="iyzipay">İyzico</option><option value="paratika">Paratika</option><option value="Hepsipay">HepsiPay</option><option value="ozanpos">OzanPos</option>');
												}else if(t2 == "extre") {
													document.getElementById("n1").placeholder = "User *";
													document.getElementById("n2").placeholder = "Pass *";
													document.getElementById("n3").placeholder = "";
													document.getElementById("n4").placeholder = "";
													jQuery("#info").html('<?php echo ctranslate("Diğer Bilgiler ve Banka Seçimi için Detay Alanını Kullanınız")?>');
												}else if(t2 == "mkey") {
													document.getElementById("n1").placeholder = "Google Map Key *";
													document.getElementById("n2").placeholder = "";
													document.getElementById("n3").placeholder = "";
													document.getElementById("n4").placeholder = "";
													jQuery("#info").html('<?php echo ctranslate("Google Map Key Bilgisini Giriniz.")?>');
												}else if(t2 == "youtube") {
													document.getElementById("n1").placeholder = "Youtube Api Key *";
													document.getElementById("n2").placeholder = "Youtube Channel ID";
													document.getElementById("n3").placeholder = "";
													document.getElementById("n4").placeholder = "";
													jQuery("#info").html('<?php echo ctranslate("Youtube Api Key ve Kanal Id si Giriniz")?>');
												}else if(t2 == "gmail") {
													document.getElementById("n1").placeholder = "Gmail Adresi *";
													document.getElementById("n2").placeholder = "Gmail Şifre *";
													document.getElementById("n3").placeholder = "";
													document.getElementById("n4").placeholder = "";
												}else if(t2 == "analytics") {
													document.getElementById("n4").value = "<?php echo $_SERVER['SERVER_NAME']?>";
													document.getElementById("n1").placeholder = "Gmail Adresi";
													document.getElementById("n2").placeholder = "P12 Key";
													document.getElementById("n3").placeholder = "İzleme Kimliği *";
													document.getElementById("n4").placeholder = "Web Url";
													jQuery("#info").html('<?php echo ctranslate('Sadece UA- ile başlayan İzleme Kimliğini ilgili Alana Giriniz')?>');
												}else if(t2 == "gtm") {
													document.getElementById("n4").value = "<?php echo $_SERVER['SERVER_NAME']?>";
													document.getElementById("n1").placeholder = "Kapsayıcı Kimliği*";
													document.getElementById("n2").placeholder = "";
													document.getElementById("n3").placeholder = "";
													document.getElementById("n4").placeholder = "Web Url";
												}else if(t2 == "fdadwords") {
													document.getElementById("n4").value = "<?php echo $_SERVER['SERVER_NAME']?>";
													document.getElementById("n1").placeholder = "Conversion_id";
													document.getElementById("n2").placeholder = "Conversion_label";
													document.getElementById("n3").placeholder = "";
													document.getElementById("n4").placeholder = "";
												}else if(t2 == "dadwords") {
													document.getElementById("n4").value = "<?php echo $_SERVER['SERVER_NAME']?>";
													document.getElementById("n1").placeholder = "Conversion_id";
													document.getElementById("n2").placeholder = "Conversion_label";
													document.getElementById("n3").placeholder = "";
													document.getElementById("n4").placeholder = "";
												}else if(t2 == "dogrula") {
													document.getElementById("n4").value = "<?php echo $_SERVER['SERVER_NAME']?>";
													document.getElementById("n1").placeholder = "Google";
													document.getElementById("n2").placeholder = "Yandex";
													document.getElementById("n3").placeholder = "";
													document.getElementById("n4").placeholder = "Web Url";
													jQuery("#info").html('<?php echo ctranslate('Google veya Yandex Sadece Doğrulama Kodunu Giriniz')?>');
												}else if(t2 == "pfacebook") {
													document.getElementById("n1").placeholder = "AppId";
													document.getElementById("n2").placeholder = "Secret";
													document.getElementById("n3").placeholder = "Access Token";
													document.getElementById("n4").placeholder = "Sayfaid";
												}else if(t2 == "ptwitter") {
													document.getElementById("n1").placeholder = "API Key";
													document.getElementById("n2").placeholder = "API Secret";
													document.getElementById("n3").placeholder = "Access Token";
													document.getElementById("n4").placeholder = "Access Token Secret";
												}else if(t2 == "flogin") {
													document.getElementById("n1").placeholder = "SppId";
													document.getElementById("n2").placeholder = "Secret";
													document.getElementById("n3").placeholder = "Url";
													document.getElementById("n4").placeholder = "";
												}else if(t2 == "glogin") {
													document.getElementById("n1").placeholder = "CLIENT_ID";
													document.getElementById("n2").placeholder = "CLIENT_SECRET";
													document.getElementById("n3").placeholder = "";
													document.getElementById("n4").placeholder = "";
												}else if(t2 == "finstagram") {
													document.getElementById("n1").placeholder = "Token";
													document.getElementById("n2").placeholder = "";
													document.getElementById("n3").placeholder = "";
													document.getElementById("n4").placeholder = "";
												}else if(t2 == "pdf") {
													document.getElementById("n1").placeholder = "KEY";
													document.getElementById("n2").placeholder = "Mail Adresi";
													document.getElementById("n3").placeholder = "Şifre";
													document.getElementById("n4").placeholder = "";
													jQuery("#info").html('<?php echo ctranslate('Pdf export için <a href="https://phptopdf.com" target="blank">https://phptopdf.com</a>')?>');
												}
											});
										jQuery("#n4").change(function(){
												var n4 = jQuery('#n4').val();
												if (n4 == "iyzipay") {
													document.getElementById("n1").placeholder = "API Key";
													document.getElementById("n2").placeholder = "Secret Key";
													document.getElementById("n3").placeholder = "";
												}else if(n4 == "paytr") {
													document.getElementById("n1").placeholder = "Merchant ID";
													document.getElementById("n2").placeholder = "Merchant Key";
													document.getElementById("n3").placeholder = "Merchant Salt";
													document.getElementById("n6").placeholder = "test mode 1";
												}else if(n4 == "paratika") {
													document.getElementById("n1").placeholder = "MERCHANTUSER";
													document.getElementById("n2").placeholder = "MERCHANTPASSWORD";
													document.getElementById("n3").placeholder = "MERCHANT";
												}else if(n4 == "hepsipay") {
													document.getElementById("n1").placeholder = "API Key";
													document.getElementById("n2").placeholder = "Secret Key";
													document.getElementById("n3").placeholder = "Merchant ID";
												}else if(n4 == "ozanpos") {
													document.getElementById("n1").placeholder = "API Key";
													document.getElementById("n2").placeholder = "API Pass";
													document.getElementById("n3").placeholder = '';
												}
											});
											jQuery("#n3").change(function(){
												var n3 = jQuery('#n3').val();
												if(n3 == "<?php echo "mail." . preg_replace("/^(https?:\/\/|\/\/|www\.)/", '', $weburl);?>") {
													document.getElementById("n6").placeholder = '';
												}else if(n3 == "smtp.yandex.com.tr") {
													document.getElementById("n6").placeholder = '465';
												}else if(n3 == "smtp.google.com") {
													document.getElementById("n6").placeholder = '465';
												}
											});
											jQuery("#n6").change(function(){
												var n6 = jQuery('#n6').val();
												if(n6 == "smsvitrini") {
													document.getElementById("n1").placeholder = 'Kullanıcı Adı';
													document.getElementById("n2").placeholder = 'Şifre';
													document.getElementById("n3").placeholder = 'Orginatör';
												}else if(n6 == "netgsm") {
													document.getElementById("n1").placeholder = 'Kullanıcı Adı';
													document.getElementById("n2").placeholder = 'Şifre';
													document.getElementById("n3").placeholder = 'Orginatör';
												}else if(n6 == "iletimerkezi") {
													document.getElementById("n1").placeholder = 'Kullanıcı Adı';
													document.getElementById("n2").placeholder = 'Şifre';
													document.getElementById("n3").placeholder = 'Orginatör';
													document.getElementById("n5").placeholder = 'UserCode,AccountId';
												}
											});
										</script>
										<?php $sql=mysqli_query($conn, "select * from genel where ne='tanim' order by t2,n4 asc"); while($rs=mysqli_fetch_assoc($sql)){?>
											<form method="POST" action="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&durum=duzenle&id=<?php echo $rs["id"];?>" autocomplete="off" id="xf<?php echo $rs["id"];?>" name="xf<?php echo $rs["id"];?>">
												<tr class="btr" data-id="<?php echo $rs["id"];?>" style="<?php if(($MA<>1 and $rs["t2"]=="domain") or ($MSA<>1 and $rs["t2"]=="cpanel") or  ($MSA<>1 and $rs["t2"]=="sms")){echo "display:none;";}?>">
													<td>
														<span class="dn"><?php echo $rs["t2"];?>,<?php echo base64_decode($rs["n1"]);?></span>
														<input type="text" id="n1_<?php echo $rs["id"];?>" name="n1" class="form-control" value="<?php echo base64_decode($rs["n1"]);?>">
													</td>
													<td><input type="<?php if($MSA=="" and ($rs["t2"]=="sms" or $rs["t2"]=="email" or $rs["t2"]=="mailbox" or $rs["t2"]=="pay")){echo "password";}else{echo "text";}?>" id="n2_<?php echo $rs["id"];?>" name="n2" class="form-control" value="<?php echo base64_decode($rs["n2"]);?>"></td>
													<td><input type="text" id="n3_<?php echo $rs["id"];?>" name="n3" class="form-control" value="<?php echo $rs["n3"];?>"></td>
													<td><input type="text" id="n6_<?php echo $rs["id"];?>" name="n6" class="form-control" value="<?php echo $rs["n6"];?>" placeholder=""></td>
													<td><input type="text" id="n4_<?php echo $rs["id"];?>" name="n4" class="form-control" value="<?php echo $rs["n4"];?>" placeholder=""></td>
													<td><input type="text" id="n5_<?php echo $rs["id"];?>" name="n5" class="form-control" value="<?php echo $rs["n5"];?>" placeholder="<?php if($_SESSION["user"]==V3d('TWFzdGVy') and $rs["t2"]=="email"){?>Test Adres<?php }?>"></td>
													<td style="position: relative;">
														<?php if($rs["t2"]=="pay" or $rs["t2"]=="email"){?>
															<div class="switch switch-sm switch-success" style="position: absolute; right: 0px;" title="<?php if($rs["t2"]=="pay"){echo "Aktif/Pasif";}else{echo "Mail Box";}?>">
																<input type="checkbox" name="s13" value=1 data-plugin-ios-switch="" <?php if($rs["s13"]==1) {?>checked<?php }?>>
															</div>
														<?php }?>
														<input type="text" id="t2_<?php echo $rs["id"];?>" name="t2" class="form-control" value="<?php echo $rs["t2"];?>" readonly>
													</td>
													<td><input type="text" name="s10" title="No" value="<?php echo $rs["s10"];?>" class="form-control"></td>
													<td>
														<div class="input-group-btn">
															<button tabindex="-1" class="btn btn-warning" type="button" id="b<?php echo $rs["id"];?>" onclick="Ajaxs('<?php echo $rs["id"];?>','#result','AjaxPost');" <?php if ($authority==0){?>disabled<?php }?>><i class="fa fa-refresh"></i></button>
															<button type="button" style="margin-left: 1px" tabindex="-1" class="btn btn-danger mbtn  btn-delete-row" data-href="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&durum=sil&id=<?php echo $rs["id"];?>"><i class="fa fa-times"></i></button>
															<?php if($rs["t2"]=="email" or $rs["t2"]=="sms"){?>
																<button type="button" style="margin-left: 1px" tabindex="-1" class="btn btn-info mfrm" data-toggle="modal" data-target="#myModal" data-url="../../fonksiyon.php?islem=test&type=<?php echo $rs["t2"];?>&gonderen=<?php echo v3d($rs["n1"]);?>" data-title="Mail Test"><i class="fa fa-info"></i></button>
															<?php }elseif($rs["t2"]=="sp" or $rs["t2"]=="pay" or $rs["t2"]=="extre" or $rs["t2"]=="efatura" or $rs["t2"]=="xml"){?>
																<button type="button" style="margin-left: 1px" tabindex="-1" class="btn btn-info mfrm" data-toggle="modal" data-target="#myModal" data-url="integration.php?id=<?php echo $rs["id"];?>" data-title="Entegrasyon {<?php echo ihb($rs["n4"]);?>}"><i class="fas fa-edit"></i></button>
															<?php }?>
														</div>
													</td>
												</tr>
											</form>
											<script type='text/javascript'>
												jQuery(document).ready(function() {
													var t2_<?php echo $rs["id"];?> = $('#t2_<?php echo $rs["id"];?>').val();
													if (t2_<?php echo $rs["id"];?> == "email" || t2_<?php echo $rs["id"];?> == "mailbox") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "Mail Adresi *";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "Mail Şifre *";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "Mail Sunucu *";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "Domain";
														document.getElementById("n5_<?php echo $rs["id"];?>").placeholder = "test,all,order,form";
														document.getElementById("n6_<?php echo $rs["id"];?>").placeholder = "port {465,587}";
													}else if(t2_<?php echo $rs["id"];?> == "sms") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "Sms Numara *";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "Sms Şifre *";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "Sms Orginatör *";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "Domain";
														document.getElementById("n6_<?php echo $rs["id"];?>").placeholder = "Servis Sağlayıcı *";
													}else if(t2_<?php echo $rs["id"];?> == "efatura") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "Kullanıcı *";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "Şifre *";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "";
														document.getElementById("n6_<?php echo $rs["id"];?>").placeholder = "Servis Sağlayıcı *";
													}else if(t2_<?php echo $rs["id"];?> == "crmc") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "Domain";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "Sunucu";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "Mysql Name";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "Mysql User";
														document.getElementById("n5_<?php echo $rs["id"];?>").placeholder = "Mysql Pass";
														document.getElementById("n6_<?php echo $rs["id"];?>").placeholder = "";
													}else if(t2_<?php echo $rs["id"];?> == "sp") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "User";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "Pass";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "Api/MerchantID";
														document.getElementById("n6_<?php echo $rs["id"];?>").placeholder = "Secret";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "SanalPazar";
														document.getElementById("n5_<?php echo $rs["id"];?>").placeholder = "";
													}else if(t2_<?php echo $rs["id"];?> == "cpanel") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "UserName *";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "Pass *";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "Port*";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "";
													}else if(t2_<?php echo $rs["id"];?> == "domain") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "Domain *";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "<?php if($s8==1){echo "langx";}?>";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "<?php if($s8==1){echo "İlçe/şehir";}?>";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "<?php if($s8==1){echo "şehir";}?>";
														document.getElementById("n5_<?php echo $rs["id"];?>").placeholder = "<?php if($s8==1){echo "tr/en";}?>";
														document.getElementById("n6_<?php echo $rs["id"];?>").placeholder = "UserID";
													}else if(t2_<?php echo $rs["id"];?> == "pay" || t2_<?php echo $rs["id"];?> == "extre") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "User *";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "Pass *";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "Merchant ID *";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "Firma *";
													}else if(t2_<?php echo $rs["id"];?> == "mkey") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "Google Map Key *";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "";
													}else if(t2_<?php echo $rs["id"];?> == "youtube") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "Youtube Api Key *";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "Youtube Channel ID";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "";
													}else if(t2_<?php echo $rs["id"];?> == "gmail") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "Gmail Adresi *";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "Gmail Şifre *";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "";
													}else if(t2_<?php echo $rs["id"];?> == "analytics") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "Gmail Adresi";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "P12 Key";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "İzleme Kimliği *";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "Web Url";
													}else if(t2_<?php echo $rs["id"];?> == "fdadwords") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "Conversion_id";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "Conversion_label";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "";
													}else if(t2_<?php echo $rs["id"];?> == "dadwords") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "Conversion_id";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "Conversion_label";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "";
													}else if(t2_<?php echo $rs["id"];?> == "dogrula") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "Google";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "Yandex";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "Web Url";
													}else if(t2_<?php echo $rs["id"];?> == "pfacebook") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "AppId";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "Secret";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "Access Token";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "Sayfaid";
													}else if(t2_<?php echo $rs["id"];?> == "ptwitter") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "API Key";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "API Secret";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "Access Token";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "Access Token Secret";
													}else if(t2_<?php echo $rs["id"];?> == "flogin") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "SppId";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "Secret";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "Url";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "";
													}else if(t2_<?php echo $rs["id"];?> == "glogin") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "CLIENT_ID";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "CLIENT_SECRET";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "";
													}else if(t2_<?php echo $rs["id"];?> == "gtwitter") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "CONSUMER_KEY";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "CONSUMER_SECRET";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "Url";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "";
													}else if(t2_<?php echo $rs["id"];?> == "pdf") {
														document.getElementById("n1_<?php echo $rs["id"];?>").placeholder = "KEY";
														document.getElementById("n2_<?php echo $rs["id"];?>").placeholder = "Mail Adres";
														document.getElementById("n3_<?php echo $rs["id"];?>").placeholder = "Şifre";
														document.getElementById("n4_<?php echo $rs["id"];?>").placeholder = "";
													}
												});
											</script>
										<?php }?>
									</table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<?php echo $footer?>
</body>
</html>
<?php
if($_GET["durum"]=="ekle"){
	$sql = $conn->query("insert into genel(t2,ne,n1,n2,n3,n4,n5,n6,s10) VALUES ('".$_POST["t2"]."', 'tanim', '".v3e($_POST["n1"])."', '".v3e($_POST["n2"])."', '".$_POST["n3"]."', '".$_POST["n4"]."', '".$_POST["n5"]."', '".$_POST["n6"]."', '".$_POST["s10"]."')");
	echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&durum=ok",self,500,1);

}elseif($_GET["durum"]=="duzenle"){
	if($_POST["s13"]==""){ $s13=0; }else{$s13=$_POST["s13"];}
	$sqlt=mysqli_query($conn, "select * from genel where ne='tanim' and id='".$_GET["id"]."'"); $rst=mysqli_fetch_assoc($sqlt);
	$Rs = mysqli_query($conn, "update genel set n1='".v3e($_POST["n1"])."', n2='".v3e($_POST["n2"])."', n3='".$_POST["n3"]."', n4='".$_POST["n4"]."', n5='".$_POST["n5"]."', n6='".$_POST["n6"]."', s10='".$_POST["s10"]."', s13='".$s13."' Where id=".$_GET["id"]."");
	echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&durum=ok",self,500,1);

}elseif($_GET["durum"]=="sil"){
	$Rs = mysqli_query($conn, "delete from genel where id=".$_GET["id"]);
	echo location("?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&durum=ok",self,500,1);	

}elseif($_GET["durum"]=="syncJson"){
	$jsonFile = $path."../deppo/subdomains.json";
	$sql = mysqli_query($conn, "SELECT n1,n2,n3,n4,n5 FROM genel WHERE ne='tanim' AND t2='domain' ORDER BY t2,n4 ASC");
	$data = [];
	while ($rs = mysqli_fetch_assoc($sql)) {
		$data[] = [ "domain" => v3d($rs["n1"]), "table" => v3d($rs["n2"]), "sub_location" => $rs["n3"], "location" => $rs["n4"], "lang" => $rs["n5"] ];
	}
	$jsonData = json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
	file_put_contents($jsonFile, $jsonData);
	echo "JSON dosyası güncellendi: " . $jsonFile;
}
include("../public/log.php");
?>