本文整理汇总了PHP中printAdminHeader函数的典型用法代码示例。如果您正苦于以下问题:PHP printAdminHeader函数的具体用法?PHP printAdminHeader怎么用?PHP printAdminHeader使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了printAdminHeader函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
* So you can freely upload albums and images then on a periodic basis review which ones to make available
* to visitors of your gallery.
*
* @package admin
*/
define('OFFSET_PATH', 3);
chdir(dirname(dirname(__FILE__)));
require_once dirname(dirname(__FILE__)) . '/admin-globals.php';
require_once dirname(dirname(__FILE__)) . '/template-functions.php';
$button_text = gettext('Publish content');
$button_hint = gettext('Manage un-published content in your gallery.');
$button_icon = 'images/calendar.png';
$button_rights = ALBUM_RIGHTS;
admin_securityChecks(ALBUM_RIGHTS, currentRelativeURL(__FILE__));
$gallery = new Gallery();
printAdminHeader(gettext('utilities'), gettext('content'));
datepickerJS();
?>
<link rel="stylesheet" href="schedule_content.css" type="text/css" media="screen" />
<?php
function unpublishSubalbums($album)
{
global $gallery;
$albums = $album->getAlbums();
foreach ($albums as $albumname) {
$subalbum = new Album($gallery, $albumname);
$subalbum->setShow(false);
$subalbum->save();
unpublishSubalbums($subalbum);
}
}
示例2: getItem
if (isset($_GET['id'])) {
$result = getItem(sanitize($_GET['id']));
}
if (isset($_GET['save'])) {
XSRFdefender('update_menu');
if ($_POST['update']) {
$result = updateMenuItem($reports);
} else {
$result = addItem($reports);
}
}
if (isset($_GET['del'])) {
XSRFdefender('delete_menu');
deleteItem($reports);
}
printAdminHeader('menu', is_array($result) && $result['id'] ? gettext('edit') : gettext('add'));
?>
<link rel="stylesheet" href="../zenpage/zenpage.css" type="text/css" />
<?php
$menuset = checkChosenMenuset();
?>
</head>
<body>
<?php
printLogoAndLinks();
?>
<div id="main">
<?php
printTabs();
?>
<div id="content">
示例3: 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');
示例4: fopen
$fields = $search->fields;
$redirect = $album . '/' . $albumname . ".alb";
if (!empty($albumname)) {
$f = fopen(UTF8ToFilesystem(getAlbumFolder() . $redirect), 'w');
if ($f !== false) {
fwrite($f, "WORDS={$words}\nTHUMB={$thumb}\nFIELDS={$fields}\n");
fclose($f);
// redirct to edit of this album
header("Location: " . FULLWEBPATH . "/" . ZENFOLDER . "/admin-edit.php?page=edit&album=" . urlencode($redirect));
exit;
}
}
}
$_GET['page'] = 'edit';
// pretend to be the edit page.
printAdminHeader();
echo "\n</head>";
echo "\n<body>";
printLogoAndLinks();
echo "\n" . '<div id="main">';
printTabs('edit');
echo "\n" . '<div id="content">';
echo "<h1>" . gettext("zenphoto Create Dynamic Album") . "</h1>\n";
if (isset($_POST['savealbum'])) {
// we fell through, some kind of error
echo "<div class=\"errorbox space\">";
echo "<h2>" . gettext("Failed to save the album file") . "</h2>";
echo "</div>\n";
}
$gallery = new Gallery();
$albumlist = array();
示例5: sanitize
if (!empty($id)) {
$imagewhere = "WHERE `albumid`={$id}";
$r = " {$folder}";
$albumwhere = "WHERE `parentid`={$id}";
}
}
if (isset($_REQUEST['return'])) {
$ret = sanitize($_REQUEST['return']);
}
if (!empty($ret)) {
$ret = '&return=' . $ret;
}
$metaURL = $starturl = '?' . $type . 'refresh=start' . $albumparm . '&XSRFToken=' . getXSRFToken('refresh') . $ret;
}
$zenphoto_tabs['overview']['subtabs'] = array(gettext('Refresh') => '');
printAdminHeader($tab, 'Refresh');
if (!empty($metaURL)) {
?>
<meta http-equiv="refresh" content="1; url=<?php
echo $metaURL;
?>
" />
<?php
}
echo "\n</head>";
echo "\n<body>";
printLogoAndLinks();
echo "\n" . '<div id="main">';
printTabs();
?>
<div id="content">
示例6: XSRFdefender
}
if (isset($_GET['delete'])) {
XSRFdefender('delete');
$msg = deleteZenpageObj('new' . $new(sanitize($_GET['delete']), 'admin-pages.php'));
if (!empty($msg)) {
$reports[] = $msg;
}
}
/*
* Here we should restart if any action processing has occurred to be sure that everything is
* in its proper state. But that would require significant rewrite of the handling and
* reporting code so is impractical. Instead we will presume that all that needs to be restarted
* is the CMS object.
*/
$_zp_CMS = new CMS();
printAdminHeader($tab, $result->transient ? gettext('add') : gettext('edit'));
zp_apply_filter('texteditor_config', 'zenpage');
zenpageJSCSS();
datepickerJS();
codeblocktabsJS();
$tagsort = getTagOrder();
?>
<script type="text/javascript">
//<!-- <![CDATA[
var deleteArticle = "<?php
echo gettext("Are you sure you want to delete this article? THIS CANNOT BE UNDONE!");
?>
";
var deletePage = "<?php
echo gettext("Are you sure you want to delete this page? THIS CANNOT BE UNDONE!");
?>
示例7: db_quote
$where = ' WHERE `creator` LIKE ' . db_quote('%' . basename($owner) . '/themeoptions.php');
}
$sql = 'DELETE FROM ' . prefix('options') . $where;
$result = query($sql);
} else {
purgeOption('zp_plugin_' . stripSuffix(basename($owner)));
}
}
}
if (isset($_POST['missingplugin'])) {
foreach ($_POST['missingplugin'] as $plugin) {
purgeOption('zp_plugin_' . stripSuffix($plugin));
}
}
}
printAdminHeader('options', '');
?>
<link rel="stylesheet" href="purgeOptions.css" type="text/css">
</head>
<body>
<?php
printLogoAndLinks();
?>
<div id="main">
<?php
printTabs();
?>
<div id="content">
<div id="container">
<?php
printSubtabs();
示例8: pathurlencode
$imageobj->save();
if ($_REQUEST['performcrop'] == 'backend') {
$return = FULLWEBPATH . '/' . ZENFOLDER . '/admin-edit.php?page=edit&album=' . pathurlencode($albumname) . '&saved&subpage=' . sanitize($_REQUEST['subpage']) . '&tagsort=' . sanitize($_REQUEST['tagsort']) . '&tab=imageinfo';
} else {
$return = FULLWEBPATH . $imageobj->getLink();
}
header('Location: ' . $return);
exitZP();
}
if (isset($_REQUEST['subpage'])) {
$subpage = sanitize($_REQUEST['subpage']);
$tagsort = sanitize($_REQUEST['tagsort']);
} else {
$subpage = $tagsort = '';
}
printAdminHeader('edit', gettext('crop image'));
?>
<script src="<?php
echo WEBPATH . '/' . ZENFOLDER;
?>
/js/jquery.Jcrop.js" type="text/javascript"></script>
<link rel="stylesheet" href="<?php
echo WEBPATH . '/' . ZENFOLDER;
?>
/js/jquery.Jcrop.css" type="text/css" />
<link rel="stylesheet" href="<?php
echo WEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER;
?>
/crop_image/crop_image.css" type="text/css" />
<script type="text/javascript" >
示例9: array_shift
// 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
if (!zp_loggedin()) {
$_zp_authority->printLoginForm($from);
echo "\n</body>";
echo "\n</html>";
示例10: admin_securityChecks
// user plugin variant
require_once '../../zp-core/admin-globals.php';
require_once '../../zp-core/template-functions.php';
admin_securityChecks(ADMIN_RIGHTS, currentRelativeURL(__FILE__));
if (getOption('zenphoto_release') != ZENPHOTO_RELEASE) {
header("Location: " . FULLWEBPATH . "/" . ZENFOLDER . "/setup.php");
exit;
}
if (!zp_loggedin(OVERVIEW_RIGHTS)) {
// prevent nefarious access to this page.
header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin.php?from=' . currentRelativeURL(__FILE__));
exit;
}
$gallery = new Gallery();
$webpath = WEBPATH . '/' . ZENFOLDER . '/';
printAdminHeader(gettext('utilities'), gettext('Sitemap tools'));
if (isset($_GET['generatesitemaps'])) {
$sitemap_number = sanitize_numeric($_GET['number']);
$sitemap_index = getSitemapIndexLinks();
$sitemap_albums = getSitemapAlbums();
$sitemap_images = getSitemapImages();
if (getOption('zp_plugin_zenpage')) {
$sitemap_newsindex = getSitemapZenpageNewsIndex();
$sitemap_articles = getSitemapZenpageNewsArticles();
$sitemap_categories = getSitemapZenpageNewsCategories();
$sitemap_pages = getSitemapZenpagePages();
}
$numberAppend = '';
if (isset($_GET['generatesitemaps']) && (!empty($sitemap_index) || !empty($sitemap_albums) || !empty($sitemap_images) || !empty($sitemap_newsindex) || !empty($sitemap_articles) || !empty($sitemap_categories) || !empty($sitemap_pages))) {
$numberAppend = '-' . $sitemap_number;
$metaURL = 'sitemap-extended-admin.php?generatesitemaps&number=' . ($sitemap_number + SITEMAP_CHUNK);
示例11: serialize
}
if (isset($_POST['email'])) {
$comment->setEmail(sanitize($_POST['email'], 3));
}
if (isset($_POST['website'])) {
$comment->setWebsite(sanitize($_POST['website'], 3));
}
$comment->setDateTime(sanitize($_POST['date'], 3));
$comment->setComment(sanitize($_POST['comment'], 1));
$comment->setCustomData($_comment_form_save_post = serialize(getCommentAddress(0)));
$comment->save();
header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/comment_form/admin-comments.php?saved&page=editcomment&id=' . $comment->getID());
exitZP();
}
}
printAdminHeader('comments');
zp_apply_filter('texteditor_config', 'admin_comments');
?>
<script type="text/javascript">
//<!-- <![CDATA[
function confirmAction() {
if ($('#checkallaction').val() == 'deleteall') {
return confirm('<?php
echo js_encode(gettext("Are you sure you want to delete the checked items?"));
?>
');
} else {
return true;
}
}
// ]]> -->
示例12: sanitize_path
if (isset($_GET['album']) && !isset($_GET['massedit'])) {
$folder = sanitize_path($_GET['album']);
if ($folder == '/' || $folder == '.') {
$parent = '';
} else {
$parent = '&album=' . $folder . '&tab=subalbuminfo';
}
$album = newAlbum($folder);
$subtab = setAlbumSubtabs($album);
}
if (empty($subtab)) {
if (isset($_GET['album'])) {
$subtab = 'albuminfo';
}
}
printAdminHeader('edit', $subtab);
datepickerJS();
codeblocktabsJS();
if (!isset($_GET['massedit']) && !isset($_GET['album']) || $subtab == 'subalbuminfo') {
printSortableHead();
}
if (isset($_GET['album']) && (empty($subtab) || $subtab == 'albuminfo') || isset($_GET['massedit'])) {
$result = db_list_fields('albums');
$dbfields = array();
if ($result) {
foreach ($result as $row) {
$dbfields[] = "'" . $row['Field'] . "'";
}
}
sort($dbfields);
$albumdbfields = implode(',', $dbfields);
示例13: dirname
require_once dirname(dirname(__FILE__)) . '/admin-globals.php';
require_once dirname(dirname(__FILE__)) . '/' . PLUGIN_FOLDER . '/image_album_statistics.php';
$tables = array('albums', 'images');
if (extensionEnabled('zenpage')) {
require_once dirname(dirname(__FILE__)) . '/' . PLUGIN_FOLDER . '/zenpage/admin-functions.php';
$tables = array_merge($tables, array('news', 'pages'));
}
// Include the appropriate page for the requested object, and a 200 OK header.
foreach ($tables as $table) {
updatePublished($table);
}
$buttonlist[] = array('category' => gettext('Info'), 'enable' => true, 'button_text' => gettext('Gallery Statistics'), 'formname' => 'gallery_statistics.php', 'action' => FULLWEBPATH . '/' . ZENFOLDER . '/utilities/gallery_statistics.php', 'icon' => 'images/bar_graph.png', 'title' => gettext('Shows statistical graphs and info about your gallery’s images and albums.'), 'alt' => '', 'hidden' => '', 'rights' => ADMIN_RIGHTS);
admin_securityChecks(OVERVIEW_RIGHTS, currentRelativeURL());
$_zp_gallery->garbageCollect();
$zenphoto_tabs['overview']['subtabs'] = array(gettext('Statistics') => '');
printAdminHeader('overview', '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)) {
return 0;
}
if (is_file($path)) {
return filesize($path);
示例14: zp_register_filter
$linecounter++;
if (@$line[0] != '#') {
return $line;
}
}
return NULL;
}
if (defined('OFFSET_PATH')) {
zp_register_filter('admin_utilities_buttons', 'findQuotes_button');
} else {
define('OFFSET_PATH', 3);
require_once dirname(dirname($_SERVER['SCRIPT_NAME'])) . '/zp-core/functions.php';
require_once SERVERPATH . '/' . ZENFOLDER . '/admin-globals.php';
zp_register_filter('admin_tabs', 'findQuotes_admin_tab');
setOptionDefault('findingQuotes_target', 'de_DE');
printAdminHeader('overview', 'findQuotes');
echo '</head>';
$list = generateLanguageList('all');
$lang = NULL;
if (isset($_POST['language'])) {
$selected = $lang = sanitize($_POST['language']);
setOption('findingQuotes_target', $lang);
} else {
$selected = getOption('findingQuotes_target');
}
?>
<body>
<?php
printLogoAndLinks();
?>
<div id="main">
示例15: XSRFdefender
if (isset($_GET['save'])) {
XSRFdefender('save_categories');
addCategory($reports);
}
if (isset($_GET['id'])) {
$x = $_zp_zenpage->getCategory(sanitize_numeric($_GET['id']));
$result = new ZenpageCategory($x['titlelink']);
} else {
if (isset($_GET['update'])) {
XSRFdefender('update_categories');
$result = updateCategory($reports);
} else {
$result = new ZenpageCategory('');
}
}
printAdminHeader('news', 'categories');
zp_apply_filter('texteditor_config', '', 'zenpage');
printSortableHead();
zenpageJSCSS();
?>
<script type="text/javascript">
//<!-- <![CDATA[
var deleteCategory = "<?php
echo gettext("Are you sure you want to delete this category? THIS CANNOT BE UNDONE!");
?>
";
function confirmAction() {
if ($('#checkallaction').val() == 'deleteall') {
return confirm('<?php
echo js_encode(gettext("Are you sure you want to delete the checked items?"));
?>