本文整理汇总了PHP中html_header函数的典型用法代码示例。如果您正苦于以下问题:PHP html_header函数的具体用法?PHP html_header怎么用?PHP html_header使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了html_header函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: redirect
function redirect($url, $hiddenUrl)
{
header("Location: {$url}");
html_header();
echo 'This page has moved to <a href="' . $hiddenUrl . '">HERE :)</a>';
exit;
}
示例2: printoutPreview
function printoutPreview () {
echo html_header($this->config);
echo $this->toStringPreview();
echo html_footer();
}
示例3: html_header_demo
function html_header_demo($title = null, $included_files = null, $path = null, $no_cache = true)
{
$hash = array('Home' => fbWeb::getWebRoot(), 'Demos' => fbWeb::getWebRoot() . '/demo');
if ($title) {
$hash[$title] = '';
}
return html_header($hash, $included_files, $path, $no_cache);
}
示例4: printoutPreview
function printoutPreview ($args) {
if ($this->config->getValue("Main", "wholesite"))
echo html_header($this->config);
require_once($GLOBALS["RELATIVE_PATH_EXTERN"]
. "/modules/views/ExternSemLectureTree.class.php");
$tree = new ExternSemLectureTree($this->config, $args["start_item_id"]);
$tree->showSemTree();
if ($this->config->getValue("Main", "wholesite"))
echo html_footer();
}
示例5: cookie_check
function cookie_check()
{
global $cfg;
if (!isset($_SESSION['cookie_check'])) {
if (isset($_GET['cookie_check'])) {
html_header("Cookie Support Required");
echo "<p>Cookies are not supported by your browser. " . "Please enable cookies and <a href=\"" . selflink() . "\">try again</a>.</p>";
html_footer();
exit;
} else {
$_SESSION['cookie_check'] = 1;
redirect(selflink('cookie_check=1'));
}
}
}
示例6: account_header
function account_header($title)
{
global $PHP_SELF, $LOGIN_USER, $LOGIN_LEVEL;
html_header("{$title}");
html_start_links(1);
html_link("{$LOGIN_USER}", "{$PHP_SELF}");
html_link("Change Password", "{$PHP_SELF}?P");
if ($LOGIN_LEVEL == AUTH_ADMIN) {
html_link("Manage Accounts", "{$PHP_SELF}?A");
}
if ($LOGIN_LEVEL > AUTH_USER) {
html_link("New/Pending", "{$PHP_SELF}?L");
}
html_link("Logout", "{$PHP_SELF}?X");
html_end_links();
}
示例7: makeHtaccess
function makeHtaccess()
{
global $scriptPath, $baseURL;
if (is_file($scriptPath . ".htaccess")) {
return;
}
$htaccess = <<<EOF
Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteRule ^bbclone/.*\$ - [PT]
RewriteRule ^([^_]+)_player/(.*)\$ index.php?command=\$1_player&dir=\$2 [NC,L]
RewriteRule ^rss/(.*)\$ index.php?command=rss&dir=\$1 [NC,L]
RewriteRule ^slide/(.*)\$ index.php?command=slide&dir=\$1 [NC,L]
RewriteRule ^thumbs/(.*)\$ index.php?command=thumbs&dir=\$1 [NC,L]
RewriteRule ^captions/(.*)\$ index.php?command=captions&dir=\$1 [NC,L]
RewriteRule ^(.*)/\$ index.php?command=gallery&dir=\$1
RewriteRule ^\$ index.php?command=gallery&dir=
EOF;
if (!is_writable($scriptPath)) {
$who = exec('whoami');
html_header("Permissions Error");
echo "{$scriptPath} is not writable by {$who}. Can not create required .htaccess file.";
html_footer();
exit;
}
@file_put_contents($scriptPath . ".htaccess", $htaccess);
header("Location: {$baseURL}");
exit("Unknown Error. Please press refresh.");
}
示例8: host_edit
function host_edit() {
global $colors, $fields_host_edit, $reindex_types;
display_output_messages();
if (!empty($_GET["id"])) {
$host = db_fetch_row("select * from host where id=" . $_GET["id"]);
$header_label = "[edit: " . $host["description"] . "]";
}else{
$header_label = "[new]";
}
if (!empty($host["id"])) {
?>
<table width="98%" align="center">
<tr>
<td class="textInfo" colspan="2">
<?php print $host["description"];?> (<?php print $host["hostname"];?>)
</td>
</tr>
<tr>
<td class="textHeader">
SNMP Information<br>
<span style="font-size: 10px; font-weight: normal; font-family: monospace;">
<?php
if (($host["snmp_community"] == "") && ($host["snmp_username"] == "")) {
print "<span style='color: #ab3f1e; font-weight: bold;'>SNMP not in use</span>\n";
}else{
$snmp_system = cacti_snmp_get($host["hostname"], $host["snmp_community"], ".1.3.6.1.2.1.1.1.0", $host["snmp_version"], $host["snmp_username"], $host["snmp_password"], $host["snmp_port"], $host["snmp_timeout"], SNMP_WEBUI);
if ($snmp_system == "") {
print "<span style='color: #ff0000; font-weight: bold;'>SNMP error</span>\n";
}else{
$snmp_uptime = cacti_snmp_get($host["hostname"], $host["snmp_community"], ".1.3.6.1.2.1.1.3.0", $host["snmp_version"], $host["snmp_username"], $host["snmp_password"], $host["snmp_port"], $host["snmp_timeout"], SNMP_WEBUI);
$snmp_hostname = cacti_snmp_get($host["hostname"], $host["snmp_community"], ".1.3.6.1.2.1.1.5.0", $host["snmp_version"], $host["snmp_username"], $host["snmp_password"], $host["snmp_port"], $host["snmp_timeout"], SNMP_WEBUI);
print "<strong>System:</strong> $snmp_system<br>\n";
print "<strong>Uptime:</strong> $snmp_uptime<br>\n";
print "<strong>Hostname:</strong> $snmp_hostname<br>\n";
}
}
?>
</span>
</td>
<td class="textInfo" valign="top">
<span style="color: #c16921;">*</span><a href="graphs_new.php?host_id=<?php print $host["id"];?>">Create Graphs for this Host</a>
</td>
</tr>
</table>
<br>
<?php
}
html_start_box("<strong>Devices</strong> $header_label", "98%", $colors["header"], "3", "center", "");
/* preserve the host template id if passed in via a GET variable */
if (!empty($_GET["host_template_id"])) {
$fields_host_edit["host_template_id"]["value"] = $_GET["host_template_id"];
}
draw_edit_form(array(
"config" => array("form_name" => "chk"),
"fields" => inject_form_variables($fields_host_edit, (isset($host) ? $host : array()))
));
html_end_box();
if ((isset($_GET["display_dq_details"])) && (isset($_SESSION["debug_log"]["data_query"]))) {
html_start_box("<strong>Data Query Debug Information</strong>", "98%", $colors["header"], "3", "center", "");
print "<tr><td><span style='font-family: monospace;'>" . debug_log_return("data_query") . "</span></td></tr>";
html_end_box();
}
if (!empty($host["id"])) {
html_start_box("<strong>Associated Graph Templates</strong>", "98%", $colors["header"], "3", "center", "");
html_header(array("Graph Template Name", "Status"), 2);
$selected_graph_templates = db_fetch_assoc("select
graph_templates.id,
graph_templates.name
from graph_templates,host_graph
where graph_templates.id=host_graph.graph_template_id
and host_graph.host_id=" . $_GET["id"] . "
order by graph_templates.name");
$available_graph_templates = db_fetch_assoc("SELECT
graph_templates.id, graph_templates.name
FROM snmp_query_graph RIGHT JOIN graph_templates
ON snmp_query_graph.graph_template_id = graph_templates.id
WHERE (((snmp_query_graph.name) Is Null)) ORDER BY graph_templates.name");
$i = 0;
if (sizeof($selected_graph_templates) > 0) {
foreach ($selected_graph_templates as $item) {
$i++;
//.........这里部分代码省略.........
示例9: dirname
WideImage is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
WideImage 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with WideImage; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
**/
require_once dirname(__FILE__) . '/helpers/common.inc.php';
html_header('Get channels');
$chans = array('R' => false, 'G' => false, 'B' => false, 'A' => false);
foreach ($chans as $chan => $value) {
$chans[$chan] = Request::getInt($chan, false);
}
?>
<form action="?" method="get">
<table>
<tr>
<td>
channels:
<?php
foreach ($chans as $chan => $value) {
if ($value) {
示例10: frameset
function frameset()
{
global $path_info, $leftFrameWidth;
if (!isset($leftFrameWidth)) {
$leftFrameWidth = 300;
}
html_header();
echo "\r\n <frameset cols=\"" . $leftFrameWidth . ",*\" framespacing=\"0\">\r\n <frameset rows=\"0,*\" framespacing=\"0\" frameborder=\"0\">\r\n <frame src=\"" . $path_info["basename"] . "?frame=1\" name=frame1 border=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\">\r\n <frame src=\"" . $path_info["basename"] . "?frame=2\" name=frame2 border=\"0\" marginwidth=\"0\" marginheight=\"0\">\r\n </frameset>\r\n <frame src=\"" . $path_info["basename"] . "?frame=3\" name=frame3 border=\"0\" marginwidth=\"0\" marginheight=\"0\">\r\n </frameset>\r\n </html>";
}
示例11: edit
function edit ($file) {
global $self, $directory, $editcols, $editrows, $apache, $htpasswd, $htaccess;
html_header();
echo '<h2 style="margin-bottom: 3pt">' . html($file) . '</h2>
<form action="' . $self . '?tool=Files" method="post">
<table class="dialog">
<tr>
<td class="dialog">
<textarea name="content" cols="' . $editcols . '" rows="' . $editrows . '" WRAP="off">';
if (array_key_exists('content', $_POST)) {
echo $_POST['content'];
} else {
$f = fopen($file, 'r');
while (!feof($f)) {
echo html(fread($f, 8192));
}
fclose($f);
}
if (!empty($_POST['user'])) {
echo "\n" . $_POST['user'] . ':' . crypt($_POST['password']);
}
if (!empty($_POST['basic_auth'])) {
if ($win) {
$authfile = str_replace('\\', '/', $directory) . $htpasswd;
} else {
$authfile = $directory . $htpasswd;
}
echo "\nAuthType Basic\nAuthName "Restricted Directory"\n";
echo 'AuthUserFile "' . html($authfile) . ""\n";
echo 'Require valid-user';
}
echo '</textarea>
<hr />
';
if ($apache && basename($file) == $htpasswd) {
echo '
' . word('user') . ': <input type="text" name="user" />
' . word('password') . ': <input type="password" name="password" />
<input type="submit" value="' . word('add') . '" />
<hr />
';
}
if ($apache && basename($file) == $htaccess) {
echo '
<input type="submit" name="basic_auth" value="' . word('add_basic_auth') . '" />
<hr />
';
}
echo '
<input type="hidden" name="action" value="edit" />
<input type="hidden" name="file" value="' . html($file) . '" />
<input type="hidden" name="dir" value="' . html($directory) . '" />
<input type="reset" value="' . word('reset') . '" id="red_button" />
<input type="submit" name="save" value="' . word('save') . '" id="green_button" style="margin-left: 50px" />
</td>
</tr>
</table>
<p><a href="' . $self . '?tool=Files&dir=' . urlencode($directory) . '">[ ' . word('back') . ' ]</a></p>
</form>
';
html_footer();
}
示例12: handle_basic_auth
$author = handle_basic_auth();
} elseif ($authmethod === 'htpasswd') {
$author = handle_htpasswd_auth();
}
@ob_end_clean();
flush();
$dir = $repos[$defaultrepo];
if (!chdir($dir)) {
exit('directory not found: ' . $dir);
}
$_handles = array();
$_handlecount = 0;
$md5_empty_string = 'd41d8cd98f00b204e9800998ecf8427e';
$sha1_empty_string = 'da39a3ee5e6b4b0d3255bfef95601890afd80709';
$somethingstaged = false;
echo html_header();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (isset($_POST['commit_message'])) {
$commit_message = $_POST['commit_message'];
} else {
$commit_message = '';
}
debug($_POST);
if (isset($_POST['change_staged']) && $_POST['change_staged'] && isset($_POST['statushash']) && $_POST['statushash']) {
handle_change_staged_req();
} elseif (isset($_POST['commit']) && $_POST['commit'] && isset($_POST['statushash']) && $_POST['statushash'] && isset($_POST['commit_message']) && $_POST['commit_message'] != '') {
handle_commit_req();
} elseif (isset($_POST['refresh']) && $_POST['refresh']) {
handle_refresh_req();
} elseif (isset($_POST['pull']) && $_POST['pull']) {
handle_pull_req();
示例13: package_edit
function package_edit() {
$_package_id = get_get_var_number("id");
if (empty($_package_id)) {
$header_label = "[new]";
}else{
$package = api_package_get($_package_id);
/* get a list of each graph template that is associated with this package */
$graph_templates = api_package_graph_template_list($_package_id);
/* get a list of all of the metadata associated with a particular package */
$metadata_items = api_package_metadata_list($_package_id);
$header_label = "[edit: " . $package["name"] . "]";
}
form_start("packages.php", "form_package");
/* ==================== Box: Template Packages ==================== */
html_start_box("<strong>" . _("Template Packages") . "</strong> $header_label");
_package_field__name("name", (isset($package["name"]) ? $package["name"] : ""), "0");
_package_field__description("description", (isset($package["description"]) ? $package["description"] : ""), "0");
_package_field__description_install("description_install", (isset($package["description_install"]) ? $package["description_install"] : ""), "0");
_package_field__category("category", (isset($package["category"]) ? $package["category"] : ""), "0");
_package_field__subcategory("subcategory", (isset($package["subcategory"]) ? $package["subcategory"] : ""), "0");
_package_field__vendor("vendor", (isset($package["vendor"]) ? $package["vendor"] : ""), "0");
_package_field__model("model", (isset($package["model"]) ? $package["model"] : ""), "0");
_package_field__author_hdr();
_package_field__author_type("author_type", (isset($package) ? "existing" : "new"), "0");
_package_author_field__name("author_name", (isset($package["author_name"]) ? $package["author_name"] : ""), "0");
_package_author_field__email("author_email", (isset($package["author_email"]) ? $package["author_email"] : ""), "0");
_package_author_field__user_forum("author_user_forum", (isset($package["author_user_forum"]) ? $package["author_user_forum"] : ""), "0");
_package_author_field__user_repository("author_user_repository", (isset($package["author_user_repository"]) ? $package["author_user_repository"] : ""), "0");
_package_author_type_js();
html_end_box();
if (!empty($_package_id)) {
/* ==================== Box: Associated Graph Templates ==================== */
html_start_box("<strong>" . _("Associated Graph Templates") . "</strong>");
html_header(array(_("Template Title")), 2);
if (sizeof($graph_templates) > 0) {
foreach ($graph_templates as $graph_template) {
?>
<tr class="item">
<td style="padding: 4px;">
<?php echo $graph_template["template_name"];?>
</td>
<td align="right" style="padding: 4px;">
<a href="packages.php?action=remove_graph_template&id=<?php echo $_package_id;?>&graph_template_id=<?php echo $graph_template["id"];?>"><img src="<?php echo html_get_theme_images_path("delete_icon_large.gif");?>" alt="<?php echo _("Delete Graph Template Association");?>" border="0" align="absmiddle"></a>
</td>
</tr>
<?php
}
}else{
?>
<tr class="empty">
<td colspan="2">
No graph templates have been associated with this package.
</td>
</tr>
<?php
}
?>
<tr>
<td style="border-top: 1px solid #b5b5b5; padding: 1px;" colspan="2">
<table width="100%" cellpadding="2" cellspacing="0">
<tr>
<td>
Add graph template:
<?php form_dropdown("assoc_graph_template_id", api_graph_template_list(), "template_name", "id", "", "", "");?>
</td>
<td align="right">
<input type="image" src="<?php echo html_get_theme_images_path('button_add.gif');?>" alt="<?php echo _('Add');?>" name="assoc_graph_template_add" align="absmiddle">
</td>
</tr>
</table>
</td>
</tr>
<?php
html_end_box();
/* ==================== Box: Associated Meta Data ==================== */
html_start_box("<strong>" . _("Associated Meta Data") . "</strong>", "packages.php?action=edit_metadata&package_id=$_package_id");
html_header(array(_("Name"), _("Type")), 2);
if (sizeof($metadata_items) > 0) {
$metadata_types = api_package_metadata_type_list();
foreach ($metadata_items as $metadata_item) {
?>
//.........这里部分代码省略.........
示例14: printoutPreview
function printoutPreview () {
if ($this->config->getValue("Main", "wholesite"))
echo html_header($this->config);
if (!$language = $this->config->getValue("Main", "language"))
$language = "de_DE";
init_i18n($language);
include($GLOBALS["RELATIVE_PATH_EXTERN"]
. "/modules/views/persondetails_preview.inc.php");
if ($this->config->getValue("Main", "wholesite"))
echo html_footer();
}
示例15: html_header
<?php
require_once "common-multi.php";
html_header("CSV: Generador de personal a honorarios");
?>
La siguiente planilla le permitirá elaborar el listado de la dotación de personal de su organización.
<br/><br/>
Art. 7-d: Personal de Honorarios, con sus correspondientes remuneraciones.
<br/><br/>
Paso 1: Descargue la planilla en alguno de los siguientes formatos :
<ul>
<li><a href="honorarios.xls" target="_NEW">honorarios.xls</a>,
formato Microsoft Excel 97/XP.</li>
<li><a href="honorarios.ods" target="_NEW">honorarios.ods</a>,
formato OpenOffice Calc 2.0.</li>
<li><a href="honorarios.csv" target="_NEW">honorarios.csv</a>,
formato CSV delimitado por punto y comas (;).</li>
</ul>
Paso 2: Complete la planilla con los datos solicitados en cada columna,
de acuerdo a lo dispuesto en el artículo 7-d de la ley N° 20.285.
<br/><br/>
Paso 3: Guarde su planilla Microsoft Excel u OpenOffice Calc, en formato CSV.
Los archivos CSV (del inglés <i>comma separated values</i>) son un tipo
de documento sencillo para representar datos en forma de tabla.
<br/><br/>
Paso 4: Presione Examinar y seleccione el archivo CSV.
<br/><br/>
Paso 5: Presione "Procesar" para acceder a los descargables de "Dotación de Personal a Honorarios".