# Set the library include path to be the directory that this file is in.
$current_include_path = ini_get('include_path');
ini_set('include_path', dirname(__FILE__) . ":$current_include_path");
# Turn on some line-ending magic so Mac files process correctly.
ini_set('auto_detect_line_endings', true);
require_once('spyc.php');
# Load some default libraries. Do not put any application specific
# library files in here - the sjsu agent app contains its own copy
# of library files, so there will be a name conflict and the agent won't run...
require_once('tags.php');
require_once('application.php');
require_once('session.php');
require_once('request.php');
require_once('page.php');
require_once('template.php');
require_once('tiles.php');
require_once('server/context.php');
require_once('mysql.php');
require_once('auth/auth_user.php');
require_once('server.php');
require_once('tag_parser.php');
require_once('tag_base.php');
#require_once('profile/chapter.php');
# Get a connection to the application server.
$z_server = new server($_SERVER['Z_SERVER_ROOT'],
$_SERVER['Z_DB_HOST'],
$_SERVER['Z_DB_NAME'],
$_SERVER['Z_DB_USERNAME'],
$_SERVER['Z_DB_PASSWORD']);
$z_context = new context();
$z_context->load($z_server, $_SERVER['HTTP_HOST'], $_SERVER['REQUEST_URI']);
$z_tag_context = array();
if ($z_context === false) {
die("No context found for: $_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]");
}
# Set the context specific timezone.
$time_zone = $z_context->get_parameter('time_zone');
if (!$time_zone) {
$time_zone = 'America/Los_Angeles';
}
putenv("TZ=$time_zone");
#putenv('TZ=' . $z_context->get_parameter('time_zone'));
# Load the application library files.
if (file_exists($z_context->get_lib_include())) {
require_once($z_context->get_lib_include());
}