<?php
+$BASE_DIR = realpath(dirname(__FILE__)."/../");
+
+$DB_HANDLE = false;
+global $BASE_DIR, $HOST_TYPES, $DB_HANDLE;
+
+// require some files
+require_once("www.php");
+require_once("db.php");
+require_once("xmlrpc.php");
+
+// get the config
+if(file_exists("../etc/config.php")) require_once("../etc/config.php");
+
+// first and foremost, load the plugins
+$basedir = dirname(__FILE__);
+
+// we load this first
+if(is_dir("$basedir")) {
+ $dh = opendir("$basedir");
+ if($dh) {
+ while(($file = readdir($dh))!==false) {
+ $mt = preg_match("/.*\.plugin\.php$/", $file);
+ if($mt > 0) {
+ require_once("$basedir/$file");
+ //echo "required $basedir/$file\n";
+ }
+ }
+ }
+}
?>
\ No newline at end of file