Ejemplo n.º 1
0
             showtablefooter();
             showsubmit('postsplit_move_submit', 'submit', $_G['gp_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($_G['gp_tableid'])) {
         cpmsg('postsplit_no_target_table', '', 'error');
     }
     $continue = false;
     $conditions = unserialize(stripslashes($_G['gp_conditions']));
     $tidsarray = !empty($_G['gp_tidarray']) ? $_G['gp_tidarray'] : array();
     if (empty($tidsarray) && !empty($_G['gp_conditions'])) {
         $max_threads_move = intval($_G['gp_threads_per_time']) ? intval($_G['gp_threads_per_time']) : 100;
         $threadlist = postsplit_search_threads($conditions, 0, $max_threads_move);
         foreach ($threadlist as $thread) {
             $tidsarray[] = $thread['tid'];
             $continue = true;
         }
     }
     if ($tidsarray[0] == '0') {
         array_shift($tidsarray);
     }
     $threadtable = $conditions['threadtableid'] ? "forum_thread_{$conditions['threadtableid']}" : 'forum_thread';
     $threadlist = array();
     if (!empty($tidsarray)) {
         $query = DB::query("SELECT tid, replies, posttableid FROM " . DB::table($threadtable) . " WHERE tid IN(" . dimplode($tidsarray) . ")");
         while ($thread = DB::fetch($query)) {
             $threadlist[$thread['tid']] = $thread;
         }
Ejemplo n.º 2
0
 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('postsplit_move_search', 'submit', '', 'more_options');
 showtablefooter();
 showformfooter();
 showtagfooter('div');
 if (submitcheck('postsplit_move_search')) {
     $searchurladd = array();
     if ($_G['gp_detail']) {
         $pagetmp = $page;
         $threadlist = postsplit_search_threads(($pagetmp - 1) * $topicperpage, $topicperpage);
     } else {
         $threadlist = postsplit_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>", $thread['posttableid'] ? DB::table("forum_post_{$thread['posttableid']}") : DB::table("forum_post"), "<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=postsplit&amp;operation=move");
         $multi = preg_replace("/href=\"" . ADMINSCRIPT . "\\?action=postsplit&amp;operation=move&amp;page=(\\d+)\"/", "href=\"javascript:page(\\1)\"", $multi);
         $multi = str_replace("window.location='" . ADMINSCRIPT . "?action=postsplit&amp;operation=move&amp;page='+this.value", "page(this.value)", $multi);
     } else {
         foreach ($threadlist as $thread) {