<?php
+// first and foremost, load the plugins
+$basedir = dirname(__FILE__);
+if(is_dir("$basedir/plugins")) {
+ $dh = opendir("$basedir/plugins");
+ if($dh) {
+ while(($file = readdir($dh))!==false) {
+ $mt = preg_match("/.*\.php$/", $file);
+ if($mt > 0) {
+ require_once("$basedir/plugins/$file");
+ //echo "required $basedir/plugins/$file\n";
+ }
+ }
+ }
+} else {
+ echo "No plugins dir ($basedir/plugins), continuing without\n";
+}
?>
\ No newline at end of file