/* * addnewpage.php * * Copyright 2010 Nitzan Brumer <nitzan@taz> */ $page = new Page(); if (isset($_POST['subdelbanned'])) { $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 ?>