Exemplo n.º 1
0
		foreach($_REQUEST['files'] as $k=>$v) $_SESSION[$_REQUEST['act']][]=clean($v);
		
		light_message('Files have been prepared for the requested operation. Now go to the folder you want and choose "paste" there to paste the selected files.');
	
		break;
	case 'cancel':
		$nomain=false;
		
		$_SESSION['copy']=$_SESSION['cut']=array();
		
		light_message('Operation has been cancelled.');
		break;
	case 'paste':
		$nomain=false;
		
		paste('light_message');
		break;
	case 'advanced_paste':
		$bytes=0;
		$res = advanced_paste($_SESSION['DIR'], 'copy', $_SESSION['copy'], $bytes);
	
		$sz = show_size(false,true,@$_SESSION['adv_bytes']+=$bytes);
		
		if($res==FINISHED_COPY || empty($_SESSION['copy']))
		{
			$_SESSION['copy']=false;
			$_SESSION['adv_bytes']=0;
			$_SESSION['copy_cache']=null;
			
			$nomain=false;
			light_message('Files were successfully copied ('.$sz.' total).');
Exemplo n.º 2
0
		light_message('::Please choose one or more files you want to '.$_REQUEST['act'].'.::');
		break;
	}*/
	
	$_SESSION['copy']=$_SESSION['cut']=array();
	foreach($_REQUEST['files'] as $k=>$v) $_SESSION[$_REQUEST['act']][]=clean($v);
	
	$_RESULT = sizeof($_REQUEST['files'])>0 ? true : false;
	break;
case 'paste':
	if(!empty($_SESSION['cut']))
	{
		@set_time_limit(0);
		function full_print($param){ echo $param; }
		
		$_RESULT = paste('full_print');	
	}else
	{
		if(empty($_SESSION['CPCACHE'])) /* CoPy Cache */
		{
			$_SESSION['TOTAL_BYTES'] = $_SESSION['DIRS'] = $_SESSION['FILES'] = 0;
			
			$src = abs_path(dirname($_SESSION['copy'][0]),false).'/';
			$dest = abs_path($_SESSION['DIR'],false).'/';
			
			/*
			if($src!=$dest && substr($dest,0,strlen($src))==$src)
			{
				print('Cannot copy the directory inside itself.');
				$_RESULT = false;
				break;