diff options
Diffstat (limited to 'utils/modules')
-rw-r--r-- | utils/modules/config.php | 24 | ||||
-rw-r--r-- | utils/modules/pages.php | 2 |
2 files changed, 14 insertions, 12 deletions
diff --git a/utils/modules/config.php b/utils/modules/config.php index a7068ef..4afb264 100644 --- a/utils/modules/config.php +++ b/utils/modules/config.php @@ -35,22 +35,24 @@ class Config { { switch($action) { case "update": - $this->setValue("menu", array("news" => "News", - "shop" => "Shop", - "downloads" => "Downloads", - "biography" => "Biography", - "live" => "Concerts", - "discography" => "Discography", - "guestbook" => "Guestbook", - "members" => "Members", - "gallery" => "Gallery", - "contact" => "Contact")); + global $menulist; + $menu = ListEditor::splitValues($menulist); + $this->setValue("menu", $menu); $this->write(); break; default: + global $config; + global $pages; + $pagetitles = array(); + foreach($pages->pages as $page) { + $pagetitles[$page->title] = $page->title; + } $form = new Form("update"); - echo "Coming soon!"; + $form->addWidget(new ListEditor("Menu items", "menulist", + new LineEdit("Title", "title"), + new ComboBox("Page", "page", "", $pagetitles), + $config->value("menu"))); $form->addWidget(new Button("Update")); $form->render(); break; diff --git a/utils/modules/pages.php b/utils/modules/pages.php index a3979d3..d69b9e9 100644 --- a/utils/modules/pages.php +++ b/utils/modules/pages.php @@ -53,7 +53,7 @@ class Page { class Pages { private $file; - private $pages = array(); + public $pages = array(); // Admin config public $admin_title = "Pages"; |