Ejemplo n.º 1
0
<script type="text/JavaScript">
function page(number) {
\t\$('rbsearchform').page.value=number;
\t\$('rbsearchform').searchsubmit.click();
}
</script>
EOT;
    showtagheader('div', 'postsearch', !$searchsubmit);
    showformheader('recyclebinpost&operation=search', '', 'rbsearchform');
    showhiddenfields(array('page' => $page));
    showtableheader('recyclebinpost_search');
    showsetting('recyclebinpost_search_forum', '', '', $forumselect);
    showsetting('recyclebinpost_search_author', 'authors', $authors, 'text');
    showsetting('recyclebinpost_search_keyword', 'keywords', $keywords, 'text');
    showsetting('recyclebin_search_post_time', array('pstarttime', 'pendtime'), array($pstarttime, $pendtime), 'daterange');
    showsetting('postsplit', '', '', getposttableselect());
    if ($secStatus) {
        showsetting('recyclebin_search_security_thread', 'security', $security, 'radio');
    }
    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);
if (!defined('IN_DISCUZ') || !defined('IN_MODCP')) {
    exit('Access Denied');
}
$op = !in_array($op, array('list', 'delete', 'search', 'restore')) ? 'list' : $op;
$do = !empty($_GET['do']) ? dhtmlspecialchars($_GET['do']) : '';
$pidarray = array();
$action = $_GET['action'];
$result = array();
foreach (array('starttime', 'endtime', 'keywords', 'users') as $key) {
    ${$key} = isset($_GET['' . $key]) ? trim($_GET['' . $key]) : '';
    $result[$key] = isset($_GET['' . $key]) ? dhtmlspecialchars($_GET['' . $key]) : '';
}
$postlist = array();
$total = $multipage = '';
$posttableid = intval($_GET['posttableid']);
$posttableselect = getposttableselect();
$cachekey = 'srchresult_recycle_post_' . $posttableid . '_' . $_G['fid'];
if ($_G['fid'] && $_G['forum']['ismoderator'] && $modforums['recyclebins'][$_G['fid']]) {
    $srchupdate = false;
    if (in_array($_G['adminid'], array(1, 2, 3)) && ($op == 'delete' || $op == 'restore') && submitcheck('dosubmit')) {
        if ($ids = dimplode($_GET['moderate'])) {
            $pidarray = array();
            foreach (C::t('forum_post')->fetch_all($posttableid, $_GET['moderate'], false) as $post) {
                if ($post['fid'] != $_G['fid'] || $post['invisible'] != '-5') {
                    continue;
                }
                $pidarray[] = $post['pid'];
            }
            if ($pidarray) {
                require_once libfile('function/misc');
                if ($op == 'delete' && $_G['group']['allowclearrecycle']) {