- <?php
- /*
- $Id: index.php3,v 2.6 2000/04/29 09:58:46 zerodiv Exp $
- $Author: zerodiv $
- $Date: 2000/04/29 09:58:46 $
- $Revision: 2.6 $
- */
- /*
- Default title
- */
- $title = 'Prometheus';
- $session = '';
- /* The one and only master global config variable */
- $PROMETHEUS_APP_BASE = '.';
- /* Libraries */
- include( $PROMETHEUS_APP_BASE . '/prometheus-library/all.lib' );
- /* Load our additional paths */
- include( $PROMETHEUS_APP_BASE . '/lib/prometheus-apl.path' );
- // $PHP_AUTO_LOADER_DEBUG = 1;
- if ( file_exists( './autoload.lib' ) ) {
- include( './autoload.lib' );
- } else {
- /* Load the autoloader file */
- include( $PROMETHEUS_APP_BASE . '/index.auto' );
- }
- /* Load the local configuration */
- include( $PROMETHEUS_APP_BASE . '/config/all.config' );
- /* This is the actual application time... */
- include( $default->template_base . '/session_open.inc' );
- /* User authentication and base information lookups */
- include( './prometheus/templates/user_auth.inc' );
- if ( $form_mode == '' ) {
- $form_mode = 'PROMETHEUS';
- }
- /* Create the browser match object */
- $browser_obj = new WebClient();
- $browser_obj = $browser_obj->Detect();
- /* Create the template object */
- $template_obj = new TemplateObject();
- include( './themes/' . $user_theme_obj->theme_name . '/main.inc' );
- include( './themes/common/main.inc' );
- /* Create the application server */
- $app_server = new AppServer();
- for( $i = 0; $i < count( $current_apps ); $i++ ) {
- if ( file_exists( $current_apps[ $i ]) ) {
- include( $current_apps[ $i ] );
- }
- }
- if ( ! file_exists( './autoload.lib' ) ) {
- reset( $app_server->apps );
- while( list( $app, $obj_ref ) = each( $app_server->apps ) ) {
- $app_dir = strtolower( $app );
- /* ./pimp/lib/pimp.path */
- $autoload_path =
- $PROMETHEUS_APP_BASE .
- '/' . $app_dir . '/lib/' . $app_dir . '.path';
- /* ./pimp/pimp.auto */
- $autoload_file =
- $PROMETHEUS_APP_BASE . '/' . $app_dir . '/' . $app_dir . '.auto';
- if ( file_exists( $autoload_path ) ) {
- include( $autoload_path );
- }
- if ( file_exists( $autoload_file ) ) {
- include( $autoload_file );
- }
- }
- } else {
- include( './autoload.lib' );
- }
- AutoLoadDeallocate();
- /* Include application configs */
- reset( $app_server->apps );
- while( list( $app, $obj_ref ) = each( $app_server->apps ) ) {
- $app_config = './config/' . strtolower( $app ) . '.php3';
- if ( file_exists( $app_config ) ) {
- include( $app_config );
- }
- }
- $app_server->Handle( $form_mode );
- $app_server->Close();
- include( $default->template_base . '/session_close.inc' );
- /*
- echo( '<table bgcolor="#eeeeee" width="100%"><tr><td>' );
- $benchmark_obj = new BenchMark();
- $benchmark_obj->IgnoreUnixEnvVars();
- $benchmark_obj->IgnoreWebServerVars();
- $benchmark_obj->IgnorePhpVars();
- $benchmark_obj->IgnoreVar( 'benchmark_obj' );
- $benchmark_obj->GlobalStackDump();
- echo( '</td></tr></table>' );
- */
- ?>