summaryrefslogtreecommitdiffstats
path: root/apis/getconfig.inc.php
diff options
context:
space:
mode:
authorJonathan Bauer2013-10-31 16:08:31 +0100
committerJonathan Bauer2013-10-31 16:08:31 +0100
commit26cba45b4a28fd94386d064780a1daffbb351f7a (patch)
treeb33f9261dedf58e7aee50ad9dc6079a957c87a1f /apis/getconfig.inc.php
parentUpdate sql creation statements aswell (diff)
downloadslx-admin-26cba45b4a28fd94386d064780a1daffbb351f7a.tar.gz
slx-admin-26cba45b4a28fd94386d064780a1daffbb351f7a.tar.xz
slx-admin-26cba45b4a28fd94386d064780a1daffbb351f7a.zip
Tolle neue APIs Sachen
Diffstat (limited to 'apis/getconfig.inc.php')
-rw-r--r--apis/getconfig.inc.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/apis/getconfig.inc.php b/apis/getconfig.inc.php
new file mode 100644
index 00000000..a3d2bd91
--- /dev/null
+++ b/apis/getconfig.inc.php
@@ -0,0 +1,9 @@
+<?php
+
+$res = Database::simpleQuery('SELECT setting.setting, setting.defaultvalue, setting.permissions, setting.description, tbl.value
+ FROM setting
+ LEFT JOIN setting_global AS tbl USING (setting)
+ ORDER BY setting ASC'); // TODO: Add setting groups and sort order
+while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ echo $row['setting'] . "='" . str_replace("'", "'\"'\"'", $row['value']) . "'\n";
+}