3 * Base include file for library functions for AMS.
4 * Autoload function that loads the classes in case they aren't loaded yet.
6 function __ams_autoload( $className ){
9 //if the class exists in the lib's autload dir, load that one
10 if(file_exists( $AMS_LIB.'/autoload/' . strtolower ( $className ) . '.php')){
11 require_once 'autoload/' . strtolower ( $className ) . '.php';
13 //if the classname is WebUsers, use the sitebase location for the autoload dir.
14 if($className == "WebUsers"){
15 require_once $SITEBASE.'/autoload/' . strtolower ( $className ) . '.php';
19 spl_autoload_register( '__ams_autoload' );