本文整理汇总了PHP中Handler::uploaded方法的典型用法代码示例。如果您正苦于以下问题:PHP Handler::uploaded方法的具体用法?PHP Handler::uploaded怎么用?PHP Handler::uploaded使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Handler
的用法示例。
在下文中一共展示了Handler::uploaded方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: proccess_request
/**
* proccess_request
* Process the request for the public area
*/
private function proccess_request()
{
global $lang;
$this->template = 404;
// Default template
$this->pages = $this->get_pages();
// get theme pages
// Prepare te request array to use the legacy request (?v=file.ext)
if (check_value($_GET['v']) && preg_match("/^\\w*\\.jpg|png|gif\$/", $_GET['v'])) {
$this->base_request = '?' . $this->request_array[1];
unset($this->request_array[1]);
}
@session_start();
if (count($_SESSION['ImagesUp']) > 0) {
$_SESSION['ImagesUp'] = array_values($_SESSION['ImagesUp']);
self::$uploaded = true;
}
if (chevereto_config('maintenance')) {
$this->base_request = 'maintenance';
}
// Switch according the request
switch ($this->base_request) {
case '':
case 'index.php':
@session_start();
$_SESSION['last_upload_request'] = time();
$this->template = 'index';
break;
case 'json':
json_prepare();
// Do a special trick for the json action=login
if ($_REQUEST['action'] == 'login') {
// Check for user match...
$login_user = login_user($_REQUEST['password'], $_REQUEST['keep']);
if ($login_user !== false) {
$json_array = array('status_code' => 200, 'status_txt' => 'logged in');
} else {
$json_array = array('status_code' => 403, 'status_txt' => 'invalid login');
}
} elseif ($_REQUEST['action'] == 'logout') {
do_logout();
$json_array = array('status_code' => 200, 'status_txt' => 'logged out');
}
$json_array = check_value($json_array) ? $json_array : array('status' => 403, 'status_txt' => 'unauthorized');
session_write_close();
die(json_output($json_array));
break;
case __CHV_VIRTUALFOLDER_IMAGE__:
// View request
$id_public = $this->request_array[1];
$this->template = !is_upload_result() ? 'view' : 'uploaded';
self::$is_viewer = true;
break;
case __CHV_VIRTUALFOLDER_UPLOADED__:
@session_start();
if (count($_SESSION['ImagesUp']) > 0) {
$this->template = 'uploaded';
self::$doctitle = $lang['doctitle_upload_complete'];
} else {
$this->redirect(__CHV_BASE_URL__, 400);
}
break;
case 'error-javascript':
chevereto_die(array(get_lang_txt('critical_js_step_1'), get_lang_txt('critical_js_step_2')), 'JavaScript', array(get_lang_txt('critical_js')));
break;
case '?chevereto':
$this->template = 'bool';
break;
// Legacy viewer
// Legacy viewer
case '?v=' . $_GET['v']:
// View request
$id_public = $_GET['v'];
$this->legacy_redirect = true;
break;
case 'delete':
case 'delete-confirm':
//$delete_what = $this->request_array[1];
$id_public = $this->request_array[2];
$deleteHash = $this->request_array[3];
$this->template = $this->base_request;
self::$is_viewer = true;
break;
case 'maintenance':
$this->template = 'maintenance';
self::$doctitle = chevereto_config('doctitle');
break;
default:
// Pages request
require_once $this->path_theme . 'pages/pages_config.php';
// We load the special pages config
if (in_array($this->base_request . '.php', $this->pages) and $this->request_array[1] == '' and $pages_config[$this->base_request]['live']) {
$this->template = 'pages/' . $this->base_request;
self::$doctitle = $pages_config[$this->base_request]['title'];
} else {
$this->template = 'shorturl';
//.........这里部分代码省略.........