<?php
include_once('C:\\path_to\\SMF_forum\\SSI.php');

$campbaseyear		= "2263";

$showplanets		= 1; 				// set to zero to disable planet display
$showbases		= 1;				// set to zero to disable base display

$pagecomp		= 0;				// set to 1 to compress pages if php is configured '--with-zlib' (0 to disable) (or use zlib.output_compression - in the php.ini file - preferred)
$usepost		= 1;				// set to 1 to enable the '_$POST' method in the map script - necessary for some servers. (0 to disable)

$D2dbhostname     	= "localhost";			// The D2 MySQL db servers hostname OR IP address
$D2dbport		= "3306";			// The D2 MySQL db server port number
$D2db			= "databasename";			// The name of the MySQL D2 database
$D2dbuser     		= "username";			// The MySQL user to connect as
$D2dbpass 		= "password";				// The password for that user
$D2campname		= "Test Server";			// The D2 campaign name (just for titles)
				
$cssloc			= "common.css";		// path to css on webserver

$webmaproot		= "http://www.example.com/webmap_op_sql/";  // url to root webmap folder
$forumsroot		= "http://www.example.com/forum/"; // SMF forum root
$useforumslink		= 1; // show a link to the SMF forum

$usejavairc		= 1;
if ($usejavairc == 1) {				
$d2IRCserver		= "irc.dynaverse.net";		// IRC server in use by D2 server
$d2IRCserverport	= 6999;
$d2IRCGenChan		= "#General@TestServer";
}

$useSSLlink		= 0;
if ($useSSLlink == 1) {	
$SSLlink		="https://www.example.com/webmap_op_sql/";
}

$usefiles		=0;
if ($usefiles == 1) {	
$d2files		="http://www.example.com/files/";
}

$usets			= 1;				// Use TS webpost page
if ($usets == 1) {				
$TSlink      		= "http://www.example.com/tsinfo/";	// TS webpost page address
}

$useOoBadmin		= 0;

$useshipyard		= 1;				// Use shipyard pages (fill out forums and D2 server info above)
if ($useshipyard == 1) {				
$MinimumBidFactor 	= 6;				// The multiplier for the minimum bid for a ship (in economy.gf)
$Cost_Difficulty	= 1.1;				// The cost multiplier for the current difficulty setting (in economy.gf)
$classcostmod 		= array();			// This is a modifier per <eClassType> for the price of a ship (don't change this line - it just declares the array - edit the lines below according to economy.gf)
$classcostmod[0] 	= 1.0;				// Shuttle class cost modifier
$classcostmod[1] 	= 1.0;				// PF class cost modifier
$classcostmod[2] 	= 1.0;				// Freighter class cost modifier
$classcostmod[3] 	= 0.9;				// Frigate class cost modifier
$classcostmod[4] 	= 1.0;				// Destroyer class cost modifier
$classcostmod[5] 	= 2.0;				// War Destroyer class cost modifier
$classcostmod[6] 	= 1.5;				// Light Cruiser class cost modifier
$classcostmod[7] 	= 2.0;				// Heavy Cruiser class cost modifier
$classcostmod[8] 	= 2.25;				// New Heavy Cruiser class cost modifier
$classcostmod[9] 	= 3.0;				// Heavy Battlecruiser class cost modifier
$classcostmod[10] 	= 4.0;				// Carrier class cost modifier
$classcostmod[11] 	= 5.0;				// Dreadnaught class cost modifier
$classcostmod[12] 	= 8.0;				// Battleship class cost modifier
$classcostmod[13] 	= 1.0;				// Listening Post class cost modifier
$classcostmod[14] 	= 2.0;				// Base Station class cost modifier
$classcostmod[15] 	= 3.5;				// Battle Station class cost modifier
$classcostmod[16] 	= 5.0;				// Starbase class cost modifier
$classcostmod[17] 	= 1.0;				// Monster class cost modifier
$classcostmod[18] 	= 1.0;				// Planet class cost modifier
$classcostmod[19] 	= 1.0;				// Special class cost modifier

// Limited availability ship classes:
$limavail 				= array();
$limavail['SHUTTLE'] 			= "limited";	// Shuttle
$limavail['PF'] 			= "limited";	// PF
$limavail['FREIGHTER'] 			= "avail";	// Freighter
$limavail['FRIGATE'] 			= "avail";	// Frigate
$limavail['DESTROYER'] 			= "avail";	// Destroyer
$limavail['WAR_DESTROYER'] 		= "avail";	// War Destroyer
$limavail['LIGHT_CRUISER'] 		= "avail";	// Light Cruiser
$limavail['HEAVY_CRUISER'] 		= "avail";	// Heavy Cruiser
$limavail['NEW_HEAVY_CRUISER'] 		= "avail";	// New Heavy Cruiser
$limavail['HEAVY_BATTLECRUISER'] 	= "avail";	// Heavy Battlecruiser
$limavail['CARRIER'] 			= "avail";	// Carrier
$limavail['DREADNOUGHT'] 		= "avail";	// Dreadnaught
$limavail['BATTLESHIP'] 		= "avail";	// Battleship
$limavail['LISTENING_POST'] 		= "limited";	// Listening Post
$limavail['BASE_STATION'] 		= "limited";	// Base Station
$limavail['BATTLE_STATION'] 		= "limited";	// Battle Station
$limavail['STARBASE'] 			= "limited";	// Starbase
$limavail['MONSTER'] 			= "limited";	// Monster
$limavail['PLANET'] 			= "limited";	// Planet
$limavail['SPECIAL'] 			= "limited";	// Special
// To limit individual ships for this interface add " lim" to the end of the SFB Year Last Available field in the copy of the shiplist placed in this folder for use by the webmap
// "limited"
}
// Emipre/Cartel Names
$empstring = array();
$empstring[0] = "United Federation of Planets";
$empstring[1] = "Klingon Empire";
$empstring[2] = "Romulan Star Empire";
$empstring[3] = "Lyran Star Empire";
$empstring[4] = "Hydran Kingdom";
$empstring[5] = "Gorn Confederation";
$empstring[6] = "Interstellar Concordium";
$empstring[7] = "Kzinti Hegemony";
$empstring[8] = "Orion Cartel";
$empstring[9] = "Korgath Cartel";
$empstring[10] = "Prime Cartel";
$empstring[11] = "TigerHeart Cartel";
$empstring[12] = "BeastRaiders Cartel";
$empstring[13] = "Syndicate Cartel";
$empstring[14] = "WyldeFire Cartel";
$empstring[15] = "Camboro Cartel";
$empstring[16] = "Rogue Pirates";
$empstring[17] = "Monsters";
$empstring[18] = "Tholian Holdfast";
$empstring[19] = "Lyran Democratic League";
$empstring[20] = "WYN Star Cluster";
$empstring[21] = "Jindarian";
$empstring[22] = "Andromedans";
$empstring[23] = "Neutral";
$empstring[24] = "Mirror";
$empstring[25] = "All Races";

$empcolor = array();
$empcolor[0] = "#0000FF";  //Federation
$empcolor[1] = "#FF0000";  //Klingon
$empcolor[2] = "#00FF00";  //Romulan
$empcolor[3] = "#FFCC33";  //Lyran
$empcolor[4] = "#660099";  //Hydran
$empcolor[5] = "#996600";  //Gorn
$empcolor[6] = "#FF66CC";  //ISC
$empcolor[7] = "#00FFFF";  //Mirak
$empcolor[8] = "#0000FF";  //Orion
$empcolor[9] = "#FF0000";  //Orion
$empcolor[10] = "#00FF00";  //Orion
$empcolor[11] = "#FFCC33";  //Orion
$empcolor[12] = "#660099";  //Orion
$empcolor[13] = "#996600";  //Orion
$empcolor[14] = "#FF66CC";  //Orion
$empcolor[15] = "#00FFFF";  //Orion
$empcolor[16] = "#CCCCCC";  //NeutralRace
$empcolor[17] = "#CCCCCC";  //NeutralRace
$empcolor[18] = "#CCCCCC";  //NeutralRace
$empcolor[19] = "#CCCCCC";  //NeutralRace
$empcolor[20] = "#CCCCCC";  //NeutralRace
$empcolor[21] = "#CCCCCC";  //NeutralRace
$empcolor[22] = "#CCCCCC";  //NeutralRace
$empcolor[23] = "#CCCCCC";  //NeutralRace
$empcolor[24] = "#CCCCCC";  //NeutralRace
$empcolor[25] = "#CCCCCC";  //NeutralRace


$hexname = array();
$hexregion = array();

$link = mysql_connect($D2dbhostname .":" .$D2dbport, $D2dbuser, $D2dbpass);
mysql_select_db($D2db);

$query = "SELECT Width,Height FROM mapdescription";
$result = mysql_query($query);			
$line = mysql_fetch_array($result, MYSQL_ASSOC);

$mapdimx = $line['Width'];
$mapdimy = $line['Height'];

mysql_free_result($result);

mysql_close($link);

for ($mdx = 0; $mdx <= $mapdimx-1; $mdx++) {
for ($mdy = 0; $mdy <= $mapdimy-1; $mdy++) {
$hexname[$mdx][$mdy] = "";
$hexregion[$mdx][$mdy] = "";
}
}

// planet names


//$hexname[5][7] = "Earth";
//$hexname[19][3] = "Lyra";

// region names

//$hexregion[5][7] = "Federation Core";

?>