summaryrefslogtreecommitdiff
path: root/submit.php
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2000-07-12 07:15:09 +0000
committerDries Buytaert <dries@buytaert.net>2000-07-12 07:15:09 +0000
commit75129c1fdda7585d16fe27e35bac8018bd8cfbee (patch)
tree0f4515fc57efbc73fc726857b2972747017d17af /submit.php
parentbabf1a7de6f8e2d782ba605347cfd37d1b70e3a6 (diff)
downloadbrdo-75129c1fdda7585d16fe27e35bac8018bd8cfbee.tar.gz
brdo-75129c1fdda7585d16fe27e35bac8018bd8cfbee.tar.bz2
Bugfixes:
(1) fixed SQL bug in search.php. (2) fixed SQL bug in discussion.php. (3) fixed theme-bug in submit.php. (4) fixed theme-bug in discussion.php. (5) fixed Dries2-theme: it more or less works now though I still have to change the look/layout. Important: (3) and (4) did fix the i-suddenly-seem-to-log-out behavior.
Diffstat (limited to 'submit.php')
-rw-r--r--submit.php18
1 files changed, 6 insertions, 12 deletions
diff --git a/submit.php b/submit.php
index 87c369207..f94e17b6b 100644
--- a/submit.php
+++ b/submit.php
@@ -1,11 +1,8 @@
<?PHP
function submit_enter() {
- include "functions.inc";
- include "theme.inc";
+ global $user, $theme;
- global $user;
-
### Guidlines:
$output .= "<P>Got some news or some thoughts you would like to share? Fill out this form and they will automatically get whisked away to our submission queue where our moderators will frown at it, poke at it and hopefully post it. Every registered user is automatically a moderator and can vote whether or not your sumbission should be carried to the front page for discussion.</P>\n";
$output .= "<P>Note that we do not revamp or extend your submission so it is up to you to make sure your submission is well-written: if you don't care enough to be clear and complete, your submission is likely to be moderated down by our army of moderators. Try to be complete, aim for clarity, organize and structure your text, and try to carry out your statements with examples. It is also encouraged to extend your submission with arguments that flow from your unique intellectual capability and experience: offer some insight or explanation as to why you think your submission is interesting. Make sure your submission has some meat on it!</P>\n";
@@ -59,10 +56,7 @@ function submit_enter() {
}
function submit_preview($subject, $abstract, $story, $category) {
- global $user;
-
- include "functions.inc";
- include "theme.inc";
+ global $user, $theme;
$output .= "<FORM ACTION=\"submit.php\" METHOD=\"post\">\n";
@@ -131,10 +125,7 @@ function submit_preview($subject, $abstract, $story, $category) {
}
function submit_submit($subject, $abstract, $article, $category) {
- global $user;
-
- include "functions.inc";
- include "theme.inc";
+ global $user, $theme;
### Add submission to SQL table:
db_query("INSERT INTO stories (author, subject, abstract, article, category, timestamp) VALUES ('$user->id', '". addslashes($subject) ."', '". addslashes($abstract) ."', '". addslashes($article) ."', '". addslashes($category) ."', '". time() ."')");
@@ -151,6 +142,9 @@ function submit_submit($subject, $abstract, $article, $category) {
}
}
+include "functions.inc";
+include "theme.inc";
+
switch($op) {
case "Preview submission":
submit_preview($subject, $abstract, $story, $category);