diff options
Diffstat (limited to 'utils/modules/config.php')
-rw-r--r-- | utils/modules/config.php | 28 |
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; } } |