/** * Редактирование страницы: */ public function staticEditAction(Application $application, Template $template) { if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_POST['old_page'] != $_POST['page']) { StaticModel::RemovePage($_POST['old_page']); } StaticModel::SetPage($_POST['page'], $_POST['title'], $_POST['content'], $_POST['published']); $template->headerSeeOther('http://' . TemplateHelper::getSiteUrl() . '/admin/staticEdit?page=' . $_POST['page']); exit; } $template->setParameter('menu', 'static'); $this['page'] = StaticModel::GetPage($_GET['page']); return true; }