}
    showsubmit('searchsubmit');
    showtablefooter();
    showformfooter();
    showtagfooter('div');
    if (submitcheck('searchsubmit')) {
        $security = $secStatus && $security;
        if ($security) {
            $postlistcount = C::t('#security#security_evilpost')->count_by_search($posttableid, null, $keywords, -5, $inforum, null, $authors ? explode(',', str_replace(' ', '', $authors)) : null, strtotime($pstarttime), strtotime($pendtime));
        } else {
            $postlistcount = C::t('forum_post')->count_by_search($posttableid, null, $keywords, -5, $inforum, null, $authors ? explode(',', str_replace(' ', '', $authors)) : null, strtotime($pstarttime), strtotime($pendtime));
        }
        showtagheader('div', 'postlist', $searchsubmit);
        showformheader('recyclebinpost&operation=search&frame=no', 'target="rbframe"', 'rbform');
        showtableheader(cplang('recyclebinpost_result') . ' ' . $postlistcount . ' <a href="#" onclick="$(\'postlist\').style.display=\'none\';$(\'postsearch\').style.display=\'\';" class="act lightlink normal">' . cplang('research') . '</a>', 'fixpadding');
        if ($postlistcount && recyclebinpostshowpostlist($inforum, $authors, $pstarttime, $pendtime, $keywords, $start_limit, $lpp)) {
            $multi = multi($postlistcount, $lpp, $page, ADMINSCRIPT . "?action=recyclebinpost");
            $multi = preg_replace("/href=\"" . ADMINSCRIPT . "\\?action=recyclebinpost&amp;page=(\\d+)\"/", "href=\"javascript:page(\\1)\"", $multi);
            $multi = str_replace("window.location='" . ADMINSCRIPT . "?action=recyclebinpost&amp;page='+this.value", "page(this.value)", $multi);
        }
        showsubmit('rbsubmit', 'submit', '', '<a href="#rb" onclick="checkAll(\'option\', $(\'rbform\'), \'delete\')">' . cplang('recyclebin_all_delete') . '</a> &nbsp;<a href="#rb" onclick="checkAll(\'option\', $(\'rbform\'), \'undelete\')">' . cplang('recyclebin_all_undelete') . '</a> &nbsp;<a href="#rb" onclick="checkAll(\'option\', $(\'rbform\'), \'ignore\')">' . cplang('recyclebin_all_ignore') . '</a> &nbsp;', $multi);
        showtablefooter();
        showformfooter();
        echo '<iframe name="rbframe" style="display:none"></iframe>';
        showtagfooter('div');
    }
} elseif ($operation == 'clean') {
    if (!submitcheck('cleanrbsubmit', 1)) {
        shownav('topic', 'nav_recyclebinpost');
        showsubmenu('nav_recyclebinpost', array(array('recyclebinpost_list', 'recyclebinpost', 0), array('search', 'recyclebinpost&operation=search', 0), array('clean', 'recyclebinpost&operation=clean', 1)));
        showformheader('recyclebinpost&operation=clean');
        $sql .= $authors != '' ? " AND author IN ('" . str_replace(',', '\',\'', str_replace(' ', '', $authors)) . "')" : '';
        $sql .= $pstarttime != '' ? " AND dateline>='" . strtotime($pstarttime) . "'" : '';
        $sql .= $pendtime != '' ? " AND dateline<'" . strtotime($pendtime) . "'" : '';
        if (trim($keywords)) {
            $sqlkeywords = $or = '';
            foreach (explode(',', str_replace(' ', '', $keywords)) as $keyword) {
                $sqlkeywords .= " {$or} p.message LIKE '%{$keyword}%'";
                $or = 'OR';
            }
            $sql .= " AND ({$sqlkeywords})";
        }
        $postlistcount = DB::result_first("SELECT COUNT(*) FROM " . DB::table(getposttable($posttableid)) . " WHERE invisible='-5' {$sql}");
        showtagheader('div', 'postlist', $searchsubmit);
        showformheader('recyclebinpost&operation=search&frame=no', 'target="rbframe"', 'rbform');
        showtableheader(cplang('recyclebinpost_result') . ' ' . $postlistcount . ' <a href="#" onclick="$(\'postlist\').style.display=\'none\';$(\'postsearch\').style.display=\'\';" class="act lightlink normal">' . cplang('research') . '</a>', 'fixpadding');
        if ($postlistcount && recyclebinpostshowpostlist($sql, $start_limit, $lpp)) {
            $multi = multi($postlistcount, $lpp, $page, ADMINSCRIPT . "?action=recyclebinpost");
            $multi = preg_replace("/href=\"" . ADMINSCRIPT . "\\?action=recyclebinpost&amp;page=(\\d+)\"/", "href=\"javascript:page(\\1)\"", $multi);
            $multi = str_replace("window.location='" . ADMINSCRIPT . "?action=recyclebinpost&amp;page='+this.value", "page(this.value)", $multi);
        }
        showsubmit('rbsubmit', 'submit', '', '<a href="#rb" onclick="checkAll(\'option\', $(\'rbform\'), \'delete\')">' . cplang('recyclebin_all_delete') . '</a> &nbsp;<a href="#rb" onclick="checkAll(\'option\', $(\'rbform\'), \'undelete\')">' . cplang('recyclebin_all_undelete') . '</a> &nbsp;<a href="#rb" onclick="checkAll(\'option\', $(\'rbform\'), \'ignore\')">' . cplang('recyclebin_all_ignore') . '</a> &nbsp;', $multi);
        showtablefooter();
        showformfooter();
        echo '<iframe name="rbframe" style="display:none"></iframe>';
        showtagfooter('div');
    }
} elseif ($operation == 'clean') {
    if (!submitcheck('cleanrbsubmit')) {
        shownav('topic', 'nav_recyclebinpost');
        showsubmenu('nav_recyclebinpost', array(array('recyclebinpost_list', 'recyclebinpost', 0), array('search', 'recyclebinpost&operation=search', 0), array('clean', 'recyclebinpost&operation=clean', 1)));
        showformheader('recyclebinpost&operation=clean');