summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2010-12-10 20:57:34 +1100
committerSavetheinternet <savetheinternet@n0v4.com>2010-12-10 20:57:34 +1100
commitb5a4377e09176c171bd3c233d6a067548fb528ba (patch)
tree02fe83035bbdc038eae7c9d76d881d2858c67637
parent0df2dfd6d5ba6b298b12568d5d4daf4ebfeb89fb (diff)
Config page
-rw-r--r--mod.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/mod.php b/mod.php
index a00d5ac8..05b4b491 100644
--- a/mod.php
+++ b/mod.php
@@ -56,11 +56,29 @@
// TODO: Statistics, etc, in the dashboard.
- $body .= '<fieldset><legend>Configuration</legend>' . highlight_file('inc/instance-config.php', true) . '</fieldset>';
-
echo Element('page.html', Array(
'index'=>ROOT,
'title'=>'Dashboard',
+ 'body'=>$body
+ //,'mod'=>true /* All 'mod' does, at this point, is put the "Return to dashboard" link in. */
+ )
+ );
+ } elseif(preg_match('/^\/config$/', $query)) {
+ if($mod['type'] != MOD_ADMIN) error(ERROR_NOACCESS);
+
+ // Show instance-config.php
+
+ $data = highlight_file('inc/instance-config.php', true);
+ if(MOD_NEVER_REAL_PASSWORD) {
+ // Rough and dirty removal of password
+ $data = str_replace(MY_PASSWORD, '*******', $data);
+ }
+
+ $body = '<fieldset><legend>Configuration</legend>' . $data . '</fieldset>';
+
+ echo Element('page.html', Array(
+ 'index'=>ROOT,
+ 'title'=>'Configuration',
'body'=>$body,
'mod'=>true
)