require_once DIR . '/includes/functions_prefix.php'; remove_invalid_prefixes($threadslist, $vbulletin->GPC['destforumid']); require_once DIR . '/includes/functions_databuild.php'; build_forum_counters($vbulletin->GPC['destforumid']); define('CP_REDIRECT', 'index.php?do=home'); print_stop_message('moved_threads_successfully_modcp'); } } // ###################### Start move/prune select ####################### if ($_POST['do'] == 'dothreadssel') { $vbulletin->input->clean_array_gpc('p', array('criteria' => TYPE_BINARY, 'destforumid' => TYPE_INT)); $thread = @unserialize(verify_client_string($vbulletin->GPC['criteria'])); if (!is_array($thread) or sizeof($thread) == 0) { print_stop_message('please_complete_required_fields'); } $whereclause = fetch_thread_move_prune_sql($thread, $forumids, $vbulletin->GPC['type']); $fullquery = "\n\t\tSELECT thread.*, forum.title AS forum_title\n\t\tFROM " . TABLE_PREFIX . "thread AS thread\n\t\tLEFT JOIN " . TABLE_PREFIX . "forum AS forum ON(forum.forumid = thread.forumid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(deletionlog.primaryid = thread.threadid AND deletionlog.type = 'thread')\n\t\tWHERE {$whereclause}\n\t"; $threads = $db->query_read($fullquery); print_form_header('thread', 'dothreadsselfinish'); construct_hidden_code('type', $vbulletin->GPC['type']); construct_hidden_code('destforumid', $vbulletin->GPC['destforumid']); if ($vbulletin->GPC['type'] == 'prune') { print_table_header($vbphrase['prune_threads_selectively'], 5); } else { if ($vbulletin->GPC['type'] == 'move') { print_table_header($vbphrase['move_threads_selectively'], 5); } } print_cells_row(array('<input type="checkbox" name="allbox" title="' . $vbphrase['check_all'] . '" onClick="js_check_all(this.form);" checked="checked" />', $vbphrase['title'], $vbphrase['posted_by'], $vbphrase['replies'], $vbphrase['last_post']), 1); while ($thread = $db->fetch_array($threads)) { $thread['prefix_plain_html'] = $thread['prefixid'] ? htmlspecialchars_uni($vbphrase["prefix_{$thread['prefixid']}_title_plain"]) : '';
$vbulletin->db->query_write("TRUNCATE TABLE " . TABLE_PREFIX . "postparsed"); require_once DIR . '/includes/functions_prefix.php'; remove_invalid_prefixes($threadslist, $vbulletin->GPC['destforumid']); require_once DIR . '/includes/functions_databuild.php'; build_forum_counters($vbulletin->GPC['destforumid']); //define('CP_REDIRECT', 'thread.php?do=move'); define('CP_BACKURL', ''); print_stop_message('moved_threads_successfully'); } } } // ###################### Start move/prune select ####################### if ($_POST['do'] == 'dothreadssel') { $vbulletin->input->clean_array_gpc('p', array('type' => TYPE_NOHTML, 'criteria' => TYPE_STR, 'destforumid' => TYPE_INT)); $thread = @unserialize(verify_client_string($vbulletin->GPC['criteria'])); $whereclause = fetch_thread_move_prune_sql($thread); $fullquery = "\n\t\tSELECT thread.*, forum.title AS forum_title\n\t\tFROM " . TABLE_PREFIX . "thread AS thread\n\t\tLEFT JOIN " . TABLE_PREFIX . "forum AS forum ON (forum.forumid = thread.forumid)\n\t\tWHERE {$whereclause}\n\t"; $threads = $db->query_read($fullquery); print_form_header('thread', 'dothreadsselfinish'); construct_hidden_code('type', $vbulletin->GPC['type']); construct_hidden_code('destforumid', $vbulletin->GPC['destforumid']); if ($vbulletin->GPC['type'] == 'prune') { print_table_header($vbphrase['prune_threads_selectively'], 5); } else { if ($vbulletin->GPC['type'] == 'move') { print_table_header($vbphrase['move_threads_selectively'], 5); } } print_cells_row(array('<input type="checkbox" name="allbox" title="' . $vbphrase['check_all'] . '" onclick="js_check_all(this.form);" checked="checked" />', $vbphrase['title'], $vbphrase['user'], $vbphrase['replies'], $vbphrase['last_post']), 1); while ($thread = $db->fetch_array($threads)) { $thread['prefix_plain_html'] = $thread['prefixid'] ? htmlspecialchars_uni($vbphrase["prefix_{$thread['prefixid']}_title_plain"]) : '';