Ejemplo n.º 1
0
		break;
	case 'release':
		/* I repeat: this feature is only for developer. Do not even try to use it */
		include(ROOT.'/release.php');
		break;
	case 'extract_here':
	case 'extract':
		$nomain=false;
		
		if(empty($_REQUEST['files']))
		{
			light_message('Choose at least one file!');
			break;
		}
		
		if(unzip_files($_REQUEST['files'], $_REQUEST['act'])) light_message('All files have been extracted successfully.'.reason());
		else light_message('Could not extract files.'.reason());
	
		break;
	case 'chmod':
		if(!empty($_POST['files']) && empty($_POST['mod']))
		{
			$mod = get_rights(clean($_POST['files'][0]));
			
			function box($mask)
			{
				$mask = bindec(str_replace(' ', '',$mask));
				
				//echo $mask.' ';
				
				return '<input type="checkbox" name="mod_smart[]" value="'.$mask.'" '.(octdec($GLOBALS['mod']) & $mask ? 'checked' : '').'>';
Ejemplo n.º 2
0
		}
		
		$_RESULT = array(
		'dirs'   => $_SESSION['DIRS'],
		'files'  => $_SESSION['FILES'],
		'end'    => $end,
		'success' => $success,
		);
	}
	break;
case 'zip':
	$_RESULT = add_to_zip($fz);
	if(!$_RESULT) echo 'Could not add to zip.'.reason();
	break;
case 'unzip':
	$_RESULT = unzip_files(array($f), $_REQUEST['mode']);
	if(!$_RESULT) echo 'Could not extract files.'.reason();
	break;
case 'update':
	$_REQUEST['act'] = 'download-new'; /* for correct work of update_dolphin() */
	$_RESULT = update_dolphin(create_function('$cmd','return true;'))===true;
	break;
case 'ping':
	$_RESULT = 'pong';
	break;
case 'handletab':
	$cmd = ltrim($_REQUEST['cmd']);
	
	$parts = explode(' ', $cmd);
	
	if(sizeof($parts) <= 1) /* autocomplete command */