diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-01-22 20:38:36 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-01-22 20:38:36 +0000 |
commit | 5345bd685e3e372cdce0f6131dbb15b2e80030df (patch) | |
tree | e69e15ae8a6ddf89f09520b1f2c33647ac66b2ef | |
parent | 2c32276ddb3feb955051327f9fb51c7e59021d42 (diff) | |
download | brdo-5345bd685e3e372cdce0f6131dbb15b2e80030df.tar.gz brdo-5345bd685e3e372cdce0f6131dbb15b2e80030df.tar.bz2 |
- dumped stories are no longer accessible
-rw-r--r-- | story.php | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -7,14 +7,18 @@ function story_render($id, $cid) { // Compose story query: $result = db_query("SELECT s.*, u.userid FROM stories s LEFT JOIN users u ON s.author = u.id WHERE s.status != 0 AND s.id = $id"); - $story = db_fetch_object($result); - + // Display story: - if ($story->status == 1) $theme->article($story, "[ <A HREF=\"submission.php\"><FONT COLOR=\"$theme->hlcolor2\">submission queue</FONT></A> | <A HREF=\"story.php?op=reply&id=$story->id&pid=0\"><FONT COLOR=\"$theme->hlcolor2\">add a comment</FONT></A> ]"); - else $theme->article($story, "[ <A HREF=\"\"><FONT COLOR=\"$theme->hlcolor2\">home</FONT></A> | <A HREF=\"story.php?op=reply&id=$story->id&pid=0\"><FONT COLOR=\"$theme->hlcolor2\">add a comment</FONT></A> ]"); + if ($story = db_fetch_object($result)) { + if ($story->status == 1) $theme->article($story, "[ <A HREF=\"submission.php\"><FONT COLOR=\"$theme->hlcolor2\">submission queue</FONT></A> | <A HREF=\"story.php?op=reply&id=$story->id&pid=0\"><FONT COLOR=\"$theme->hlcolor2\">add a comment</FONT></A> ]"); + else $theme->article($story, "[ <A HREF=\"\"><FONT COLOR=\"$theme->hlcolor2\">home</FONT></A> | <A HREF=\"story.php?op=reply&id=$story->id&pid=0\"><FONT COLOR=\"$theme->hlcolor2\">add a comment</FONT></A> ]"); - // Display comments: - comment_render($id, $cid); + // Display comments: + comment_render($id, $cid); + } + else { + $theme->box("Warning message", "The story you requested is no longer available or does not exist."); + } } switch($op) { |