当前位置: 首页>>代码示例>>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;未经允许,请勿转载。