2013-06-06 06:04:46 +00:00
|
|
|
<?php
|
2013-09-13 22:39:03 +00:00
|
|
|
/**
|
|
|
|
* Base include file for library functions for AMS.
|
|
|
|
* Autoload function that loads the classes in case they aren't loaded yet.
|
|
|
|
*/
|
2013-06-06 06:04:46 +00:00
|
|
|
function __autoload( $className ){
|
2013-09-09 01:47:32 +00:00
|
|
|
global $AMS_LIB;
|
|
|
|
global $SITEBASE;
|
2013-09-12 22:27:49 +00:00
|
|
|
//if the class exists in the lib's autload dir, load that one
|
2013-09-09 01:47:32 +00:00
|
|
|
if(file_exists( $AMS_LIB.'/autoload/' . strtolower ( $className ) . '.php')){
|
2013-08-11 01:55:07 +00:00
|
|
|
require_once 'autoload/' . strtolower ( $className ) . '.php';
|
|
|
|
}
|
2013-09-12 22:27:49 +00:00
|
|
|
//if the classname is WebUsers, use the sitebase location for the autoload dir.
|
2013-09-09 01:47:32 +00:00
|
|
|
if($className == "WebUsers"){
|
2013-09-12 22:27:49 +00:00
|
|
|
require_once $SITEBASE.'/autoload/' . strtolower ( $className ) . '.php';
|
2013-06-17 05:57:09 +00:00
|
|
|
}
|
2013-09-09 01:47:32 +00:00
|
|
|
}
|
|
|
|
|
2013-06-06 06:04:46 +00:00
|
|
|
|