<?
/*
HandicappingOS, Open Source Handicapping Solutions
http://www.handicappingOS
Copyright (c) 2005 Richard Rosa
Released under the GNU General Public License
*/
include_once('includes/misc.inc');
include_once('includes/config.inc');
include_once('adodb/adodb.inc.php'); // get this at http://php.weblogs.net
include_once('includes/tools.php');
include_once('parse_bris.php');
// class files
include_once('includes/race.php');
include_once('includes/entry.php');
// database type
$db_databaseType = "mysql";
// MySQL host
$db_hostname = "localhost";
// MySQL username
$db_user = "root";
// MySQL password
$db_password = "";
// MySQL database
$db_database = "handicappingOS";
define('MAX_DATASOURCE_SIZE', 104857600);
$debug = 0;
$types = array();
$conn = &ADONewConnection($db_databaseType); # create a connection
if (!$conn->PConnect($db_hostname, $db_user, $db_password, $db_database))
die("Cannot connect to " . $db_database);
// set up globals
$surfaceTypes = array("D"=>"dirt", "T"=>"turf", "d"=>"inner dirt", "t"=>"inner turf", "s"=>"steeplechase", "h"=>"hunt");
$surfaceAbbr = array("D"=>"D", "T"=>"T", "d"=>"iD", "t"=>"iT", "s"=>"S", "h"=>"H");
$meds = array("", "L ", " b", "Lb", "FL", "Fb", "", "", "", "");
$callPositions = array("ppFirstCallPos", "ppSecondCallPos", "ppStretchPos", "ppFinishPos");
$callMargins = array("ppFirstCallBeatenMargin", "ppSecondCallBeatenMargin", "ppStretchBeatenMargin", "ppFinishBeatenMargin");
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
$action = $_POST['action'];
$subaction = $_POST['subaction'];
}
elseif($_SERVER['REQUEST_METHOD'] == 'GET')
{
$action = $_GET['action'];
$subaction = $_GET['subaction'];
}
else
{
$action = "getFiles";
$subaction = "";
}
if (!($action)) {
$action = "get";
}
require ("getFiles.php");
$conn->Close();
?>