showtablefooter(); showsubmit('threadsplit_move_submit', 'submit', $_GET['detail'] ? '<input name="chkall" id="chkall" type="checkbox" class="checkbox" checked="checked" onclick="checkAll(\'prefix\', this.form, \'tidarray\', \'chkall\')" /><label for="chkall">' . cplang('select_all') . '</label>' : '', '', $multi); } showformfooter(); showtagfooter('div'); } } else { if (!isset($_GET['tableid'])) { cpmsg('threadsplit_no_target_table', '', 'error'); } $continue = false; $tidsarray = !empty($_GET['tidarray']) ? $_GET['tidarray'] : array(); if (empty($tidsarray) && !empty($_GET['conditions'])) { $conditions = dunserialize($_GET['conditions']); $max_threads_move = intval($_GET['threads_per_time']) ? intval($_GET['threads_per_time']) : MAX_THREADS_MOVE; $threadlist = threadsplit_search_threads($conditions, 0, $max_threads_move); foreach ($threadlist as $thread) { $tidsarray[] = $thread['tid']; $continue = TRUE; } } if (empty($tidsarray[0])) { array_shift($tidsarray); } if (!empty($tidsarray)) { $continue = true; } if ($_GET['tableid'] == $_GET['sourcetableid']) { cpmsg('threadsplit_move_source_target_no_same', 'action=threadsplit&operation=move', 'error'); } if ($continue) {
showsetting('threads_search_digest', array('digest', array(array(0, cplang('unlimited')), array(1, cplang('threads_search_include_yes')), array(2, cplang('threads_search_include_no'))), TRUE), $_G['gp_digest'], 'mradio'); showsetting('threads_search_attach', array('attach', array(array(0, cplang('unlimited')), array(1, cplang('threads_search_include_yes')), array(2, cplang('threads_search_include_no'))), TRUE), $_G['gp_attach'], 'mradio'); showsetting('threads_rate', array('rate', array(array(0, cplang('unlimited')), array(1, cplang('threads_search_include_yes')), array(2, cplang('threads_search_include_no'))), TRUE), $_G['gp_rate'], 'mradio'); showsetting('threads_highlight', array('highlight', array(array(0, cplang('unlimited')), array(1, cplang('threads_search_include_yes')), array(2, cplang('threads_search_include_no'))), TRUE), $_G['gp_highlight'], 'mradio'); showtagfooter('tbody'); showsubmit('threadsplit_move_search', 'submit', '', 'more_options'); showtablefooter(); showformfooter(); showtagfooter('div'); if (submitcheck('threadsplit_move_search')) { $searchurladd = array(); if ($_G['gp_detail']) { $pagetmp = $page; $threadlist = threadsplit_search_threads(($pagetmp - 1) * $topicperpage, $topicperpage); } else { $threadlist = threadsplit_search_threads(); } $fids = array(); $tids = '0'; if ($_G['gp_detail']) { $threads = ''; foreach ($threadlist as $thread) { $fids[] = $thread['fid']; $thread['lastpost'] = dgmdate($thread['lastpost']); $threads .= showtablerow('', array('class="td25"', '', '', '', '', ''), array("<input class=\"checkbox\" type=\"checkbox\" name=\"tidarray[]\" value=\"{$thread['tid']}\" checked=\"checked\" />", "<a href=\"forum.php?mod=viewthread&tid={$thread['tid']}\" target=\"_blank\">{$thread['subject']}</a>", "<a href=\"forum.php?mod=forumdisplay&fid={$thread['fid']}\" target=\"_blank\">{$_G['cache'][forums][$thread[fid]][name]}</a>", "<a href=\"home.php?mod=space&uid={$thread['authorid']}\" target=\"_blank\">{$thread['author']}</a>", $thread['replies'], $thread['views']), TRUE); } $multi = multi($threadcount, $topicperpage, $page, ADMINSCRIPT . "?action=threadsplit&operation=move"); $multi = preg_replace("/href=\"" . ADMINSCRIPT . "\\?action=threadsplit&operation=move&page=(\\d+)\"/", "href=\"javascript:page(\\1)\"", $multi); $multi = str_replace("window.location='" . ADMINSCRIPT . "?action=threadsplit&operation=move&page='+this.value", "page(this.value)", $multi); } else { foreach ($threadlist as $thread) {