本文整理汇总了PHP中htmlheader函数的典型用法代码示例。如果您正苦于以下问题:PHP htmlheader函数的具体用法?PHP htmlheader怎么用?PHP htmlheader使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了htmlheader函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mysql_query
if ($place != 'all') {
$sql_query = "SELECT * FROM `{$table}` WHERE place='{$place}'";
$results = mysql_query($sql_query);
if (mysql_num_rows($results) == 0) {
Header("Location: {$url}?q=" . urlencode($place) . "&place=notfound");
exit;
}
$row = mysql_fetch_assoc($results);
$zoom = 13;
} else {
$row['place'] = 'All of Philippines';
$row['lat'] = 13;
$row['lng'] = 123;
$zoom = 6;
}
htmlheader('View Map of ' . $row['place'], 'View Map of ' . $row['place'], $row['place']);
}
$width = 980;
$height = 550;
?>
<div style="float:right;" id="xlink"></div>
<?php
if ($row['place'] != 'All of Philippines') {
?>
<table cellpadding="5" cellspacing="3">
<tr><td><b>Description:</b></td><td><?php
echo $row['osmdesc'];
?>
</td></tr>
<tr><td><b>Last Updated:</b></td><td><?php
示例2: htmlheader
<?php
include '../includes/functions.php';
echo htmlheader("Follo • Team report", "../includes/main.css");
$totdaysofcurrentmonth = cal_days_in_month(CAL_GREGORIAN, date(m), date(Y));
$monthtextual = date(F);
$textualdate = "1 " . $monthtextual . " " . date(Y);
$timespanofgivenmonth = strtotime($textualdate);
$firstdayofmonth = date(w, $timespanofgivenmonth);
// 1 Monday
// 2 Tuesday
// 3 Wednesday
// 4 Thursday
// 5 Friday
// 6 Saturday
// 0 Sunday
$number = 31;
if (is_int($number / 7)) {
$numberofweek = $number / 7;
} else {
$numberofweek = (int) ($number / 7) + 1;
}
echo $numberofweek;
// echo (int)(30/7);
// for ($sem=0; $sem < ((int)($totdaysofcurrentmonth/7))+1; $sem++) {
// for ($jou=0; $jou < 7; $jou++) {
// $e=$e+1;
// $montharray[$sem][$jou]=$e;
// }
// }
// print_r($montharray);
示例3: getdbcfg
function getdbcfg(){
global $uc_dbcharset,$uc_dbhost,$uc_dbuser,$uc_dbpw,$uc_dbname,$uc_tablepre,$dbhost, $dbuser, $dbpw, $dbname, $dbcfg, $whereis, $cfgfile, $tablepre, $dbcharset,$dz_version,$ss_version,$uch_version;
if(@!include($cfgfile)) {
htmlheader();
cexit("<h4>请先上传config文件以保证您的数据库能正常链接!</h4>");
}
if(UC_DBHOST) {
$uc_dbhost = UC_DBHOST;
$uc_dbuser = UC_DBUSER;
$uc_dbpw = UC_DBPW;
$uc_dbname = UC_DBNAME;
$uc_tablepre = UC_DBTABLEPRE;
$uc_dbcharset = UC_DBCHARSET;
}
switch($whereis) {
case 'is_dz':
$dbhost = $dbhost;
$dbuser = $dbuser;
$dbpw = $dbpw;
$dbname = $dbname;
$tablepre = $tablepre;
$dbcharset = !$dbcharset ? (strtolower($charset) == 'utf-8' ? 'utf8' : $charset): $dbcharset;
define('IN_DISCUZ',true);
@require_once "./discuz_version.php";
$dz_version = DISCUZ_VERSION;
if($dz_version >= '7.1') {
$dz_version = intval(str_replace('.','',$dz_version)).'0';
} else {
$dz_version = intval(str_replace('.','',$dz_version));
}
break;
case 'is_uc':
$dbhost = UC_DBHOST;
$dbuser = UC_DBUSER;
$dbpw = UC_DBPW;
$dbname = UC_DBNAME;
$tablepre = UC_DBTABLEPRE;
$dbcharset = !UC_DBCHARSET ? (strtolower(UC_CHARSET) == 'utf-8' ? 'utf8' : UC_CHARSET) : UC_DBCHARSET;
break;
case 'is_uch':
$dbhost = $_SC["dbhost"];
$dbuser = $_SC["dbuser"];
$dbpw = $_SC["dbpw"];
$dbname = $_SC["dbname"];
$tablepre = $_SC["tablepre"];
if(file_exists("./ver.php")) {
require './ver.php';
$uch_version = X_VER;
} else {
$common = 'common.php';
$version = fopen($common,'r');
$version = fread($version,filesize($common));
$len = strpos($version,'define(\'D_BUG\')');
$version = substr($version,0,$len);
$cache = fopen('./data/version.php','w');
fwrite($cache,$version);
fclose($cache);
require_once './data/version.php';
$uch_version = intval(str_replace('.','',X_VER));
unlink('./data/version.php');
}
$uch_version = intval(str_replace('.','',$uch_version));
$dbcharset = !$_SC['dbcharset'] ? (strtolower($_SC["charset"]) == 'utf-8' ? 'utf8' : $_SC["charset"]) : $_SC['dbcharset'] ;
break;
case 'is_ss':
$dbhost = $dbhost ? $dbhos : $_SC['dbhost'];
$dbuser = $dbuser ? $dbuser : $_SC['dbuser'];
$dbpw = $dbpw ? $dbpw : $_SC['dbpw'];
$dbname = $dbname ? $dbname : $_SC['dbname'];
$tablepre = $tablepre ? $tablepre : $_SC['tablepre'];
$dbcharset = !$dbcharset ? (strtolower($charset) == 'utf-8' ? 'utf8' : $charset) : $dbcharset;
if(!$dbcharset) {
$dbcharset = !$_SC['dbcharset'] ? (strtolower($_SC['charset']) == 'utf-8' ? 'utf8' : $_SC['charset']) : $_SC['dbcharset'];
}
if($_SC['dbhost'] || $_SC['dbuser']) {
$common = 'common.php';
$version = fopen($common,'r');
$version = fread($version,filesize($common));
$len = strpos($version,'define(\'S_RELEASE\'');
$version = substr($version,0,$len);
$cache = fopen('./data/version.php','w');
fwrite($cache,$version);
fclose($cache);
require_once './data/version.php';
$ss_version = intval(str_replace('.','',S_VER));
unlink('./data/version.php');
}
break;
default:
$dbhost = $dbuser = $dbpw = $dbname = $tablepre = $dbcharset = '';
break;
}
}
示例4: ob_start
<?php
## $Id$
require '.config.php';
require 'fx.inc.php';
ob_start('ob_tidyhandler');
httpheader();
echo htmlheader('travelrun -- drug information', usercss());
echo '<div class="drugnav">Go back to the <a href="index.php">start page</a>.</div>';
// open the database connection
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DATA);
// get the data
$drugs = array();
$sql = <<<SQL_DRUGS
select stock.item, item.itemname, stock.country, country.countryname, stock.utctime, stock.price, stock.quantity
from stock, lastdrugs, item, country
where stock.item = lastdrugs.item
and stock.item = item.itemid
and stock.country = country.countryid
and stock.country = lastdrugs.country
and stock.utctime = lastdrugs.lastutc
order by item.itemname, stock.price
SQL_DRUGS;
$res = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_row($res)) {
$drugs[] = array($row[0], $row[1], $row[2], $row[3], $row[4], $row[5], $row[6]);
}
mysql_free_result($res);
mysql_close($conn);
echo '<div class="drugdata">';
示例5: ob_start
<?php
## $Id: $
require '.config.php';
require 'fx.inc.php';
ob_start('ob_tidyhandler');
httpheader();
echo htmlheader('travelrun -- flower information', usercss());
echo '<div class="drugnav">Go back to the <a href="index.php">start page</a>.</div>';
// open the database connection
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DATA);
// get the data
$flowers = array();
$sql = <<<SQL_FLOWERS
select stock.item, item.itemname, stock.country, country.countryname, stock.utctime, stock.price, stock.quantity
from stock, lastflowers, item, country
where stock.item = lastflowers.item
and stock.item = item.itemid
and stock.country = country.countryid
and stock.country = lastflowers.country
and stock.utctime = lastflowers.lastutc
order by stock.utctime
SQL_FLOWERS;
$res = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_row($res)) {
$flowers[] = array($row[0], $row[1], $row[2], $row[3], $row[4], $row[5], $row[6]);
}
mysql_free_result($res);
mysql_close($conn);
echo '<div class="drugdata">';
示例6: ob_start
<?php
## $Id: $
require '.config.php';
require 'fx.inc.php';
ob_start('ob_tidyhandler');
httpheader();
echo htmlheader('travelrun -- all items information', usercss());
echo '<div class="drugnav">Go back to the <a href="index.php">start page</a>.</div>';
// open the database connection
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DATA);
// get the data
$itemall = array();
$sql = <<<SQL_ITEMALL
select s.utctime, country.countryname, item.itemname, s.quantity, s.price
from stock s
, (select max(utctime) as mt, country, item from stock where manual = 0 group by country, item) smax
, country
, item
where s.utctime = smax.mt
and s.country = smax.country
and s.item = smax.item
and s.country = country.countryid
and s.item = item.itemid
and s.manual = 0
SQL_ITEMALL;
if (isset($_GET['f']) && trim($_GET['f']) != '') {
$safefilter = mysql_real_escape_string($_GET['f']);
示例7: ob_start
<?php
## $Id: $
require '.config.php';
require 'fx.inc.php';
ob_start('ob_tidyhandler');
httpheader();
echo htmlheader('travelrun -- plushie information', usercss());
echo '<div class="drugnav">Go back to the <a href="index.php">start page</a>.</div>';
// open the database connection
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DATA);
// get the data
$plushies = array();
$sql = <<<SQL_PLUSHIES
select stock.item, item.itemname, stock.country, country.countryname, stock.utctime, stock.price, stock.quantity
from stock, lastplushies, item, country
where stock.item = lastplushies.item
and stock.item = item.itemid
and stock.country = country.countryid
and stock.country = lastplushies.country
and stock.utctime = lastplushies.lastutc
order by stock.utctime
SQL_PLUSHIES;
$res = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_row($res)) {
$plushies[] = array($row[0], $row[1], $row[2], $row[3], $row[4], $row[5], $row[6]);
}
mysql_free_result($res);
mysql_close($conn);
echo '<div class="drugdata">';
示例8: mysql_free_result
$upk = $row[1];
} else {
$viewk += $row[1];
$cvk[$row[0]] = $row[1];
}
}
mysql_free_result($res);
// get first post of last page of flower thread
$sql = "select valint from config where configkey = 'LAST_FLOWER_PAGE'";
$res = mysql_query($sql) or die(mysql_error());
$lastflower = 20 * (mysql_result($res, 0, 0) - 1);
mysql_free_result($res);
// close the database connection
mysql_close($conn);
httpheader();
echo htmlheader('Travelrun: Home', usercss());
echo '<br><table width="100%" height="8" cellspacing="1" cellpadding="2"><tr bgcolor="#303030"><td style="padding-top: 10px;border-bottom-left-radius: 5px" align="center"><a href="index.php?c=m"><img src="images/48/Mexico.png" title="', $cvk['m'], ' views" alt="', $cvk['m'], ' views"></a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=i"><img src="images/48/Cayman-Islands.png" title="', $cvk['i'], ' views" alt="', $cvk['i'], ' views"></a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=c"><img src="images/48/Canada.png" title="', $cvk['c'], ' views" alt="', $cvk['c'], ' views"></a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=h"><img src="images/48/Hawaii-Flag.png" title="', $cvk['h'], ' views" alt="', $cvk['h'], ' views"></a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=u"><img src="images/48/United-Kingdom.png" title="', $cvk['u'], ' views" alt="', $cvk['u'], ' views"></a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=a"><img src="images/48/Argentina.png" title="', $cvk['a'], ' views" alt="', $cvk['a'], ' views"></a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=s"><img src="images/48/Switzerland.png" title="', $cvk['s'], ' views" alt="', $cvk['s'], ' views"></a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=j"><img src="images/48/Japan.png" title="', $cvk['j'], ' views" alt="', $cvk['j'], ' views"</a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=x"><img src="images/48/China.png" title="', $cvk['x'], ' views" alt="', $cvk['x'], ' views"></a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=e"><img src="images/48/United-Arab-Emirates.png" title="', $cvk['e'], ' views" alt="', $cvk['e'], ' views"></a></td><td style="padding-top: 10px" align="center"><a href="index.php?c=z"><img src="images/48/South-Africa.png" title="', $cvk['z'], ' views" alt="', $cvk['z'], ' views"></a></td><td align="center" style="padding-top: 10px;border-bottom-right-radius: 5px"><a href="itemall.php"><img src="images/48/item.png"></a></td></tr></table>';
echo '<div class="timeinfo">';
echo 'Current time is ', gmdate('Y-m-d H:i:s'), ' GMT.<br>';
echo 'Last update was made at ', $lastupdate, ' GMT for ', $lastcountry, '.';
echo '</div>';
echo '<hr>';
if (isset($_SESSION['recent_update'])) {
echo '<div class="pub"><br><i>';
echo 'If you want to ';
echo '<a href="http://www.torn.com/forums.php#!p=threads&f=10&t=15907728&b=0&a=0&start=999999">';
echo 'make a post in the ';
echo 'flower thread and advertise travelrun</a>, you can use the ';
echo 'code between the following lines:</i><br>';
echo '================================================<br>';
echo "{$_SESSION['recent_update']['qtd']} ";
示例9: session_start
*
* Written by Stefan Schöttler
* email: stefan.schoettler@haw-hamburg.de
*
* @category ToolsAndUtilities
* @package Stadtleser
* @author Stefan Schöttler
* @copyright 2016 HAW-Hamburg
* @version 1.0.0
* @link http://
*/
session_start();
require './config/config.php';
require './config/texte.php';
require './helper.php';
htmlheader($title);
echo "<div class='logo'>";
echo $text_üeberschrift_logon;
echo $text_üeberschrift_logon2;
echo $text_logon;
echo " </div>";
echo "<h3>Login</h3>";
// Seite wurde mit logout aufgerufen
if (isset($_GET['out'])) {
// destroy session
session_unset();
$_SESSION = array();
unset($_SESSION['user'], $_SESSION['access']);
session_destroy();
}
// Seite wurde mit Login aufgerufen
示例10: header
<?php
header("Refresh:300");
//check history every 5 minutes
include '../includes/functions.php';
echo htmlheader("Follo • Live stream Members Activity", "../includes/main.css");
// Get all members of the board
// https://api.trello.com/1/boards/561228dc16f33267799133c3/members?fields=avatarHash,fullName,username&key=65c83fd020db39e2027c509a67587125&token=d8cfaa1f1f58a0e0b7d34befc2952cc26352a3e97c948bd9f80243377f98654e
// Get all cards related to a member
// https://api.trello.com/1/boards/561228dc16f33267799133c3/members/---Member id---/cards?fields=name,dateLastActivity,shortUrl&members=true&member_fields=avatarHash,fullName,username,initials&list=true&list_fields=name&=false&attachments=true&attachment_fields=url&key=65c83fd020db39e2027c509a67587125&token=d8cfaa1f1f58a0e0b7d34befc2952cc26352a3e97c948bd9f80243377f98654e
// fet avatar pic :
// https://trello-avatars.s3.amazonaws.com/---avatarHash---/170.png
// $allboardmembers = "https://api.trello.com/1/boards/561228dc16f33267799133c3/members?fields=avatarHash,fullName,username&key=65c83fd020db39e2027c509a67587125&token=d8cfaa1f1f58a0e0b7d34befc2952cc26352a3e97c948bd9f80243377f98654e";
//BE CAREFUL HARDCODED MEMBERS HERE !
$allboardmembers = array(array("55fa6e5e938f433370d23bee", "0c87cc12e39c5380e132254b256996ee", "Gaelle", "gaelle94", "Gaelle"), array("52af2930541e94e652004b97", "85b7e13aa45f7e6d37fd6de7b5c45b6d", "Chris Dugne", "chrisdugne", "Chris"), array("563785a574b325ce5a2be94e", "a74f7b712ccfbca67e32fbfac1d6e7b7", "Eric Sampaio", "ericsampaio4", "Eric"), array("55faabb71fe9809f1bce6d07", "4cef9517087083d70cc068cbdae2e526", "Jeroen Engels", "jeroenengels", "Jeroen"), array("5609074552d59cd5ceb8c4c7", "1b272b008df77f21d0ae2ac91b8e9e64", "Thibaut Lambert", "t1b0", "Thibaut"), array("55fa7aac7d53f052afdbe763", "786a7ad823c02255c6773a0b54376f9c", "Arthur Weber", "goduuu", "Arthur"), array("55ed4db9b0a1d88b74782bed", "667cede4e2f5bc4a50c477622d95368f", "Loïc Calvy", "loiccalvy1", "Loic"), array("561276d36f767ef609f437b8", "28be9bea97879575a5a542491b1036fe", "Matthieu Harbonnier", "matthieuharbonnier", "Matthieu"));
echo "<div id='namelisting'><ul class='namelistingul'>";
foreach ($allboardmembers as $userlisting) {
echo "<li class='namelistingli'><a href='#" . $userlisting[0] . "'>" . $userlisting[4] . "</a></li>";
}
echo "</ul></div>";
echo "<div id='memberactivitypagecontent'>";
foreach ($allboardmembers as $user) {
// Get a member id
echo "<div id='memberactivity'>";
echo "<div id='fullusername'><a name=" . $user[0] . ">" . $user[2] . "</div>";
echo "<img class='avatar' src='https://trello-avatars.s3.amazonaws.com/" . $user[1] . "/170.png'>";
echo "<div id='username'>@" . $user[3] . "</div>";
// Get all cards related to member id
$urlapicardstoamember = cardsmemberurl($user[0]);
$cardsassociatedtomember = json_decode(fetchdataonapi($urlapicardstoamember));
foreach ($cardsassociatedtomember as $cardsmember) {
示例11: glob
# delete files starting with $cch
$files = glob('images/' . $cch . '*');
foreach ($files as $file) {
if (is_file($file)) {
unlink($file);
}
}
}
if ($prize) {
$prizedate = gmdate('Y-m-d H:i:s');
$prizecode = md5(PRIZE_PREFIX . $prizedate);
$sql = "insert into prize (pdate, pcode, puser, pcountry) values ('{$prizedate}', '{$prizecode}', 0, '{$safe_country}')";
mysql_query($sql) or die(mysql_error());
mysql_close($conn);
httpheader();
echo htmlheader('travelrun -- prize', usercss());
echo '<div class="prize">';
echo '<h1>Congratulations!</h1>';
echo '<h2>You have won a prize.</h2>';
echo '<h3>send a in-game message to <a href="http://www.torn.com/profiles.php?XID=1757971">ebcdic</a> to reclaim it.</h3>';
echo '<h3>include the prize date and code in the message</h3>';
echo '<h3 style="text-align: center;"><pre>';
echo 'date: ', $prizedate, "\n";
echo 'code: ', $prizecode;
echo '</pre></h3>';
echo '<br><i>Prizes are in testing phase: they\'ll be small prizes :)</i>';
echo '<br><br>';
echo 'Back to <a href="index.php?c=', $cch, '">the regular travelrun page</a>.';
echo '</div>';
echo htmlfooter();
exit(0);
示例12: htmlheader
<?php
include 'lib/misc.inc.php';
print htmlheader();
?>
<body>
<div id="title">Wiki Wide Web: Enter Web 3.0</div>
<?php
if (!isset($_SESSION['username'])) {
?>
<div class="user"><form action="dosignup.php" method="post">
Please fill out the information below:<br />
Username: <input type="text" name="username" /><br />
Password: <input type="password" name="password" /><br />
E-mail: <input type="text" name="email" /><br />
Invite Code: <input type="text" name="invite" value="<?php
print isset($_GET['invite']) ? $_GET['invite'] : '';
?>
" /><br />
<input type="submit" value="Sign Up" /></form>
</div>
<?php
} else {
?>
<div class="user">Silly, you're already logged in!</div>
<?php
}
?>
</body>
</html>
示例13: mysql_connect
}
$scale = 1;
if (isset($_GET['scale'])) {
$scale = 1 * $_GET['scale'];
}
if ($scale < 1) {
$scale = 1;
}
if ($scale > 1000) {
$scale = 1000;
}
#connect to database
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DATA);
httpheader();
echo htmlheader('travelrun', usercss());
echo '<div class="mannav">';
echo 'Return to the <a href="index.php">start page</a>.';
echo '</div>';
echo '<div>';
echo '<form>';
echo '<label>Country: <select name=c>';
$sql = "select letter, countryname from country order by countryid";
$res = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_row($res)) {
echo '<option value="', $row[0], '"';
if ($row[0] == $cc) {
echo ' selected';
}
echo '>', $row[1];
}
示例14: ob_start
<?php
## $Id$
require '.config.php';
require 'fx.inc.php';
ob_start('ob_tidyhandler');
// open the database connection
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DATA);
$sql = "select valint from config where configkey = 'LAST_FLOWER_PAGE'";
$res = mysql_query($sql) or die(mysql_error());
$last1st = mysql_result($res, 0, 0);
mysql_free_result($res);
mysql_close($conn);
httpheader();
echo htmlheader('TravelRun: Last Forum Page', usercss());
echo '<br><br><br><br>';
echo '<div class="updateform">';
echo '<form method="post" action="firstoflast2.php">';
echo '<label>Last page in the flower thread: <input type="text" value="', $last1st, '" name="last1st" size="4"><br></label>';
echo '<input type="submit" value="UPDATE"><br>';
echo '</form>';
echo '<br>For the example below, you\'d use 860 for the last page.<br>';
echo '<img src="860.jpg" alt="page navigation on torn">';
echo '</div>';
echo htmlfooter();
示例15: htmlheader
<?php
$x_IN_FILE = 1;
include 'functions.php';
htmlheader('Contact Us');
if ($_GET['got'] == 'it') {
echo '<p>Thank you - your message has been received. You should receive a reply within three business days.</p>';
} else {
if ($_GET['got'] == 'anerror') {
echo '<blockquote><p>You <b>must</b> fill in all fields.</p></blockquote>';
}
?>
<p>Please fill out the following form.</p>
<form action="/contact-form.php" method="post" name="Submit">
<table cellspacing="5">
<tr><td>Name: </td>
<td><input type="text" size="30" value="" name="nick" /></td></tr>
<tr><td>Email:</td>
<td><input type="text" size="30" value="" name="email" /></td></tr>
<tr><td valign="top">Message:</td><td>
<textarea name="message" rows="8" cols="40"></textarea></td></tr>
<tr>
<td></td>
<td><input type="submit" value="Send Message »" /></td></tr>