From e61cd160107544d2437827e7fda59450c4dca2c6 Mon Sep 17 00:00:00 2001
From: jesse
Date: Thu, 26 May 2011 14:38:46 -0700
Subject: Added accept/reject emails. Still working on new post flow
---
htdocs/new-post.php | 39 +++++++++++++++++++++++++--------------
1 file changed, 25 insertions(+), 14 deletions(-)
(limited to 'htdocs/new-post.php')
diff --git a/htdocs/new-post.php b/htdocs/new-post.php
index 4181b07..ea7c0b2 100644
--- a/htdocs/new-post.php
+++ b/htdocs/new-post.php
@@ -155,7 +155,12 @@ function finish_post() {
$post->setName($values['title']);
$post->setDescription($values['description']);
- return true;
+ if ($post->save()) {
+ return true;
+
+ } else {
+ $error .= 'An internal error has occured.';
+ }
}
handle_post($error);
@@ -165,17 +170,23 @@ function finish_post() {
function handle_images() {
$post = $_SESSION['newpost'];
- // Save Post
- if (!$post->save()) {
- $error .= "An internal error has occured.";
- }
-
// Display image form
+ echo "You may upload up to four images with your post.
";
+ form_start('finish');
+
+ for ($i = 1; $i <= 4; $i++) {
+ echo "Image $i: "
+ . "
";
+ }
+
+ form_end();
}
function finish_images() {
+ $post = $_SESSION['newpost'];
+ return true;
}
function handle_finish() {
@@ -185,14 +196,13 @@ function handle_finish() {
$post->sendValidation();
// Display confirmation message
- // TODO: Revise wording of confirmation message.
- echo "Your posting is awaiting email verification
";
+ echo "Your posting is almost complete. You must verify your email address by visiting the link we have emailed you, then your posting will be reviewed by our moderation team.
";
}
function form_start($stage) {
echo "
";
- echo "Email Address: "
+ echo "Email Address: "
. " ";
- echo " Confirm Email: "
- . "
";
+ echo " Confirm Email: "
+ . "
"
+ . "Your email address will only be visible to our moderators.
";
}
--
cgit v1.2.3