function action_view($pages) { //require_once ( $GLOBALS["setting"]["SCRIPT_PATH"].$GLOBALS["setting"]["CLASS_PATH"] . "/bd/pages.php" ); print_r($pages); $results = array(); $results['article'] = Pages::getById((int) '1'); $results['pageTitle'] = "Здвинская ЦБС"; $results['description'] = $results['article']->description; //$this->view->generate("/pageViews",$results); }
function delete() { if (!$GLOBALS['authentication']) { header("Location: index.php?admin=login"); } if (!($article = Pages::getById((int) $_GET['id']))) { header("Location:index.php?pages=admin&error=articleNotFound"); return; } $article->delete(); header("Location:index.php?pages=admin&status=articleDeleted"); }