5tarl0rd

Current Path : /home/tiporg/www/manage/js/tiny_mce/themes/advanced/
Upload File :
Current File : /home/tiporg/www/manage/js/tiny_mce/themes/advanced/uploadimage.php

<?php

	$imagename="file";

	if(isset($HTTP_POST_VARS["imgnum"]))

	{

		$ftmp = $_FILES['image']['tmp_name'];

		$show_name = $_FILES['image']['name'];

		$storename = str_replace(" ","_",$show_name);

		$fname ='images/'.$storename;

		if(move_uploaded_file($ftmp, $fname))

		{

			//$fname = "http://192.168.0.91/haroon/norwest/".$fname;	

			$fname = "http://localhost/MyTasks/MCE_Editor/tiny_mce/plugins/advimage/".$fname;	

		}

	

	}



?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<script language="javascript">

function changeon()

{

	document.iform.submit();

}

</script>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Untitled Document</title>

</head>



<body>

<form id="iform" name="iform" method="post" action="" enctype="multipart/form-data">

<input id="file" type="file" name="image" onchange="javascript:document.iform.submit();" />

 <input type="hidden" name="imgnum" id="imgnum" value="abc" />



</form>



</body>

<script>

//alert("hammad");



var id = window.opener.document.forms[0].src.value="<?php echo $fname; ?>";

if(window.opener.document.forms[0].src.value.length > 0)

{

window.close();

}



</script>

</html>


5tarL0rd By 5tarl0rd Being Anonymous