some simple outline stuff atm
authorpaulr <me@pjr.cc>
Sun, 17 Apr 2011 17:16:59 +0000 (03:16 +1000)
committerpaulr <me@pjr.cc>
Sun, 17 Apr 2011 17:16:59 +0000 (03:16 +1000)
lib/config.php
lib/plugins/db.php [new file with mode: 0644]
var/sqlite3.sql

index 62a4502..8a98632 100644 (file)
@@ -1,7 +1,20 @@
 <?php
-if(!file_exists("../var/data/config.php")) {
-       // i am unconfigured
-} else {
-       require_once("../var/data/config.php");
+
+global $configured;
+$configured = false;
+
+if(file_exists("../var/config.php")) {
+       require_once("../var/config.php");
+       $configured = true;
+}
+
+if(file_eixsts("/var/glcas/config.php")) {
+       require_once("/var/glcas/config.php");
+       $configured = true;
+}
+
+if(file_eixsts("/etc/glcas/config.php")) {
+       require_once("/etc/glcas/config.php");
+       $configured = true;
 }
 ?>
\ No newline at end of file
diff --git a/lib/plugins/db.php b/lib/plugins/db.php
new file mode 100644 (file)
index 0000000..67c94a5
--- /dev/null
@@ -0,0 +1,2 @@
+<?php
+?>
\ No newline at end of file
index e69de29..c4b7b9f 100644 (file)
@@ -0,0 +1,2 @@
+create table data_components ( component_id INTEGER PRIMARY KEY AUTOINCREMENT, component_name text, component_version text);
+create table config_data (config_id INTEGER PRIMARY KEY AUTOINCREMENT, config_name text, config_data text);