<?php
$path="../../";
include("../../map.php");
include("../scripts.php");
include("../../secure.php");
if(empty($_GET["durum"])){
	?>
	<html>
	<title><?php echo $sdil[26]; //Reklam Ekle?></title>
	<body>
		<form class="block-content form" enctype="multipart/form-data" id="simple_form" method="post" action="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&id=<?php echo $_GET["id"]; ?>&durum=yukle" onSubmit="return check(this)">
			<div class="panel panel-default">
				
				<div class="panel-heading"><?php echo $sdil[26]; //Reklam Ekle?></div>
				<div class="panel-body">
					<input type="file" name="resim" class="full-width" accept="*" onChange="this.form.submit()">
					<button type="submit" class="demo" onClick="show('loading')" style="float:right; margin-right:10px;"><?php echo $sdil[26]; //Reklam Ekle?></button>
				</div>
			</div>
		</form>
	</body>
	</html>
	<img border="0" id="loading" src="../../assets/images/loading.gif" width="16" height="11" style="display:none; position:absolute; top:30px; right:40px;">
	<?php
}else{
	$kaydedilecekyer = "../../../deppo/rimage";
	$kaynak = $_FILES['resim']['tmp_name'];
	$isim   = $_FILES['resim']['name'];
	$rand   = substr(md5(uniqid(rand())),0,5);
	$yeni   = $rand.$_FILES['resim']['name'];
	move_uploaded_file ($_FILES['resim']['tmp_name'], $kaydedilecekyer . "/".$yeni);
	$rboyut = getimagesize("../deppo/rimage/".$yeni."")
	?>
	<script language="JavaScript">
		function don() {
			//opener.document.rform.t4.value="<?php echo $rboyut[0];?>";
			//opener.document.rform.t5.value="<?php echo $rboyut[1];?>";
			opener.document.rform.t6.value="<?php echo $yeni;?>";
			window.close();
		}
	</script>
	<body onLoad="don();" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
		<?php }?>