当前位置: 首页>>代码示例>>PHP>>正文


PHP SmrSession::addLink方法代码示例

本文整理汇总了PHP中SmrSession::addLink方法的典型用法代码示例。如果您正苦于以下问题:PHP SmrSession::addLink方法的具体用法?PHP SmrSession::addLink怎么用?PHP SmrSession::addLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SmrSession的用法示例。


在下文中一共展示了SmrSession::addLink方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: print_link

    $container['body'] = 'hall_of_fame_new.php';
    print_link($container, 'Hall of Fame');
    echo '<br>';
    $container['body'] = "hall_of_fame_new.php";
    $container['game_id'] = $player->game_id;
    print_link($container, "Current HoF");
    unset($container['game_id']);
    echo '<br><br>';
}
if (SmrSession::$old_account_id > 0 && empty($var['logoff'])) {
    $container['body'] = '';
    $container['url'] = 'game_play_preprocessing.php';
    echo '<a href="loader.php?sn=' . SmrSession::addLink($container) . '">Play Game</a>';
    echo '<br>';
    $container['url'] = 'logoff_preprocessing.php';
    echo '<a href="loader.php?sn=' . SmrSession::addLink($container) . '">Logoff</a>';
} else {
    echo '<a href="login.php">Login</a><br>';
}
echo '<br><br>';
echo '<a href="' . URL . '/manual.php" target="_blank">Manual</a><br>';
//$container['url'] = 'skeleton.php';
//$container['body'] = 'preferences.php';
//print_link($container, 'Preferences');
//echo '<br>';
/*
$container['body'] = '';
$container['url'] = 'mgu_create.php';
print_link($container, 'DL MGU Maps');
echo '<br>';
*/
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:skeleton.php

示例2: get_file_loc

        if ($db->getNumRows() > 0) {
            require_once get_file_loc('smr_player.inc', $databaseInfo['GameType']);
            require_once get_file_loc('smr_ship.inc', $databaseInfo['GameType']);
            while ($db->nextRecord()) {
                $game_id = $db->getField('game_id');
                $index = $databaseClassName . $game_id;
                $games['Play'][$index]['ID'] = $game_id;
                $games['Play'][$index]['Name'] = $db->getField('game_name');
                $games['Play'][$index]['Type'] = $db->getField('game_type');
                $games['Play'][$index]['EndDate'] = $db->getField('end_date');
                $games['Play'][$index]['Speed'] = $db->getField('game_speed');
                $games['Play'][$index]['Type'] = $db->getField('game_type');
                $container = array();
                $container['game_id'] = $game_id;
                $container['url'] = 'game_play_processing.php';
                $games['Play'][$index]['PlayGameLink'] = 'loader2.php?sn=' . SmrSession::addLink($container);
                // creates a new player object
                $curr_player = new SMR_PLAYER(SmrSession::$old_account_id, $game_id);
                $curr_ship = new SMR_SHIP(SmrSession::$old_account_id, $game_id);
                // update turns for this game
                $curr_player->update_turns($curr_ship->speed);
                // generate list of game_id that this player is joined
                $game_id_list[] = $game_id;
                $db2 = new $databaseClassName();
                $db2->query('SELECT count(*) as num_playing FROM player
							WHERE last_active >= ' . $db->escapeNumber(TIME - 600) . '
								AND game_id = ' . $db->escapeNumber($game_id));
                $db2->nextRecord();
                $games['Play'][$index]['NumberPlaying'] = $db2->getField('num_playing');
                // create a container that will hold next url and additional variables.
                $container_game = array();
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:game_play.php


注:本文中的SmrSession::addLink方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。