"; exit(); } $thread = getThread($post->thread); if ($action=="hide"){ $result=mysql_query("update post set hidden = ".post_int("category")." where id=".$post->id); echo mysql_error(); } elseif ($action=="unhide"){ $result=mysql_query("update post set hidden = 0 where id=".$post->id); echo mysql_error(); } elseif ($action=="move"){ if (getThread(post_int('threadid'))){ $result=mysql_query("update post set thread = ".post_int('threadid')." where id=".$post->id); echo mysql_error(); //TODO: correct the number of posts in this thread //TODO: correct the number of posts in destination thread } else { echo "Destination not found, please check and try again."; exit(); } } else { echo "Unknown action "; exit(); } if ($result) { echo mysql_error(); if (post_str('reason', true)){ send_moderation_email(lookup_user_id($post->user),$thread, $post, post_str("reason")); } header('Location: forum_thread.php?id='.$thread->id); } else { page_head("Moderation update"); echo "Couldn't moderate the post.
\n"; echo mysql_error(); page_tail(); } ?>