當前位置: 首頁>>代碼示例>>PHP>>正文


PHP pageHeader函數代碼示例

本文整理匯總了PHP中pageHeader函數的典型用法代碼示例。如果您正苦於以下問題:PHP pageHeader函數的具體用法?PHP pageHeader怎麽用?PHP pageHeader使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了pageHeader函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: PageMain

function PageMain()
{
    global $TMPL, $LNG, $CONF, $db, $loggedIn, $settings;
    $feed = new feed();
    $feed->db = $db;
    $feed->url = $CONF['url'];
    if (isset($_SESSION['username']) && isset($_SESSION['password']) || isset($_COOKIE['username']) && isset($_COOKIE['password'])) {
        $verify = $loggedIn->verify();
        if ($verify['username']) {
            $feed->user = $verify;
            $feed->username = $verify['username'];
            $feed->id = $verify['idu'];
        }
    }
    $feed->per_page = $settings['qperpage'];
    $feed->categories = $feed->getCategories();
    $feed->time = $settings['time'];
    $feed->l_per_post = $settings['lperpost'];
    $TMPL_old = $TMPL;
    $TMPL = array();
    $skin = new skin('shared/rows');
    $rows = '';
    // If the $_GET keyword is empty [user]
    if ($_GET['q'] == '') {
        header("Location: " . $CONF['url'] . "/index.php?a=welcome");
    }
    if ($_GET['filter'] == 'tracks') {
        list($tracks, $error) = $feed->searchTracks(0, $_GET['q']);
        $TMPL['messages'] = $tracks;
    } elseif ($_GET['filter'] == 'playlists') {
        $playlist = $feed->getPlaylists(0, 2, $_GET['q']);
        $error = $feed->showError('no_results', 1);
        $TMPL['messages'] = empty($playlist) ? $error[0] : $playlist;
    } else {
        $TMPL['messages'] = $feed->getSearch(0, $settings['qperpage'], $_GET['q'], $_GET['filter']);
    }
    $rows = $skin->make();
    $skin = new skin('search/sidebar');
    $sidebar = '';
    $TMPL['trending'] = $feed->sidebarTrending($_GET['tag'], 10);
    $TMPL['filters'] = $feed->sidebarFilters($_GET['filter'], $_GET['q']);
    $TMPL['ad'] = generateAd($settings['ad6']);
    $sidebar = $skin->make();
    $TMPL = $TMPL_old;
    unset($TMPL_old);
    $TMPL['top'] = $top;
    $TMPL['rows'] = $rows;
    $TMPL['sidebar'] = $sidebar;
    if (isset($_GET['logout']) == 1) {
        $loggedIn->logOut();
        header("Location: " . $CONF['url'] . "/index.php?a=welcome");
    }
    $TMPL['url'] = $CONF['url'];
    $TMPL['title'] = $LNG['search'] . ' - ' . htmlspecialchars($_GET['q']) . ' - ' . $settings['title'];
    $TMPL['header'] = pageHeader($LNG['search'] . ' - ' . $_GET['q']);
    $skin = new skin('shared/content');
    return $skin->make();
}
開發者ID:Jeg72,項目名稱:php_sound,代碼行數:58,代碼來源:search.php

示例2: account

  somewhere you can get to it - though in real
  operations you'd want to make sure it wasn't
  accessible from the webserver!
  The name is the email address value provided
  as part of the service account (not your
  address!)
  Make sure the Books API is enabled on this
  account as well, or the call will fail.
 ************************************************/
$client_id = '<YOUR_CLIENT_ID>';
//Client ID
$service_account_name = '';
//Email Address
$key_file_location = '';
//key.p12
echo pageHeader("Service Account Access");
if (strpos($client_id, "googleusercontent") == false || !strlen($service_account_name) || !strlen($key_file_location)) {
    echo missingServiceAccountDetailsWarning();
    exit;
}
$client = new Google_Client();
$client->setApplicationName("Client_Library_Examples");
$service = new Google_Service_Books($client);
/************************************************
  If we have an access token, we can carry on.
  Otherwise, we'll get one with the help of an
  assertion credential. In other examples the list
  of scopes was managed by the Client, but here
  we have to list them manually. We also supply
  the service account
 ************************************************/
開發者ID:dasatti,項目名稱:dashboard,代碼行數:31,代碼來源:service-account.php

示例3: header

        header('Location: index.php?mode=admin&task=awardsActions&gc=' . $gc . '#actions');
    }
}
// get the awards
$actions = false;
$query = $DB->query("SELECT awardId, code, name, verb\n\t\t\t\t\tFROM `" . DB_PREFIX . "_Awards`\n\t\t\t\t\tWHERE game='" . $DB->real_escape_string($gc) . "'\n\t\t\t\t\tAND awardType='O'\n\t\t\t\t\tORDER BY code ASC");
if (SHOW_DEBUG && $DB->error) {
    var_dump($DB->error);
}
if ($query->num_rows > 0) {
    while ($result = $query->fetch_assoc()) {
        $actions[] = $result;
    }
}
$rcol = "row-dark";
pageHeader(array(l("Admin"), l('Action Awards')), array(l("Admin") => "index.php?mode=admin", l('Action Awards') => ''));
?>

<div id="sidebar">
	<h1><?php 
echo l('Options');
?>
</h1>
	<div class="left-box">
		<ul class="sidemenu">
			<li>
				<a href="index.php?mode=admin&task=gameoverview&code=<?php 
echo $gc;
?>
"><?php 
echo l('Back to game overview');
開發者ID:beporter,項目名稱:hlstats,代碼行數:31,代碼來源:awardsActions.inc.php

示例4: Google_Service_Urlshortener_Url

  If we're signed in and have a request to shorten
  a URL, then we create a new URL object, set the
  unshortened URL, and call the 'insert' method on
  the 'url' resource. Note that we re-store the
  access_token bundle, just in case anything
  changed during the request - the main thing that
  might happen here is the access token itself is
  refreshed if the application has offline access.
 ************************************************/
if ($client->getAccessToken() && isset($_GET['url'])) {
    $url = new Google_Service_Urlshortener_Url();
    $url->longUrl = $_GET['url'];
    $short = $service->url->insert($url);
    $_SESSION['access_token'] = $client->getAccessToken();
}
echo pageHeader("User Query - URL Shortener");
if ($client_id == '<YOUR_CLIENT_ID>' || $client_secret == '<YOUR_CLIENT_SECRET>' || $redirect_uri == '<YOUR_REDIRECT_URI>') {
    echo missingClientSecretsWarning();
}
?>
<div class="box">
  <div class="request">
    <?php 
if (isset($authUrl)) {
    ?>
      <a class='login' href='<?php 
    echo $authUrl;
    ?>
'>Connect Me!</a>
    <?php 
} else {
開發者ID:dev981,項目名稱:gaptest,代碼行數:31,代碼來源:user-example.php

示例5: pageHeader

/**
 * page_admin.php
 *
 * Copyright 2008- Samuli Järvelä
 * Released under GPL License.
 *
 * License: http://www.mollify.org/license.php
 */
include "install/installation_page.php";
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
	<?php 
pageHeader("Mollify Installation", "init");
?>
	
	<body id="page-admin">
		<?php 
pageBody("Installation", "2/2 Administrator User");
?>

		<div class="content">
			<h2>
				Mollify requires an administrator user:
			</h2>
			<p>
				<form id="admin-user">
					<div class='user-data' id='admin-username'>
						<div class='title'>User name:</div>
開發者ID:kumarsivarajan,項目名稱:mollify,代碼行數:31,代碼來源:page_admin.php

示例6: pageHeader

 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
include_once __DIR__ . '/../vendor/autoload.php';
include_once "templates/base.php";
echo pageHeader("Retrieving An Id Token");
/*************************************************
 * Ensure you've downloaded your oauth credentials
 ************************************************/
if (!($oauth_credentials = getOAuthCredentialsFile())) {
    echo missingOAuth2CredentialsWarning();
    return;
}
/************************************************
 * NOTICE:
 * The redirect URI is to the current page, e.g:
 * http://localhost:8080/idtoken.php
 ************************************************/
$redirect_uri = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
$client = new Google_Client();
$client->setAuthConfig($oauth_credentials);
開發者ID:knedle,項目名稱:twitter-nette-skeleton,代碼行數:31,代碼來源:idtoken.php

示例7: unset

    $message = $Message->getMessage();
    $type = $Message->getType();
    unset($_SESSION['message']);
}
function failWithMessage($msg, $ex)
{
    $_SESSION['message'] = new Message("ERROR", $msg);
    errorLog($msg . ' - ' . $ex->getMessage());
}
?>

<!DOCTYPE html>
<html>
<head lang="en">
    <?php 
pageHeader("Edit Worksheet");
?>
    <link rel="stylesheet" type="text/css" href="css/editworksheet.css" />
    <link rel="stylesheet" type="text/css" href="css/jquery-ui-date.css"/>
    <script src="js/jquery-ui.js"></script>
    <script src="js/tagsList.js"></script>
    <script>
        $(function() {
          $( "#datepicker" ).datepicker({ dateFormat: 'dd/mm/yy' });
        });
    </script>
</head>
<body>
    <div id="main">
    	<div id="header">
            <div id="title">
開發者ID:benwhite10,項目名稱:Smarkbook,代碼行數:31,代碼來源:editWorksheet.php

示例8: pageHeader

<?php

pageHeader(lang('page_form'));
?>

<?php 
echo form_open('admin/pages/form/' . $id);
?>

<div class="row">
    <div class="col-md-3">
        <div class="form-group">
            <label for="title"><?php 
echo lang('title');
?>
</label>
            <?php 
echo form_input(['name' => 'title', 'value' => assign_value('title', $title), 'class' => 'form-control']);
?>
        </div>
    </div>
    <div class="col-md-3">
        <div class="form-group">
            <label for="menu_title"><?php 
echo lang('menu_title');
?>
</label>
            <?php 
echo form_input(['name' => 'menu_title', 'value' => assign_value('menu_title', $menu_title), 'class' => 'form-control']);
?>
        </div>
開發者ID:lekhangyahoo,項目名稱:gonline,代碼行數:31,代碼來源:page_form.php

示例9: l

            $do = $adminObj->doLogin($username, $pass);
            if ($do === true) {
                $return['status'] = "3";
                $return['msg'] = l('Login successfull');
                header('Location: index.php?mode=admin');
            } else {
                $return['status'] = "2";
                $return['msg'] = l('Invalid auth data');
            }
        } else {
            $return['status'] = "1";
            $return['msg'] = l('Please provide authentication data');
        }
    }
}
pageHeader(array(l("Admin")), array(l("Admin") => ""));
?>

<div id="sidebar">
	<h1><?php 
echo l('Options');
?>
</h1>
	<div class="left-box">
		<ul class="sidemenu">
			<li>
				<a href="<?php 
echo "index.php";
?>
"><?php 
echo l('Back to game statistics');
開發者ID:BlackMajic,項目名稱:HLStats,代碼行數:31,代碼來源:login.php

示例10: header

                $result = $query->fetch_assoc();
                header('Location: index.php?mode=admin&task=toolsEditdetails&clanId=' . $result['clanId']);
            } else {
                $return['msg'] = l('Nothing found');
                $return['status'] = "1";
            }
        } else {
            $return['msg'] = l('Invalid Input');
            $return['status'] = "1";
        }
    } else {
        $return['msg'] = l('Invalid Input');
        $return['status'] = "1";
    }
}
pageHeader(array(l("Admin"), l('Edit Details')), array(l("Admin") => "index.php?mode=admin", l('Edit Details') => ''));
?>
<div id="sidebar">
	<h1><?php 
echo l('Options');
?>
</h1>
	<div class="left-box">
		<ul class="sidemenu">
			<li>
				<a href="<?php 
echo "index.php?mode=admin";
?>
"><?php 
echo l('Back to admin overview');
?>
開發者ID:beporter,項目名稱:hlstats,代碼行數:31,代碼來源:toolsEditdetails.inc.php

示例11: Google_Service_Drive_DriveFile

    $authUrl = $client->createAuthUrl();
}
/************************************************
  If we're signed in then lets try to upload our
  file. For larger files, see fileupload.php.
 ************************************************/
if ($client->getAccessToken()) {
    // This is uploading a file directly, with no metadata associated.
    $file = new Google_Service_Drive_DriveFile();
    $result = $service->files->insert($file, array('data' => file_get_contents(TESTFILE), 'mimeType' => 'application/octet-stream', 'uploadType' => 'media'));
    // Now lets try and send the metadata as well using multipart!
    $file = new Google_Service_Drive_DriveFile();
    $file->setTitle("Hello World!");
    $result2 = $service->files->insert($file, array('data' => file_get_contents(TESTFILE), 'mimeType' => 'application/octet-stream', 'uploadType' => 'multipart'));
}
echo pageHeader("File Upload - Uploading a small file");
if ($client_id == '<YOUR_CLIENT_ID>' || $client_secret == '<YOUR_CLIENT_SECRET>' || $redirect_uri == '<YOUR_REDIRECT_URI>') {
    echo missingClientSecretsWarning();
}
?>
<div class="box">
  <div class="request">
<?php 
if (isset($authUrl)) {
    echo "<a class='login' href='" . $authUrl . ">Connect Me!</a>";
}
?>
  </div>

  <div class="shortened">
<?php 
開發者ID:huuly188,項目名稱:vietnamrealty,代碼行數:31,代碼來源:simplefileupload.php

示例12: die

if (!defined('IN_HLSTATS')) {
    die('Do not access this file directly.');
}
// Player Rankings
$db->query("\r\n\t\tSELECT\r\n\t\t\thlstats_Games.name\r\n\t\tFROM\r\n\t\t\thlstats_Games\r\n\t\tWHERE\r\n\t\t\thlstats_Games.code = '{$game}'\r\n\t");
if ($db->num_rows() < 1) {
    error("No such game '{$game}'.");
}
list($gamename) = $db->fetch_row();
$db->free_result();
if (isset($_GET['minkills'])) {
    $minkills = valid_request($_GET['minkills'], 1);
} else {
    $minkills = 1;
}
pageHeader(array($gamename, 'Player Rankings'), array($gamename => "%s?game={$game}", 'Player Rankings' => ''));
$rank_type = 0;
if (isset($_GET['rank_type'])) {
    $rank_type = valid_request(strval($_GET['rank_type']), 0);
}
// Autocomplete function below implemented by KingJ. Heavy modified to use HTML request instead of JSON.
?>

<div class="block">
	<?php 
printSectionTitle('Player Rankings');
?>
	<div class="subblock">
		<div style="float:left;">
			<script type="text/javascript" src="<?php 
echo INCLUDE_PATH;
開發者ID:PitbullOL,項目名稱:insurgency-hlstatsx,代碼行數:31,代碼來源:players.php

示例13: pageHeader

 * Copyright 2013 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
include_once "templates/base.php";
echo pageHeader("Simple API Access");
/************************************************
  Make a simple API request using a key. In this
  example we're not making a request as a
  specific user, but simply indicating that the
  request comes from our application, and hence
  should use our quota, which is higher than the
  anonymous quota (which is limited per IP).
 ************************************************/
require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
/************************************************
  We create the client and set the simple API
  access key. If you comment out the call to
  setDeveloperKey, the request may still succeed
  using the anonymous quota.
 ************************************************/
開發者ID:hsleonis,項目名稱:basetech,代碼行數:31,代碼來源:simple-query.php

示例14: array

    $client->setAccessToken($_SESSION['access_token']);
} else {
    $authUrl = $client->createAuthUrl();
}
/************************************************
  If we're signed in, retrieve channels from YouTube
  and a list of files from Drive.
 ************************************************/
if ($client->getAccessToken()) {
    $_SESSION['access_token'] = $client->getAccessToken();
    $dr_results = $dr_service->files->listFiles(array('maxResults' => 10));
    $yt_channels = $yt_service->channels->listChannels('contentDetails', array("mine" => true));
    $likePlaylist = $yt_channels[0]->contentDetails->relatedPlaylists->likes;
    $yt_results = $yt_service->playlistItems->listPlaylistItems("snippet", array("playlistId" => $likePlaylist));
}
echo pageHeader("User Query - Multiple APIs");
if ($client_id == '<YOUR_CLIENT_ID>' || $client_secret == '<YOUR_CLIENT_SECRET>' || $redirect_uri == '<YOUR_REDIRECT_URI>') {
    echo missingClientSecretsWarning();
}
?>
<div class="box">
  <div class="request">
<?php 
if (isset($authUrl)) {
    echo "<a class='login' href='" . $authUrl . "'>Connect Me!</a>";
} else {
    echo "<h3>Results Of Drive List:</h3>";
    foreach ($dr_results as $item) {
        echo $item->title, "<br /> \n";
    }
    echo "<h3>Results Of YouTube Likes:</h3>";
開發者ID:rapier83,項目名稱:isaebooks,代碼行數:31,代碼來源:multi-api.php

示例15: pageHeader

<?php

pageHeader(array('Teamspeak viewer'), array('Teamspeak viewer' => ''));
include_once PAGE_PATH . '/voicecomm_serverlist.php';
include_once PAGE_PATH . '/teamspeak_query.php';
include_once PAGE_PATH . '/teamspeak3_query.php';
$tsId = valid_request($_GET['tsId'], 1);
function show($tpl, $array)
{
    $template = PAGE_PATH . "/templates/teamspeak/{$tpl}";
    if ($fp = @fopen($template . "." . html, "r")) {
        $tpl = @fread($fp, filesize($template . "." . html));
    }
    foreach ($array as $value => $code) {
        $tpl = str_replace("[" . $value . "]", $code, $tpl);
    }
    return $tpl;
}
if (function_exists(fopen)) {
    $db->query("SELECT addr, queryPort, UDPPort, serverType FROM hlstats_Servers_VoiceComm WHERE serverId={$tsId}");
    $s = $db->fetch_array();
    $uip = $s['addr'];
    $tPort = $s['queryPort'];
    $port = $s['UDPPort'];
    $fp = fsockopen($uip, $tPort, $errno, $errstr, 2);
    if (!$fp) {
        $index = error("No teamspeak", 1);
    } else {
        $out = "";
        $fp = fsockopen($uip, $tPort, $errno, $errstr, 2);
        if ($fp) {
開發者ID:PitbullOL,項目名稱:insurgency-hlstatsx,代碼行數:31,代碼來源:teamspeak.php


注:本文中的pageHeader函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。