if (SmrSession::$account_id == ACCOUNT_ID_NHL) { $alliance_id = 302; } else { $alliance_id = 0; } $db->lockTable('player'); // get last registered player id in that game and increase by one. $db->query('SELECT MAX(player_id) FROM player WHERE game_id = ' . $db->escapeNumber($gameID)); if ($db->nextRecord()) { $player_id = $db->getInt('MAX(player_id)') + 1; } else { $player_id = 1; } // insert into player table. $db->query('INSERT INTO player (account_id, game_id, player_id, player_name, race_id, ship_type_id, credits, alliance_id, sector_id, last_turn_update, last_cpl_action, last_active, newbie_turns) VALUES(' . $db->escapeNumber(SmrSession::$account_id) . ', ' . $db->escapeNumber($gameID) . ', ' . $db->escapeNumber($player_id) . ', ' . $db->escape_string($player_name, true) . ', ' . $db->escapeNumber($race_id) . ', ' . $db->escapeNumber($ship_id) . ', ' . $db->escapeNumber(Globals::getStartingCredits($gameID)) . ', ' . $db->escapeNumber($alliance_id) . ', ' . $db->escapeNumber($home_sector_id) . ', ' . $db->escapeNumber($last_turn_update) . ', ' . $db->escapeNumber(TIME) . ', ' . $db->escapeNumber(TIME) . ',' . $db->escapeNumber($startingNewbieTurns) . ')'); $db->unlock(); // give the player shields $db->query('INSERT INTO ship_has_hardware (account_id, game_id, hardware_type_id, amount, old_amount) VALUES(' . $db->escapeNumber(SmrSession::$account_id) . ', ' . $db->escapeNumber($gameID) . ', 1, ' . $db->escapeNumber($amount_shields) . ', ' . $db->escapeNumber($amount_shields) . ')'); // give the player armour $db->query('INSERT INTO ship_has_hardware (account_id, game_id, hardware_type_id, amount, old_amount) VALUES(' . $db->escapeNumber(SmrSession::$account_id) . ', ' . $db->escapeNumber($gameID) . ', 2, ' . $db->escapeNumber($amount_armour) . ', ' . $db->escapeNumber($amount_armour) . ')'); // give the player cargo hold $db->query('INSERT INTO ship_has_hardware (account_id, game_id, hardware_type_id, amount, old_amount) VALUES(' . $db->escapeNumber(SmrSession::$account_id) . ', ' . $db->escapeNumber($gameID) . ', 3, 40, 40)'); // give the player weapons $db->query('INSERT INTO ship_has_weapon (account_id, game_id, order_id, weapon_type_id) VALUES(' . $db->escapeNumber(SmrSession::$account_id) . ', ' . $db->escapeNumber($gameID) . ', 0, 46)'); // insert the huge amount of sectors into the database :) $db->query('SELECT MIN(sector_id), MAX(sector_id)
?> </td> </tr> <tr> <td align="right">Stats Ignored</td> <td> </td> <td align="left"><?php echo Globals::getGameIgnoreStats($StatsGameID) ? 'Yes' : 'No'; ?> </td> </tr> <tr> <td align="right">Starting Credits</td> <td> </td> <td align="left"><?php echo number_format(Globals::getStartingCredits($StatsGameID)); ?> </td> </tr> </table> </td> <td valign="top" align="center"> <table class="nobord"> <tr> <td align="right">Total Players</td> <td> </td><td align="left"><?php echo number_format($TotalPlayers); ?> </td> </tr> <tr>