diff --git a/html/forum/reply.php b/html/forum/reply.php index 9fef9cb15b..38558fcec5 100644 --- a/html/forum/reply.php +++ b/html/forum/reply.php @@ -3,25 +3,40 @@ require_once('../include.php'); require_once('forum.inc'); require_once('../util.inc'); -if (!empty($_GET['id']) && !empty($_POST['content'])) { - $_GET['id'] = stripslashes(strip_tags($_GET['id'])); +if (!empty($_GET['thread']) && !empty($_POST['content'])) { + $_GET['thread'] = stripslashes(strip_tags($_GET['thread'])); + + if (!empty($_GET['post'])) { + $parent_post = $_GET['post']; + } else { + $parent_post = NULL; + } //$user = getUserByAuth($_SESSION['authenticator']); $user = get_logged_in_user(true); - $thread = getThread($_GET['id']); - $thread->reply($user->id, $_POST['content']); + $thread = getThread($_GET['thread']); + $thread->reply($user->id, $_POST['content'], $parent_post); header('Location: thread.php?id='.$thread->id); } if (empty($_SESSION['authenticator'])) - header('Location: ../login_form.php'); + get_logged_in_user(true, '../'); + doHeader('Forum'); -$thread = getThread($_GET['id']); +if (!empty($_GET['post'])) { + $postId = $_GET['post']; +} else { + $postId = -1; +} +$thread = getThread($_GET['thread']); $forum = getForum($thread->forum); + +$logged_in_user = get_logged_in_user(true); + ?>

@@ -29,25 +44,6 @@ $forum = getForum($thread->forum);
Forum -> title ?>

-

-

- - - - - - - - - - - -
Reply to Thread / Question
Message content
- -
-
-

-

@@ -55,7 +51,9 @@ $forum = getForum($thread->forum); getPosts(); while ($post = getNextPost($posts)): $user = getUser($post->user); @@ -63,7 +61,9 @@ $forum = getForum($thread->forum); - - +

Posted: timestamp) ?>

+

content)) ?>

+ + id == $postId) { + show_message_row($thread, $post); + } ?> + +
Message

+ has_profile) { ?> name ?> + name; } ?>

Joined: create_time) ?> @@ -71,17 +71,64 @@ $forum = getForum($thread->forum);

-

Posted: timestamp) ?>

-

content)) ?>

-
-

+

+ + + + +

+ "; + + if ($logged_in_user->has_profile) { + echo "id, "\">", $logged_in_user->name, ""; + } else { + echo $logged_in_user->name; + } + + echo " +

+

+Joined: ", date('M j, Y', $logged_in_user->create_time), " +

+ + +

Your Message

+
+

+

+
+ "; + + echo ""; +} + +?> \ No newline at end of file