コード例 #1
0
ファイル: uploader_jQuery.php プロジェクト: rb26/zenphoto
function jQueryUploadHandler_admin_tabs($tabs)
{
    $me = sprintf(gettext('images (%s)'), 'jQuery');
    $mylink = 'admin-upload.php?page=upload&tab=jQuery&type=' . gettext('images');
    if (is_null($tabs['upload'])) {
        $tabs['upload'] = array('text' => gettext("upload"), 'link' => WEBPATH . "/" . ZENFOLDER . '/admin-upload.php', 'subtabs' => NULL);
    }
    $tabs['upload']['subtabs'][$me] = $mylink;
    if (zp_getcookie('uploadtype') == 'jQuery') {
        $tabs['upload']['link'] = $mylink;
    }
    return $tabs;
}
コード例 #2
0
ファイル: elFinder.php プロジェクト: rb26/zenphoto
function elFinder_admin_tabs($tabs)
{
    $me = sprintf(gettext('files (%s)'), 'elFinder');
    $mylink = PLUGIN_FOLDER . '/' . 'elFinder/filemanager.php?page=upload&tab=elFinder&type=' . gettext('files');
    if (is_null($tabs['upload'])) {
        $tabs['upload'] = array('text' => gettext("upload"), 'link' => WEBPATH . "/" . ZENFOLDER . '/admin-upload.php', 'subtabs' => NULL);
    }
    $tabs['upload']['subtabs'][$me] = $mylink;
    if (zp_getcookie('uploadtype') == 'elFinder') {
        $tabs['upload']['link'] = $mylink;
    }
    return $tabs;
}
コード例 #3
0
function httpUploadHandler_admin_tabs($tabs)
{
    if (zp_loggedin(UPLOAD_RIGHTS)) {
        $me = sprintf(gettext('images (%s)'), 'http');
        $mylink = 'admin-upload.php?page=upload&tab=http&type=' . gettext('images');
        if (is_null($tabs['upload'])) {
            $tabs['upload'] = array('text' => gettext("upload"), 'link' => WEBPATH . "/" . ZENFOLDER . '/admin-upload.php', 'subtabs' => NULL);
        }
        $tabs['upload']['subtabs'][$me] = $mylink;
        if (zp_getcookie('uploadtype') == 'http') {
            $tabs['upload']['link'] = WEBPATH . "/" . ZENFOLDER . '/' . $mylink;
        }
    }
    return $tabs;
}
コード例 #4
0
ファイル: admin-upload.php プロジェクト: ariep/ZenPhoto20-DEV
if (isset($_GET['page'])) {
    $page = sanitize($_GET['page']);
} else {
    $link = $zenphoto_tabs['upload']['link'];
    if (strpos($link, 'admin-upload.php') == false) {
        header('location: ' . $link);
        exitZP();
    }
    $page = "upload";
    $_GET['page'] = 'upload';
}
if (isset($_GET['type'])) {
    $uploadtype = sanitize($_GET['tab']);
    zp_setCookie('uploadtype', $uploadtype);
} else {
    $uploadtype = zp_getcookie('uploadtype');
    $_GET['tab'] = $uploadtype;
}
$handlers = array_keys($uploadHandlers = zp_apply_filter('upload_handlers', array()));
if (!zp_loggedin(UPLOAD_RIGHTS) || empty($handlers)) {
    //	redirect to the files page if present
    if (isset($zenphoto_tabs['upload']['subtabs'])) {
        header('location: ' . array_shift($zenphoto_tabs['upload']['subtabs']));
        exitZP();
    }
    $handlers = array();
}
if (count($handlers) > 0) {
    if (!isset($uploadHandlers[$uploadtype]) || !file_exists($uploadHandlers[$uploadtype] . '/upload_form.php')) {
        $uploadtype = array_shift($handlers);
    }
コード例 #5
0
function uploadLimiterHeaderMessage($default)
{
    if (zp_loggedin(MANAGE_ALL_ALBUM_RIGHTS)) {
        return $default;
    }
    $warn = "";
    $uploadtype = zp_getcookie('uploadtype');
    if ($uploadtype == "httpupload") {
        $warn = '<p style="color:red;">' . gettext('HTTP single file uploading is disabled because upload limitations are in effect. Please use the <a href="javascript:switchUploader(\'admin-upload.php?uploadtype=multifile\');" >multi file upload</a>') . '</p>';
    } else {
        $uploadlimit = getOption('imageuploadlimit');
        $warn = '<p style="color: green">' . sprintf(gettext("<strong>Note:</strong> You can upload a maximum of %s images to each album."), $uploadlimit) . '</p>';
    }
    return $warn;
}