<?php
$path="../../";
include("../../map.php");
include("../../scripts.php");
include("../../secure.php");
include("../../../../../deppo/v3/script/SimpleImage.php");
if($_GET["ne"]=="sayfa" or $_GET["ne"]=="haber" or $_GET["ne"]=="msayfa"){
	$sql=mysqli_query($conn, "select * from ".$_SESSION['lang']." where id=".$_GET["id"].""); $rs=mysqli_fetch_assoc($sql);
	$isim=cevir(substr($rs["t1"],0,15));}else{$isim=$_GET["ne"];}
	?><head>
		<meta http-equiv="Content-Language" content="tr">
	</head>
	<script language="javascript">
		function check()
		{if(document.frm.resim.value=="")
		{alert("Lütfen Resim Seçin")
		return false}
		if((document.frm.resim.value.lastIndexOf(".jpg")==-1) && (document.frm.resim.value.lastIndexOf(".JPG")==-1) && (document.frm.resim.value.lastIndexOf(".gif")==-1) && (document.frm.resim.value.lastIndexOf(".GIF")==-1) && (document.frm.resim.value.lastIndexOf(".png")==-1) && (document.frm.resim.value.lastIndexOf(".PNG")==-1) && (document.frm.resim.value.lastIndexOf(".jpeg")==-1) && (document.frm.resim.value.lastIndexOf(".JPEG")==-1))
			{alert("Sadece Gif ve Jpg türü dosyalar")
		return false}
		return true}
	</script>
	<form method="POST" id="reform" name="frm" enctype="multipart/form-data" action="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&x=yukle&id=<?php echo $_GET["id"];?>" onSubmit="return check(this)">
		<div class="panel panel-default">
			<div class="panel-heading"><?php echo $sdil[89]; //Resim Upload?></div>
			<div class="panel-body">
				<?php for ($i = 1; $i <= 1; $i++) {?>
					<div id="i<?php echo $i?>" style="min-height:25px; <?php if($i<>1){?>display:none;<?php }?> padding:5px; position:relative;">
						<input id="r<?php echo $i-1?>" type="file" name="resim<?php echo $i?>" accept="*" onchange="document.frm.durum<?php echo $i?>.checked=true;<?php if($b3==1){?>show('i<?php echo $i+1?>');<?php }?>"  style="float:left;"/>
						<div style="float:right;">
							<input type="checkbox" name="durum<?php echo $i?>" value="ON" style="float:left; display:none;" title="Resim Var/Yok">
							<?php if($a5<>0){?>
								<input type="checkbox" name="boyut<?php echo $i?>" value="ON" style="float:left; margin-left:5px;" title="Boyutlandır" checked id="boyut<?php echo $i?>" class="mini-switch">
								<label for="boyut<?php echo $i?>"></label>
							<?php }?>
							<img src="../../assets/images/icons/web-app/32/Modify.png" style="float:left; margin-left:5px; cursor:pointer; height:22px;"  id="ib<?php echo $i?>" title="Açıklama" class="with-tip">
						</div>
						<div id="ia<?php echo $i?>" style="display:none; margin-top:25px; position:relative;">
							<input type="text" id="t<?php echo $i?>" name="i<?php echo $i?>"  placeholder="<?php echo $sdil[206]; //Başlık?>">
							<textarea name="ia<?php echo $i?>" id="n<?php echo $i?>" style="margin-top:5px;"  placeholder="<?php echo $sdil[207]; //Açıklama?>"></textarea>
						</div>
					</div>
				<?php }?>			
			</div>
			<div class="panel-heading"><?php echo $sdil[203]; //Kaydet?></div>
			<div class="panel-body">
				
				<select class="form-control" size="1" name="s5">
					<option value="0">Varyasyon</option>
					<?php
					$sql=mysqli_query($conn, "select * from varyasyon where s1='".$_GET["id"]."'");
					while($rsc=mysqli_fetch_assoc($sql)){
						?>
						<option value="<?php echo $rsc["id"];?>" style="color:#6699FF"><?php echo $rsc["t1"];?></option>
					<?php }?>
				</select>
				<button type="submit" style="float:right; margin-right:10px; margin-top:10px;" id="btn" class="btn btn-primary demo" onclick="show('loading');hide('btn');"><?php echo $sdil[203]; //Kaydet?></button>
				<button type="submit" style="float:right; margin-right:10px; margin-top:10px; display:none;" class="btn btn-primary" id="loading" disabled><img src="../../assets/images/loading.gif"> Yükleniyor</button>
			</div>
		</div>
	</form>
	<?php
	if ($_GET["x"]=="yukle"){
		if(!empty($_GET["id"])){$ID=$_GET["id"];}else{$ID="0";}
		$kaydedilecekyer = "../../../../../deppo/image";
		if ($_POST["durum1"]<>""){
			$sqlk=mysqli_query($conn, "select * from medya where ne='resim' and t3='".$_GET['ne']."' and s1='".$_GET['id']."'"); $rski=mysqli_fetch_assoc($sqlk);
			if(mysqli_num_rows($sqlk)>0){$ks2="0";}else{$ks2="1";}
$kaynak1= $_FILES['resim1']['tmp_name'];	//Burası resminiz kök klasörünün yerini verir  
$tipi1	= $_FILES['resim1']['type']; // Dosyanın Tipi
$adi1	= $_FILES["resim1"]["name"]; // Dosyanın PCdeki Adı
$uzanti1 = explode('.',$_FILES['resim1']['name']);
$rand1  = substr(md5(uniqid(rand())),0,10); 
$yeni1  = "".$i1isim."-".$rand1.".".$uzanti1[count($uzanti1)-1]."";
move_uploaded_file ($_FILES['resim1']['tmp_name'], $kaydedilecekyer . "/".$yeni1);
$conn->query("insert INTO medya (ne,s1,s2,s3,s5,t1,t3,t2,n3) VALUES ('resim','".$ID."', '".$ks2."', '0', '".$_POST['s5']."', '".addslashes($yeni1)."', '".$_GET['ne']."', '".$_POST['i1']."', '".$_POST['ia1']."')");
//-------------------------------------------------------------
if ($_POST["boyut1"]<>""){
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni1."");
	$image->resizeToWidth("".$a9."");
	$image->save("../../../deppo/image/".$yeni1."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni1."");
}else{
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni1."");
	$image->save("../../../deppo/image/".$yeni1."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni1."");
}
//-------------------------------------------------------------
}
if ($_POST["durum2"]<>""){
	$sqlk=mysqli_query($conn, "select * from medya where ne='resim' and t3='".$_GET['ne']."' and s1='".$_GET['id']."'"); $rski=mysqli_fetch_assoc($sqlk);
	if(mysqli_num_rows($sqlk)>0){$ks2="0";}else{$ks2="1";}
$kaynak2= $_FILES['resim2']['tmp_name'];	//Burası resminiz kök klasörünün yerini verir  
$tipi2	= $_FILES['resim2']['type']; // Dosyanın Tipi
$adi2	= $_FILES["resim2"]["name"]; // Dosyanın PCdeki Adı
$uzanti2= explode('.',$_FILES['resim2']['name']);
$rand2  = substr(md5(uniqid(rand())),0,10); 
$yeni2  = "".$i2isim."-".$rand2.".".$uzanti2[count($uzanti2)-1]."";
move_uploaded_file ($_FILES['resim2']['tmp_name'], $kaydedilecekyer . "/".$yeni2);
$conn->query("insert INTO medya (ne,s1,s2,s3,s4,t1,t3,t2,n3) VALUES ('resim','".$ID."', '".$ks2."', '0', '".$_POST['s4']."', '".addslashes($yeni2)."', '".$_GET['ne']."', '".$_POST['i2']."', '".$_POST['ia2']."')");
//-------------------------------------------------------------
if ($_POST["boyut2"]<>""){
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni2."");
	$image->resizeToWidth("".$a9."");
	$image->save("../../../deppo/image/".$yeni2."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni2."");
}else{
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni2."");
	$image->save("../../../deppo/image/".$yeni2."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni2."");
}
//-------------------------------------------------------------
}
if ($_POST["durum3"]<>""){
	$sqlk=mysqli_query($conn, "select * from medya where ne='resim' and t3='".$_GET['ne']."' and s1='".$_GET['id']."'"); $rski=mysqli_fetch_assoc($sqlk);
	if(mysqli_num_rows($sqlk)>0){$ks2="0";}else{$ks2="1";}
$kaynak3= $_FILES['resim3']['tmp_name'];	//Burası resminiz kök klasörünün yerini verir  
$tipi3	= $_FILES['resim3']['type']; // Dosyanın Tipi
$adi3	= $_FILES["resim3"]["name"]; // Dosyanın PCdeki Adı
$uzanti3= substr($adi3,-4); // Dosya Uzantısı
$rand3  = substr(md5(uniqid(rand())),0,10); 
$yeni3  = "".$isim."-".$rand3.$uzanti3."";
move_uploaded_file ($_FILES['resim3']['tmp_name'], $kaydedilecekyer . "/".$yeni3);
$conn->query("insert INTO medya (ne,s1,s2,s3,s4,t1,t3,t2,n3) VALUES ('resim','".$ID."', '".$ks2."', '0', '".$_POST['s4']."', '".addslashes($yeni3)."', '".$_GET['ne']."', '".$_POST['i3']."', '".$_POST['ia3']."')");
//-------------------------------------------------------------
if ($_POST["boyut3"]<>""){
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni3."");
	$image->resizeToWidth("".$a9."");
	$image->save("../../../deppo/image/".$yeni3."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni3."");
}else{
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni3."");
	$image->save("../../../deppo/image/".$yeni3."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni3."");
}
//-------------------------------------------------------------
}
if ($_POST["durum4"]<>""){
	$sqlk=mysqli_query($conn, "select * from medya where ne='resim' and t3='".$_GET['ne']."' and s1='".$_GET['id']."'"); $rski=mysqli_fetch_assoc($sqlk);
	if(mysqli_num_rows($sqlk)>0){$ks2="0";}else{$ks2="1";}
$kaynak4= $_FILES['resim4']['tmp_name'];	//Burası resminiz kök klasörünün yerini verir  
$tipi4	= $_FILES['resim4']['type']; // Dosyanın Tipi
$adi4	= $_FILES["resim4"]["name"]; // Dosyanın PCdeki Adı
$uzanti4= explode('.',$_FILES['resim4']['name']);
$rand4  = substr(md5(uniqid(rand())),0,10); 
$yeni4  = "".$i4isim."-".$rand4.".".$uzanti4[count($uzanti4)-1]."";
move_uploaded_file ($_FILES['resim4']['tmp_name'], $kaydedilecekyer . "/".$yeni4);
$conn->query("insert INTO medya (ne,s1,s2,s3,s4,t1,t3,t2,n3) VALUES ('resim','".$ID."', '".$ks2."', '0', '".$_POST['s4']."', '".addslashes($yeni4)."', '".$_GET['ne']."', '".$_POST['i4']."', '".$_POST['ia4']."')");
//-------------------------------------------------------------
if ($_POST["boyut4"]<>""){
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni4."");
	$image->resizeToWidth("".$a9."");
	$image->save("../../../deppo/image/".$yeni4."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni4."");
}else{
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni4."");
	$image->save("../../../deppo/image/".$yeni4."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni4."");
}
//-------------------------------------------------------------
}
if ($_POST["durum5"]<>""){
	$sqlk=mysqli_query($conn, "select * from medya where ne='resim' and t3='".$_GET['ne']."' and s1='".$_GET['id']."'"); $rski=mysqli_fetch_assoc($sqlk);
	if(mysqli_num_rows($sqlk)>0){$ks2="0";}else{$ks2="1";}
$kaynak5= $_FILES['resim5']['tmp_name'];	//Burası resminiz kök klasörünün yerini verir  
$tipi5	= $_FILES['resim5']['type']; // Dosyanın Tipi
$adi5	= $_FILES["resim5"]["name"]; // Dosyanın PCdeki Adı
$uzanti5= explode('.',$_FILES['resim5']['name']);
$rand5  = substr(md5(uniqid(rand())),0,10); 
$yeni5  = "".$i5isim."-".$rand5.".".$uzanti5[count($uzanti5)-1]."";
move_uploaded_file ($_FILES['resim5']['tmp_name'], $kaydedilecekyer . "/".$yeni5);
$conn->query("insert INTO medya (ne,s1,s2,s3,s4,t1,t3,t2,n3) VALUES ('resim','".$ID."', '".$ks2."', '0', '".$_POST['s4']."', '".addslashes($yeni5)."', '".$_GET['ne']."', '".$_POST['i5']."', '".$_POST['ia5']."')");
//-------------------------------------------------------------
if ($_POST["boyut5"]<>""){
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni5."");
	$image->resizeToWidth("".$a9."");
	$image->save("../../../deppo/image/".$yeni5."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni5."");
}else{
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni5."");
	$image->save("../../../deppo/image/".$yeni5."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni5."");
}
//-------------------------------------------------------------
}
if ($_POST["durum6"]<>""){
	$sqlk=mysqli_query($conn, "select * from medya where ne='resim' and t3='".$_GET['ne']."' and s1='".$_GET['id']."'"); $rski=mysqli_fetch_assoc($sqlk);
	if(mysqli_num_rows($sqlk)>0){$ks2="0";}else{$ks2="1";}
$kaynak6= $_FILES['resim6']['tmp_name'];	//Burası resminiz kök klasörünün yerini verir  
$tipi6	= $_FILES['resim6']['type']; // Dosyanın Tipi
$adi6	= $_FILES["resim6"]["name"]; // Dosyanın PCdeki Adı
$uzanti6= explode('.',$_FILES['resim6']['name']);
$rand6  = substr(md5(uniqid(rand())),0,10); 
$yeni6  = "".$i6isim."-".$rand6.".".$uzanti6[count($uzanti6)-1]."";
move_uploaded_file ($_FILES['resim6']['tmp_name'], $kaydedilecekyer . "/".$yeni6);
$conn->query("insert INTO medya (ne,s1,s2,s3,s4,t1,t3,t2,n3) VALUES ('resim','".$ID."', '".$ks2."', '0', '".$_POST['s4']."', '".addslashes($yeni6)."', '".$_GET['ne']."', '".$_POST['i6']."', '".$_POST['ia6']."')");
//-------------------------------------------------------------
if ($_POST["boyut6"]<>""){
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni6."");
	$image->resizeToWidth("".$a9."");
	$image->save("../../../deppo/image/".$yeni6."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni6."");
}else{
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni6."");
	$image->save("../../../deppo/image/".$yeni6."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni6."");
}
//-------------------------------------------------------------
}
if ($_POST["durum7"]<>""){
	$sqlk=mysqli_query($conn, "select * from medya where ne='resim' and t3='".$_GET['ne']."' and s1='".$_GET['id']."'"); $rski=mysqli_fetch_assoc($sqlk);
	if(mysqli_num_rows($sqlk)>0){$ks2="0";}else{$ks2="1";}
$kaynak7= $_FILES['resim7']['tmp_name'];	//Burası resminiz kök klasörünün yerini verir  
$tipi7	= $_FILES['resim7']['type']; // Dosyanın Tipi
$adi7	= $_FILES["resim7"]["name"]; // Dosyanın PCdeki Adı
$uzanti7= explode('.',$_FILES['resim7']['name']);
$rand7  = substr(md5(uniqid(rand())),0,10); 
$yeni7  = "".$i7isim."-".$rand7.".".$uzanti7[count($uzanti7)-1]."";
move_uploaded_file ($_FILES['resim7']['tmp_name'], $kaydedilecekyer . "/".$yeni7);
$conn->query("insert INTO medya (ne,s1,s2,s3,s4,t1,t3,t2,n3) VALUES ('resim','".$ID."', '".$ks2."', '0', '".$_POST['s4']."', '".addslashes($yeni7)."', '".$_GET['ne']."', '".$_POST['i7']."', '".$_POST['ia7']."')");
//-------------------------------------------------------------
if ($_POST["boyut7"]<>""){
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni7."");
	$image->resizeToWidth("".$a9."");
	$image->save("../../../deppo/image/".$yeni7."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni7."");
}else{
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni7."");
	$image->save("../../../deppo/image/".$yeni7."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni7."");
}
//-------------------------------------------------------------
}
if ($_POST["durum8"]<>""){
	$sqlk=mysqli_query($conn, "select * from medya where ne='resim' and t3='".$_GET['ne']."' and s1='".$_GET['id']."'"); $rski=mysqli_fetch_assoc($sqlk);
	if(mysqli_num_rows($sqlk)>0){$ks2="0";}else{$ks2="1";}
$kaynak8= $_FILES['resim8']['tmp_name'];	//Burası resminiz kök klasörünün yerini verir  
$tipi8	= $_FILES['resim8']['type']; // Dosyanın Tipi
$adi8	= $_FILES["resim8"]["name"]; // Dosyanın PCdeki Adı
$uzanti8= explode('.',$_FILES['resim8']['name']);
$rand8  = substr(md5(uniqid(rand())),0,10); 
$yeni8  = "".$i8isim."-".$rand8.".".$uzanti8[count($uzanti8)-1]."";
move_uploaded_file ($_FILES['resim8']['tmp_name'], $kaydedilecekyer . "/".$yeni8);
$conn->query("insert INTO medya (ne,s1,s2,s3,s4,t1,t3,t2,n3) VALUES ('resim','".$ID."', '".$ks2."', '0', '".$_POST['s4']."', '".addslashes($yeni8)."', '".$_GET['ne']."', '".$_POST['i8']."', '".$_POST['ia8']."')");
//-------------------------------------------------------------
if ($_POST["boyut8"]<>""){
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni8."");
	$image->resizeToWidth("".$a9."");
	$image->save("../../../deppo/image/".$yeni8."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni8."");
}else{
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni8."");
	$image->save("../../../deppo/image/".$yeni8."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni8."");
}
//-------------------------------------------------------------
}
if ($_POST["durum9"]<>""){
	$sqlk=mysqli_query($conn, "select * from medya where ne='resim' and t3='".$_GET['ne']."' and s1='".$_GET['id']."'"); $rski=mysqli_fetch_assoc($sqlk);
	if(mysqli_num_rows($sqlk)>0){$ks2="0";}else{$ks2="1";}
$kaynak9= $_FILES['resim9']['tmp_name'];	//Burası resminiz kök klasörünün yerini verir  
$tipi9	= $_FILES['resim9']['type']; // Dosyanın Tipi
$adi9	= $_FILES["resim9"]["name"]; // Dosyanın PCdeki Adı
$uzanti9= explode('.',$_FILES['resim9']['name']);
$rand9  = substr(md5(uniqid(rand())),0,10); 
$yeni9  = "".$i9isim."-".$rand9.".".$uzanti9[count($uzanti9)-1]."";
move_uploaded_file ($_FILES['resim9']['tmp_name'], $kaydedilecekyer . "/".$yeni9);
$conn->query("insert INTO medya (ne,s1,s2,s3,s4,t1,t3,t2,n3) VALUES ('resim','".$ID."', '".$ks2."', '0', '".$_POST['s4']."', '".addslashes($yeni9)."', '".$_GET['ne']."', '".$_POST['i9']."', '".$_POST['ia9']."')");
//-------------------------------------------------------------
if ($_POST["boyut9"]<>""){
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni9."");
	$image->resizeToWidth("".$a9."");
	$image->save("../../../deppo/image/".$yeni9."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni9."");
}else{
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni9."");
	$image->save("../../../deppo/image/".$yeni9."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni9."");
}
//-------------------------------------------------------------
}
if ($_POST["durum10"]<>""){
	$sqlk=mysqli_query($conn, "select * from medya where ne='resim' and t3='".$_GET['ne']."' and s1='".$_GET['id']."'"); $rski=mysqli_fetch_assoc($sqlk);
	if(mysqli_num_rows($sqlk)>0){$ks2="0";}else{$ks2="1";}
$kaynak10= $_FILES['resim10']['tmp_name'];	//Burası resminiz kök klasörünün yerini verir
$tipi10	 = $_FILES['resim10']['type']; // Dosyanın Tipi
$adi10	 = $_FILES["resim10"]["name"]; // Dosyanın PCdeki Adı
$uzanti10= explode('.',$_FILES['resim10']['name']);
$rand10  = substr(md5(uniqid(rand())),0,10); 
$yeni10  = "".$i10isim."-".$rand10.".".$uzanti10[count($uzanti10)-1]."";
move_uploaded_file ($_FILES['resim10']['tmp_name'], $kaydedilecekyer . "/".$yeni10);
$conn->query("insert INTO medya (ne,s1,s2,s3,s4,t1,t3,t2,n3) VALUES ('resim','".$ID."', '".$ks2."', '0', '".$_POST['s4']."', '".addslashes($yeni10)."', '".$_GET['ne']."', '".$_POST['i10']."', '".$_POST['ia10']."')");
//-------------------------------------------------------------
if ($_POST["boyut10"]<>""){
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni10."");
	$image->resizeToWidth("".$a9."");
	$image->save("../../../deppo/image/".$yeni10."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni10."");
}else{
	$image = new SimpleImage();
	$image->load("../../../deppo/image/".$yeni10."");
	$image->save("../../../deppo/image/".$yeni10."");
	$image->resizeToWidth("".$a10."");
	$image->save("../../../deppo/image/k_".$yeni10."");
}
if ($e1==1){
	$damga = imagecreatefrompng("../../../deppo/image/".$t50."");
	$foto = imagecreatefromjpeg("../../../deppo/image/".$yeni10."");
	$msag = 10;
	$malt = 10;
	$sx = imagesx($damga);
	$sy = imagesy($damga);
	imagecopy($foto, $damga, imagesx($foto) - $sx - $msag, imagesy($foto) - $sy - $malt, 0, 0, imagesx($damga), imagesy($damga));
	header("Content-type: image/png");
	imagepng($foto);
	imagedestroy($foto);
}
//-------------------------------------------------------------
}
echo location("".$weburl."/".$crmpath."/?ne=".$_GET["ne"]."&islem=".$_GET["islem"]."&id=".$_GET["id"]."&durum=ok2",top,500,1);
}?> 
<script type="text/javascript">
	var jQuery = jQuery.noConflict();
	jQuery(document).ready(function(){
		jQuery('#ib1').click(function(){
			jQuery("#ia1").slideToggle();});
		jQuery('#ib2').click(function(){
			jQuery("#ia2").slideToggle();});
		jQuery('#ib3').click(function(){
			jQuery("#ia3").slideToggle();});
		jQuery('#ib4').click(function(){
			jQuery("#ia4").slideToggle();});
		jQuery('#ib5').click(function(){
			jQuery("#ia5").slideToggle();});
		jQuery('#ib6').click(function(){
			jQuery("#ia6").slideToggle();});
		jQuery('#ib7').click(function(){
			jQuery("#ia7").slideToggle();});
		jQuery('#ib8').click(function(){
			jQuery("#ia8").slideToggle();});
		jQuery('#ib9').click(function(){
			jQuery("#ia9").slideToggle();});
		jQuery('#ib10').click(function(){
			jQuery("#ia10").slideToggle();});
	});
</script>