<?php 
error_reporting(0);
if($_GET["islem"]<>"resize"){
	if($_GET["islem"]<>"yorum" and $_GET["islem"]<>"addpost" and $_GET["islem"]<>"delpost" and $_GET["islem"]<>"delcomment" ){
		header('Content-Type: text/html; charset=utf-8');
		echo "<script src=\"//code.jquery.com/jquery-latest.js\" type=\"text/javascript\"></script>";
		echo '<style> .v3statusac {display:none;} </style>';
	}
	include("../deppo/tools/script/cevir.php");
	include("map.php");
	include("../deppo/tools/script/fonksiyon".$ver.".php");
	if($_GET["islem"]<>"yorum" and $_GET["islem"]<>"addpost" and $_GET["islem"]<>"delpost" and $_GET["islem"]<>"delcomment"){
		include("../deppo/tools/inc.php");
	}
	include("../deppo/tools/script/SimpleImage.php");
	include("../deppo/tools/script/mail/design.php");
	$ilanbol=explode('-', $sdil["121"]);
	$teklifbol=explode('-', $sdil["130"]);
}
?>

<?php if(tanim("gtm","n1",0)<>""){?>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','<?php echo tanim("gtm","n1",0); ?>');</script>
<?php }?>

<?php
if($_GET["islem"]=="resize"){
	include("../deppo/tools/script/resize.php");
	$resizeObj = new resize('sample.jpg');
	$resizeObj -> resizeImage(150, 150, 'crop');
	$resizeObj -> saveImage('sample-resized.jpg', 100);
}elseif($_GET["ad"]<>""){
	$sqlr=mysqli_query($conn, "select * from genel where ne='reklam' and id='".$_GET["ad"]."'"); $rsr=mysqli_fetch_assoc($sqlr);
	function trackClick($id) {
		$file = '../deppo/ads_report.json';
		$currentDate = date('d.m.Y');
		$userIp = $_SERVER['REMOTE_ADDR'];
		$data = [];
		if (file_exists($file)) {
			$jsonContent = file_get_contents($file);
			$decoded = json_decode($jsonContent, true);
			if (json_last_error() === JSON_ERROR_NONE && is_array($decoded)) {
				$data = $decoded;
			} else {
				// Geçersiz JSON varsa yazma, logla
				error_log("Geçersiz JSON: $file");
				return; // işlem yapma
			}
		}
		if (!isset($data[$id])) { $data[$id] = []; }
		if (!isset($data[$id][$currentDate])) {
			$data[$id][$currentDate] = [ 'total' => 0, 'unique' => 0, 'ips' => [] ];
		}
		$data[$id][$currentDate]['total']++;
		if (!in_array($userIp, $data[$id][$currentDate]['ips'])) {
			$data[$id][$currentDate]['unique']++;
			$data[$id][$currentDate]['ips'][] = $userIp;
		}
		copy($file, $file . '.bak');
		file_put_contents($file, json_encode($data, JSON_PRETTY_PRINT));
	}
	$adId = intval($_GET['ad']); // Güvenlik için ID'yi integer yapıyoruz
	trackClick($adId);
	echo "<script language=\"JavaScript\">var delay = 2; var targetURL = \"".$rsr["n2"]."\"; setTimeout('top.location.replace(targetURL)', (delay * 0));</script>";
}

if($_GET["islem"]=="xmlapi"){
	include("../deppo/tools/script/cpanel.php");
	//echo tanim("cpanel","n1",0);
	test(tanim("cpanel","n1",0), tanim("cpanel","n2",0));

}elseif($_GET["islem"]=="rota"){
?>
	<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDpvRfK3Seu8NFks4l-tmhEd-V8_Hn6KfQ&callback=initialize" async defer></script>
    <script type="text/javascript">
        var map;
        var directionsService;
        var directionsRenderer;
        function initialize() {
            // Harita nesnesini oluştur
            map = new google.maps.Map(document.getElementById("map_canvas"), { center: {lat: 37.7749, lng: -122.4194}, zoom: 13, mapTypeId: google.maps.MapTypeId.ROADMAP });
            // Yönlendirme servislerini başlat
            directionsService = new google.maps.DirectionsService();
            directionsRenderer = new google.maps.DirectionsRenderer();
            directionsRenderer.setMap(map);
            // Kullanıcıdan gelen 'x' ve 'y' parametrelerini al
            var origin = "<?php echo htmlspecialchars($_GET['x']); ?>";
            var destination = "<?php echo htmlspecialchars($_GET['y']); ?>";
            // Yön tarifi isteğini oluştur
            var request = { origin: origin, destination: destination, travelMode: google.maps.TravelMode.DRIVING };
            // Yön tarifi isteğini başlat
            directionsService.route(request, function(result, status) {
                if (status == google.maps.DirectionsStatus.OK) { directionsRenderer.setDirections(result); } else { alert("Yönlendirme hatası: " + status); }
            });
        }
    </script>
<body onload="initialize()">
    <div id="map_canvas" style="width: 100%; height: 400px;"></div>
</body>
    <?php
//-- Anket / Sınav -->
	}elseif($_GET["islem"]=="sfgonder"){
		if (isset($_POST)) {
			// Veritabanından mevcut kayıtları al
			$sqlf = mysqli_query($conn, "SELECT * FROM ".$_SESSION['lang']." WHERE id=".$_POST["sID"]); $rsf = mysqli_fetch_assoc($sqlf); $jsa = json_decode($rsf["n3"], true);
			$jset = $jsa ? $jsa : [];
			// Yeni veriyi hazırlayıp diziye ekleyin
			$arr_new = [ translate("Id") => date('YdmHis'), translate("Tarih") => date('Y-d-m H:i:s'), translate("IP") => getRealIpAddr(), translate("PageID") => $_POST["pID"], translate("User_ID") => $_SESSION["User_ID"] ];
			// POST verilerini dizinin içine ekleyin
			foreach ($_POST as $key => $val) { $arr_new[$key] = $val; }
			// Yeni veri setini diziye ekleyin
			array_push($jset, $arr_new);
		// JSON verisini encode et ve veritabanında güncelleyin
			$aform = json_encode($jset, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);
			$sql2 = mysqli_query($conn, "UPDATE ".$_SESSION["lang"]." SET n3='".addslashes(stripslashes($aform))."' WHERE id=".$_POST["sID"]);
		} elseif ($_GET["islem"] == "unsubscribe") {
			// Abonelik iptali işlemi
			$sqlk = mysqli_query($conn, "SELECT * FROM genel WHERE ne='unsubscribe' AND t1='".base64_decode($_GET["t1"])."'");
			$rsk = mysqli_fetch_assoc($sqlk);
			// Kullanıcı daha önce abone olmamışsa, veritabanına ekle
			if (mysqli_num_rows($sqlk) == 0) {
				$sqll = $conn->query("INSERT INTO genel(ne, t1, ts1) VALUES ('unsubscribe', '".base64_decode($_GET["t1"])."', NOW())");
				// Kullanıcıya başarı mesajı göster
				echo "
				<div class=\"v3-container tac alert-success\" style=\"border-radius: 25px; margin-top:10%; padding:20px 0px;\">
					<h1><i class=\"fa fa-check\" aria-hidden=\"true\"></i> ".translate("+#Listeden Çıktınız")."</h1>
					<p>".translate("+#Bilgilendirme Listemizden Kaydınız Silinmiştir")."</p>
				</div>
				";
			}
		}
		?>

    <?php }elseif($_GET["islem"]=="npost"){?>
    <?php $ucats = json_decode(GetArr("u","categories"), true);?>
    <style>
        .whatsapp, .v3statusac, .kvkk, .call, .soldbox { display: none !important; }
    </style>
    <form method="post" action="?panel/posts/npost" class="">
        <div class="v3-col-md-8" style="margin-bottom:15px;">
            <label>İlan Başlığı</label>
            <input type="text" name="t1" class="v3-form-control">
        </div>
        <div class="v3-col-md-4" style="margin-bottom:15px;">
            <label><?php echo translate("GTIN");?></label>
            <input type="text" name="t5" class="v3-form-control" <?php if($module["mode_catalogue"]<>"1"){echo "value=\"".generatenumber("13")."\"";}?>>
        </div>
        <?php if($e5>0){?>
        <div class="v3-col-md-6">
            <label>Satış Fiyatı</label>
            <input type="text" name="pb1" class="v3-form-control" onfocus="if(this.value == '0') { this.value = ''} " onblur="if(this.value == '') { this.value='0'; }" value="0">
        </div>
        <?php }?>
        <?php if($f7>0){?>
        <div class="v3-col-md-6">
            <label>Stok</label>
            <input type="text" name="s5" class="v3-form-control" onfocus="if(this.value == '0') { this.value = ''} " onblur="if(this.value == '') { this.value='0'; }" value="0">
        </div>
        <?php }?>
        <?php if($module["mode_catalogue"]=="1"){?>
        <!--
			<div class="v3-col-md-6">
				<label>Url</label>
				<input type="text" name="n5" class="v3-form-control">
			</div>
		-->
        <?php }?>
        <div class="" style="margin-top:15px; display: inline-block; width: 100%; <?php if($module["mode_catalogue"]=="1" and $rsu["s19"]<>$_SESSION["User_ID"]){echo "display:none";}?>">
            <?php if($a4<>0){?>
            <div class="v3-col-md-3">
                <label><?php echo $sdil["124"]; //Kategori?></label>
                <select name="s9" id="cs9" class="v3-form-control">
                    <option value="0">...</option>
                    <?php
					foreach($ucats as $key=>$value){
						if(($module["ajax_categories"]<>1 and $value["ne"]=="ukategori" or ($module["ajax_categories"]==1 and $value["t1"]=="kayit" and $value["s1"]==0))){$value["id"]==$rsu["s9"] ? $selected="selected" : $selected="";
							echo "<option value=\"".$value["id"]."\" id=\"".$value["id"]."\" ".$selected.">".$value["item"]."</option>";
						}
					}
					?>
                </select>
            </div>
            <?php }?>
            <?php if($a4>1){?>
            <div class="v3-col-md-3">
                <label><?php echo $sdil["133"]; //Kategori?></label>
                <select name="s10" id="cs10" class="v3-form-control">
                    <option value="0">...</option>
                    <?php
						foreach($ucats as $key=>$value){
							if(($module["ajax_categories"]<>1 and $value["ne"]=="ualt_kategori" or ($module["ajax_categories"]==1 and $value["t1"]=="kayit" and $value["s1"]==$rsu["s9"] and $value["s2"]==0))){$value["id"]==$rsu["s10"] ? $selected="selected" : $selected="";
								echo "<option value=\"".$value["id"]."\" id=\"".$value["id"]."\" ".$selected.">".$value["item"]."</option>";
							}
						}
						?>
                </select>
            </div>
           <script type="text/javascript"> jQuery('#cs9').on('change', function() { var ID = jQuery('#cs9 option:selected').attr('ID'); jQuery('#cs10').load('<?php echo $path.$cpath;?>deppo/tools/script/ajax/ajax_categorie.php?ne=kayit&islem=kategori&c=' + ID); }) </script>
            <?php }?>
            <?php if($a4>2){?>
            <div class="v3-col-md-3">
                <label><?php echo $sdil["134"]; //Kategori?></label>
                <select name="s11" id="cs11" class="v3-form-control">
                    <option value="0"><?php echo $sdil[221]; //Lütfen Seçiniz?></option>
                    <?php
					foreach($ucats as $key=>$value){
						if(($module["ajax_categories"]<>1 and $value["ne"]=="ualt_kategori2" or ($module["ajax_categories"]==1 and $value["t1"]=="kayit" and $value["s2"]==$rsu["s10"] and $value["s3"]==0))){$value["id"]==$rsu["s11"] ? $selected="selected" : $selected="";
							echo "<option value=\"".$value["id"]."\" id=\"".$value["id"]."\" ".$selected.">".$value["item"]."</option>";
						}
					}
					?>
                </select>
            </div>
            <script type="text/javascript"> jQuery('#cs10').on('change', function() { var ID = jQuery('#cs10 option:selected').attr('ID'); jQuery('#cs11').load('<?php echo $path.$cpath;?>deppo/tools/script/ajax/ajax_categorie.php?ne=kayit&islem=kategori&c=' + ID); }) </script>
            <?php }?>
        </div>
        <button type="submit" class="v3-btn v3-btn-warning" style="float:right; margin-top:15px;">Kaydet</button>
    </form>

    <?php }elseif($_GET["islem"]=="nclient"){?>
    <style> .whatsapp, .v3statusac, .kvkk, .call, .soldbox { display: none !important; } </style>
    <form method="post" action="?panel/clients/nclient" class="">
        <label><?php echo translate("Müşteri Ad Soyad");?></label>
        <input type="text" name="t1" class="v3-form-control">
        <label><?php echo translate("Gsm");?></label>
        <input type="text" name="t7" class="v3-form-control">
        <label><?php echo translate("Telefon");?></label>
        <input type="text" name="t4" class="v3-form-control">
        <label><?php echo translate("Email");?></label>
        <input type="text" name="t2" class="v3-form-control">
        <button type="submit" class="v3-btn v3-btn-warning" style="float:right; margin-top:15px;">Kaydet</button>
    </form>

    <?php }elseif($_GET["islem"]=="nrelation"){?>
    <?php
	$products = json_decode(GetArr('kayit','',"s19='".$_SESSION["User_ID"]."'"), true);
	$users = json_decode(GetArr('uye','users',"s19='".$_SESSION["User_ID"]."'"), true);
	?>
    <form action="?panel/relations/nrelation" method="post">
        <fieldset class="grey-bg col-sm-4" style="min-height: 65px !important;">
            <label><i class="fa fa-plus" aria-hidden="true"></i> <?php echo ctranslate("Başlık")?> <span style="font-size:8px; color:#ccc;">(t1)</span></label>
            <?php $ut1="".ctranslate(trim($sdil[200])." ".trim($nedir))."";?>
            <input type="text" name="t1" id="complex-fr-title" value="<?php echo $ut1;?>" data-plugin-maxlength="" maxlength="<?php echo $module["ksinir"];?>" class="form-control" onfocus="if(this.value == '<?php echo $ut1;?>') { this.value = ''} " onblur="if(this.value == '') { this.value='<?php echo $ut1;?>'; }" placeholder="<?php echo $ut1;?>">
        </fieldset>
        <fieldset class="grey-bg col-sm-4" style="min-height: 65px !important;">
            <label>
                <i class="fa fa-user" aria-hidden="true"></i> <?php echo ctranslate("Müşteri")?> <span style="font-size:8px; color:#ccc;">(s1)</span>
            </label>
            <select size=1 name="s1" id="chooseClient" class="form-control chosen-select">
                <option value="0">...</option>
                <?php
				foreach($users as $key=>$value){
					$value["id"]==$rs["s1"] ? $selected="selected" : $selected="";
					echo "<option value=\"".$value["id"]."\" id=\"".$value["id"]."\" ".$selected.">".$value["item"]."</option>";
				}
				?>
            </select>
            <div id="addClient" class="bg-warning" style="display:none; position: absolute; z-index: 99999; margin-top: -34px; width: 95% !important;">
                <div class="row">
                    <div class="col-md-12" style="padding:5px 10px;">
                        <input type="text" name="ut1" class="form-control" value="" placeholder="<?php echo ctranslate("Ad Soyad")?>" style="height:24px; padding:0px 5px;">
                    </div>
                    <div class="col-md-12" style="padding:5px 10px;">
                        <input type="text" name="ut2" class="form-control" value="" placeholder="<?php echo ctranslate("Email")?>" style="height:24px; padding:0px 5px;">
                    </div>
                    <div class="col-md-12" style="padding:5px 10px;">
                        <input type="text" name="ut4" class="form-control" value="" placeholder="<?php echo ctranslate("Gsm")?>" data-plugin-masked-input="" data-input-mask="<?php echo $module["pmask"];?>" style="height:24px; padding:0px 5px;">
                    </div>
                </div>
            </div>
        </fieldset>
        <fieldset class="grey-bg col-sm-4" style="min-height: 65px !important;">
            <label><i class="fa fa-cubes" aria-hidden="true"></i> <?php echo ctranslate("İlan")?> <span style="font-size:8px; color:#ccc;">(s2)</span></label>
            <select size=1 name="s2" style="" class="form-control chosen-select">
                <option value="0">...</option>
                <?php
				foreach($products as $key=>$value){
					$value["id"]==$rs["s2"] ? $selected="selected" : $selected="";
					echo "<option value=\"".$value["id"]."\" id=\"".$value["id"]."\" ".$selected.">".$value["item"]."</option>";
				}
				?>
            </select>
        </fieldset>
        <fieldset class="grey-bg col-sm-12" style="min-height: 65px !important;">
            <label><i class="fa fa-order" aria-hidden="true"></i> <?php echo ctranslate("Detay")?> <span style="font-size:8px; color:#ccc;">(n1)</span></label>
            <textarea class="form-control" name="n1" id="rte"></textarea>
        </fieldset>
        <!--
		<select size=1 name="s19" style="" class="form-control">
			<option value=""><?php echo ctranslate("Seçilmedi")?></option>
			<option value=""><?php echo ctranslate("Çağrı")?></option>
			<option value=""><?php echo ctranslate("E-Posta")?></option>
			<option value=""><?php echo ctranslate("Web Sitesi")?></option>
			<option value=""><?php echo ctranslate("Reklam")?></option>
			<option value=""><?php echo ctranslate("Mevcut Müşteri")?></option>
			<option value=""><?php echo ctranslate("Tavsiye")?></option>
			<option value=""><?php echo ctranslate("Gösteri / Sergi")?></option>
			<option value=""><?php echo ctranslate("Crm Formu")?></option>
			<option value=""><?php echo ctranslate("Geri Arama")?></option>
			<option value=""><?php echo ctranslate("Satış Artışı")?></option>
			<option value=""><?php echo ctranslate("Çevrimiçi Mağaza")?></option>
			<option value=""><?php echo ctranslate("Diğer")?></option>
		</select>
	-->
        <div style="clear:both;"></div>
        <div class="col-sm-12 mt5 mmt5" style="clear:both; width:100%;">
            <input type="checkbox" name="smail" class="btn btn-warning fl mfl mr5 mmr5" value="1"> <span style="margin-left:10px;" title="Müşteriye mail gönderir">Bilgilendir {Email}</span>
            <button type="submit" name="btn" class="btn btn-warning fr mfr mr5 mmr5" value="Ekle" style="padding: 3px 7px;"><?php echo ctranslate("Ekle")?></button>
            <i class="fa fa-bell-o btn btn-warning fr mfr mr5 mmr5" style="padding: 5px 10px; margin-right:10px;" onclick="toggle('#remember')"></i>
            <div class="fr mfr mr5 mmr5" style="display:none;" id="remember">
                <input type="date" name="t4" class="form-control">
            </div>
        </div>
    </form>
    <script> if (document.getElementById("rte") != undefined) { CKEDITOR.replace('rte'); }; </script>

    <?php }elseif($_GET["islem"]=="compares"){?>
    <table class="v3-table">
        <tr>
            <td>Özellikler</td>
            <td>Ürün-1</td>
            <td>Ürün-2</td>
            <td>Ürün-3</td>
        </tr>
        <tr>
            <td>Özellikler</td>
            <td>1111</td>
            <td>2222</td>
            <td>3333</td>
        </tr>
        <tr>
            <td>Özellikler</td>
            <td>1111</td>
            <td>2222</td>
            <td>3333</td>
        </tr>
    </table>

    <?php }elseif($_GET["islem"]=="question"){?>
    <?php
	$sqlq = mysqli_query($conn, "select * from t2 where ne='question' and id=".$_GET["qid"].""); $question=mysqli_fetch_assoc($sqlq);
	$sqlc = mysqli_query($conn, "select * from t5 where id=".$question["s1"]." order by id desc"); $client=mysqli_fetch_assoc($sqlc);
	$sqli = mysqli_query($conn, "select * from ".$_SESSION["lang"]." where id=".$_GET["id"]." order by id desc"); $item=mysqli_fetch_assoc($sqli);
	$sqls = mysqli_query($conn, "select * from t5 where id=".$item["s19"]." order by id desc"); $store=mysqli_fetch_assoc($sqls);
	?>
    <style> .whatsapp, .v3statusac, .kvkk, .call, .soldbox { display: none !important; } </style>
    <div class="v3-col-xs-12">
        <div class="v3-col-xs-2"><img src="<?php echo medya($item["id"],1,"resim","t1","",$weburl)?>" style="height:65px;" /></div>
        <div class="v3-col-xs-10"><b><?php echo $item["t1"]?></b><br> için sorunuzu aşağıdaki bilgileri doldurarak Mağazaya iletebilirsiniz</div>
        <form method="post" action="?islem=<?php echo $_GET["islem"]?>&id=<?php echo $_GET["id"]?>&qid=<?php echo $_GET["qid"]?>&durum=send" class="" style="margin-top: 15px; display: inline-block; width: 100%;">
            <input type="hidden" name="t1" class="v3-form-control" value="<?php echo $_SESSION["User_Name"]?>">
            <input type="hidden" name="User_ID" class="v3-form-control" value="<?php echo $_SESSION["User_ID"]?>">
            <input type="hidden" name="Store_ID" class="v3-form-control" value="<?php echo $store["id"]?>">
            <input type="hidden" name="Product_ID" class="v3-form-control" value="<?php echo $item["id"]?>">
            <input type="hidden" name="Product_Name" class="v3-form-control" value="<?php echo $item["t1"]?> - <?php echo $item["t4"]?>">
            <textarea type="text" name="Question" class="v3-form-control" placeholder="Sorunuz..." style="margin-top:15px" <?php if($_GET["qid"]<>""){echo "readonly";}?>><?php echo $question["n1"]?></textarea>
            <textarea type="text" name="Answer" class="v3-form-control" placeholder="Cevap..." style="margin-top:15px;<?php if($_GET["qid"]==""){echo "display:none;";}?>"><?php echo $question["n2"]?></textarea>
            <div class="v3-row">
                <div class="v3-col-xs-2" style="padding: 15px;">
                    <label>
                        <input type="checkbox" name="s4" value="1" <?php if($question["s4"]==1){echo "checked";}?>> Yayınla
                    </label>
                </div>
                <div class="v3-col-xs-10">
                    <button type="submit" class="v3-btn v3-btn-warning" style="float:right; margin-top:15px;">Gönder</button>
                </div>
            </div>
        </form>
    </div>

<?php 
	}elseif($_GET["islem"]=="offer"){
		$sql=mysqli_query($conn, "select * from t4 where t1='".$_GET["id"]."'"); $rs=mysqli_fetch_assoc($sql);
		$view="".$weburl."/offer/view/".$_GET["id"];
		$appr="".$weburl."/offer/approve/".$_GET["id"];
		$canc="".$weburl."/offer/cancel/".$_GET["id"];
		if($_GET["approve"]=="" and $_GET["cancel"]==""){
			echo "
			<title>".$rs["n2"]." Fiyat Teklifi</title>
			<div class='v3-container tac' style='border-radius: 15px; margin-top:8%; padding:20px 0px;'>
				<img src='".$logo."' style='height:65px; margin-bottom:30px;'>
				<h2><b>".$rs["n2"]."</b> ".translate("için özel teklifiniz hazır")."!</h2><br><br>
				<h4>".translate("Sizin için en uygun şartlarla bu teklifi hazırladık")." 🎯</h4>
				<p>".translate("Aşağıdan teklif detaylarını inceleyebilir, onaylayabilir veya dilerseniz iptal edebilirsiniz").".</p>
				<p>".translate("Tercihiniz için teşekkür ederiz, birlikte çalışmayı sabırsızlıkla bekliyoruz").".</p><br><br><br>
				<a href='".$view."' target='_blank' class='v3-btn v3-btn-info'> <i class='fa fa-eye' aria-hidden='true'></i> ".translate("Teklifi Görüntüle")." </a>
				<a href='".$appr."' class='v3-btn v3-btn-success'> <i class='fa fa-check' aria-hidden='true'></i> ".translate("Teklifi Onayla")." </a>
				<a href='".$canc."' class='v3-btn v3-btn-danger'> <i class='fa fa-times' aria-hidden='true'></i> ".translate("İptal Et")." </a>
				<br><br><br>
				<p>By <b>".$firma."</b></p>
			</div>
			";
		}
		if($_GET["approve"]<>""){
			$sql = mysqli_query($conn, "update t4 set s13='3' where (id='".$_GET["approve"]."' or t1='".$_GET["approve"]."')");
			echo "
			<div class=\"v3-container tac alert-success\" style=\"border-radius: 25px; margin-top:10%; padding:25px 20px;\">
				<h1><i class=\"fa fa-check\" aria-hidden=\"true\"></i> ".translate("Tebrikler! Teklifinizi Onayladınız")."</h1>
				<p>".translate("Teklif onay işleminiz başarıyla tamamlandı.")."</p>
				<p>".translate("Sizin için en uygun çözümleri sunmaktan memnuniyet duyuyoruz. Ekibimiz kısa süre içinde sizinle iletişime geçecektir.")."</p>
			</div>
			";

		}elseif($_GET["cancel"]<>""){
			$sql = mysqli_query($conn, "update t4 set s13='4' where (id='".$_GET["cancel"]."' or t1='".$_GET["cancel"]."')");
			echo "
			<div class=\"v3-container tac alert-danger\" style=\"border-radius: 25px; margin-top:10%; padding:25px 20px;\">
				<h1><i class=\"fa fa-times\" aria-hidden=\"true\"></i> ".translate("Teklifi İptal Ettiniz")."</h1>
				<p>".translate("Teklif iptal işleminiz başarıyla tamamlandı.")."</p>
				<p>".translate("Kararınıza saygı duyuyoruz. Dilerseniz ilerleyen dönemde sizin için yeni bir teklif hazırlayabiliriz.")."</p>
			</div>
			";
		}

	}elseif($_GET["islem"]=="chmod"){
		echo chmod($_GET["path"], $_GET["mod"]);

	}elseif($_GET["islem"]=="editable"){
		if($_POST["ne"]=="translate"){
			echo "Hazırla";
		}else{
			$sql = mysqli_query($conn, "update ".$_SESSION["lang"]." set ".$_POST["col"]."='".addslashes(stripslashes($_POST["txt"]))."' where id=".$_POST["id"]."");
		}
		echo "saved";

	}elseif($_GET["islem"]=="izle"){
		$sql=mysqli_query($conn, "select * from medya where ne='video' and id=".$_GET["id"].""); $rsv=mysqli_fetch_assoc($sql);
		echo "<div class=\"container-fluid\" style=\"background-color:#000000; margin-top:10px; text-align:center;\">";
		echo "<iframe width=\"100%\" height=\"97%\" src=\"".$rsv["n1"]."?rel=0&autoplay=1\" frameborder=\"0\" allowfullscreen></iframe>";
		echo "</div>";

	}elseif($_GET["islem"]=="yorum"){
	if($_SESSION["User_ID"]<>""){$s2=$_SESSION["User_ID"];}else{$s2=0;}	//userid
	if($_POST["s3"]<>""){$s3=$_POST["s3"];}else{$s3=0;}								//Yıldız
	if($m18==1){$s4=0;}else{$s4=1;}																//Onay
	if($_POST["t1"]<>""){$t1=$_POST["t1"];}else{$t1=$_SESSION["lang"];}		//Tablo
	if($_POST["t2"]<>""){$t2=$_POST["t2"];}else{$t2=$_GET["ne"];}					//ne
	if($_POST["t4"]<>""){$t4=$_POST["t4"];}else{$t4=$_SESSION["User_Name"];}					//Yorum Yapan
	if($_POST["t2"]=="uye"){
		$sql2 = mysqli_query($conn, "select * FROM t5 where id=".$_REQUEST["id"].""); $konu=mysqli_fetch_assoc($sql2);
		if(mysqli_num_rows($sql2)>0){$s19=$konu["id"];}else{$s19=0;}
	}else{
		$sql2 = mysqli_query($conn, "select * FROM ".$_SESSION["lang"]." where id=".$_REQUEST["id"].""); $konu=mysqli_fetch_assoc($sql2);
		if($konu["s19"]<>""){$s19=$konu["s19"];}else{$s19=0;}
	}
	$iarr = array();
	$files = array_filter($_FILES['afile']['tmp_name']);
	$total = count($_FILES['afile']['tmp_name']);
	for( $i=0 ; $i < $total ; $i++ ) {
		$kaydedilecekyer = "../deppo/dosya";
		$kaynak	= $_FILES["afile"]["tmp_name"][$i];
		$isim	 	= $_FILES["afile"]["name"][$i];
		$uzanti		= explode('.',$_FILES['afile']['name'][$i]);
		$rand  		= substr(md5(uniqid(rand())),0,10);
		$yeni  		= "attach-feedback_".$rand.".".$uzanti[count($uzanti)-1]."";
		$image = new SimpleImage();
		$image->load("../deppo/dosya/".$yeni."");
		$image->resizeToWidth("".$a9."");
		$image->save("../deppo/dosya/".$yeni."");
		move_uploaded_file ($_FILES["afile"]["tmp_name"][$i], $kaydedilecekyer . "/".$yeni);
		$iarr = $iarr + array($i => $yeni);
	}
	$rjsi = json_encode($iarr, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);
	$yorum			= $conn->query("insert into genel(ne,s1,s2,s3,s4,s14,s19,s15,t1,t2,t3,t4,t5,n1,n6,ts1) values ('yorum', '".$_REQUEST["id"]."', '".$s2."', '".$s3."', '".$s4."', '1', '1', '".$s19."', '".$t1."', '".$t2."', '".$_POST["t3"]."', '".$_POST["t4"]."', '".$_POST["t5"]."', '".$_POST["n1"]."', '".addslashes(stripslashes($rjsi))."', now())");
	if($module["bildirim_email"]>0){
		if($s19<>0){
			$sql19 = mysqli_query($conn, "select * FROM t5 where id=".$s19.""); $rs19=mysqli_fetch_assoc($sql19);
			$gonderen   	= $firma;
			$konu		   	= translate("Yeni yorum yapıldı");
			$mesaj      	= $_POST["n1"];
			$mesaj			= $design_top.$mesaj.$design_bottom;
			$path			= "../";
			emailgonder(base64_decode($rs19["t2"]),$konu,$cc,$mesaj);
		}else{
			$gonderen   	= "Web Servis";
			$konu		   	= translate("Yeni yorum yapıldı");
			$mesaj      	= $_POST["n1"];
			$mesaj			= $design_top.$mesaj.$design_bottom;
			$path			= "../";
			$malici 			= tanim('email','n1',0,'comment');
			emailgonder($malici,$konu,$cc,$mesaj);
		}
	}
	if($module["bildirim_notification"]>0){
		sNotification(translate("Yeni Yorum"), "".$t4." / ".$_POST["n1"]."", "Crm");
	}
	setpoint('yorum', 'Y'.$_REQUEST["id"], '', '../'.$cpath.'');
	setpoint('yorum_firma', 'YF'.$_SESSION["User_ID"], $_REQUEST["id"], '../'.$cpath.'');
	//echo "url:".$_SERVER['HTTP_REFERER']."";

}elseif($_GET["islem"]=="delcomment"){
	$sql = mysqli_query($conn, "delete from genel where id=".$_GET["id"]."");
	echo "#".translate("Kayıt Silindi")."";

}elseif($_GET["islem"]=="addpost"){
	$post=$_POST["n1"];
	$postip="post";
	$wall = $conn->query("insert into ".$_SESSION["lang"]." (ne,t1,t2,n1,s1,s13,n6,ts1) values ('wall', '".kisalt(addslashes(stripslashes($post)),10)."', '".$postip."', '".addslashes(stripslashes($post))."', '".$_SESSION["User_ID"]."', '1', '".addslashes(stripslashes($rjbildir))."', now())");
	$id=$conn -> insert_id;
	$iarr = array();
	$files = array_filter($_FILES['afile']['tmp_name']);
	$total = count($_FILES['afile']['tmp_name']);
	for( $i=0 ; $i < $total ; $i++ ) {
		$kaydedilecekyer = "../deppo/image";
		$kaynak		= $_FILES["afile"]["tmp_name"][$i];
		$isim	 		= $_FILES["afile"]["name"][$i];
		$uzanti		= explode('.',$_FILES['afile']['name'][$i]);
		$rand  		= substr(md5(uniqid(rand())),0,10);
		$yeni  		= "attach-post_".$rand.".".$uzanti[count($uzanti)-1]."";
		$image = new SimpleImage();
		$image->load("../deppo/image/".$yeni."");
		$image->resizeToWidth("".$a9."");
		$image->save("../deppo/image/".$yeni."");
		move_uploaded_file ($_FILES["afile"]["tmp_name"][$i], $kaydedilecekyer . "/".$yeni);
		$conn->query("insert into medya (ne,s1,s2,s3,s4,s13,t1,t3,t6) VALUES ('resim', '".$id."', '1', '0', '0','1', '".addslashes($yeni)."', 'wall', '".$_SESSION["lang"]."')");
		$iarr = $iarr + array($i => $yeni);
	}
	if($_POST["video"]<>""){
		$ne="wall"; $s1=$conn -> insert_id;
		$sqlvk=mysqli_query($conn, "select * from medya where ne='video' and t3='wall' and s1='".$conn -> insert_id."'"); $rsvk=mysqli_fetch_assoc($sqlvk);
		if(mysqli_num_rows($sqlvk)>0){$ks2="0";}else{$ks2="1";}
		include("../crmplus/modules/video/video_bot.php");
		if(!empty($_POST["s3"])){$s3=$_POST["s3"];}else{$s3="0";}
		if ($_POST["t2"]==""){$vadi=$vtit[0];}else{$vadi=$_POST["t2"];}
		if ($_POST["n3"]==""){$vack=$vdes[0];}else{$vack=$_POST["n3"];}
		$imageString = file_get_contents($vres);
		$save = file_put_contents("../deppo/video/".$vis."", $imageString);
		$sql = $conn->query("insert into medya (ne,s1,s2,s3,s4,s13,n1,n2,n3,n4,t2,t3,t4,t6,t7,s19,ts1) values ('video','".$s1."', '".$ks2."', '".$s3."', '".$s4."', '1', '".$vvid."', '".$vis."', '".val($vack)."', '".$vkey[0]."', '".val($vadi)."', '".$ne."', '".$vurl."', '".$_SESSION["lang"]."', '".val($url)."','".$_SESSION["user_id"]."', now())");
	}
	echo "url:".$_SERVER['HTTP_REFERER']."";

}elseif($_GET["islem"]=="delpost"){
	$sql=mysqli_query($conn, "select * from medya where ne='resim' and s1=".$_GET["id"].""); while($rsi=mysqli_fetch_array($sql)){
		unlink("../deppo/image/".$rsi["t1"]."");
		unlink("../deppo/image/k_".$rsi["t1"]."");
		$sql = mysqli_query($conn, "delete from medya where s1=".$_GET["id"]."");
	}
	$sql = mysqli_query($conn, "delete from ".$_SESSION["lang"]." where id=".$_GET["id"]."");
	echo "#".translate("Kayıt Silindi")."";

}elseif($_GET["islem"]=="ocomment"){
	if($_POST["s2"]<>""){$s2=$_POST["s2"];}else{$s2=0;}
	if($_POST["s3"]<>""){$s3=$_POST["s3"];}else{$s3=0;}
	$s4=1;
	$yorum			= $conn->query("insert into genel(ne,s1,s2,s3,s4,s14,s15,t1,t2,t3,t4,t5,n1,ts1) values ('pchat', '".$_POST["id"]."', '".$s2."', '".$s3."', '".$s4."', '1', '1', '".$_POST["t1"]."', '".$_POST["t2"]."', '".$_POST["t3"]."', '".$_POST["t4"]."', '".$_POST["t5"]."', '".$_POST["n1"]."', now())");
	$malici		 	= $mail;
	$mgonderen	= $mail;
	$gonderen 	= $firma;
	$konu			= translate("Yeni yorum yapıldı");
	$mesaj      	= "".$_POST["t4"]."<hr>".$_POST["n1"]."";
	$mesaj			= $design_top.$mesaj.$design_bottom;
	echo "<script language=\"JavaScript\">var delay = 2; var targetURL = \"".$_SERVER['HTTP_REFERER']."\"; setTimeout('self.location.replace(targetURL)', (delay * 500));</script>";

}elseif($_GET["islem"]=="ebulten"){
	$dosya  = "../deppo/ebulten.txt";
	$handle = fopen($dosya, "r");
	$icerik = fread($handle, filesize($dosya));
	fclose($handle);
	$fh     = fopen($dosya, 'w') or die("Bir Hata Oluştu.!");
	$veri   = "".$_POST["email"].", ";
	fwrite($fh, $icerik.$veri);
	fclose($fh);
	echo "<div class=\"alert alert-success fade in\" role=\"alert\" style=\"padding:0px;\">";
	echo "<h5 style=\"margin-left:30px;\"><span class=\"fa fa-check\"></span> ".$sdil[103]." <i class=\"fa fa-refresh fa-spin\"></i> ".$sdil[69]."</h5>";
	echo "</div>";
	echo "<script language=\"JavaScript\">var delay = 2; var targetURL = \"".$_SERVER['HTTP_REFERER']."\"; setTimeout('top.location.replace(targetURL)', (delay * 1000));</script>";

}elseif($_GET["islem"]=="newsletter"){
	$dosya  = "../deppo/newsletter.json";
	if(!file_exists("../deppo/newsletter.json")){
		$create = fopen($dosya, 'w') or die("Bir Hata Oluştu.!");
		fclose($create);
	}
	$url		 = "".$weburl."/deppo/newsletter.json";
	$result	 = file_get_contents($url);
	$arrays = json_decode($result, true);
	//Print_r($result);
	$iarr = array();
	foreach($arrays as $key=>$value){
		$iarr = $iarr + array( $key => $value);
		$id=$value[id];
	}
	$iarr[] = array('id' => $id+1, 'Name' => $_POST["Name"], 'Email' => $_POST["Email"], 'Gsm' => $_POST["Gsm"], 'Tarih' => date("d.m.Y"));
	$data = json_encode($iarr, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);
	$fp	  = fopen($dosya, 'w');
	fwrite($fp, $data);
	fclose($fp);

}elseif($_GET["islem"]=="fanswer"){
	$sqlf=mysqli_query($conn, "select * from ".$_SESSION['lang']." where id=".$_POST["fid"].""); $rsf=mysqli_fetch_assoc($sqlf);
	$mgonderen = $mail;
	$msifre     = tanim('email','n2',0,'form');
	$malici		= $_POST["E_Mail"];
	$konu       = $_POST["Subject"];
	$mesaj		= rlang($rsf["n5"]);
	$mesaj		= $design_top.$mesaj.$design_bottom;
	$path		= "../";
	emailgonder($malici,$konu,$cc,$mesaj);

}elseif($_GET["islem"]=="mgonder"){
	$mesaj	= $design_top.$_POST["Mesaj"].$design_bottom;
	$malici	= $_POST["malici"];
	$konu   = $_POST["Konu"];
	$path		="../";
	emailgonder($malici, $konu, $cc, $mesaj, 'form');

}elseif($_GET["islem"]=="fmail" or $_GET["islem"]=="fmesaj" or $_GET["islem"]=="fgonder"){	//request+form
	if($_GET["register"]<>""){
		include("account/auto_register.php");
	}
	// Form verilerini al
	$subject = $_POST["Konu"] ?: ($_POST["Subject"] ?: translate("Form Mesaj"));
	$message = $_POST["Mesaj"] ?: $_POST["Messages"];
	$name = $_POST["Ad_Soyad"] ?: $_POST["Name"];
	$date = $_POST["Tarih"] ?: $_POST["Date"];
	$time = $_POST["Saat"] ?: $_POST["Time"];
	$nedir = $_POST["nedir"] ?: "fmesaj";
	$rID = $_REQUEST["rID"] ?: date('dmYHis');
	$User_ID = $_SESSION["User_ID"] ?: 0;
	$User_s19 = $_SESSION["User_s19"] > 0 ? $_SESSION["User_s19"] : ($_POST["User_s19"] > 0 ? $_POST["User_s19"] : 0);
	// Veritabanından çekilen veri
	$sqlf = mysqli_query($conn, "SELECT * FROM ".$_SESSION['lang']." WHERE id=".$_POST["fid"]);
	$rsf = mysqli_fetch_assoc($sqlf);
	$jstn = json_decode($rsf["n1"], true);
	$jssi = json_decode($rsf["n2"], true);
	$mesaj .="<table style=\"width:100%\">";
	$jset = array();
	$jset = $jset + array(translate("Request_No") => $rID);
	$jset = $jset + array(translate("Date") => date('Y-d-m H:i:s'));
	$jset = $jset + array(translate("ProjectID") => $_SESSION["ProjectID"]);
	if(isset($_POST)){
		$mesaj .="<table style=\"width:100%;font-family:Calibri,&quot;sans-serif&quot;\">";
		foreach ($_POST as $key => $val){
			if(($rsf["m7"]==1 or $_POST["empty_val"]<>"") and $val==""){$val="";}else{$val=$val;}
			if (!in_array($key, ['cc', 'bcc', 'nedir', 'fname', 'fid', 'sid', 'ftip', 'soru', 'cevap', 'rid', 'Comment'])) {
				$vals = is_array($val) ? implode(", ", $val) : $val;
				$jset = array_merge($jset, [$key => $vals]);
			}
			if($key<>"cc" and $key<>"bcc" and $key<>"nedir" and $key<>"fname" and $key<>"fid" and $key<>"sid" and $key<>"ftip" and $key<>"soru" and $key<>"cevap" and $key<>"rid" and $key<>"Comment" and $key<>"flang" and $val<>"malici" and $val<>"Konu" and $val<>"" and $val<>"0" and $key<>"relations"){
				if(is_array($val)){
					foreach($val as $k=>$v){$vals = "".$vals.", ".$v."";}
					$mesaj .= "
					<tr>
					<td style=\"width:30%;border-bottom:1px solid #ccc; height:34px;\"><b>".str_replace("_"," ",$key)."</b></td>
					<td style=\"border-bottom:1px solid #ccc; height:34px;\"> : ".ltrim($vals,",")."</td>
					</tr>
					";
				}else{
					$mesaj 	.= "
					<tr>
					<td style=\"width:30%;border-bottom:1px solid #ccc; height:34px;\"><b>".str_replace("_"," ",$key)."</b></td>
					<td style=\"border-bottom:1px solid #ccc; height:34px;\"> : ".$val."</td>
					</tr>
					";
				}
				$vals="";
			}
		}
		$i=0;
		foreach ($_FILES as $i => $file) {
			$fileKey = array_keys($_FILES)[$i];
			$fileUrl = uri("domain") . "/deppo/dosya/";
			if ($file["size"] > 0) {
				$ext = pathinfo($file['name'], PATHINFO_EXTENSION);
				$newName = "attach_form_" . substr(md5(uniqid(rand())), 0, 10) . "." . $ext;
				move_uploaded_file($file["tmp_name"], "../deppo/dosya/" . $newName);
				$jset[translate("Attach_" . $fileKey)] = $fileUrl . $newName;
				$mesaj .= "<tr><td colspan=\"2\" style=\"border-bottom:1px solid #ccc; height:34px;\"><a href=\"{$fileUrl}{$newName}\">Download {$fileKey}</a></td></tr>";
			} else {
				if ($_POST["empty_val"] !== "" || $rsf["m7"] == 1) {
					$jset[translate("Attach_" . $fileKey)] = "";
				}
			}
		}
	} //post kontrol
	if($_POST["Comment"]<>""){
		$mesaj 	.= "
		<tr>
		<td colspan=\"2\" style=\"border-bottom:1px solid #ccc; height:34px;text-align: center; background: #f3f3005c;\"><a href=\"".$_POST["Comment"]."\" target=\"_blank\">".translate("Hizmetlerimizi değerlendirmek için lütfen tıklayınız")."</a></td>
		</tr>
		";
	}
	if($_GET["register"]<>""){
		$mesaj	.= "
		<tr>
		<td colspan=\"2\" style=\"height: 34px; background: aliceblue;\">".translate("Sayın")." ; <b>".$rsk["t1"]."</b> <b>".$firma."</b> ".translate("uye_kayit")."</td>
		</tr>
		<tr>
		<td style=\"width:20%;border-bottom:1px solid #ccc; height:34px;\"><b>".translate("Kullanıcı adınız")."</b></td>
		<td style=\"border-bottom:1px solid #ccc; height:34px;\"> : ".base64_decode($rsk["t2"])."</td>
		</tr>
		<tr>
		<td style=\"width:25%;border-bottom:1px solid #ccc; height:34px;\"><b>".translate("Şifreniz")."</b></td>
		<td style=\"border-bottom:1px solid #ccc; height:34px;\"> : ".base64_decode($rsk["t3"])."</td>
		</tr>
		";
	}
	$mesaj 	.= "</table>";
	$mesaj		= $design_top.$mesaj.$design_bottom;
	$ts2 = $_POST["Date"] ?? date('Y-m-d');
	$fid = $_POST["fid"] ?? 0;
	$sid = $_POST["sid"] ?? 0;
	$pb1 = $_POST["pb1"] ?? 0;
	$pb3 = $_POST["pb3"] ?? 0;
	$aform = json_encode($jset, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);
	$fmesaj = $conn->query("insert into t2 (ne,t1,t2,t3,t5,t6,s1,s2,s3,s4,s19,n1,n2,ts1,ts2) values ('".$nedir."', '".$_POST["fname"]."', '".$subject."', '".$rID."', '".$yeni."', '".$name."', '".$fid."', '".$sid."', '".$User_ID."', '0', '".$User_s19."', '".addslashes(stripslashes($mesaj))."', '".addslashes(stripslashes($aform))."', now(), '".$ts2."')");
	$sqlrk=mysqli_query($conn, "select * from t2 where ne='".$nedir."' order by id desc"); $rsrk=mysqli_fetch_assoc($sqlrk);
	$jsrk = json_decode($rsrk["n2"], true);
	if($nedir=="request"){
		if($e8<>0 and ($pb1>0 or $pb3>0)){
			$sql = $conn->query("insert into t4(t1,t2,t4,ne,t6,t11,pb1,pb2,pb3,pb4,ts1,n1,s1,s5) values ('Nakit', 'cari', '".date("Y-m-d")."', 'cari', '".$module["currency"]."', 'OIM', '".sprice($pb1)."', '0.00', '".sprice($pb3)."', '0.00', now(), '#".$rsrk["id"]." ".translate("Request")."', '".$_SESSION["User_ID"]."', '0')");
		}
	}
	if($subject=="Event"){
		$sql = $conn->query("insert into genel(t1, t2, t3, t4, t5, t6, t9, ne, n1, n16, n17, ts1) values ('".$name."', '".$time."', 'notlar', '".$date."', '0', '0', '0', 'not', '".addslashes(stripslashes($message))."', '".addslashes(stripslashes($rjsi))."', '".addslashes(stripslashes($rjsm))."', now())");
	}
	
	if($_POST["malici"]<>""){
		$malici	= $_POST["malici"];
	}else{
		$malici 	= tanim('email','n1',0,'form');
		$platform 	= "mesaj";
	}
	$konu       	= $subject;
	$emailB = filter_var($_POST["Email"], FILTER_SANITIZE_EMAIL);
	if($_POST["cc"]<>""){
		$cc		= $_POST["cc"];
	}
	if (filter_var($emailB, FILTER_VALIDATE_EMAIL) === false || $emailB != $_POST["Email"]){}else{
		$cc		= $_POST["Email"];
	}
	if($_POST["bcc"]<>""){
		$bcc		= $_POST["bcc"];
	}
	$path		="../";
	if($module["bildirim_notification"]>0){
		sNotification(translate("#".$nedir).": ".telefon($module["requests"]), $konu, "Crm", "", $nedir);
	}
	//if($module["bildirim_email"]>0){
		emailgonder($malici, $konu, $cc, $mesaj, 'form', $nedir);
	//}
	if($module["bildirim_sms"]>0){
		smsgonder($konu,telefon($fgsm));
	}
	$_SESSION["jbasket"]="";
	if(!empty($_POST['relations'])) {
		$konu       = translate("+#request_relation_subject");
		$path		=	"../";
		$message=	translate("+#request_relation_txt");
		$rIDi = implode(',',$_POST["relations"]); $rIDe = explode(',',$rIDi);
		foreach($rIDe as $rID){
			$sqlc=mysqli_query($conn, "select * from t5 where id=".$rID.""); $rsc=mysqli_fetch_assoc($sqlc);
			if($module["user_bildirim_notification"]>0){
				sNotification(translate("#".$nedir).": ".telefon($module["requests"]), $konu, "App", "", $nedir);	
			}
			if($module["user_bildirim_email"]>0){
				emailgonder(v3d($rsc["t2"]), $konu, $cc, $message, 'form', $nedir);
			}
			if($module["user_bildirim_sms"]>0){
				smsgonder($konu,telefon($rsc["t4"]));
			}
		}
	}

}elseif($_GET["islem"]=="urequest"){
	$arr = array(); $i=0;
	foreach ($_POST as $key => $value){
		if($key<>"n3" and $key<>"s19" and $key<>"s3" and $key<>"ts2" and substr($key,0,7)<>"Attach_"){
			$arr = $arr + array($key => $value);
		}
	}
	foreach($_FILES as $file){
		if($file["size"] > 0){ $i++;
			$max_size = 1000000;
			$kaydedilecekyer = "../deppo/dosya";
			$kaynak	= $file["tmp_name"];
			$isim	 	= $file["name"];
			$uzanti		= explode('.',$file['name']);
			$rand  		= substr(md5(uniqid(rand())),0,10);
			$yeni  		= "attach_form_".$rand.".".$uzanti[count($uzanti)-1]."";
			move_uploaded_file ($file["tmp_name"], $kaydedilecekyer . "/".$yeni);
			$arr = $arr + array(translate("".array_keys($_FILES)[$i-1]."") => "".uri("domain")."/deppo/dosya/".$yeni);
		}else{$i++;
			$arr = $arr + array(translate("".array_keys($_FILES)[$i-1]."") => "");
		}
	}
	$rjsi = json_encode($arr, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);
	$Rs = mysqli_query($conn, "update t2 set n2='".addslashes(stripslashes($rjsi))."', s4='0' where id=".$_GET["id"]."");

}elseif($_GET["islem"]=="srequest"){
	$sql = mysqli_query($conn, "select * from t2 where id=".$_GET["id"].""); $rs=mysqli_fetch_assoc($sql); $jsi = json_decode($rs["n2"], true);
	foreach($jsi as $key=>$value){
		if(substr($key,0,6)=="Attach"){unlink("../deppo/dosya/".$value."");}
	}
	$del = mysqli_query($conn, "delete from t2 where id=".$_GET["id"]."");

}elseif($_GET["islem"]=="qrequest"){
	echo '
	<div class="v3-container" style="text-align:center; padding-top:5%;">
		<p>'.translate("#request_search_top_text").'</p>
		<form action="?islem=drequest" method="post" style="margin-top:30px; margin-bottom:30px;">
		<input type="text" name="q" placeholder="'.translate("#request_key").'" style="width: 400px">
		<button type="submit" class="v3-btn v3-btn-warning fa fa-search" style="height: 30px; margin-top: -5px;"></button>
		</form>
		<p>'.translate("#request_search_bottom_text").'</p>
	</div>
	';

}elseif($_GET["islem"]=="drequest"){
	$sqlr = mysqli_query($conn, "select * from t2 where ne='request' and n2 LIKE '%".$_REQUEST["q"]."%' order by id desc"); $rsr=mysqli_fetch_assoc($sqlr);
	$jsi = json_decode($rsr["n2"], true);
	?>
    <div class="v3-container" style="" id="yazdir">
        <div class="v3-row">
            <?php
			$arrays = json_decode($rsr["n2"], true);
			foreach($arrays as $key=>$value){
				if(substr($key,0,2)=="i_"){$key = str_replace("i_"," ",$key); $bg="bg-info";}elseif(substr($key,0,2)=="w_"){$key = str_replace("w_"," ",$key); $bg="bg-warning";}elseif(substr($key,0,2)=="d_"){$key = str_replace("d_"," ",$key);$bg="bg-danger";}elseif(substr($key,0,2)=="s_"){$key = str_replace("s_"," ",$key);$bg="bg-success";}else{$bg="bg-primary";}
				if($key<>"uid" and $key<>"ne" and $key<>"Konu" and $key<>"nedir"){
					if($key=="attach"){$value=str_replace($value,"<a href=\"".$weburl."/deppo/dosya/".$value."\" download>".translate("+Download Attachment File")."</a>",$value);}
					?>
            <div class="v3-panel v3-col-md-6 v3-col-xs-12">
                <div class="v3-panel-heading v3-<?php echo $bg;?>" title="<?php echo $key;?>"><?php echo translate("+".str_replace("_"," ",$key));?></div>
                <div class="v3-panel-body"><?php echo $value;?></div>
            </div>
            <?php }}?>
            <div class="v3-panel v3-col-md-12 v3-col-xs-12">
                <div class="v3-panel-heading v3-bg-warning"><?php echo translate("+Yanıt / Not")?></div>
                <div class="v3-panel-body"><?php echo $rsr["n3"];?></div>
            </div>
            <div class="v3-col-md-12 v3-col-xs-12">
                <?php if($_GET["status"]<>""){	//kullanıcının onayı için?>
                <?php if($rsr["s4"]==3){?>
                <center><a href="?islem=drequest&id=<?php echo $rsr["id"]?>&status=true&s4=1" class="v3-btn v3-btn-warning" style="text-align:center; font-size:24px;"><?php echo translate("#Onayla");?></a></center>
                <?php }else{?>
                <div style="text-align:center; font-size:24px;"><?php if($rsr["s4"]==0){echo translate("#request_statu0");}elseif($rsr["s4"]==1){echo translate("#request_statu1");}elseif($rsr["s4"]==2){echo translate("#request_statu2");}elseif($rsr["s4"]==3){echo translate("#request_statu3");}elseif($rsr["s4"]==4){echo translate("#request_statu4");}elseif($rsr["s4"]==5){echo translate("#request_statu5");}?></div>
                <?php }?>
                <?php }else{?>
                <div style="text-align:center; font-size:24px;"><?php if($rsr["s4"]==0){echo translate("#request_statu0");}elseif($rsr["s4"]==1){echo translate("#request_statu1");}elseif($rsr["s4"]==2){echo translate("#request_statu2");}elseif($rsr["s4"]==3){echo translate("#request_statu3");}elseif($rsr["s4"]==4){echo translate("#request_statu4");}elseif($rsr["s4"]==5){echo translate("#request_statu5");}?></div>
                <?php }?>
            </div>
        </div>
    </div>
    <?php
		if($_GET["s4"]<>""){
			$Rs = mysqli_query($conn, "update genel set s4='".$_GET["s4"]."' where id=".$_GET["id"]."");
			echo "<script>jQuery(document).ready(function(){location.href='?islem=drequest&id=".$_GET["id"]."&status=true'});</script>";
		}
	}elseif($_GET["islem"]=="cek_goster"){
		$sqlf=mysqli_query($conn, "select * from genel where ne='i-kod' and s19=".$_SESSION["User_ID"]." and s5=0 order by id desc"); $rsf=mysqli_fetch_assoc($sqlf);
		$Rs = mysqli_query($conn, "update genel set s5='1' Where ne='i-kod' and s19=".$_SESSION["User_ID"]." and s5='0'");
		$_SESSION["cgoster"]="";
		?>
    <div class="v3-container" style="text-align:center;">
        <h1>Tebrikler</h1><br>
        <?php if($rsf["pb2"]==0){?>
        <h2>Kampanyalarımızdan daha çok yararlanın diye size <b><?php echo $rsf["pb1"];?> <?php echo $ikpb?></b> üzeri %<b><?php echo $rsf["s1"];?></b> İndirim çeki tanımlanmıştır</h2><br>
        <?php }else{?>
        <h2>Kampanyalarımızdan daha çok yararlanın diye size <b><?php echo $rsf["pb1"];?> <?php echo $ikpb?></b> üzeri <b><?php echo $rsf["pb2"];?> <?php echo $ikpb?></b> İndirim çeki tanımlanmıştır</h2><br>
        <?php }?>
        <p>Çekinize Kullanıcı panelinizden veya sepet aşamasında alt alandan ulaşabilirsiniz</p><br><br>
    </div>

<?php }elseif($_GET["islem"]=="dsayfa" or $_GET["export"]<>""){ //-- Sayfa Detay -->
		if($_GET["export"]<>""){include("../deppo/tools/script/export/".$_GET["export"].".php");}
		$sql=mysqli_query($conn, "select * from ".$_SESSION['lang']." where id=".$_GET["id"].""); $rs=mysqli_fetch_assoc($sql);
		$sqli=mysqli_query($conn, "select * from medya where ne='resim' and s1=".$rs["id"]." and s2=0");
	//Örnek=?islem=dsayfa&export=word&id=1389
		function cexport($metin){
			$metin = str_replace("{Ad-Soyad}", $_POST["Ad-Soyad"], $metin);
			$metin = str_replace("{Tc}", $_POST["Tc"], $metin);
			$metin = str_replace("{Adres}", $_POST["Adres"], $metin);
			$metin = str_replace("{Tarih}", date("d.m.Y H:i:s"), $metin);
			$metin = str_replace("{Ip}", getRealIpAddr(), $metin);
			return $metin;
		}
		?>
    <div class="v3-container" style="width: 95%;height: 100vh;overflow: hidden; overflow-y: auto;">
        <div class="" style="margin-top:10px;"> <?php echo rlang($rs["n1"]);?>
            <?php $id=$_GET["id"]; $ftype=$_GET["ftype"]; include("../deppo/tools/script/form.php")?>
            <div class="">
                <?php while($rsi=mysqli_fetch_assoc($sqli)){?>
                <div class="v3-col-xs-6 v3-col-md-3"> <a href="#" class="v3-thumbnail"> <img src="<?php echo $weburl?>/deppo/image/<?php echo $rsi["t1"]?>" alt="..."> </a> </div>
                <?php }?>
            </div>
        </div>
    </div>

<?php }elseif($_GET["islem"]=="ads"){ //-- Sayfa Detay -->?>
    <style> .box_a_d_s img { width: 100%; margin-top: -20px; } </style>
    <div class="box_a_d_s">
        <?php echo reklam($_GET["id"]);?>
    </div>

<?php }elseif($_GET["islem"]=="qrp"){ //-- QR Puan -->
	$qr=v3d($_GET["qr"]);
	$qr=explode("/",$qr);
	foreach ($_SESSION as $key => $value){
	//	echo $key; echo ":"; echo $value; echo "<br>";
	}
	//exit();
	$User_ID=$_SESSION["User_ID"];
	$points = json_decode(getpoint('0','list'),true); krsort($points); $i=0;
	foreach($points as $key=>$value){
		if ($value["EventId"]==$qr[0]){
			$check_point="1";
		}
	}
	if($qr[2]<>""){$desc= "{".$qr[0]."} ".$qr[2]."";}else{$desc="{".$qr[0]."} Qr Tarama";}
	if($check_point<>1 and $_SESSION["User_ID"]<>""){
		setpoint($qr[1].",".$desc, $qr[0], $User_ID, "../");
		?>
    <div class="get_qr" style="text-align:center; padding-top:15%;">
        <img src="<?php echo $logo?>" style="width:100%; margin-bottom:50px;">
        <h3 style="font-size:100px"><?php //echo $_GET["q"]?></h3>
        <h4 style="font-size:75px"><?php echo translate("+Tebrikler")?></h2>
            <h1 style="font-size:200px;" class="text-success"><?php echo $qr[1]?> <?php echo translate("+Puan")?></h1>
            <h4 style="font-size:75px"><?php echo translate("+Kazandınız")?><br><br><?php echo translate("+Bizi tercih ettiğiniz için teşekkür ederiz")?></h2>
    </div>
    <?php }else{?>
    <div class="get_qr" style="text-align:center; padding-top:15%;">
        <img src="<?php echo $logo?>" style="width:100%; margin-bottom:50px;">
        <h3 style="font-size:100px; margin-bottom:50px;"><?php echo $qr[0]?></h3>
        <h1 style="font-size:100px;margin-bottom:100px;" class="text-success"><?php echo translate("+Geçersiz Kod")?></h1>
        <form id="iform">
            <input type="hidden" name="Konu" value="Usulsüz Qr Kullanımı">
            <input type="hidden" name="Qr" value="<?php echo $qr[0]?>">
            <input type="hidden" name="Puan" value="<?php echo $qr[1]?>">
            <input type="hidden" name="Mesaj" value="<?php echo date("d m Y H:i:s")?> tarihinde tarattığım Qr kodu ile almam gereken <?php echo $qr[1]?> Puanı alamadım, gereğini rica ederim">
            <input type="hidden" name="Talep_Sahibi" value="Ad Soyad">
            <button type="button" data-url="?islem=fmail" data-form="#iform" data-msg="<?php echo translate("+#İtirazınız tarafımıza ulaştı en kısa sürede dönüş yapılacaktır")?>" style="font-size:24px;"><?php echo translate("+Usulsüz kullanım bildir")?></button>
        </form>
    </div>
    <?php }?>
    <center><a class="v3-btn v3-btn-warning" href="<?php echo $weburl?>"><i class="fas fa-long-arrow-alt-left"></i> Geri</a></center>

<?php }elseif($_GET["islem"]=="dkayit"){ //-- Ürün Detay -->
	$sqlu=mysqli_query($conn, "select * from ".$_SESSION['lang']." where id=".$_GET["id"].""); $rsu=mysqli_fetch_assoc($sqlu);
	$sqli=mysqli_query($conn, "select * from medya where ne='resim' and s1=".$_GET["id"].""); 
?>
    <style> .slides { list-style: none; } .slides li { float: left; margin-right: 5px; } .slides li img { max-height: 120px; } </style>
    <form id="f<?php echo $rsu["id"]?>">
        <input type="hidden" name="price" id="price<?php echo $rsu["id"]?>" value="">
        <input type="hidden" value="" name="extra_price" id="extra_price<?php echo $rsu["id"]?>">
        <input type="hidden" value="" name="extra_items" id="extra_items<?php echo $rsu["id"]?>">
        <div class="container-fluid" style="margin-top:0px; overflow:auto;">
            <div class="">
                <?php
						$i=0;$sqlxi=mysqli_query($conn, "select * from genel where ne='inputs' and (t2='".$_SESSION["lang"]."' or t2='All') and n3='kayit' and n4<>'switch' and (n2='0' or n2='".$rsu["id"]."' or n2='".$rsu["s9"]."' or n2='".$rsu["s10"]."') and s1=0 order by s10 asc");
						include("../deppo/tools/script/prices.php");
						?>
                <table class="v3-table" style="position: relative;">
                    <tr>
                        <td style="width:40%"><img src="<?php echo medya($rsu["id"],1,"resim","t1","")?>" alt="<?php echo $rsu["t1"]?>" style="width:100%;"></td>
                        <td>
                            <h3><?php echo $rsu["t1"]?></h3>
                            <p><?php echo $rsu["n2"]?></p>
                            <div class="row">
                                <?php if($rsu["n4"]<>""){?>
                                <h5 style="margin: 0px; margin-bottom: 10px;"><?php echo translate("Seçim Yapınız")?></h5>
                                <?php $tags = explode(',',$rsu["n4"]); foreach($tags as $tag){?>
                                <div class="v3-col-sm-4" style="padding: 0px;">
                                    <label class="cp">
                                        <input type="checkbox" value="<?php echo $tag;?>,0" name="ik<?php echo cevir($tag);?>_<?php echo $ext["id"]?>" id="ext<?php echo $rsu["id"]?>" data-price="0" checked>
                                        <?php echo $tag?></label>
                                </div>
                                <?php }?>
                                <?php }?>
                            </div>
                            <div class="v3-input-group" style="cursor:pointer;position: absolute; right: 5px; bottom: 5px;width: 300px;">
                                <input type="text" name="adet" class="v3-form-control" value="1">
                                <span class="v3-input-group-btn">
                                    <button class="v3-btn v3-btn-warning" style="height: 32px;" type="button" onClick="AjaxPost('sale/ajax.php?ne=basket&islem=ekle&id=<?php echo $rsu["id"]?>','#f<?php echo $rsu["id"]?>','#f<?php echo $rsu["id"]?>')"><?php echo translate("Sepete Ekle")?></button>
                                </span>
                                <input type="text" class="v3-form-control" id="fprice<?php echo $rsu["id"]?>" value="<?php echo number_format(($fiyat_1),2); ?>" disabled>
                            </div>
                            <!-- /input-group -->
                            <div class="row" style="margin-top:90px; clear:both;">
                                <?php if(mysqli_num_rows($sqlxi)>0){?>
                                <h5 style="margin: 0px; margin-bottom: 10px;"><?php echo translate("Seçenekler")?></h5>
                                <?php  while($rsxi=mysqli_fetch_assoc($sqlxi)){$i++;?>
                                <div class="row" style="display: contents; <?php if($rsxi["n7"]==0){echo "display:none;";}?>">
                                    <div style="margin-bottom: 10px;">
                                        <label style="display: block;clear: both;"><?php echo $rsxi["n1"];?><span style="font-size:8px; color:#fff;">(i<?php echo $i;?>)</span></label>
                                        <?php if($rsxi["n4"]=="input"){?>
                                        <input style=";" class="v3-form-control" type="<?php echo $rsxi["n5"]?>" name="i<?php echo $i;?>" value="<?php echo $jsi["i".$i.""];?>" style="" <?php echo $rsxi["n8"]?> <?php echo $rsxi["n6"]?>>
                                        <?php }elseif($rsxi["n4"]=="textarea"){?>
                                        <textarea style=";" class="v3-form-control" name="i<?php echo $i;?>" <?php echo $rsxi["n8"]?> <?php echo $rsxi["n6"]?>><?php echo $jsi["i".$i.""];?></textarea>
                                        <?php }elseif($rsxi["n4"]=="select"){?>
                                        <select style=";" class="v3-form-control v3-input-sm scalc" id="i<?php echo $i;?>" name="i<?php echo $i;?>[]" <?php echo $rsxi["n8"]?> <?php echo $rsxi["n6"]?>>
                                            <?php $o=0;$sqlo=mysqli_query($conn, "select * from genel where ne='inputs' and s1=".$rsxi["id"]." order by s10 asc"); while($rso=mysqli_fetch_assoc($sqlo)){$o++;?>
                                            <option value="<?php echo $rso["n1"]?>,<?php echo $rso["n2"]?>" data-price="<?php echo $rso["n2"]?>" <?php if($rso["n3"]==1){echo "selected";}?>><?php echo $rso["n1"]?>
                                                <?php if($rso["n2"]<>0){echo $rso["n2"]." ".$kpb;}?>
                                            </option>
                                            <?php }?>
                                        </select>
                                        <?php }elseif($rsxi["n4"]=="radio"){?>
                                        <?php $o=0;$sqlo=mysqli_query($conn, "select * from genel where ne='inputs' and s1=".$rsxi["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;">
                                                <input class="rcalc" type="radio" name="i<?php echo $i;?>" id="i<?php echo $i;?>" data-price="<?php echo $rso["n2"]?>" value="<?php echo $rso["n1"];?>,<?php echo $rso["n2"];?>" <?php echo $rsxi["n8"]?> <?php if($jsi["i".$i.""]==$rso["n2"] or $rso["n3"]==1){echo "checked";}?>>
                                                <?php echo $rso["n1"];?></label>
                                        </div>
                                        <?php }?>
                                        <?php }elseif($rsxi["n4"]=="checkbox"){?>
                                        <?php $o=0;$sqlo=mysqli_query($conn, "select * from genel where ne='inputs' and s1=".$rsxi["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;">
                                                <input type="checkbox" class="ccalc" name="i<?php echo $i;?>[]" id="i<?php echo $i;?>" data-price="<?php echo $rso["n2"]?>" value="<?php echo $rso["n1"];?>,<?php echo $rso["n2"];?>" <?php echo $rsxi["n8"]?> <?php if($rso["n3"]==1){echo "checked";}?>>
                                                <?php echo $rso["n1"];?></label>
                                        </div>
                                        <?php $q="";}?>
                                        <?php }?>
                                        <?php if($rsxi["n9"]<>""){?>
                                        <p style="font-size:10px;"><?php echo $rsxi["n9"];?></p>
                                        <?php }?>
                                    </div>
                                </div>
                                <?php }?>
                                <?php }?>
                            </div>
                        </td>
                    </tr>
                </table>
                <div class="row" style="margin-top:20px; clear:both;">
                    <ul class="slides">
                        <?php while($rsi=mysqli_fetch_assoc($sqli)){?>
                        <li data-thumb="<?php echo $weburl?>/deppo/image/<?php echo $rsi["t1"]?>"><img src="<?php echo $weburl?>/deppo/image/<?php echo $rsi["t1"]?>" alt=""></li>
                        <?php }?>
                    </ul>
                </div>
                <div class="row" style="margin-top:20px; clear:both;">
                    <p><?php echo $rsu["n1"]?></p>
                </div>
                <div class="row">
                    <?php if($rsu["n8"]<>""){?>
                    <h5 style="clear: both; margin: 0px; margin-bottom: 10px;">Extra</h5>
                    <table class="" style="width:100%;position:relative;">
                        <?php
							$teu = explode(',',$rsu["n8"]);
							foreach($teu as $i) {
								$sqlu2=mysqli_query($conn, "select * from ".$_SESSION["lang"]." where ne='kayit' and s13=1 and id=".$i.""); $ext=mysqli_fetch_assoc($sqlu2);
						?>
                        <tr class="cp trrow">
                            <td style="border-bottom: 1px solid #ccc;"><img src="<?php echo medya($rsu["id"],1,"resim","t1","")?>" alt="<?php echo $rsu["t1"]?>" style="height:65px;">
                                <input style="position:absolute;left: 12px;" type="checkbox" value="<?php echo $ext["t1"];?>,<?php echo $ext["pb1"];?>" name="ix<?php echo $ext["id"]?>" id="ext<?php echo $rsu["id"]?>" data-price="<?php echo $ext["pb1"];?>">
                            </td>
                            <td style="border-bottom: 1px solid #ccc;"><?php echo $ext["t1"]?></td>
                            <td style="border-bottom: 1px solid #ccc;text-align:center">+<?php echo $ext["pb1"];?><?php echo $ikpb;?></td>
                            </label>
                        </tr>
                        <?php }?>
                        <table>
                            <?php }?>
                </div>
    </form>

    <script>
        jQuery(window).load(function() {
            jQuery('#f<?php echo $rsu["id"]?>').on('change', function() {
                update_total();
            });
            jQuery('.trrow').click(function() {
                $(this).find('input[type=checkbox]').prop("checked", !$(this).find('input[type=checkbox]').prop("checked"));
                update_total();
            });
            function update_total() {
                var total = < ? php echo number_format(($fiyat_1), 2); ? > ;
                var price = 0;
                jQuery('#f<?php echo $rsu["id"]?> input:checked').each(function() {
                    price = parseInt($(this).data('price'));
                    if (price > 0) { total += price; }
                });
                jQuery("#f<?php echo $rsu["
                    id "]?> select").each(function() {
                    price = parseInt($('option:selected', this).data('price'));
                    if (price > 0) { total += price; }
                });
                jQuery('#price<?php echo $rsu["id"]?>').val(total.toFixed(2));
                jQuery('#fprice<?php echo $rsu["id"]?>').val('' + total.toFixed(2) + ' <?php echo $kpb?>');
            }
            update_total();
        });
    </script>

<?php }elseif($_GET["islem"]=="areas"){ //-- Servis Bölgeleri -->?>
    <table class="v3-table">
        <tr>
            <th><?php echo translate("Şehir")?></th>
            <th><?php echo translate("İlçe")?></th>
            <th><?php echo translate("Semt")?></th>
            <th><?php echo translate("Süre (Dakika)")?></th>
            <th><?php echo translate("Minimum Tutar")?>(<?php echo $ikpb?>)</th>
        </tr>
        <?php $sql=mysqli_query($conn, "select * from genel where ne='areas'"); while($rs=mysqli_fetch_assoc($sql)){?>
        <tr>
            <td><?php echo loc($rs["n2"]);?></td>
            <td><?php echo loc($rs["n3"]);?></td>
            <td><?php echo loc($rs["n4"]);?></td>
            <td><?php echo $rs["n5"];?></td>
            <td><?php echo $rs["n6"];?></td>
        </tr>
        <?php }?>
    </table>
    <!-- Haber Tab -->

    <?php }elseif($_GET["islem"]=="list"){?>
    <!-- tabs left -->
    <div class="v3-tabbable">
        <ul class="v3-nav v3-nav-pills v3-nav-stacked v3-col-md-3">
            <?php $i=0;$sql=mysqli_query($conn, "select * from ".$_SESSION['lang']." where ne='".$_GET["ne"]."' order by id desc"); while($rs=mysqli_fetch_assoc($sql)){$i++;?>
            <li class="<?php if($i==1){echo "active";}?>"><a href="#l<?php echo $rs["id"]?>" data-toggle="tab"><?php echo $rs["t1"]?></a></li>
            <?php }?>
        </ul>
        <div class="v3-tab-content v3-col-md-8">
            <?php $i=0;$sql=mysqli_query($conn, "select * from ".$_SESSION['lang']." where ne='".$_GET["ne"]."' order by id desc"); while($rs=mysqli_fetch_assoc($sql)){$i++;?>
            <div class="v3-tab-pane <?php if($i==1){echo "active";}?>" id="l<?php echo $rs["id"]?>"><?php echo $rs["n1"]?></div>
            <?php }?>
        </div>
    </div>
    <!-- /tabs -->
    <!-- Haber Tab -->
    <?php echo $footer?>
    <?php } ob_end_flush();?>