本文整理汇总了PHP中htmlHeader函数的典型用法代码示例。如果您正苦于以下问题:PHP htmlHeader函数的具体用法?PHP htmlHeader怎么用?PHP htmlHeader使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了htmlHeader函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderUsersView
public function renderUsersView()
{
$userModel = $this->container->get('UserModel');
htmlHeader('users');
require VIEW_DIR . '/menu.php';
require VIEW_DIR . '/users.php';
htmlFooter();
}
示例2: ModuleHandler
/**
* prepares variables to use in moduleHandler
* @param string $module name of module
* @param string $act name of action
* @param int $mid
* @param int $document_srl
* @param int $module_srl
* @return void
**/
function ModuleHandler($module = '', $act = '', $mid = '', $document_srl = '', $module_srl = '')
{
// If XE has not installed yet, set module as install
if (!Context::isInstalled()) {
$this->module = 'install';
$this->act = Context::get('act');
return;
}
// Set variables from request arguments
$this->module = $module ? $module : Context::get('module');
$this->act = $act ? $act : Context::get('act');
$this->mid = $mid ? $mid : Context::get('mid');
$this->document_srl = $document_srl ? (int) $document_srl : (int) Context::get('document_srl');
$this->module_srl = $module_srl ? (int) $module_srl : (int) Context::get('module_srl');
$this->entry = Context::convertEncodingStr(Context::get('entry'));
// Validate variables to prevent XSS
$isInvalid = null;
if ($this->module && !preg_match("/^([a-z0-9\\_\\-]+)\$/i", $this->module)) {
$isInvalid = true;
}
if ($this->mid && !preg_match("/^([a-z0-9\\_\\-]+)\$/i", $this->mid)) {
$isInvalid = true;
}
if ($this->act && !preg_match("/^([a-z0-9\\_\\-]+)\$/i", $this->act)) {
$isInvalid = true;
}
if ($isInvalid) {
htmlHeader();
echo Context::getLang("msg_invalid_request");
htmlFooter();
Context::close();
exit;
}
if (isset($this->act) && substr($this->act, 0, 4) == 'disp') {
if (Context::get('_use_ssl') == 'optional' && Context::isExistsSSLAction($this->act) && $_SERVER['HTTPS'] != 'on') {
header('location:https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
return;
}
}
// execute addon (before module initialization)
$called_position = 'before_module_init';
$oAddonController =& getController('addon');
$addon_file = $oAddonController->getCacheFilePath(Mobile::isFromMobilePhone() ? 'mobile' : 'pc');
@(include $addon_file);
}
示例3: procTrackbackSend
/**
* Trackbacks sent
* @return object
*/
function procTrackbackSend()
{
// Yeokingeul to post numbers and shipping addresses Wanted
$document_srl = Context::get('target_srl');
$trackback_url = Context::get('trackback_url');
$charset = Context::get('charset');
if (!$document_srl || !$trackback_url || !$charset) {
return new Object(-1, 'msg_invalid_request');
}
// Login Information Wanted
$logged_info = Context::get('logged_info');
if (!$logged_info->member_srl) {
return new Object(-1, 'msg_not_permitted');
}
// Posts of the information obtained permission to come and check whether
$oDocumentModel =& getModel('document');
$oDocument = $oDocumentModel->getDocument($document_srl);
if (!$oDocument->isExists() || !$oDocument->getSummary()) {
return new Object(-1, 'msg_invalid_request');
}
if ($oDocument->getMemberSrl() != $logged_info->member_srl) {
return new Object(-1, 'msg_not_permitted');
}
// Specify the title of the module, the current article
$oModuleModel =& getModel('module');
$module_info = $oModuleModel->getModuleInfoByModuleSrl($oDocument->get('module_srl'));
Context::setBrowserTitle($module_info->browser_title);
// Shipping yeokingeul
$output = $this->sendTrackback($oDocument, $trackback_url, $charset);
if ($output->toBool() && !in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON'))) {
global $lang;
htmlHeader();
alertScript($lang->success_registed);
reload(true);
closePopupScript();
htmlFooter();
Context::close();
exit;
}
return $output;
}
示例4: shareHtml
function shareHtml($htmlUrl)
{
$serverPath = $_SERVER['DOCUMENT_ROOT'] . "/web_test/image_test/upload_html/";
// echo 'path: '.$serverPath.$htmlUrl;
if (!file_exists($serverPath . $htmlUrl)) {
// file check
echo 'file not found';
exit;
}
htmlHeader();
$toDeleteString = ":8080";
$toReplaceString = "";
$myfile = fopen($serverPath . $htmlUrl, "r") or die("Unable to open file!");
// Output one line until end-of-file
while (!feof($myfile)) {
// echo str_replace($toDeleteString, $toReplaceString, fgets($myfile)) . "<br>";
echo fgets($myfile) . "<br>";
}
fclose($myfile);
htmlFooter();
}
示例5: checkSSO
/**
* Single Sign On (SSO)
*
* @return bool True : Module handling is necessary in the control path of current request , False : Otherwise
*/
public function checkSSO()
{
// pass if it's not GET request or XE is not yet installed
if ($this->db_info->use_sso != 'Y' || isCrawler()) {
return TRUE;
}
$checkActList = array('rss' => 1, 'atom' => 1);
if (self::getRequestMethod() != 'GET' || !self::isInstalled() || isset($checkActList[self::get('act')])) {
return TRUE;
}
// pass if default URL is not set
$default_url = trim($this->db_info->default_url);
if (!$default_url) {
return TRUE;
}
if (substr_compare($default_url, '/', -1) !== 0) {
$default_url .= '/';
}
// Get current site information (only the base URL, not the full URL)
$current_site = self::getRequestUri();
// Step 1: if the current site is not the default site, send SSO validation request to the default site
if ($default_url !== $current_site && !self::get('SSOID') && $_COOKIE['sso'] !== md5($current_site)) {
// Set sso cookie to prevent multiple simultaneous SSO validation requests
setcookie('sso', md5($current_site), 0, '/');
// Redirect to the default site
$redirect_url = sprintf('%s?return_url=%s', $default_url, urlencode(base64_encode($current_site)));
header('Location:' . $redirect_url);
return FALSE;
}
// Step 2: receive and process SSO validation request at the default site
if ($default_url === $current_site && self::get('return_url')) {
// Get the URL of the origin site
$url = base64_decode(self::get('return_url'));
$url_info = parse_url($url);
// Check that the origin site is a valid site in this XE installation (to prevent open redirect vuln)
if (!getModel('module')->getSiteInfoByDomain(rtrim($url, '/'))->site_srl) {
htmlHeader();
echo self::getLang("msg_invalid_request");
htmlFooter();
return FALSE;
}
// Redirect back to the origin site
$url_info['query'] .= ($url_info['query'] ? '&' : '') . 'SSOID=' . session_id();
$redirect_url = sprintf('%s://%s%s%s%s', $url_info['scheme'], $url_info['host'], $url_info['port'] ? ':' . $url_info['port'] : '', $url_info['path'], $url_info['query'] ? '?' . $url_info['query'] : '');
header('Location:' . $redirect_url);
return FALSE;
}
// Step 3: back at the origin site, set session ID to be the same as the default site
if ($default_url !== $current_site && self::get('SSOID')) {
// Check that the session ID was given by the default site (to prevent session fixation CSRF)
if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], $default_url) !== 0) {
htmlHeader();
echo self::getLang("msg_invalid_request");
htmlFooter();
return FALSE;
}
// Set session ID
setcookie(session_name(), self::get('SSOID'));
// Finally, redirect to the originally requested URL
$url_info = parse_url(self::getRequestUrl());
$url_info['query'] = preg_replace('/(^|\\b)SSOID=([^&?]+)/', '', $url_info['query']);
$redirect_url = sprintf('%s://%s%s%s%s', $url_info['scheme'], $url_info['host'], $url_info['port'] ? ':' . $url_info['port'] : '', $url_info['path'], $url_info['query'] ? '?' . $url_info['query'] : '');
header('Location:' . $redirect_url);
return FALSE;
}
// If none of the conditions above apply, proceed normally
return TRUE;
}
示例6: trueFalse
if (eregi('/phpinfo/', ini_get('disable_functions'))) {
$diag_mesgs .= "phpinfo() function is disabled<br />\n";
} else {
$diag_mesgs .= "phpinfo() function is enabled<br />\n";
}
$diag_mesgs .= '$convert_writable is ' . trueFalse($convert_writable) . ', ' . '$convert_readable is ' . trueFalse($convert_readable) . ', ' . '$reqd_view is ' . $reqd_view . "<br />\n" . '$thmbs_ena is ' . trueFalse($thmbs_ena) . ', ' . '$namelinks_ena is ' . trueFalse($namelinks_ena) . ', ' . '$check_security is ' . trueFalse($check_security) . "<br />\n" . '$is_readable_disa is ' . trueFalse($is_readable_disa) . ', ' . '$file_exists_disa is ' . trueFalse($file_exists_disa) . ', ' . '$compat_quote is ' . trueFalse($compat_quote) . "<br /></span>\n";
}
/*
+----------+
| Output |
+----------+
*/
/**
* Echo an HTML header if the script is running stand-alone.
*/
echo htmlHeader($header);
/**
* Image is a popup target (experimental).
*/
if (@$get_vars['Qtmp'] == 'popup') {
echo displayImage($reqd_image, $img_sz_labels);
echo footerRow();
echo htmlFooter($header);
exit;
}
/**
* Open the Qdig gallery table.
*/
// For injecting some output ahead of the gallery
if (isset($pre_gallery)) {
echo $pre_gallery;
示例7: procCommunicationAddFriendGroup
/**
* Add a group of friends
* @return void|Object (success : void, fail : Object)
**/
function procCommunicationAddFriendGroup()
{
// Check login information
if (!Context::get('is_logged')) {
return new Object(-1, 'msg_not_logged');
}
$logged_info = Context::get('logged_info');
// Variables
$args->friend_group_srl = trim(Context::get('friend_group_srl'));
$args->member_srl = $logged_info->member_srl;
$args->title = Context::get('title');
$args->title = htmlspecialchars($args->title);
if (!$args->title) {
return new Object(-1, 'msg_invalid_request');
}
// modify if friend_group_srl exists.
if ($args->friend_group_srl) {
$output = executeQuery('communication.renameFriendGroup', $args);
$msg_code = 'success_updated';
// add if not exists
} else {
$output = executeQuery('communication.addFriendGroup', $args);
$msg_code = 'success_registed';
}
if (!$output->toBool()) {
if (!in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON'))) {
global $lang;
htmlHeader();
alertScript($lang->fail_to_registed);
closePopupScript();
htmlFooter();
Context::close();
exit;
} else {
return $output;
}
} else {
if (!in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON'))) {
global $lang;
htmlHeader();
alertScript($lang->success_registed);
reload(true);
closePopupScript();
htmlFooter();
Context::close();
exit;
} else {
$this->setMessage($msg_code);
}
}
}
示例8: articlePage
function articlePage($section, $filePath)
{
// -----[ CACHE LITE ]-----
// Cache Lite is optional but recommended as it rolls and stores the page as HTML
// and avoids having to rebuild the page everytime it is called. You will need to clear
// the cache if you update the page. You could create a seperate "clearcache.php" page.
// See: "/site/orgile/clearcache.php".
require_once 'Cache/Lite/Output.php';
$options = array('cacheDir' => '/srv/www/' . SITEURL . '/www/site/ramcache/', 'lifeTime' => '604800');
// Define cache directory and cache lifetime (168 hours).
$cache = new Cache_Lite_Output($options);
// Begin cache lite.
if (!$cache->start($filePath)) {
if (is_file($filePath)) {
$fileData = file_get_contents($filePath, NULL, NULL, 0, 1000);
// This reads the first 1000 chars for speed.
// Pulls details from .org file header.
$regex = '/^#\\+\\w*:(.*)/m';
preg_match_all($regex, $fileData, $matches);
$title = trim($matches[1][0]);
$author = trim($matches[1][1]);
$date = trim($matches[1][2]);
$date = date('c', cleanDate($date));
$description = trim($matches[1][3]);
$description = strip_tags($description);
// Create HTML header.
$htmlHeader = htmlHeader($date, $author, $description, $title, dropDash($section));
// Starts the object buffer.
ob_start();
pageHeader();
print '<div id="columnX">';
fetchOne($filePath, 'orgile');
print '</div>';
print '<div id="columnY">';
print '<aside>';
print '<div class="content">';
print '<h2><a href="/' . spaceDash($section) . '/" title="' . spaceDash($section) . '">' . spaceDash($section) . '</a>:</h2>';
print '<ul class="side">';
fetchSome($section, 'list', '0', 'sort');
// See function below.
print '</ul><br>';
print '</div>' . sideContent();
print '</aside>';
print '</div>';
pageFooter();
// End the object buffer.
$content = ob_get_contents();
ob_end_clean();
$content = $htmlHeader . $content;
}
// End: is_file($filePath).
print $content;
// End cache.
$cache->end();
}
// End: cache lite.
}
示例9: htmlHeader
<?php
/*
* Created by generator
*
*/
$this->load->helper('form');
$this->load->helper('url');
$this->load->helper('template');
?>
<html>
<head>
<?php
echo htmlHeader('Objet');
?>
</head>
<body>
<div class="container">
<div id="header">
<div class="span-18">
<img src="<?php
echo base_url() . "www/images/logo.png";
?>
" style="vertical-align:middle;">
</div>
<div class="column span-5 last" id="identification">
Utilisateur <i><?php
echo $this->session->userdata('user_name');
示例10: ModuleHandler
/**
* prepares variables to use in moduleHandler
* @param string $module name of module
* @param string $act name of action
* @param int $mid
* @param int $document_srl
* @param int $module_srl
* @return void
* */
function ModuleHandler($module = '', $act = '', $mid = '', $document_srl = '', $module_srl = '')
{
// If XE has not installed yet, set module as install
if (!Context::isInstalled()) {
$this->module = 'install';
$this->act = Context::get('act');
return;
}
$oContext = Context::getInstance();
if ($oContext->isSuccessInit == FALSE) {
$logged_info = Context::get('logged_info');
if ($logged_info->is_admin != "Y") {
$this->error = 'msg_invalid_request';
return;
}
}
// Set variables from request arguments
$this->module = $module ? $module : Context::get('module');
$this->act = $act ? $act : Context::get('act');
$this->mid = $mid ? $mid : Context::get('mid');
$this->document_srl = $document_srl ? (int) $document_srl : (int) Context::get('document_srl');
$this->module_srl = $module_srl ? (int) $module_srl : (int) Context::get('module_srl');
if ($entry = Context::get('entry')) {
$this->entry = Context::convertEncodingStr($entry);
}
// Validate variables to prevent XSS
$isInvalid = NULL;
if ($this->module && !preg_match("/^([a-z0-9\\_\\-]+)\$/i", $this->module)) {
$isInvalid = TRUE;
}
if ($this->mid && !preg_match("/^([a-z0-9\\_\\-]+)\$/i", $this->mid)) {
$isInvalid = TRUE;
}
if ($this->act && !preg_match("/^([a-z0-9\\_\\-]+)\$/i", $this->act)) {
$isInvalid = TRUE;
}
if ($isInvalid) {
htmlHeader();
echo Context::getLang("msg_invalid_request");
htmlFooter();
Context::close();
exit;
}
if (isset($this->act) && (strlen($this->act) >= 4 && substr_compare($this->act, 'disp', 0, 4) === 0)) {
if (Context::get('_use_ssl') == 'optional' && Context::isExistsSSLAction($this->act) && $_SERVER['HTTPS'] != 'on') {
if (Context::get('_https_port') != null) {
header('location:https://' . $_SERVER['HTTP_HOST'] . ':' . Context::get('_https_port') . $_SERVER['REQUEST_URI']);
} else {
header('location:https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
}
return;
}
}
// call a trigger before moduleHandler init
ModuleHandler::triggerCall('moduleHandler.init', 'before', $this);
// execute addon (before module initialization)
$called_position = 'before_module_init';
$oAddonController = getController('addon');
$addon_file = $oAddonController->getCacheFilePath(Mobile::isFromMobilePhone() ? 'mobile' : 'pc');
if (file_exists($addon_file)) {
include $addon_file;
}
}
示例11: htmlHeader
<?php
/*
* Created by generator
*
*/
$this->load->helper('form');
$this->load->helper('url');
$this->load->helper('template');
?>
<html>
<head>
<?php
echo htmlHeader('Editer un Login');
?>
</head>
<body>
<div class="container">
<div id="header">
<img src="<?php
echo base_url() . "www/images/logo.png";
?>
" style="vertical-align:middle;">
<?php
echo htmlNavigation($this->session->userdata('user_id') == 0);
?>
<div class="span-12"><h2><img src="<?php
示例12: htmlHeader
<?php
include_once 'app.php';
include_once 'navbar.php';
?>
<!DOCTYPE html>
<html>
<?php
htmlHeader('Guidance to Tutors of CAPP Co-Assessment of Presentations by Peers');
?>
<body>
<?php
navHeader();
?>
<div class="jumbotron">
<div class="container">
<h1>Guidance to Tutors</h1>
</div>
</div>
<div class="container">
<section>
<div class="page-header">
<h2>Concerns from Students</h2>
</div>
<p>
When asking students to conduct self and peer assessment, most of them resist. Such resistance is due to the following major reasons:
<ul>
<li>Most students think that their peers do not do the peer assessment fairly and responsibly.</li>
<li>Students feel that do not have sufficient knowledge and skill to assess their peers' work.</li>
<li>Students worry that if they gave low marks or negative comments to their classmates, their friendship with peers would be adversely affected.</li>
示例13: htmlHeader
<?php
/*
* Created by generator
*
*/
$this->load->helper('form');
$this->load->helper('url');
$this->load->helper('template');
?>
<html>
<head>
<?php
echo htmlHeader('Editer un champ');
?>
</head>
<body>
<div class="container">
<div class="prepend column span-15">
<h1><img src="<?php
echo base_url();
?>
www/images/logo.jpg"/ style="vertical-align:middle;"> Specs</h1>
</div>
<div class="column span-5 last">
Utilisateur <i><?php
echo $this->session->userdata('user_name');
示例14: redirect
/*
* Created on 06/04/2010
*
*/
$this->load->helper('form');
$this->load->helper('url');
$this->load->helper('template');
if ($this->session->userdata('user_id') == null) {
redirect('welcome/index');
}
?>
<html>
<head>
<?php
echo htmlHeader('Editer un projet');
?>
</head>
<body>
<div class="container">
<div class="prepend column span-15">
<h1><img src="<?php
echo base_url();
?>
www/images/logo.jpg"/ style="vertical-align:middle;"> Specs</h1>
</div>
<div class="column span-5 last">
Utilisateur <i><?php
echo $this->session->userdata('user_name');
示例15: redirect
* Created by generator
*
*/
$this->load->helper('form');
$this->load->helper('url');
$this->load->helper('template');
$this->load->helper('views');
if ($this->session->userdata('user_name') == "") {
redirect('welcome/index');
}
?>
<html>
<head>
<?php
echo htmlHeader('Editer un %%(self.displayName)%%');
?>
</head>
<body>
<!-- Start: page-top-outer -->
<div id="page-top-outer">
<!-- Start: page-top -->
<div id="page-top">
<!-- start logo -->
<div id="logo">
<a href=""><img src="<?php
echo base_url();
?>