Ejemplo n.º 1
0
    $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>';
*/
Ejemplo n.º 2
0
        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();