"; exit(); } $post = getPost($_GET['id']); $thread = getThread($post->thread); if ($logged_in_user->id != $post->user) { // Can't edit other's posts. echo "You are not authorized to edit this post."; exit(); } updatePost($post->id, $_POST['content']); if ($post->parent_post==0 and $thread->owner==$logged_in_user->id){ updateThread($thread->id, $_POST['title']); } header('Location: thread.php?id='.$thread->id); } page_head('Forum', $logged_in_user); if (!empty($_GET['id'])) { $post = getPost($_GET['id']); $thread = getThread($post->thread); $forum = getForum($thread->forum); $category = getCategory($forum->category); } else { // TODO: Standard error page echo "No post was specified.
"; exit(); } if ($logged_in_user->id != $post->user) { // Can't edit other's posts. echo "You are not authorized to edit this post."; exit(); } show_forum_title($forum, $thread, $category->is_helpdesk); echo "
id, "\" method=\"POST\">"; start_forum_table(array("Edit Your Post"), array(NULL), 2); if ($post->parent_post==0 and $thread->owner==$logged_in_user->id) { //If this is the first post enable the user to change title echo " Thread title title)."\"> " ; }; echo " Message content "; end_forum_table(); echo "
"; page_tail(); ?>