本文整理汇总了PHP中UpdateQueue函数的典型用法代码示例。如果您正苦于以下问题:PHP UpdateQueue函数的具体用法?PHP UpdateQueue怎么用?PHP UpdateQueue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了UpdateQueue函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: UpdateQueue
include ROOT_PATH . 'includes/pages/BuildRessourcePage.' . $phpEx;
include ROOT_PATH . 'includes/pages/BuildingPage.' . $phpEx;
UpdateQueue();
$IsWorking = HandleTechnologieBuild($planetrow, $user);
BuildingPage();
break;
case 'station':
// --------------------------------------------------------------------------------------------------
$cpage = "station";
$pageid = "station";
if ($planetrow['planet_type'] == 3) {
$pageid .= "-moon";
}
includeLang('buildings');
include ROOT_PATH . 'includes/pages/BuildingPage.' . $phpEx;
UpdateQueue();
$IsWorking = HandleTechnologieBuild($planetrow, $user);
BuildingPage();
break;
case 'trader':
// --------------------------------------------------------------------------------------------------
$cpage = "trader";
$pageid = "trader";
include 'trader.php';
break;
case 'research':
// --------------------------------------------------------------------------------------------------
$cpage = "research";
$pageid = "research";
includeLang('buildings');
getLang('research');
示例2: 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("messages");
// *******************************************************************
$MAXMSG = 25;
// Количество сообщений на странице.
$uni = LoadUniverse();
DeleteExpiredMessages($GlobalUser['player_id']);
// Удалить сообщения которые хранятся дольше 24 часов.
// Заголовок таблицы
echo "<!-- CONTENT AREA -->\n";
echo "<div id='content'>\n";
echo "<center>\n";
//echo "GET: "; print_r ($_GET); echo "<br>";
//echo "POST: "; print_r ($_POST); echo "<br>";
if (method() === "POST") {
//print_r ($_POST);
$player_id = $GlobalUser['player_id'];
if ($_POST['deletemessages'] === "deleteall") {
示例3: strrpos
{
$host = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER["SCRIPT_NAME"];
$pos = strrpos($host, "/game/index.php");
return substr($host, 0, $pos + 1);
}
function nicenum($number)
{
return number_format($number, 0, ",", ".");
}
function RedirectHome()
{
global $StartPage;
echo "<html><head><meta http-equiv='refresh' content='0;url={$StartPage}' /></head><body></body>";
}
// Format string, according to tokens from the text. Tokens are represented as #1, #2 and so on.
function va($subject)
{
$num_arg = func_num_args();
$pattern = array();
for ($i = 1; $i < $num_arg; $i++) {
$pattern[$i - 1] = "/#{$i}/";
$replace[$i - 1] = func_get_arg($i);
}
return preg_replace($pattern, $replace, $subject);
}
$GlobalUser = LoadUser(99999);
// space
loca_add("common", $GlobalUni['lang']);
loca_add("technames", $GlobalUni['lang']);
UpdateQueue(time());
}