* */ require_once "src/base.inc.php"; require_once "src/header.inc.php"; // Make sure we had a path info if (!isset($_SERVER['PATH_INFO'])) { errorNotFound(); } // Clean up the id in the path info. $id = substr($_SERVER['PATH_INFO'], 1, strpos($_SERVER['PATH_INFO'], '.') - 1); if (!is_numeric($id)) { errorNotFound(); } // Get the post. $post = Post::getById($id); if (!$post or (!isset($_GET['moderate']) and $post->getStage() != 'approved')) { errorNotFound(); } if (isset($_GET['moderate'])) { if (!isset($_SESSION['currentUser'])) { header('Location: ' . $CONFIG['urlroot'].'/moderate/login.php'); exit(); } echo "
Date: ". date('r', $post->getTimestamp()) ."
"; echo "Email: getPublicEmail() ."\">" . $post->getPublicEmail() ."
"; echo "Location: ". $post->getLocation() ."
"; echo "".
str_replace("\n", '
', $post->getDescription())
."