Exemplo n.º 1
0
     if ($ids = dimplode($_G['gp_moderate'])) {
         $query = DB::query("SELECT tid FROM " . DB::table('forum_thread') . " WHERE tid IN({$ids}) AND fid='{$_G['fid']}' AND displayorder='-1'");
         while ($tid = DB::fetch($query)) {
             $tidarray[] = $tid['tid'];
             if ($op == 'restore') {
                 my_thread_log('restore', array('tid' => $tid['tid']));
             }
         }
         if ($tidarray) {
             if ($op == 'delete' && $_G['group']['allowclearrecycle']) {
                 require_once libfile('function/delete');
                 deletethread($tidarray);
             }
             if ($op == 'restore') {
                 require_once libfile('function/post');
                 undeletethreads($tidarray);
             }
             if ($_G['gp_oldop'] == 'search') {
                 $srchupdate = true;
             }
         }
     }
     $op = dhtmlspecialchars($_G['gp_oldop']);
 }
 if ($op == 'search' && submitcheck('searchsubmit')) {
     $sql = '';
     if ($threadoption > 0 && $threadoption < 255) {
         $sql .= " AND special='{$threadoption}'";
     } elseif ($threadoption == 999) {
         $sql .= " AND digest in(1,2,3)";
     } elseif ($threadoption == 888) {
Exemplo n.º 2
0
            showtablefooter();
            showformfooter();
            echo '<iframe name="rbframe" style="display:none"></iframe>';
            showtagfooter('div');
        }
    } else {
        $moderate = $_GET['moderate'];
        $moderation = array('delete' => array(), 'undelete' => array(), 'ignore' => array());
        if (is_array($moderate)) {
            foreach ($moderate as $tid => $action) {
                $moderation[$action][] = intval($tid);
            }
        }
        require_once libfile('function/delete');
        $threadsdel = deletethread($moderation['delete']);
        $threadsundel = undeletethreads($moderation['undelete']);
        if ($threadsdel || $threadsundel) {
            $cpmsg = cplang('recyclebin_succeed', array('threadsdel' => $threadsdel, 'threadsundel' => $threadsundel));
        } else {
            $cpmsg = cplang('recyclebin_nothread');
        }
        ?>
<script type="text/JavaScript">alert('<?php 
        echo $cpmsg;
        ?>
');parent.$('rbsearchform').searchsubmit.click();</script>
<?php 
    }
} elseif ($operation == 'clean') {
    if (!submitcheck('rbsubmit', 1)) {
        shownav('topic', 'nav_recyclebin');
Exemplo n.º 3
0
$total = $multipage = '';
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($_G['gp_moderate'])) {
            $query = DB::query("SELECT tid FROM " . DB::table('forum_thread') . " WHERE tid IN({$ids}) AND fid='{$_G['fid']}' AND displayorder='-1'");
            while ($tid = DB::fetch($query)) {
                $tidarray[] = $tid['tid'];
                if ($op == 'restore') {
                    my_thread_log('restore', array('tid' => $tid['tid']));
                }
            }
            if ($tidarray) {
                require_once libfile('function/post');
                $op == 'delete' && deletethreads($tidarray);
                $op == 'restore' && undeletethreads($tidarray);
                if ($_G['gp_oldop'] == 'search') {
                    $srchupdate = true;
                }
            }
        }
        $op = dhtmlspecialchars($_G['gp_oldop']);
    }
    if ($op == 'search' && submitcheck('searchsubmit')) {
        $sql = '';
        if ($threadoption > 0 && $threadoption < 255) {
            $sql .= " AND special='{$threadoption}'";
        } elseif ($threadoption == 999) {
            $sql .= " AND digest in(1,2,3)";
        } elseif ($threadoption == 888) {
            $sql .= " AND displayorder IN(1,2,3)";