Exemplo n.º 1
0
    L::loadClass('friend', 'friend', false);
    $friendServer = new PW_Friend();
    $value = explode(',', $value);
    $check = $friendServer->getFriendCheck($value);
    $friend = array();
    foreach ($value as $key => $id) {
        if ($id != $winduid) {
            if (getstatus($check[$id], 3, 3) == 0) {
                $friend[] = array($winduid, $id, 0, $timestamp, '');
                $friend[] = array($id, $winduid, 0, $timestamp, '');
            } elseif (getstatus($check[$id], 3, 3) == 1) {
                $friend[] = array($id, $winduid, 1, $timestamp, '');
            }
        }
    }
    $friend && $friendServer->addFriends($friend);
    exit;
} elseif ($step == 'sendmail') {
    S::gp(array('value', 'extranote'), 'GP');
    if (!is_array($value)) {
        $emails = explode(',', str_replace(array("\r", "\n"), array('', ','), $value));
    }
    count($emails) > 20 && ajaxExport('mail_limit');
    strlen($extranote) > 200 && ajaxExport('mode_o_extra_toolang');
    if ($emails) {
        foreach ($emails as $key => $email) {
            $emails[$key] = trim($email);
            !isEmail($email) && ajaxExport('请输入正确的邮箱地址');
            if (!$email || !isEmail($email)) {
                unset($emails[$key]);
            }