From 4364c76c16103870fb4a4cf6be9261871195c06f Mon Sep 17 00:00:00 2001
From: Jesse Morgan
Date: Thu, 2 Jun 2011 18:06:00 -0700
Subject: Added sources to post process
---
design/database.sql | 1 +
htdocs/new-post.php | 70 +++++++++++++++++++++++++++++++++++++++++++++----
htdocs/src/Post.inc.php | 22 ++++++++++++++++
3 files changed, 88 insertions(+), 5 deletions(-)
diff --git a/design/database.sql b/design/database.sql
index 8a19001..caecbeb 100644
--- a/design/database.sql
+++ b/design/database.sql
@@ -50,6 +50,7 @@ CREATE TABLE post (
secretid VARCHAR(32) NOT NULL,
source_id INTEGER UNSIGNED NOT NULL,
+ reason VARCHAR(255) NULL,
stage ENUM('verification',
'moderation',
'approved',
diff --git a/htdocs/new-post.php b/htdocs/new-post.php
index 7112a8c..d463d1a 100644
--- a/htdocs/new-post.php
+++ b/htdocs/new-post.php
@@ -57,8 +57,13 @@ switch ($stage) {
handle_images();
break;
- case 'finish':
+ case 'source':
if (finish_images())
+ handle_source();
+ break;
+
+ case 'finish':
+ if (finish_source())
handle_finish();
break;
@@ -100,12 +105,11 @@ function finish_category() {
function handle_tos() {
// Display ToS
- // TODO: Display ToS Here
-
form_start('post');
echo "";
+ ." I agree to the terms of service.
";
form_end();
}
@@ -176,7 +180,7 @@ function handle_images() {
// Display image form
echo "You may upload up to four images with your post.
";
- form_start('finish');
+ form_start('source');
for ($i = 1; $i <= MAX_IMAGE_UPLOADS; $i++) {
echo "