db_Select_gen($qry)) { $info=$sql->db_Fetch(); if(!check_class($info['forum_moderators'])) { header("location:".e_BASE."index.php"); exit; } } else { header("location:".e_BASE."index.php"); exit; } require_once(HEADERF); if (isset($_POST['deletepollconfirm'])) { $sql->db_Delete("poll", "poll_id='".intval($thread_parent)."' "); $sql->db_Select("forum_t", "*", "thread_id='".$thread_id."' "); $row = $sql->db_Fetch(); extract($row); $thread_name = str_replace("[poll] ", "", $thread_name); $sql->db_Update("forum_t", "thread_name='$thread_name' WHERE thread_id='$thread_id' "); $message = FORLAN_5; $url = e_PLUGIN."forum/forum_viewtopic.php?".$forum_id.".".$thread_id; } if (isset($_POST['move'])) { require_once(e_PLUGIN."forum/forum_class.php"); $forum = new e107forum; $new_forum = intval($_POST['forum_move']); $replies = $sql->db_Select("forum_t", "*", "thread_parent='$thread_id' "); $sql->db_Select("forum_t", "thread_name, thread_forum_id", "thread_id ='".$thread_id."' "); $row = $sql->db_Fetch(); $old_forum = $row['thread_forum_id']; $new_thread_name = $row['thread_name']; if($_POST['rename_thread'] == 'add') { $new_thread_name = "[".FORLAN_27."] ".$new_thread_name; } elseif($_POST['rename_thread'] == 'rename' && trim($_POST['newtitle']) != "") { $new_thread_name = $tp->toDB($_POST['newtitle']); } $sql->db_Update("forum_t", "thread_forum_id='$new_forum', thread_name='{$new_thread_name}' WHERE thread_id='$thread_id' "); $sql->db_Update("forum_t", "thread_forum_id='$new_forum' WHERE thread_parent='$thread_id' "); $sql->db_Update("forum", "forum_threads=forum_threads-1, forum_replies=forum_replies-$replies WHERE forum_id='$old_forum' "); $sql->db_Update("forum", "forum_threads=forum_threads+1, forum_replies=forum_replies+$replies WHERE forum_id='$new_forum' "); // update lastposts $forum->update_lastpost('forum', $old_forum, FALSE); $forum->update_lastpost('forum', $new_forum, FALSE); $message = FORLAN_9; $url = e_PLUGIN."forum/forum_viewforum.php?".$new_forum; } if (isset($_POST['movecancel'])) { $message = FORLAN_10; $url = e_PLUGIN."forum/forum_viewforum.php?".$info['forum_id']; } if ($message) { $text = "