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);
25 require_once("libcbfwr/config.php");
26 require_once("libcbfwr/comms.php");
27 require_once("libcbfwr/web.php");
28 require_once("libcbfwr/fwui.php");
31 function glcas_pluginLoader($path="")
36 $plpath = realpath($LIB_ROOT_FS."/../plugins/");
37 if(file_exists($plpath."/plugin.php")) {
38 // here it is, load away
39 error_log("attempting to load plugins from $plpath");
40 $dh = opendir("$plpath");
42 while(($file = readdir($dh))!==false) {
43 $mt = preg_match("/.*.php$/", $file);
45 error_log("loading plugin $file");
46 require_once("$plpath/$file");
47 //echo "required $basedir/$file\n";