diff options
Diffstat (limited to 'htdocs')
-rw-r--r-- | htdocs/new-post.php | 5 | ||||
-rw-r--r-- | htdocs/postings.php | 1 | ||||
-rw-r--r-- | htdocs/src/Post.inc.php | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/htdocs/new-post.php b/htdocs/new-post.php index 273e864..8573bce 100644 --- a/htdocs/new-post.php +++ b/htdocs/new-post.php @@ -136,6 +136,7 @@ function finish_post() { $required = array( 'title' => 'Title', + 'location' => 'Location', 'description' => 'Description', 'email' => 'Email Address', 'email2' => 'Confirm Email Address', @@ -161,6 +162,7 @@ function finish_post() { $post->setEmail($values['email']); $post->setName($values['title']); $post->setDescription($values['description']); + $post->setLocation($values['location']); if ($post->save()) { return true; @@ -288,6 +290,7 @@ require_once "src/footer.inc.php"; function render_form($error="") { $title = isset($_POST['title']) ? $_POST['title'] : ''; + $location = isset($_POST['location']) ? $_POST['location'] : ''; $description = isset($_POST['description']) ? $_POST['description'] : ''; $email = isset($_POST['email']) ? $_POST['email'] : ''; $email2 = isset($_POST['email2']) ? $_POST['email2'] : ''; @@ -298,6 +301,8 @@ function render_form($error="") { echo "<p><label>Title: <input type=\"text\" name=\"title\" value=\"$title\" /></label></p>"; + echo "<p><label>Location: <input type=\"text\" name=\"location\" value=\"$location\" /></label></p>"; + echo "<p><label for=\"desc\">Description:</label></p>"; echo "<p><textarea name=\"description\" id=\"desc\" rows=\"10\"" . " cols=\"80\">$description</textarea></p>"; diff --git a/htdocs/postings.php b/htdocs/postings.php index a40cfb7..b69767e 100644 --- a/htdocs/postings.php +++ b/htdocs/postings.php @@ -53,6 +53,7 @@ echo "<h2>". $post->getName() ."</h2>"; echo "<p>Date: ". date('r', $post->getTimestamp()) ."</p>"; echo "<p>Email: <a href=\"mailto:". $post->getPublicEmail() ."\">" . $post->getPublicEmail() ."</a></p>"; +echo "<p>Location: ". $post->getLocation() ."</p>"; echo "<p class=\"desc\">". str_replace("\n", '<br />', $post->getDescription()) diff --git a/htdocs/src/Post.inc.php b/htdocs/src/Post.inc.php index 93b1369..9747d3f 100644 --- a/htdocs/src/Post.inc.php +++ b/htdocs/src/Post.inc.php @@ -233,6 +233,10 @@ class Post { return $this->info['location']; } + public function setLocation($value) { + $this->info['location'] = $value; + } + public function getImages() { if ($this->images == null) { $this->loadImages(); |