當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。