本文整理汇总了PHP中display_header函数的典型用法代码示例。如果您正苦于以下问题:PHP display_header函数的具体用法?PHP display_header怎么用?PHP display_header使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了display_header函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: contact_page_controller
function contact_page_controller()
{
global $cssFilePaths;
global $javascriptFilePaths;
$scripts = array($javascriptFilePaths["variableInputWidth"], $javascriptFilePaths["main"], $javascriptFilePaths["uploadResume"], $javascriptFilePaths["contact"]);
display_header("Contact", array($cssFilePaths["contact"]), 5);
contact_page_view();
display_footer($scripts);
}
示例2: error
function error($message, $type, $custom_message = "")
{
$msg = "UNSPECIFIED ERROR OCCURED";
if ($custom_message != "") {
$msg = $custom_message;
}
//append_message($msg,$type);
// TODO : DEGAGER LE PRINT ET FOUTRE CA DANS UN FIC. DE LOG
echo htmlentities($message);
if ($type == "SECURITY") {
exit(1);
}
if ($type == "CRITICAL") {
display_header();
display_footer();
exit(1);
}
}
示例3: display_setup_form
</p>
<?php
display_setup_form();
break;
case 2:
if (!empty($language) && load_default_textdomain($language)) {
$loaded_language = $language;
$GLOBALS['wp_locale'] = new WP_Locale();
} else {
$loaded_language = 'en_US';
}
if (!empty($wpdb->error)) {
wp_die($wpdb->error->get_error_message());
}
display_header();
// Fill in the data we gathered
$weblog_title = isset($_POST['weblog_title']) ? trim(wp_unslash($_POST['weblog_title'])) : '';
$user_name = isset($_POST['user_name']) ? trim(wp_unslash($_POST['user_name'])) : '';
$admin_password = isset($_POST['admin_password']) ? wp_unslash($_POST['admin_password']) : '';
$admin_password_check = isset($_POST['admin_password2']) ? wp_unslash($_POST['admin_password2']) : '';
$admin_email = isset($_POST['admin_email']) ? trim(wp_unslash($_POST['admin_email'])) : '';
$public = isset($_POST['blog_public']) ? (int) $_POST['blog_public'] : 0;
// Check e-mail address.
$error = false;
if (empty($user_name)) {
// TODO: poka-yoke
display_setup_form(__('Please provide a valid username.'));
$error = true;
} elseif ($user_name != sanitize_user($user_name, true)) {
display_setup_form(__('The username you provided has invalid characters.'));
示例4: Copyright
<?php
/*
Copyright (©) 2003-2014 Teus Benschop.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
include "utils.php";
display_header(true);
display_active();
display_paragraph("Creating and upgrading the confirmation database.");
display_footer();
示例5: Java
/**
* Summary of profiling
*/
require_once "WEB-INF/php/inc.php";
$profile = @new Java("com.caucho.profile.Profile");
$mbeanServer = new MBeanServer();
$server = $mbeanServer->lookup("resin:type=Server");
$title = "Resin: Profile {$server->Id}";
if (!$profile) {
$title .= " - not available";
}
?>
<?php
display_header("profile.php", $title, $server->Id);
?>
<?php
if ($profile) {
if ($_POST['action'] == 'stop') {
$profile->stop();
} else {
if ($_POST['action'] == 'start') {
$profile->start();
if ($_POST['period'] >= 10) {
$profile->setPeriod($_POST['period']);
}
if ($_POST['depth'] >= 1) {
$profile->setDepth($_POST['depth']);
}
示例6: make_redir
function make_redir($params)
{
unset($params["make_redir"]);
unset($params["do_redir"]);
$qstring = arr2qstring($params);
$domain = $_SERVER['SERVER_NAME'];
$script = $_SERVER['SCRIPT_NAME'];
$url = "http://{$domain}{$script}?{$qstring}";
# Create tiny URLs for the permalinks
$query = "SELECT permalink_id FROM permalinks WHERE permalink = '{$url}'";
$id = select_scalar($query);
if (is_null($id)) {
$query = "SELECT nextval('permalinks_permalink_id_seq')";
$id = select_scalar($query);
$insert = "INSERT INTO " . "permalinks (permalink_id, permalink) " . "VALUES ('{$id}', '{$url}');";
do_pg_query($insert);
}
$tinyurl = "http://{$domain}{$script}?do_redir={$id}";
# Print tiny link in a tiny window
$t = 50;
print "<html>\n" . display_header("Tiny link") . "<body>\n<div align=center>\n<p>The original permalink was " . strlen($url) . " chars long.\nHere's a tiny link that is only {$t} chars long:</p>\n\n<p><form name=url_form><code>\n<input type=text name=url value='{$tinyurl}' size={$t}\n onFocus=\"this.value='{$tinyurl}';\" readonly>\n</code>\n</form></p>\n\n<script language='javascript' type='text/javascript'>\ndocument.url_form.url.focus();\ndocument.url_form.url.select();\n</script>\n\n<p><form>\n<input type=button value='Close this window' onClick='javascript:window.close();'>\n</form></p>\n\n</div>\n</body>\n</html>";
exit;
}
示例7: display_header
<?php
// officers.php
// info on club officers
// TODO: fill in content
include_once './global/includes.php';
display_header("Officers", "");
echo "The officers of RPI Ambulance are listed below.";
display_footer();
示例8: display_header
<?php
include_once "./global/includes.php";
display_header("Edit User", "");
if (logged_in()) {
?>
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery.validate.js" type="text/javascript"></script>
<script src="additional-methods.js" type="text/javascript"></script>
<script src="jquery.validate.password.js" type="text/javascript"></script>
<script>
$(document).ready(function(){
$("#editUserForm").validate();
});
</script>
</head>
<body>
<?php
$newuser = FALSE;
include "global/processuser.php";
?>
<div id="new_user_form">
<form class="cmxform" id="editUserForm" method="post" action="">
<fieldset>
<legend>Edit user information</legend>
<p>
<label for="name">First Name</label>
示例9: display_header
<?php
// events.php
// page for event scheduling
// TODO: fill in content
include_once "./global/includes.php";
display_header("Events", "");
display_footer();
示例10: MBeanServer
* Summary of caching
*/
require_once "WEB-INF/php/inc.php";
$mbeanServer = new MBeanServer();
$resin = $mbeanServer->lookup("resin:type=Resin");
$server = $mbeanServer->lookup("resin:type=Server");
$block_cache = $mbeanServer->lookup("resin:type=BlockManager");
$proxy_cache = $mbeanServer->lookup("resin:type=ProxyCache");
$title = "Resin: Cache";
if (!empty($server->Id)) {
$title = $title . " for server " . $server->Id;
}
?>
<?php
display_header("cache.php", $title, $server->Id);
?>
<h2>Server: <?php
echo $server->Id;
?>
</h2>
<table class="data">
<tr title="Percentage of requests that have been served from the proxy cache:">
<th>Proxy cache miss ratio:</th>
<td><?php
echo format_miss_ratio($proxy_cache->HitCountTotal, $proxy_cache->MissCountTotal);
?>
</td>
</tr>
示例11: Copyright
<?php
/*
Copyright (©) 2003-2014 Teus Benschop.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
include "utils.php";
display_header(false);
display_paragraph("Welcome to the Bibledit-Web installation.");
open_paragraph();
display_link("step.php", "Go!");
close_paragraph();
display_footer();
示例12: display_header
<?php
/**
* the index file.
*
* It displays the login form or the user's menu/mainpage
*
* \author Kevin Richardson <borismalcov@users.sourceforge.net>
* \version $Id: index.php,v 1.3 2006/07/19 19:54:52 borismalcov Exp $
*/
include "lib/main.php";
display_header("phpmygrades: main");
if (is_logged_in() == TRUE) {
display_mainpage();
} else {
print "\n<div class=\"title\">phpmygrades</div>\n\n<div class=\"container2\">\n<div class=\"right\"><a href=\"news.php?xml&class=0\" title=\"RSS feed for global news\"><img src=\"images/xml.gif\" alt=\"RSS Feed\" /></a></div>\n<div class=\"news_background\">\n";
print_news_html(0, 3);
print "\n</div>\n<hr class=\"mainpagehr\" />\n<table>\n<form action=\"login.php\" method=\"post\" name=\"login_form\">\n<tr><td>username:</td><td><input type=\"text\" name=\"user\" maxlength=\"30\" /></td></tr>\n<tr><td>password:</td><td><input type=\"password\" name=\"pass\" maxlength=\"70\" /></td></tr>\n<tr><td><input type=\"submit\" name=\"login\" value=\"login\" /></td></tr>\n<tr><td colspan=\"2\" class=\"right\"><small><i><a href=\"recoverpass.php\" title=\"forget your password?\">Forget your password</a>?</i></small></td></tr>\n</form>\n</table>\n</div>\n";
display_copyright();
display_footer();
}
示例13: cust_die
<?php
/**
* the attendance tracking script
*
* \author Kevin Richardson <borismalcov@users.sourceforge.net>
* \version $Id: attendance.php,v 1.6 2006/07/19 19:54:52 borismalcov Exp $
* \todo turn some of the following into functions; a lot of it is reused a lot
*/
include "lib/main.php";
if (track_attendance == 0) {
$_SESSION['not_this_page'] = 1;
cust_die("The attendance features are currently disabled by the administrator.");
}
display_header("attendance");
display_menu();
print "<div class=\"container2\">";
if (user_type() == "user") {
// I suppose we can show 'em the days they were absent on...
$ID = $_SESSION['id'];
connect_sql();
$absences = @query("SELECT * FROM `absences` WHERE `user_ID`='{$ID}'");
$number_of_absences = num_rows($absences);
print "<table id=\"absencestable\">\n";
print "<tr><th>You have been absent {$number_of_absences} time";
if ($number_of_absences != 1) {
print "s";
}
if ($number_of_absences != 0) {
print ":";
}
示例14: main_page
function main_page()
{
display_header();
?>
<div id="xinfo">
<div id="infotxt">Enter a ticker symbol to get various analyses. Currently supports S&P 500 companies only.</div>
</div>
<?php
display_footer();
}
示例15: display_header
<?php
/**
* allows a user to recover his or her password
*
* \author Kevin Richardson <borismalcov@users.sourceforge.net>
* \version $Id: recoverpass.php,v 1.5 2006/07/19 19:54:52 borismalcov Exp $
*/
include "lib/main.php";
display_header("phpmygrades: forget your password?");
print "<div class=\"title\">recover your password</div>\n<div class=\"container2\">";
if (isset($_GET['email'])) {
print "Type your e-mail address into the box below and click on the send button. You'll be sent an e-mail containing information on how to reset your password.<br /><br /><table><form action=\"recoverpass.php\" method=\"post\"><tr><th>E-mail address:</th><td><input type=\"text\" name=\"email\" /></td></tr><tr><td><input type=\"submit\" name=\"sendemail\" value=\"send\" /></td></tr></form></table>";
} elseif (isset($_POST['sendemail'])) {
$email = escape_string($_POST['email']);
if (is_valid_email($email) == FALSE) {
cust_die("That is not a valid e-mail address.");
}
// see if it's in the database
connect_sql();
$query = "SELECT 1 FROM `users` WHERE `email`='{$email}' LIMIT 1";
$query = @query($query) or die("Error checking the database.");
if (num_rows($query) == 0) {
cust_die("No user has that e-mail address.");
}
$string = gen_string($email);
$there = "SELECT 1 FROM `pass_recovery` WHERE `email`='{$email}' LIMIT 1";
$there = @query($there) or die("Error checking the database.");
if (num_rows($there) == 0) {
$query = "INSERT INTO `pass_recovery` (`email`, `hash`) VALUES ('{$email}', 'string')";
} else {