<?php
$path="../../";
include("../../map.php");
if($_GET["islem"]=="satis"){
	if($_POST["UyeID"]<>0){
		$sqlc=mysqli_query($conn, "select * from t5 where id='".$_POST["UyeID"]."'"); $rsc=mysqli_fetch_assoc($sqlc);
		setcookie("UyeID", $rsc["id"], time()+(60*60*24*30));
		$_SESSION["UyeID"] 	= $rsc["id"];
		$_SESSION["Cari"]		= $rsc["t1"];
		$_SESSION["Email"]  	= base64_decode($rsc["t2"]);
		$_SESSION["cs2"]   		= $rsc["s2"];
		$_SESSION["cs3"]   		= $rsc["s3"];
		$_SESSION["cs4"]   		= $rsc["s4"];
		$_SESSION["cindirim"]	= $rsc["s5"];
		$_SESSION["ckur"]		= $rsc["i3"];
		echo "url:?ne=eticaret&islem=satis";
		//echo '<span class="badge bg-success">#'.$rsc["id"].' '.$rsc["t1"].'</span>';
/*
	}else{
		$sql5k=mysqli_query($conn, "select * from t5 where t4='".$_POST["ut4"]."'"); $rs5k=mysqli_fetch_assoc($sql5k);
		if(mysqli_num_rows($sql5k)==0 and $_POST["ut4"]<>""){
			$sqli5 = $conn->query("insert into t5(t1, t2, ne, s1, s4, s5, s19, t3, t4, t9, ts1) values ('".$_POST["ut1"]."', '".base64_encode($_POST["ut2"])."', 'uye', '0', '1', '0', '".$_SESSION["user_id"]."', '".base64_encode(generatePassword(8))."', '".$_POST["ut4"]."', '".$_POST["ts1"]."', now())");	
			$sql5=mysqli_query($conn, "select * from t5 order by id desc"); $rs5=mysqli_fetch_assoc($sql5);
		}else{
			$sql5=mysqli_query($conn, "select * from t5 where t4='".$_POST["ut4"]."'"); $rs5=mysqli_fetch_assoc($sql5);
		}
		setcookie("UyeID", $rsc["id"], time()+(60*60*24*30));
		$_SESSION["UyeID"] 	= $rs5["id"];
		$_SESSION["Cari"]		= $rs5["t1"];
		$_SESSION["Email"]  	= base64_decode($rs5["t2"]);
		$_SESSION["cs2"]   	= $rs5["s2"];
		$_SESSION["cs3"]   	= $rs5["s3"];
		$_SESSION["cs4"]   	= $rs5["s4"];
		$_SESSION["cindirim"]	= $rs5["s5"];
		$_SESSION["ckur"]		= $rs5["i3"];
*/
	}
	if($_POST["s19ID"]<>0){
		$sqlc=mysqli_query($conn, "select * from t5 where id='".$_POST["s19ID"]."'"); $rsc=mysqli_fetch_assoc($sqlc);
		setcookie("s19ID", $rsc["id"], time()+(60*60*24*30));
		$jsi = json_decode($rsc["n17"],true);
		$_SESSION["s19ID"] 		= $rsc["id"];
		$_SESSION["s19Name"]	= $rsc["t1"];
		$_SESSION["s19Komisyon"]	= $jsi["is5"];
		echo '<span class="badge bg-info" style="margin-left:10px;">#'.$rsc["id"].' '.$rsc["t1"].'</span>';
	}
	if($_GET["Sepet"]=="ekle"){
		if($_POST["adet"]==""){$adet=1;}else{$adet=$_POST["adet"];}
		$id=$_POST["t1"];
		$sqlu = mysqli_query($conn, "select * from ".$_SESSION['lang']." where (t4='".$id."' or t5='".$id."')"); $rsu = mysqli_fetch_assoc($sqlu);
		include("../../../deppo/tools/script/prices.php");
		if($adet > $stok){								//--#1
			echo translate("Stokta Yok");
		}else{
			if($_POST["Rb_ID"]<>""){
				$sqls = mysqli_query($conn, "select * from eticaret where ne='sepet' and s5=".$_POST["Rb_ID"]." and t4='".$_SESSION["StoresaleID"]."' and t5='sepet'"); $rsepet = mysqli_fetch_assoc($sqls);	
			}else{
				$sqls = mysqli_query($conn, "select * from eticaret where ne='sepet' and s3=".$rsu["id"]." and t4='".$_SESSION["StoresaleID"]."'"); $rsepet = mysqli_fetch_assoc($sqls);	
			}
			if(mysqli_num_rows($sqls)==0){
				if($rb<>""){
					$n1="".$rsu["t1"]." [".$rb."]";					//Ürün Adı
				}else{
					$n1=$rsu["t1"];										//Ürün Adı
				}
				if($_SESSION["UyeID"]<>""){
					$s1=$_SESSION["UyeID"];						//Üye ID
				}else{
					$s1=0;
				}
				if($rb_id<>""){$s5=$rb_id;}else{$s5=0;}				//VrysID
				if($rsu["s19"]<>""){$s19=$rsu["s19"];}else{$s19=0;}	//YöneticiID
				if($rbd<>""){$s6=$rbd;}else{$s6=$rsu["s6"];}		//Desi
				if($tax1==""){$tax1=0;}		//Tax
				
				$pb1=wprice($fiyat1);
				$pb2=wprice($fiyat_1);
				$pb3=wprice($tax_calc);
				$pb4=wprice($fiyat_2);
				//echo "'sepet', '".$s1."', '".$adet."', '".$rsu["id"]."', '".$rsu["s4"]."', '".$s5."', '".$s6."', '".$s19."', '".sprice($pb1)."', '".sprice($pb2)."', '".sprice($pb3)."', '".sprice($pb4)."', '".$_SESSION["StoresaleID"]."', 'sepet', '".$t9."', '".$n1."', '".$rsu["t2"]."', '".$rsu["t4"]."', '".$rsu["t10"]."'"; exit();
				$sepet = $conn->query("insert into eticaret (ne,s1,s2,s3,s4,s5,s6,s19,pb1,pb2,pb3,pb4,t4,t5,t9,n1,n2,n3,n4,ts1) values ('sepet', '".$s1."', '".$adet."', '".$rsu["id"]."', '".$rsu["s4"]."', '".$s5."', '".$s6."', '".$s19."', '".sprice($pb1)."', '".sprice($pb2)."', '".sprice($pb3)."', '".sprice($pb4)."', '".$_SESSION["StoresaleID"]."', 'sepet', '".$t9."', '".$n1."', '".$rsu["t2"]."', '".$rsu["t4"]."', '".$rsu["t10"]."', now())");
			}else{
				
				$s2=$rsepet["s2"]+$adet;
				$sepet = mysqli_query($conn, "update eticaret set s2='".$s2."' where id=".$rsepet["id"]."");
			}
			echo "url:?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&barcode=".$_GET["barcode"]."";
		}
	}elseif($_GET["Sepet"]=="guncelle"){
		if($_POST["s5"]<>0){
			$sqlu = mysqli_query($conn, "select * from t1 where ne='variation' s1=".$_POST["s3"]." and id=".$_POST["s5"].""); $rsu = mysqli_fetch_assoc($sqlu); $id=$_POST["s5"];
		}else{
			$sqlu = mysqli_query($conn, "select * from ".$_SESSION["lang"]." where ne='kayit' and id=".$_POST["s3"].""); $rsu = mysqli_fetch_assoc($sqlu); $id=$_POST["s5"]; $id=$_POST["s3"];
		}
		include("../../../deppo/tools/script/prices.php");
		
		if($s11==0){
			$spb2=(sprice($_POST["pb1"]) * (($rsu["s4"] + 100) / 100));
			$spb3=((sprice($_POST["pb1"]) * (($rsu["s4"] + 100) / 100)) - sprice($_POST["pb1"])) * $_POST["adet"];
			$spb4=(sprice($_POST["pb1"]) * (($rsu["s4"] + 100) / 100));
		}elseif($s11==1){
			$spb2=$_POST["pb1"];
			$spb3=(sprice($_POST["pb1"]) - (sprice($_POST["pb1"]) / (($rsu["s4"] + 100) / 100))) * $_POST["adet"];
			$spb4=$_POST["pb1"];
		}
		$sepet = mysqli_query($conn, "update eticaret set pb1='".sprice($_POST["pb1"])."', pb2='".sprice($spb2)."', pb3='".sprice($spb3)."', pb4='".sprice($spb4)."' where id=".$_POST["id"]."");
		if($_POST["adet"]>$_POST["s2"]){
		//-- Ürün Arttır -->
			if($stok < $_POST["adet"]){			//--#2
				echo "url:?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&barcode=".$_GET["barcode"]."";
			}else{
				$sqls = mysqli_query($conn, "select * from eticaret where ne='sepet' and id=".$_POST["id"].""); $rsepet = mysqli_fetch_assoc($sqls);
				$sepet = mysqli_query($conn, "update eticaret set s2='".$_POST["adet"]."' where id=".$_POST["id"]."");
				echo "url:?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&barcode=".$_GET["barcode"].""; 
			}									//--#2
		//-- Ürün Arttır -->
		}else{
		//-- Ürün Azalt -->
			if($_POST["adet"]==0){
				$ssil = mysqli_query($conn, "delete from eticaret where id=".$sayfa3."");
				echo "url:?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&barcode=".$_GET["barcode"]."";
			}else{
				$sqls = mysqli_query($conn, "select * from eticaret where ne='sepet' and id=".$_POST["id"].""); $rsepet = mysqli_fetch_assoc($sqls);
				$sepet = mysqli_query($conn, "update eticaret set s2='".$_POST["adet"]."' where id=".$_POST["id"]."");
				echo "url:?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&barcode=".$_GET["barcode"]."";
		//-- Ürün Azalt -->
			}
		//-- Ürün Güncelle -->
		}
	//-- Ürün Sil -->

	}elseif($_GET["Sepet"]=="cikar"){
		$ssil = mysqli_query($conn, "delete from eticaret where id=".$_GET["id"]."");
		echo "url:?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&barcode=".$_GET["barcode"]."";

	}elseif($_GET["Siparis"]=="odeme"){
		//-- Odeme//--
		$odeme 	  	= explode('+',$_POST["odeme"]);
		$tip 	  			= $odeme[0];
		$banka 	  	= $odeme[2];
		$taksit   		= "0";
		$vadef 			= "0";
		$sevkiyat 		= explode('+',$_POST["sevkiyat"]);
		$kargo 	  		= $sevkiyat[2];
		$kargof 		= $sevkiyat[1];
		$kID 	  		= $sevkiyat[0];
		$os1				= $_SESSION["UyeID"];
		$os19			= $_SESSION["s19ID"];
		if($s11<>""){	$os2=$s11; }else{ $os2="0"; }
		if($_POST["odesi"]<>""){ $os3=$_POST["odesi"]; }else{ $os3="0";}
		$os5="0";
		if($kID<>""){ $os9=$kID; }else{ $os9="0"; }
		if($_POST["otoplam"]<>""){ $opb1=$_POST["otoplam"]; }else{ $opb1="0"; }
		if($_POST["okdv"]<>""){ $opb2=$_POST["okdv"]; }else{ $opb2="0"; }
		if($_POST["Delivery_AdressID"]==""){$ks11="0";}else{$ks11=$_POST["Delivery_AdressID"];}
		if($_POST["Invoice_AdressID"]==""){$ks12="0";}else{$ks12=$_POST["Invoice_AdressID"];}
		if($_POST["s19ID"]==""){$s19ID="0";}else{$s19ID=$_SESSION["s19ID"];}
		$opb3=($_POST["indirim"]/100);
		if($kargof<>""){ $opb4=$kargof; }else{ $opb4="0"; }
		$opb5="0";
		//-- Odeme//--
		//-- Fatura//--
		if($_POST["fno"]<>""){
			$sqli = $conn->query("insert into t4(t1,t4,ne,ts1,s1,s2,s3,s4,s17,pb1,pb2,pb3,pb4) values ('".$_POST["fno"]."', '', 'sfatura', now(), '".$os1."', '".date("d")."', '".date("m")."', '".date("Y")."', '".$_SESSION["user_id"]."', '0', '".sprice($_POST["gtoplam"])."', '0', '".sprice($_POST["indirim"])."')");
			$sqli = mysqli_query($conn, "select * from t4 where t1='".$_POST["fno"]."' and ne='sfatura' order by id desc"); $rsi=mysqli_fetch_assoc($sqli);
			$sqlb = mysqli_query($conn, "select * from eticaret where ne='sepet' and t4='".$_SESSION["StoresaleID"]."' and t5='sepet' order by id desc"); while($rsb=mysqli_fetch_assoc($sqlb)){
				$sqlu = mysqli_query($conn, "select * from ".$_SESSION["lang"]." where id='".$rsb["s3"]."' and ne='kayit' order by id desc"); $rsu=mysqli_fetch_assoc($sqlu);
				$sqlip = $conn->query("insert into t4(t1,ne,ts1,s1,s2,s3,s4,s5,pb1) values ('sfatura', 'furun', '".$ctarih."', ".$rsi["id"].", ".$rsu["id"].", '0', '".$rsu["s4"]."', '".$rsb["s2"]."', '".sprice($rsb["pb1"])."')");
			}
		}
		//-- Fatura//--
		$iarr = array();
		foreach ($_POST as $key => $value){
			if(substr($key,0,1)=="i"){
				$iarr = $iarr + array( $key => $value);
			}
		}
		$jsoi = json_encode($iarr, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);
		$oarr = array();
		foreach ($_SESSION as $key => $value){
			${$key} = $value;
			if(substr($key,0,5)=="Order"){
				$oarr = $oarr + array( $key => $value);
			}
		}
		$oarr = $oarr + array("IID" => $_SESSION["IID"]);
		$oarr = $oarr + array("Order_pb" => $kpb);
		$oarr = $oarr + array("Order_IP" => $_SERVER["REMOTE_ADDR"]);
		$oarr = $oarr + array("Order_pb1" => $opb1);
		$oarr = $oarr + array("Order_pb2" => $opb2);
		$oarr = $oarr + array("Order_pb3" => $opb3);
		$oarr = $oarr + array("Order_pb4" => $opb4);
		$oarr = $oarr + array("Order_method" => "Manuel");
		$jsO = json_encode($oarr, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);
	
		$fadres=$_POST["n2"];
		$tadres=$_POST["n3"];
		$not=$_POST["n10"];
		//echo "'storesales', '".$kpb."', '".$_SESSION["StoresaleID"]."', '".$tip."', '".$_SERVER['REMOTE_ADDR']."', '".$_SESSION["i-drm"]."', '".$banka."', '".$taksit."', '".$kargo."', '".$_SESSION["kartno"]."', '".$os1."', '".$os2."', '".$os3."', '1', '".$os5."', '".$os9."', '0', '".$ks11."', '".$ks12."', '".$fadi."', '".$fadres."', '".$tadres."', '".$vd."', '".$vn."', '".$_POST["fno"]."', '".$not."', '".addslashes(stripslashes($jsO))."', '".addslashes(stripslashes($jsoi))."', '".sprice($opb1)."', '".sprice($opb2)."', '".sprice($opb3)."', '".sprice($opb4)."', '".sprice($opb5)."', '".$_SESSION["s19ID"]."', now()"; exit();
		$sql = $conn->query("insert into eticaret (ne,t2,t4,t5,t8,t9,t10,t11,t12,t15,s1,s2,s3,s4,s5,s9,s10,s11,s12,n1,n2,n3,n4,n5,n6,n10,n11,n17,pb1,pb2,pb3,pb4,pb5,s19,ts1) values ('storesales', '".$kpb."', '".$_SESSION["StoresaleID"]."', '".$tip."', '".$_SERVER['REMOTE_ADDR']."', '".$_SESSION["i-drm"]."', '".$banka."', '".$taksit."', '".$kargo."', '".$_SESSION["kartno"]."', '".$os1."', '".$os2."', '".$os3."', '1', '".$os5."', '".$os9."', '0', '".$ks11."', '".$ks12."', '".$fadi."', '".$fadres."', '".$tadres."', '".$vd."', '".$vn."', '".$_POST["fno"]."', '".$not."', '".addslashes(stripslashes($jsO))."', '".addslashes(stripslashes($jsoi))."', '".sprice($opb1)."', '".sprice($opb2)."', '".sprice($opb3)."', '".sprice($opb4)."', '".sprice($opb5)."', '".$s19ID."', now())");
		$sqls= mysqli_query($conn, "select * from eticaret where ne='storesales' and t4='".$_SESSION["StoresaleID"]."' and s1=".$_SESSION["UyeID"].""); $rss=mysqli_fetch_assoc($sqls);
		$Rs  = mysqli_query($conn, "update eticaret set t5='storesales', s5='".$rss["id"]."' Where ne='sepet' and t4='".$rss["t4"]."' and s1=".$rss["s1"]."");
	//-- Cari -->
	if($_SESSION["s19ID"]<>0){
		$cpb2=str_replace(",","",number_format(($opb1),2));
		if($_POST["odeme"]=="diger+0+Diger"){
			$ct1="Nakit";
			if($_POST["Nakit"]<>""){
				$ct1="Nakit";
			}if($_POST["Banka"]<>""){
				$ct1="Banka";
			}if($_POST["Pos"]<>""){
				$ct1="Pos";
			}if($_POST["Çek"]<>""){
				$ct1="Çek";
			}
		}
		$sql = $conn->query("insert into t4(t1,t2,ne,t4,t6,pb1,pb2,pb3,pb4,s1,s2,s3,s4,s5,n1,ts1) values ('".$ct1."', 'storesales', 'cari', '".date("Y-m-d")."', '".$kpb."', '0', '".sprice($cpb2)."', '0', '0', '".$_SESSION["s19ID"]."', '".Date("d")."', '".Date("m")."', '".Date("Y")."', '".$rss["id"]."', '".$_SESSION["OrderNo"]." Nolu Sipariş', now())");
	//-- Cari Komisyon -->
		if($_POST["okomisyon"]<>0){
			$cpb1=str_replace(",","",number_format(($_POST["okomisyon"]),2));
			$sql = $conn->query("insert into t4(t1,t2,ne,t4,t6,pb1,pb2,pb3,pb4,s1,s2,s3,s4,s5,n1,ts1) values ('".$ct1."', 'storesales', 'cari', '".date("Y-m-d")."', '".$kpb."', '".sprice($cpb1)."', '0', '0', '0', '".$_SESSION["s19ID"]."', '".Date("d")."', '".Date("m")."', '".Date("Y")."', '".$rss["id"]."', '".$_SESSION["OrderNo"]." Nolu Sipariş Komisyon', now())");
		}
	//-- Cari Komisyon -->
	}
	//-- Cari -->
/*
		if($_POST["odeme"]=="diger+0+Diger"){
			$sql = $conn->query("insert into t4(t1,t2,ne,t4,t6,pb1,pb2,pb3,pb4,s1,s2,s3,s4,s5,n1,ts1) values ('Nakit', 'storesales', 'cari', '".date("Y-m-d")."', 'TRY', '".sprice($_POST["gtoplam"])."', '0', '0', '0', '".$_SESSION["UyeID"]."', '".Date("d")."', '".Date("m")."', '".Date("Y")."', '".$rss["id"]."', '".$rss["t4"]." Nolu Sipariş', now())");
			if($_POST["Nakit"]<>""){
				$sql = $conn->query("insert into t4(t1,t2,ne,t4,t6,pb1,pb2,pb3,pb4,s1,s2,s3,s4,s5,n1,ts1) values ('Nakit', 'storesales', 'cari', '".date("Y-m-d")."', 'TRY', '0', '0', '".sprice($_POST["gtoplam"])."', '0', '".$_SESSION["UyeID"]."', '".Date("d")."', '".Date("m")."', '".Date("Y")."', '".$rss["id"]."', '".$rss["t4"]." Nolu Sipariş', now())");
			} if($_POST["Banka"]<>""){
				$sql = $conn->query("insert into t4(t1,t2,ne,t4,t6,pb1,pb2,pb3,pb4,s1,s2,s3,s4,s5,n1,ts1) values ('Banka', 'storesales', 'cari', '".date("Y-m-d")."', 'TRY', '0', '0', '".sprice($_POST["gtoplam"])."', '0', '".$_SESSION["UyeID"]."', '".Date("d")."', '".Date("m")."', '".Date("Y")."', '".$rss["id"]."', '".$rss["t4"]." Nolu Sipariş', now())");
			} if($_POST["Pos"]<>""){
				$sql = $conn->query("insert into t4(t1,t2,ne,t4,t6,pb1,pb2,pb3,pb4,s1,s2,s3,s4,s5,n1,ts1) values ('Pos', 'storesales', 'cari', '".date("Y-m-d")."', 'TRY', '0', '0', '".sprice($_POST["gtoplam"])."', '0', '".$_SESSION["UyeID"]"', '".Date("d")."', '".Date("m")."', '".Date("Y")."', '".$rss["id"]."', '".$rss["t4"]." Nolu Sipariş', now())");
			} if($_POST["Çek"]<>""){
				$sql = $conn->query("insert into t4(t1,t2,ne,t4,t6,pb1,pb2,pb3,pb4,s1,s2,s3,s4,s5,n1,ts1) values ('Çek', 'storesales', 'cari', '".date("Y-m-d")."', 'TRY', '0', '0', '".sprice($_POST["gtoplam"])."', '0', '".$_SESSION["UyeID"]."', '".Date("d")."', '".Date("m")."', '".Date("Y")."', '".$rss["id"]."', '".$rss["t4"]." Nolu Sipariş', now())");
			}
		}
*/
	//-- Cari -->
		$mesaj	= "
		<h3>".translate("Sipariş Onay")."</h3>
		<b>".$rsi["t4"]."</b> ".translate("siparis_monay")."
		";
		$mesaj = "".$mesaj."<b>".$rsi["t4"]."</b> ".translate("siparis_monay")."";
		$mesaj	= $design_top.$mesaj.$design_bottom;
		$konu=translate("Sipariş Onay");
		$path="../../../";
		emailgonder(v3d($customer["t2"]), $konu, '', $mesaj);
		
		$_SESSION["StoresaleID"]="";                //Sepet Numarası
		$_SESSION["UyeID"]="";
		$_SESSION["StoreCustomerID"]="";
		echo "url:?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&step=3&barcode=".$_GET["barcode"]."";
	}
	
}elseif($_GET["islem"]=="siparisler" or $_GET["islem"]=="siparis"){
	if($_GET["durum"]=="onay"){
		include("ecommerce_order_operation.php");
		$Rs = mysqli_query($conn, "update eticaret set s4='".$_GET["s4"]."', ts2=now() where ne='siparis' and id=".$_GET["id"]."");
		include("../../../sale/crm_extra.php");
		if($_GET["q"]==""){
			//echo "Güncellendi";
		}else{
			echo "url:?q=".$_GET["q"]."&durum=ok";
		}
		
	}elseif($_GET["durum"]=="sil"){
		$sql = mysqli_query($conn, "delete from eticaret where (ne='siparis' or ne='storesales') and id=".$_GET["id"]."");
		$sql = mysqli_query($conn, "delete from eticaret where ne='sepet' and s5=".$_GET["id"]."");
		$sql = mysqli_query($conn, "delete from t4 where ne='cari' and s5=".$_GET["id"]."");
		//echo "url:?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&s4=".$_GET["s4"]."&durum=ok";
	}elseif($_GET["durum"]=="remove_item"){
		$sql = mysqli_query($conn, "delete from eticaret where id=".$_GET["bid"]."");
	}elseif($_GET["durum"]=="update_basket"){
		$sql = mysqli_query($conn, "update eticaret set pb1='".sprice($_POST["price"])."', s2='".sprice($_POST["qty"])."', s4='".sprice($_POST["tax"])."' where id=".$_GET["bid"]."");
		echo "url:?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&s4=".$_GET["s4"]."&id=".$_GET["id"]."&durum=ok";
	}elseif($_GET["durum"]=="teklif"){
		echo "url:?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&durum=ok";
	}
}elseif($_GET["islem"]=="adisyonlar"){
	if($_GET["durum"]=="sil"){
			$sql = mysqli_query($conn, "delete from eticaret where ne='adisyon' and id=".$_GET["id"]."");
			$sql = mysqli_query($conn, "delete from eticaret where ne='item' and s5=".$_GET["id"]."");
			$sql = mysqli_query($conn, "delete from t4 where ne='cari' and s5=".$_GET["id"]."");
			//echo "url:?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&s4=".$_GET["s4"]."&durum=ok";
	}
}
include("../public/log.php");
?>