Moving the old code aside into the archive as i begin a new
[glcas.git] / archive / v1 / lib / config.php
diff --git a/archive/v1/lib/config.php b/archive/v1/lib/config.php
new file mode 100644 (file)
index 0000000..272e641
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+
+global $configured, $BASE_DIR, $DB_HANDLE;
+$configured = false;
+$DB_HANDLE = false;
+
+$BASE_DIR = realpath(dirname(__FILE__)."/../");
+
+global $BASE_DIR;
+
+
+if(file_exists("../var/config.php")) {
+       require_once("../var/config.php");
+       $configured = true;
+}
+
+if(file_exists("/var/glcas/config.php")) {
+       require_once("/var/glcas/config.php");
+       $configured = true;
+}
+
+if(file_exists("/etc/glcas/config.php")) {
+       require_once("/etc/glcas/config.php");
+       $configured = true;
+}
+?>
\ No newline at end of file