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