4 * The Main lib.php file.
10 // get the lib root, and set include path from it
11 $LIB_ROOT_FS = realpath(dirname(__FILE__));
15 * I shouldnt ever need to do this bit, but its here, just in case
16 $adpath = realpath($LIB_ROOT_FS."/../");
17 error_log("added libglcas path as $adpath");
18 set_include_path(get_include_path().PATH_SEPARATOR.$adpath);
21 require_once("libcbfwr/config.php");
22 require_once("libcbfwr/comms.php");
24 function glcas_pluginLoader($path="")
29 $plpath = realpath($LIB_ROOT_FS."/../plugins/");
30 if(file_exists($plpath."/plugin.php")) {
31 // here it is, load away
32 error_log("attempting to load plugins from $plpath");
33 $dh = opendir("$plpath");
35 while(($file = readdir($dh))!==false) {
36 $mt = preg_match("/.*.php$/", $file);
38 error_log("loading plugin $file");
39 require_once("$plpath/$file");
40 //echo "required $basedir/$file\n";