<?php
require_once(dirname(__FILE__)."/../../inc/common.inc.php");	//ºËÐÄÎÄ¼þ

if($action=='copyimg'){
	$picurl=$_POST[picurl];
	$strcode = file_get_contents($picurl);
	$name = $lfjuid.'_'.rands(4).'_'.$timestamp.'.jpg';
	if(!is_dir(ROOT_PATH."$webdb[updir]/$updir")){
		makepath(ROOT_PATH."$webdb[updir]/$updir");
	}
	write_file(ROOT_PATH."$webdb[updir]/$updir/$name",$strcode);
	echo "<script>
				window.parent.upimg1(\"{$updir}/$name\");
		 </script>";
	exit;
}

require("upimg.htm");
?>