. * */ require_once('../inc/lib_base.php'); // sleep(5); //immitate slow internet. $fileName=$_FILES['file']['name']; $source=$_FILES['file']['tmp_name']; $target=$CONFIG_DATADIRECTORY.'/'.$_GET['dir'].'/'.$fileName; if(isset($_SESSION['username']) and $_SESSION['username'] and strpos($_GET['dir'],'..')===false){ if(move_uploaded_file($source,$target)){ echo 'true'; }else{ echo 'false'; } }else{ echo 'false'; } ?>