當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Globals::getGameStartDate方法代碼示例

本文整理匯總了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
開發者ID:smrealms,項目名稱:smrv2.0,代碼行數:31,代碼來源:bar_galmap_buy.php

示例2: bbifyMessage

?>
</td>
					</tr>
					<tr>
						<td align="right">Description</td>
						<td>&nbsp;</td>
						<td align="left"><?php 
echo bbifyMessage(Globals::getGameDescription($StatsGameID));
?>
</td>
					</tr>
					<tr>
						<td align="right">Start Date</td>
						<td>&nbsp;</td>
						<td align="left"><?php 
echo date(DATE_FULL_SHORT, Globals::getGameStartDate($StatsGameID));
?>
</td>
					</tr>
					<tr>
						<td align="right">Start Turns Date</td>
						<td>&nbsp;</td>
						<td align="left"><?php 
echo date(DATE_FULL_SHORT, SmrGame::getGame($StatsGameID)->getStartTurnsDate());
?>
</td>
					</tr>
					<tr>
						<td align="right">End Date</td>
						<td>&nbsp;</td>
						<td align="left"><?php 
開發者ID:smrealms,項目名稱:smrv2.0,代碼行數:31,代碼來源:game_stats.php


注:本文中的Globals::getGameStartDate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。