13d5757f7bff6aba9f2cb6bd640ae68575ab6be5
[glcas.git] / lib / lib.php
1 <?php
2
3 require_once("config.php");
4 require_once("wsdl.php");
5
6 // first and foremost, load the plugins
7 $basedir = dirname(__FILE__);
8 if(is_dir("$basedir/plugins")) {
9         $dh = opendir("$basedir/plugins");
10         if($dh) {
11                 while(($file = readdir($dh))!==false) {
12                         $mt = preg_match("/.*\.php$/", $file);
13                         if($mt > 0) {
14                                 require_once("$basedir/plugins/$file");
15                                 //echo "required $basedir/plugins/$file\n";
16                         }
17                 }
18         }
19 } else {
20         echo "No plugins dir ($basedir/plugins), continuing without\n";
21 }
22
23
24 ?>