Exemplo n.º 1
0
function API_SetMsg($uids)
{
    global $userid;
    include_once ONEZ_ROOT . './uc_client/client.php';
    return uc_pm_readstatus($userid, $uids);
}
Exemplo n.º 2
0
        if (empty($cannotappend)) {
            showmessage('do_success', dreferer(), array(), array('showdialog' => 1, 'showmsg' => true, 'closetime' => true, 'locationtime' => 3));
        } else {
            showmessage('message_can_not_append_reason', dreferer(), array('cannotappend' => implode('<br />', $cannotappend)), array('showdialog' => 1, 'showmsg' => true, 'closetime' => true, 'locationtime' => 5));
        }
    }
} elseif ($_GET['op'] == 'setpmstatus') {
    $gpmids = trim($_GET['gpmids']);
    $plids = trim($_GET['plids']);
    if ($gpmids) {
        $gpmidarr = explode(',', $gpmids);
        C::t('common_member_grouppm')->update_to_read_by_unread($_G['uid'], $gpmidarr);
    }
    if ($plids) {
        $plidarr = explode(',', $plids);
        uc_pm_readstatus($_G['uid'], array(), $plidarr, 0);
    }
    showmessage('do_success', '', array(), array('msgtype' => 3));
} elseif ($_GET['op'] == 'viewpmid') {
    $list = uc_pm_view($_G['uid'], $_GET['pmid']);
    $value = $list[0];
    include template('common/header_ajax');
    include template('home/space_pm_node');
    include template('common/footer_ajax');
    exit;
} elseif ($_GET['op'] == 'export') {
    if (!$touid && !$plid) {
        showmessage('pm_export_touser_not_exists');
    }
    if ($touid) {
        $list = uc_pm_view($_G['uid'], 0, $touid, 5, 0, 0, 0, 0);
Exemplo n.º 3
0
        showmessage('pm_send_invalid');
    }
} elseif ($action == 'del') {
    $uid = !empty($uid) ? !is_array($uid) ? array($uid) : $uid : array();
    $pmid = !empty($pmid) ? !is_array($pmid) ? array($pmid) : $pmid : array();
    if ($uid || $pmid) {
        if (!$readopt) {
            if ($uid) {
                uc_pm_deleteuser($discuz_uid, $uid);
            }
            if ($pmid) {
                uc_pm_delete($discuz_uid, 'inbox', $pmid);
            }
            showmessage('pm_delete_succeed', "pm.php?filter={$filter}&page={$page}");
        } else {
            uc_pm_readstatus($discuz_uid, $uid, $pmid, $readopt == 1 ? 0 : 1);
            showmessage($readopt == 1 ? 'pm_mark_read_succeed' : 'pm_mark_unread_succeed', "pm.php?filter={$filter}&page={$page}");
        }
    } else {
        showmessage('pm_nonexistence', "pm.php?filter={$filter}&page={$page}");
    }
} elseif ($action == 'addblack') {
    if ($formhash != FORMHASH) {
        showmessage('undefined_action', NULL, 'HALTED');
    }
    uc_pm_blackls_add($discuz_uid, $user);
    if ($user != '{ALL}') {
        showmessage('pm_addblack_succeed', 'pm.php?action=viewblack');
    } else {
        showmessage('pm_addblackall_succeed', 'pm.php?action=viewblack');
    }
Exemplo n.º 4
0
if ($act == 'list') {
    @(include_once B_ROOT . './uc_client/client.php');
    $page = intval($_GET['page']);
    if ($page == 0) {
        $page = 1;
    }
    $pm_notices = uc_pm_list($_G['uid'], $page, 5, '', 'systempm', 0);
    $url = 'pm.php?act=list&msgtype=systempm';
    if ($_GET['inajax'] == 1) {
        $url .= '&inajax=1';
    }
    $multi = multi($pm_notices['count'], 5, $page, $url);
} elseif ($act == 'view') {
    @(include_once B_ROOT . './uc_client/client.php');
    $pm = uc_pm_viewnode($_G['uid'], 'systempm', intval($_GET['pmid']));
    uc_pm_readstatus($_G['uid'], null, intval($_GET['pmid']), 0);
    if (!empty($_SERVER['HTTP_REFERER'])) {
        $return_url = $_SERVER['HTTP_REFERER'];
    } else {
        $return_url = 'pm.php?act=list&msgtype=systempm';
        if ($_GET['inajax'] == 1) {
            $return_url .= '&inajax=1';
        }
    }
    $url = 'pm.php?act=view&msgtype=systempm';
    if ($_GET['inajax'] == 1) {
        $url .= '&inajax=1';
    }
} else {
    if ($act == 'del') {
        if (intval($_GET['pmid']) != 0) {