当前位置: 首页>>代码示例>>PHP>>正文


PHP currentRelativeURL函数代码示例

本文整理汇总了PHP中currentRelativeURL函数的典型用法代码示例。如果您正苦于以下问题:PHP currentRelativeURL函数的具体用法?PHP currentRelativeURL怎么用?PHP currentRelativeURL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了currentRelativeURL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: define

<?php

/**
 * Theme file editor
 *
 * @package admin
 * @author Ozh
 */
// force UTF-8 Ø
define('OFFSET_PATH', 1);
require_once dirname(dirname(dirname(__FILE__))) . '/admin-globals.php';
admin_securityChecks(THEMES_RIGHTS, currentRelativeURL());
if (!isset($_GET['theme'])) {
    header("Location: " . FULLWEBPATH . "/" . ZENFOLDER . "/admin-themes.php");
    exitZP();
}
$ok_extensions = array('css', 'php', 'js', 'txt', 'inc');
function isTextFile($file)
{
    global $ok_extensions;
    $ext = strtolower(getSuffix($file));
    return in_array($ext, $ok_extensions);
}
$messages = $file_to_edit = $file_content = null;
$what = 'edit';
$themes = $_zp_gallery->getThemes();
$theme = basename(sanitize($_GET['theme']));
$themedir = SERVERPATH . '/themes/' . internalToFilesystem($theme);
$themefiles = listDirectoryFiles($themedir);
$themefiles_to_ext = array();
if (themeIsEditable($theme)) {
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:themes-editor.php

示例2: define

<?php

define('OFFSET_PATH', 3);
require_once "../../admin-globals.php";
require_once SERVERPATH . '/' . ZENFOLDER . '/template-functions.php';
admin_securityChecks(ALBUM_RIGHTS, currentRelativeURL());
function unpublishSubalbums($album)
{
    global $_zp_gallery;
    $albums = $album->getAlbums();
    foreach ($albums as $albumname) {
        $subalbum = newAlbum($albumname);
        $subalbum->setShow(false);
        $subalbum->save();
        unpublishSubalbums($subalbum);
    }
}
$report = false;
$publish_albums_list = array();
$publish_images_list = array();
if (isset($_POST['set_defaults'])) {
    XSRFdefender('publishContent');
    $_zp_gallery->setAlbumPublish((int) isset($_POST['album_default']));
    $_zp_gallery->setImagePublish((int) isset($_POST['image_default']));
    $_zp_gallery->save();
    $report = 'defaults';
} else {
    if (isset($_POST['publish'])) {
        $action = sanitize($_POST['publish']);
        unset($_POST['publish']);
        XSRFdefender('publishContent');
开发者ID:rauldobrota,项目名称:zenphoto,代码行数:31,代码来源:publishContent.php

示例3: define

<?php

/**
 * Bulk enable/disable of plugins
 * @package core
 */
// force UTF-8 Ø
define('OFFSET_PATH', 3);
require_once dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME']))) . "/zp-core/admin-globals.php";
admin_securityChecks(ADMIN_RIGHTS, $return = currentRelativeURL());
XSRFdefender('pluginEnabler');
if (isset($_GET['pluginsRemember'])) {
    setOption('pluginEnabler_currentset', serialize(array_keys(getEnabledPlugins())));
    $report = gettext('Current enabled plugins remembered');
}
if (isset($_GET['pluginsEnable'])) {
    $paths = getPluginFiles('*.php');
    $pluginlist = array_keys($paths);
    switch ($setting = sanitize_numeric($_GET['pluginsEnable'])) {
        case 0:
            $report = gettext('Plugins disabled');
            break;
        case 1:
            $report = gettext('Zenphoto plugins enabled');
            break;
        case 2:
            $report = gettext('Remembered plugins enabled');
            $savedlist = getSerializedArray(getOption('pluginEnabler_currentset'));
            break;
        case 3:
            $report = gettext('All plugins enabled');
开发者ID:benuri,项目名称:DevTools,代码行数:31,代码来源:handler.php

示例4: array_shift

}
$from = NULL;
if (zp_loggedin() && !empty($zenphoto_tabs)) {
    if (!$_zp_current_admin_obj->getID() || empty($msg) && !zp_loggedin(OVERVIEW_RIGHTS)) {
        // admin access without overview rights, redirect to first tab
        $tab = array_shift($zenphoto_tabs);
        $link = $tab['link'];
        header('location:' . $link);
        exitZP();
    }
} else {
    if (isset($_GET['from'])) {
        $from = sanitize($_GET['from']);
        $from = urldecode($from);
    } else {
        $from = urldecode(currentRelativeURL());
    }
}
// Print our header
printAdminHeader('overview');
?>
<script type="text/javascript" src="<?php 
echo WEBPATH . '/' . ZENFOLDER;
?>
/js/jquery.masonry.min.js"></script>
<script type="text/javascript">
	// <!-- <![CDATA[
	$(function() {
		$('#overviewboxes').masonry({
			// options
			itemSelector: '.overview-utility',
开发者ID:biggtfish,项目名称:zenphoto,代码行数:31,代码来源:admin.php

示例5: define

 * zenpage admin-edit.php
 *
 * @author Malte Müller (acrylian)
 * @package plugins
 * @subpackage zenpage
 */
define("OFFSET_PATH", 4);
require_once dirname(dirname(dirname(__FILE__))) . '/admin-globals.php';
require_once "admin-functions.php";
require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/tag_suggest.php';
if (is_AdminEditPage('page')) {
    $rights = ZENPAGE_PAGES_RIGHTS;
} else {
    $rights = ZENPAGE_NEWS_RIGHTS;
}
admin_securityChecks($rights, currentRelativeURL());
updatePublished('news');
updatePublished('pages');
$saveitem = '';
$reports = array();
if (is_AdminEditPage('page')) {
    $_GET['tab'] = $tab = 'pages';
    $new = 'newPage';
    $update = 'updatePage';
} else {
    if (is_AdminEditPage('newsarticle')) {
        $_GET['tab'] = $tab = 'news';
        $new = 'newArticle';
        $update = 'updateArticle';
    } else {
        if (is_AdminEditPage('newscategory')) {
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:admin-edit.php

示例6: define

 *
 * Customize the stars by placing a modified copy of <var>jquery.rating.css</var> in your theme folder.
 *
 * <b>Legal note:</b> Use the <i>Disguise IP</i> option if your country considers IP tracking a privacy violation.
 *
 * @author Stephen Billard (sbillard)and Malte Müller (acrylian)
 * @package plugins
 * @subpackage theme
 */
if (!defined('OFFSET_PATH')) {
    define('OFFSET_PATH', 3);
    require_once dirname(dirname(__FILE__)) . '/functions.php';
    if (isset($_GET['action']) && $_GET['action'] == 'clear_rating') {
        if (!zp_loggedin(ADMIN_RIGHTS)) {
            // prevent nefarious access to this page.
            header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin.php?from=' . currentRelativeURL());
            exitZP();
        }
        require_once dirname(dirname(__FILE__)) . '/admin-functions.php';
        if (session_id() == '') {
            // force session cookie to be secure when in https
            if (secureServer()) {
                $CookieInfo = session_get_cookie_params();
                session_set_cookie_params($CookieInfo['lifetime'], $CookieInfo['path'], $CookieInfo['domain'], TRUE);
            }
            session_start();
        }
        XSRFdefender('clear_rating');
        query('UPDATE ' . prefix('images') . ' SET total_value=0, total_votes=0, rating=0, used_ips="" ');
        query('UPDATE ' . prefix('albums') . ' SET total_value=0, total_votes=0, rating=0, used_ips="" ');
        query('UPDATE ' . prefix('news') . ' SET total_value=0, total_votes=0, rating=0, used_ips="" ');
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:rating.php

示例7: define

<?php

/**
 */
define('OFFSET_PATH', 1);
require_once dirname(__FILE__) . '/admin-globals.php';
admin_securityChecks(FILES_RIGHTS, currentRelativeURL(__FILE__));
printAdminHeader('upload', 'files');
echo "\n</head>";
?>

<body>

<?php 
printLogoAndLinks();
?>
<div id="main">
	<?php 
printTabs();
?>
	<div id="content">
		<div id="container">
			<?php 
$subtab = printSubtabs();
?>
			<div class="tabbox">
				<?php 
zp_apply_filter('admin_note', 'upload', $subtab);
?>
				<h1><?php 
echo gettext('File Manager');
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:admin-filemanager.php

示例8: array_shift

    /** End Action Handling *************************************************************/
    /************************************************************************************/
}
if ($_zp_null_account || empty($msg) && zp_loggedin() && !zp_loggedin(OVERVIEW_RIGHTS)) {
    // admin access without overview rights, redirect to first tab
    $tab = array_shift($zenphoto_tabs);
    $link = $tab['link'];
    header('location:' . $link);
    exit;
}
if (!zp_loggedin()) {
    if (isset($_GET['from'])) {
        $from = sanitize($_GET['from']);
        $from = urldecode($from);
    } else {
        $from = urldecode(currentRelativeURL(__FILE__));
    }
}
// Print our header
printAdminHeader('overview');
echo "\n</head>";
if (!zp_loggedin()) {
    ?>
	<body style="background-image: none">
	<?php 
} else {
    ?>
	<body>
	<?php 
}
// If they are not logged in, display the login form and exit
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:admin.php

示例9: define

 * This plugin shows statistical graphs and info about your gallery\'s images and albums
 *
 * @package admin
 */
define('OFFSET_PATH', 3);
chdir(dirname(dirname(__FILE__)));
require_once dirname(dirname(__FILE__)) . '/admin-globals.php';
require_once dirname(dirname(__FILE__)) . '/' . PLUGIN_FOLDER . '/image_album_statistics.php';
if (getOption('zp_plugin_zenpage')) {
    require_once dirname(dirname(__FILE__)) . '/' . PLUGIN_FOLDER . '/zenpage/zenpage-admin-functions.php';
}
$button_text = gettext('Gallery Statistics');
$button_hint = gettext('Shows statistical graphs and info about your gallery\'s images and albums.');
$button_icon = 'images/bar_graph.png';
$button_rights = OVERVIEW_RIGHTS;
admin_securityChecks(OVERVIEW_RIGHTS, currentRelativeURL(__FILE__));
$gallery = new Gallery();
$gallery->garbageCollect();
$webpath = WEBPATH . '/' . ZENFOLDER . '/';
printAdminHeader(gettext('utilities'), gettext('statistics'));
?>
<link rel="stylesheet" href="../admin-statistics.css" type="text/css" media="screen" />
<?php 
/*
 * http://php.net/manual/de/function.filesize.php
 *
 * @author Jonas Sweden
*/
function gallerystats_filesize_r($path)
{
    if (!file_exists($path)) {
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:gallery_statistics.php

示例10: define

/**
 * zenpage admin-edit.php
 *
 * @author Malte Müller (acrylian)
 * @package plugins
 * @subpackage zenpage
 */
define("OFFSET_PATH", 4);
require_once dirname(dirname(dirname(__FILE__))) . '/admin-globals.php';
require_once "zenpage-admin-functions.php";
if (is_AdminEditPage('newsarticle')) {
    $rights = ZENPAGE_NEWS_RIGHTS;
} else {
    $rights = ZENPAGE_PAGES_RIGHTS;
}
admin_securityChecks($rights, currentRelativeURL(__FILE__));
$saveitem = '';
$reports = array();
if (is_AdminEditPage('page')) {
    $tab = 'pages';
    if (isset($_GET['titlelink'])) {
        $result = new ZenpagePage(urldecode($_GET['titlelink']));
    } else {
        if (isset($_GET['update'])) {
            XSRFdefender('update');
            $result = updatePage($reports);
            if (getCheckboxState('copy_delete_object')) {
                switch (sanitize($_POST['copy_delete_object'])) {
                    case 'copy':
                        $as = trim(sanitize(sanitize($_POST['copy_object_as'])));
                        if (empty($as)) {
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:admin-edit.php

示例11: define

<?php

/**
 * provides the Comments tab of admin
 * @package admin
 */
// force UTF-8 Ø
define('OFFSET_PATH', 1);
require_once '../../admin-globals.php';
admin_securityChecks(COMMENT_RIGHTS, currentRelativeURL());
if (isset($_GET['page'])) {
    $page = sanitize($_GET['page']);
} else {
    $page = '';
}
if (isset($_GET['fulltext']) && $_GET['fulltext']) {
    $fulltext = true;
} else {
    $fulltext = false;
}
if (isset($_GET['viewall'])) {
    $viewall = true;
} else {
    $viewall = false;
}
/* handle posts */
if (isset($_GET['action'])) {
    switch ($_GET['action']) {
        case "spam":
            XSRFdefender('comment_update');
            $comment = new Comment(sanitize_numeric($_GET['id']));
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:admin-comments.php

示例12: define

<?php

/**
 * Use this utility to reset your album thumbnails to either "random" or from an ordered field query
 *
 * @package admin
 */
define('OFFSET_PATH', 3);
require_once dirname(dirname(__FILE__)) . '/admin-globals.php';
require_once dirname(dirname(__FILE__)) . '/template-functions.php';
$buttonlist[] = array('category' => gettext('Database'), 'enable' => true, 'button_text' => gettext('Reset album thumbs'), 'formname' => 'reset_albumthumbs.php', 'action' => 'utilities/reset_albumthumbs.php', 'icon' => 'images/reset.png', 'title' => gettext('Reset album thumbnails to either random or most recent'), 'alt' => '', 'hidden' => '', 'rights' => MANAGE_ALL_ALBUM_RIGHTS | ADMIN_RIGHTS);
admin_securityChecks(MANAGE_ALL_ALBUM_RIGHTS, $return = currentRelativeURL());
if (isset($_REQUEST['thumbtype']) || isset($_REQUEST['thumbselector'])) {
    XSRFdefender('reset_thumbs');
}
$buffer = '';
$webpath = WEBPATH . '/' . ZENFOLDER . '/';
$zenphoto_tabs['overview']['subtabs'] = array(gettext('Thumbs') => '');
printAdminHeader('overview', 'thumbs');
echo '</head>';
?>

<body>
	<?php 
printLogoAndLinks();
?>
	<div id="main">
		<?php 
printTabs();
?>
		<div id="content">
开发者ID:rb26,项目名称:zenphoto,代码行数:31,代码来源:reset_albumthumbs.php

示例13: define

<?php

/**
 * This template is used to generate cache images. Running it will process the entire gallery,
 * supplying an album name (ex: loadAlbums.php?album=newalbum) will only process the album named.
 * Passing clear=on will purge the designated cache before generating cache images
 * @package plugins
 */
// force UTF-8 Ø
define('OFFSET_PATH', 3);
require_once "../../admin-globals.php";
require_once SERVERPATH . '/' . ZENFOLDER . '/template-functions.php';
require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/cacheManager/functions.php';
admin_securityChecks(NULL, $return = currentRelativeURL());
XSRFdefender('cacheDBImages');
$zenphoto_tabs['overview']['subtabs'] = array(gettext('Cache images') => PLUGIN_FOLDER . '/cacheManager/cacheImages.php?page=overview&tab=images', gettext('Cache stored images') => PLUGIN_FOLDER . '/cacheManager/cacheDBImages.php?page=overview&tab=DB&XSRFToken=' . getXSRFToken('cacheDBImages'));
printAdminHeader('overview', 'DB');
echo "\n</head>";
echo "\n<body>";
printLogoAndLinks();
echo "\n" . '<div id="main">';
printTabs();
echo "\n" . '<div id="content">';
printSubtabs('Cache');
?>
<div class="tabbox">
	<?php 
zp_apply_filter('admin_note', 'cache', '');
?>
	<p class="notebox">
		<?php 
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:cacheDBImages.php

示例14: define

<?php

/**
 * provides the Upload tab of admin
 *
 * @author Stephen Billard (sbillard)
 *
 * @package admin
 */
// force UTF-8 Ø
define('OFFSET_PATH', 1);
require_once dirname(__FILE__) . '/admin-globals.php';
admin_securityChecks(UPLOAD_RIGHTS | FILES_RIGHTS, $return = currentRelativeURL());
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;
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:admin-upload.php

示例15: define

define('OFFSET_PATH', -2);
//	 we don't want plugins loaded but we are not setup
require_once dirname(__FILE__) . '/admin-globals.php';
// need the class plugins to handle video, etc.
foreach (getEnabledPlugins() as $extension => $plugin) {
    if ($plugin['priority'] & CLASS_PLUGIN) {
        require_once $plugin['path'];
    }
}
require_once dirname(__FILE__) . '/template-functions.php';
if (isset($_REQUEST['album'])) {
    $localrights = ALBUM_RIGHTS;
} else {
    $localrights = NULL;
}
admin_securityChecks($localrights, $return = currentRelativeURL());
XSRFdefender('refresh');
$imageid = '';
if (isset($_GET['refresh'])) {
    if (isset($_GET['id'])) {
        $imageid = sanitize_numeric($_GET['id']);
    }
    $imageid = $_zp_gallery->garbageCollect(true, true, $imageid);
}
if (isset($_GET['prune'])) {
    $type = 'prune&amp;';
    $title = gettext('Refresh Database');
    $finished = gettext('Finished refreshing the database');
    $incomplete = gettext('Database refresh is incomplete');
    $allset = gettext("We are all set to refresh the database");
    $continue = gettext('Continue refreshing the database.');
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:admin-refresh-metadata.php


注:本文中的currentRelativeURL函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。