本文整理汇总了PHP中PageHeader函数的典型用法代码示例。如果您正苦于以下问题:PHP PageHeader函数的具体用法?PHP PageHeader怎么用?PHP PageHeader使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PageHeader函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Error
function Error($text)
{
global $GlobalUser;
if (!$GlobalUser) {
$GlobalUser = array();
$GlobalUser['player_id'] = 0;
}
$text = str_replace('\\"', """, $text);
$text = str_replace('\'', "’", $text);
$text = str_replace('\\`', "‘", $text);
$now = time();
$error = array(null, $GlobalUser['player_id'], $_SERVER['REMOTE_ADDR'], $_SERVER['HTTP_USER_AGENT'], $_SERVER['REQUEST_URI'], $text, $now);
$id = AddDBRow($error, 'errors');
Logout($_GET['session']);
// Завершить сессию.
ob_clean();
// Отменить предыдущий HTML.
PageHeader("error", true, false);
echo "<center><font size=\"3\"><b>\n";
echo "<br /><br />\n";
echo "<font color=\"#FF0000\">Произошла ошибка</font> - {$text}\n";
echo "<br /><br />\n";
echo BackTrace() . "<br /><br />\n";
echo "Аварийное завершение программы.<br/><br/>Обратитесь в Службу поддержки или на форум, в раздел \"Ошибки\".\n";
echo "<br /><br />\n";
echo "Error-ID: {$id}</b></font></center>\n";
//PageFooter ();
ob_end_flush();
exit;
}
示例2: PlanetDestroyMenu
function PlanetDestroyMenu()
{
global $GlobalUser;
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
PageHeader("renameplanet");
echo "<!-- CONTENT AREA -->\n";
echo "<div id='content'>\n";
echo "<center>\n\n";
echo "<h1>Переименовать/покинуть планету</h1>\n";
echo "<form action=\"index.php?page=renameplanet&session=" . $_GET['session'] . "&pl=" . $aktplanet['planet_id'] . "\" method=\"POST\">\n";
echo "<input type='hidden' name='page' value='renameplanet'>\n";
echo "<center>\n\n";
echo "<table width=\"519\">\n";
echo "<tr><td class=\"c\" colspan=\"3\">Вопросы на всякий случай</td></tr>\n";
echo "<tr><th colspan=\"3\">Уничтожение планеты [" . $aktplanet['g'] . ":" . $aktplanet['s'] . ":" . $aktplanet['p'] . "] подтвердить паролем</th></tr>\n";
echo "<tr><input type=\"hidden\" name=\"deleteid\" value =\"" . $aktplanet['planet_id'] . "\">\n";
echo "<th>Пароль</th><th><input type=\"password\" name=\"pw\"></th>\n";
echo "<th><input type=\"submit\" name=\"aktion\" value=\"Удалить планету!\" alt=\"Покинуть колонию\"></th></tr>\n";
echo "</table>\n</form>\n</center>\n\n";
echo "<br><br><br><br>\n";
echo "</center>\n";
echo "</div>\n";
echo "<!-- END CONTENT AREA -->\n";
PageFooter();
ob_end_flush();
exit;
}
示例3: SearchAllyTag
if ($_GET['a'] == 2) {
if (key_exists('suchtext', $_POST) && $_POST['suchtext'] !== "") {
$result = SearchAllyTag($_POST['suchtext']);
AllyPage_SearchResult($result);
}
}
}
}
// ***********************************************************
include "allianzen_main.php";
include "allianzen_members.php";
include "allianzen_ranks.php";
include "allianzen_settings.php";
include "allianzen_circular.php";
include "allianzen_misc.php";
PageHeader("allianzen");
echo "<!-- CONTENT AREA -->\n";
echo "<div id='content'>\n";
echo "<center>\n";
echo "<script src=\"js/cntchar.js\" type=\"text/javascript\"></script><script src=\"js/win.js\" type=\"text/javascript\"></script>\n";
if ($GlobalUser['ally_id'] == 0) {
$app_id = GetUserApplication($GlobalUser['player_id']);
if ($app_id > 0) {
AllyPage_Already($app_id);
} else {
if (key_exists('a', $_GET) && $_GET['a'] == 1) {
AllyPage_CreateAlly($_POST['tag'], $_POST['name']);
} else {
if (key_exists('a', $_GET) && $_GET['a'] == 2) {
AllyPage_Search($_POST['suchtext'], $SearchResults);
} else {
示例4: loca_add
loca_add("fleet", $GlobalUni['lang']);
if (key_exists('cp', $_GET)) {
SelectPlanet($GlobalUser['player_id'], intval($_GET['cp']));
}
$GlobalUser['aktplanet'] = GetSelectedPlanet($GlobalUser['player_id']);
$now = time();
UpdateQueue($now);
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
$aktplanet = ProdResources($aktplanet, $aktplanet['lastpeek'], $now);
UpdatePlanetActivity($aktplanet['planet_id']);
UpdateLastClick($GlobalUser['player_id']);
$session = $_GET['session'];
if (method() !== "POST") {
MyGoto("flotten1");
}
PageHeader("flotten2");
?>
<!-- CONTENT AREA -->
<div id='content'>
<center>
<script language="JavaScript" src="js/flotten.js"></script>
<script language="JavaScript" src="js/ocnt.js"></script>
<script type="text/javascript">
function getStorageFaktor(){
return 1 }
示例5: dbquery
// Списать ТМ.
if ($GlobalUser['dm'] >= $required) {
$GlobalUser['dm'] -= $required;
} else {
$GlobalUser['dmfree'] -= $required - $GlobalUser['dm'];
$GlobalUser['dm'] = 0;
}
$query = "UPDATE " . $db_prefix . "users SET dm = '" . $GlobalUser['dm'] . "', dmfree = '" . $GlobalUser['dmfree'] . "' WHERE player_id = " . $GlobalUser['player_id'];
dbquery($query);
RecruitOfficer($GlobalUser['player_id'], $qcmd[$type], $days * 24 * 60 * 60);
$MicropaymentMessage = loca("PREM_OK") . "<br>";
}
}
}
}
PageHeader("micropayment");
echo "<!-- CONTENT AREA -->\n";
echo "<div id='content'>\n";
echo "<center>\n";
// ************************************************************************************
?>
<center>
<div id="header" style="background-image:url('img/kasino_600x120.jpg'); width:600px;height:120px;">
<div id="headtext1" style="position:relative; top:25px; left:-160px;font-size:18px;font-weight:bold; color:f3d2b1;"><?php
echo loca("PREM_HEAD1");
?>
</div>
<div id="headtext2" style="position:relative;float:right;top:23px;left:-240px;font-size:13px;font-weight:bold;color:#c2f1fd;"><?php
echo loca("PREM_HEAD2");
示例6: AdjustResources
$not_enough_deut = ($aktplanet['g'] != $coord_g || $aktplanet['s'] != $coord_s) && $aktplanet['d'] < 10;
// Списать 10 дейтерия за просмотр не домашней системы (только для обычных пользователей)
if (!$not_enough_deut && $GlobalUser['admin'] == 0) {
if ($aktplanet['g'] != $coord_g || $aktplanet['s'] != $coord_s) {
AdjustResources(0, 0, 10, $aktplanet['planet_id'], '-');
$aktplanet = GetPlanet($aktplanet['planet_id']);
}
}
$result = EnumOwnFleetQueue($GlobalUser['player_id']);
$nowfleet = dbrows($result);
$maxfleet = $GlobalUser['r108'] + 1;
$prem = PremiumStatus($GlobalUser);
if ($prem['admiral']) {
$maxfleet += 2;
}
PageHeader("galaxy", true);
echo "<!-- CONTENT AREA -->\n";
echo "<div id='content'>\n";
echo "<center>\n\n";
/***** Скрипты. *****/
?>
<script language="JavaScript">
function galaxy_submit(value) {
document.getElementById('auto').name = value;
document.getElementById('galaxy_form').submit();
}
function fenster(target_url,win_name) {
var new_win = window.open(target_url,win_name,'scrollbars=yes,menubar=no,top=0,left=0,toolbar=no,width=550,height=280,resizable=yes');
new_win.focus();
示例7: rapidIn
}
}
for ($n = 202; $n <= 215; $n++) {
if ($RapidFire[$n][$gid] > 1) {
$res .= rapidIn($n, $RapidFire[$n][$gid]);
}
}
for ($n = 401; $n <= 408; $n++) {
if ($RapidFire[$n][$gid] > 1) {
$res .= rapidIn($n, $RapidFire[$n][$gid]);
}
}
return $res;
}
$gid = intval($_GET['gid']);
PageHeader("infos");
echo "<!-- CONTENT AREA -->\n";
echo "<div id='content'>\n";
echo "<center>\n";
echo "<table width=\"519\">\n";
if ($gid > 200 && $gid < 300) {
echo "<!-- begin fleet or defense information -->\n";
echo "<tr><td class=\"c\" colspan=\"2\">Информация о флоте:</td></tr>\n";
echo "<tr><th>Название</th><th>" . loca("NAME_{$gid}") . "</th></tr>\n";
echo "<tr><th colspan=\"2\">\n";
echo "<table border=\"0\">\n";
echo "<tr><td valign=\"top\"><img border=\"0\" src=\"" . UserSkin() . "gebaeude/{$gid}.gif\" width=\"120\" height=\"120\"></td>\n";
echo "<td>" . loca("LONG_{$gid}") . "<br/>" . rapid($gid) . "</td>\n";
echo "</tr></table></th></tr>\n";
echo "<tr><th>Структура</th><th>" . nicenum($UnitParam[$gid][0]) . "</th></tr>\n";
echo "<tr><th>Мощность щита</th><th>" . nicenum($UnitParam[$gid][1]) . "</th></tr>\n";
示例8: loca_add
// Стандартные флоты.
$MAX = 13;
loca_add("menu", $GlobalUni['lang']);
if (key_exists('cp', $_GET)) {
SelectPlanet($GlobalUser['player_id'], intval($_GET['cp']));
}
$GlobalUser['aktplanet'] = GetSelectedPlanet($GlobalUser['player_id']);
$now = time();
UpdateQueue($now);
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
$aktplanet = ProdResources($aktplanet, $aktplanet['lastpeek'], $now);
UpdatePlanetActivity($aktplanet['planet_id']);
UpdateLastClick($GlobalUser['player_id']);
$session = $_GET['session'];
PageHeader("fleet_templates");
$temp_map = array(202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 213, 214, 215);
// без сс
// Вырезать из строки всякие инжекции.
function SecureText($text)
{
$search = array("'<script[^>]*?>.*?</script>'si", "'<[\\/\\!]*?[^<>]*?>'si", "'([\r\n])[\\s]+'");
// Вырезает пробельные символы
$replace = array("", "", "\\1", "\\1");
$str = preg_replace($search, $replace, $text);
$str = str_replace("`", "", $str);
$str = str_replace("'", "", $str);
$str = str_replace("\"", "", $str);
$str = str_replace("%0", "", $str);
return $str;
}
示例9: loca_add
// Ракета не может выгрузить во флот топлива меньше, чем он потребляет в указанное количество часов.
$DepotError = "";
loca_add("common", $GlobalUni['lang']);
loca_add("menu", $GlobalUni['lang']);
if (key_exists('cp', $_GET)) {
SelectPlanet($GlobalUser['player_id'], intval($_GET['cp']));
}
$GlobalUser['aktplanet'] = GetSelectedPlanet($GlobalUser['player_id']);
$now = time();
UpdateQueue($now);
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
$aktplanet = ProdResources($aktplanet, $aktplanet['lastpeek'], $now);
UpdatePlanetActivity($aktplanet['planet_id']);
UpdateLastClick($GlobalUser['player_id']);
$session = $_GET['session'];
PageHeader("allianzdepot");
echo "<!-- CONTENT AREA -->\n";
echo "<div id='content'>\n";
echo "<center>\n";
$fleetmap = array(202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215);
// Запустить ракету со снабжением
$depot_cap = 10000 * pow(2, $aktplanet['b34']);
if ($aktplanet['b34']) {
$deut_avail = min(floor($aktplanet['d']), $depot_cap);
} else {
$deut_avail = 0;
}
$loaded = $deut_avail;
// Отправить ракету поочередности к каждому флоту
$result = GetHoldingFleets($aktplanet['planet_id']);
$rows = dbrows($result);
示例10: fopen
$f = fopen($fleetlock, 'w');
fclose($f);
$fleet_id = DispatchFleet($fleet, $origin, $target, $order, $flighttime, $cargo_m, $cargo_k, $cargo_d, $cons['fleet'] + $cons['probes'], time(), $union_id, $hold_time);
$queue = GetFleetQueue($fleet_id);
UserLog($aktplanet['owner_id'], "FLEET", "Отправка флота {$fleet_id}: " . GetMissionNameDebug($order) . " " . $origin['name'] . " [" . $origin['g'] . ":" . $origin['s'] . ":" . $origin['p'] . "] -> " . $target['name'] . " [" . $target['g'] . ":" . $target['s'] . ":" . $target['p'] . "]<br>" . DumpFleet($fleet) . "<br>" . "Время полёта: " . BuildDurationFormat($flighttime) . ", удержание: " . BuildDurationFormat($hold_time) . ", затраты дейтерия: " . nicenum($cons['fleet'] + $cons['probes']) . ", союз: " . $union_id);
if ($union_id) {
$union_time = UpdateUnionTime($union_id, $queue['end'], $fleet_id);
UpdateFleetTime($fleet_id, $union_time);
}
// Поднять флот с планеты.
AdjustResources($cargo_m, $cargo_k, $cargo_d + $cons['fleet'] + $cons['probes'], $origin['planet_id'], '-');
AdjustShips($fleet, $origin['planet_id'], '-');
unlink($fleetlock);
// echo "<br>";
// print_r ( $queue);
PageHeader("flottenversand", false, true, "flotten1", 1);
?>
<!-- CONTENT AREA -->
<div id='content'>
<center>
<script language="JavaScript" src="js/flotten.js"></script>
<table width="519" border="0" cellpadding="0" cellspacing="1">
<tr height="20">
<td class="c" colspan="2">
<span class="success">Флот отправлен:</span>
</td>
</tr>
<tr height="20">
<th>Задание</th><th><?php
示例11: BuildEnque
BuildEnque(intval($_GET['planet']), intval($_GET['techid']), 1);
} else {
if ($_GET['modus'] === 'remove') {
BuildDeque(intval($_GET['planet']), intval($_GET['listid']));
}
}
}
}
$now = time();
UpdateQueue($now);
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
$aktplanet = ProdResources($aktplanet, $aktplanet['lastpeek'], $now);
UpdatePlanetActivity($aktplanet['planet_id']);
UpdateLastClick($GlobalUser['player_id']);
$session = $_GET['session'];
PageHeader("imperium", true);
$planettype = intval($_GET['planettype']);
if ($GlobalUni['moons']) {
if ($planettype != 1 && $planettype != 3) {
$planettype = 1;
}
} else {
if ($planettype != 1) {
$planettype = 1;
}
}
// Загрузить список планет/лун.
$plist = array();
$moons = $num = 0;
if ($planettype == 1 || $planettype == 3) {
$result = EnumPlanets();
示例12: loca_add
<?php
// Написать сообщение игроку.
loca_add("menu", $GlobalUni['lang']);
if (key_exists('cp', $_GET)) {
SelectPlanet($GlobalUser['player_id'], intval($_GET['cp']));
}
$GlobalUser['aktplanet'] = GetSelectedPlanet($GlobalUser['player_id']);
$now = time();
UpdateQueue($now);
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
$aktplanet = ProdResources($aktplanet, $aktplanet['lastpeek'], $now);
UpdatePlanetActivity($aktplanet['planet_id']);
UpdateLastClick($GlobalUser['player_id']);
PageHeader("writemessages");
function SendNotActivated()
{
global $GlobalUser;
$unitab = LoadUniverse();
$uni = $unitab['num'];
echo "<html>\n";
echo " <head>\n";
echo " <link rel='stylesheet' type='text/css' href='css/default.css' />\n";
echo " <link rel='stylesheet' type='text/css' href='css/formate.css' />\n";
echo " <link rel=\"stylesheet\" type=\"text/css\" href=\"formate.css\" />\n";
echo " <link rel=\"stylesheet\" type=\"text/css\" href=\"css/combox.css\">\n";
echo " <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />\n";
echo " <title>Вселенная {$uni} ОГейм</title>\n";
echo " </head>\n\n";
echo " <body>\n";
echo " <center><font size=\"3\"><b>\n";
示例13: SelectPlanet
$OverviewError = "";
require_once "overview_events.php";
if (key_exists('cp', $_GET)) {
SelectPlanet($GlobalUser['player_id'], intval($_GET['cp']));
}
$GlobalUser['aktplanet'] = GetSelectedPlanet($GlobalUser['player_id']);
$now = time();
if ($GlobalUser['admin'] == 0) {
UpdateQueue($now);
}
// Не обновлять Обзор для админов
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
$aktplanet = ProdResources($aktplanet, $aktplanet['lastpeek'], $now);
UpdateLastClick($GlobalUser['player_id']);
$session = $_GET['session'];
PageHeader("overview");
// *******************************************************************
if (key_exists('lgn', $_GET)) {
UpdatePlanetActivity($aktplanet['planet_id']);
// Обновить активность на Главной планете при входе в игру.
}
$uni = $GlobalUni;
?>
<!-- CONTENT AREA -->
<div id='content'>
<center>
<script type="text/javascript">
<!--
function t_building() {
v = new Date();
示例14: loca_add
<?php
// Статистика
loca_add("menu", $GlobalUser['lang']);
if (key_exists('cp', $_GET)) {
SelectPlanet($GlobalUser['player_id'], intval($_GET['cp']));
}
$GlobalUser['aktplanet'] = GetSelectedPlanet($GlobalUser['player_id']);
$now = time();
UpdateQueue($now);
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
$aktplanet = ProdResources($aktplanet, $aktplanet['lastpeek'], $now);
UpdatePlanetActivity($aktplanet['planet_id']);
UpdateLastClick($GlobalUser['player_id']);
$session = $_GET['session'];
PageHeader("statistics");
$start = -1;
if (key_exists("start", $_REQUEST)) {
$start = intval($_REQUEST['start']);
}
$type = "";
if (key_exists("type", $_REQUEST)) {
$type = $_REQUEST['type'];
}
$who = "player";
if (key_exists("who", $_REQUEST)) {
$who = $_REQUEST['who'];
}
?>
<!-- CONTENT AREA -->
示例15: dbquery
if ($exist4) {
$query .= "sprod = {$last4}, ";
}
if ($exist12) {
$query .= "fprod = {$last12}, ";
}
if ($exist212) {
$query .= "ssprod = {$last212}, ";
}
$query .= " type = type WHERE planet_id = {$planet_id}";
dbquery($query);
}
$aktplanet = GetPlanet($GlobalUser['aktplanet']);
// перегрузить планету.
}
PageHeader("resources");
echo "<!-- CONTENT AREA -->\n";
echo "<div id='content'>\n";
echo "<center>\n";
// ***********************************************************************
function get_prod($id, $planet)
{
switch ($id) {
case 1:
return 100 * $planet['mprod'];
case 2:
return 100 * $planet['kprod'];
case 3:
return 100 * $planet['dprod'];
case 4:
return 100 * $planet['sprod'];