本文整理汇总了PHP中admin_footer函数的典型用法代码示例。如果您正苦于以下问题:PHP admin_footer函数的具体用法?PHP admin_footer怎么用?PHP admin_footer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了admin_footer函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: _e
<td><a href="settings.php?deactivate_plugin=<?php
echo $plugin_file;
?>
"><?php
_e('Dectivate');
?>
</a></td>
<?php
} else {
?>
<td><a href="settings.php?activate_plugin=<?php
echo $plugin_file;
?>
"><?php
_e('Activate');
?>
</a></td>
<?php
}
?>
</tr>
<?php
}
?>
</tbody>
</table>
</fieldset>
</form>
<?php
admin_footer();
示例4: admin_msg
function admin_msg($message, $url_forward = '', $msgtype = 'message', $extra = '')
{
extract($GLOBALS, EXTR_SKIP);
eval("\$message = \"" . (isset($msglang[$message]) ? $msglang[$message] : $message) . "\";");
if ($msgtype == 'form') {
$message = "<form method=\"post\" action=\"{$url_forward}\">" . "<br><br><br>{$message}{$extra}<br><br><br><br>\n" . "<input type=\"submit\" name=\"confirmed\" value=\"{$lang['ok']}\"> \n" . "<input type=\"button\" value=\"{$lang['cancel']}\" onClick=\"history.go(-1);\"></form><br>";
} else {
if ($url_forward) {
$message .= "<br><br><br><a href=\"{$url_forward}\">{$lang['message_redirect']}</a>";
$url_forward = transsid($url_forward);
$message .= "<script>setTimeout(\"redirect('{$url_forward}');\", 1250);</script>";
} elseif (strpos($message, $lang['return'])) {
$message .= "<br><br><br><a href=\"javascript:history.go(-1);\" class=\"mediumtxt\">{$lang['message_return']}</a>";
}
$message = "<br><br><br>{$message}{$extra}<br><br>";
}
echo "<br><br><br><br><br>\r\n<table cellspacing=1 cellpadding=0 width=80% align=center class=tableborder>\r\n<tr class=header><td height=25> {$lang['cyask_message']}</td></tr>\r\n<tr><td bgcolor=#FFFFFF align=center>\r\n<table border=0 width=90% cellspacing=0 cellpadding=0>\r\n<tr><td width=100% align=center>\r\n{$message}<br /><br />\r\n</td></tr></table>\r\n</td></tr></table>\r\n<br><br><br>";
admin_footer();
}
示例5: import
protected function import()
{
if (!empty($_POST['cancel']) && $_POST['cancel'] == 'cancel') {
header('HTTP/1.1 302 Found', true, 302);
header('Location: ' . get_option('baseurl') . 'admin/feed-import.php');
die;
}
if (empty($_POST['url']) && empty($_FILES['file'])) {
$_POST['step']--;
$this->dispatch();
return;
}
admin_header(_r('Other (OPML) Importer'));
try {
$opml = '';
if (!empty($_POST['url'])) {
$http = new HTTPRequest('', 10, 'Lilina/' . LILINA_CORE_VERSION);
$opml = $http->get($opml_url);
$opml = $opml->body;
}
if (!empty($_FILES['file'])) {
$opml = file_get_contents($_FILES['file']['tmp_name']);
}
$feeds = $this->import_opml($opml);
import($feeds);
} catch (Exception $e) {
$this->error($e);
}
admin_footer();
return;
}
示例6: admin_header
# 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';
require_once APP_PATH . '/escritorio/FormManual.js.php';
require_once APP_PATH . '/escritorio/FormPassword.js.php';
echo admin_footer();
} else {
wp_redirect(APP_URL . '/escritorio/index.php');
}
示例7: 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();
}
示例8: 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;
}
示例9: admin_page
//.........这里部分代码省略.........
?>
</td>
<td><?php
echo round($feed['finish'] - $feed['loaded'], 3);
?>
</td>
<td><?php
echo round($feed['finish'] - $feed['start'], 3);
?>
</td>
<td><?php
echo $feed['added'] . ' / ' . $feed['processed'];
?>
</td>
<td><?php
echo round($avg_time, 3);
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<h3>Full Log</h3>
<table class="item-table" id="full-log">
<thead>
<tr>
<th>Type</th>
<th>Time Since Init</th>
<th>Feed</th>
</tr>
</thead>
<tbody>
<?php
$start = 0;
foreach ($this->log as $item) {
$class = '';
if ($item['name'] == 'Initialized Lilina') {
$start = $item['time'];
$class = ' init';
}
if ($item['name'] == 'Skipped item') {
$class = ' skipped';
}
if ($item['name'] == 'Added item to database') {
$class = ' added';
}
$feed = Feeds::get_instance()->get($item['feed']);
$since = round($item['time'] - $start, 3);
if (!$feed) {
$feed = array('name' => 'n/a');
}
?>
<tr class="<?php
echo $class;
?>
">
<td><?php
echo $item['name'];
?>
</td>
<td><?php
echo $since;
?>
</td>
<td><a href="#feed-<?php
echo $item['feed'];
?>
"><?php
echo $feed['name'];
?>
</a></td>
</tr>
<?php
if ($item['name'] == 'Finish feed processing') {
echo '
<tr class="header">
<th>Type</th>
<th>Time Since Init</th>
<th>Feed</th>
</tr>';
}
}
?>
</tbody>
</table>
<script type="text/javascript">
jQuery(document).ready(function ($) {
$("#full-log").hide();
$("<p class='hideshow'><span>Show full log</span></p>").insertBefore("#full-log").click(function () {
$("#full-log").show();
$(this).hide();
});
});
</script>
<?php
}
admin_footer();
}