当前位置: 首页>>代码示例>>PHP>>正文


PHP printHeader函数代码示例

本文整理汇总了PHP中printHeader函数的典型用法代码示例。如果您正苦于以下问题:PHP printHeader函数的具体用法?PHP printHeader怎么用?PHP printHeader使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了printHeader函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ilMacinatoreOn

  function ilMacinatoreOn()
  {
    
    //dbConnect();
    mpdConnect();


    $action = ucfirst ( isset( $_GET['act'] ) ?$_GET['act']:'home' );
    if ( ! file_exists ( ROOT . "/inc/act{$action}.php" ) )
      exit(0);
  
    if ( isset ( $_GET['state'] ) )
    {
      include ( ROOT . "/inc/act{$action}.php" );
      exit(0);
    }
    
    printHeader();
    printMenu();
    printTop();

    echo "<div id='main'>\n";
    include ( ROOT . "/inc/act{$action}.php" );
    echo "</div>\n";

  }
开发者ID:BackupTheBerlios,项目名称:freebox-svn,代码行数:26,代码来源:Output.php

示例2: printUserForm

    /**
     * Display password reset user form.
     *
     * @since 1.0
     * @package facileManager
     *
     * @param string $message Message to display to the user
     * @return string
     */
    function printUserForm($message = null)
    {
        /** Should not be here if there is no mail_enable defined or if not using builtin auth */
        if (!getOption('mail_enable') || getOption('auth_method') != 1) {
            header('Location: ' . $GLOBALS['RELPATH']);
        }
        global $fm_name;
        printHeader(_('Password Reset'), 'login');
        $branding_logo = $GLOBALS['RELPATH'] . 'fm-modules/' . $fm_name . '/images/fm.png';
        printf('<form id="loginform" action="%s?forgot_password" method="post">
		<input type="hidden" name="reset_pwd" value="1" />
		<div id="fm-branding">
			<img src="%s" /><span>%s</span>
		</div>
		<div id="login_form">
		<table>
			<tr>
				<td>
					<div class="input-wrapper">
						<input type="text" name="user_login" id="user_login" placeholder="%s" style="width: 400px;" />
					</div>
				</td>
				<td><input name="submit" id="forgotbtn" type="submit" value="%s" class="button" /></td>
			</tr>
		</table>
		<p id="forgotton_link"><a href="%s">&larr; %s</a></p>
		<div id="message">%s</div>
		</form>
		</div>', $_SERVER['PHP_SELF'], $branding_logo, _('Reset Password'), _('Username'), _('Submit'), $GLOBALS['RELPATH'], _('Login form'), $message);
    }
开发者ID:Vringe,项目名称:facileManager,代码行数:39,代码来源:class_logins.php

示例3: checkLogin

function checkLogin($checkType)
{
    global $db;
    if (!isset($_SESSION['username'])) {
        require_once "login.php";
        // Not logged in. Kick to login page.
        die;
    } else {
        $check = $db->query("SELECT * FROM User WHERE userName='{$_SESSION['username']}' AND passwordHash='{$_SESSION['password']}'");
        $userInfo = $check->fetch_array();
        if ($check->num_rows == 0) {
            // Invalid username or password. Kick to login page.
            require_once "login.php";
            die;
        } elseif (!$userInfo['student'] && $checkType == "student" || !$userInfo['instructor'] && $checkType == "instructor" || !$userInfo['administrator'] && $checkType == "administrator") {
            // Incorrect permissions. Return an error.
            printHeader("Access Denied");
            echo "<p>You do not have permission to view this page.</p>";
            printFooter(true);
            die;
        } else {
            // Everything is ok. Return the user data.
            return $userInfo;
        }
    }
}
开发者ID:rjho,项目名称:grades,代码行数:26,代码来源:header.php

示例4: download_cert

function download_cert($this_cert, $cer_ext)
{
    $config = $_SESSION['config'];
    if (!isset($cer_ext)) {
        $cer_ext = 'FALSE';
    }
    if ($this_cert == "zzTHISzzCAzz") {
        $my_x509_parse = openssl_x509_parse(file_get_contents($config['cacert']));
        $filename = $my_x509_parse['subject']['CN'] . ":" . $my_x509_parse['subject']['OU'] . ":" . $my_x509_parse['subject']['O'] . ":" . $my_x509_parse['subject']['L'] . ":" . $my_x509_parse['subject']['ST'] . ":" . $my_x509_parse['subject']['C'];
        $download_certfile = $config['cacert'];
        $ext = ".pem";
        //$application_type="application/x-x509-ca-cert";
        $application_type = 'application/octet-stream';
    } else {
        $filename = substr($this_cert, 0, strrpos($this_cert, '.'));
        $ext = substr($this_cert, strrpos($this_cert, '.'));
        $download_certfile = base64_encode($filename);
        $download_certfile = $config['cert_path'] . $download_certfile . $ext;
        $application_type = 'application/octet-stream';
    }
    if ($cer_ext != 'FALSE') {
        $ext = '.' . $cer_ext;
    }
    if (file_exists($download_certfile)) {
        $myCert = join("", file($download_certfile));
        download_header_code($filename . $ext, $myCert, $application_type);
    } else {
        printHeader("Certificate Retrieval");
        print "<h1> {$filename} - X509 CA certificate not found</h1>\n";
        printFooter();
    }
}
开发者ID:NamingException,项目名称:PHP-Certificate-Authority-Server,代码行数:32,代码来源:functions_cert.php

示例5: errorMsg

function errorMsg($msg)
{
    printHeader();
    writeBeginningHTML(" Jumble Word Solver Error");
    echo "Your form results could not be processed because " . $msg;
    echo "<HR />" . "<address>" . "Time of Request: " . date("D j M Y h:i:s A") . "\n" . "<a href=\"http://csnew.angelo.edu/~bpearce\">Bryce Pearce</a><br />" . "<a href=\"mailto:bpearce@angelo.edu\">bpearce@angelo.edu</a><br />" . "<br />\n" . "</address>\n" . "</body>\n" . "</html>\n";
    exit(1);
}
开发者ID:BrycePearce,项目名称:Jumble-Permutations,代码行数:8,代码来源:jumbleMaker.php

示例6: showSetupMenu

function showSetupMenu()
{
    //Init header page and rss
    header("Content-type: text/xml");
    echo '<?xml version="1.0" encoding="UTF-16" ?>' . "\n";
    echo '<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://purl.org/dc/elements/1.1/">' . "\n";
    printHeader();
    echo '  <channel>' . "\n";
    echo '  <title>xMegafilm - ' . resourceString("configure") . '</title>' . "\n";
    $link = SERVER_HOST_AND_PATH . "php/config/setup.php?action=";
    showMenuLink(resourceString("title_return_menu"), SERVER_HOST_AND_PATH . "php/index.php", "", 0);
    showMenuLink(resourceString("title_remove_cookie"), $link . 'DELETE_COOKIE', XTREAMER_IMAGE_PATH . "img/cookie_delete.jpg", 1);
    showMenuChangeCookieLink(resourceString("title_modify_user") . " (Username: " . (MEGAUPLOAD_USER ? MEGAUPLOAD_USER : "------") . ")", SERVER_HOST_AND_PATH . "php/config/setup.php?user=%s" . URL_AMP . "action=MODIFY_USER", XTREAMER_IMAGE_PATH . "img/cookie_edit.jpg", 2);
    showMenuChangeCookieLink(resourceString("title_modify_cookie") . " (Cookie: " . (MEGAUPLOAD_COOKIE ? MEGAUPLOAD_COOKIE : "------") . ")", SERVER_HOST_AND_PATH . "php/config/setup.php?pass=%s" . URL_AMP . "user=" . MEGAUPLOAD_USER . URL_AMP . "action=MODIFY_COOKIE", XTREAMER_IMAGE_PATH . "img/cookie_edit.jpg", 3);
    //End rss file
    echo '  </channel>' . "\n";
    echo '</rss>';
}
开发者ID:johnymarek,项目名称:eboda-hd-for-all-500,代码行数:18,代码来源:setup.php

示例7: printHeader

<?php

// This script php implements
// find all artists listened by a user’s friend but not the user, order them by the
// number of friends listening to them, recommend the top 5
// Include library of functions
include "functions.php";
// connection to neo4j
require 'vendor/autoload.php';
$client = new Everyman\Neo4j\Client('localhost', 7474);
printHeader();
printSearchForm($uid);
echo "<b>User: {$uid} - All Artist Listened by my friends</b><br><br>";
$queryString = "MATCH (u:user {id:{$uid}})-[:ADD_FRIEND_TO]-(:user)-[listen: WEIGHT]-(a:artist)\r\nWHERE NOT (u)-[:WEIGHT]-(a)\r\nWITH a, count(u) as count\r\nRETURN a\r\nORDER BY count desc LIMIT 5";
$query = new Everyman\Neo4j\Cypher\Query($client, $queryString);
$result = $query->getResultSet();
foreach ($result as $row) {
    $artist = $client->getNode($row['x']->getId());
    $artistId = $artist->getProperty('id');
    $artistName = $artist->getProperty('name');
    echo "Artist Name: " . $artistName . "</br>";
    printArtistInfo($artistId);
    ?>
	<form action="listen.php" method="post">
	<input type="hidden" name="action" value="addlisten">
	<input type="hidden" name="userId" value="<?php 
    echo $uid;
    ?>
">
	<input type="hidden" name="artistId" value="<?php 
    echo $artistId;
开发者ID:houchitao,项目名称:Music-Database-assignment,代码行数:31,代码来源:recomendationsfriends.php

示例8: printHeader

		 	}
		 	
		 	e.setAttribute("active", "true"); 
		 	document.getElementById(e.getAttribute("targetid")).style.display = 'block';	
		}
        
        </script>
    </head>
    <body>
        <!--[if lt IE 8]>
            <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
        <![endif]-->
        
        <!-- Nav -->
	    <?php 
echo printHeader(true, true, "beige", "about", "./about.php");
?>
        
	    
	    <div class="container pagecontent news">
	    	<!-- ABOUT -->
			<div class="content-segment" id="content">
				<!-- slagzin -->
				<div class="row">
					<div class="col-md-3 title">
		        		<span class="sidetitle underscore">BINAIR 01</span><br><br>
					</div>
					<div class="col-md-8">
						<div class="nomargin slagzin" id="slagzin">
							<!--Toggle-->
							<h2><a class="red activated" active="false" targetid="bin01" onclick="openInfo(this)">Binair 01&#x25BE</a></h2> 
开发者ID:helemaalbigt,项目名称:Binair01,代码行数:31,代码来源:about.php

示例9: __construct

 public function __construct()
 {
     $message = $this->testTheEnvironment();
     if (is__writable("./") && !file_exists(".htaccess")) {
         file_put_contents(".htaccess", htaccess());
     }
     $this->generateSiteUrl();
     if (!empty($message)) {
         printHeader();
         echo $message;
         echo "</body>";
         echo "</html>";
     } elseif ($this->runForm()) {
         unlink(__FILE__);
         header("Location:" . $this->siteUrl . "add/post");
         exit;
     } else {
         $updater = new Updater();
         $version = $updater->getInfos();
         printHeader($version);
         printForm();
         echo "</body>";
         echo "</html>";
     }
 }
开发者ID:pianove,项目名称:htmly-installer,代码行数:25,代码来源:Settings.php

示例10: printHeader

<?php

printHeader('boutique', false, 'boutique', false);
?>
            <div id="top4-middle" class="block-middle">
                <div class="head-block">top 4</div>
                <table style="width:100%; text-align:center;">
                    <tr><?php 
foreach ($top4Array as $top4) {
    ?>
                        <td><a href="boutique.php?produit=<?php 
    echo $top4['ID'];
    ?>
" class="a-img"><img src="<?php 
    echo $top4['image'];
    ?>
" alt="<?php 
    echo $top4['titre'];
    ?>
" style="max-width:175px; max-height:250px;" /></a><br />
                <a href="boutique.php?produit=<?php 
    echo $top4['ID'];
    ?>
" ><?php 
    echo $top4['titre'];
    ?>
 (acheté <?php 
    echo $top4['achat'];
    ?>
 fois)</a></td><?php 
}
开发者ID:Rbeuque74,项目名称:boutiqueMvc,代码行数:31,代码来源:index.php

示例11: printHeader

<?php

printHeader('admin', false, 'administration : éditer un membre', true);
?>
                    <div id="admin-membre-edit" class="block-middle">
                        <div class="head-block">édition du membre n°<?php 
echo htmlspecialchars($_GET['id']);
?>
</div><br />

                        <?php 
foreach ($membreArray as $infos) {
    ?>
                <form action="membre.php?admin=envoi" method="post" enctype="multipart/form-data"  onsubmit="return verifFormAdminModifMembre(this)">
                    <fieldset style="text-align:left; width:80%; margin:auto;">
                        <legend>Administration - modification d'un membre</legend>
                        <table style="margin:auto;">
                            <tr>
                                <td><label id="pseudoLabel" for="pseudo">Pseudo :</label></td>
                                <td><input type="text" name="pseudo" id="pseudo" size="52" value="<?php 
    echo htmlspecialchars($infos["pseudo"]);
    ?>
" onblur="verifRegex(this, rgxPseudo)" /></td>
                            </tr>
                            <tr>
                                <td><label id="nomLabel" for="nom">Nom :</label></td>
                                <td><input type="text" name="nom" id="nom" size="75" value="<?php 
    echo htmlspecialchars($infos["nom"]);
    ?>
" onblur="verifRegex(this, rgxNom)" /></td>
                            </tr>
开发者ID:Rbeuque74,项目名称:boutiqueMvc,代码行数:31,代码来源:edit.php

示例12: printHeader

<?php

include 'config.php';
include 'functions.php';
if (!isLoggedIn()) {
    die;
}
include '_header.php';
printHeader('Bank');
logs($uid, " accessed bank page!");
// other stuff
$user1 = mysql_query("SELECT * FROM `users` WHERE `id`='" . $_SESSION['userid'] . "'");
$user = mysql_fetch_object($user1);
//QUICK DRAW
if ($_GET['d'] == 1) {
    $_POST['deposit'] = 1;
    $_POST['damount'] = $user->money;
} elseif ($_GET['w'] == 1) {
    $_POST['withdraw'] = 1;
    $_POST['wamount'] = $user->bank;
}
if ($_POST['deposit'] != "") {
    $_POST['withdraw'] = "";
    if (strtolower(substr($_POST['damount'], -1)) == "k") {
        $_POST['damount'] = $_POST['damount'] * 1000;
    }
    if (strtolower(substr($_POST['damount'], -1)) == "m") {
        $_POST['damount'] = $_POST['damount'] * 1000000;
    }
    $_POST['damount'] = mysql_real_escape_string($_POST['damount']);
    $dontlike = array(',', '$', '+', '-');
开发者ID:Yanrs,项目名称:PkmnChan,代码行数:31,代码来源:bank.php

示例13: secsToRoughTime

function secsToRoughTime($secs)
{
    $seconds = array('days' => 86400, 'hours' => 3600, 'minutes' => 60, 'seconds' => 1);
    foreach ($seconds as $name => $seconds) {
        $amount = intval($secs / $seconds);
        if ($amount > 0) {
            return $amount . ' ' . ($amount == 1 ? rtrim($name, 's') : $name);
        }
    }
    return '-';
}
if (!isLoggedIn()) {
    redirect('login.php');
}
include '_header.php';
printHeader('Auction History');
$uid = (int) $_SESSION['userid'];
$extraSqlArr = array('1' => array('sql' => 'ORDER BY `finish_time` DESC', 'text' => 'Newest Sold'), '2' => array('sql' => 'ORDER BY `winning_bid` DESC', 'text' => 'Most Expensive'), '3' => array('sql' => 'ORDER BY `level` DESC', 'text' => 'Highest Level'), '4' => array('sql' => "WHERE `owner_id`='{$uid}' ORDER BY `finish_time` DESC", 'text' => 'Just My Auctions'));
$key = isset($_GET['s']) && array_key_exists($_GET['s'], $extraSqlArr) ? (int) $_GET['s'] : 1;
$extraSql = $extraSqlArr[$key]['sql'];
$links = array();
foreach ($extraSqlArr as $k => $a) {
    $links[] = $key == $k ? $a['text'] : '<a href="?s=' . $k . '">' . $a['text'] . '</a>';
}
$query = mysql_query("SELECT * FROM `auction_history` {$extraSql} LIMIT 100");
echo '
	<img src="images/auction.png" /><br /><br />
	<a href="auction.php">View Auctions</a><br /><br />
	' . implode(' &bull; ', $links) . '<br /><br />
';
if (mysql_num_rows($query) == 0) {
开发者ID:Yanrs,项目名称:PkmnChan,代码行数:31,代码来源:auction_history.php

示例14: checkLogin

<?php

require_once "header.php";
checkLogin("administrator");
if (isset($_GET['classesFor'])) {
    $instructorId = $db->escape_string($_GET['classesFor']);
    $instructorName = $db->query("SELECT name FROM Instructor WHERE userId='{$instructorId}'")->fetch_array(MYSQLI_ASSOC);
    printHeader("Classes Taught By " . $instructorName['name']);
    // List classes for an instructor
    $classes = $db->query("SELECT * FROM Teaches NATURAL JOIN Class WHERE userId='{$instructorId}'");
    echo "<table><tr><th>ID</th><th>Class Num</th><th>Class Name</th><th>Section</th><th>Semester</th><th>Credit</th><th>Actions</th></tr>";
    while ($currentClass = $classes->fetch_array(MYSQLI_ASSOC)) {
        echo "<tr><td>" . $currentClass['classId'] . "</td><td>" . $currentClass['classNum'] . "</td><td>" . $currentClass['className'] . "</td><td>" . $currentClass['sectionNum'] . "</td>";
        echo "<td>" . $currentClass['semester'] . " " . $currentClass['year'] . "</td><td>" . $currentClass['creditHours'] . "</td>";
        echo "<td><a href='admin_teaches.php?userId={$instructorId}&amp;classId=" . $currentClass['classId'] . "'>Remove</a></td></tr>";
    }
    echo "</table>";
} else {
    printHeader("Instructor List");
    // List all instructors
    $instructors = $db->query("SELECT * FROM Instructor ORDER BY name");
    echo "<table><tr><th>ID#</th><th>Name</th><th>Department</th><th>Tenure</th><th>Classes</th></tr>";
    while ($currentInstructor = $instructors->fetch_array(MYSQLI_ASSOC)) {
        echo "<tr><td>" . $currentInstructor['userId'] . "</td><td>" . $currentInstructor['name'] . "</td><td>" . $currentInstructor['department'] . "</td>";
        $tenure = $currentInstructor['tenure'] ? "Yes" : "No";
        echo "<td>" . $tenure . "</td><td><a href='admin_showinstructors.php?classesFor=" . $currentInstructor['userId'] . "'>Show classes</a></td></tr>";
    }
    echo "</table>";
}
printFooter("admin");
开发者ID:rjho,项目名称:grades,代码行数:30,代码来源:admin_showinstructors.php

示例15: index_site

function index_site($url, $reindex, $maxlevel, $soption, $url_inc, $url_not_inc, $can_leave_domain)
{
    global $mysql_table_prefix, $command_line, $mainurl, $tmp_urls, $domain_arr, $all_keywords;
    if (!isset($all_keywords)) {
        $result = mysql_query("select keyword_ID, keyword from " . $mysql_table_prefix . "keywords");
        echo mysql_error();
        while ($row = mysql_fetch_array($result)) {
            $all_keywords[addslashes($row[1])] = $row[0];
        }
    }
    $compurl = parse_url($url);
    if ($compurl['path'] == '') {
        $url = $url . "/";
    }
    $t = microtime();
    $a = getenv("REMOTE_ADDR");
    $sessid = md5($t . $a);
    $urlparts = parse_url($url);
    $domain = $urlparts['host'];
    if (isset($urlparts['port'])) {
        $port = (int) $urlparts['port'];
    } else {
        $port = 80;
    }
    $result = mysql_query("select site_id from " . $mysql_table_prefix . "sites where url='{$url}'");
    echo mysql_error();
    $row = mysql_fetch_row($result);
    $site_id = $row[0];
    if ($site_id != "" && $reindex == 1) {
        mysql_query("insert into " . $mysql_table_prefix . "temp (link, level, id) values ('{$url}', 0, '{$sessid}')");
        echo mysql_error();
        $result = mysql_query("select url, level from " . $mysql_table_prefix . "links where site_id = {$site_id}");
        while ($row = mysql_fetch_array($result)) {
            $site_link = $row['url'];
            $link_level = $row['level'];
            if ($site_link != $url) {
                mysql_query("insert into " . $mysql_table_prefix . "temp (link, level, id) values ('{$site_link}', {$link_level}, '{$sessid}')");
            }
        }
        $qry = "update " . $mysql_table_prefix . "sites set indexdate=now(), spider_depth = {$maxlevel}, required = '{$url_inc}'," . "disallowed = '{$url_not_inc}', can_leave_domain={$can_leave_domain} where site_id={$site_id}";
        mysql_query($qry);
        echo mysql_error();
    } else {
        if ($site_id == '') {
            mysql_query("insert into " . $mysql_table_prefix . "sites (url, indexdate, spider_depth, required, disallowed, can_leave_domain) " . "values ('{$url}', now(), {$maxlevel}, '{$url_inc}', '{$url_not_inc}', {$can_leave_domain})");
            echo mysql_error();
            $result = mysql_query("select site_ID from " . $mysql_table_prefix . "sites where url='{$url}'");
            $row = mysql_fetch_row($result);
            $site_id = $row[0];
        } else {
            mysql_query("update " . $mysql_table_prefix . "sites set indexdate=now(), spider_depth = {$maxlevel}, required = '{$url_inc}'," . "disallowed = '{$url_not_inc}', can_leave_domain={$can_leave_domain} where site_id={$site_id}");
            echo mysql_error();
        }
    }
    $result = mysql_query("select site_id, temp_id, level, count, num from " . $mysql_table_prefix . "pending where site_id='{$site_id}'");
    echo mysql_error();
    $row = mysql_fetch_row($result);
    $pending = $row[0];
    $level = 0;
    $domain_arr = get_domains();
    if ($pending == '') {
        mysql_query("insert into " . $mysql_table_prefix . "temp (link, level, id) values ('{$url}', 0, '{$sessid}')");
        echo mysql_error();
    } else {
        if ($pending != '') {
            printStandardReport('continueSuspended', $command_line);
            mysql_query("select temp_id, level, count from " . $mysql_table_prefix . "pending where site_id='{$site_id}'");
            echo mysql_error();
            $sessid = $row[1];
            $level = $row[2];
            $pend_count = $row[3] + 1;
            $num = $row[4];
            $pending = 1;
            $tmp_urls = get_temp_urls($sessid);
        }
    }
    if ($reindex != 1) {
        mysql_query("insert into " . $mysql_table_prefix . "pending (site_id, temp_id, level, count) values ('{$site_id}', '{$sessid}', '0', '0')");
        echo mysql_error();
    }
    $time = time();
    $omit = check_robot_txt($url);
    printHeader($omit, $url, $command_line);
    $mainurl = $url;
    $num = 0;
    while ($level <= $maxlevel && $soption == 'level' || $soption == 'full') {
        if ($pending == 1) {
            $count = $pend_count;
            $pending = 0;
        } else {
            $count = 0;
        }
        $links = array();
        $result = mysql_query("select distinct link from " . $mysql_table_prefix . "temp where level={$level} && id='{$sessid}' order by link");
        echo mysql_error();
        $rows = mysql_num_rows($result);
        if ($rows == 0) {
            break;
        }
        $i = 0;
//.........这里部分代码省略.........
开发者ID:hoelzro,项目名称:Bifrost,代码行数:101,代码来源:spider.php


注:本文中的printHeader函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。