autoload.lib
上传用户:xiao730204
上传日期:2007-01-04
资源大小:141k
文件大小:164k
- <?php $PHP_AUTO_LOADED_OPTIMIZED_MODE = 1; ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/Base/BaseObject.object" ] != 1 ) {
- /* ../prometheus-library/objects/Base/BaseObject.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/Base/BaseObject.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/Base/BaseObject.object";
- ?><?php class BaseObject { var $my_type; Function BaseObject( $type = 'BaseObject' ) { $this->my_type = $type; } Function Type() { return $this->my_type; } Function toString() { return serialize( $this ); } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/Debug/Debug.object" ] != 1 ) {
- /* ../prometheus-library/objects/Debug/Debug.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/Debug/Debug.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/Debug/Debug.object";
- ?><?php class Debug extends BaseObject { var $debug; var $prefix; Function Debug() { $this->BaseObject( 'Debug' ); } Function On() { $this->debug = 1; } Function Off() { $this->debug = 0; } Function Message( $message ) { if ( $this->debug == 1 ) { echo( "n<!-- " . $this->prefix . ' : ' . $message . " -->n" ); } } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/App/AppHandler.object" ] != 1 ) {
- /* ../prometheus-library/objects/App/AppHandler.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/App/AppHandler.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/App/AppHandler.object";
- ?><?php class AppHandler extends BaseObject { var $handler_name; var $function_action; var $include_action; var $globals_needed; var $autoload; var $autoload_file; Function AppHandler( $handler_name = '', $include_action = '', $globals_needed = '', $function_action = '', $autoload = '', $autoload_file = '' ) { $this->BaseObject( 'AppHandler' ); $this->handler_name = $handler_name; $this->include_action = $include_action; $this->globals_needed = $globals_needed; $this->function_action = $function_action; $this->autoload = $autoload; $this->autoload_file = $autoload_file; } Function Handle( $my_var = '', $other_globals = '') { /* Load the prereqs first prefer the autoload file over the autoload calls themselves =) */ if ( isset( $this->autoload_file ) && file_exists( $this->autoload_file ) ) { include( $this->autoload_file ); } else { if ( is_array( $this->autoload ) ) { for( $i = 0; $i < count( $this->autoload ); $i++ ) { AutoLoad( $this->autoload[ $i ] ); } } } if ( is_array( $other_globals ) ) { for( $i = 0; $i < count( $other_globals ); $i++ ) { $var_name = $other_globals[ $i ]; $temp_script .= ' global $' . $var_name . '; '; } } if ( is_array( $this->globals_needed ) ) { for( $i = 0; $i < count( $this->globals_needed ); $i++ ) { $var_name = $this->globals_needed[ $i ]; $temp_script .= ' global $' . $var_name . '; '; } } if ( isset( $this->function_action ) && $this->function_action != '') { $temp_script .= $this->function_action . '( "' . $my_var . '" );'; } if ( file_exists( $this->include_action ) ) { $temp_script .= 'include( "' . $this->include_action . '" );'; } eval( $temp_script ); } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/App/App.object" ] != 1 ) {
- /* ../prometheus-library/objects/App/App.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/App/App.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/App/App.object";
- ?><?php class App extends BaseObject { var $app_name; var $app_description; var $handlers; var $define_id_prefix; var $handler_file; var $handler_file_loaded; var $default_handler; var $globals_needed; Function App( $app_name, $app_desc ) { $this->BaseObject( 'App' ); $this->app_name = $app_name; $this->app_description = $app_desc; $this->handlers = Array(); $this->globals_needed = Array(); $this->default_handler = ''; $this->handler_file = ''; $this->handler_file_loaded = 0; } Function AddHandler( $handler_obj ) { if ( is_object( $handler_obj ) ) { $this->handlers[ $handler_obj->handler_name ] = $handler_obj; } } Function AddDefaultHandler( $handler_obj ) { if ( is_object( $handler_obj ) ) { $this->default_handler = $handler_obj; } } Function Handle( $my_var = '') { $obj_ref = ''; if ( isset( $this->handler_file ) && $this->handler_file_loaded == 0 && file_exists( $this->handler_file ) ) { include( $this->handler_file ); $this->handler_file_loaded = 1; } $obj_ref = $this->handlers[ $my_var ] ; if ( ! is_object( $obj_ref ) ) { if ( is_object( $this->default_handler ) ) { $this->default_handler->Handle( 'DEFAULT', $this->globals_needed ); } return 0; } $obj_ref->Handle( $my_var, $this->globals_needed ); return 0; } Function GenerateHandle( $handle_name ) { return $this->app_name . '_' . $handle_name; } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/App/AppServer.object" ] != 1 ) {
- /* ../prometheus-library/objects/App/AppServer.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/App/AppServer.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/App/AppServer.object";
- ?><?php class AppServer extends BaseObject { var $apps; var $default_app; Function AppServer() { $this->BaseObject( 'AppServer' ); $this->default_app = ''; $this->apps = Array(); } Function Open() {} Function Close() {} Function AppRegister( $my_app ) { if ( is_object( $my_app ) ) { $this->apps[ $my_app->app_name ] = $my_app; } } Function Handle( $my_var = '' ) { $app_name = ''; $obj_ref = ''; $mode = ''; $stuff = explode( '_', $my_var ); $app_name = $stuff[ 0 ]; for( $i = 1; $i < count( $stuff ); $i++ ) { if ( $mode != '' ) { $mode .= '_'; } $mode .= $stuff[ $i ] ; } $obj_ref = $this->apps[ $app_name ]; if ( ! is_object( $obj_ref ) ) { if ( $this->default_app != '' ) { $obj_ref = $this->apps[ $this->default_app ]; if ( ! is_object( $obj_ref ) ) { return 0; } } else { return 0; } } return $obj_ref->Handle( $mode ); } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/generic/DbDefaults.object" ] != 1 ) {
- /* ../prometheus-library/db/generic/DbDefaults.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/generic/DbDefaults.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/db/generic/DbDefaults.object";
- ?><?php class DbDefaults extends BaseObject { var $driver; var $user_name; var $password; var $server_name; var $server_port; var $db_name; var $persistent_mode; var $connect_string; Function DbDefaults( $user_name = '', $password = '', $server_name = '', $server_port = '', $db_name = '', $persistent_mode = true, $connect_string = '' ) { $this->BaseObject( 'DbDefaults' ); $this->user_name = $user_name; $this->password = $password; $this->server_name = $server_name; $this->server_port = $server_port; $this->db_name = $db_name; $this->persistent_mode = $persistent_mode; $this->connect_string = $connect_string; } Function Build_MysqlConnectString() { $this->connect_string = $this->server_name; if ( $this->server_port != '' ) { $this->connect_string .= ':' . $this->port_name; } } Function Build_OracleConnectString() { $this->connect_string = $this->user_name; if ( $this->password != '' ) { $this->connect_string .= '/' . $this->password; } if ( $this->db_name != '' ) { $this->connect_string .= '@' . $this->db_name; } } Function Build_PostgresConnectString() { if ( $this->db_name != '' ) { $this->connect_string .= ' dbname=' . $this->db_name; } if ( $this->server_port != '' ) { $this->connect_string .= ' port=' . $this->port_name; } if ( $this->server_name != '' ) { $this->connect_string .= ' host=' . $this->server_name; } if ( $this->user_name != '' ) { $this->connect_string .= ' user=' . $this->user_name; } if ( $this->password != '' ) { $this->connect_string .= ' password=' . $this->password; } $this->connect_string = trim( $this->connect_string ); } Function CopyDbDefaults( $db_defaults_obj ) { $this->driver = $db_defaults_obj->driver; $this->user_name = $db_defaults_obj->user_name; $this->password = $db_defaults_obj->password; $this->server_name = $db_defaults_obj->server_name; $this->db_name = $db_defaults_obj->db_name; $this->persistent_mode = $db_defaults_obj->persistent_mode; } Function DebugDump() { $debug = new Debug(); $debug->prefix = 'DbDefaults'; $debug->Message( 'Debug dump start' ); $debug->Message( 'driver : ' . $this->driver ); $debug->Message( 'user_name : ' . $this->user_name ); $debug->Message( 'password : ' . $this->password ); $debug->Message( 'server_name : ' . $this->server_name ); $debug->Message( 'db_name : ' . $this->db_name ); $debug->Message( 'persistent_mode : ' . $this->persitent_mode ); $debug->Message( 'Debug dump end' ); } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/Mysql_Db/Mysql_DbDriver.object" ] != 1 ) {
- /* ../prometheus-library/db/Mysql_Db/Mysql_DbDriver.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/Mysql_Db/Mysql_DbDriver.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/db/Mysql_Db/Mysql_DbDriver.object";
- ?><?php class Mysql_DbDriver extends BaseObject { var $sql_statement; var $db_connection_handle; var $db_result; var $db_result_return; var $debug; Function Mysql_DbDriver() { $this->BaseObject( 'Mysql_DbDriver' ); $this->sql_statement = ''; $this->db_connection_handle = ''; $this->db_result = ''; $this->db_result_return = 0; $this->debug = new Debug(); $this->debug->prefix = 'Mysql_Db::DbDriver'; $this->debug->Off(); } Function Exec() { $this->debug->Message( 'Execing sql stmt : ' . "n" . $this->sql_statement . "n" ); $this->db_result_return = ( $this->db_result = @mysql_query( $this->sql_statement, $this->db_connection_handle ) ); if ( $this->db_result_return == false ) { $error_string = @mysql_errno() . ':' . @mysql_error(); $this->debug->Message( $error_string ); return false; } else { $this->db_result_return = true; return true; } } Function GetInsertId() { return @mysql_insert_id( $this->db_result ); } Function FetchRow() { if ( $this->db_result_return != true ) { $this->Exec(); } if ( $this->db_result_return == true ) { return @mysql_fetch_row( $this->db_result ); } else { return false; } } Function FetchCell( $xx, $yy ) { if ( $this->db_result_return != true ) { $this->Exec(); } if ( $this->db_result_return == true ) { if ( @mysql_data_seek( $this->db_result, $yy ) ) { return @mysql_fetch_field( $this->db_result, xx ); } } else { return false; } } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/Mysql_Db/Mysql_Db.object" ] != 1 ) {
- /* ../prometheus-library/db/Mysql_Db/Mysql_Db.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/Mysql_Db/Mysql_Db.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/db/Mysql_Db/Mysql_Db.object";
- ?><?php class Mysql_Db extends BaseObject { var $db; var $debug; var $db_connection_handle; var $connection_init; Function Mysql_Db( $db_config = '' ) { $this->BaseObject( 'Mysql_Db' ); if ( is_object( $db_config ) ) { $this->db = $db_config; } else { $this->db = new DbDefaults(); } $this->debug = new Debug(); $this->debug->prefix = 'Mysql_Db::MAIN'; $this->debug->Off(); $this->db_connection_handle = false; $this->connection_init = false; } Function BuildConnectString() { if ( $this->db->connect_string == '' ) { $this->db->Build_MysqlConnectString(); } } Function CreateConnection() { $this->BuildConnectString(); if ( $this->db->persistent_mode == true && $this->connection_init == false ) { $open_connection = 0; $open_connection = ( $this->db_connection_handle = @mysql_pconnect( $this->db->connect_string, $this->db->user_name, $this->db->password ) ); if ( !( $open_connection) ) { $this->debug->Message( 'Database Invalid Username / Password Combo : ' . "n" . 'Db Connect string : ' . $this->db->connect_string . "n" . 'Db Username : ' . $this->db->user_name . "n" . 'Db Password : ' . $this->db->password . "n" ); return array( false, 'Invalid username / password combonation.' ); } if ( ! $this->SelectDb() ) { $this->debug->Message( 'Database select failed, check for database existance ' . 'or misconfiguration.' . "n" . 'Db Database : ' . $this->db->db_name ); return array( false, 'Select database : ' . $this->db->db_name . ' failed, check for database existance, ' . 'or misconfiguration' ); } $this->connection_init = true; return array( true, $this->db_connection_handle ); } if ( $this->db->persistent_mode == true && $this->connection_init == true ) { return array( $this->db_connection_handle ); } } Function Open() { return $this->CreateConnection(); } Function DestroyConnection() { if ( $this->connection_init == true ) { if ( @mysql_close( $this->db_connection_handle ) ) { return array( true ); } else { return array( false ); } } } Function Close() { return $this->DestroyConnection(); } Function PrepareSql( $sql_stmt ) { $temp = new Mysql_DbDriver(); /* This is here to prevent the persistent connection from forgetting about which database it just used */ $this->SelectDb(); $temp->db_connection_handle = $this->db_connection_handle; $temp->sql_statement = $sql_stmt; $temp->debug->debug = $this->debug->debug; return $temp; } Function SelectDb() { $select_db = ( $db_test = @mysql_select_db( $this->db->db_name, $this->db_connection_handle ) ); return $select_db; } Function Prepare( $sql_stmt ) { return $this->PrepareSql( $sql_stmt ); } Function ListAllTables() { if ( $result = @mysql_listtables( $this->db->db_name, $this->db_connection_handle ) ) { $my_arr = Array(); $i = 0; while( $i < @mysql_num_rows( $result ) ) { $my_arr[ $i ] = @mysql_tablename( $result, $i ); $i++; } return Array( true, $my_arr ); } else { return Array( false, @mysql_error() ); } } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/User/User.object" ] != 1 ) {
- /* ../prometheus-library/objects/User/User.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/User/User.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/User/User.object";
- ?><?php class User extends BaseObject { var $user_id; var $domain_id; var $user_name; var $password; var $login_deny; var $last_update; var $debug; Function User() { $this->BaseObject( 'User' ); $this->user_id = -1; $this->domain_id = 0; $this->user_name = undef; $this->password = undef; $this->login_deny = true; $this->last_update = undef; $this->debug = new Debug; $this->debug->Off(); } Function Copy( $source_obj ) { $this->user_id = $source_obj->user_id; $this->user_name = $source_obj->user_name; $this->password = $source_obj->password; $this->login_deny = $source_obj->login_deny; $this->debug = $source_obj->debug; $this->domain_id = $source_obj->domain_id; $this->last_updated = $source_obj->last_updated; } Function DumpVars() { $this->debug->Message( 'USER ID : ' . $this->user_id ); $this->debug->Message( 'User Name : ' . $this->user_name ); $this->debug->Message( 'Password : ' . $this->password ); $this->debug->Message( 'Login Deny : ' . $this->login_deny ); } Function EncryptPassword( $salt = '' ) { if ( $salt == '' ) { return crypt( $this->password ); } else { $useable_salt = $salt; if ( ereg( '^$1$', $salt ) ) { $useable_salt = substr( $salt, 0, 12 ); } else { $useable_salt = substr( $salt, 0, 2 ); } return crypt( $this->password, $useable_salt ); } } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/User_Db/Mysql_User_Db.object" ] != 1 ) {
- /* ../prometheus-library/db/User_Db/Mysql_User_Db.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/User_Db/Mysql_User_Db.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/db/User_Db/Mysql_User_Db.object";
- ?><?php class Mysql_User_Db extends BaseObject { var $debug; var $user_db; Function Mysql_User_Db( $db_config = '') { $this->BaseObject( 'Mysql_User_Db' ); $this->user_db = new Mysql_Db(); if ( is_object( $db_config ) ) { $this->user_db->db = $db_config; } $this->debug = new Debug; $this->debug->prefix = 'Mysql_Db::User_Db'; $this->debug->Off(); $this->user_db->debug->Off(); } Function InitDbConnection() { if ( $this->user_db->connection_init == false) { $retuns = $this->user_db->CreateConnection(); } if ( $this->user_db->connection_init == false ) { return array( false, 'Not connected' ); } return array( true ); } Function ListAll( $domain_id = '0' ) { $this->debug->Message( 'Init connection - listall' ); list( $ret_val, $reason ) = $this->InitDbConnection(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } if ( $domain_id == '' ) { $domain_id = 0 ; } $sql = " SELECT user_id, user_name, password, login_deny, domain_id, last_update FROM user_table WHERE domain_id = $domain_id ORDER BY user_id "; $select_all_users = $this->user_db->PrepareSql( $sql ); $i = 0; $ResultArray = array(); $ResultObj = new User; $select_all_users->Exec(); while( list( $user_id, $user_name, $password, $login_deny, $domain_id, $last_update ) = $select_all_users->FetchRow() ) { $ResultObj->user_id = 0; $ResultObj->user_name = ''; $ResultObj->password = ''; $ResultObj->login_deny = true; $ResultObj->user_id = $user_id; $ResultObj->user_name = $user_name; $ResultObj->password = $password; $ResultObj->login_deny = $login_deny; $ResultObj->domain_id = $domain_id; $ResultObj->last_update = $last_update; $ResultArray[ $i ] = $ResultObj; $i++; } return array( true, $i, $ResultArray ); } Function Add( $ThisUser ) { if ( $ThisUser->user_name == '' ) { return array( false, 'NO user name provided' ); } if ( $ThisUser->password == '' ) { return array( false, 'NO password provided' ); } if ( $ThisUser->login_deny == true ) { $ThisUser->login_deny = 1; } else { $ThisUser->login_deny = 0; } $this->debug->Message( 'Init connection - Add' ); list( $ret_val, $reason ) = $this->InitDbConnection(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } $insert_user = $this->user_db->PrepareSql( ' INSERT INTO user_table ( user_name, password, login_deny, domain_id, last_update ) VALUES ( ' . "'" . $ThisUser->user_name . "', " . "'" . $ThisUser->password . "', " . "'" . $ThisUser->login_deny . "', " . "'" . $ThisUser->domain_id . "', " . "'" . $ThisUser->last_update . "'" . ' )' ); list( $ret_val, $reason ) = $insert_user->Exec(); if ( ! $ret_val ) { return array( false, 'Insert to table failed.' ); } else { $ThisUser->user_id = $insert_user->GetInsertId(); return array( true, $ThisUser ); } } Function Delete( $ThisUser ) { $this->debug->Message( 'Init connection - delete' ); list( $ret_val, $reason ) = $this->InitDbConnection(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } $delete_user = $this->user_db->PrepareSql( 'DELETE FROM user_table WHERE ' . ' user_id = ' . $ThisUser->user_id . ' AND ' . ' domain_id = ' . $ThisUser->domain_id ); list( $ret_val, $reason ) = $delete_user->Exec(); if ( ! $ret_val ) { return array( false, 'Failed to delete uid : ' . $UserObject->user_id ); } else { return array( true, $ThisUser ); } } Function Get( $ThisUser ) { $this->debug->Message( 'Init connection - get' ); list( $ret_val, $reason ) = $this->InitDbConnection(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } $query_string = ''; $query_string .= ' SELECT user_id, user_name, password, login_deny, domain_id, last_update FROM user_table WHERE domain_id = ' . $ThisUser->domain_id . ' '; if ( $ThisUser->user_id != '' && $ThisUser->user_id != -1 ) { $query_string .= ' AND user_id = ' . $ThisUser->user_id; } $query_string .= ' AND user_name = "' . $ThisUser->user_name . '"'; if ( $ThisUser->password != undef ) { $query_string .= ' AND password = "' . $ThisUser->password . '"'; } $query_string .= ';'; $this->debug->Message( $query_string ); $get_user_info = $this->user_db->PrepareSql( $query_string ); $get_user_info->Exec(); $ResultObject = new User; if ( ! ( list( $ResultObject->user_id, $ResultObject->user_name, $ResultObject->password, $ResultObject->login_deny, $ResultObject->domain_id, $ResultObject->last_update ) = $get_user_info->FetchRow() ) ){ $this->debug->Message( 'No Match found' ); $this->debug->Message( $user_id ); return array( false, 'NO Match found.' ); } /* if ( $ResultObject->password == $ThisUser->password ) { return array( true, $ResultObject ); } else { return array( false, $ResultObject ); } if ( $ResultObject->password == $ThisUser->EncryptPassword() ) { return array( true, $ResultObject ); } else { return array( false, $ResultObject ); } */ return array( true, $ResultObject ); } Function Modify( $ThisUser ) { if ( $ThisUser->user_id == '' ) { return array( false, 'Please provide a user id.' ); } $this->debug->Message( 'Init connection - modify' ); list( $ret_val, $reason ) = $this->InitDbConnection(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } $query_string = ''; $query_string = ' UPDATE user_table SET last_update= NOW() '; if ( $ThisUser->user_name != '' ) { $query_string .= ' , '; $query_string .= 'user_name = '' . $ThisUser->user_name . '' '; } if ( $ThisUser->password != '' ) { $query_string .= ' , '; $query_string .= 'password = '' . $ThisUser->password . '' '; } if ( $ThisUser->login_deny == 0 || $ThisUser->login_deny == 1) { $query_string .= ' , '; $query_string .= 'login_deny = ' . $ThisUser->login_deny . ' '; } $query_string .= 'WHERE user_id = ' . $ThisUser->user_id . ' and domain_id = ' . $ThisUser->domain_id ; $mod_user_info = $this->user_db->PrepareSql( $query_string ); return array( true, $mod_user_info->Exec() ); } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/User_Db/Dummy_User_Db.object" ] != 1 ) {
- /* ../prometheus-library/db/User_Db/Dummy_User_Db.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/User_Db/Dummy_User_Db.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/db/User_Db/Dummy_User_Db.object";
- ?><?php class Dummy_User_Db extends BaseObject { var $debug; var $user_db; var $autocreate_user; Function Dummy_User_Db( $db_config = '' ) { $this->BaseObject( 'Dummy_User_Db' ); } Function InitDbConnection() {} Function ListAll() {} Function Add() {} Function Delete() {} Function Get() {} Function Modify() {} Function Verify() {} } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/User_Db/User_Db.object" ] != 1 ) {
- /* ../prometheus-library/db/User_Db/User_Db.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/User_Db/User_Db.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/db/User_Db/User_Db.object";
- ?><?php class User_Db extends BaseObject { Function User_Db() { $this->BaseObject( 'User_Db' ); } Function Db( $driver = '', $db_config = '' ) { $driver = strtolower( $driver ); switch( $driver ) { /* All in due time case 'ldap': return new Ldap_User_Db(); break; case 'unix_password': return new UnixPassword_User_Db(); break; */ case 'mysql': return new Mysql_User_Db( $db_config ); break; default: return new Dummy_User_Db( $db_config); break; } } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/User/UserAuth.object" ] != 1 ) {
- /* ../prometheus-library/objects/User/UserAuth.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/User/UserAuth.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/User/UserAuth.object";
- ?><?php class UserAuth extends BaseObject { var $user_db; Function UserAuth( $user_db = '' ) { $this->BaseObject( 'UserAuth' ); if ( is_object( $user_db ) ) { $this->user_db = $user_db; } else { $this->user_db = new User_Db(); } } Function Get( $user_obj ) { $this->user_db->autocreate_user = false; return $this->user_db->Get( $user_obj ); } Function Verify( $user_obj ) { $temp_obj = $user_obj; $temp_obj->password = undef; $ret_vals = $this->user_db->Get($temp_obj); if ( $ret_vals[ 0 ] == true ) { $temp_usr_obj = $ret_vals[ 1 ]; if ( $user_obj->password == $temp_usr_obj->password ) { return Array( true, $temp_usr_obj ); } $crypted_password = $user_obj->EncryptPassword( $temp_usr_obj->password ); if ( $crypted_password == $temp_usr_obj->password ) { return Array( true, $temp_usr_obj ); } else { return Array( false, 'User not found.' ); } } else { return Array( false, 'User not found.' ); } return Array( false, 'User not found.' ); } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/Time/TimeObject.object" ] != 1 ) {
- /* ../prometheus-library/objects/Time/TimeObject.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/Time/TimeObject.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/Time/TimeObject.object";
- ?><?php class TimeObject extends BaseObject { var $time; var $hour; var $min; var $sec; var $am_pm; var $month; var $day; var $year; Function TimeObject() { $this->BaseObject( 'TimeObject' ); $this->time = 0; $this->hour = 0; $this->min = 0; $this->sec = 0; $this->am_pm = 0; $this->month = 0; $this->day = 0; $this->year = 0; $this->GetLocalTime(); $this->FormatTime(); } Function GetLocalTime() { $this->time = time(); } Function FormatTime() { $this->hour = date( 'h', $this->time ); $this->min = date( 'i', $this->time ); $this->sec = date( 's', $this->time ); $this->am_pm = date( 'A', $this->time ); $this->month = date( 'm', $this->time ); $this->day = date( 'd', $this->time ); $this->year = date( 'Y', $this->time ); } Function Modify( $hour = 0, $min = 0, $sec = 0, $mon = 0, $day = 0, $year = 0 ) { if ( $hour != 0 ) { $this->hour += $hour; } if ( $min != 0 ) { $this->min += $min; } if ( $sec != 0 ) { $this->sec += $sec; } if ( $mon != 0 ) { $this->month += $mon; } if ( $day != 0 ) { $this->day += $day; } if ( $year != 0 ) { $this->year += $year; } $this->time = mktime( $this->hour, $this->min, $this->sec, $this->month, $this->day, $this->year ); } /* This is a fix for php3's broken serialize that exhibits the need to strip functions off of object references */ Function Copy( $broken_object ) { $this->hour = $broken_object->hour; $this->min = $broken_object->min; $this->sec = $broken_object->sec; $this->month = $broken_object->month; $this->day = $broken_object->day; $this->year = $broken_object->year; $this->time = $broken_object->time; $this->Modify(); } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/generic/SqlUtil.object" ] != 1 ) {
- /* ../prometheus-library/db/generic/SqlUtil.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/generic/SqlUtil.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/db/generic/SqlUtil.object";
- ?><?php class SqlUtil extends BaseObject { Function SqlUtil() { $this->BaseObject( 'SqlUtil' ); } Function Quote( $value ) { return '"' . $value . '"'; } Function DeleteStatement( $table, $match_criteria = '' ) { $delete_statement = ''; $delete_statement = 'DELETE FROM ' . $table; if ( $match_criteria != '' ) { $delete_statement .= ' WHERE ' . $match_criteria; } return $delete_statement; } Function UpdateStatement( $table, $table_elems, $match_criteria = '' ) { $update_statement = ''; $update_statement .= 'UPDATE ' . $table . ' SET '; $more_than_one = 0; reset( $table_elems ); while( list( $field_name, $field_value ) = each( $table_elems ) ) { if ( $more_than_one != 0 ) { $update_statement .= ', '; } $update_statement .= $field_name . ' = ' . $this->Quote( $field_value ); $more_than_one++; } if ( $match_criteria != '' ) { $update_statement .= ' WHERE '; $update_statement .= $match_criteria; } return $update_statement; } Function InsertStatement( $table, $table_elems ) { $insert_statement = ''; $insert_statement .= 'INSERT INTO ' . $table . ' '; $insert_statement .= '( '; $more_than_one = 0; reset( $table_elems ); while( list( $field_name, $field_value ) = each( $table_elems ) ) { if ( $more_than_one != 0 ) { $insert_statement .= ', '; } $insert_statement .= $field_name; $more_than_one++; } $insert_statement .= ' ) VALUES ( '; $more_than_one = 0; reset( $table_elems ); while( list( $field_name, $field_value ) = each( $table_elems ) ) { if ( $more_than_one != 0 ) { $insert_statement .= ', '; } $insert_statement .= $this->Quote( $field_value ); $more_than_one++; } $insert_statement .= ' )'; return $insert_statement; } Function SelectStatement( $tables, $table_elems, $match_criteria = '' ) { $select_statement = ''; $select_statement = 'SELECT '; $more_than_one = 0; for( $i = 0; $i < count( $table_elems ); $i++ ) { $field_name = $table_elems[ $i ] ; if ( $more_than_one != 0 ) { $select_statement .= ', '; } $select_statement .= $field_name; $more_than_one++; } $select_statement .= ' FROM '; $more_than_one = 0; reset( $tables ); for( $i = 0; $i < count( $tables ); $i++ ) { $table_name = $tables[ $i ] ; if ( $more_than_one != 0 ) { $select_statement .= ', '; } $select_statement .= $table_name; } if ( $match_criteria != '' ) { $select_statement .= ' WHERE ' . $match_criteria; } return $select_statement; } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/Session/SessionElement.object" ] != 1 ) {
- /* ../prometheus-library/objects/Session/SessionElement.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/Session/SessionElement.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/Session/SessionElement.object";
- ?><?php class SessionElement extends BaseObject { var $variable_name; /* -- DOESNT CARE ABOUT TYPE ANYMORE EXCEPT FOR STORE / RETREIVES -- */ var $variable_type; Function SessionElement( $variable_name, $var_type = 'string' ) { $this->BaseObject( 'SessionElement' ); $this->variable_name = $variable_name; $this->variable_type = $var_type; } Function Freeze() { return $this->StoreValue(); } Function Thaw( $data ) { return $this->FetchValue( $data ); } Function StoreValue() { $var_name = '$' . $this->variable_name; $sto_type = 'string'; $sto_val = ''; $code_seg = ''; $code_seg .= 'global ' . $var_name . '; '; $code_seg .= 'if ( is_object( ' . $var_name . ' ) ) { '; $code_seg .= ' $sto_val = serialize( ' . $var_name . ' ); '; $code_seg .= ' $sto_type = ' . $var_name . '->Type(); '; $code_seg .= '} else if( is_array( ' . $var_name . ' ) ) {'; $code_seg .= ' $sto_val = serialize( ' . $var_name . ' ); '; $code_seg .= ' $sto_type = "array"; '; $code_seg .= '} else {'; $code_seg .= ' $sto_val = ' . $var_name . ' ; '; $code_seg .= ' $sto_type = "string"; '; $code_seg .= '}'; eval( $code_seg ); $this->variable_type = $sto_type; return $sto_val; } Function FetchValue( $value ) { $var_name = '$' . $this->variable_name; $code_seg = ''; $code_seg .= 'global ' . $var_name . '; '; if ( $this->variable_type == 'string' ) { $code_seg .= $var_name . ' = '' . $value . '';' ; } else if ( $this->variable_type == 'array' ) { $code_seg .= $var_name . ' = Array(); '; $code_seg .= $var_name . ' = unserialize( '' . $value . '' ); '; } else { $code_seg .= $var_name . ' = new ' . $this->variable_type . '();'; $code_seg .= $var_name . ' = unserialize( '' . $value . '' );'; } eval( $code_seg ); } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/Session_Db/Mysql_Session_Db.object" ] != 1 ) {
- /* ../prometheus-library/db/Session_Db/Mysql_Session_Db.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/Session_Db/Mysql_Session_Db.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/db/Session_Db/Mysql_Session_Db.object";
- ?><?php class Mysql_Session_Db extends BaseObject { var $debug; var $session_db; Function Mysql_Session_Db( $db_config = '' ) { $this->BaseObject( 'Mysql_Session_Db' ); $this->session_db = new Mysql_Db(); if ( is_object( $db_config ) ) { $this->session_db->db = $db_config; } $this->debug = new Debug; $this->debug->prefix = 'Mysql_Db::Session_Db'; $this->debug->Off(); $this->session_db->debug->Off(); } Function InitDbConnection() { /* Make sure the database handle is available ( if not try to open it ) */ $returns = Array(); $this->session_db->debug->debug = $this->debug->debug; if ( $this->session_db->connection_init == false) { $returns = $this->session_db->CreateConnection(); } if ( $this->session_db->connection_init == false ) { return array( false, 'Database not connected', $returns ); } return array( true ); } Function ListAll() { $this->debug->Message( 'Init connection' ); list( $ret_val, $reason ) = $this->InitDbConnection(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } return array( false); } Function Add( $ThisSession ) { $this->debug->Message( 'Init connection' ); list( $ret_val, $reason ) = $this->InitDbConnection(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } if ( $ThisSession->grant_time->time == '' ) { $ThisSession->grant_time->Modify(); if ( $ThisSession->grant_time->time == '' ) { $ThisSession->grant_time->GetLocalTime(); } } if ( $ThisSession->expire_time->time == '' ) { $ThisSession->expire_time->Modify(); if ( $ThisSession->expire_time->time == '' ) { $ThisSession->expire_time->GetLocalTime(); } } $sql_util = new SqlUtil(); $insert_session = $this->session_db->PrepareSql( ' INSERT INTO sessions_table ( md5, ip, magic_string, grant_time, expire_time ) VALUES ( ' . $sql_util->Quote( $ThisSession->session_id ) . ', ' . $sql_util->Quote( $ThisSession->remote_addr ) . ', ' . $sql_util->Quote( AddSlashes( $ThisSession->magic_string ) ) . ', ' . $sql_util->Quote( AddSlashes( serialize( $ThisSession->grant_time ) ) ) . ', ' . $sql_util->Quote( AddSlashes( serialize( $ThisSession->expire_time ) ) ) . ' )' ); list( $ret_val, $reason ) = $insert_session->Exec(); if ( ! $ret_val ) { return array( false, 'Insert to table failed.'); } else { $sess_id = $insert_session->GetInsertId(); $ThisSession->db_id = $sess_id; for( $i = 0; $i < count( $ThisSession->session_elems ); $i++ ) { $obj_addr = $ThisSession->session_elems[ $i ]; $var_name = $obj_addr->variable_name; $var_value = AddSlashes( $obj_addr->StoreValue() ) ; $var_type = $obj_addr->variable_type; $insert_sess_data = $this->session_db->PrepareSql( ' INSERT INTO sessions_data_table ( session_id, variable_name, variable_type, variable_data ) VALUES ( ' . $sql_util->Quote( $sess_id ) . ', ' . $sql_util->Quote( $var_name ) . ', ' . $sql_util->Quote( $var_type ) . ', ' . $sql_util->Quote( $var_value ) . ' )' ); $insert_sess_data->Exec(); } return array( true, $ThisSession ); } } Function Delete( $session_db_id ) { $this->debug->Message( 'Init connection' ); list( $ret_val, $reason ) = $this->InitDbConnection(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } $delete_data = $this->session_db->PrepareSql( 'DELETE FROM sessions_data_table WHERE session_id = ' . $session_db_id ); list( $ret_val, $reason ) = $delete_data->Exec(); if ( ! $ret_val ) { return array( false, 'Failed to delete session_data : ' . $session_db_id ); } else { $delete_session = $this->session_db->PrepareSql( 'DELETE FROM sessions_table WHERE session_id = ' . $session_db_id ); list( $ret_val, $reason ) = $delete_session->Exec(); if ( ! $ret_val ) { return array( false, 'Failed to delete session : ' . $session_db_id ); } else { return array( true, $session_db_id ); } } } Function Get( $TargetSessionId, $ThawOnGet = 1 ) { $this->debug->Message( 'Init connection' ); list( $ret_val, $reason ) = $this->InitDbConnection(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } $query_string = ''; $query_string .= ' SELECT session_id, ip, magic_string, grant_time, expire_time FROM sessions_table WHERE md5 = "' . $TargetSessionId . '";'; $get_session_info = $this->session_db->PrepareSql( $query_string ); if ( ! ( list( $session_id, $ip, $magic_string, $grant_time, $expire_time ) = $get_session_info->FetchRow() ) ) { return array( false, 'NO Match found.' ); } $query_string = ''; $query_string .= ' SELECT variable_name, variable_type, variable_data FROM sessions_data_table WHERE session_id = ' . $session_id . ';' ; $get_session_info_2 = $this->session_db->PrepareSql( $query_string ); $ResultObject = new Session(); $ResultObject->db_id = $session_id; $ResultObject->session_id = $TargetSessionId; $ResultObject->magic_string = $magic_string; $ResultObject->grant_time->Copy( unserialize( $grant_time ) ); $ResultObject->expire_time->Copy( unserialize( $expire_time ) ); $ResultObject->grant_time->Modify(); $ResultObject->expire_time->Modify(); if ( $ResultObject->grant_time->time == $ResultObject->expire_time->time ) { $this->debug->Message( 'Expire and grant are the same' ); } else { $ResultObject->grant_time->GetLocalTime(); $ResultObject->grant_time->FormatTime(); } if ( $ResultObject->grant_time->time > $ResultObject->expire_time->time ) { $this->debug->Message( 'SESSION EXPIRED : ' . "n" . 'grant time : ' . $ResultObject->grant_time->time . "n" . 'expire time : ' . $ResultObject->expire_time->time . "n" ); $this->Delete( $ResultObject->db_id ); return array(false, 'Session Expired' ); } else { /* echo( 'SESSION NOT : ' . $ResultObject->grant_time->time . ' - ' . $ResultObject->expire_time->time . '<br>' ); */ } if ( $ThawOnGet == 1 ) { while( ( list( $var_name, $var_type, $var_data ) = $get_session_info_2->FetchRow() ) ) { $session_elem = new SessionElement( $var_name, $var_type); $session_elem->Thaw( $var_data ); $ResultObject->Add( $session_elem ); } } return array( true, $ResultObject ); } Function Modify( $ThisSession ) { $this->debug->Message( 'Init connection' ); list( $ret_val, $reason ) = $this->InitDbConnection(); $sql_util = new SqlUtil(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } $query_string = ''; $query_string = ' UPDATE sessions_table SET ip = "' . $ThisSession->remote_addr .'", ' . ' magic_string = "' . AddSlashes( $ThisSession->magic_string ) . '", ' . ' grant_time = "' . AddSlashes( Serialize( $ThisSession->grant_time ) ) . '", ' . ' expire_time = "' . AddSlashes( Serialize( $ThisSession->expire_time ) ) . '" ' . ' WHERE md5 = "' . $ThisSession->session_id . '"' ; $mod_session_info = $this->session_db->PrepareSql( $query_string ); $mod_session_info->Exec(); $query_string = ''; $query_string = 'DELETE FROM sessions_data_table WHERE session_id = ' . $sql_util->Quote( $ThisSession->db_id ) ; $remove_session_data = $this->session_db->PrepareSql( $query_string ); $remove_session_data->Exec(); for( $i = 0; $i < count( $ThisSession->session_elems ); $i++ ) { $obj_addr = $ThisSession->session_elems[ $i ]; $var_name = $obj_addr->variable_name; $var_value = AddSlashes( $obj_addr->StoreValue() ) ; $var_type = $obj_addr->variable_type; $sql_util = new SqlUtil(); $update_sess_data = $this->session_db->PrepareSql( ' INSERT INTO sessions_data_table ( session_id, variable_name, variable_type, variable_data ) VALUES ( ' . $sql_util->Quote( $ThisSession->db_id ) . ', ' . $sql_util->Quote( $var_name ) . ', ' . $sql_util->Quote( $var_type ) . ', ' . $sql_util->Quote( $var_value ) . ' )' ); $update_sess_data->Exec(); } return array( true ); } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/Session_Db/Dummy_Session_Db.object" ] != 1 ) {
- /* ../prometheus-library/db/Session_Db/Dummy_Session_Db.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/Session_Db/Dummy_Session_Db.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/db/Session_Db/Dummy_Session_Db.object";
- ?><?php class Dummy_Session_Db extends BaseObject { Function Dummy_Session_Db() {} Function InitDbConnection() {} Function ListAll() {} Function Add() {} Function Delete() {} Function Get() {} Function Modify() {} } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/Session_Db/Session_Db.object" ] != 1 ) {
- /* ../prometheus-library/db/Session_Db/Session_Db.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/Session_Db/Session_Db.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/db/Session_Db/Session_Db.object";
- ?><?php class Session_Db extends BaseObject { Function Session_Db() { $this->BaseObject( 'Session_Db' ); } Function Db( $driver, $db_config ) { $driver = strtolower( $driver ); switch( $driver ) { case 'mysql': return new Mysql_Session_Db( $db_config ); break; default: return new Dummy_Session_Db( $db_config ); break; } } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/Session/Session.object" ] != 1 ) {
- /* ../prometheus-library/objects/Session/Session.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/Session/Session.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/Session/Session.object";
- ?><?php class Session extends BaseObject { var $magic_string; var $remote_addr; var $http_user_agent; var $expire_time; var $grant_time; var $session_id; var $session_elems; var $session_elem_id; var $db_id; var $session_db; var $debug; Function Session( $session_db = '' ) { global $REMOTE_ADDR; $this->BaseObject( 'Session' ); $this->session_db = new Dummy_Session_Db(); if ( is_object( $session_db ) ) { $this->session_db = $session_db; } $this->session_id = ''; $this->remote_addr = '127.0.0.1'; if ( isset( $REMOTE_ADDR ) && $REMOTE_ADDR != '' ) { $this->remote_addr = $REMOTE_ADDR; } $this->http_user_agent = 'NONE'; $this->grant_time = new TimeObject(); $this->expire_time = new TimeObject(); $this->session_elems = Array(); $this->session_elem_id = 0; $this->db_id = -1; $this->debug = new Debug(); $this->debug->prefix = 'Session'; $this->debug->Off(); } Function Copy( $target_obj ) { $this->magic_string = $target_obj->magic_string; $this->remote_addr = $target_obj->remote_addr; $this->http_user_agent = $target_obj->http_user_agent; $this->expire_time = $target_obj->expire_time; $this->grant_time = $target_obj->grant_time; $this->session_id = $target_obj->session_id; $this->session_elems = $target_obj->session_elems; $this->db_id = $target_obj->db_id; } Function GenerateId() { return $this->CreateSessionId(); } Function CreateSessionId() { global $REMOTE_ADDR; global $HTTP_USER_AGENT; $this->magic_string = ''; mt_srand((double)microtime()*1000000); for( $i = 0; $i < 50; $i++ ) { $randval = mt_rand( 33, 128); $this->magic_string .= sprintf( '%c', $randval ); } /* $this->session_id = rawurlencode( $this->session_id ); */ $this->http_user_agent = $HTTP_USER_AGENT; $this->session_id = md5( $this->remote_addr . $this->http_user_agent . $this->magic_string ); return $this->session_id; } Function ListAll() {} Function Add( $A_SessionElem ) { if ( ! is_object( $A_SessionElem ) ) { return Array( false, 'Add - Non object pass.' ); } $this->session_elem_id = count( $this->session_elems ); $this->session_elems[ $this->session_elem_id ] = $A_SessionElem; $this->session_elem_id++; return Array( true, $this->session_elem_id ); } Function Save() { global $default; $session_db = $this->session_db; $session_db->debug->debug = $this->debug->debug; $ret_vals = $session_db->Get( $this->session_id, 0 ); if ( $ret_vals[ 0 ] == true ) { $t_obj = $ret_vals[ 1 ]; $this->db_id = $t_obj->db_id; $session_db->Modify( $this ); } else { if ( $this->session_id == '' ) { $this->session_id = $this->CreateSessionId(); } $session_db->Add( $this ); } } Function Get( $session_id ) { global $REMOTE_ADDR; global $HTTP_USER_AGENT; global $default; $session_db = $this->session_db; $session_db->debug->debug = $this->debug->debug; $this->debug->Message( 'Retrieve : ' . $session_id ); $ret_vals = $session_db->Get( $session_id ); $this->session_id = $session_id; if ( $ret_vals[ 0 ] == true ) { $this->Copy( $ret_vals[ 1 ] ); return true; } else { /* We shouldn't autocreate a session on a get... $this->session_id = $session_id; return $session_db->Add( $this ); */ } } Function Expire( $session_id = '') { if ( $session_id == '' ) { $session_id = $this->db_id; } $session_db = $this->session_db; $session_db->debug->debug = $this->debug->debug; $session_db->Delete( $session_id ); } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/User/User_Theme.object" ] != 1 ) {
- /* ../prometheus-library/objects/User/User_Theme.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/User/User_Theme.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/User/User_Theme.object";
- ?><?php class User_Theme extends BaseObject { var $user_id; var $theme_name; Function User_Theme() { $this->BaseObject( 'UserTheme' ); $this->user_id = -1; $this->theme_name = ''; } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/User_Db/Mysql_User_Theme_Db.object" ] != 1 ) {
- /* ../prometheus-library/db/User_Db/Mysql_User_Theme_Db.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/User_Db/Mysql_User_Theme_Db.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/db/User_Db/Mysql_User_Theme_Db.object";
- ?><?php class Mysql_User_Theme_Db extends BaseObject { var $debug; var $user_db; Function Mysql_User_Theme_Db( $db_config = '' ) { $this->BaseObject( 'Mysql_User_Theme_Db' ); $this->user_db = new Mysql_Db(); if ( is_object( $db_config ) ) { $this->user_db->db = $db_config; } $this->debug = new Debug(); $this->debug->prefix = 'Mysql_Db::Mysql_User_Theme'; $this->debug->Off(); $this->user_db->debug->Off(); } Function InitDbConnection() { /* Make sure the database handle is available ( if not try to open it ) */ $returns = Array(); if ( $this->user_db->connection_init == false) { $returns = $this->user_db->CreateConnection(); } if ( $this->user_db->connection_init == false ) { return array( false, 'Database not connected', $returns ); } return array( true ); } Function ListAll() { } Function Add( $theme_obj ) { $this->debug->Message( 'Init connection' ); list( $ret_val, $reason ) = $this->InitDbConnection(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } $sql_util = new SqlUtil(); $insert_theme = $this->user_db->PrepareSql( $sql_util->InsertStatement( 'user_theme_table', Array( 'user_id' => $theme_obj->user_id, 'theme' => $theme_obj->theme_name ) ) ); list( $ret_val, $reason ) = $insert_theme->Exec(); if ( ! $ret_val ) { return Array( false, 'Insert to table failed.' ); } else { return Array( true ); } } Function Delete( $user_id ) { $this->debug->Message( 'Init connection' ); list( $ret_val, $reason ) = $this->InitDbConnection(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } $sql_util = new SqlUtil(); $delete_theme = $this->user_db->PrepareSql( $sql_util->DeleteStatement( 'user_theme_table', 'user_id = ' . $user_id ) ); list( $ret_val, $reason ) = $delete_theme->Exec(); if ( ! $ret_val ) { return Array( false, 'Delete of theme failed.' ); } else { return Array( true ); } } Function Get( $user_id ) { $this->debug->Message( 'Init connection' ); list( $ret_val, $reason ) = $this->InitDbConnection(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } $sql_util = new SqlUtil(); $get_theme = $this->user_db->PrepareSql( $sql_util->SelectStatement( Array( 'user_theme_table' ), Array( 'user_id', 'theme' ), 'user_id = ' . $user_id ) ); if ( ! ( list( $user_id, $theme_name ) = $get_theme->FetchRow() ) ) { return Array( false, 'No match found.' ); } else { $theme_obj = new User_Theme(); $theme_obj->user_id = $user_id; $theme_obj->theme_name = $theme_name; return Array( true, $theme_obj ); } } Function Modify( $theme_obj ) { $this->debug->Message( 'Init connection' ); list( $ret_val, $reason ) = $this->InitDbConnection(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } $sql_util = new SqlUtil(); $update_theme = $this->user_db->PrepareSql( $sql_util->UpdateStatement( 'user_theme_table', Array( 'theme' => $theme_obj->theme_name ), 'user_id = ' . $theme_obj->user_id ) ); list( $ret_val, $reason ) = $update_theme->Exec(); if ( ! $ret_val ) { return Array( false, 'Update of theme failed.' ); } else { return Array( true ); } } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/User_Db/User_Theme_Db.object" ] != 1 ) {
- /* ../prometheus-library/db/User_Db/User_Theme_Db.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/User_Db/User_Theme_Db.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/db/User_Db/User_Theme_Db.object";
- ?><?php class User_Theme_Db extends BaseObject { Function User_Theme_Db() { $this->BaseObject( 'User_Theme_Db' ); } Function Db( $driver = '', $db_config = '' ) { $driver = strtolower( $driver ); switch( $driver ) { case 'mysql': return new Mysql_User_Theme_Db( $db_config ); break; default: return new Dummy_User_Theme_Db( $db_config ); break; } } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/User/User_Domain.object" ] != 1 ) {
- /* ../prometheus-library/objects/User/User_Domain.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/User/User_Domain.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/User/User_Domain.object";
- ?><?php class User_Domain extends BaseObject { var $domain_id; var $domain_name; Function User_Domain() { $this->BaseObject( 'User_Domain' ); $this->domain_id = 0; $this->domain_name = ''; } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/User_Domain_Db/Mysql_User_Domain_Db.object" ] != 1 ) {
- /* ../prometheus-library/db/User_Domain_Db/Mysql_User_Domain_Db.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/User_Domain_Db/Mysql_User_Domain_Db.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/db/User_Domain_Db/Mysql_User_Domain_Db.object";
- ?><?php class Mysql_User_Domain_Db extends BaseObject { var $debug; var $user_domain_db; Function Mysql_User_Domain_Db( $db_config = '' ) { $this->BaseObject( 'Mysql_User_Domain_Db' ); $this->user_domain_db = new Mysql_Db(); if ( is_object( $db_config ) ) { $this->user_domain_db->db = $db_config; } $this->debug = new Debug(); $this->debug->prefix = 'Mysql_Db::Mysql_User_Domain'; $this->debug->Off(); $this->user_domain_db->debug->Off(); } Function InitDbConnection() { /* Make sure the database handle is available ( if not try to open it ) */ $returns = Array(); if ( $this->user_domain_db->connection_init == false) { $returns = $this->user_domain_db->CreateConnection(); } if ( $this->user_domain_db->connection_init == false ) { return array( false, 'Database not connected', $returns ); } return array( true ); } Function ListAll() { $this->debug->Message( 'Init connection' ); list( $ret_val, $reason ) = $this->InitDbConnection(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } $sql_util = new SqlUtil(); $get_domain = $this->user_domain_db->PrepareSql( $sql_util->SelectStatement( Array( 'domain_table' ), Array( 'domain_id', 'domain_name' ), '' ) ); $t_array = Array(); $t_cnt = 0; while( list( $domain_id, $domain_name ) = $get_domain->FetchRow() ) { $domain_obj = new User_Domain(); $domain_obj->domain_id = $domain_id; $domain_obj->domain_name = $domain_name; $t_array[ $t_cnt ] = $domain_obj; $t_cnt++; } return Array( true, $t_cnt, $t_array ); } Function Add( $domain_obj ) { $this->debug->Message( 'Init connection' ); list( $ret_val, $reason ) = $this->InitDbConnection(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } $sql_util = new SqlUtil(); $insert_domain = $this->user_domain_db->PrepareSql( $sql_util->InsertStatement( 'domain_table', Array( 'domain_id' => $domain_obj->domain_id, 'domain_name' => $domain_obj->domain_name ) ) ); list( $ret_val, $reason ) = $insert_domain->Exec(); if ( ! $ret_val ) { return Array( false, 'Insert to table failed.' ); } else { return Array( true ); } } Function Delete( $domain_id) { $this->debug->Message( 'Init connection' ); list( $ret_val, $reason ) = $this->InitDbConnection(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } $sql_util = new SqlUtil(); $delete_domain = $this->user_domain_db->PrepareSql( $sql_util->DeleteStatement( 'domain_table', 'domain_id = ' . $domain_id ) ); list( $ret_val, $reason ) = $delete_domain->Exec(); if ( ! $ret_val ) { return Array( false, 'Delete of domain failed.' ); } else { return Array( true ); } } Function Get( $domain_id ) { $this->debug->Message( 'Init connection' ); list( $ret_val, $reason ) = $this->InitDbConnection(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } $sql_util = new SqlUtil(); $get_domain = $this->user_domain_db->PrepareSql( $sql_util->SelectStatement( Array( 'domain_table' ), Array( 'domain_id', 'domain_name' ), 'domain_id = ' . $domain_id ) ); if ( ! ( list( $domain_id, $domain_name ) = $get_domain->FetchRow() ) ) { return Array( false, 'No match found.' ); } else { $domain_obj = new User_Domain(); $domain_obj->domain_id = $domain_id; $domain_obj->domain_name = $domain_name; return Array( true, $domain_obj ); } } Function Modify( $domain_obj ) { $this->debug->Message( 'Init connection' ); list( $ret_val, $reason ) = $this->InitDbConnection(); if ( $ret_val == false ) { $this->debug->Message( 'connect failed' ); return array( $ret_val, $reason ); } $sql_util = new SqlUtil(); $update_domain = $this->user_domain_db->PrepareSql( $sql_util->UpdateStatement( 'domain_table', Array( 'domain_name' => $domain_obj->domain_name ), 'domain_id = ' . $domain_obj->domain_id ) ); list( $ret_val, $reason ) = $update_domain->Exec(); if ( ! $ret_val ) { return Array( false, 'Update of domain failed.' ); } else { return Array( true ); } } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/User_Domain_Db/Dummy_User_Domain_Db.object" ] != 1 ) {
- /* ../prometheus-library/db/User_Domain_Db/Dummy_User_Domain_Db.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/User_Domain_Db/Dummy_User_Domain_Db.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/db/User_Domain_Db/Dummy_User_Domain_Db.object";
- ?><?php class Dummy_User_Domain_Db extends BaseObject { Function Dummy_User_Domain_Db() { $this->BaseObject( 'Dummy_User_Domain_Db' ); } Function InitDbConnection() {} Function ListAll() {} Function Add() {} Function Delete() {} Function Get() {} Function Modify() {} } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/User_Domain_Db/User_Domain_Db.object" ] != 1 ) {
- /* ../prometheus-library/db/User_Domain_Db/User_Domain_Db.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/db/User_Domain_Db/User_Domain_Db.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/db/User_Domain_Db/User_Domain_Db.object";
- ?><?php class User_Domain_Db extends BaseObject { Function User_Domain_Db() { $this->BaseObject( 'User_Domain_Db' ); } Function Db( $driver = '', $db_config = '' ) { $driver = strtolower( $driver ); switch( $driver ) { case 'mysql': return new Mysql_User_Domain_Db( $db_config ); default: return new Dummy_User_Domain_Db( $db_config ); } } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/Util/UrlObject.object" ] != 1 ) {
- /* ../prometheus-library/objects/Util/UrlObject.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/Util/UrlObject.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/Util/UrlObject.object";
- ?><?php class UrlObject extends BaseObject { var $deliminator; Function UrlObject() { $this->deliminator = '&'; } Function PostUrl( $base_url, $elements ) { $output_url = ''; $output_url = $base_url; if ( count( $elements ) > 0 ) { $first_elem = 0; if ( ! ereg( '?', $output_url ) ) { $output_url .= '?'; } else { $first_elem = 1; } while( list( $var, $value ) = each( $elements ) ) { if ( $first_elem != 0 ) { $output_url .= '&'; } $output_url .= $var . '=' . urlencode( $value ); $first_elem = 1; } } return $output_url; } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/Util/FileSizeObject.object" ] != 1 ) {
- /* ../prometheus-library/objects/Util/FileSizeObject.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/Util/FileSizeObject.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/Util/FileSizeObject.object";
- ?><?php class FileSizeObject extends BaseObject { var $file_size_in_bytes; var $file_size; Function FileSizeObject() { $this->BaseObject( 'FileSizeObject' ); $this->file_size_in_bytes = 0; $this->file_size = ''; } Function GetFileSize( $file ) { $this->file_size_in_bytes = filesize( $file ); } Function FormatFileSize( $filesize = -1 ) { if ( $filesize != -1 ) { $this->file_size_in_bytes = $filesize; } $this->file_size = ''; if ( $this->file_size_in_bytes >= 109951162776 ) { $this->file_size = number_format( ( $this->file_size_in_bytes / 109951162776 ), 2 ) . 't'; return $this->file_size; } if ( $this->file_size_in_bytes >= 1073741824 ) { $this->file_size = number_format( ( $this->file_size_in_bytes / 1073741824 ), 2 ) . 'g'; return $this->file_size; } if ( $this->file_size_in_bytes >= 1048576 ) { $this->file_size = number_format( ( $this->file_size_in_bytes / 1048576 ), 2 ) . 'm'; return $this->file_size; } if ( $this->file_size_in_bytes >= 1024 ) { $this->file_size = number_format( ( $this->file_size_in_bytes / 1024 ), 2 ) . 'k'; return $this->file_size; } $this->file_size = $this->file_size_in_bytes . 'b'; return $this->file_size; } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/Util/TextObject.object" ] != 1 ) {
- /* ../prometheus-library/objects/Util/TextObject.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/Util/TextObject.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/Util/TextObject.object";
- ?><?php class TextObject extends BaseObject { Function TextObject() { $this->BaseObject( 'TextObject' ); } Function WrapText( $text_to_wrap, $line_len = 80, $line_boundary = "n" ) { $my_lines = Array(); $my_lines = split( $line_boundary, $text_to_wrap ); for( $i = 0; $i < count( $my_lines ); $i++ ) { $my_lines[ $i ] = $this->WrapLine( $my_lines[ $i ], $line_len, $line_boundary ); } return join( "n", $my_lines ); } Function WrapLine( $text_to_wrap, $line_len = 80, $line_boundary = "n" ) { $text_len = strlen( $text_to_wrap ); if ( $text_len > $line_len ) { $all_words = Array(); $this_line = ''; $new_line = ''; $this_len = 0; $all_words = split( ' ', $text_to_wrap ); for( $i = 0; $i < count( $all_words ); $i++ ) { $cur_word = $all_words[ $i ]; $cur_word_len = strlen( $cur_word ); if ( ( $this_len + $cur_word_len ) > $line_len ) { $this_len = $line_len + 100; if ( $new_line != '' ) { $new_line .= ' '; } $new_line .= $cur_word; } else { if ( $this_line != '' ) { $this_line .= ' '; } $this_line .= $cur_word; $this_len = strlen( $this_line ); } } $this_line .= $line_boundary; $new_line = $this->WrapLine( $new_line, $line_len, $line_boundary ); return $this_line . $new_line; } else { return $text_to_wrap; } } Function PhpOptimize( $file_name ) { } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/Util/TemplateObject.object" ] != 1 ) {
- /* ../prometheus-library/objects/Util/TemplateObject.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/Util/TemplateObject.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/Util/TemplateObject.object";
- ?><?php class TemplateObject extends BaseObject { var $registered_tags; var $registered_files; var $template_var_start; var $template_var_end; var $with_php; var $return_contents; Function TemplateObject() { $this->BaseObject( 'TemplateObject' ); $this->registered_tags = Array(); $this->registered_files = Array(); $this->template_var_start = '[-'; $this->template_var_end = '-]'; $this->with_php = 0; $this->return_contents = 0; } Function Register( $tag, $value ) { if ( isset( $this->registered_files[ $tag ] ) ) { return false; } else { $this->registered_tags[ $tag ] = $value; return true; } } Function RegisterFile( $tag, $value ) { if ( isset( $this->registered_files[ $tag ] ) ) { return false; } else { $this->registered_files[ $tag ] = $value; return true; } } Function UnRegister( $tag ) { $t_array = Array(); $success = 0; reset( $this->registered_tags ); while( list( $key, $value ) = each( $this->registered_tags ) ) { if ( $key != $tag ) { $t_array[ $key ] = $value; } else { $success = 1; } } $this->registered_tags = $t_array; return $success; } Function UnRegisterFile( $tag ) { $t_array = Array(); $success = 0; reset( $this->registered_files ); while( list( $key, $value ) = each( $this->registered_files ) ) { if ( $key != $tag ) { $t_array[ $key ] = $value; } else { $success = 1; } } $this->registered_files = $t_array; return $success; } Function GetValue( $tag ) { if ( isset( $this->registered_tags[ $tag ] ) ) { return $this->registered_tags[ $tag ]; } if ( isset( $this->registered_files[ $tag ] ) ) { return $this->registered_files[ $tag ]; } return ''; } Function ParseTemplate( $file ) { if ( file_exists( $file ) ) { $file_contents = ''; if ( $file_contents = join( '', @file( $file ) ) ) { if ( count( $this->registered_files ) > 0 ) { reset( $this->registered_files ); while( list( $tag, $value ) = each( $this->registered_files ) ) { if ( file_exists( $value ) ) { $included_file = ''; if ( $included_file = join ( '', @file( $value ) ) ) { $file_contents = str_replace( $this->template_var_start . $tag . $this->template_var_end, $value, $included_file ); } } } } if ( count( $this->registered_tags ) > 0 ) { reset( $this->registered_tags ); while( list( $tag, $value ) = each( $this->registered_tags ) ) { $file_contents = str_replace( $this->template_var_start . $tag . $this->template_var_end, $value, $file_contents ); } } if ( $this->with_php == 1 ) { eval( '?>' . $file_contents ); } else { if ( $this->return_contents != 1 ) { echo( $file_contents ); } } if ( $this->return_contents == 1 ) { return $file_contents; } return 1; } else { return 0; } } else { return 0; } } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/WebClient/WebClientBrowser.object" ] != 1 ) {
- /* ../prometheus-library/objects/WebClient/WebClientBrowser.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/WebClient/WebClientBrowser.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/WebClient/WebClientBrowser.object";
- ?><?php class WebClientBrowser extends BaseObject { var $browser; var $version; var $tables; var $frames; var $layers; var $style_sheets; var $xml; var $images; var $forms; var $javascript; var $javascript_1; var $javascript_1_1; var $javascript_1_2; var $javascript_1_3; var $javascript_1_4; var $java; Function WebClientBrowser() { $this->BaseObject( 'WebClientBrowser' ); $this->browser = 'unknown'; $this->version = 'unknown'; $this->tables = 0; $this->frames = 0; $this->layers = 0; $this->style_sheets = 0; $this->xml = 0; $this->images = 0; $this->forms = 0; $this->javascript = 0; $this->javascript_1 = 0; $this->javascript_1_1 = 0; $this->javascript_1_2 = 0; $this->javascript_1_3 = 0; $this->javascript_1_4 = 0; $this->java = 0; } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/WebClient/WebClient_Lynx.object" ] != 1 ) {
- /* ../prometheus-library/objects/WebClient/WebClient_Lynx.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/WebClient/WebClient_Lynx.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/WebClient/WebClient_Lynx.object";
- ?><?php class WebClient_Lynx extends WebClientBrowser { Function WebClient_Lynx() { $this->BaseObject( 'WebClient_Lynx' ); $this->WebClientBrowser(); $this->browser = 'lynx'; $this->tables = 1; $this->forms = 1; } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/WebClient/WebClient_Ie_3.object" ] != 1 ) {
- /* ../prometheus-library/objects/WebClient/WebClient_Ie_3.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/WebClient/WebClient_Ie_3.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/WebClient/WebClient_Ie_3.object";
- ?><?php class WebClient_Ie_3 extends WebClientBrowser { Function WebClient_Ie_3() { $this->BaseObject( 'WebClient_Ie_3' ); $this->WebClientBrowser(); $this->browser = 'ie'; $this->tables = 1; $this->frames = 1; $this->images = 1; $this->forms = 1; $this->javascript = 1; $this->javascript_1 = 1; $this->javascript_1_1 = 1; $this->java = 1; } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/WebClient/WebClient_Ie_4.object" ] != 1 ) {
- /* ../prometheus-library/objects/WebClient/WebClient_Ie_4.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/WebClient/WebClient_Ie_4.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/WebClient/WebClient_Ie_4.object";
- ?><?php class WebClient_Ie_4 extends WebClientBrowser { Function WebClient_Ie_4() { $this->BaseObject( 'WebClient_Ie_4' ); $this->WebClientBrowser(); $this->browser = 'ie'; $this->tables = 1; $this->frames = 1; $this->images = 1; $this->forms = 1; $this->javascript = 1; $this->javascript_1 = 1; $this->javascript_1_1 = 1; $this->javascript_1_2 = 1; $this->layers = 1; $this->java = 1; } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/WebClient/WebClient_Ie_5.object" ] != 1 ) {
- /* ../prometheus-library/objects/WebClient/WebClient_Ie_5.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/WebClient/WebClient_Ie_5.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/WebClient/WebClient_Ie_5.object";
- ?><?php class WebClient_Ie_5 extends WebClientBrowser { Function WebClient_Ie_5() { $this->BaseObject( 'WebClient_Ie_5' ); $this->WebClientBrowser(); $this->browser = 'ie'; $this->tables = 1; $this->frames = 1; $this->images = 1; $this->forms = 1; $this->javascript = 1; $this->javascript_1 = 1; $this->javascript_1_1 = 1; $this->javascript_1_2 = 1; $this->layers = 1; $this->xml = 1; $this->java = 1; } } ?><?php } /* End if file is autoloaded */ ?><?php
- if ( $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/WebClient/WebClient_Netscape_3.object" ] != 1 ) {
- /* ../prometheus-library/objects/WebClient/WebClient_Netscape_3.object */
- $PHP_AUTO_LOADED_FILES[ "../prometheus-library/objects/WebClient/WebClient_Netscape_3.object" ] = 1;
- $PHP_AUTO_LOADED_FILES_ORDER[] = "../prometheus-library/objects/WebClient/WebClient_Netscape_3.object";
- ?><?php class WebClient_Netscape_3 extends WebClientBrowser { Function WebClient_Netscape_3() { $this->BaseObject( 'WebClient_Netscape_3' ); $this->WebClientBrowser(); $this->browser = 'netscape'; $this->tables = 1; $this->frames = 1; $this->images = 1; $this->forms = 1; $this->javascript = 1; $this->javascript_1 = 1; $this->java = 1; } } ?><?php } /* End if file is autoloaded */ ?><?php