示例#1
0
    }
    S::gp(array('invnum'), 'GP');
    $invnum = (int) $invnum;
    if ($invnum < 1) {
        ajaxExport("购买的邀请码数量必须大于0");
    }
    //(!is_numeric($invnum) || $invnum < 1) && $invnum = 1;
    if ($creditto[$inv_credit] < $invnum * $inv_costs) {
        ajaxExport("您的积分不足以购买邀请码");
    }
    for ($i = 0; $i < $invnum; $i++) {
        $invcode = randstr(16);
        $db->update("INSERT INTO pw_invitecode" . " SET " . S::sqlSingle(array('invcode' => $invcode, 'uid' => $winduid, 'createtime' => $timestamp, 'type' => 1)));
    }
    $cutcredit = $invnum * $inv_costs;
    $credit->addLog('hack_invcodebuy', array($inv_credit => -$cutcredit), array('uid' => $winduid, 'username' => $windid, 'ip' => $onlineip, 'invnum' => stripslashes($invnum)));
    $credit->set($winduid, $inv_credit, -$cutcredit);
    ajaxExport("邀请码购买成功!");
}
require_once PrintEot('ajax_friendinvite');
ajax_footer();
function ajaxExport($output)
{
    echo is_array($output) ? pwJsonEncode($output) : $output;
    ajax_footer();
    exit;
}
function isEmail($email)
{
    return preg_match("/\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*/i", $email);
}
示例#2
0
    if (!$messageServer->shieldGroupMessage($winduid, $rid, $mid)) {
        ajaxExport("屏蔽多人消息失败");
    }
    ajaxExport("屏蔽操作成功!");
} elseif ('unshield' == $action) {
    /* 恢复多人消息 */
    S::gp(array('rid', 'mid'), 'GP');
    (empty($rid) || empty($mid)) && ajaxExport("非法操作请返回");
    if (!$messageServer->recoverGroupMessage($winduid, $rid, $mid)) {
        ajaxExport("恢复多人消息失败");
    }
    ajaxExport("恢复操作成功!");
} elseif ('close' == $action) {
    /* 拒收群组消息 */
    S::gp(array('gid', 'mid'), 'GP');
    empty($gid) && ajaxExport("群组已删除");
    empty($mid) && ajaxExport("非法操作请返回");
    if (!$messageServer->closeGroupMessage($winduid, $gid, $mid)) {
        ajaxExport("拒收群组消息失败");
    }
    ajaxExport("拒收群组消息成功!");
} elseif ('open' == $action) {
    /* 启用群组消息 */
    S::gp(array('gid', 'mid'), 'GP');
    (empty($gid) || empty($mid)) && ajaxExport("非法操作请返回");
    if (!$messageServer->openGroupMessage($winduid, $gid, $mid)) {
        ajaxExport("启用群组消息失败");
    }
    ajaxExport("启用群组消息成功!");
} elseif ('replay' == $action) {
}
示例#3
0
if (count($usernames) > 1 && intval($_G['multiopen']) < 1) {
    Showmsg('你不能发送多人消息');
}
$usernames = is_array($usernames) ? $usernames : explode(",", $usernames);
if (in_array($windid, array($usernames))) {
    unset($usernames[$windid]);
}
$messageService = L::loadClass("message", 'message');
/* @var $messageService PW_Message */
if (!$messageService->checkUserMessageLevle('sms', 1)) {
    Showmsg('你已超过每日发送消息数或你的消息总数已满');
}
list($bool, $message) = $messageService->checkReceiver($usernames);
if (!$bool) {
    Showmsg($message);
    ajaxExport(array('bool' => $bool, 'message' => $message));
}
if ("" == $atc_mctitle) {
    Showmsg('标题不能为空');
}
if (200 < strlen($atc_mctitle)) {
    Showmsg('标题不能超过限度');
}
if ("" == $atc_mccontent) {
    Showmsg('内容不能为空');
}
if (isset($_G['messagecontentsize']) && $_G['messagecontentsize'] > 0 && strlen($atc_mccontent) > $_G['messagecontentsize']) {
    Showmsg('内容超过限定长度' . $_G['messagecontentsize'] . '字节');
}
$filterUtil = L::loadClass('filterutil', 'filter');
$atc_mctitle = $filterUtil->convert($atc_mctitle);
示例#4
0
    }
    S::gp(array('invnum'), 'GP');
    $invnum = (int) $invnum;
    if ($invnum < 1) {
        ajaxExport("¹ºÂòµÄÑûÇëÂëÊýÁ¿±ØÐë´óÓÚ0");
    }
    //(!is_numeric($invnum) || $invnum < 1) && $invnum = 1;
    if ($creditto[$inv_credit] < $invnum * $inv_costs) {
        ajaxExport("ÄúµÄ»ý·Ö²»×ãÒÔ¹ºÂòÑûÇëÂë");
    }
    for ($i = 0; $i < $invnum; $i++) {
        $invcode = randstr(16);
        $db->update("INSERT INTO pw_invitecode" . " SET " . S::sqlSingle(array('invcode' => $invcode, 'uid' => $winduid, 'createtime' => $timestamp, 'type' => 1)));
    }
    $cutcredit = $invnum * $inv_costs;
    $credit->addLog('hack_invcodebuy', array($inv_credit => -$cutcredit), array('uid' => $winduid, 'username' => $windid, 'ip' => $onlineip, 'invnum' => stripslashes($invnum)));
    $credit->set($winduid, $inv_credit, -$cutcredit);
    ajaxExport("ÑûÇëÂ빺Âò³É¹¦!");
}
require_once PrintEot('ajax_friendinvite');
ajax_footer();
function ajaxExport($output)
{
    echo is_array($output) ? pwJsonEncode($output) : $output;
    ajax_footer();
    exit;
}
function isEmail($email)
{
    return preg_match("/\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*/i", $email);
}