Example #1
0
			$nomain=false;
			
			if(d_mkdir($f)) light_message(show_file($f).' has been created successfully.');
			else light_message('Directory could not be created.'.reason());
		}
		break;
	case 'zip':
		$nomain=false;
		
		if(empty($_REQUEST['files']))
		{
			light_message('Choose at least one file!');
			break;
		}
		
		if(add_to_zip($_REQUEST['files'])) light_message('Files have been zipped successfully.');
		else light_message('Cannot add files to zip.'.reason());
		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;
		}
Example #2
0
			$_SESSION['CHCACHE'] = false;
			$success = $_SESSION['CHCACHE'] !== false;
			unset($_SESSION['CHCACHE']);
			$end = true;
		}
		
		$_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']);