$title = $_POST['title']; $content = $_POST['editor']; $spacialChars = array(" ", "/", "\\", "?", ".", ",", "#"); $slug = str_replace($spacialChars, "-", $_POST['slug']); if (!empty($_POST['pageId'])) { $result = $page->updatePage($_POST['pageId'], $content, $title, $slug, $status); } else { $result = $page->addNewPage($content, $title, $slug); } if (isset($result['qid'])) { $page->populatPage($result['qid']); } } if (isset($_GET['pid'])) { $pid = $_GET['pid']; $page = Page::getPageById($pid); $oldtitel = $page->title; $oldcontent = $page->content; } get_top_nav(); //Call the navigation ?> <div id="wrap"> <div id="widecb"> <div id="additemnav"> <ul> <li><a href="" title=""><?php _e('About the network'); ?> </a></li>
function editPage() { $data = Page::getPageById($_POST['page_id']); include 'templates/editPage.php'; }