summaryrefslogtreecommitdiff
path: root/utils/modules
diff options
context:
space:
mode:
authordeva <deva>2010-02-13 15:31:39 +0000
committerdeva <deva>2010-02-13 15:31:39 +0000
commitde27f1f5868ff837bab30b2131a3f67541b3c4a2 (patch)
tree5d675b7057516a6f0ea072ddd7182eacad30b234 /utils/modules
parent97263581103c133b29f4c3a826232e2cf5dacc88 (diff)
Add splash parameters to config.
Diffstat (limited to 'utils/modules')
-rw-r--r--utils/modules/config.php28
1 files changed, 27 insertions, 1 deletions
diff --git a/utils/modules/config.php b/utils/modules/config.php
index d25961a..0938906 100644
--- a/utils/modules/config.php
+++ b/utils/modules/config.php
@@ -13,7 +13,8 @@ class Config {
// Admin config
public $admin_title = "Site Config";
public $admin_submodules = array("Title" => "title",
- "Menu" => "menu");
+ "Menu" => "menu",
+ "Splash" => "splash");
public function admin_title($action, $vars)
{
@@ -33,6 +34,28 @@ class Config {
}
}
+ public function admin_splash($action, $vars)
+ {
+ switch($action) {
+ case "update":
+ $this->setValue("splash", $vars["splash"]);
+ $this->setValue("splashpage", $vars["splashpage"]);
+ $this->setValue("splashreshow", $vars["splashreshow"]);
+ echo "Splash has now been updated.";
+ $this->write();
+ break;
+
+ default:
+ $form = new Form("update");
+ $form->addWidget(new LineEdit("Splash:", "splash", $this->value("splash", "false")));
+ $form->addWidget(new LineEdit("Splash page:", "splashpage", $this->value("splashpage", "splash")));
+ $form->addWidget(new LineEdit("Splash reshow:", "splashreshow", $this->value("splashreshow", "3600")));
+ $form->addWidget(new Button("Update"));
+ $form->render();
+ break;
+ }
+ }
+
public function admin_menu($action, $vars)
{
switch($action) {
@@ -70,6 +93,9 @@ class Config {
case "menu":
$this->admin_menu($action, $vars);
break;
+ case "splash":
+ $this->admin_splash($action, $vars);
+ break;
}
}