本文整理汇总了PHP中Globals::getGameStartDate方法的典型用法代码示例。如果您正苦于以下问题:PHP Globals::getGameStartDate方法的具体用法?PHP Globals::getGameStartDate怎么用?PHP Globals::getGameStartDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Globals
的用法示例。
在下文中一共展示了Globals::getGameStartDate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create_error
<?php
if (Globals::getGameStartDate($player->getGameID()) + TIME_MAP_BUY_WAIT > TIME) {
create_error('You cannot buy maps for another ' . format_time(Globals::getGameStartDate($player->getGameID()) + TIME_MAP_BUY_WAIT - TIME) . '!');
}
if ($account->getTotalSmrCredits() < CREDITS_PER_GAL_MAP) {
create_error('You don\'t have enough SMR Credits. Donate money to SMR to gain SMR Credits!');
}
//gal map buy
if (isset($var['process'])) {
$galaxyID = trim($_REQUEST['gal_id']);
if (!is_numeric($galaxyID) || $galaxyID == 0) {
create_error('You must select a galaxy to buy the map of!');
}
//get start sector
$galaxy =& SmrGalaxy::getGalaxy($player->getGameID(), $galaxyID);
$low = $galaxy->getStartSector();
//get end sector
$high = $galaxy->getEndSector();
// Have they already got this map? (Are there any unexplored sectors?
$db->query('SELECT * FROM player_visited_sector WHERE sector_id >= ' . $db->escapeNumber($low) . ' AND sector_id <= ' . $db->escapeNumber($high) . ' AND account_id = ' . $db->escapeNumber($player->getAccountID()) . ' AND game_id = ' . $db->escapeNumber($player->getGameID()) . ' LIMIT 1');
if (!$db->nextRecord()) {
create_error('You already have maps of this galaxy!');
}
$player->increaseHOF(1, array('Bar', 'Maps Bought'), HOF_PUBLIC);
//take money
$account->decreaseTotalSmrCredits(CREDITS_PER_GAL_MAP);
//now give maps
// delete all entries from the player_visited_sector/port table
$db->query('DELETE FROM player_visited_sector WHERE sector_id >= ' . $db->escapeNumber($low) . ' AND sector_id <= ' . $db->escapeNumber($high) . ' AND account_id = ' . $db->escapeNumber($player->getAccountID()) . ' AND game_id = ' . $db->escapeNumber($player->getGameID()));
//start section
示例2: bbifyMessage
?>
</td>
</tr>
<tr>
<td align="right">Description</td>
<td> </td>
<td align="left"><?php
echo bbifyMessage(Globals::getGameDescription($StatsGameID));
?>
</td>
</tr>
<tr>
<td align="right">Start Date</td>
<td> </td>
<td align="left"><?php
echo date(DATE_FULL_SHORT, Globals::getGameStartDate($StatsGameID));
?>
</td>
</tr>
<tr>
<td align="right">Start Turns Date</td>
<td> </td>
<td align="left"><?php
echo date(DATE_FULL_SHORT, SmrGame::getGame($StatsGameID)->getStartTurnsDate());
?>
</td>
</tr>
<tr>
<td align="right">End Date</td>
<td> </td>
<td align="left"><?php