Example #1
0
    exit;
} elseif ($action == 'done') {
    InitGP(array('selid'));
    !$selid && adminmsg('operate_error');
    $selids = array();
    foreach ($selid as $value) {
        is_numeric($value) && ($selids[] = $value);
    }
    if ($selids) {
        require_once R_P . 'require/msg.php';
        $selids = pwImplode($selids);
        $db->update("UPDATE pw_report SET state='1' WHERE id IN ({$selids})");
        $query = $db->query("SELECT r.tid,r.pid,r.uid,r.type,r.reason,m.username FROM pw_report r LEFT JOIN pw_members m ON r.uid=m.uid WHERE r.id IN({$selids})");
        while (@extract($db->fetch_array($query))) {
            empty($type) && ($type = 'topic');
            $msgdb[] = array('toUser' => $username, 'subject' => 'report_deal_title', 'content' => 'report_deal_content', 'other' => array('manager' => $admin_name, 'url' => $db_bbsurl . '/' . getUrlByType($type, $tid, $pid), 'admindate' => get_date($timestamp), 'reason' => stripslashes($reason), 'type' => getLangInfo('other', $type)));
        }
        foreach ($msgdb as $key => $val) {
            pwSendMsg($val);
        }
    }
    adminmsg('operate_success');
} elseif ($action == 'del') {
    InitGP(array('selid'), 'P');
    $delids = array();
    foreach ($selid as $value) {
        is_numeric($value) && ($delids[] = $value);
    }
    if ($delids) {
        $delids = pwImplode($delids);
        $db->update("DELETE FROM pw_report WHERE id IN ({$delids})");
Example #2
0
     include PrintEot('report');
     exit;
 } elseif ($action == 'done') {
     S::gp(array('selid'));
     !$selid && adminmsg('operate_error');
     $selids = array();
     foreach ($selid as $value) {
         is_numeric($value) && ($selids[] = $value);
     }
     if ($selids) {
         $selids = S::sqlImplode($selids);
         $db->update("UPDATE pw_report SET state='1' WHERE id IN ({$selids})");
         $query = $db->query("SELECT r.tid,r.pid,r.uid,r.type,r.reason,m.username FROM pw_report r LEFT JOIN pw_members m ON r.uid=m.uid WHERE r.id IN({$selids})");
         while (@extract($db->fetch_array($query))) {
             empty($type) && ($type = 'topic');
             M::sendNotice(array($username), array('title' => getLangInfo('writemsg', 'report_deal_title'), 'content' => getLangInfo('writemsg', 'report_deal_content', array('manager' => $admin_name, 'url' => $db_bbsurl . '/' . getUrlByType($type, $tid, $pid), 'admindate' => get_date($timestamp), 'reason' => stripslashes($reason), 'type' => getLangInfo('other', $type)))));
         }
     }
     adminmsg('operate_success');
 } elseif ($action == 'del') {
     S::gp(array('selid'), 'P');
     $delids = array();
     foreach ($selid as $value) {
         is_numeric($value) && ($delids[] = $value);
     }
     if ($delids) {
         $delids = S::sqlImplode($delids);
         $db->update("DELETE FROM pw_report WHERE id IN ({$delids})");
     }
     adminmsg('operate_success');
 }