本文整理汇总了PHP中admin_header函数的典型用法代码示例。如果您正苦于以下问题:PHP admin_header函数的具体用法?PHP admin_header怎么用?PHP admin_header使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了admin_header函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: introduction
public function introduction() {
admin_header(_r('Google Reader Importer'));
?>
<h1><?php _e('Google Reader Importer') ?></h1>
<p><?php _e('There are several ways to import from Google Reader.'); ?></p>
<h2><?php _e('Method 1'); ?></h2>
<p><?php printf(
_r('<a href="%1$s">Export</a> your feeds from Google reader and then use the <a href="%2$s">OPML importer</a>.'),
'http://www.google.com/reader/subscriptions/export',
'feed-import.php?service=opml'
); ?></p>
<h2><?php _e('Method 2'); ?></h2>
<p><?php _e("We can grab your OPML file for you, but we'll need your username and password. This information won't be stored anywhere and is only used once. (It sucks, we know, but Google doesn't offer any other way.)"); ?>
<form action="feed-import.php" method="POST">
<button id="continue"><?php _e('Start Method 2'); ?></button>
<fieldset id="greader">
<legend><?php _e('Import Feeds'); ?></legend>
<div class="row">
<label for="user"><?php _e('Username (Email address)'); ?>:</label>
<input type="text" name="user" id="user" />
</div>
<div class="row">
<label for="pass"><?php _e('Password'); ?>:</label>
<input type="password" name="pass" id="pass" />
</div>
<input type="submit" value="<?php _e('Import'); ?>" class="submit" name="submit" />
<input type="hidden" name="step" value="1" />
<input type="hidden" name="service" value="opml" />
</fieldset>
</form>
<?php
admin_footer();
}
示例2: rss_login_form
function rss_login_form($uname = null, $pass = null)
{
admin_header();
echo "\n<div id=\"channel_admin\" class=\"frame\">";
echo "<form id=\"admin_login\" onsubmit=\"return loginHandler();\" \n\t\tstyle=\"text-align:center\" action=\"" . $_SERVER['PHP_SELF'] . "\" method=\"post\">\n" . "<fieldset>" . "<legend>" . __('Please log in') . "</legend>\n" . "<p><label style=\"display:block\" for=\"username\">" . __('Username') . ":</label>\n" . "<input type=\"text\" id=\"username\" name=\"username\" /></p>\n" . "<p><label style=\"display:block\" for=\"password\">" . __('Password') . ":</label>\n" . "<input type=\"password\" id=\"password\" name=\"password\" /></p>\n" . "<p id=\"admin_login_submit\"><input type=\"submit\" value=\"" . __('Login') . "\" /></p>\n" . "<span style=\"display:inline;\" id=\"admin_login_result\"></span>\n" . "</fieldset>\n" . "</form>\n";
echo "</div>\n";
admin_footer();
exit;
}
示例3: admin_header
<?php
/**
*
* @author Ryan McCue <cubegames@gmail.com>
* @package Lilina
* @version 1.0
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
require_once 'admin.php';
admin_header(_r('Home'));
?>
<h1><?php
_e('Admin Panel');
?>
</h1>
<p><?php
_e('Welcome to your administration panel for Lilina! You can do a few things here:');
?>
</p>
<ul>
<li><a href="feeds.php"><?php
_e('Edit your feeds');
?>
</a></li>
<li><a href="settings.php"><?php
_e('Change your settings');
?>
</a></li>
</ul>
<div class="dashbox" id="contain_feeds">
示例4: admin_header
<?php
/**
* First run tools, such as the importer, on a single page
*
* @author Ryan McCue <cubegames@gmail.com>
* @package Lilina
* @subpackage Administration
* @version 1.0
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
/** */
require_once 'admin.php';
admin_header(_r('First-Run'));
?>
<h1><?php
_e('Welcome');
?>
</h1>
<p><?php
_e("To help you settle in, we've included a few nifty tools in Lilina, just to help you get started.");
?>
</p>
<h2><?php
_e('Import');
?>
</h2>
<p><?php
_e("We can import from any service which supports an open standard called OPML. Here's some services you can import from:");
?>
</p>
示例5: array
<?php
require "www2-admin.php";
$adminmenu = array("reg" => "设定使用者注册资料", "info" => "修改用户数据", "perm" => "更改使用者权限", "newbrd" => "开设一个新的讨论区", "editbrd" => "修改讨论区说明与设定");
admin_header("管理菜单", "系统管理功能表");
$count = 0;
foreach ($adminperm as $key => $value) {
if ($currentuser["userlevel"] & $adminperm[$key]) {
print "<a href=\"adm{$key}.php\">{$adminmenu[$key]}</a><br>";
}
}
print "<br>";
page_footer();
示例6: foreach
};
});
</script>
<?php
}
/** Load all the importers, so that they may register themselves */
foreach (glob(LILINA_PATH . '/admin/includes/import/*.php') as $file) {
require_once $file;
}
$lilina_importers = apply_filters('importer', $lilina_importers);
/** Run the importer */
if (!empty($service) && isset($lilina_importers[$service])) {
call_user_func($lilina_importers[$service][2]);
die;
}
admin_header(_r('Import Feeds'), 'feeds.php');
?>
<h1><?php
_e('Importer');
?>
</h1>
<?php
if (empty($lilina_importers)) {
?>
<p><?php
_e('No importers available on your system. Weird.');
?>
</p>
<?php
} else {
?>
示例7: import
protected function import()
{
if (empty($_POST['url'])) {
$_POST['step']--;
$this->dispatch();
return;
}
admin_header(_r('Other (OPML) Importer'));
import($this->import_opml($_POST['url']));
admin_footer();
return;
}
示例8: update_option
}
if (!empty($_POST['template'])) {
update_option('template', $_REQUEST['template']);
}
if (!empty($_POST['locale'])) {
update_option('locale', $_REQUEST['locale']);
}
if (!empty($_POST['timezone'])) {
update_option('timezone', $_REQUEST['timezone']);
}
header('HTTP/1.1 302 Found', true, 302);
header('Location: ' . get_option('baseurl') . 'admin/settings.php?updated=1');
die;
}
require_once LILINA_INCPATH . '/core/file-functions.php';
admin_header(_r('Settings'));
?>
<h1><?php
_e('Settings');
?>
</h1>
<?php
if (!empty($_GET['updated'])) {
echo '<div id="message"><p>' . _r('Settings updated!') . '</p></div>';
}
?>
<form action="settings.php" method="post">
<fieldset id="general">
<legend><?php
_e('General Settings');
?>
示例9: admin_header
<?php
/**
* First run tools, such as the importer, on a single page
*
* @author Ryan McCue <cubegames@gmail.com>
* @package Lilina
* @subpackage Administration
* @version 1.0
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
/** */
require_once 'admin.php';
admin_header(_r('Welcome!'));
/**
* Make a timestamp into a relative string
*
* @todo Tidy up and move out of this file.
* Based on Garrett Murray's code from http://graveyard.maniacalrage.net/etc/relative/
*/
function relative_time($posted_date)
{
$in_seconds = $posted_date;
$diff = time() - $in_seconds;
$months = floor($diff / 2592000);
$diff -= $months * 2419200;
$weeks = floor($diff / 604800);
$diff -= $weeks * 604800;
$days = floor($diff / 86400);
$diff -= $days * 86400;
$hours = floor($diff / 3600);
示例10: array
if (isset($_POST["userid"])) {
$userid = $_POST["userid"];
} else {
if (isset($_GET["userid"])) {
$userid = $_GET["userid"];
} else {
$userid = $currentuser["userid"];
}
}
$userinfo = array();
$uid = bbs_admin_getuserinfo($userid, $userinfo);
if ($uid == -1) {
html_error_quit("不存在的用户。");
}
if ($uid > 0) {
admin_header("改别人资料", "修改用户数据");
for ($i = 1; $i < 256; $i++) {
$usertitles[$i - 1] = bbs_admin_getusertitle($i);
}
?>
<form method="post" action="adminfo.php" class="medium">
<fieldset><legend>要修改的用户ID</legend><div class="inputs">
<label>ID:</label><input type="text" name="userid" value="<?php
print $userid;
?>
" size="12" maxlength="12">
<input type="submit" value="确定"><br>
为了避免重复提交网页表单导致重要数据破坏,用户ID和密码请用telnet方式登录修改。
</div></fieldset></form>
<form method="post" action="adminfo.php" class="medium" onsubmit="return confirm('确实要修改用户资料吗?');">
<fieldset><legend>个人资料</legend><div class="inputs">
示例11: admin_check
<?php
require "www2-admin.php";
admin_check("reg");
$reglist = array();
$count = bbs_admin_getnewreg($reglist);
if ($count == -1) {
html_error_quit("无法读取注册单文件。");
}
admin_header("批注册单", "设定使用者注册资料");
if ($count == 0) {
print "目前没有需要审批的注册单。";
} else {
print "共有 {$count} 个用户等待审批。";
print "<table align=\"center\" cellpadding=\"3\" border=\"1\"><tr><th>编号和时间</th><th>用户名</th><th>真实姓名</th><th>服务单位</th></tr>";
for ($i = 0; $i < $count; $i++) {
print "<tr><td>{$reglist[$i]["usernum"]}</td><td>{$reglist[$i]["userid"]}</td><td>{$reglist[$i]["realname"]}</td><td>{$reglist[$i]["career"]}</td></tr>";
}
print "</table><br>";
}
page_footer();
示例12: bbs_admin_newboard
$ret = bbs_admin_newboard($boardname);
switch ($ret) {
case 0:
html_success_quit("版面 {$boardname} 开设成功,请点击下面的连接设定版面属性。", array("<a href=\"admeditbrd.php?board={$boardname}\">设定 {$boardname} 的版面属性</a>"));
break;
case -1:
html_error_quit("版面名称不能为空。", array("<a href=\"admnewbrd.php\">返回版面开设界面</a>"));
break;
case -2:
html_error_quit("版面名称不符合规定。", array("<a href=\"admnewbrd.php\">返回版面开设界面</a>"));
break;
case -3:
html_error_quit("同名版面已经存在,请更换一个名称。", array("<a href=\"admnewbrd.php\">返回版面开设界面</a>"));
break;
case -4:
html_error_quit("无法添加版面,也许已经达到系统设定的版面数量上限。", array("<a href=\"admnewbrd.php\">返回版面开设界面</a>"));
break;
case -5:
html_error_quit("系统错误,请联系技术人员。", array("<a href=\"admnewbrd.php\">返回版面开设界面</a>"));
break;
default:
}
}
admin_header("开版", "开启一个新的讨论区");
?>
<form method="post" action="admnewbrd.php" class="medium">
<fieldset><legend>开设新版面</legend><div class="inputs">
<label>版面英文名称:</label><input type="text" name="boardname" size="20" maxlength="30">
<input type="submit" value="确定"></div></fieldset></form><br>
<?php
page_footer();
示例13: session_start
<?php
# Inicio de session.
session_start();
# Cambiar directorio.
chdir('../');
# Requerir instacia de Wordpress.
require_once './wp-config.php';
# Requerir funciones de administración.
require_once APP_PATH . '/escritorio/admin_functions.php';
if (is_user_logged_in() && current_user_can('administrator')) {
echo admin_header();
require_once APP_PATH . '/escritorio/Menu.js.php';
if ($_GET['jsfile']) {
$jsfile = sanitize_text_field(trim($_GET['jsfile'])) . '.js.php';
if ($jsfile == 'FormImportarUsers.js.php') {
if ($_SESSION['super'] == 'true') {
require_once APP_PATH . '/escritorio/' . $jsfile;
}
} else {
if ($jsfile == 'FormMDigitalXpath.js.php') {
if ($_SESSION['super'] == 'true') {
require_once APP_PATH . '/escritorio/' . $jsfile;
}
} else {
require_once APP_PATH . '/escritorio/' . $jsfile;
}
}
}
require_once APP_PATH . '/escritorio/FormAbout.js.php';
require_once APP_PATH . '/escritorio/FormLogout.js.php';
示例14: bbs_admin_getuserperm
}
if (isset($_POST["userid"])) {
$userid = $_POST["userid"];
} else {
if (isset($_GET["userid"])) {
$userid = $_GET["userid"];
} else {
$userid = $currentuser["userid"];
}
}
$perm = bbs_admin_getuserperm($userid);
if ($perm == -1 || $ret == -1) {
html_error_quit("不存在的用户。");
} else {
$giveupperm = bbs_admin_getgiveupperm($userid);
admin_header("改别人权限", "更改使用者的权限");
?>
<form method="post" action="admperm.php" class="medium">
<fieldset><legend>要修改的用户ID</legend><div class="inputs">
<label>ID:</label><input type="text" name="userid" value="<?php
print $userid;
?>
" size="12" maxlength="12">
<input type="submit" value="确定"><br>注意:如果是封禁解封,请使用封禁选单!
</div></fieldset></form>
<form method="post" action="admperm.php" class="large" onsubmit="return confirm('确实要修改用户权限吗?');">
<fieldset><legend>修改用户权限</legend><div class="inputs">
<label>用户ID:</label><input type="text" name="modifyuserid" value="<?php
print $userid;
?>
" size="12" readonly>
示例15: import
protected function import()
{
admin_header($this->name);
try {
// I'm not in favour of allowing user input to pass through
// unsanitized, but it's URL encoded in the request library, so
// we'll let Google handle it.
$this->api = new GoogleReaderAPI($_POST['user'], $_POST['pass']);
$this->api->connect();
$opml = $this->api->call();
$feeds = $this->import_opml($opml);
import($feeds);
} catch (Exception $e) {
$this->error($e);
}
admin_footer();
}