////////////////////////////////////////////////////////////////////////////////
// Script Name : global_include
// File Name : global_include.php
// Date Created : 07/12/14
// Author : Robert Hartford
// Date Modified: -
// Modified By : -
// Description : Includes all PHP scripts required for application to run, also
// sets any global variables that the application should have
// before the script is loaded, also pre-starts some functions
// that need to be loaded before the rest of the app (ie session)
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Constants: Change the settings below to adjust the settings for this script.
// Verify the settings below before attempting to use this script.
////////////////////////////////////////////////////////////////////////////////
// These settings define the connection settings for the shared database
// object, any time a new database object is created it will use these
// settings as the defaults unless it is told otherwise during intialization
$GLOBALS['DB_SERV'] = "server";
$GLOBALS['DB_USER'] = "allstat2_logon";
$GLOBALS['DB_PASS'] = "acs1603";
$GLOBALS['DB_DATABASE'] = "allstat2_psa";
// DB Settings for ACS Server
if (($_SERVER['SERVER_NAME'] == 'acserver02.net') or ($_SERVER['SERVER_NAME'] == 'www.acserver02.net'))
{
$GLOBALS['DB_SERV'] = "localhost";
$GLOBALS['DB_USER'] = "acserver_psa";
$GLOBALS['DB_PASS'] = "acs1603!";
$GLOBALS['DB_DATABASE'] = "acserver_psa";
}
// These settings define the name of the session cookie and how long the
// cookie should last or be renewed for when a page is loaded (in seconds)
// The name variable can only contain alpha-numeric, and less than 10 chars
$GLOBALS['SESS_NAME'] = "PSASESSION";
$GLOBALS['SESS_TIME'] = 300;
// Comment out the line below to disable debugging messages
$GLOBALS['DEBUG_MODE'] = false;
// - End Constants - ///////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Required Files: All PHP scripts that need to be included for the application
// to function properly should be included here. Individual PHP
// files should not be doing includes of any of the files below
// unless they require another module to be loaded before they
// are loaded (ie class overloading / extension / nesting) if
// they require another file loaded before the module is loaded
// it should be loaded with the require_once() function to
// prevent PHP from loading the module more than once.
//
// The two OB_ lines are required to ensure that any of the
// included files do not output anything to the browser before
// the session can initialize the session cookie. Files should
// only be included between the two OB_ lines. Any output or
// white space inside the included files will be ignored and
// will not be sent to the browser, this will not effect any
// output statements inside of functions in these files.
////////////////////////////////////////////////////////////////////////////////
ob_start(); // !! DO NOT REMOVE !! DO NOT INCLUDE FILES BEFORE THIS LINE!
require_once('sessionhandler.php');
require_once('commonfunctions.php');
require_once('database.php');
require_once('encryption.php');
require_once('logging.php');
require_once('timeclock.php');
require_once('mastertables.php');
require_once('asset.php');
require_once('contact.php');
require_once('addresslocation.php');
require_once('phonenumber.php');
require_once('account.php');
require_once('note.php');
require_once('password.php');
require_once('paymentmethods.php');
require_once('uploadhandler.php');
require_once('taxes.php');
require_once('item.php');
require_once('calendarsync.php');
require_once('tasksync.php');
require_once('serviceorder.php');
require_once('emailsend.php');
require_once('quote.php');
require_once('manufacturers.php');
require_once('unitsofmeasure.php');
require_once('orderlist.php');
require_once('vendors.php');
require_once('accounting.php');
require_once('printabletemplate.php');
require_once('inventory.php');
require_once('orderlist.php');
// include logon system last
require_once('logonsystem.php');
ob_end_clean(); // !! DO NOT REMOVE !! DO NOT INCLUDE FILES AFTER THIS LINE!
// - End Required Files - //////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Autorun Functions: Commands / functions in this section are automatically run
// on each page load to ensure that certain things are always
// setup (sessions, database connection, etc) every page load
////////////////////////////////////////////////////////////////////////////////
// Start output buffering to ensure session is setup correctly
ob_start();
// Create a new session object
$GLOBALS['SESSIONHANDLER'] = new ACSSessionHandler();
// Start the session cookie on the client and renew the timer if session
// is already started
$GLOBALS['SESSIONHANDLER'] -> StartSession($GLOBALS['SESS_TIME'],
$GLOBALS['SESS_NAME']);
// Create a new logon system object
$GLOBALS['LOGONSYSTEM'] = new LogonSystem();
// Check to see if access to the page is granted
$GLOBALS['LOGONSYSTEM'] -> ValidatePageAccess();
// Session has been started / destroyed correctly we can now output
// anything that was stored in the buffer
ob_end_flush();
// Start the connection to the database and create global database object
$GLOBALS['DATABASE'] = new DataBase();
// - End Autorun Functions - ///////////////////////////////////////////////////
Warning: Undefined global variable $LOGONSYSTEM in /home/acserver/acserver02.net/html/brian/index.php on line 8
Fatal error: Uncaught Error: Call to a member function SetLogonPageURL() on null in /home/acserver/acserver02.net/html/brian/index.php:8
Stack trace:
#0 {main}
thrown in /home/acserver/acserver02.net/html/brian/index.php on line 8