<?php
	if ( !defined('IN_MFA') )
		die("Hacking attempt");
	
	$user->DieNotValid();
	
	if(IsSet($_SESSION['tocopy']))
	{
		if($_SESSION['tocopy'] != '')
		{
			foreach($_SESSION['tocopy'] as $file_to_paste)
			{
				if(stristr($user->user_root_dir.$file_to_paste,SCRIPT_PATH))
					message_die("No access",$lang['not_this_dir']);
				
				$to_paste = new file($file_to_paste);
				$working_user = is_locked($to_paste->file_path);
				if($working_user == $user->user_name || $working_user === false)	
				{
					if(!$to_paste->copy($user->user_root_dir.$verzname))
						message_die("Error while pasting","I couldn`t paste this file. Maybe the original file has been deleted, or is broken", "Error");
				}
			}
		}
	}
	if(LOG_USED == 1) write_in_log("files pasted in'".ROOT_DIR."/".$_GET['dir']."'");	
	
	//bei reload KATASTROPHE verhindern
	unset($_SESSION['tocopy']);
	//message_die("Job successfully done","The job, requested by you was successfully done. You will be redirected in one second", "Message");
?>