Esempio n. 1
0
 private function _pmDel($res, $data, $isPlid = 0)
 {
     global $_G;
     $delpmid = (int) $data['pmid'];
     $delplid = (int) $data['plid'];
     if (empty($delpmid) && empty($delplid)) {
         return $this->makeErrorInfo($res, lang('message', 'delete_pm_error_option'));
     }
     $flag = true;
     if (!empty($delpmid) && !$isPlid) {
         $return = uc_pm_delete($_G['uid'], 'inbox', $delpmid);
         if ($return <= 0) {
             $flag = false;
         }
     }
     if (!empty($delplid) && $isPlid) {
         $delplid = array($delplid);
         $return = uc_pm_deletechat($_G['uid'], $delplid, 1);
         if (!$return) {
             $flag = false;
         }
     }
     if ($flag) {
         return $this->makeErrorInfo($res, lang('message', 'delete_pm_success'), array('noError' => 1));
     } else {
         return $this->makeErrorInfo($res, lang('message', 'this_message_could_note_be_option'));
     }
     return $res;
 }
Esempio n. 2
0
        if (!empty($delpmid)) {
            $return = uc_pm_delete($_G['uid'], 'inbox', $delpmid[0]);
            $returnurl = 'home.php?mod=space&do=pm&subop=view&touid=' . $touid;
            if ($return <= 0) {
                $flag = false;
            }
        }
        if (!empty($delplid)) {
            $return = uc_pm_deletechat($_G['uid'], $delplid, 1);
            $returnurl = 'home.php?mod=space&do=pm&filter=privatepm';
            if (!$return) {
                $flag = false;
            }
        }
        if (!empty($quitplid)) {
            $return = uc_pm_deletechat($_G['uid'], $quitplid);
            $returnurl = 'home.php?mod=space&do=pm&filter=privatepm';
            if (!$return) {
                $flag = false;
            }
        }
        if ($flag) {
            showmessage('delete_pm_success', $returnurl);
        } else {
            showmessage('this_message_could_note_be_option');
        }
    }
} elseif ($_GET['op'] == 'send') {
    $waittime = interval_check('post');
    if ($waittime > 0) {
        showmessage('message_can_not_send_2', '', array(), array('return' => true));