Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
#include <wx/wx.h>
void ExportTemplateFile(wxString &directory,wxArrayString &fileLines,char *filename);
void ExportTemplateFull(wxString &directory)
{
wxString filename;
wxArrayString fileLines;
wxString fileLine;
fileLines.Clear();
fileLine="$$include templatevariables.include$$";fileLines.Add(fileLine);
fileLine="$$MinPlayersInRound=ReadConfig(\"/General/MinPlayersInRound\")$$";fileLines.Add(fileLine);
fileLine="$$MinRoundsPerPlayer=ReadConfig(\"/General/MinRoundsPerPlayer\")$$";fileLines.Add(fileLine);
fileLine="$$MAXMAINPAGEWEAPONS=ReadTemplateConfig(\"MAXMAINPAGEWEAPONS\",\"10\",\"Number of Weapons to display on the main page\")$$";fileLines.Add(fileLine);
fileLine="$$MAXMAINPAGECLASSES=ReadTemplateConfig(\"MAXMAINPAGECLASSES\",\"10\",\"Number of Player Classes to display on the main page\")$$";fileLines.Add(fileLine);
fileLine="$$MAXMAINPAGEMAPS=ReadTemplateConfig(\"MAXMAINPAGEMAPS\",\"10\",\"Number of Maps to display on the main page\")$$";fileLines.Add(fileLine);
fileLine="$$MAXMAINPAGEGAMETYPES=ReadTemplateConfig(\"MAXMAINPAGEGAMETYPES\",\"10\",\"Number of Game Types to display on the main page\")$$";fileLines.Add(fileLine);
fileLine="$$MAXMAINPAGELOCATIONS=ReadTemplateConfig(\"MAXMAINPAGELOCATIONS\",\"10\",\"Number of Kill Locations to display on the main page\")$$";fileLines.Add(fileLine);
fileLine="$$MAXAWARDPLAYERS=ReadTemplateConfig(\"AWARDPLAYERS\",\"10\",\"Number of players to display for each award\")$$";fileLines.Add(fileLine);
fileLine="$$MAXPLAYERLISTENTRIES=ReadTemplateConfig(\"MAXPLAYERLISTENTRIES\",\"1000\",\"Maximum number of players to display on the Leaderboard\")$$";fileLines.Add(fileLine);
fileLine="$$MAXSPEECHLINES=ReadTemplateConfig(\"MAXSPEECHLINES\",\"10\",\"Number of speech entries to display on a players page\")$$";fileLines.Add(fileLine);
fileLine="$$MAXNEMESIS=ReadTemplateConfig(\"MAXNEMESIS\",\"10\",\"Number of enemies to display on a players page\")$$";fileLines.Add(fileLine);
fileLine="$$HOMEPAGEHREF=ReadTemplateConfig(\"HOMEPAGEHREF\",\"http://www.statsgen.co.uk\",\"Your home page html address\")$$";fileLines.Add(fileLine);
fileLine="$$HOMEPAGEBANNER=ReadTemplateConfig(\"HOMEPAGEBANNER\",\"images/banner.jpg\",\"A link to your clans banner image, displayed at the top of every stats page\")$$";fileLines.Add(fileLine);
fileLine="$$gameservertypes=\"COD4\"$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"skill\"$$$$include playerlistallowed.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"score\"$$$$include playerlistallowed.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"skillweighted\"$$$$include playerlistallowed.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"scoreweighted\"$$$$include playerlistallowed.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"kills\"$$$$include playerlistallowed.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"deaths\"$$$$include playerlistallowed.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"suicides\"$$$$include playerlistallowed.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"teamkills\"$$$$include playerlistallowed.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"teamwins\"$$$$include playerlistallowed.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"teamlosses\"$$$$include playerlistallowed.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"longestkillstreak\"$$$$include playerlistallowed.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"longestdeathstreak\"$$$$include playerlistallowed.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"longestteamkillstreak\"$$$$include playerlistallowed.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"duration\"$$$$include playerlistallowed.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"rounds\"$$$$include playerlistallowed.include$$";fileLines.Add(fileLine);
fileLine="$$include keytables.include$$";fileLines.Add(fileLine);
fileLine="$$include keytableskills.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Main Page\")$$$$include mainpage.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Awards Page\")$$$$include awards.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Ratio List\")$$$$messagecentrekey=\"TopKillDeathRatio\"$$$$title=\"^7KILL : DEATH RATIO\"$$$$sortkey=\"ratio\"$$$$include playerlists.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Skill List\")$$$$messagecentrekey=\"TopSkill\"$$$$title=\"^7SKILL\"$$$$sortkey=\"skill\"$$$$include playerlists.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Score List\")$$$$messagecentrekey=\"TopScore\"$$$$title=\"^7SCORE\"$$$$sortkey=\"score\"$$$$include playerlists.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Weighted Skill List\")$$$$messagecentrekey=\"TopWeightedSkill\"$$$$title=\"^7SKILL WEIGHTED \"$$$$sortkey=\"skillweighted\"$$$$include playerlists.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Weighted Score List\")$$$$messagecentrekey=\"TopWeightedScore\"$$$$title=\"^7SCORE WEIGHTED \"$$$$sortkey=\"scoreweighted\"$$$$include playerlists.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Kill List\")$$$$messagecentrekey=\"TopKills\"$$$$title=\"^7KILLS\"$$$$sortkey=\"kills\"$$$$include playerlists.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Death List\")$$$$messagecentrekey=\"TopDeaths\"$$$$title=\"^7DEATHS\"$$$$sortkey=\"deaths\"$$$$include playerlists.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Team Kill List\")$$$$messagecentrekey=\"TopTeamKills\"$$$$title=\"^7TEAM KILLS\"$$$$sortkey=\"teamkills\"$$$$include playerlists.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Team Win List\")$$$$messagecentrekey=\"TopTeamWins\"$$$$title=\"^7TEAM WINS\"$$$$sortkey=\"teamwins\"$$$$include playerlists.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Team Loss List\")$$$$messagecentrekey=\"TopTeamLosses\"$$$$title=\"^7TEAM LOSSES\"$$$$sortkey=\"teamlosses\"$$$$include playerlists.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Kill Streak List\")$$$$messagecentrekey=\"TopKillStreak\"$$$$title=\"^7KILL STREAK\"$$$$sortkey=\"longestkillstreak\"$$$$include playerlists.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Team Kill Streak List\")$$$$messagecentrekey=\"TopTeamKillStreak\"$$$$title=\"^7TEAM KILL STREAK\"$$$$sortkey=\"longestteamkillstreak\"$$$$include playerlists.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Death Streak List\")$$$$messagecentrekey=\"TopDeathStreak\"$$$$title=\"^7DEATH STREAK\"$$$$sortkey=\"longestdeathstreak\"$$$$include playerlists.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Suicide List\")$$$$messagecentrekey=\"TopSuicides\"$$$$title=\"^7SUICIDES\"$$$$sortkey=\"suicides\"$$$$include playerlists.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Time Played List\")$$$$messagecentrekey=\"TopTimePlayed\"$$$$title=\"^7TIME PLAYED\"$$$$sortkey=\"duration\"$$$$include playerlists.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Rounds Played List\")$$$$messagecentrekey=\"TopRoundsPlayed\"$$$$title=\"^7ROUNDS\"$$$$sortkey=\"rounds\"$$$$include playerlists.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"score\"$$$$updatestatus(\"Clan List\")$$$$include clanlist.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"skill\"$$$$updatestatus(\"Clan List\")$$$$include clanlist.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"skillweighted\"$$$$updatestatus(\"Clan List\")$$$$include clanlist.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"scoreweighted\"$$$$updatestatus(\"Clan List\")$$$$include clanlist.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"kills\"$$$$updatestatus(\"Clan List\")$$$$include clanlist.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"deaths\"$$$$updatestatus(\"Clan List\")$$$$include clanlist.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"ratio\"$$$$updatestatus(\"Clan List\")$$$$include clanlist.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"teamkills\"$$$$updatestatus(\"Clan List\")$$$$include clanlist.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"teamwins\"$$$$updatestatus(\"Clan List\")$$$$include clanlist.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"teamlosses\"$$$$updatestatus(\"Clan List\")$$$$include clanlist.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"longestkillstreak\"$$$$updatestatus(\"Clan List\")$$$$include clanlist.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"longestteamkillstreak\"$$$$updatestatus(\"Clan List\")$$$$include clanlist.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"longestdeathstreak\"$$$$updatestatus(\"Clan List\")$$$$include clanlist.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"suicides\"$$$$updatestatus(\"Clan List\")$$$$include clanlist.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"duration\"$$$$updatestatus(\"Clan List\")$$$$include clanlist.include$$";fileLines.Add(fileLine);
fileLine="$$sortkey=\"rounds\"$$$$updatestatus(\"Clan List\")$$$$include clanlist.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Info Page\")$$$$include info.include$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Players\")$$";fileLines.Add(fileLine);
fileLine="$$playercount=\"0\"$$";fileLines.Add(fileLine);
fileLine="$$loop row as player index as index select count(*) as playercount from changedplayers$$$$playercount=player.playercount$$$$endloop playercount$$";fileLines.Add(fileLine);
fileLine="$$loop row as player index as playerindex select *,coalesce(cast(kills as float)/cast(deaths as float),kills) as ratio from player where playerindex in (select idx from changedplayers) and dropped=\"N\"$$";fileLines.Add(fileLine);
fileLine=" $$updatestatus(\"Player %%playerindex%% of %%playercount%%\")$$";fileLines.Add(fileLine);
fileLine=" $$include player.include$$";fileLines.Add(fileLine);
fileLine="$$endloop player$$";fileLines.Add(fileLine);
fileLine="$$updatestatus(\"Rounds\")$$$$include roundlist.include$$";fileLines.Add(fileLine);
fileLine="$$roundcount=\"0\"$$";fileLines.Add(fileLine);
fileLine="$$loop row as round index as index select count(*) as roundcount from changedrounds$$$$roundcount=round.roundcount$$$$endloop roundcount$$";fileLines.Add(fileLine);
fileLine="$$loop row as round index as roundindex select * from rounds,servers where roundidx in (select idx from changedrounds) and dropped=\"N\" and rounds.serverindex=servers.serveridx$$";fileLines.Add(fileLine);
fileLine=" $$updatestatus(\"Round %%roundindex%% of %%roundcount%%\")$$";fileLines.Add(fileLine);
fileLine=" $$include round.include$$";fileLines.Add(fileLine);
fileLine="$$endloop round$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"full.template");
fileLines.Clear();
fileLine="$$ReadTemplateConfig(\"description_gametype_COD5_sd\",\"One side defends two sites while the other side tries to plant a bomb at either. Which do you defend? Which do you Attack?\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_gametype_COD5_tdm\",\"Two Teams, lots of bullets, whichever team gets the most kills wins.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_gametype_COD5_dom\",\"Capture and hold control points, the more control points you hold the more your team's score increases.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_gametype_COD5_sab\",\"Each side has a target to attack with a common bomb, constant respawning makes teamwork essential.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_gametype_COD5_dm\",\"Every soldier for themselves in an all out bloodfest.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_gametype_COD5_ctf\",\"Each team tries to capture the enemies flag while also defending their own.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_gametype_COD5_koth\",\"Locate and capture a target then defend it from the enemy for as long as possible.\")$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD5_mp_outskirts\",\"Red Army vs Wehrmacht<br><br>A large map with a village on the side of a hill. Buildings everywhere mean that no place is safe. A large central clock tower looks a good sniping spot but isn't that too obvious?\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD5_mp_seelow\",\"Red Army vs Wehrmacht<br><br>A large map set on a hillside with a central covered train line offering good shooting positions for both the top and bottom of the hill. Two large open tunnels under the train line offer quick, but dangerous routes between the top and bottom of the hill. One has a river flowing through it running next to a wheelhouse. A covered tunnel allows for a safer, but more obvious route.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD5_mp_roundhouse\",\"Red Army vs Wehrmacht<br><br>A large engineering yard with a central wheel house surrounded by high vantage point walkways, towers and buildings\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD5_mp_courtyard\",\"Imperial Army vs Marine Raiders<br><br>A medium sized flat map with lots of open topped corridors to navigate while trying to avoid being shot.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD5_mp_asylum\",\"Red Army vs Wehrmacht<br><br>A cramped and claustrophic map set in an old destroyed insane asylum with a central courtyard overlooked by windows. The distant moans of previous inhabitants haunt the players as they attempt to stay alive.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD5_mp_downfall\",\"Red Army vs Wehrmacht<br><br>The final battle of the German Reich. A long map with high steps on either side giving sniper and rifle vantage points over the middle of the map. Trenches on the left and right offer cover for shorter range fire. Three sets of central bunkers are separated by deadly open spaces.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD5_mp_shrine\",\"Imperial Army vs Marine Raiders<br><br>A long map with an open central area leading into a Japanese shrine makes taking control of this map very difficult as there are lots of sniping and rifling positions on all sides.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD5_mp_suburban\",\"Red Army vs Wehrmacht<br><br>A tight close quarters battle is guaranteed in this shattered village above a train line. Destroyed buildings and abandoned goods carriages offer protection and shooting strongholds.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD5_mp_airfield\",\"Imperial Army vs Marine Raiders<br><br>A large open map with an underground tunnel partially connecting two halves. A crashed plane, boxes and destroyed vehicles offer cover for skilled riflers as well as several enclosed buildings.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD5_mp_makin\",\"Imperial Army vs Marine Raiders<br><br>A Japanese fishing village at night on a beach at the edge of the jungle with the tide in gives lots of close quarter killing opportunities.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD5_mp_makin_day\",\"Imperial Army vs Marine Raiders<br><br>A Japanese fishing village on a beach at the edge of the jungle while the tide has gone out gives lots of close quarter killing opportunities.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD5_mp_hangar\",\"Imperial Army vs Marine Raiders<br><br>An aircraft hangar surrounded by multiple buildings. The hangar may see a safe place to hole up but getting trapped in there may be the last thing you do.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD5_mp_castle\",\"Imperial Army vs Marine Raiders<br><br>Two high vantage points look down upon a central Japanese garden with cherry blossoms in full bloom.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD5_mp_kneedeep\",\"Imperial Army vs Marine Raiders<br><br>A Japanese village set amongst a sprawling swamp. Many huts provide perfect hiding holes for cautious soldier.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD5_mp_nachtfeuer\",\"Red Army vs Wehrmacht<br><br>Night, a city on fire, and soldiers fighting through the cramped conditions to become victorious.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD5_mp_subway\",\"Red Army vs Wehrmacht<br><br>Two ends of an underground trainstation. Tunnels on either side give duplicate routes from one end to the other.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD5_mp_dome\",\"Red Army vs Wehrmacht<br><br>A close quarters battle atop the Reichstadt dome gives you know time to think but plenty of time to die.\")$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_backlot\",\"Opfor vs Marines<br><br>A destroyed town with many buildings surrounding a central area. A multi-floor factory offers many rifling points.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_bloc\",\"Spetsnaz vs S.A.S.<br><br>Eastern European block of flats surround each side of a courtyard with a central statue. A swimming pool to the rear provides a last stand hiding spot.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_bog\",\"Opfor vs Marines<br><br>A dirty, rainy, open piece of ground with an abandoned bus and multiple storage crates offering cover. Shops on the left give additional hiding spots.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_broadcast\",\"Opfor vs Marines<br><br>A television studio with many rooms offering close quarters combat. A central computer room with overlooking balcony offers a quick, but dangerous, route to the whole building. Roof access from the large carpark gives fast access to the interior.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_carentan\",\"Spetsnaz vs S.A.S.<br><br>An Asian take on an old favourite. A 3 story building in the center of the map gives control over most of the map and is essential to capture.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_cargoship\",\"Spetsnaz vs S.A.S.<br><br>Battle across the deck of a rain-drenched cargo ship. Storage crates offer cover and climing points for this close-quarter bloodfest.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_citystreets\",\"Opfor vs Marines<br><br>A market square surrounded by buildings with long streets down two sides. Don't fall down the well!\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_convoy\",\"Opfor vs Marines<br><br>A central road on a ridge separates two areas with many buildings which offer good rifling spots. Two sewer tunnels allow for hidden access from one side of the road to the other.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_countdown\",\"Spetsnaz vs S.A.S.<br><br>Missle silos and platforms fill the center of this map with multiple hangars around the edge.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_crash\",\"Opfor vs Marines<br><br>Black Hawk Down. A crashed helicopter in the center of a set of shops and houses with a tall multistory building with roof access overlooking the entire map\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_crash_snow\",\"Opfor vs Marines<br><br>Black Hawk Down, and Santa. A crashed helicopter in the center of a set of shops and houses with a tall multistory building with roof access overlooking the entire map\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_creek\",\"Spetsnaz vs S.A.S.<br><br>A deep ravine with a high ridge on either side provide the central point to this map. A tunnel allows access under the ridge into the ravine and houses at the top of one side of the ridge offer good sniping points.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_crossfire\",\"Opfor vs Marines<br><br>A long open street leads from top to bottom of this map. Snipers really make a casual stroll down the road possibly the last thing you do. Building access on either side offer a safer, but more convoluted route between the top and bottom.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_farm\",\"Spetsnaz vs S.A.S.<br><br>It's raining hard in this farmyard. Multiple greenhouses at one side. Building access on one side, grain silos on the other give access from top to bottom of the map.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_overgrown\",\"Spetsnaz vs S.A.S.<br><br>A central ravine with two bridges crossing it at the top and bottom giving the player access to either the street or the field side. Field side has a central farm house with attic access. A barnhouse also offers cover across most of the field making a walk through the hay a most dangerous prospect.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_pipeline\",\"Spetsnaz vs S.A.S.<br><br>Two multifloor factories form the main central area of this map. A train line on one side with abandoned carriages offering good hiding holes. A set of tunnels connect most parts of the map for that surprise attack.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_showdown\",\"Opfor vs Marines<br><br>A small square surrounded by second floor corridors. Fences block one side of the map to the other making it either - through the square or over the top.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_strike\",\"Opfor vs Marines<br><br>A central street surrounded on one one side by shops, one side a market square replete with statue. Overlooked by some multifloor buildings offering good rifling spots.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_map_COD4_mp_vacant\",\"Spetsnaz vs S.A.S.<br><br>A large open factory floor with multiple connected buildings. Outside the factory is a large area with many storage crates giving good cover.\")$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_gametype_COD4_sd\",\"One side defends two sites while the other side tries to plant a bomb at either. Which do you defend? Which do you Attack?\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_gametype_COD4_war\",\"Two Teams, lots of bullets, whichever team gets the most kills wins.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_gametype_COD4_dom\",\"Capture and hold control points, the more control points you hold the more your team's score increases.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_gametype_COD4_koth\",\"Locate and capture a target then defend it from the enemy for as long as possible.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_gametype_COD4_sab\",\"Each side has a target to attack with a common bomb, constant respawning makes teamwork essential.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_gametype_COD4_dm\",\"Every soldier for themselves in an all out bloodfest.\")$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_gametype_COD2_esd\",\"One side defends two sites while the other side tries to plant a bomb at either. Which do you defend? Which do you Attack? As dead players respawn teamwork is essential.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_gametype_COD2_ctf\",\"Each team tries to capture the enemies flag while also defending their own.\")$$";fileLines.Add(fileLine);
fileLine="$$ReadTemplateConfig(\"description_gametype_COD2_sd\",\"One side defends two sites while the other side tries to plant a bomb at either. Which do you defend? Which do you Attack?\")$$";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"templatevariables.include");
fileLines.Clear();
fileLine="$$%%sortkey%%allowed=\"N\"$$";fileLines.Add(fileLine);
fileLine="$$loop row as player index as index select max(%%sortkey%%) - min(%%sortkey%%) as difference from view_player$$";fileLines.Add(fileLine);
fileLine=" $$if (player.difference EQUALS \"0\")$$";fileLines.Add(fileLine);
fileLine=" $$%%sortkey%%allowed=\"N\"$$";fileLines.Add(fileLine);
fileLine=" $$else$$";fileLines.Add(fileLine);
fileLine=" $$%%sortkey%%allowed=\"Y\"$$";fileLines.Add(fileLine);
fileLine=" $$%%sortkey%%allowed=ReadTemplateConfig(\"Display_%%sortkey%%\",%%sortkey%%allowed,\"Turn on or off the %%sortkey%% column on the leaderboard\")$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine="$$endloop player$$";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"playerlistallowed.include");
fileLines.Clear();
fileLine="$$tablename=\"action\"$$$$include keytable.include$$";fileLines.Add(fileLine);
fileLine="$$tablename=\"class\"$$$$include keytable.include$$";fileLines.Add(fileLine);
fileLine="$$tablename=\"gametype\"$$$$include keytable.include$$";fileLines.Add(fileLine);
fileLine="$$tablename=\"location\"$$$$include keytable.include$$";fileLines.Add(fileLine);
fileLine="$$tablename=\"map\"$$$$include keytable.include$$";fileLines.Add(fileLine);
fileLine="$$tablename=\"team\"$$$$include keytable.include$$";fileLines.Add(fileLine);
fileLine="$$tablename=\"weapon\"$$$$include keytable.include$$";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"keytables.include");
fileLines.Clear();
fileLine="$$loop row as key index as index select * from %%tablename%%$$";fileLines.Add(fileLine);
fileLine=" $$%%tablename%%_%%key.idx%%_id=key.id$$";fileLines.Add(fileLine);
fileLine=" $$%%tablename%%_%%key.idx%%_realname=key.realname$$";fileLines.Add(fileLine);
fileLine=" $$%%tablename%%_%%key.idx%%_image=key.image$$";fileLines.Add(fileLine);
fileLine="$$endloop row$$";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"keytable.include");
fileLines.Clear();
fileLine="$$killstablename=\"gametype\"$$$$totalstable=\"killtotalgametypes\"$$$$include keytablekills.include$$";fileLines.Add(fileLine);
fileLine="$$killstablename=\"map\"$$$$totalstable=\"killtotalmaps\"$$$$include keytablekills.include$$";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"keytableskills.include");
fileLines.Clear();
fileLine="$$loop row as totalskey index as keyindex select * from %%killstablename%%$$";fileLines.Add(fileLine);
fileLine=" $$description=ReadTemplateConfig(\"description_%%killstablename%%_%%totalskey.id%%\",\"No description available\")$$";fileLines.Add(fileLine);
fileLine=" $$loop row as killscount index as countindex select sum(kills) as kills, sum(teamkills) as teamkills, sum(suicides) as suicides from %%totalstable%%$$";fileLines.Add(fileLine);
fileLine=" $$totalkills=killscount.kills$$";fileLines.Add(fileLine);
fileLine=" $$totalsuicides=killscount.suicides$$";fileLines.Add(fileLine);
fileLine=" $$totalteamkills=killscount.teamkills$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" $$openfile %%killstablename%%_%%totalskey.id%%.html$$$$updatestatus(\"%%killstablename%%_%%totalskey.id%%.html\")$$";fileLines.Add(fileLine);
fileLine=" $$include menu.include$$";fileLines.Add(fileLine);
fileLine=" <table border=0 valign=top>";fileLines.Add(fileLine);
fileLine=" <tr valign=top>";fileLines.Add(fileLine);
fileLine=" <td valign=top width=50%>";fileLines.Add(fileLine);
fileLine=" <table border=1 valign=top>";fileLines.Add(fileLine);
fileLine=" <tr valign=top>";fileLines.Add(fileLine);
fileLine=" <td valign=top>";fileLines.Add(fileLine);
fileLine=" $$if (%%killstablename%%_%%totalskey.idx%%_image !EQUALS \"\")$$";fileLines.Add(fileLine);
fileLine=" <img src=\"$$%%killstablename%%_%%totalskey.idx%%_image$$\"><br>";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" <td valign=top>";fileLines.Add(fileLine);
fileLine=" <table border=0 cellspacing=1 valign=top>";fileLines.Add(fileLine);
fileLine=" <tr><th align=left>Name</th><td>$$%%killstablename%%_%%totalskey.idx%%_realname$$</td></th></tr>";fileLines.Add(fileLine);
fileLine=" <tr><th align=left>Total Kills</th><td>$$totalkills$$</td></tr>";fileLines.Add(fileLine);
fileLine=" <tr><th align=left>Total Suicides</th><td>$$totalsuicides$$</td></tr>";fileLines.Add(fileLine);
fileLine=" <tr><th align=left>Total Teamkills</th><td>$$totalteamkills$$</td></tr>";fileLines.Add(fileLine);
fileLine=" <tr><td align=left colspan=2>$$description$$</td></tr>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" <table cellspacing=1 border=1 class=nameplate align=left>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <th>#</th>";fileLines.Add(fileLine);
fileLine=" <th>Player</th>";fileLines.Add(fileLine);
fileLine=" <th>Kills</th>";fileLines.Add(fileLine);
fileLine=" <th>Deaths</th>";fileLines.Add(fileLine);
fileLine=" <th>Team Kills</th>";fileLines.Add(fileLine);
fileLine=" <th>Suicides</th>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" $$playerdisplaydropped=\"N\"$$";fileLines.Add(fileLine);
fileLine=" $$loop row as kills index as killsindex select player.playerindex as playeridx,name,dropped,itemindex,%%totalstable%%.kills as totalkills,%%totalstable%%.deaths as totaldeaths,%%totalstable%%.suicides as totalsuicides,%%totalstable%%.teamkills as totalteamkills from %%totalstable%%,player where itemindex='%%totalskey.idx%%' and dropped='N' and player.playerindex=%%totalstable%%.playerindex order by totalkills desc,totaldeaths asc$$";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <td>$$killsindex$$</td>";fileLines.Add(fileLine);
fileLine=" <td>$$playerdisplayplayerindex=kills.playeridx$$$$playerdisplayname=kills.name$$$$include playerdisplay.include$$</td>";fileLines.Add(fileLine);
fileLine=" <td>$$kills.totalkills$$</td>";fileLines.Add(fileLine);
fileLine=" <td>$$kills.totaldeaths$$</td>";fileLines.Add(fileLine);
fileLine=" <td>$$kills.totalteamkills$$</td>";fileLines.Add(fileLine);
fileLine=" <td>$$kills.totalsuicides$$</td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" $$closefile$$";fileLines.Add(fileLine);
fileLine="$$endloop$$";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"keytablekills.include");
fileLines.Clear();
fileLine="<head>";fileLines.Add(fileLine);
fileLine=" <link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\">";fileLines.Add(fileLine);
fileLine=" <script type=\"text/javascript\" src=\"dobuttons.js\">";fileLines.Add(fileLine);
fileLine=" </script>";fileLines.Add(fileLine);
fileLine=" <script type=\"text/javascript\" src=\"oodomimagerollover.js\">";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine=" /***********************************************";fileLines.Add(fileLine);
fileLine=" * DOM Image Rollover II- By Adam Smith (http://www.codevendor.com)";fileLines.Add(fileLine);
fileLine=" * script featured on and available at Dynamic Drive (http://www.dynamicdrive.com)";fileLines.Add(fileLine);
fileLine=" * Keep this notice intact for usage please";fileLines.Add(fileLine);
fileLine=" ***********************************************/";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine=" </script>";fileLines.Add(fileLine);
fileLine="</head>";fileLines.Add(fileLine);
fileLine="<body>";fileLines.Add(fileLine);
fileLine=" $$if (HOMEPAGEBANNER !EQUALS \"\")$$";fileLines.Add(fileLine);
fileLine=" <table bgcolor=\"#000000\" border=0 class=nameplate bordercolor=000000 cellspacing=0 align=center>";fileLines.Add(fileLine);
fileLine=" <tr align=\"center\"> ";fileLines.Add(fileLine);
fileLine=" <td><img src=\"$$HOMEPAGEBANNER$$\" align=center></td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" $$else$$";fileLines.Add(fileLine);
fileLine=" <table bgcolor=\"#000000\" border=0 class=nameplate bordercolor=000000 cellspacing=0 align=center>";fileLines.Add(fileLine);
fileLine=" <tr align=\"center\"> ";fileLines.Add(fileLine);
fileLine=" <td><img src=\"http://www.statsgen.co.uk/images/banner.gif\" align=center></td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine=" <table cellspacing=0 border=0 class=menustyle align=center>";fileLines.Add(fileLine);
fileLine=" <tr align=center>";fileLines.Add(fileLine);
fileLine=" <th id=index colspan=8><b>Last Updated: $$FormatDate(\"%A %d %B %Y %H:%M:%S\",ReadStatistic(\"starttime\"))$$<b></th>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" $$if (HOMEPAGEHREF !EQUALS \"\")$$ ";fileLines.Add(fileLine);
fileLine=" <td width=106px align=center><b><a href=\"$$HOMEPAGEHREF$$\" target=\"_blank\"><img src=\"images/home.gif\" srcover=\"images/homea.gif\" alt=\"Home\" border=\"0\"></a></b></td>";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" <td width=106px align=center><b><a href=\"index.html\"><img src=\"images/server.gif\" srcover=\"images/servera.gif\" alt=\"Server\" border=\"0\"></a></b></td>";fileLines.Add(fileLine);
fileLine=" <td width=106px align=center><b><a href=\"awardlist.html\"><img src=\"images/awards.gif\" srcover=\"images/awardsa.gif\" alt=\"Awards\" border=\"0\"></a></b></td>";fileLines.Add(fileLine);
fileLine=" <td width=106px align=center><b><a href=\"playerlist_kills.html\"><img src=\"images/leaderboard.gif\" srcover=\"images/leaderboarda.gif\" alt=\"Leaderboard\" border=\"0\"></a></b></td>";fileLines.Add(fileLine);
fileLine=" <td width=106px align=center><b><a href=\"clanlist_kills.html\"><img src=\"images/clans.gif\" srcover=\"images/clansa.gif\" alt=\"Clans\" border=\"0\"></a></b></td>";fileLines.Add(fileLine);
fileLine=" <td width=106px align=center><b><a href=\"roundlist.html\"><img src=\"images/rounds.gif\" srcover=\"images/roundsa.gif\" alt=\"Rounds\" border=\"0\"></a></b></td>";fileLines.Add(fileLine);
fileLine=" <td width=106px align=center><b><a href=\"info.html\"><img src=\"images/statsinfo.gif\" srcover=\"images/statsinfoa.gif\" alt=\"Stats Info\" border=\"0\"></a></b></td>";fileLines.Add(fileLine);
fileLine=" <td width=106px align=center><b><a href=\"http://www.statsgen.co.uk/\"><img src=\"images/statsgen.gif\" srcover=\"images/statsgena.gif\" alt=\"Statsgen\" border=\"0\"></a></b></td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine="</head>";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"menu.include");
fileLines.Clear();
fileLine="$$tablename=\"playerdataavatars\"$$$$include playerprofilecomponent.include$$";fileLines.Add(fileLine);
fileLine="$$if (playerdisplaydropped EQUALS \"Y\")$$";fileLines.Add(fileLine);
fileLine=" $$colouredtext2html(playerdisplayname)$$";fileLines.Add(fileLine);
fileLine=" $$if (playerdataavatars !EQUALS \"\")$$";fileLines.Add(fileLine);
fileLine=" <br>";fileLines.Add(fileLine);
fileLine=" <img src=\"$$playerdataavatars$$>";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine="$$else$$";fileLines.Add(fileLine);
fileLine=" <a href=\"player_$$hash(playerdisplayname)$$.html\">";fileLines.Add(fileLine);
fileLine=" $$colouredtext2html(playerdisplayname)$$";fileLines.Add(fileLine);
fileLine=" $$if (playerdataavatars !EQUALS \"\")$$";fileLines.Add(fileLine);
fileLine=" <br>";fileLines.Add(fileLine);
fileLine=" <img src=\"$$playerdataavatars$$\" width=200px>";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" </a>";fileLines.Add(fileLine);
fileLine="$$endif$$";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"playerdisplay.include");
fileLines.Clear();
fileLine="$$%%tablename%%=\"\"$$";fileLines.Add(fileLine);
fileLine="$$loop row as playerprofilecomponent index as playerprofilecomponentindex select * from %%tablename%% where playerindex='%%playerdataplayerindex%%'$$";fileLines.Add(fileLine);
fileLine=" $$%%tablename%%=playerprofilecomponent.playerdata$$";fileLines.Add(fileLine);
fileLine="$$endloop$$";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"playerprofilecomponent.include");
fileLines.Clear();
fileLine="$$openfile index.html$$";fileLines.Add(fileLine);
fileLine="$$pagetitle=\"%%gameservertypes%% Server Stats\"$$$$include menu.include$$";fileLines.Add(fileLine);
fileLine="$$loop row as server index as serverindex select * from servers$$";fileLines.Add(fileLine);
fileLine=" $$loop row as servervariable index as variableindex select * from servervariables where serveridx='%%server.serveridx%%'$$";fileLines.Add(fileLine);
fileLine=" $$%%lowercase(servervariable.variable)%%=servervariable.value$$";fileLines.Add(fileLine);
fileLine=" $$endloop servervariable$$";fileLines.Add(fileLine);
fileLine=" <table border=0 class=nameplate align=center>";fileLines.Add(fileLine);
fileLine=" <td width=699 height=99 background=\"images/nameplate4.jpg\">";fileLines.Add(fileLine);
fileLine=" <div align=\"center\">";fileLines.Add(fileLine);
fileLine=" $$colouredtext2html(sv_hostname)$$";fileLines.Add(fileLine);
fileLine=" </div>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" <br> ";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine=" <table cellspacing=0 border=0 width=650px align=center class=style3> ";fileLines.Add(fileLine);
fileLine=" ";fileLines.Add(fileLine);
fileLine=" <tr align=left>";fileLines.Add(fileLine);
fileLine=" <th>IP</th><td height=27px width=150px>$$server.hostname$$$$if (server.gameport !EQUALS \"-1\")$$:$$server.gameport$$$$endif$$</td>";fileLines.Add(fileLine);
fileLine=" <th>Logfile Size</th><td height=27px width=150px>$$server.logfilesize$$</td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" <tr align=left>";fileLines.Add(fileLine);
fileLine=" <th>Rounds to Register</th><td height=27px width=150px>$$MinRoundsPerPlayer$$</td>";fileLines.Add(fileLine);
fileLine=" <th>Minimum Per Round</th><td height=27px width=150px>$$MinPlayersInRound$$</td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" $$include servervariables.include$$";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" <br>";fileLines.Add(fileLine);
fileLine="$$endloop server$$";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<tr>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" <table align=center cellspacing=0 border=0> ";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <td valign=top>";fileLines.Add(fileLine);
fileLine=" <table class=style4>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" $$include mainpageweapons.include$$";fileLines.Add(fileLine);
fileLine=" $$include mainpageclasses.include$$";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" <td valign=top>";fileLines.Add(fileLine);
fileLine=" <table class=style4>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" $$include mainpagemaps.include$$";fileLines.Add(fileLine);
fileLine=" $$include mainpagegametypes.include$$";fileLines.Add(fileLine);
fileLine=" $$include mainpagelocations.include$$";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$closefile$$";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"mainpage.include");
fileLines.Clear();
fileLine="$$IF (server.servertype EQUALS \"COD1\")$$";fileLines.Add(fileLine);
fileLine=" <tr align=left> ";fileLines.Add(fileLine);
fileLine=" <th>Max Clients</th><td height=27px width=150px>$$sv_maxclients$$</td>";fileLines.Add(fileLine);
fileLine=" <th>Private Clients</th><td height=27px width=150px>$$sv_privateclients$$</td>";fileLines.Add(fileLine);
fileLine=" </tr> ";fileLines.Add(fileLine);
fileLine=" <tr align=left>";fileLines.Add(fileLine);
fileLine=" <th>Max Ping</th><td height=27px width=150px>$$sv_maxping$$</td>";fileLines.Add(fileLine);
fileLine=" <th>Max Rate</th><td height=27px width=150px>$$sv_maxrate$$</td>";fileLines.Add(fileLine);
fileLine=" </tr> ";fileLines.Add(fileLine);
fileLine=" <tr align=left>";fileLines.Add(fileLine);
fileLine=" <th>Version</th><td height=27px width=150px>$$shortversion$$</td>";fileLines.Add(fileLine);
fileLine=" <th>&nbsp;</th><td width=150px>&nbsp;</td>";fileLines.Add(fileLine);
fileLine=" </tr> ";fileLines.Add(fileLine);
fileLine=" <tr align=left>";fileLines.Add(fileLine);
fileLine=" <th>Pure</th><td width=150px><img src=\"$$Case(sv_pure,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$\" &nbsp;></td>";fileLines.Add(fileLine);
fileLine=" <th>Punkbuster</th><td width=150px><img src=\"$$Case(sv_punkbuster,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$\" &nbsp;></td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine="$$ELSE$$";fileLines.Add(fileLine);
fileLine=" $$IF (server.servertype EQUALS \"COD2\")$$";fileLines.Add(fileLine);
fileLine=" <tr align=left> ";fileLines.Add(fileLine);
fileLine=" <th>Max Clients</th><td height=27px width=150px>$$sv_maxclients$$</td>";fileLines.Add(fileLine);
fileLine=" <th>Private Clients</th><td height=27px width=150px>$$sv_privateclients$$</td>";fileLines.Add(fileLine);
fileLine=" </tr> ";fileLines.Add(fileLine);
fileLine=" <tr align=left>";fileLines.Add(fileLine);
fileLine=" <th>Max Ping</th><td height=27px width=150px>$$sv_maxping$$</td>";fileLines.Add(fileLine);
fileLine=" <th>Max Rate</th><td height=27px width=150px>$$sv_maxrate$$</td>";fileLines.Add(fileLine);
fileLine=" </tr> ";fileLines.Add(fileLine);
fileLine=" <tr align=left>";fileLines.Add(fileLine);
fileLine=" <th>Version</th><td height=27px width=150px>$$shortversion$$</td>";fileLines.Add(fileLine);
fileLine=" <th>Voice</th><td width=150px><img src=\"$$Case(sv_voice,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$\" &nbsp;></td>";fileLines.Add(fileLine);
fileLine=" </tr> ";fileLines.Add(fileLine);
fileLine=" <tr align=left>";fileLines.Add(fileLine);
fileLine=" <th>Pure</th><td width=150px><img src=\"$$Case(sv_pure,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$\" &nbsp;></td>";fileLines.Add(fileLine);
fileLine=" <th>Punkbuster</th><td width=150px><img src=\"$$Case(sv_punkbuster,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$\" &nbsp;></td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" $$ELSE$$";fileLines.Add(fileLine);
fileLine=" $$IF (server.servertype EQUALS \"COD4\")$$";fileLines.Add(fileLine);
fileLine=" <tr align=left> ";fileLines.Add(fileLine);
fileLine=" <th>Max Clients</th><td height=27px width=150px>$$sv_maxclients$$</td>";fileLines.Add(fileLine);
fileLine=" <th>Private Clients</th><td height=27px width=150px>$$sv_privateclients$$</td>";fileLines.Add(fileLine);
fileLine=" </tr> ";fileLines.Add(fileLine);
fileLine=" <tr align=left>";fileLines.Add(fileLine);
fileLine=" <th>Max Ping</th><td height=27px width=150px>$$sv_maxping$$</td>";fileLines.Add(fileLine);
fileLine=" <th>Max Rate</th><td height=27px width=150px>$$sv_maxrate$$</td>";fileLines.Add(fileLine);
fileLine=" </tr> ";fileLines.Add(fileLine);
fileLine=" <tr align=left>";fileLines.Add(fileLine);
fileLine=" <th>Version</th><td height=27px width=150px>$$shortversion$$</td>";fileLines.Add(fileLine);
fileLine=" <th>Voice</th><td width=150px><img src=\"$$Case(sv_voice,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$\" &nbsp;></td>";fileLines.Add(fileLine);
fileLine=" </tr> ";fileLines.Add(fileLine);
fileLine=" <tr align=left>";fileLines.Add(fileLine);
fileLine=" <th>Pure</th><td width=150px><img src=\"$$Case(sv_pure,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$\" &nbsp;></td>";fileLines.Add(fileLine);
fileLine=" <th>Punkbuster</th><td width=150px><img src=\"$$Case(sv_punkbuster,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$\" &nbsp;></td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" $$ELSE$$";fileLines.Add(fileLine);
fileLine=" $$IF (server.servertype EQUALS \"COD5\")$$";fileLines.Add(fileLine);
fileLine=" <tr align=left> ";fileLines.Add(fileLine);
fileLine=" <th>Max Clients</th><td height=27px width=150px>$$sv_maxclients$$</td>";fileLines.Add(fileLine);
fileLine=" <th>Private Clients</th><td height=27px width=150px>$$sv_privateclients$$</td>";fileLines.Add(fileLine);
fileLine=" </tr> ";fileLines.Add(fileLine);
fileLine=" <tr align=left>";fileLines.Add(fileLine);
fileLine=" <th>Max Ping</th><td height=27px width=150px>$$sv_maxping$$</td>";fileLines.Add(fileLine);
fileLine=" <th>Max Rate</th><td height=27px width=150px>$$sv_maxrate$$</td>";fileLines.Add(fileLine);
fileLine=" </tr> ";fileLines.Add(fileLine);
fileLine=" <tr align=left>";fileLines.Add(fileLine);
fileLine=" <th>Version</th><td height=27px width=150px>$$shortversion$$</td>";fileLines.Add(fileLine);
fileLine=" <th>Voice</th><td width=150px><img src=\"$$Case(sv_voice,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$\" &nbsp;></td>";fileLines.Add(fileLine);
fileLine=" </tr> ";fileLines.Add(fileLine);
fileLine=" <tr align=left>";fileLines.Add(fileLine);
fileLine=" <th>Pure</th><td width=150px><img src=\"$$Case(sv_pure,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$\" &nbsp;></td>";fileLines.Add(fileLine);
fileLine=" <th>Punkbuster</th><td width=150px><img src=\"$$Case(sv_punkbuster,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$\" &nbsp;></td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" $$ELSE$$";fileLines.Add(fileLine);
fileLine=" $$IF (server.servertype EQUALS \"WOLFENSTEIN\")$$";fileLines.Add(fileLine);
fileLine=" $$ENDIF$$";fileLines.Add(fileLine);
fileLine=" $$ENDIF$$";fileLines.Add(fileLine);
fileLine=" $$ENDIF$$";fileLines.Add(fileLine);
fileLine=" $$ENDIF$$";fileLines.Add(fileLine);
fileLine="$$ENDIF$$";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"servervariables.include");
fileLines.Clear();
fileLine="<table cellspacing=1 border=0 class=style4>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <th height=34px>#</th>";fileLines.Add(fileLine);
fileLine=" <th>Weapon</th>";fileLines.Add(fileLine);
fileLine=" <th width=60px>Kills</th>";fileLines.Add(fileLine);
fileLine=" <th width=50px>Suicides</th>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" $$loop row as stat index as statindex select count(*) as killcount,id,playerweapon,realname,image,(select count(*) from killdata as subkilldata where killdata.playerweapon=subkilldata.playerweapon and killtype='SUICIDE') as suicidecount,(select count(*) from killdata as subkilldata where killdata.playerweapon=subkilldata.playerweapon and killtype='TEAMKILL') as teamkillcount from killdata,weapon where killtype='KILL' and weapon.idx=killdata.playerweapon group by playerweapon order by killcount desc limit %%MAXMAINPAGEWEAPONS%%$$";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <th width=15px align=center>$$statindex$$</th> ";fileLines.Add(fileLine);
fileLine=" <td id=name width=175px valign=bottom align=center>";fileLines.Add(fileLine);
fileLine=" $$if (stat.image !EQUALS \"\")$$";fileLines.Add(fileLine);
fileLine=" <img src=\"$$stat.image$$\" width=175 height=77><br><b>$$stat.realname$$</b>";fileLines.Add(fileLine);
fileLine=" $$else$$";fileLines.Add(fileLine);
fileLine=" <img src=\"images/default.jpg\" width=175 height=77><br><b>$$stat.realname$$</b>";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" <td align=center>$$stat.killcount$$</td>";fileLines.Add(fileLine);
fileLine=" <td align=center>$$stat.suicidecount$$</td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" $$endloop stat$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"mainpageweapons.include");
fileLines.Clear();
fileLine="<table cellspacing=1 border=0 class=style4>";fileLines.Add(fileLine);
fileLine="<tr>";fileLines.Add(fileLine);
fileLine="<th height=34px>#</th> ";fileLines.Add(fileLine);
fileLine="<th>Totals</th>";fileLines.Add(fileLine);
fileLine="<th width=60px>Kills</th>";fileLines.Add(fileLine);
fileLine="<th width=50px>Suicides</th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$loop row as stat index as statindex select count(*) as killcount,id,playerclass,realname,image,(select count(*) from killdata as subkilldata where killdata.playerclass=subkilldata.playerclass and killtype='SUICIDE') as suicidecount,(select count(*) from killdata as subkilldata where killdata.playerclass=subkilldata.playerclass and killtype='TEAMKILL') as teamkillcount from killdata,class where killtype='KILL' and class.idx=killdata.playerclass group by playerclass order by killcount desc limit %%MAXMAINPAGECLASSES%%$$";fileLines.Add(fileLine);
fileLine="<tr align=center>";fileLines.Add(fileLine);
fileLine="<th width=15px>$$statindex$$</th> ";fileLines.Add(fileLine);
fileLine="<td width=175px>";fileLines.Add(fileLine);
fileLine="<img src=\"$$stat.image$$\" width=175><br><b>$$stat.realname$$</b>";fileLines.Add(fileLine);
fileLine="$$if (stat.image !EQUALS \"\")$$$$endif$$";fileLines.Add(fileLine);
fileLine="</a>";fileLines.Add(fileLine);
fileLine="</td>";fileLines.Add(fileLine);
fileLine="<td>$$stat.killcount$$</td>";fileLines.Add(fileLine);
fileLine="<td>$$stat.suicidecount$$</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endloop stat$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"mainpageclasses.include");
fileLines.Clear();
fileLine="<table cellspacing=1 border=0 class=style4>";fileLines.Add(fileLine);
fileLine="<tr>";fileLines.Add(fileLine);
fileLine="<th height=34px>#</th>";fileLines.Add(fileLine);
fileLine="<th>Map</th>";fileLines.Add(fileLine);
fileLine="<th width=50px>Rounds<br>Played</th>";fileLines.Add(fileLine);
fileLine="<th width=50px>Average<br>Players</th>";fileLines.Add(fileLine);
fileLine="<th width=50px>Total<br>Players</th>";fileLines.Add(fileLine);
fileLine="<th width=60px>Kills</th>";fileLines.Add(fileLine);
fileLine="<th width=50px>Suicides</th>";fileLines.Add(fileLine);
fileLine="<th width=60px>Time<br>Played</th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$loop row as map index as mapindex select count(mapname) as roundcount,sum(duration) as duration,mapname,id,realname,image from view_rounds,map where view_rounds.mapname=map.idx group by mapname order by roundcount desc limit %%MAXMAINPAGEMAPS%%$$";fileLines.Add(fileLine);
fileLine="$$kills=\"0\"$$";fileLines.Add(fileLine);
fileLine="$$teamkills=\"0\"$$";fileLines.Add(fileLine);
fileLine="$$suicides=\"0\"$$";fileLines.Add(fileLine);
fileLine="$$totalplayers=\"0\"$$";fileLines.Add(fileLine);
fileLine="$$averageplayers=\"0\"$$";fileLines.Add(fileLine);
fileLine="$$loop stats as stats index as statsindex select count(*) as killcount from killdata where killtype='KILL' and roundindex in (select roundidx from view_rounds where mapname='%%map.mapname%%')$$";fileLines.Add(fileLine);
fileLine="$$kills=stats.killcount$$";fileLines.Add(fileLine);
fileLine="$$endloop stats$$";fileLines.Add(fileLine);
fileLine="$$loop stats as stats index as statsindex select count(*) as killcount from killdata where killtype='TEAMKILL' and roundindex in (select roundidx from view_rounds where mapname='%%map.mapname%%')$$";fileLines.Add(fileLine);
fileLine="$$teamkills=stats.killcount$$";fileLines.Add(fileLine);
fileLine="$$endloop stats$$";fileLines.Add(fileLine);
fileLine="$$loop stats as stats index as statsindex select count(*) as killcount from killdata where killtype='SUICIDE' and roundindex in (select roundidx from view_rounds where mapname='%%map.mapname%%')$$";fileLines.Add(fileLine);
fileLine="$$suicides=stats.killcount$$";fileLines.Add(fileLine);
fileLine="$$endloop stats$$";fileLines.Add(fileLine);
fileLine="$$loop stats as stats index as statsindex select count(*) as totalplayers from playerinround where roundindex in (select roundidx from view_rounds where mapname='%%map.mapname%%')$$";fileLines.Add(fileLine);
fileLine="$$totalplayers=stats.totalplayers$$";fileLines.Add(fileLine);
fileLine="$$endloop stats$$";fileLines.Add(fileLine);
fileLine="$$loop stats as stats index as statsindex select %%totalplayers%%.0/%%map.roundcount%%.0 as averageplayers from rounds limit 1$$";fileLines.Add(fileLine);
fileLine="$$averageplayers=stats.averageplayers$$";fileLines.Add(fileLine);
fileLine="$$endloop stats$$";fileLines.Add(fileLine);
fileLine="<tr align=center>";fileLines.Add(fileLine);
fileLine="<th width=15px align=center>$$mapindex$$</th>";fileLines.Add(fileLine);
fileLine="<td id=name width=150px align=center>";fileLines.Add(fileLine);
fileLine="<a href=\"map_$$map.id$$.html\">$$if (map.image !EQUALS \"\")$$<img src=\"$$map.image$$\" width=150 height=113><br><b>$$map.realname$$</b>";fileLines.Add(fileLine);
fileLine="$$else$$<img src=\"images/default.jpg\" width=150 height=113><br><b>$$map.realname$$</b>$$endif$$</a>";fileLines.Add(fileLine);
fileLine="</td>";fileLines.Add(fileLine);
fileLine="<td>$$map.roundcount$$</td>";fileLines.Add(fileLine);
fileLine="<td>$$formatfloat(\"%.1f\",averageplayers)$$</td>";fileLines.Add(fileLine);
fileLine="<td>$$totalplayers$$</td>";fileLines.Add(fileLine);
fileLine="<td>$$kills$$</td>";fileLines.Add(fileLine);
fileLine="<td>$$suicides$$</td>";fileLines.Add(fileLine);
fileLine="<td>$$formatduration(\"%H:%M\",map.duration)$$</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endloop maps$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"mainpagemaps.include");
fileLines.Clear();
fileLine="<table cellspacing=1 border=0 class=style4>";fileLines.Add(fileLine);
fileLine="<tr>";fileLines.Add(fileLine);
fileLine="<th height=34px>#</th>";fileLines.Add(fileLine);
fileLine="<th>Gametype</th>";fileLines.Add(fileLine);
fileLine="<th width=50px>Rounds<br>Played</th>";fileLines.Add(fileLine);
fileLine="<th width=50px>Average<br>Players</th>";fileLines.Add(fileLine);
fileLine="<th width=50px>Total<br>Players</th>";fileLines.Add(fileLine);
fileLine="<th width=60px>Kills</th>";fileLines.Add(fileLine);
fileLine="<th width=50px>Suicides</th>";fileLines.Add(fileLine);
fileLine="<th width=60px>Time<br>Played</th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$loop row as gametype index as gametypeindex select count(gametype) as roundcount,sum(duration) as duration,gametype,id,realname,image from view_rounds,gametype where view_rounds.gametype=gametype.idx group by gametype order by roundcount desc limit %%MAXMAINPAGEGAMETYPES%%$$";fileLines.Add(fileLine);
fileLine="$$kills=\"0\"$$";fileLines.Add(fileLine);
fileLine="$$teamkills=\"0\"$$";fileLines.Add(fileLine);
fileLine="$$suicides=\"0\"$$";fileLines.Add(fileLine);
fileLine="$$totalplayers=\"0\"$$";fileLines.Add(fileLine);
fileLine="$$averageplayers=\"0\"$$";fileLines.Add(fileLine);
fileLine="$$loop stats as stats index as statsindex select max(roundidx) as lastround from view_rounds where gametype='%%gametype.gametype%%'$$";fileLines.Add(fileLine);
fileLine="$$lastround=stats.lastround$$";fileLines.Add(fileLine);
fileLine="$$endloop$$";fileLines.Add(fileLine);
fileLine="$$loop stats as stats index as statsindex select count(*) as killcount from killdata where killtype='KILL' and roundindex in (select roundidx from view_rounds where gametype='%%gametype.gametype%%')$$";fileLines.Add(fileLine);
fileLine="$$kills=stats.killcount$$";fileLines.Add(fileLine);
fileLine="$$endloop stats$$";fileLines.Add(fileLine);
fileLine="$$loop stats as stats index as statsindex select count(*) as killcount from killdata where killtype='TEAMKILL' and roundindex in (select roundidx from view_rounds where gametype='%%gametype.gametype%%')$$";fileLines.Add(fileLine);
fileLine="$$teamkills=stats.killcount$$";fileLines.Add(fileLine);
fileLine="$$endloop stats$$";fileLines.Add(fileLine);
fileLine="$$loop stats as stats index as statsindex select count(*) as killcount from killdata where killtype='SUICIDE' and roundindex in (select roundidx from view_rounds where gametype='%%gametype.gametype%%')$$";fileLines.Add(fileLine);
fileLine="$$suicides=stats.killcount$$";fileLines.Add(fileLine);
fileLine="$$endloop stats$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="$$loop stats as stats index as statsindex select count(*) as totalplayers from playerinround where roundindex in (select roundidx from view_rounds where gametype='%%gametype.gametype%%')$$";fileLines.Add(fileLine);
fileLine="$$totalplayers=stats.totalplayers$$";fileLines.Add(fileLine);
fileLine="$$endloop stats$$";fileLines.Add(fileLine);
fileLine="$$loop stats as stats index as statsindex select %%totalplayers%%.0/%%gametype.roundcount%%.0 as averageplayers from rounds limit 1$$";fileLines.Add(fileLine);
fileLine="$$averageplayers=stats.averageplayers$$";fileLines.Add(fileLine);
fileLine="$$endloop stats$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<tr align=center>";fileLines.Add(fileLine);
fileLine="<th width=15px align=center>$$gametypeindex$$</th>";fileLines.Add(fileLine);
fileLine="<td id=name>";fileLines.Add(fileLine);
fileLine="<a href=\"gametype_$$gametype.id$$.html\">$$if (gametype.image !EQUALS \"\")$$<img src=\"$$gametype.image$$\" width=150><br><b>$$gametype.realname$$</b>";fileLines.Add(fileLine);
fileLine="$$else$$<img src=\"images/default.jpg\" width=150 height=113><br><b>$$gametype.realname$$</b>$$endif$$</a>";fileLines.Add(fileLine);
fileLine="</td>";fileLines.Add(fileLine);
fileLine="<td>$$gametype.roundcount$$</td>";fileLines.Add(fileLine);
fileLine="<td>$$formatfloat(\"%.1f\",averageplayers)$$</td>";fileLines.Add(fileLine);
fileLine="<td>$$totalplayers$$</td>";fileLines.Add(fileLine);
fileLine="<td>$$kills$$</td>";fileLines.Add(fileLine);
fileLine="<td>$$suicides$$</td>";fileLines.Add(fileLine);
fileLine="<td>$$formatduration(\"%H:%M\",gametype.duration)$$</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endloop gametype$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"mainpagegametypes.include");
fileLines.Clear();
fileLine="";fileLines.Add(fileLine);
fileLine="<body>";fileLines.Add(fileLine);
fileLine="<table cellspacing=0 border=0 class=style4>";fileLines.Add(fileLine);
fileLine="<table align=left cellspacing=1 border=0 class=style4>";fileLines.Add(fileLine);
fileLine="<tr> ";fileLines.Add(fileLine);
fileLine="<th height=34px width=15px>#</th>";fileLines.Add(fileLine);
fileLine="<th width=160px>Location</th>";fileLines.Add(fileLine);
fileLine="<th width=60px>Kills</th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$loop row as stat index as statindex select count(*) as killcount,id,targetlocation,realname,image,(select count(*) from killdata as subkilldata where killdata.targetlocation=subkilldata.targetlocation and killtype='SUICIDE') as suicidecount,(select count(*) from killdata as subkilldata where killdata.targetlocation=subkilldata.targetlocation and killtype='TEAMKILL') as teamkillcount from killdata,location where killtype='KILL' and location.idx=killdata.targetlocation group by targetlocation order by killcount desc limit %%MAXMAINPAGELOCATIONS%%$$";fileLines.Add(fileLine);
fileLine="<tr>";fileLines.Add(fileLine);
fileLine="<th id=\"ignore\" height=24px align=center>$$statindex$$</th>";fileLines.Add(fileLine);
fileLine="<td id=name align=center onmouseover = \"doButtons('$$stat.image$$')\" onmouseout = \"doButtons('images/player.jpg', 'images/player.jpg')\"><b>$$stat.realname$$</b></td>";fileLines.Add(fileLine);
fileLine="<td id=\"ignore\" align=center>$$stat.killcount$$</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endloop stat$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="<table valign=center cellspacing=0 border=0 class=style5 width=250px>";fileLines.Add(fileLine);
fileLine="<tr>";fileLines.Add(fileLine);
fileLine="<td width=250px height=434px><img name=picture src=\"images/player.jpg\"></td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="</body>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"mainpagelocations.include");
fileLines.Clear();
fileLine="$$openfile awardlist.html$$";fileLines.Add(fileLine);
fileLine="$$include menu.include$$";fileLines.Add(fileLine);
fileLine="<body>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<br> ";fileLines.Add(fileLine);
fileLine="<table class=nameplate align=center>";fileLines.Add(fileLine);
fileLine="<td width=299 height=50 background=\"images/nameplate2.jpg\"><div align=\"center\">AWARDS</div></td>";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="<br> ";fileLines.Add(fileLine);
fileLine="<table cellspacing=0 class=style2 width=985px align=center valign=top>";fileLines.Add(fileLine);
fileLine="$$awardprint=\"\"$$";fileLines.Add(fileLine);
fileLine="$$loop row as awarddef index as awarddefindex select * from awarddefinition$$";fileLines.Add(fileLine);
fileLine=" $$updatestatus(\"Award: %%awarddef.name%%\")$$";fileLines.Add(fileLine);
fileLine=" $$pointsrecorded=\"0\"$$";fileLines.Add(fileLine);
fileLine=" $$loop row as awardpoints index as awardpointsindex select count(*) from view_awardpoints where awardindex='%%awarddef.awardindex%%'$$";fileLines.Add(fileLine);
fileLine=" $$pointsrecorded=awardpoints.0$$";fileLines.Add(fileLine);
fileLine=" $$endloop awardpoints$$";fileLines.Add(fileLine);
fileLine=" $$if (pointsrecorded !EQUALS \"0\")$$";fileLines.Add(fileLine);
fileLine=" $$if (awardprint EQUALS \"\")$$<tr valign=top align=left>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (awardprint EQUALS \"XX\")$$</tr>$$awardprint=\"\"$$$$endif$$";fileLines.Add(fileLine);
fileLine=" $$awardprint=\"%%awardprint%%X\"$$";fileLines.Add(fileLine);
fileLine=" <th valign=top align=left>";fileLines.Add(fileLine);
fileLine=" <table border=0 cellspacing=0 class=style1 width=100%>";fileLines.Add(fileLine);
fileLine=" <tr><th id=award height=30px colspan=2 align=center><b>$$awarddef.name$$</b></th></tr>";fileLines.Add(fileLine);
fileLine=" <tr valign=top>";fileLines.Add(fileLine);
fileLine=" <td align=center>$$if (awarddef.image !EQUALS \"\")$$<img src=\"$$awarddef.image$$\">";fileLines.Add(fileLine);
fileLine=" $$else$$<img src=\"images/default.jpg\">$$endif$$</td>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" <table cellspacing=1 class=style1 width=100%>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <th>#</th>";fileLines.Add(fileLine);
fileLine=" <th>Player</th>";fileLines.Add(fileLine);
fileLine=" <th>Score</th>";fileLines.Add(fileLine);
fileLine=" </tr> ";fileLines.Add(fileLine);
fileLine=" $$if (awarddef.weighted EQUALS \"Y\")$$";fileLines.Add(fileLine);
fileLine=" $$selectcommand=\"select coalesce(cast(sum(awardpoints.score)as float)/cast(count(awardpoints.score)as float),'-9999999') as awardscore,name as playername,awardpoints.playerindex from awardpoints,player where awardindex='%%awarddef.awardindex%%' and player.playerindex=awardpoints.playerindex and player.dropped='N' group by awardpoints.playerindex order by awardscore desc limit %%MAXAWARDPLAYERS%%\"$$";fileLines.Add(fileLine);
fileLine=" $$else$$";fileLines.Add(fileLine);
fileLine=" $$selectcommand=\"select sum(awardpoints.score) as awardscore,name as playername,awardpoints.playerindex from awardpoints,player where awardindex='%%awarddef.awardindex%%' and player.playerindex=awardpoints.playerindex and player.dropped='N' group by awardpoints.playerindex order by awardscore desc limit %%MAXAWARDPLAYERS%%\"$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$loop row as awardpoints index as awardpointsindex %%selectcommand%%$$";fileLines.Add(fileLine);
fileLine=" $$if (awardpointsindex EQUALS \"1\")$$";fileLines.Add(fileLine);
fileLine=" $$MessageCentre(\"AWARD%%awarddef.id%%\",awardpoints.playername,formatfloat(\"%.2f\",awardpoints.awardscore))$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <th align=middle height=27px width=14px>$$awardpointsindex$$</th>";fileLines.Add(fileLine);
fileLine=" <td width=180px><b><a href=\"player_$$hash(awardpoints.playername)$$.html\">$$colouredtext2html(awardpoints.playername)$$</a></b></td>";fileLines.Add(fileLine);
fileLine=" <td align=center width=60px>$$formatfloat(\"%.2f\",awardpoints.awardscore)$$</font></td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" $$endloop awardpoints$$";fileLines.Add(fileLine);
fileLine=" <br>";fileLines.Add(fileLine);
fileLine=" <br>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" </th>";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine="$$endloop awarddef$$";fileLines.Add(fileLine);
fileLine="$$if (awardprint !EQUALS \"\")$$</tr>$$awardprint=\"\"$$$$endif$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="</body>";fileLines.Add(fileLine);
fileLine="$$closefile$$";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"awards.include");
fileLines.Clear();
fileLine="$$if (%%sortkey%%allowed !EQUALS \"N\")$$";fileLines.Add(fileLine);
fileLine="$$openfile playerlist_%%sortkey%%.html$$";fileLines.Add(fileLine);
fileLine="$$include menu.include$$";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<table border=0 class=nameplate align=center>";fileLines.Add(fileLine);
fileLine="<td width=299 height=50 background=\"images/nameplate2.jpg\"><div align=\"center\">$$colouredtext2html(title)$$</div></td>";fileLines.Add(fileLine);
fileLine="</table> ";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<table align=center cellspacing=0 border=0 class=style3 width=985px>";fileLines.Add(fileLine);
fileLine="<tr align=center>";fileLines.Add(fileLine);
fileLine="$$if (HOMEPAGETITLE !EQUALS \"\")$$ ";fileLines.Add(fileLine);
fileLine="<td height=30px id=index>$$HOMEPAGETITLE$$ Leaderboard</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$else$$";fileLines.Add(fileLine);
fileLine="<tr align=center> ";fileLines.Add(fileLine);
fileLine="<td height=30px id=index>Leaderboard</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endif$$";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<tr align=center>";fileLines.Add(fileLine);
fileLine="<th>";fileLines.Add(fileLine);
fileLine="<table align=center border=0 cellspacing=0 class=style3 width=985px> ";fileLines.Add(fileLine);
fileLine="<tr id=\"ignore\">";fileLines.Add(fileLine);
fileLine="<th height=30px width=20px>#</th>";fileLines.Add(fileLine);
fileLine="<th width=160px>Player</th>";fileLines.Add(fileLine);
fileLine="$$if (killsallowed !EQUALS \"N\")$$<th><a href=\"playerlist_kills.html\">Kills</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (deathsallowed !EQUALS \"N\")$$<th><a href=\"playerlist_deaths.html\">Deaths</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (teamkillsallowed !EQUALS \"N\")$$<th><a href=\"playerlist_teamkills.html\">Team Kills</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (suicidesallowed !EQUALS \"N\")$$<th><a href=\"playerlist_suicides.html\">Suicides</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (skillweightedallowed !EQUALS \"N\")$$<th><a href=\"playerlist_skillweighted.html\">Skill<br>Weighted</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (scoreweightedallowed !EQUALS \"N\")$$<th><a href=\"playerlist_scoreweighted.html\">Score<br>Weighted</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (skillallowed !EQUALS \"N\")$$<th><a href=\"playerlist_skill.html\">Skill</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (scoreallowed !EQUALS \"N\")$$<th><a href=\"playerlist_score.html\">Score</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (ratioallowed !EQUALS \"N\")$$<th><a href=\"playerlist_ratio.html\">Ratio</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (longestkillstreakallowed !EQUALS \"N\")$$<th><a href=\"playerlist_longestkillstreak.html\">Kill<br>Streak</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (longestdeathstreakallowed !EQUALS \"N\")$$<th><a href=\"playerlist_longestdeathstreak.html\">Death<br>Streak</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (longestteamkillstreakallowed !EQUALS \"N\")$$<th><a href=\"playerlist_longestteamkillstreak.html\">Team Kill<br>Streak</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (roundsallowed !EQUALS \"N\")$$<th><a href=\"playerlist_rounds.html\">Rounds</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (durationallowed !EQUALS \"N\")$$<th><a href=\"playerlist_duration.html\">Time<br>Played</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$firstrow=\"Y\"$$";fileLines.Add(fileLine);
fileLine="$$playerdisplaydropped=\"N\"$$";fileLines.Add(fileLine);
fileLine="$$loop row as player index as playerindex select *,coalesce(cast(kills as float)/cast(deaths as float),kills) as ratio from player where dropped='N' order by %%sortkey%% desc limit %%MAXPLAYERLISTENTRIES%%$$";fileLines.Add(fileLine);
fileLine="$$if (playerindex EQUALS \"1\")$$";fileLines.Add(fileLine);
fileLine=" $$if (sortkey EQUALS \"duration\")$$";fileLines.Add(fileLine);
fileLine=" $$MessageCentre(messagecentrekey,player.name,formatduration(\"%H:%M:%S\",player.%%sortkey%%))$$";fileLines.Add(fileLine);
fileLine=" $$else$$";fileLines.Add(fileLine);
fileLine=" $$if ((sortkey EQUALS \"score\") OR (sortkey EQUALS \"skill\"))$$";fileLines.Add(fileLine);
fileLine=" $$MessageCentre(messagecentrekey,player.name,formatfloat(\"%.1f\",player.%%sortkey%%))$$";fileLines.Add(fileLine);
fileLine=" $$else$$";fileLines.Add(fileLine);
fileLine=" $$if (((sortkey EQUALS \"scoreweighted\") OR (sortkey EQUALS \"skillweighted\")) OR (sortkey EQUALS \"ratio\"))$$";fileLines.Add(fileLine);
fileLine=" $$MessageCentre(messagecentrekey,player.name,formatfloat(\"%.2f\",player.%%sortkey%%))$$";fileLines.Add(fileLine);
fileLine=" $$else$$";fileLines.Add(fileLine);
fileLine=" $$MessageCentre(messagecentrekey,player.name,player.%%sortkey%%)$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine="$$endif$$";fileLines.Add(fileLine);
fileLine="<tr onMouseover=\"changeto(event, '494848')\" onMouseout=\"changeback(event, '2f2f2f')\" align=center>";fileLines.Add(fileLine);
fileLine="<th id=index width=20px align=\"center\">$$playerindex$$</th>";fileLines.Add(fileLine);
fileLine="<td align=left id=name><b>";fileLines.Add(fileLine);
fileLine="$$playerdisplayname=player.name$$";fileLines.Add(fileLine);
fileLine="$$playerdataplayerindex=player.playerindex$$";fileLines.Add(fileLine);
fileLine="$$include playerdisplay.include$$";fileLines.Add(fileLine);
fileLine="</b></td>";fileLines.Add(fileLine);
fileLine="$$if (killsallowed !EQUALS \"N\")$$<td>$$player.kills$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (deathsallowed !EQUALS \"N\")$$<td>$$player.deaths$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (teamkillsallowed !EQUALS \"N\")$$<td>$$player.teamkills$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (suicidesallowed !EQUALS \"N\")$$<td>$$player.suicides$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (skillweightedallowed !EQUALS \"N\")$$<td>$$formatfloat(\"%.2f\",player.skillweighted)$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (scoreweightedallowed !EQUALS \"N\")$$<td>$$formatfloat(\"%.2f\",player.scoreweighted)$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (skillallowed !EQUALS \"N\")$$<td>$$formatfloat(\"%.1f\",player.skill)$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (scoreallowed !EQUALS \"N\")$$<td>$$formatfloat(\"%.1f\",player.score)$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (ratioallowed !EQUALS \"N\")$$<td>$$formatfloat(\"%.2f\",player.ratio)$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (longestkillstreakallowed !EQUALS \"N\")$$<td>$$player.longestkillstreak$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (longestdeathstreakallowed !EQUALS \"N\")$$<td>$$player.longestdeathstreak$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (longestteamkillstreakallowed !EQUALS \"N\")$$<td>$$player.longestteamkillstreak$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (roundsallowed !EQUALS \"N\")$$<td>$$player.rounds$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (durationallowed !EQUALS \"N\")$$<td>$$formatduration(\"%H:%M:%S\",player.duration)$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endloop$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="</th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="$$closefile$$";fileLines.Add(fileLine);
fileLine="$$endif$$";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"playerlists.include");
fileLines.Clear();
fileLine="$$if (%%sortkey%%allowed !EQUALS \"N\")$$";fileLines.Add(fileLine);
fileLine="$$openfile clanlist_%%sortkey%%.html$$";fileLines.Add(fileLine);
fileLine="$$include menu.include$$";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="$$loop row as clanrow index as clanrowindex select * from clan where clanindex in (select clanindex from view_player where clanindex>=0)$$";fileLines.Add(fileLine);
fileLine="$$loop row as clanstats index as clanstatsindex select sum(rounds) as rounds,sum(score) as score,sum(skill) as skill,sum(duration) as duration, max(lastactiveround) as lastactiveround,sum(kills) as kills,sum(deaths) as deaths,sum(suicides) as suicides,max(longestkillstreak) as longestkillstreak,max(longestdeathstreak) as longestdeathstreak,max(longestteamkillstreak) as longestteamkillstreak,sum(teamwins) as teamwins, sum(teamkills) as teamkills, sum(teamlosses) as teamlosses from view_player where clanindex='%%clanrow.clanindex%%'$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<table border=0 cellspacing=0 class=nameplate align=center>";fileLines.Add(fileLine);
fileLine="<td width=599 height=99 background=\"images/nameplate3.jpg\"><div align=\"center\">$$if (clanrow.webaddress !EQUALS \"\")$$<a href=\"$$clanrow.webaddress$$\">$$endif$$";fileLines.Add(fileLine);
fileLine="$$colouredtext2html(clanrow.name)$$";fileLines.Add(fileLine);
fileLine="$$if (clanrow.webaddress !EQUALS \"\")$$</a>$$endif$$</div></td>";fileLines.Add(fileLine);
fileLine="<tr align=center>";fileLines.Add(fileLine);
fileLine="</th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="<table cellspacing=0 border=0 align=center class=style3 width=599px";fileLines.Add(fileLine);
fileLine="$$if (clanrow.banner !EQUALS \"\")$$";fileLines.Add(fileLine);
fileLine="<tr valign=middle align=center>";fileLines.Add(fileLine);
fileLine="<td align=center colspan=6>";fileLines.Add(fileLine);
fileLine="$$if (clanrow.webaddress !EQUALS \"\")$$<a href=\"$$clanrow.webaddress$$\">$$endif$$";fileLines.Add(fileLine);
fileLine="<img src=\"$$clanrow.banner$$\">";fileLines.Add(fileLine);
fileLine="$$if (clanrow.webaddress !EQUALS \"\")$$</a>$$endif$$";fileLines.Add(fileLine);
fileLine="</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endif$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<tr align=left>";fileLines.Add(fileLine);
fileLine="<th align=left>Rounds</th><td>$$clanstats.rounds$$</td>";fileLines.Add(fileLine);
fileLine="<th align=left>Play Time</th><td>$$formatduration(\"%H:%M:%S\",clanstats.duration)$$</td>";fileLines.Add(fileLine);
fileLine="<th>&nbsp;</th><td>&nbsp;</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<tr align=left>";fileLines.Add(fileLine);
fileLine="<th>Score</th><td>$$formatfloat(\"%.0f\",clanstats.score)$$</td>";fileLines.Add(fileLine);
fileLine="<th>Skill</th><td>$$formatfloat(\"%.0f\",clanstats.skill)$$</td>";fileLines.Add(fileLine);
fileLine="<th>&nbsp;</th><td>&nbsp;</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<tr align=left>";fileLines.Add(fileLine);
fileLine="<th>Kills</th><td>$$clanstats.kills$$</td>";fileLines.Add(fileLine);
fileLine="<th>Deaths</th><td>$$clanstats.deaths$$</td>";fileLines.Add(fileLine);
fileLine="<th>Suicides</th><td>$$clanstats.suicides$$</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<tr align=left>";fileLines.Add(fileLine);
fileLine="<th>Kill Streak</th><td>$$clanstats.longestkillstreak$$</td>";fileLines.Add(fileLine);
fileLine="<th>Death Streak</th><td>$$clanstats.longestdeathstreak$$</td>";fileLines.Add(fileLine);
fileLine="<th>&nbsp;</th><td>&nbsp;</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="$$endloop clanstats$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<table align=center cellspacing=0 border=0 class=style3 width=900px>";fileLines.Add(fileLine);
fileLine="<tr align=center>";fileLines.Add(fileLine);
fileLine="<td height=30px id=index>SQUAD</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<tr align=center>";fileLines.Add(fileLine);
fileLine="<th>";fileLines.Add(fileLine);
fileLine="<table cellspacing=0 border=0 class=style3 width=900px>";fileLines.Add(fileLine);
fileLine="<tr>";fileLines.Add(fileLine);
fileLine="<th width=20px>#</th> ";fileLines.Add(fileLine);
fileLine="<th>Clan Member</th>";fileLines.Add(fileLine);
fileLine="$$if (killsallowed !EQUALS \"N\")$$<th><a href=\"clanlist_kills.html\">Kills</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (deathsallowed !EQUALS \"N\")$$<th><a href=\"clanlist_deaths.html\">Deaths</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (teamkillsallowed !EQUALS \"N\")$$<th><a href=\"clanlist_kills.html\">Kills</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (suicidesallowed !EQUALS \"N\")$$<th><a href=\"clanlist_suicides.html\">Suicides</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (skillweightedallowed !EQUALS \"N\")$$<th><a href=\"clanlist_skillweighted.html\">Skill<br>Weighted</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (scoreweightedallowed !EQUALS \"N\")$$<th><a href=\"clanlist_scoreweighted.html\">Score<br>Weighted</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (skillallowed !EQUALS \"N\")$$<th><a href=\"clanlist_skill.html\">Skill</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (scoreallowed !EQUALS \"N\")$$<th><a href=\"clanlist_score.html\">Score</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (ratioallowed !EQUALS \"N\")$$<th><a href=\"clanlist_ratio.html\">Ratio</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (longestkillstreakallowed !EQUALS \"N\")$$<th><a href=\"clanlist_longestkillstreak.html\">Kill<br>Streak</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (longestdeathstreakallowed !EQUALS \"N\")$$<th><a href=\"clanlist_longestdeathstreak.html\">Death<br>Streak</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (longestteamkillstreakallowed !EQUALS \"N\")$$<th><a href=\"clanlist_longestteamkillstreak.html\">Team Kill<br>Streak</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (roundsallowed !EQUALS \"N\")$$<th><a href=\"clanlist_rounds.html\">Rounds</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (durationallowed !EQUALS \"N\")$$<th><a href=\"clanlist_duration.html\">Time<br>Played</a></th>$$endif$$";fileLines.Add(fileLine);
fileLine="<th>X-Fire</th>";fileLines.Add(fileLine);
fileLine="<th>Role</th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$playerdisplaydropped=\"N\"$$";fileLines.Add(fileLine);
fileLine="$$loop row as player index as playerindex select *,coalesce(cast(kills as float)/cast(deaths as float),kills) as ratio from view_player where clanindex='%%clanrow.clanindex%%' order by %%sortkey%% desc$$";fileLines.Add(fileLine);
fileLine="$$playerdataplayerindex=player.playerindex$$";fileLines.Add(fileLine);
fileLine="$$playerdisplayname=player.name$$";fileLines.Add(fileLine);
fileLine="$$tablename=\"playerdataxfire\"$$$$include playerprofilecomponent.include$$";fileLines.Add(fileLine);
fileLine="$$tablename=\"playerdataclanrole\"$$$$include playerprofilecomponent.include$$";fileLines.Add(fileLine);
fileLine="<tr onMouseover=\"changeto(event, '494848')\" onMouseout=\"changeback(event, '2f2f2f')\" align=center>";fileLines.Add(fileLine);
fileLine="<th id=index width=20px align=center>$$playerindex$$</th>";fileLines.Add(fileLine);
fileLine="<td align=left height=25px width=160px id=name><b>$$include playerdisplay.include$$</b></td>";fileLines.Add(fileLine);
fileLine="$$if (killsallowed !EQUALS \"N\")$$<td>$$player.kills$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (deathsallowed !EQUALS \"N\")$$<td>$$player.deaths$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (teamkillsallowed !EQUALS \"N\")$$<td>$$player.teamkills$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (suicidesallowed !EQUALS \"N\")$$<td>$$player.suicides$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (skillweightedallowed !EQUALS \"N\")$$<td>$$formatfloat(\"%.2f\",player.skillweighted)$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (scoreweightedallowed !EQUALS \"N\")$$<td>$$formatfloat(\"%.2f\",player.scoreweighted)$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (skillallowed !EQUALS \"N\")$$<td>$$formatfloat(\"%.1f\",player.skill)$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (scoreallowed !EQUALS \"N\")$$<td>$$formatfloat(\"%.1f\",player.score)$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (ratioallowed !EQUALS \"N\")$$<td>$$formatfloat(\"%.2f\",player.ratio)$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (longestkillstreakallowed !EQUALS \"N\")$$<td>$$player.longestkillstreak$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (longestdeathstreakallowed !EQUALS \"N\")$$<td>$$player.longestdeathstreak$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (longestteamkillstreakallowed !EQUALS \"N\")$$<td>$$player.longestteamkillstreak$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (roundsallowed !EQUALS \"N\")$$<td>$$player.rounds$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="$$if (durationallowed !EQUALS \"N\")$$<td>$$formatduration(\"%H:%M:%S\",player.duration)$$</td>$$endif$$";fileLines.Add(fileLine);
fileLine="<td>$$if (playerdataxfire !EQUALS \"\")$$$$playerdataxfire$$$$endif$$ &nbsp;</td>";fileLines.Add(fileLine);
fileLine="<td>$$if (playerdataclanrole !EQUALS \"\")$$$$playerdataclanrole$$$$endif$$ &nbsp;</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endloop$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="</th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="$$endloop clanrow$$";fileLines.Add(fileLine);
fileLine="$$closefile$$";fileLines.Add(fileLine);
fileLine="$$endif$$";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"clanlist.include");
fileLines.Clear();
fileLine="$$openfile info.html$$";fileLines.Add(fileLine);
fileLine="$$include menu.include$$";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<table border=0 class=nameplate align=center>";fileLines.Add(fileLine);
fileLine=" <tr><td width=299 height=50 background=\"images/nameplate2.jpg\"><div align=\"center\"><b>STATS INFO</b></div></td></tr>";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<table border=0 cellspacing=0 align=center class=style3>";fileLines.Add(fileLine);
fileLine="<tr align=center>";fileLines.Add(fileLine);
fileLine="<th id=index height=30px colspan=2>SKILL CALCULATION</th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<tr align=center>";fileLines.Add(fileLine);
fileLine="<td valign=top>";fileLines.Add(fileLine);
fileLine="<table align=center class=style1 border=0 cellspacing=1 width=250px>";fileLines.Add(fileLine);
fileLine="<tr align=center>";fileLines.Add(fileLine);
fileLine=" <th>Location</th>";fileLines.Add(fileLine);
fileLine=" <th>Value</th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$loop row as weight index as weightindex select * from SkillWeights where key like 'location_%' order by key desc$$";fileLines.Add(fileLine);
fileLine="<tr>";fileLines.Add(fileLine);
fileLine=" <td height=24px align=center>";fileLines.Add(fileLine);
fileLine=" $$if (weight.image !EQUALS \"\")$$<b onmouseover = \"doButtons('$$weight.image$$')\" onmouseout = \"doButtons('images/player.jpg', 'images/player.jpg')\">$$endif$$$$weight.realname$$</b>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" <td align=center>$$weight.weight$$</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endloop$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="</td>";fileLines.Add(fileLine);
fileLine="<td valign=top>";fileLines.Add(fileLine);
fileLine="<table align=center cellspacing=0 border=0 class=style5 width=250px>";fileLines.Add(fileLine);
fileLine="<tr align=center> ";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="<tr> ";fileLines.Add(fileLine);
fileLine="<td><img name=picture src=\"images/player.jpg\"></td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="</td>";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<table border=0 cellspacing=0 align=center class=style3>";fileLines.Add(fileLine);
fileLine="<tr align=center>";fileLines.Add(fileLine);
fileLine="<th id=index height=30px colspan=2>SKILL CALCULATION</th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<tr width=100%>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" <table align=center border=0 cellspacing=1 class=style1 width=520px> ";fileLines.Add(fileLine);
fileLine=" <tr> ";fileLines.Add(fileLine);
fileLine=" <th align=center height=25px>WEAPON</th>";fileLines.Add(fileLine);
fileLine=" <th align=center>VALUE</th>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <td colspan=2 align=center height=6px>&nbsp;</td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine="$$loop row as weight index as weightindex select * from SkillWeights where key like 'weapon_%' order by realname asc$$";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <td align=center>$$if (weight.image !EQUALS \"\")$$<img src=\"$$weight.image$$\" width=175 height=77><br>$$else$$<img src=\"images/default.jpg\" width=175 height=77><br>$$endif$$$$weight.realname$$</td>";fileLines.Add(fileLine);
fileLine=" <td align=center>$$weight.weight$$</td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine="$$endloop$$";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" </table> ";fileLines.Add(fileLine);
fileLine=" <br>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="<tr width=100%>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" <table align=center border=0 cellspacing=1 class=style1 width=520px> ";fileLines.Add(fileLine);
fileLine=" <tr> ";fileLines.Add(fileLine);
fileLine=" <th align=center height=25px>Game Type</th>";fileLines.Add(fileLine);
fileLine=" <th align=center>VALUE</th>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <td colspan=2 align=center height=6px>&nbsp;</td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine="$$loop row as weight index as weightindex select * from SkillWeights where key like 'gametype_%' order by realname asc$$";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <td align=center>$$if (weight.image !EQUALS \"\")$$<img src=\"$$weight.image$$\" width=175 height=77><br>$$else$$<img src=\"images/default.jpg\" width=175 height=77><br>$$endif$$$$weight.realname$$</td>";fileLines.Add(fileLine);
fileLine=" <td align=center>$$weight.weight$$</td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine="$$endloop$$";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" </table> ";fileLines.Add(fileLine);
fileLine=" <br>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<table border=0 cellspacing=0 align=center class=style3>";fileLines.Add(fileLine);
fileLine="<tr align=center>";fileLines.Add(fileLine);
fileLine="<th id=index height=30px colspan=2>SCORE CALCULATION</th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="<tr width=100%>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" <table align=center border=0 cellspacing=1 class=style1 width=520px>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <th align=center height=25px>TYPE</th>";fileLines.Add(fileLine);
fileLine=" <th align=center>VALUE</th>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <td colspan=2 align=center height=6px>&nbsp;</td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine="$$loop row as weight index as weightindex select * from ScoreWeights order by key asc$$";fileLines.Add(fileLine);
fileLine=" <tr height=30px align=left>";fileLines.Add(fileLine);
fileLine=" <td width=175px>$$weight.realname$$</td>";fileLines.Add(fileLine);
fileLine=" <td width=50px align=center>$$weight.weight$$</td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine="$$endloop$$";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" </table> ";fileLines.Add(fileLine);
fileLine=" <br>";fileLines.Add(fileLine);
fileLine=" <br>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<tr width=100%>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" <table border=0 cellspacing=0 class=style3 width=100%> ";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <th id=index align=center height=25px>AWARD</th>";fileLines.Add(fileLine);
fileLine=" <th id=index align=center>FACTORS</th>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <td colspan=2 align=center height=6px>&nbsp;</td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" $$loop row as awarddef index as awarddefindex select * from awarddefinition$$";fileLines.Add(fileLine);
fileLine=" $$pointsrecorded=\"0\"$$";fileLines.Add(fileLine);
fileLine=" $$loop row as awardpoints index as awardpointsindex select count(*) from awardpoints where awardindex='%%awarddef.awardindex%%'$$";fileLines.Add(fileLine);
fileLine=" $$pointsrecorded=awardpoints.0$$";fileLines.Add(fileLine);
fileLine=" $$endloop awardpoints$$";fileLines.Add(fileLine);
fileLine=" $$if (pointsrecorded !EQUALS \"0\")$$";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <td valign=top align=center height=455px width=168px>$$if (awarddef.image !EQUALS \"\")$$<img src=\"$$awarddef.image$$\"><br><br>$$else$$<img src=\"images/default.jpg\"><br><br>$$endif$$$$awarddef.name$$$$if (awarddef.weighted EQUALS \"Y\")$$<br>(weighted)$$endif$$</td>";fileLines.Add(fileLine);
fileLine=" $$positivelocationkills=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$positivelocationdeaths=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$positivelocationtks=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$positiveweaponkills=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$positiveweapondeaths=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$positiveweapontks=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$positiveactions=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$positivemisc=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$positivexp=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$negativelocationkills=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$negativelocationdeaths=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$negativelocationtks=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$negativeweaponkills=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$negativeweapondeaths=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$negativeweapontks=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$negativeactions=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$negativemisc=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$negativexp=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$loop row as awardcomponent index as awardcomponentindex select * from awarddefinitionaction where awardindex='%%awarddef.awardindex%%'$$";fileLines.Add(fileLine);
fileLine=" $$if (awardcomponent.posneg EQUALS \"+\")$$";fileLines.Add(fileLine);
fileLine=" $$positiveactions=\"%%positiveactions%%- %%awardcomponent.name%%<br>$$";fileLines.Add(fileLine);
fileLine=" $$else$$";fileLines.Add(fileLine);
fileLine=" $$negativeactions=\"%%negativeactions%%- %%awardcomponent.name%%<br>$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" $$loop row as awardcomponent index as awardcomponentindex select * from awarddefinitionmisc where awardindex='%%awarddef.awardindex%%'$$";fileLines.Add(fileLine);
fileLine=" $$if (awardcomponent.posneg EQUALS \"+\")$$";fileLines.Add(fileLine);
fileLine=" $$positivemisc=\"%%positivemisc%%- %%awardcomponent.id%%<br>$$";fileLines.Add(fileLine);
fileLine=" $$else$$";fileLines.Add(fileLine);
fileLine=" $$negativemisc=\"%%negativemisc%%- %%awardcomponent.id%%<br>$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" $$loop row as awardcomponent index as awardcomponentindex select * from awarddefinitionxp where awardindex='%%awarddef.awardindex%%'$$";fileLines.Add(fileLine);
fileLine=" $$if (awardcomponent.posneg EQUALS \"+\")$$";fileLines.Add(fileLine);
fileLine=" $$positivexp=\"%%positivexp%%- %%awardcomponent.name%%<br>$$";fileLines.Add(fileLine);
fileLine=" $$else$$";fileLines.Add(fileLine);
fileLine=" $$negativexp=\"%%negativexp%%- %%awardcomponent.name%%<br>$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" $$loop row as awardcomponent index as awardcomponentindex select * from awarddefinitionlocationtk where awardindex='%%awarddef.awardindex%%'$$";fileLines.Add(fileLine);
fileLine=" $$if (awardcomponent.posneg EQUALS \"+\")$$";fileLines.Add(fileLine);
fileLine=" $$positivelocationtks=\"%%positivelocationtks%%- %%awardcomponent.name%%<br>$$";fileLines.Add(fileLine);
fileLine=" $$else$$";fileLines.Add(fileLine);
fileLine=" $$negativelocationtks=\"%%negativelocationtks%%- %%awardcomponent.name%%<br>$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" $$loop row as awardcomponent index as awardcomponentindex select * from awarddefinitionlocationkill where awardindex='%%awarddef.awardindex%%'$$";fileLines.Add(fileLine);
fileLine=" $$if (awardcomponent.posneg EQUALS \"+\")$$";fileLines.Add(fileLine);
fileLine=" $$positivelocationkills=\"%%positivelocationkills%%- %%awardcomponent.name%%<br>$$";fileLines.Add(fileLine);
fileLine=" $$else$$";fileLines.Add(fileLine);
fileLine=" $$negativelocationkills=\"%%negativelocationkills%%- %%awardcomponent.name%%<br>$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" $$loop row as awardcomponent index as awardcomponentindex select * from awarddefinitionlocationdeath where awardindex='%%awarddef.awardindex%%'$$";fileLines.Add(fileLine);
fileLine=" $$if (awardcomponent.posneg EQUALS \"+\")$$";fileLines.Add(fileLine);
fileLine=" $$positivelocationdeaths=\"%%positivelocationdeaths%%- %%awardcomponent.name%%<br>$$";fileLines.Add(fileLine);
fileLine=" $$else$$";fileLines.Add(fileLine);
fileLine=" $$negativelocationdeaths=\"%%negativelocationdeaths%%- %%awardcomponent.name%%<br>$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" $$loop row as awardcomponent index as awardcomponentindex select * from awarddefinitionweapontk where awardindex='%%awarddef.awardindex%%'$$";fileLines.Add(fileLine);
fileLine=" $$if (awardcomponent.posneg EQUALS \"+\")$$";fileLines.Add(fileLine);
fileLine=" $$positiveweapontks=\"%%positiveweapontks%%- %%awardcomponent.name%%<br>$$";fileLines.Add(fileLine);
fileLine=" $$else$$";fileLines.Add(fileLine);
fileLine=" $$negativeweapontks=\"%%negativeweapontks%%- %%awardcomponent.name%%<br>$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" $$loop row as awardcomponent index as awardcomponentindex select * from awarddefinitionweaponkill where awardindex='%%awarddef.awardindex%%'$$";fileLines.Add(fileLine);
fileLine=" $$if (awardcomponent.posneg EQUALS \"+\")$$";fileLines.Add(fileLine);
fileLine=" $$positiveweaponkills=\"%%positiveweaponkills%%- %%awardcomponent.name%%<br>$$";fileLines.Add(fileLine);
fileLine=" $$else$$";fileLines.Add(fileLine);
fileLine=" $$negativeweaponkills=\"%%negativeweaponkills%%- %%awardcomponent.name%%<br>$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" $$loop row as awardcomponent index as awardcomponentindex select * from awarddefinitionweapondeath where awardindex='%%awarddef.awardindex%%'$$";fileLines.Add(fileLine);
fileLine=" $$if (awardcomponent.posneg EQUALS \"+\")$$";fileLines.Add(fileLine);
fileLine=" $$positiveweapondeaths=\"%%positiveweapondeaths%%- %%awardcomponent.name%%<br>$$";fileLines.Add(fileLine);
fileLine=" $$else$$";fileLines.Add(fileLine);
fileLine=" $$negativeweapondeaths=\"%%negativeweapondeaths%%- %%awardcomponent.name%%<br>$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" <td align=left valign=top>";fileLines.Add(fileLine);
fileLine=" <table border=0 cellspacing=1 class=style1 width=100%> ";fileLines.Add(fileLine);
fileLine=" <tr><th id=index colspan=4>POSITIVE EFFECT</th></tr>";fileLines.Add(fileLine);
fileLine=" <tr><th width=25%>Weapons</th><th width=25%>Locations</th><th width=25%>Objectives</th><th width=25%>Other</th></tr>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" $$if (positiveweaponkills !EQUALS \"\")$$<u><b>Kills:</b></u><br>$$positiveweaponkills$$<br>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (positiveweapondeaths !EQUALS \"\")$$<u><b>Deaths:</b></u><br>$$positiveweapondeaths$$<br>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (\"%%positiveweaponkills%%%%positiveweapondeaths%%\" EQUALS \"\")$$&nbsp;$$endif$$";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" $$if (positivelocationkills !EQUALS \"\")$$<u><b>Kills:</b></u><br>$$positivelocationkills$$<br>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (positivelocationdeaths !EQUALS \"\")$$<u><b>Deaths:</b></u><br>$$positivelocationdeaths$$<br>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (\"%%positivelocationkills%%%%positivelocationdeaths%%\" EQUALS \"\")$$&nbsp;$$endif$$";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" $$if (positiveactions !EQUALS \"\")$$$$positiveactions$$$$else$$&nbsp;$$endif$$";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" $$if (positivemisc !EQUALS \"\")$$$$positivemisc$$$$else$$&nbsp;$$endif$$";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" <tr><th id=index colspan=4>NEGATIVE EFFECT</th></tr>";fileLines.Add(fileLine);
fileLine=" <tr><th width=25%>Weapons</th><th width=25%>Locations</th><th width=25%>Objectives</th><th width=25%>Other</th></tr>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" $$if (negativeweaponkills !EQUALS \"\")$$<u><b>Kills:</b></u><br>$$negativeweaponkills$$<br>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (negativeweapondeaths !EQUALS \"\")$$<u><b>Deaths:</b></u><br>$$negativeweapondeaths$$<br>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (\"%%negativeweaponkills%%%%negativeweapondeaths%%\" EQUALS \"\")$$&nbsp;$$endif$$";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" $$if (negativelocationkills !EQUALS \"\")$$<u><b>Kills:</b></u><br>$$negativelocationkills$$<br>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (negativelocationdeaths !EQUALS \"\")$$<u><b>Deaths:</b></u><br>$$negativelocationdeaths$$<br>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (\"%%negativelocationkills%%%%negativelocationdeaths%%\" EQUALS \"\")$$&nbsp;$$endif$$";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" $$if (negativeactions !EQUALS \"\")$$$$negativeactions$$$$else$$&nbsp;$$endif$$";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" $$if (negativemisc !EQUALS \"\")$$$$negativemisc$$$$else$$&nbsp;$$endif$$";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="$$closefile$$";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"info.include");
fileLines.Clear();
fileLine="$$openfile player_%%hash(player.name)%%.html$$";fileLines.Add(fileLine);
fileLine="$$include menu.include$$";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<table cellspacing=0 border=0 class=nameplate align=center>";fileLines.Add(fileLine);
fileLine="<td width=599 height=99 background=\"images/nameplate.jpg\"><div align=\"center\"><b>$$colouredtext2html(player.name)$$</b></div></td>";fileLines.Add(fileLine);
fileLine="</table> ";fileLines.Add(fileLine);
fileLine="$$include playerprofile.include$$";fileLines.Add(fileLine);
fileLine="<table width=599px border=0 cellspacing=0 class=style3 align=center>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<tr align=left>";fileLines.Add(fileLine);
fileLine="<th><b>Rounds</th><td><b>$$player.rounds$$</td>";fileLines.Add(fileLine);
fileLine="<th><b>Play Time</th><td><b>$$formatduration(\"%H:%M:%S\",player.duration)$$</td>";fileLines.Add(fileLine);
fileLine="<th>&nbsp;</th><td>&nbsp;</td> ";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<tr align=left>";fileLines.Add(fileLine);
fileLine="<th><b>Score</th><td><b>$$formatfloat(\"%.0f\",player.score)$$ ($$formatfloat(\"%.2f\",player.scoreweighted)$$)</td>";fileLines.Add(fileLine);
fileLine="<th><b>Skill</th><td><b>$$formatfloat(\"%.0f\",player.skill)$$ ($$formatfloat(\"%.2f\",player.skillweighted)$$)</td> ";fileLines.Add(fileLine);
fileLine="<th><b>Ratio</b></th><td><b>$$formatfloat(\"%.2f\",player.ratio)$$</b></td> ";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<tr align=left>";fileLines.Add(fileLine);
fileLine="<th><b>Kills</th><td><b>$$player.kills$$</td>";fileLines.Add(fileLine);
fileLine="<th><b>Deaths</th><td><b>$$player.deaths$$</td>";fileLines.Add(fileLine);
fileLine="<th><b>Suicides</th><td><b>$$player.suicides$$</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<tr align=left>";fileLines.Add(fileLine);
fileLine="<th><b>Kill Streak</th><td><b>$$player.longestkillstreak$$</td>";fileLines.Add(fileLine);
fileLine="<th><b>Death Streak</th><td><b>$$player.longestdeathstreak$$</td>";fileLines.Add(fileLine);
fileLine="<th><b>Team Kills</th><td><b>$$player.teamkills$$</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="$$include playeraka.include$$";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<table border=0 cellspacing=0 align=center class=style3 width=900px>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="$$include playerenemies.include$$";fileLines.Add(fileLine);
fileLine="$$include playerweapons.include$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<table border=0 cellspacing=0 align=center class=style3 width=900px>";fileLines.Add(fileLine);
fileLine=" ";fileLines.Add(fileLine);
fileLine="$$include playerlocations.include$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="$$include playerspeech.include$$";fileLines.Add(fileLine);
fileLine="$$include playerxp.include$$";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="<table align=left border=0 cellspacing=0 class=style3>";fileLines.Add(fileLine);
fileLine="$$loop row as gametypelist index as gametypelistindex select count(*),* from playerinround,rounds where playerindex='%%player.playerindex%%' and playerinround.roundindex=rounds.roundidx and rounds.dropped='N' group by gametype$$";fileLines.Add(fileLine);
fileLine=" $$gametype=gametypelist.gametype$$";fileLines.Add(fileLine);
fileLine=" $$gametyperealname=gametype_%%gametypelist.gametype%%_realname$$";fileLines.Add(fileLine);
fileLine=" $$gametypeimage=gametype_%%gametypelist.gametype%%_image$$";fileLines.Add(fileLine);
fileLine=" $$gametypeid=gametype_%%gametypelist.gametype%%_id$$";fileLines.Add(fileLine);
fileLine=" $$bestscore=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$worstscore=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$bestskill=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$worstskill=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$bestscoreround=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$worstscoreround=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$bestskillround=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$worstskillround=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$loop row as round index as roundindex select * from playerinround where playerindex='%%player.playerindex%%' and roundindex in (select roundidx from rounds where gametype='%%gametype%%' and dropped='N') order by score desc limit 1$$";fileLines.Add(fileLine);
fileLine=" $$bestscore=round.score$$";fileLines.Add(fileLine);
fileLine=" $$bestscoreround=round.roundindex$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" $$loop row as round index as roundindex select * from playerinround where playerindex='%%player.playerindex%%' and roundindex in (select roundidx from rounds where gametype='%%gametype%%' and dropped='N') order by score asc limit 1$$";fileLines.Add(fileLine);
fileLine=" $$worstscore=round.score$$";fileLines.Add(fileLine);
fileLine=" $$worstscoreround=round.roundindex$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" $$loop row as round index as roundindex select * from playerinround where playerindex='%%player.playerindex%%' and roundindex in (select roundidx from rounds where gametype='%%gametype%%' and dropped='N') order by skill desc limit 1$$";fileLines.Add(fileLine);
fileLine=" $$bestskill=round.skill$$";fileLines.Add(fileLine);
fileLine=" $$bestskillround=round.roundindex$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" $$loop row as round index as roundindex select * from playerinround where playerindex='%%player.playerindex%%' and roundindex in (select roundidx from rounds where gametype='%%gametype%%' and dropped='N') order by skill asc limit 1$$";fileLines.Add(fileLine);
fileLine=" $$worstskill=round.skill$$";fileLines.Add(fileLine);
fileLine=" $$worstskillround=round.roundindex$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine=" $$killstreak=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$killstreakender=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$killstreakround=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$deathstreak=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$deathstreakender=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$deathstreakround=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$teamkillstreak=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$teamkillstreakender=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$teamkillstreakround=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$loop row as streak index as streakindex select * from streakdata where streaktype='0' and playerindex='%%player.playerindex%%' and roundindex in (select roundidx from rounds where gametype='%%gametype%%' and dropped='N') order by streaksize desc limit 1$$";fileLines.Add(fileLine);
fileLine=" $$killstreak=streak.streaksize$$";fileLines.Add(fileLine);
fileLine=" $$streakendindex=streak.streakender$$";fileLines.Add(fileLine);
fileLine=" $$killstreakround=streak.roundindex$$";fileLines.Add(fileLine);
fileLine=" $$if (streakendindex !EQUALS \"-1\")$$";fileLines.Add(fileLine);
fileLine=" $$loop row as streakplayer index as streakplayerindex select * from player where playerindex='%%streakendindex%%'$$";fileLines.Add(fileLine);
fileLine=" $$killstreakender=streakplayer.name$$";fileLines.Add(fileLine);
fileLine=" $$killstreakenderdropped=streakplayer.dropped$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine=" $$loop row as streak index as streakindex select * from streakdata where streaktype='1' and playerindex='%%player.playerindex%%' and roundindex in (select roundidx from rounds where gametype='%%gametype%%' and dropped='N') order by streaksize desc limit 1$$";fileLines.Add(fileLine);
fileLine=" $$deathstreak=streak.streaksize$$";fileLines.Add(fileLine);
fileLine=" $$streakendindex=streak.streakender$$";fileLines.Add(fileLine);
fileLine=" $$deathstreakround=streak.roundindex$$";fileLines.Add(fileLine);
fileLine=" $$if (streakendindex !EQUALS \"-1\")$$";fileLines.Add(fileLine);
fileLine=" $$loop row as streakplayer index as streakplayerindex select * from player where playerindex='%%streakendindex%%'$$";fileLines.Add(fileLine);
fileLine=" $$deathstreakender=streakplayer.name$$";fileLines.Add(fileLine);
fileLine=" $$deathstreakenderdropped=streakplayer.dropped$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine=" $$loop row as streak index as streakindex select * from streakdata where streaktype='2' and playerindex='%%player.playerindex%%' and roundindex in (select roundidx from rounds where gametype='%%gametype%%' and dropped='N') order by streaksize desc limit 1$$";fileLines.Add(fileLine);
fileLine=" $$teamkillstreak=streak.streaksize$$";fileLines.Add(fileLine);
fileLine=" $$streakendindex=streak.streakender$$";fileLines.Add(fileLine);
fileLine=" $$teamkillstreakround=streak.roundindex$$";fileLines.Add(fileLine);
fileLine=" $$if (streakendindex !EQUALS \"-1\")$$";fileLines.Add(fileLine);
fileLine=" $$loop row as streakplayer index as streakplayerindex select * from player where playerindex='%%streakendindex%%'$$";fileLines.Add(fileLine);
fileLine=" $$teamkillstreakender=streakplayer.name$$";fileLines.Add(fileLine);
fileLine=" $$teamkillstreakenderdropped=streakplayer.dropped$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine=" <table align=left border=0 cellspacing=0 class=style3 width=100%>";fileLines.Add(fileLine);
fileLine=" <tr valign=top>";fileLines.Add(fileLine);
fileLine=" <td width=500px>";fileLines.Add(fileLine);
fileLine=" <table border=0 cellspacing=0 align=left class=style3 >";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <th colspan=2 align=left>Gametype</th>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <td id=name align=center>";fileLines.Add(fileLine);
fileLine=" <a href=\"gametype_$$gametypeid$$.html\">$$if (gametypeimage !EQUALS \"\")$$<img src=\"$$gametypeimage$$\"><br><b>$$gametyperealname$$";fileLines.Add(fileLine);
fileLine=" $$else$$<img src=\"images/default.jpg\"><br><b>$$gametyperealname$$$$endif$$</a>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" <table border=0 cellspacing=0 align=left class=style3 >";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <th align=left height=20px width=200px>Best Score</th>";fileLines.Add(fileLine);
fileLine=" <td width=188px align=center>$$formatfloat(\"%.1f\",bestscore)$$</td>";fileLines.Add(fileLine);
fileLine=" <td colspan=2><a href=\"round_$$bestscoreround$$.html\">Round $$bestscoreround$$</a></td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <th align=left height=20px width=200px>Worst Score</th>";fileLines.Add(fileLine);
fileLine=" <td width=188px align=center>$$formatfloat(\"%.1f\",worstscore)$$</td>";fileLines.Add(fileLine);
fileLine=" <td colspan=2><a href=\"round_$$worstscoreround$$.html\">Round $$worstscoreround$$</a></td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <th align=left height=20px width=200px>Most Skillful</th>";fileLines.Add(fileLine);
fileLine=" <td width=188px align=center>$$formatfloat(\"%.1f\",bestskill)$$</td>";fileLines.Add(fileLine);
fileLine=" <td colspan=2><a href=\"round_$$bestskillround$$.html\">Round $$bestskillround$$</a></td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <th align=left height=20px width=200px>Least Skillful</th>";fileLines.Add(fileLine);
fileLine=" <td width=188px align=center>$$formatfloat(\"%.1f\",worstskill)$$</td>";fileLines.Add(fileLine);
fileLine=" <td colspan=2><a href=\"round_$$worstskillround$$.html\">Round $$worstskillround$$</a></td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <th colspan=4 height=20px width=388px align=center>Longest Streaks</th>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <th align=center height=20px width=55px>&nbsp;</th>";fileLines.Add(fileLine);
fileLine=" <th width=35px>#</th><th width=278px>Ended By</th>";fileLines.Add(fileLine);
fileLine=" <th>In Round</th></tr>";fileLines.Add(fileLine);
fileLine=" $$if (killstreak !EQUALS \"\")$$";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <th align=left height=20px width=55px>Kill</th>";fileLines.Add(fileLine);
fileLine=" <td width=35px align=center>$$killstreak$$ &nbsp;</td>";fileLines.Add(fileLine);
fileLine=" $$playerdataplayerindex=\"-1\"$$";fileLines.Add(fileLine);
fileLine=" <td valign=center width=298px>$$playerdisplaydropped=killstreakenderdropped$$$$playerdisplayname=killstreakender$$$$include playerdisplay.include$$ &nbsp;</td>";fileLines.Add(fileLine);
fileLine=" <td><a href=\"round_$$killstreakround$$.html\">$$killstreakround$$</a></td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (deathstreak !EQUALS \"\")$$";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <th align=left height=20px width=55px>Death</th>";fileLines.Add(fileLine);
fileLine=" <td width=35px align=center>$$deathstreak$$ &nbsp;</td>";fileLines.Add(fileLine);
fileLine=" <td valign=center width=298px>$$playerdisplaydropped=deathstreakenderdropped$$$$playerdisplayname=deathstreakender$$$$include playerdisplay.include$$ &nbsp;</td>";fileLines.Add(fileLine);
fileLine=" <td><a href=\"round_$$deathstreakround$$.html\">$$deathstreakround$$</a></td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (teamkillstreak !EQUALS \"\")$$";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <th align=left height=20px width=55px>TK</th>";fileLines.Add(fileLine);
fileLine=" <td width=35px align=center>$$teamkillstreak$$ &nbsp;</td>";fileLines.Add(fileLine);
fileLine=" <td valign=center width=298px>$$playerdisplaydropped=teamkillstreakenderdropped$$$$playerdisplayname=teamkillstreakender$$$$include playerdisplay.include$$ &nbsp;</td>";fileLines.Add(fileLine);
fileLine=" <td><a href=\"round_$$teamkillstreakround$$.html\">$$teamkillstreakround$$</a></td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" <font size=+2>Rounds Played</font><br>";fileLines.Add(fileLine);
fileLine=" $$loop row as round index as roundindex select * from playerinround where playerindex='%%player.playerindex%%' and roundindex in (select roundidx from rounds where gametype='%%gametype%%' and dropped='N') order by roundindex asc$$";fileLines.Add(fileLine);
fileLine=" <a href=\"round_$$round.roundindex$$.html\">$$formatinteger(\"%05d\",round.roundindex)$$</a> ";fileLines.Add(fileLine);
fileLine=" $$endloop$$";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine="$$endloop gametypelist$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="$$closefile$$";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"player.include");
fileLines.Clear();
fileLine="$$playerdataplayerindex=player.playerindex$$$$tablename=\"playerdataavatars\"$$$$include playerprofilecomponent.include$$";fileLines.Add(fileLine);
fileLine="$$tablename=\"playerdatapicture\"$$$$include playerprofilecomponent.include$$";fileLines.Add(fileLine);
fileLine="$$tablename=\"playerdatarealname\"$$$$include playerprofilecomponent.include$$";fileLines.Add(fileLine);
fileLine="$$tablename=\"playerdataclanrole\"$$$$include playerprofilecomponent.include$$";fileLines.Add(fileLine);
fileLine="$$tablename=\"playerdataxfire\"$$$$include playerprofilecomponent.include$$";fileLines.Add(fileLine);
fileLine="$$tablename=\"playerdatawebsite\"$$$$include playerprofilecomponent.include$$";fileLines.Add(fileLine);
fileLine="$$tablename=\"playerdatamisc1\"$$$$include playerprofilecomponent.include$$";fileLines.Add(fileLine);
fileLine="$$tablename=\"playerdatamisc2\"$$$$include playerprofilecomponent.include$$";fileLines.Add(fileLine);
fileLine="$$if (\"%%playerdataavatars%%%%playerdatapicture%%%%playerdatarealname%%%%playerdataclanrole%%%%playerdataxfire%%%%playerdatawebsite%%%%playerdatamisc1%%%%playerdatamisc2%%\" !EQUALS \"\")$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine=" <table width=600px valign=top class=style3 border=0 cellspacing=0 align=center>";fileLines.Add(fileLine);
fileLine=" $$if (playerdatarealname !EQUALS \"\")$$<tr><th>Real Name</th><td>$$playerdatarealname$$&nbsp;</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (playerdataclanrole !EQUALS \"\")$$<tr><th>Clan Rank</th><td>$$playerdataclanrole$$&nbsp;</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (playerdatawebsite !EQUALS \"\")$$<tr><th>Website</th><td><a href=\"$$playerdatawebsite$$\">$$playerdatawebsite$$</a>&nbsp;</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (playerdataxfire !EQUALS \"\")$$<tr><th>X-Fire</th><td>$$playerdataxfire$$&nbsp;</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (playerdatamisc1 !EQUALS \"\")$$<tr><th>Location</th><td>$$playerdatamisc1$$&nbsp;</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (playerdatamisc2 !EQUALS \"\")$$<tr><th>Quote</th><td>$$playerdatamisc1$$&nbsp;</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" <table width=600px valign=top class=style3 border=0 cellspacing=0 align=center> ";fileLines.Add(fileLine);
fileLine=" <tr align=center>";fileLines.Add(fileLine);
fileLine=" <td align=center>";fileLines.Add(fileLine);
fileLine=" $$if (playerdatapicture !EQUALS \"\")$$<img src=\"$$playerdatapicture$$\">&nbsp;$$endif$$";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" <td align=center>";fileLines.Add(fileLine);
fileLine=" $$if (playerdataavatars !EQUALS \"\")$$<img src=\"$$playerdataavatars$$\">&nbsp;$$endif$$";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="$$endif$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"playerprofile.include");
fileLines.Clear();
fileLine="$$AKALIST=\"\"$$";fileLines.Add(fileLine);
fileLine="$$loop row as aka index as akaindex select name from akadata where playerindex='%%player.playerindex%%'$$";fileLines.Add(fileLine);
fileLine="$$AKALIST=\"%%AKALIST%%<br>%%colouredtext2html(aka.name)%%\"$$";fileLines.Add(fileLine);
fileLine="$$endloop aka$$";fileLines.Add(fileLine);
fileLine="$$if (AKALIST !EQUALS \"\")$$";fileLines.Add(fileLine);
fileLine="<table align=center border=0 cellspacing=0 class=style3 width=600px>";fileLines.Add(fileLine);
fileLine="<tr>";fileLines.Add(fileLine);
fileLine="<th width=10%>AKA</th>";fileLines.Add(fileLine);
fileLine="<td>$$AKALIST$$</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="$$endif$$";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"playeraka.include");
fileLines.Clear();
fileLine="";fileLines.Add(fileLine);
fileLine="<td valign=top>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<table align=center border=0 cellspacing=0 class=style3 width=300px>";fileLines.Add(fileLine);
fileLine="<tr align=center>";fileLines.Add(fileLine);
fileLine=" <th>#</th>";fileLines.Add(fileLine);
fileLine=" <th>Top Victims</th>";fileLines.Add(fileLine);
fileLine=" <th height=30px width=50px>You<br>Killed</th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$loop row as enemydata index as enemyindex select count(*) as counter,player.name as targetname,targetindex,dropped from killdata,player where player.playerindex=killdata.targetindex and killdata.playerindex='%%player.playerindex%%' and killtype='KILL' group by targetindex order by counter desc limit %%MAXNEMESIS%%$$";fileLines.Add(fileLine);
fileLine="<tr>";fileLines.Add(fileLine);
fileLine="<th width=15px align=center>$$enemyindex$$</th> ";fileLines.Add(fileLine);
fileLine="$$playerdisplaydropped=enemydata.dropped$$";fileLines.Add(fileLine);
fileLine="$$playerdisplayname=enemydata.targetname$$";fileLines.Add(fileLine);
fileLine="$$playerdataplayerindex=enemydata.targetindex$$";fileLines.Add(fileLine);
fileLine="<td id=name align=left>$$include playerdisplay.include$$</td>";fileLines.Add(fileLine);
fileLine="<td align=center height=25px>$$enemydata.counter$$</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endloop enemy$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="</td>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<td valign=top>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<table align=center border=0 cellspacing=0 class=style3 width=300px>";fileLines.Add(fileLine);
fileLine="<tr align=center>";fileLines.Add(fileLine);
fileLine=" <th>#</th>";fileLines.Add(fileLine);
fileLine=" <th>Top Enemies</th>";fileLines.Add(fileLine);
fileLine=" <th height=30px width=50px>Killed<br>You</th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$loop row as enemydata index as enemyindex select count(*) as counter,player.name as playername,player.playerindex as playeridx,dropped from killdata,player where killdata.playerindex=player.playerindex and targetindex='%%player.playerindex%%' AND killtype='KILL' group by playeridx order by counter desc limit %%MAXNEMESIS%%$$";fileLines.Add(fileLine);
fileLine="<tr>";fileLines.Add(fileLine);
fileLine="<th width=15px align=center>$$enemyindex$$</th> ";fileLines.Add(fileLine);
fileLine="$$playerdisplaydropped=enemydata.dropped$$";fileLines.Add(fileLine);
fileLine="$$coloured=colouredtext2html(enemydata.playername)$$";fileLines.Add(fileLine);
fileLine="$$playerdisplayname=enemydata.playername$$";fileLines.Add(fileLine);
fileLine="$$playerdataplayerindex=enemydata.playeridx$$";fileLines.Add(fileLine);
fileLine="<td id=name align=left>$$include playerdisplay.include$$</td>";fileLines.Add(fileLine);
fileLine="<td align=center height=25px>$$enemydata.counter$$</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endloop enemy$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="</td>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"playerenemies.include");
fileLines.Clear();
fileLine="<td valign=top>";fileLines.Add(fileLine);
fileLine="<table align=center cellspacing=0 border=0 class=style3 width=300px>";fileLines.Add(fileLine);
fileLine="<tr align=center>";fileLines.Add(fileLine);
fileLine="<th>#</th>";fileLines.Add(fileLine);
fileLine="<th>Top Weapons</th>";fileLines.Add(fileLine);
fileLine="<th height=30px width=50px>Kills</th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$loop row as weaponlist index as weaponlistindex select count(*) as count,* from killdata where playerindex='%%player.playerindex%%' and killtype='KILL' group by playerweapon order by count desc limit 10$$";fileLines.Add(fileLine);
fileLine="<tr>";fileLines.Add(fileLine);
fileLine="<th width=15px align=center>$$weaponlistindex$$</th> ";fileLines.Add(fileLine);
fileLine="<td id=name valign=bottom align=center>";fileLines.Add(fileLine);
fileLine="$$if (weapon_%%weaponlist.playerweapon%%_image !EQUALS \"\")$$<img src=\"$$weapon_%%weaponlist.playerweapon%%_image$$\" width=175 height=77><br>$$weapon_%%weaponlist.playerweapon%%_realname$$";fileLines.Add(fileLine);
fileLine="$$else$$<img src=\"images/default.jpg\" width=175 height=77><br>$$weapon_%%weaponlist.playerweapon%%_realname$$$$endif$$";fileLines.Add(fileLine);
fileLine="</td>";fileLines.Add(fileLine);
fileLine="<td align=center>$$weaponlist.count$$</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endloop weaponlist$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="</td>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"playerweapons.include");
fileLines.Clear();
fileLine="";fileLines.Add(fileLine);
fileLine="<td valign=top>";fileLines.Add(fileLine);
fileLine="<table align=center class=style3 border=0 cellspacing=1 width=325px>";fileLines.Add(fileLine);
fileLine="<tr align=center>";fileLines.Add(fileLine);
fileLine="<th>#</th>";fileLines.Add(fileLine);
fileLine="<th>Location</th>";fileLines.Add(fileLine);
fileLine="<th>Kills</th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$loop row as stat index as statindex select count(*) as killcount,id,targetlocation,realname,image,(select count(*) from killdata as subkilldata where playerindex='%%player.playerindex%%' and killdata.targetlocation=subkilldata.targetlocation and killtype='SUICIDE') as suicidecount,(select count(*) from killdata as subkilldata where playerindex='%%player.playerindex%%' and killdata.targetlocation=subkilldata.targetlocation and killtype='TEAMKILL') as teamkillcount from killdata,location where playerindex='%%player.playerindex%%' and killtype='KILL' and location.idx=killdata.targetlocation group by targetlocation order by killcount desc limit %%MAXMAINPAGELOCATIONS%%$$";fileLines.Add(fileLine);
fileLine="<tr>";fileLines.Add(fileLine);
fileLine="<th id=\"ignore\" height=24px width=15px align=center>$$statindex$$</th>";fileLines.Add(fileLine);
fileLine="<td id=name align=center onmouseover = \"doButtons('$$stat.image$$')\" onmouseout = \"doButtons('images/player.jpg', 'images/player.jpg')\" >";fileLines.Add(fileLine);
fileLine="$$stat.realname$$";fileLines.Add(fileLine);
fileLine="</td>";fileLines.Add(fileLine);
fileLine="<td id=\"ignore\" align=center>$$stat.killcount$$</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endloop stat$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="</td>";fileLines.Add(fileLine);
fileLine="<td valign=top>";fileLines.Add(fileLine);
fileLine="<table align=center cellspacing=0 border=0 class=style5 width=325px>";fileLines.Add(fileLine);
fileLine="<tr align=center> ";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="<tr> ";fileLines.Add(fileLine);
fileLine="<td><img name=picture src=\"images/player.jpg\"></td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="</td>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"playerlocations.include");
fileLines.Clear();
fileLine="$$loop row as speechdata index as speechindex select count(*) from speechdata where playerindex='%%player.playerindex%%'$$";fileLines.Add(fileLine);
fileLine="$$speechcount=speechdata.0$$";fileLines.Add(fileLine);
fileLine="$$endloop$$";fileLines.Add(fileLine);
fileLine="$$if (speechcount !EQUALS \"0\")$$";fileLines.Add(fileLine);
fileLine="<table align=center border=0 cellspacing=0 class=style3 width=900px>";fileLines.Add(fileLine);
fileLine="<tr><th height=30px colspan=2>Last $$MAXSPEECHLINES$$ Quotes</th></tr>";fileLines.Add(fileLine);
fileLine="$$loop row as speechdata index as speechindex select count(*),* from speechdata where playerindex='%%player.playerindex%%' group by speech order by count(*) desc limit %%MAXSPEECHLINES%%$$";fileLines.Add(fileLine);
fileLine="<tr>";fileLines.Add(fileLine);
fileLine="$$coloured=colouredtext2html(speechdata.speech)$$";fileLines.Add(fileLine);
fileLine="<td align=left height=25px>$$coloured$$</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endloop speech$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="$$endif$$";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"playerspeech.include");
fileLines.Clear();
fileLine="$$if (XPAVAILABLE EQUALS \"Y\")$$";fileLines.Add(fileLine);
fileLine="<table align=center class=style2>";fileLines.Add(fileLine);
fileLine="<tr><th colspan=2>Experience Points</th></tr>";fileLines.Add(fileLine);
fileLine="$$loop row as xp index as xpindex select * from VIEW_XPTOTALPOINTS where playerindex='%%player.playerindex%%'$$";fileLines.Add(fileLine);
fileLine="<tr><td>$$xp.xpname$$</td><td>$$formatfloat(\"%.3f\",xp.points)$$</td></tr>";fileLines.Add(fileLine);
fileLine="$$endloop$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="</td>";fileLines.Add(fileLine);
fileLine="$$ENDIF$$";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"playerxp.include");
fileLines.Clear();
fileLine="$$openfile roundlist.html$$";fileLines.Add(fileLine);
fileLine="$$include menu.include$$";fileLines.Add(fileLine);
fileLine="$$loop row as server index as serverindex select * from servers$$";fileLines.Add(fileLine);
fileLine=" $$loop row as servervariable index as variableindex select * from servervariables where serveridx='%%server.serveridx%%'$$";fileLines.Add(fileLine);
fileLine=" $$%%lowercase(servervariable.variable)%%=servervariable.value$$";fileLines.Add(fileLine);
fileLine=" $$endloop servervariable$$";fileLines.Add(fileLine);
fileLine=" <table border=0 class=nameplate align=center>";fileLines.Add(fileLine);
fileLine=" <td width=699 height=99 background=\"images/nameplate4.jpg\">";fileLines.Add(fileLine);
fileLine=" <div align=\"center\">";fileLines.Add(fileLine);
fileLine=" $$colouredtext2html(sv_hostname)$$<br>";fileLines.Add(fileLine);
fileLine=" $$server.hostname$$$$if (server.gameport !EQUALS \"-1\")$$:$$server.gameport$$$$endif$$";fileLines.Add(fileLine);
fileLine=" </div>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" <br> ";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine=" <br>";fileLines.Add(fileLine);
fileLine=" <table>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <td>";fileLines.Add(fileLine);
fileLine=" $$lastgametypeid=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$loop row as round index as roundindex select * from view_rounds where serverindex = %%server.serveridx%% order by gametypeid,roundidx ASC$$";fileLines.Add(fileLine);
fileLine=" $$if (lastgametypeid !EQUALS round.gametypeid)$$";fileLines.Add(fileLine);
fileLine=" $$lastgametypeid=round.gametypeid$$";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" <table border=3>";fileLines.Add(fileLine);
fileLine=" <tr>";fileLines.Add(fileLine);
fileLine=" <td valign=top><a href=\"gametype_$$round.gametypeid$$.html\"><img src=\"$$round.gametypeimage$$\"><br>$$round.gametyperealname$$</a></td>";fileLines.Add(fileLine);
fileLine=" <td valign=top width=100%>";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" <a href=\"round_$$round.roundidx$$.html\">$$formatinteger(\"%05d\",round.roundidx)$$</a>";fileLines.Add(fileLine);
fileLine=" $$endloop round$$";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine=" </td>";fileLines.Add(fileLine);
fileLine=" </tr>";fileLines.Add(fileLine);
fileLine=" </table>";fileLines.Add(fileLine);
fileLine="$$endloop server$$";fileLines.Add(fileLine);
fileLine="$$closefile$$";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"roundlist.include");
fileLines.Clear();
fileLine="$$openfile round_%%round.roundidx%%.html$$";fileLines.Add(fileLine);
fileLine="$$include menu.include$$";fileLines.Add(fileLine);
fileLine="$$loop row as roundvariable index as variableindex select * from roundvariables where roundidx='%%round.roundidx%%'$$";fileLines.Add(fileLine);
fileLine="$$%%lowercase(\"round_\",roundvariable.variable)%%=roundvariable.value$$";fileLines.Add(fileLine);
fileLine="$$endloop roundvariable$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<table align=center cellspacing=0 border=0 width=100% class=style3>";fileLines.Add(fileLine);
fileLine="$$loop row as temprow index as tempindex select count(*) from playerinround where roundindex='%%round.roundidx%%'$$";fileLines.Add(fileLine);
fileLine="$$playercount=temprow.0$$";fileLines.Add(fileLine);
fileLine="$$endloop temprow$$";fileLines.Add(fileLine);
fileLine="$$loop row as temprow index as tempindex select count(*) from killdata where roundindex='%%round.roundidx%%' and killtype='KILL'$$";fileLines.Add(fileLine);
fileLine="$$kills=temprow.0$$";fileLines.Add(fileLine);
fileLine="$$endloop temprow$$";fileLines.Add(fileLine);
fileLine="$$loop row as temprow index as tempindex select count(*) from killdata where roundindex='%%round.roundidx%%' and killtype='SUICIDE'$$";fileLines.Add(fileLine);
fileLine="$$suicides=temprow.0$$";fileLines.Add(fileLine);
fileLine="$$endloop temprow$$";fileLines.Add(fileLine);
fileLine="$$loop row as temprow index as tempindex select count(*) from killdata where roundindex='%%round.roundidx%%' and killtype='TEAMKILL'$$";fileLines.Add(fileLine);
fileLine="$$teamkills=temprow.0$$";fileLines.Add(fileLine);
fileLine="$$endloop temprow$$";fileLines.Add(fileLine);
fileLine="$$loop row as temprow index as tempindex select count(*) from actiondata where roundindex='%%round.roundidx%%'$$";fileLines.Add(fileLine);
fileLine="$$objectivecount=temprow.0$$";fileLines.Add(fileLine);
fileLine="$$endloop temprow$$";fileLines.Add(fileLine);
fileLine="<tr>";fileLines.Add(fileLine);
fileLine="<th colspan=4 align=left><font face=arial size=-1>Round $$roundindex$$</font></th>";fileLines.Add(fileLine);
fileLine="<th colspan=2 align=left><font face=arial size=-1><a href=\"gametype_$$gametype_%%round.gametype%%_id$$.html\">$$gametype_%%round.gametype%%_realname$$</a></font></th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="<tr>";fileLines.Add(fileLine);
fileLine="<td colspan=4 align=left valign=top><font face=helvetica size=+1><a href=\"map_$$map_%%round.mapname%%_id$$.html\">$$map_%%round.mapname%%_realname$$</font>";fileLines.Add(fileLine);
fileLine="$$if (map_%%round.mapname%%_image !EQUALS \"\")$$<br><br><img src=\"$$map_%%round.mapname%%_image$$\" >$$endif$$</a></td>";fileLines.Add(fileLine);
fileLine="<th colspan=2 align=center>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="<table align=left valign=top cellspacing=0 border=0 class=style3 width=100%>";fileLines.Add(fileLine);
fileLine="$$if (gametype_%%round.gametype%%_image !EQUALS \"\")$$<tr align=left height=187px><td colspan=3><a href=\"gametype_$$gametype_%%round.gametype%%_id$$.html\"><img src=\"$$gametype_%%round.gametype%%_image$$\"></a></td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine="$$include roundvariables.include$$";fileLines.Add(fileLine);
fileLine="<tr align=left><td colspan=2 height=27px>Time Played</td><td>$$formatduration(\"%M:%S\",round.duration)$$</td></tr>";fileLines.Add(fileLine);
fileLine="<tr align=left><td colspan=2 height=27px>Players</td><td>$$playercount$$</td></tr>";fileLines.Add(fileLine);
fileLine="<tr align=left><td colspan=2 height=27px>Kills</td><td>$$kills$$</td></tr>";fileLines.Add(fileLine);
fileLine="<tr align=left><td colspan=2 height=27px>Team Kills</td><td>$$teamkills$$</td>";fileLines.Add(fileLine);
fileLine="<tr align=left><td colspan=2 height=27px>Suicides</td><td>$$suicides$$</td></tr>";fileLines.Add(fileLine);
fileLine="$$if (objectivecount !EQUALS \"0\")$$";fileLines.Add(fileLine);
fileLine="$$if (objectivecount < \"4\")$$";fileLines.Add(fileLine);
fileLine="$$loop row as objectives index as objectiveindex select count(*),dropped,player.playerindex,name,action from actiondata,player where player.playerindex=actiondata.playerindex and roundindex='%%round.roundidx%%' group by actiondata.playerindex,action$$";fileLines.Add(fileLine);
fileLine="<tr align=left>";fileLines.Add(fileLine);
fileLine="<td align=center colspan=2 height=27px>";fileLines.Add(fileLine);
fileLine="$$if (action_%%objectives.action%%_image !EQUALS \"\")$$";fileLines.Add(fileLine);
fileLine="<img src=\"$$action_%%objectives.action%%_image$$\">";fileLines.Add(fileLine);
fileLine="<br>";fileLines.Add(fileLine);
fileLine="$$endif$$";fileLines.Add(fileLine);
fileLine="$$action_%%objectives.action%%_realname$$";fileLines.Add(fileLine);
fileLine="</td>";fileLines.Add(fileLine);
fileLine="<td><font face=tahoma size=-2>$$playerdisplayname=objectives.name$$$$playerdisplaydropped=objectives.dropped$$$$playerdisplayplayerindex=\"-1\"$$$$include playerdisplay.include$$</font></td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endloop objectives$$";fileLines.Add(fileLine);
fileLine="$$endif$$";fileLines.Add(fileLine);
fileLine="$$endif$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="$$if (XPAVAILABLE EQUALS \"Y\")$$";fileLines.Add(fileLine);
fileLine="<table align=center cellspacing=0 border=0 class=style3>";fileLines.Add(fileLine);
fileLine="<tr align=center><th colspan=4>Experience</th></tr>";fileLines.Add(fileLine);
fileLine="$$loop row as xp index as xpindex select distinct(pointsindex) as pointsindex from view_xppoints where roundindex='%%round.roundidx%%'$$";fileLines.Add(fileLine);
fileLine="$$loop row as xppoints index as xppointsindex select * from view_xppoints where roundindex='%%round.roundidx%%' and pointsindex='%%xp.pointsindex%%' order by points desc limit 1$$";fileLines.Add(fileLine);
fileLine="<tr align=left>";fileLines.Add(fileLine);
fileLine="<td colspan=2 height=27px>Top $$xppoints.xpname$$</td>";fileLines.Add(fileLine);
fileLine="<td><font face=tahoma><a href=\"player_$$hash(xppoints.playername)$$.html\">$$colouredtext2html(xppoints.playername)$$</a></font></td>";fileLines.Add(fileLine);
fileLine="<td>$$formatfloat(\"%.3f\",xppoints.points)$$</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endloop xp players$$";fileLines.Add(fileLine);
fileLine="$$endloop xp points type$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="$$endif$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="</th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$if (objectivecount > \"3\")$$";fileLines.Add(fileLine);
fileLine="<tr><td colspan=6>";fileLines.Add(fileLine);
fileLine="<table cellspacing=1 border=1 align=left width=100% class=style3>";fileLines.Add(fileLine);
fileLine="<tr><th align=center colspan=3><font face=arial size=-1>Objectives</font></th></tr>";fileLines.Add(fileLine);
fileLine="<tr><th align=left>Objective</th><th align=left>Player</th><th align=left>Times<br>Achieved</th></tr>";fileLines.Add(fileLine);
fileLine="$$playerdisplayplayerindex=\"-1\"$$$$loop row as objectives index as objectiveindex select count(*) as actioncount,dropped,player.playerindex,name,action from actiondata,player where roundindex='%%round.roundidx%%' and player.playerindex=actiondata.playerindex group by player.playerindex,action$$";fileLines.Add(fileLine);
fileLine="<tr align=left>";fileLines.Add(fileLine);
fileLine="<td align=left colspan=1 height=27px>$$action_%%objectives.action%%_realname$$</td>";fileLines.Add(fileLine);
fileLine="<td><font face=tahoma>$$playerdisplayname=objectives.name$$$$playerdisplaydropped=objectives.dropped$$$$playerdisplayplayerindex=\"-1\"$$$$include playerdisplay.include$$</font></td>";fileLines.Add(fileLine);
fileLine="<td align=left colspan=1>$$objectives.actioncount$$</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endloop objectives$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="</td></tr>";fileLines.Add(fileLine);
fileLine="$$endif$$";fileLines.Add(fileLine);
fileLine="$$teamlosscount=\"0\"$$";fileLines.Add(fileLine);
fileLine="$$teamwincount=\"0\"$$";fileLines.Add(fileLine);
fileLine="$$awolcount=\"0\"$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="$$loop row as temprow index as tempindex select count(*),teamwinidx from teamwindata where roundindex='%%round.roundidx%%'$$";fileLines.Add(fileLine);
fileLine="$$teamwincount=temprow.0$$";fileLines.Add(fileLine);
fileLine="$$endloop$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="$$loop row as temprow index as tempindex select count(*),teamlossidx from teamlossdata where roundindex='%%round.roundidx%%'$$";fileLines.Add(fileLine);
fileLine="$$teamlosscount=temprow.0$$";fileLines.Add(fileLine);
fileLine="$$endloop$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="$$loop row as temprow index as tempindex select count(*) from playerinround where roundindex='%%roundindex%%' and playerindex not in (select playerindex from teamwindata where roundindex='%%round.roundidx%%') and playerindex not in (select playerindex from teamlossdata where roundindex='%%round.roundidx%%')$$";fileLines.Add(fileLine);
fileLine="$$awolcount=temprow.0$$";fileLines.Add(fileLine);
fileLine="$$endloop$$";fileLines.Add(fileLine);
fileLine="<tr></tr>";fileLines.Add(fileLine);
fileLine="$$if ((teamwincount EQUALS \"0\") AND (teamlosscount EQUALS \"0\"))$$";fileLines.Add(fileLine);
fileLine="$$if (awolcount !EQUALS \"0\")$$";fileLines.Add(fileLine);
fileLine=" $$teamtype=\"awol\"$$";fileLines.Add(fileLine);
fileLine=" $$teamtitle=\"Players\"$$";fileLines.Add(fileLine);
fileLine=" <tr><th colspan=6>";fileLines.Add(fileLine);
fileLine=" $$include roundteam.include$$";fileLines.Add(fileLine);
fileLine=" </th></tr>";fileLines.Add(fileLine);
fileLine="$$endif$$";fileLines.Add(fileLine);
fileLine="$$else$$";fileLines.Add(fileLine);
fileLine="$$if (teamwincount !EQUALS \"0\")$$";fileLines.Add(fileLine);
fileLine=" $$teamtype=\"win\"$$";fileLines.Add(fileLine);
fileLine=" $$teamtitle=\"VICTORS\"$$";fileLines.Add(fileLine);
fileLine=" <tr><th colspan=6>";fileLines.Add(fileLine);
fileLine=" $$include roundteam.include$$";fileLines.Add(fileLine);
fileLine=" </th></tr>";fileLines.Add(fileLine);
fileLine=" <tr></tr>";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (teamlosscount !EQUALS \"0\")$$";fileLines.Add(fileLine);
fileLine=" $$teamtype=\"loss\"$$";fileLines.Add(fileLine);
fileLine=" $$teamtitle=\"VANQUISHED\"$$";fileLines.Add(fileLine);
fileLine=" <tr><th colspan=6>";fileLines.Add(fileLine);
fileLine=" $$include roundteam.include$$";fileLines.Add(fileLine);
fileLine=" </th></tr>";fileLines.Add(fileLine);
fileLine=" <tr></tr>";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (awolcount !EQUALS \"0\")$$";fileLines.Add(fileLine);
fileLine=" $$teamtype=\"awol\"$$";fileLines.Add(fileLine);
fileLine=" $$teamtitle=\"Leaving The Battlefield Early Soldiers?\"$$";fileLines.Add(fileLine);
fileLine=" <tr><th colspan=6>";fileLines.Add(fileLine);
fileLine=" $$include roundteam.include$$";fileLines.Add(fileLine);
fileLine=" </th></tr>";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine=" $$endif$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="$$include roundspeech.include$$";fileLines.Add(fileLine);
fileLine="$$closefile$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"round.include");
fileLines.Clear();
fileLine="$$IF (round.servertype EQUALS \"COD1\")$$";fileLines.Add(fileLine);
fileLine=" $$if (round_shortversion !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px width=60px>Version</td><td>$$round_shortversion$$</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (round_sv_punkbuster !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px>Punkbuster</td><td>$$image=Case(round_sv_punkbuster,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$$$if (image !EQUALS \"\")$$<img src=\"$$image$$\">$$endif$$</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (round_scr_friendlyfire !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px>Friendly Fire</td><td>$$Case(round_scr_friendlyfire,scr_friendlyfire,scr_friendlyfire,\"0\",\"Off\",\"1\",\"On\",\"2\",\"Reflective\",\"3\",\"Shared\")$$</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (round_scr_killcam !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px>Kill Cam</td><td><img src=\"$$Case(round_scr_killcam,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$\"</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine="$$ELSE$$";fileLines.Add(fileLine);
fileLine=" $$IF (round.servertype EQUALS \"COD2\")$$";fileLines.Add(fileLine);
fileLine=" $$if (round_shortversion !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px width=60px>Version</td><td>$$round_shortversion$$</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (round_sv_punkbuster !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px>Punkbuster</td><td>$$image=Case(round_sv_punkbuster,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$$$if (image !EQUALS \"\")$$<img src=\"$$image$$\">$$endif$$</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (round_scr_friendlyfire !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px>Friendly Fire</td><td>$$Case(round_scr_friendlyfire,scr_friendlyfire,scr_friendlyfire,\"0\",\"Off\",\"1\",\"On\",\"2\",\"Reflective\",\"3\",\"Shared\")$$</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (round_scr_killcam !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px>Kill Cam</td><td><img src=\"$$Case(round_scr_killcam,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$\"</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$ELSE$$";fileLines.Add(fileLine);
fileLine=" $$IF (round.servertype EQUALS \"COD4\")$$";fileLines.Add(fileLine);
fileLine=" $$if (round_shortversion !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px width=60px>Version</td><td>$$round_shortversion$$</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (round_sv_punkbuster !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px>Punkbuster</td><td>$$image=Case(round_sv_punkbuster,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$$$if (image !EQUALS \"\")$$<img src=\"$$image$$\">$$endif$$</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (round_scr_friendlyfire !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px>Friendly Fire</td><td>$$Case(round_scr_friendlyfire,scr_friendlyfire,scr_friendlyfire,\"0\",\"Off\",\"1\",\"On\",\"2\",\"Reflective\",\"3\",\"Shared\")$$</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (round_scr_killcam !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px>Kill Cam</td><td><img src=\"$$Case(round_scr_killcam,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$\"</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$ELSE$$";fileLines.Add(fileLine);
fileLine=" $$IF (round.servertype EQUALS \"COD5\")$$";fileLines.Add(fileLine);
fileLine=" $$if (round_shortversion !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px width=60px>Version</td><td>$$round_shortversion$$</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (round_sv_punkbuster !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px>Punkbuster</td><td>$$image=Case(round_sv_punkbuster,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$$$if (image !EQUALS \"\")$$<img src=\"$$image$$\">$$endif$$</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (round_scr_friendlyfire !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px>Friendly Fire</td><td>$$Case(round_scr_friendlyfire,scr_friendlyfire,scr_friendlyfire,\"0\",\"Off\",\"1\",\"On\",\"2\",\"Reflective\",\"3\",\"Shared\")$$</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (round_scr_killcam !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px>Kill Cam</td><td><img src=\"$$Case(round_scr_killcam,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$\"</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$ELSE$$";fileLines.Add(fileLine);
fileLine=" $$IF (round.servertype EQUALS \"WOLFENSTEIN\")$$";fileLines.Add(fileLine);
fileLine=" $$if (round_shortversion !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px width=60px>Version</td><td>$$round_shortversion$$</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (round_sv_punkbuster !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px>Punkbuster</td><td>$$image=Case(round_sv_punkbuster,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$$$if (image !EQUALS \"\")$$<img src=\"$$image$$\">$$endif$$</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (round_scr_friendlyfire !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px>Friendly Fire</td><td>$$Case(round_scr_friendlyfire,scr_friendlyfire,scr_friendlyfire,\"0\",\"Off\",\"1\",\"On\",\"2\",\"Reflective\",\"3\",\"Shared\")$$</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$if (round_scr_killcam !EQUALS \"\")$$<tr align=left><td colspan=2 height=27px>Kill Cam</td><td><img src=\"$$Case(round_scr_killcam,\"0\",\"images/red.gif\",\"1\",\"images/green.gif\")$$\"</td></tr>$$endif$$";fileLines.Add(fileLine);
fileLine=" $$ELSE$$";fileLines.Add(fileLine);
fileLine=" $$ENDIF$$";fileLines.Add(fileLine);
fileLine=" $$ENDIF$$";fileLines.Add(fileLine);
fileLine=" $$ENDIF$$";fileLines.Add(fileLine);
fileLine=" $$ENDIF$$";fileLines.Add(fileLine);
fileLine="$$ENDIF$$";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"roundvariables.include");
fileLines.Clear();
fileLine="<table cellspacing=1 border=0 align=center width=100% class=style2>";fileLines.Add(fileLine);
fileLine="<tr><td align=center><font face=arial size=-1>$$teamtitle$$</font></td></tr>";fileLines.Add(fileLine);
fileLine="<tr><th>$$include roundplayer.include$$</th></tr>";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"roundteam.include");
fileLines.Clear();
fileLine="<table align=left border=0 cellspacing=1 width=100% class=style1>";fileLines.Add(fileLine);
fileLine="<tr align=left>";fileLines.Add(fileLine);
fileLine="<th>#</th>";fileLines.Add(fileLine);
fileLine="<th>Player</th>";fileLines.Add(fileLine);
fileLine="<th>Score</th>";fileLines.Add(fileLine);
fileLine="<th>Skill</th>";fileLines.Add(fileLine);
fileLine="<th>Kills</th>";fileLines.Add(fileLine);
fileLine="<th>Deaths</th>";fileLines.Add(fileLine);
fileLine="<th>Suicides</th>";fileLines.Add(fileLine);
fileLine="<th>Team<br>Kills</th>";fileLines.Add(fileLine);
fileLine="<th>Time<br>Played</th>";fileLines.Add(fileLine);
fileLine="<th>Main Weapon</th>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$if ((teamtype EQUALS \"win\") OR (teamtype EQUALS \"loss\"))$$";fileLines.Add(fileLine);
fileLine=" $$restriction=\"and playerinround.playerindex in (select playerindex from team%%teamtype%%data where roundindex='%%round.roundidx%%')\"$$";fileLines.Add(fileLine);
fileLine="$$else$$";fileLines.Add(fileLine);
fileLine=" $$restriction=\"and playerinround.playerindex not in (select playerindex from teamwindata where roundindex='%%round.roundidx%%') AND playerinround.playerindex not in (select playerindex from teamlossdata where roundindex='%%round.roundidx%%')\"$$";fileLines.Add(fileLine);
fileLine="$$endif$$";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
fileLine="$$loop row as playerinround index as playerinroundindex select player.dropped as dropped,playerinround.score as score,playerinround.skill as skill,playerinround.playerindex as playerindex,playerinround.kills as kills,playerinround.deaths as deaths,playerinround.suicides as suicides, playerinround.teamkills as teamkills,playerinround.duration as duration,player.name as playername from playerinround,player where playerinround.playerindex = player.playerindex and roundindex='%%round.roundidx%%' %%restriction%% order by playerinround.score desc$$";fileLines.Add(fileLine);
fileLine=" $$topweaponname=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$topweaponimage=\"\"$$";fileLines.Add(fileLine);
fileLine=" $$loop row as playerkilldata index as playerkilldataindex select * from killdata where playerindex='%%playerinround.playerindex%%' and roundindex='%%round.roundidx%%' group by playerweapon order by count(*) desc limit 1$$";fileLines.Add(fileLine);
fileLine=" $$topweaponid=weapon_%%playerkilldata.playerweapon%%_id$$";fileLines.Add(fileLine);
fileLine=" $$topweaponname=weapon_%%playerkilldata.playerweapon%%_realname$$";fileLines.Add(fileLine);
fileLine=" $$topweaponimage=weapon_%%playerkilldata.playerweapon%%_image$$";fileLines.Add(fileLine);
fileLine=" $$endloop playerkilldata$$";fileLines.Add(fileLine);
fileLine=" <tr onMouseover=\"changeto(event, '494848')\" onMouseout=\"changeback(event, '2f2f2f')\">$$playerdisplayname=playerinround.playername$$$$playerdataplayerindex=playerinround.playerindex$$$$playerdisplaydropped=playerinround.dropped$$";fileLines.Add(fileLine);
fileLine=" <td width=15px align=left>$$playerinroundindex$$</td>";fileLines.Add(fileLine);
fileLine=" <td id=\"ignore\" width=160px>$$include playerdisplay.include$$</td>";fileLines.Add(fileLine);
fileLine=" <td width=40px>$$formatfloat(\"%.1f\",playerinround.score)$$</td>";fileLines.Add(fileLine);
fileLine=" <td width=40px>$$formatfloat(\"%.1f\",playerinround.skill)$$</td>";fileLines.Add(fileLine);
fileLine=" <td width=40px>$$playerinround.kills$$</td>";fileLines.Add(fileLine);
fileLine=" <td width=40px>$$playerinround.deaths$$</td>";fileLines.Add(fileLine);
fileLine=" <td width=40px>$$playerinround.suicides$$</td>";fileLines.Add(fileLine);
fileLine=" <td width=40px>$$playerinround.teamkills$$</td>";fileLines.Add(fileLine);
fileLine=" <td width=40px>$$formatduration(\"%M:%S\",playerinround.duration)$$</td>";fileLines.Add(fileLine);
fileLine=" <td width=100px>$$if (topweaponimage !EQUALS \"\")$$<img width=150 height=50 src=\"$$topweaponimage$$\"><br>$$endif$$$$topweaponname$$</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endloop playerinround$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
fileLine="";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"roundplayer.include");
fileLines.Clear();
fileLine="<table cellspacing=1 border=0 align=center width=100% class=style2>";fileLines.Add(fileLine);
fileLine="$$playerdataplayerindex=-1$$";fileLines.Add(fileLine);
fileLine="$$loop row as speech index as speechindex select speech,name,speechdata.playerindex,dropped from speechdata,player where roundindex='%%round.roundidx%%' and speechdata.playerindex=player.playerindex order by speechidx$$";fileLines.Add(fileLine);
fileLine="<tr>";fileLines.Add(fileLine);
fileLine=" <td width=20%>$$playerdisplayname=speech.name$$$$playerdisplaydropped=speech.dropped$$$$include playerdisplay.include$$</td>";fileLines.Add(fileLine);
fileLine=" <td width=80%>$$colouredtext2html(speech.speech)$$</td>";fileLines.Add(fileLine);
fileLine="</tr>";fileLines.Add(fileLine);
fileLine="$$endloop$$";fileLines.Add(fileLine);
fileLine="</table>";fileLines.Add(fileLine);
ExportTemplateFile(directory,fileLines,"roundspeech.include");
}