World at War Revision History
This is a raw dump of the most recent revision log in the WaW main program itself.
It's interesting as a history of sorts on the options and features as the program
grew over the years.
/*
** This is the main World at War code. First thing to check is if browser is hitting us for the first time.
** If it is, there should be no variables set. The $session variable is the first that should be set
** so check it here to see if it's set. If not, consider this a first-time hit. Ask them for username
** and password or link to create a new username and password.
**
** Version 1.0 Final basic working version with Unlimited Fortifications option.
** Version 1.1 Chatter Implemented - requires change to logs table in database. Addition of Chatter field.
** Version 1.2 ToTheDeath button added. Reduced log output. Commented out many logs.
** Version 1.3 Bank Implemented - requires addition of Bank field in games table.
** Version 1.4 Chatter bug fixed involving apostrophe's sneaking in.
** Version 1.41 Still chasing chatter bug and bank not working.
** Version 1.5 Chatter fixed, bank fixed.
** Version 1.6 Different color for out of game players. Modded players dbase with gamesplayed gameswon and implemented.
** Version 1.7 Implemented Banners, added player name in appropriate color to logs (hopefully). Buttonized global map.
** allowed non-players to view game.
** Version 1.8 Removed Banners and recoded database connection now that it's running at Prowler-Pro.com
** Version 1.9 Adding F.I.R.E. based ranking system to Players table. Also removed Game Name from game list & reordered
** Version 1.10 Added debug code. Looks like DEC2HEX function still is screwing up rarely. Debug code writes to log file
** if DEC2HEX returns less than 2 characters. Also changed "Maximum Players" to "Number of Players"
** Version 1.11 Split deploy armies into 6 separate fields p1eploy, p2deploy etc. Also modified daily check when new user
** is created to JUST BEFORE player database is updated. Player list ordered by Ranking but no display of 1200
** Version 1.12 Added DAILY option to force 1 turn per day. Daily maintenance STILL is sometimes running twice! To fix it
** once-and-for-all I will update the Player 1 record every time Daily maintenance runs so at LEAST that record
** shows the new date and it should not be possible for it to run more than once per day.
** Version 1.13 Added IRCx Chat feature.
** Version 1.14 Adding LOCKs to games. Disabled if UNLOCKED feature is on. Added timestamp to new Chatter. Color coded game state.
** Displays game options on line 18 now.
** Version 1.15 Daily maint. check now ran with EVERY call. New table DAILY with 1 entry is checked against current date. If
** day is different, daily table is updated and runs routine.
** Version 1.16 Fixed maint bug. BAD maint bug. Implemented Advanced option. Added counter to Ranking list.
** Version 1.17 Added javascript help links on game options.
** Version 1.18 Added $MAAC variable and checkbox. (Move All Armies on Conquest) If checked, no move after attack needed.
** Version 1.19 I now reseed random number generator with a call to srand((time())) just before EVERY call to rand()
** Version 1.20 Reuse player slots with name = EMPTY. Also OVER games show winner name in purple.
** Version 1.21 New players cannot create new games until they have won at least 1 game.
** Version 1.22 New players CAN create up to 5 new games - counting only Created games.
** Version 1.23 No longer use array of arrays in daily routine to hold gameinfo. Now use mysql_data_seek to pull gameinfo.
** Version 1.24 Removing gameinfo[] array apparently didn't help. Revising daily maintenance again.
** Version 1.25 Created AANR option. Removed daily maint. call as cron will run it now hopefully via manualdaily.php3
** Version 1.26 $session variable is now 8 random characters PLUS playernum. $presession is just the 8 characters. Should prevent
** duplicate sessionIDs from causing confusion.
** Version 1.27 Bonus armies shown on maps for continents.
** Version 1.28 Improved "Viewing" Status to allow viewing logs and chatter. Added experimental HTML chat.
** Version 1.29 Removed Javachat and incorporated my own HTML chat. Fixed Netscape dropdown box problem.
** Version 1.30 Alphabetized drop-down lists. Big task!
** Version 1.31 Removed ALL viewing mode changes except if link is hit. Redisplay mode only changes the mode.
** Version 1.32 Yanked a line that was still calling IRCx javascript and gumming up the works!
** Version 1.33 Fixed bug caused by dummy player 0 when that dummy player is eliminated from the game. Logout goes to PP Web Portal.
** Version 1.34 Removed EMPTY players from Ranking lists.
** Version 1.35 Display mode was not being set for player due to erroneous if playernumingame < 6 instead of < 7
** Version 1.36 Added Time Delay option for new games. Also when joining a new game, timestamp entered is 24 hours less than real time
** so as to avoid not being able to play right away due to the Time Delay option.
** Version 1.37 Created warconfig.txt configuration file so links, database name, password etc. is no longer hard-coded in the program.
** also edited chat.php3, chatdump.php3 and chatenter.php3 to use it too.
** Version 1.38 War Fog Variant finally added!
** Version 1.39 WAWFAQ link added.
** Version 1.40 Added turnstaken field to games table, IncrementTurn function. This will allow tracking of how many turns are actively taken
** by each player, so as to disallow points being awarded from deadbeat players.
** Version 1.41 Bug fix. Allowed moving all armies leaving 0 armies behind after attack! (How did THAT happen?!)
** Version 1.42 Fixed turnstaken subroutine. (a - b * c is not the same as (a - b) * c dummy!)
** Version 1.43 War Fogged the log for bonus armies - otherwise players can see when a player owns all of a continent.
** Version 1.44 Dice logged to diceroll.txt. Implemented EndTurnCheck to prevent delay tactic.
** Version 1.45 No points for deadbeats mod added.
** Version 1.46 Print bug in deadbeats mod fixed. If Create New Game checkbox is not checked, error msg suggests it.
** Version 1.47 Put games won/played back into Ranking and mRanking output.
** Version 1.48 Bug fix - Daily games sometimes still did more than one turn per day!
** Version 1.49 Dice logging commented out.
** Version 1.50 Dice logging back in at LHGs request.
** Version 1.51 Implemented 5 bonus armies when player eliminates another player.
** Version 1.52 Implemented Leperflesh Cutthroat Mod option, trimmed option map display, revised deadbeat mod to only 1 turn.
** (again! Lost a rev somewhere!)
** Version 1.53 Implemented Paranoia! option
** Version 1.54 VERY slight mod to the display of game options. Added one
. Also only displays Target after state is Running.
** Version 1.55 Added numbanks field to games table and supporting routines to incr. from 0 to 9 max for limited banking option later.
** Also stopped diceroll.txt again.
** Version 1.56 Added log entry anytime NextTurn is invoked saying Next Round initializing...
** Version 1.57 Implemented Limited Banking option for 2 or 5 days. Added comment field to players database.
** Version 1.58 Added links to dispplayer.php3 in Rankings, MRankings.
** Version 1.59 Database Change! Added Varchar 42 field cards for use in tracking bonus cards.
** Version 1.60 Added timestamp update when status changes from R to D to prevent possible forced logout condition.
** Version 1.61 More database change. Added varchar 6 field for card flag indicating player should get a card at end of turn.
** Version 1.62 Added logging of ranking score changes for normal and cutthroat games.
** Version 2.0 Bonus Cards FINALLY added. Probably will be a lot of tweaking but initial testing looks good.
** Version 2.02 (somehow skipped 2.01! Hope it wasn't important!) Bonus card fix in givecard function. Also modified blacklist IP
** so it can blacklist a range of IPs (any match will blacklist). Fixed Type1 cards so bonus can go higher than 12.
** Version 2.03 Modified maxbank to accomodate cards by adding a parameter to Banking function to tell if it should increment numbanks (1)
** or not (0). Not all additions to the bank indicate a new turn anymore.
** Version 2.04 minor correction of card colors in a couple routines. $card%3 should be 1-green 2-red 0-blue
** Version 2.05 Added icons to Playerlist, MPlayerlist and map display. >2000 icon1, >1500 icon2, >1200 icon3 etc... Also only link to
** dispplayer.php3 if player has a jpg graphic file on record.
** Version 2.05 Increased logging of card-related activity to find why $cards getting corrupted.
** Version 2.06 Revised Banking routine again. Now Card bonus should not be affected by Limited Banking.
** Version 2.07 Removed p1_lastlogon update if state is R. Caused a problem with card players hitting View Log and getting
** TurnDelayed because of the update. Seems to not hurt anything else.
** Version 2.08 Fixed cards corruption bug! Hurrah!
** Version 2.09 Added ALT string to icon graphics. New games check when they start to make sure no one player owns an entire continent.
** Version 2.10 Added FORFEIT option. Click your name on top line of map display to forfeit.
** Version 2.11 Revamped font color showing players state in games. Black indicates out of game now.
** Version 2.12 Had an error in New User function that prevented creating new entries in Players table. (Thanks james!)
** Version 2.13 Massive efficiency changes. May be bugs related. Calling database queries fewer and less redundant. If there are no
** major bugs, then another version should be done removing all commented-out queries.
** Version 2.14 Deleted commented-out code from the 2.13 upgrade. Removed some logging of cards since other players should not be able
** to know which cards a player has, and the card bugs seem to be fixed.
** Version 2.15 Added Cards Type 4 (Random bonus between 3 and 10 armies)
** Version 2.16 Minor bug fix. Forced turn over code was not incrementing turncount resulting in inaccurate deadbeat designation.
** Also some formatting changes. Moved "End Phase" button to the far right. Rearranged bottom links.
** Version 2.17 Brought the End Phase button back a bit.
** Version 2.18 Add turns to forfeiting players so they are never marked as a deadbeat.
** Version 2.19 Fixed bug introduced during optimization where last player joining a game didn't get displayed in the map.
** Version 2.20 Added map redisplay and GetInfo() calls on errors like attacking to a non-border country. Reduce BACK button usage.
** Version 2.21 Added 255 armies, allow aborting of deployment phase form.
** Version 4.41 04/29/02 - Disallow sequential unlocked games from being created.
** Version 4.42 05/01/02 - Created BANK choice when entering games to skip your turn and store your armies subject to MaxBank of course!
** Version 4.43 05/05/02 - BANK function was useable before game began to gain armies in bank prematurely. Now checks for valid game state.
** Version 4.44 05/07/02 - When setting random beginning player for sequential games, update his lastlogon date so he has 24 hours to play.
** Version 4.45 05/10/02 - SLIGHTLY changed random number seed generation code.
** Version 4.46 05/16/02 - Currently you can only forfeit if your status is R or V (turn is ready or over, not mid-turn). State that in error.
** Version 4.47 05/20/02 - Adding ADE field to database in anticipation of ADE feature (auto deadbeat elimination)
** Also added a log entry when a sequential player's turn is skipped due to next player in after 24 hrs.
** Version 4.48 06/15/02 - Fixed chatenter.php3 so you can't spoof a message. Also added to text after taking a country to display
** who it was taken from.
** Version 4.49 07/18/02 - Added ADEReset function when a player enters a game or chooses to bank a turn.
** Version 4.50 08/01/02 - Hardcoded forum link instead of using warconfig.txt variable as that contained another variable that wasn't working.
** Version 4.51 08/06/02 - Multiple start-game fixes all tied to sequential startup bug.
** Version 4.52 08/06/02 - Confirmation screen if player wants to join a game.
** Version 4.53 08/07/02 - Implemented Round Counter variable.
** Version 4.54 08/15/02 - Addition of "Round x -" to top line was causing map to be too long. Fixed.
** Version 4.55 08/16/02 - Increased lock timeout from 5 to 10 minutes. Also implemented error checking in daily routine for player deletion.
** Version 4.56 09/03/02 - Added log to turn counter to discover why it's not working right.
** Version 4.57 09/18/02 - Added IP address to login entry in log 0
** Version 4.58 09/25/02 - Added colors field to games table for choosing colors at a future date.
** Version 4.59 09/27/02 - No longer prints "Do you want to take your turn" if game is not Running.
** Version 4.60 10/01/02 - Now actually uses colors field to display colors. Still no option to change
** though.
** Version 4.61 10/01/02 - Now color preferences are fully online.
** Version 4.62 10/16/02 - No player can have more than 50 games awaiting players. New games will be rejected.
** Version 4.63 02/05/03 - In non-paranoia and non-team games, we now gameover even if a dummy player is left.
** Version 4.7 02/10/03 - Added CMD option (originally NukeCards. Also belatedly added option notice.
** Version 4.8 03/03/03 - Allow freebies to send to atldjrob
** Version 4.9 03/05/03 - Bug was not allowing freebies who had won 1 game to join 7 instead of 5.
** Version 4.91 03/22/03 - When a deadbeat in a seq game has had > 24 hours and the next player joins, his turn
** is skipped as it should be. However, it was NOT incrementing ADE counter. Now it does.
** Version 4.92 04/17/03 - Allowed re-ordering of Monthly ranking screen via links on header.
** Version 4.93 06/26/03 - Implemented a Search for Player function in List All Games routine
** Version 4.94 10/10/03 - Revised WOT to WOTII map. Removed option to pick old WOT map.
** Version 4.95 01/14/03 - Due to some bug with BLANDOOMs account (possibly others) I'm now allowing points
** to be given to deadbeat winning players because he keeps getting marked as a deadbeat
** 0 in TurnTaken even when he obviously HAS taken turns. This is a workaround, the real
** fix is to find out why his turnstaken is 0 when it shouldnt be.
** Version 4.96 01/14/03 - Name and Colorized more log entries.
** Version 5.00 01/14/03 - Created SCORELESS option. No points awarded or subtracted. I hope.
** Version 5.01 01/14/03 - Added View Short Log - truncated to 10000 characters. Also fixed name bug in log entries.
** Version 5.02 02/27/04 - Replaced all rand() with mt_rand and removed srand() in attempt to improve randomness
** Version 5.03 03/02/04 - Fixed a bug where taking a country from Dummy Player 0 would result in bizarre log string.
** Bug was introduced in V 4.96 update.
** Version 5.04 03/03/04 - Fix of the Fix. Dummy Player 0 fix above was checked AFTER war fog check, thereby revealing
** info it shouldnt have revealed. Relocated to just above war fog check.
** Version 5.05 03/04/04 - Reimplemented Diceroll.txt dice roll logging routine. Outputs to diceroll.txt.
** Version 5.06 03/08/04 - Turned off dice logging again.
** Version 5.07 03/15/04 - Revised ranking icons to include sergent and upped requirements.
** Version 5.08 03/22/04 - TotalGameCount variable added to count games player is involved in - at bottom of game list.
** Version 5.09 04/27/04 - Player BLANDOOM (see 4.95 comments) was not getting his turns incremented by IncrementTurn
** function. That function takes only the gameinfo structure and playernumingame variables so
** his name and account number do not play any role - function looks good. So likely the function
** simply wasnt being called. In most games, the function is called when the fortify phase is ended
** so maybe he was never ending his fortification? Revised location of call to IncrementTurn to
** increment when Deploy Armies form is sent. Much more likely to always be hit at beginning of
** turn rather than end of turn. This may be the fix.
** Version 6.00 05/11/04 - This deserves a whole new version number. Finally found a method to use CSS to fix the longstanding
** map/font size discrepancy issue. Now a STYLE for the td selector is used to set the font size and
** line height in the header. Tested and seems to work.
** Version 6.01 05/11/04 - Apparently War Fog games still were revealing owner of a country when cards turned in and extra 2
** bonus was added to those countries. Fogged now.
** Version 6.02 05/13/04 - Using div now to set font properties. font-size:16px works in Windows, not Linux or Macs. Now
** checking HTTP_USER_AGENT. If "Mac" or "Linux" found, use font-size:15px instead of 16px. Displays
** HTTP_USER_AGENT at the bottom of every page so more adjustments can be made as needed.
** Version 6.10 06/09/04 - Added optional Capital Bonus of 1 for owning any Capital country (Currently only Venetia uses
** Capital countries.) Defined with "cap" in color field of country (unused previously)
** Version 6.11 06/14/04 - Added Welcome Text feature. When you create a game, you may create a Welcome Text message to say
** anything you want to potential players before they join your game.
** Version 6.12 06/22/04 - Cheat was allowing capital bonus multiple times. Temporarily disabled till fix can be implemented.
** Version 6.13 07/26/04 - Reenabled dice logging and added $massiveattack string variable to differentiate between single and
** massive attack dice rolls.
** Version 6.14 08/19/04 - Reenabled capital bonus after moving to different calling point.
** Version 6.15 08/29/04 - Disabled dice logging.
** Version 6.16 09/07/04 - Fixed problem with noscore games not ending properly.
** Version 6.17 09/08/04 - Increased Massive Attack default to 10. - nope, reverted back to 1.
** Version 6.18 09/13/04 - Added CountCards() subroutine and display num cards held in icon TITLE tag.
** Version 6.19 09/16/04 - Do not display Bank(Skip Turn) option if Limited Banking option would cause loss of armies.
** Version 6.20 09/19/04 - MASA option added - Manual Allocation of Startup Armies.
** Version 6.21 09/21/04 - Set MASA to also require Premium.
** Version 6.22 10/13/04 - Created Capital Bonus option for capital enabled maps.
** Version 6.30 11/24/04 - Revised to use true_rand(min, max) function for true random numbers by descores
** Version 6.41 12/03/04 - Added encoded ip address to player name on map in game (target)
** Version 6.42 12/07/04 - Bug when eliminating Dummy 0 player from game did not allow fortification. Should be fixed now.
** Version 6.43 12/14/04 - Added AIRLIFT option. Allows fortifying from any owned country to any other regardless of borders.
** Version 6.44 12/16/04 - Reduced size of $gameoptions on map. Changed "Unlimited Fortifications" to "UF" in game creation area.
** Version 6.45 12/20/04 - Premium users now get warning if < 5 days till premium expiration and freebies now can only choose
** Blue Dragon to send private message to.
** Version 6.46 12/21/04 - Using newb.bmp instead of beanie now to represent players at 1200 exactly.
** Version 6.50 01/06/05 - First stab at playbyplay feature where players can post their thoughts at each point and the posts
** will be viewable after the game ends. May add autopost info at some point too. In fact, it may
** eventually replace the logs completely. All we do in here is add a link to playbyplay.php with the
** appropriate parameters.
** Version 6.51 01/12/05 - ADE checked by default and added log if lock is overridden.
** Version 6.52 01/20/05 - Beginning BOT output implementation.
** Version 6.53 02/17/05 - Capped sets at 255 (since bank wouldnt accept more anyway)
** Version 7.00 02/23/05 - Totally revised map display now using CSS to position armies. (woohoo!) Should eliminate problems
** with font size differences between browsers. However, WaW is now CSS - REQUIRED
** Version 7.01 03/09/05 - Added VOTE button for MPOGD
** Version 7.02 03/28/05 - Changed LOGIT query to let MySQL do the work with concat.
** Version 7.03 04/07/05 - DRAW voting implemented. Nightly routine not yet created to end game though.
** Version 7.04 04/14/05 - Added customized Conquered Country message (and corresponding table)
** Version 7.05 04/18/05 - Fixed conqmsg and set massive attack reserve default to 3.
** Version 7.10 07/30/05 - First attempt at Anonymous mod
** Version 7.11 08/06/05 - Added gameover mod to remove Anonymous option so anon games reveal players at end.
** Version 7.12 09/21/05 - Changed remove Anonymous to a function and tested. Didnt work before.
** Version 7.2 11/08/05 - First attempt at Revolution option.
** Version 7.21 11/19/05 - Moved Revolution mod call (was apparently causing some oddness located in IncrementTurn function)
** Version 7.3 12/12/05 - Increased Freebies who have won > 0 games to allow up to 14 games to make up for Peace Day
** Version 7.31 01/02/06 - Reduced Freebies who have won > 0 games to allow up to 7 games
** Version 7.32 02/19/06 - Reimplemented diceroll.txt
** Version 7.5 04/01/06 - Added weekly MOTD player feature. One premium player per week who posts in the Forums gets the
** designation of MOTDplayer and he can change the MOTD.
** Version 7.6 04/03/06 - Beginning addition of scorecard table that tracks all changes to users scores (hopefully)
** Version 7.61 04/05/06 - Added option to present Private Messages in reverse order based on player table option.
** Version 7.62 05/05/06 - Revised Revolution option to happen after attack phase rather than at turn start due to ongoing
** Sequential game bug.
** Version 7.63 07/23/06 - Bug Fix - When a player forfeits (or auto-forfeits for ADE) in a Sequential game, the previous
** player MUST have his timestamp updated so that the next player will get 24 hours to play. Added
** code to do that.
** Version 7.64 07/30/06 - Disabled diceroll.txt
** Version 7.65 08/13/06 - SameIP option created - which means disallowing same IPs when joining w/o this option
** Version 7.66 08/14/06 - No Newbies option created, and database field OPTIONS expanded to 40 chars. Disallows players w/overall score of 1200. Doesnt even list game.
** Version 7.67 08/14/06 - SameIP exemption added for Premiums
** Version 7.68 08/16/06 - Added CMR - Cards of Mass Reproduction option.
** Version 7.69 08/19/06 - Small fix to not display "Time remaining for player..." from non-sequential games.
** Version 7.70 09/07/06 - Added mouseover to card display to show who the owner is. Except in Anonymous and Fog games.
** Version 7.71 09/07/06 - Working on sequential endgame bug if 2nd to last player is forfieted. $wonflag no longer set to 1 if other owner of a country is status O.
** Version 8.00 09/07/06 - Selection of Attacking and Defending countries by clicking on army numbers - same for Fortification. Not yet functioning on Deployment however.
** Version 8.01 09/07/06 - Removed "1 army added to FOGGED OUT" capital entry for fog game capital bonus.
** Version 8.02 09/22/06 - Implement Bloodlust - ties go to attacker instead of defender
** Version 8.03 10/07/06 - Fixing maxbank problem since adding maxbank of 0.
** Version 8.04 11/04/06 - Fogged the country name that revolts in REVOLUTION/FOGGED games.
** Version 8.05 11/04/06 - During ATTACK phase only, any country you click that you own is ATTACKER.
** Any country NOT owned by you is set to DEFENDER. Can click in any order.
** Version 8.06 11/06/06 - Added CMC option - Cards of Mass Confusion - combo of CMD and CMR chosen at set turn-in
** Version 8.07 11/14/06 - Now when did I increase # games to 15 instead of 7?! Well, its back to 7 for freebies now.
** Version 8.08 11/16/06 - Option conflict with MASA and maxbank 0. NEEDS a bank for MASA. Put option block in.
** Also added Freebie ability to play MASA games IF they include NO NEWBIES option.
** Version 8.09 11/26/06 - Option conflict with AANR and maxbank 0. NEEDS a bank for AANR. Option blocked
** Version 8.10 12/07/06 - Team(2) games can only start with player 2, 4 or 6. Team(3) games can only start with 2,3,5 or 6
** Version 8.11 12/15/06 - Added time remaining line on running sequential games.
** Version 8.12 12/16/06 - Searching for games involving player X no longer display games that X is in that are Anonymous
** Version 8.13 12/16/06 - Time remaining line for Anonymous game shows PLAYERx instead of ANONYMOUS
** Version 8.14 12/16/06 - Hover-over cards displays "PLAYERx" instead of "ANONYMOUS" in non-fogged Anonymou games.
** Version 8.15 12/22/06 - Added ALT in addition to TITLE attribute to hover-over for num cards held.
** Version 8.16 01/07/07 - Bumping mid-turn timeout from 1 hour to 2.
** Version 8.20 01/07/07 - Adding pbyp snapshot at the beginning of each turn (deploy phase where state = R)
** Version 8.21 01/08/07 - pbyp mod not working. Revised and moved to area where NUMTODEPLOY is called.
** Version 8.22 01/31/07 - Added ability for game creator to change password if game hasnt started yet by clicking his name in game map.
** Version 8.23 02/03/07 - Added CONFIRM End Phase to attack phase ending. Clicking End Phase just brings up CONFIRM End phase.
** Version 8.24 02/05/07 - Added CONFOPTION to player options. If set to N then game does not ask for confirmation on End Phase.
** Version 8.25 02/05/07 - Added CONFIRM End Phase to fortify phase ending just like attack phase.
** Version 8.26 03/01/07 - Added Ignore and Suggestions links at bottom (Ignore takes you to Forums)
** Version 8.30 03/05/07 - Header now includes ability to sort games by Game#, #Players, Game Type and Map
** Version 8.31 03/06/07 - Added Random Start option - shuffles players when game starts
** Version 8.32 03/15/07 - Added FORTRESS option - defender rolls 3 dice instead of only 2
** Version 8.33 03/15/07 - Added SINGLE option - players start with only 1 army on each country instead of 3. MASA is invalid w/SINGLE.
** Version 8.34 03/20/07 - Revised new game option table.
** Version 8.35 03/20/07 - Revised SINGLE option - now you can set # starting armies from 1 to 9 but default is still 3.
** Version 8.36 03/20/07 - Fixed interaction between SINGLE and MASA so MASA distributes proper # armies.
** Version 8.40 03/20/07 - Replaced option text on map to option graphics. $gameoptions still built in case we go back to old way.
** Version 8.41 03/21/07 - Cards display is now automatic right below map display.
** Version 8.42 03/22/07 - Bugfix - $startwith variable now overridden and set to 1 for all MASA.
** Version 8.43 03/22/07 - Bugfix - Fixed bug that was allowing players to end up with score of 0 (monthly and overall)
** Version 8.44 03/22/07 - Added Equalizer option. No one wins (or loses) ties.
** Version 8.45 03/22/07 - Bugfix - ADE is no longer an option. However it is incompatible with Paranoia and Open Paranoia.
** Therefore when a game is created it does NOT add ADE automatically if one of these types are chosen.
** Version 8.46 04/02/07 - Bugfix - added Revolution percentage counter to hover-over option image.
** Version 8.50 05/01/07 - Created dec2bch and bch2dec functions in anticipation of revising storage
** capacity of BANK and eventually of numarmies. Functions not active yet tho.
** Version 8.51 05/01/07 - All dec2hex switched to dec2bch and all hexdec (except within bch2dec) bch2dec
** Version 8.52 05/01/07 - Worked a bit more on getting default attack FROM and TO attack logical for progressive attacks
** Version 8.53 05/02/07 - Created new player option MAACOPTION Y/N that determines if MAAC button is "Sticky"
** Version 8.54 05/05/07 - Added ability to vote for draw after turn is over.
** Version 8.55 05/08/07 - Added player option $mapsize which is a percentage from 50 to 200% default 100% to grow or shrink maps
** Version 8.56 05/08/07 - Now change font size based on mapsize value
** Version 8.57 06/01/07 - Expanded Multi protection. Disallow PLAYING in a game without SAMEIP if someone else has the same IP.
** Version 8.58 06/18/07 - Created log entry everwhere options are changed to find why we're losing options sometimes.
** Version 9.00 08/08/07 - First try at HEROES option. Probably buggy though.
** Version 9.01 08/10/07 - Revised method of purchasing HERO. Now buy through Fortification, not at DEPLOY time.
** Version 9.02 09/24/07 - Open Cards option added.
** Version 9.03 10/08/07 - Created hidden CSS popup for displaying card info over names rather than ALT, TITLE tags. Provides
** more room and control than TITLE tips baloon.
** Version 9.04 10/12/07 - Fixed bug where clicking an Anonymous player's name in a game revealed his identity.
** Version 9.05 10/19/07 - Bug fix - open cards option killed Heroes option from adding to a new game.
** Version 9.06 11/07/07 - When new users are created, now inserts datetime into PTDate field. For use in NewUsers.php on front page.
** Version 9.07 01/22/08 - If in a game, you can send a PM to Teammates (first choice when hitting SendMsg if in a game)
** Version 9.08 01/23/08 - Teammate messaging fix. (Didnt work for teams(3))
** Version 10.01 02/04/08 - Begin Sequential Team order fix (allow adjusting sequential order) Added teamorder field to games table.
** and related changes to automatically add this field when games are created (and monthly champ games!)
** Version 10.02 02/22/08 - Game creating player name field with 1 space, causing all 6 players listed in Anonymous games
** Version 10.03 02/25/08 - Now only lists people whos last_logged_in field is within the last two months on PMing. This is to
** allow no longer deleting old accounts at all and not re-using accounts anymore.
** I will, however, deleted old account images. Delinactiveplayers.php3 has been modified.
** Also no longer creates new accounts using old user number. Always creates new number.
** When we hit 2147483647 players, I'll worry about it. (max size of int in mysql)
** Version 10.04 02/25/07 - Fortify FROM field limited to countries where armies > 1 OR where heroloc=country.
**
**/