• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP isblacklist函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中isblacklist函数的典型用法代码示例。如果您正苦于以下问题:PHP isblacklist函数的具体用法?PHP isblacklist怎么用?PHP isblacklist使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了isblacklist函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: array

     $note_message = 'share_album';
     $note_values = array('url' => "home.php?mod=space&uid={$album['uid']}&do=album&id={$album['albumid']}", 'albumname' => $album['albumname'], 'from_id' => $id, 'from_idtype' => 'albumid');
     break;
 case 'pic':
     $feed_hash_data = "picid{$id}";
     $query = DB::query("SELECT album.username, album.albumid, album.albumname, album.friend, pf.*, pic.*\r\n\t\t\t\tFROM " . DB::table('home_pic') . " pic\r\n\t\t\t\tLEFT JOIN " . DB::table('home_picfield') . " pf ON pf.picid=pic.picid\r\n\t\t\t\tLEFT JOIN " . DB::table('home_album') . " album ON album.albumid=pic.albumid\r\n\t\t\t\tWHERE pic.picid='{$id}'");
     if (!($pic = DB::fetch($query))) {
         showmessage('image_does_not_exist');
     }
     if (in_array($pic['status'], array(1, 2))) {
         showmessage('moderate_pic_not_share');
     }
     if ($pic['friend']) {
         showmessage('image_can_not_share');
     }
     if (isblacklist($pic['uid'])) {
         showmessage('is_blacklist');
     }
     if (empty($pic['albumid'])) {
         $pic['albumid'] = 0;
     }
     if (empty($pic['albumname'])) {
         $pic['albumname'] = lang('spacecp', 'default_albumname');
     }
     $arr['itemid'] = $id;
     $arr['fromuid'] = $pic['uid'];
     $arr['title_template'] = lang('spacecp', 'share_image');
     $arr['body_template'] = lang('spacecp', 'album') . ': <b>{albumname}</b><br>{username}<br>{title}';
     $arr['body_data'] = array('albumname' => "<a href=\"home.php?mod=space&uid={$pic['uid']}&do=album&id={$pic['albumid']}\">{$pic['albumname']}</a>", 'username' => "<a href=\"home.php?mod=space&uid={$pic['uid']}\">" . $pic['username'] . "</a>", 'title' => getstr($pic['title'], 100, 0, 1, 0, -1));
     $arr['image'] = pic_get($pic['filepath'], 'album', $pic['thumb'], $pic['remote']);
     $arr['image_link'] = "home.php?mod=space&uid={$pic['uid']}&do=album&picid={$pic['picid']}";
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:31,代码来源:spacecp_share.php


示例2: showmessage

        break;
}
$query = $_SGLOBAL['db']->query($sql);
if (!($item = $_SGLOBAL['db']->fetch_array($query))) {
    showmessage('click_item_error');
}
$hash = md5($item['uid'] . "\t" . $item['dateline']);
if ($_GET['op'] == 'add') {
    if (!checkperm('allowclick') || $_GET['hash'] != $hash) {
        showmessage('no_privilege');
    }
    if ($item['uid'] == $_SGLOBAL['supe_uid']) {
        showmessage('click_no_self');
    }
    //Blacklist
    if (isblacklist($item['uid'])) {
        showmessage('is_blacklist');
    }
    //Check for click
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('clickuser') . " WHERE uid='{$space['uid']}' AND id='{$id}' AND idtype='{$idtype}'");
    if ($value = $_SGLOBAL['db']->fetch_array($query)) {
        showmessage('click_have');
    }
    //Involved in
    $setarr = array('uid' => $space['uid'], 'username' => $_SGLOBAL['supe_username'], 'id' => $id, 'idtype' => $idtype, 'clickid' => $clickid, 'dateline' => $_SGLOBAL['timestamp']);
    inserttable('clickuser', $setarr);
    //Increase click number
    $_SGLOBAL['db']->query("UPDATE {$tablename} SET click_{$clickid}=click_{$clickid}+1 WHERE {$idtype}='{$id}'");
    //Update Hot
    hot_update($idtype, $id, $item['hotuser']);
    //Real name
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:cp_click.php


示例3: array

         include_once S_ROOT . './data/data_eventclass.php';
         $arr['image'] = $_SGLOBAL['eventclass'][$event['classid']]['poster'];
     }
     $arr['image_link'] = "space.php?do=event&id={$event['eventid']}";
     $hotarr = array('eventid', $event['eventid'], $event['hotuser']);
     break;
 case 'poll':
     $query = $_SGLOBAL['db']->query("SELECT p.*,pf.* FROM " . tname('poll') . " p\r\n\t\t\t\tLEFT JOIN " . tname('pollfield') . " pf ON pf.pid=p.pid\r\n\t\t\t\tWHERE p.pid='{$id}'");
     if (!($poll = $_SGLOBAL['db']->fetch_array($query))) {
         showmessage('poll_does_not_exist');
     }
     if ($poll['uid'] == $space['uid']) {
         showmessage('share_not_self');
     }
     //Blacklist
     if (isblacklist($poll['uid'])) {
         showmessage('is_blacklist');
     }
     // real name
     realname_set($poll['uid'], $poll['username']);
     realname_get();
     $arr['title_template'] = cplang('share_poll', array($poll['percredit'] ? cplang('reward') : ''));
     $arr['body_template'] = '<b>{subject}</b><br>{user}<br>{option}';
     $optionstr = '';
     $poll['option'] = unserialize($poll['option']);
     foreach ($poll['option'] as $key => $val) {
         $optionstr .= '<input type="' . ($poll['multiple'] ? 'checkbox' : 'radio') . '" disabled name="poll_' . $key . '"/>' . $val . '<br/>';
     }
     $arr['body_data'] = array('user' => "<a href=\"space.php?uid={$poll['uid']}\">" . $_SN[$poll['uid']] . "</a>", 'subject' => "<a href=\"space.php?uid={$poll['uid']}&do=poll&pid={$poll['pid']}\">{$poll['subject']}</a>", 'option' => $optionstr);
     // notice
     $note_uid = $poll['uid'];
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:cp_share.php


示例4: multi

    $multi = multi($count, $perpage, $page, $theurl);
} elseif ($op == 'acceptinvite') {
    //Accept the invitation
    if (!$eventid) {
        showmessage("event_does_not_exist");
        // Event does not exist or has been deleted
    }
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname("eventinvite") . " WHERE eventid='{$eventid}' AND touid='{$_SGLOBAL['supe_uid']}' LIMIT 1");
    $eventinvite = $_SGLOBAL['db']->fetch_array($query);
    if (!$eventinvite) {
        showmessage('eventinvite_does_not_exist');
        //You do not have the event invitation
    }
    $_SGLOBAL['db']->query("DELETE FROM " . tname("eventinvite") . " WHERE eventid='{$eventid}' AND touid='{$_SGLOBAL['supe_uid']}'");
    $_SGLOBAL['db']->query("UPDATE " . tname('space') . " SET eventinvitenum=eventinvitenum-1 WHERE uid = '{$_SGLOBAL['supe_uid']}' AND eventinvitenum>0");
    if (isblacklist($event['uid'])) {
        showmessage('is_blacklist');
        //Blacklist
    }
    if ($_SGLOBAL['timestamp'] > $event['endtime']) {
        showmessage('event_is_over');
        // Event is over
    }
    if ($_SGLOBAL['timestamp'] > $event['deadline']) {
        showmessage("event_meet_deadline");
        // Activities have been Deadline
    }
    if ($event['limitnum'] > 0 && $event['membernum'] >= $event['limitnum']) {
        showmessage('event_already_full');
        //Event Number of members is full
    }
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:cp_event.php


示例5: IHomeServiceVoteComplainOperation

function IHomeServiceVoteComplainOperation($params = NULL)
{
    global $_SGLOBAL;
    if ($params['uid']) {
        if ($params['uid'] <= 0) {
            $errorMsg = array("errorNo" => "4002", "content" => "the format of parameter is not correct.the parameter uid must be a positive integer.");
            return json_encode($errorMsg);
        } else {
            $query = $_SGLOBAL['db']->query("select username,name from " . tname('space') . " where uid = " . $params['uid']);
            if ($row = $_SGLOBAL['db']->fetch_array($query)) {
                if ($row['name']) {
                    $params['uname'] = $row['name'];
                } else {
                    $params['uname'] = $row['username'];
                }
            } else {
                $errorMsg = array("errorNo" => "500", "content" => "the uid is not exist");
                return json_encode($errorMsg);
            }
        }
    } else {
        $errorMsg = array("errorNo" => "4001", "content" => "lack the neccessary parameter.the parameter uid is not exist or is not a positive integer.");
        return json_encode($errorMsg);
    }
    if ($params['complainId']) {
        if ($params['complainId'] <= 0) {
            $errorMsg = array("errorNo" => "4002", "content" => "the format of parameter is not correct.the parameter complainId must be a positive integer.");
            return json_encode($errorMsg);
        } else {
            $query = $_SGLOBAL['db']->query("select uname from " . tname('complain') . " where doid = " . $params['complainId']);
            if ($row = $_SGLOBAL['db']->fetch_array($query)) {
                if (isblacklist($row['uid'])) {
                    $errorMsg = array("errorNo" => "500", "content" => "the user of complain is in blacklist.");
                    return json_encode($errorMsg);
                }
            } else {
                $errorMsg = array("errorNo" => "500", "content" => "the complain id is not exist");
                return json_encode($errorMsg);
            }
        }
    } else {
        $errorMsg = array("errorNo" => "4001", "content" => "lack the neccessary parameter.the parameter complainId is not exist or is not a positive integer.");
        return json_encode($errorMsg);
    }
    if ($params['reply_id']) {
        if ($params['reply_id'] <= 0) {
            $errorMsg = array("errorNo" => "4002", "content" => "the format of parameter is not correct.the parameter reply_id must be a positive integer.");
            return json_encode($errorMsg);
        } else {
            $query = $_SGLOBAL['db']->query("select * from " . tname('complain_op') . " where id = " . $params['reply_id']);
            if (!($row = $_SGLOBAL['db']->fetch_array($query))) {
                $errorMsg = array("errorNo" => "4001", "content" => "the reply_id isn't exist.");
                return json_encode($errorMsg);
            }
        }
    } else {
        $errorMsg = array("errorNo" => "4001", "content" => "lack the neccessary parameter.the parameter reply_id is not exist or is not a positive integer.");
        return json_encode($errorMsg);
    }
    if (!$params['vote']) {
        $errorMsg = array("errorNo" => "4001", "content" => "lack the neccessary parameter.the parameter vote is not exist.");
        return json_encode($errorMsg);
    } else {
        if ($params['vote'] != 'up' & $params['vote'] != 'down') {
            $errorMsg = array("errorNo" => "4002", "content" => "the format of parameter is not correct.the parameter vote is our of range.");
            return json_encode($errorMsg);
        }
    }
    # check over
    $query = $_SGLOBAL['db']->query("select * from " . tname('complain') . " where doid=" . $params['complainId']);
    $complain = $_SGLOBAL['db']->fetch_array($query);
    # checked
    if ($params['vote'] == 'up') {
        $query = $_SGLOBAL['db']->query("select * from " . tname("complain_op_updown") . " where opid = " . $params['reply_id'] . " and uid = " . $params['uid']);
        $updown = $_SGLOBAL['db']->fetch_array($query);
        if (!empty($updown)) {
            if ($updown['uid'] == $complain['uid'] || $updown['updown'] == 2) {
                $errorMsg = array("errorNo" => "403", "content" => "updown again");
                return json_encode($errorMsg);
            }
            $_SGLOBAL['db']->query("delete from " . tname("complain_op_updown") . " where opid = " . $params['reply_id'] . " and uid = " . $params['uid'] . " and updown = 1");
            $_SGLOBAL['db']->query("update " . tname('complain_op') . " set upnum=upnum-1 where id=" . $params['reply_id']);
            $_SGLOBAL['db']->query("update " . tname('complain_dep') . " set upnum=upnum-1,updownnum=updownnum-1,score=score-1 where uid in (select uid from " . tname("complain_op") . " where id=" . $params['reply_id'] . ")");
        } else {
            $downarr = array();
            $downarr['opid'] = $params['reply_id'];
            $downarr['uid'] = $params['uid'];
            $downarr['updown'] = 1;
            $downarr['username'] = $params['uname'];
            $downarr['dateline'] = $_SGLOBAL['timestamp'];
            $_SGLOBAL['db']->query("update " . tname('complain_dep') . " set upnum=upnum+1,updownnum=updownnum+1,score=score+1 where uid in (select uid from " . tname("complain_op") . " where id=    " . $params['reply_id'] . ")");
            inserttable("complain_op_updown", $downarr);
            $_SGLOBAL['db']->query("update " . tname('complain_op') . " set upnum=upnum+1 where id=" . $params['reply_id']);
            $q = $_SGLOBAL['db']->query("select * from " . tname('complain') . " where uid=" . $params['uid'] . " and doid=" . $params['complainId'] . " and lastopid=" . $params['reply_id'] . " and status=1");
            if ($r = $_SGLOBAL['db']->fetch_array($q)) {
                updatetable('complain', array('status' => 2), array('id' => $r['id']));
                $oparr = array();
                $oparr['doid'] = $params['complainId'];
                $oparr['message'] = '';
                $oparr['uid'] = $params['uid'];
//.........这里部分代码省略.........
开发者ID:shiyake,项目名称:php-ihome,代码行数:101,代码来源:do_complain.php


示例6: notification_add

function notification_add($uid, $type, $note, $returnid = 0, $system = 0)
{
    global $_SGLOBAL;
    //获取对方的筛选条件
    $tospace = getspace($uid);
    if (isblacklist($uid)) {
        return;
    }
    //更新我的好友关系热度
    if ($_SGLOBAL['supe_uid']) {
        addfriendnum($tospace['uid'], $tospace['username']);
    }
    $authorid = $system ? 0 : $_SGLOBAL['supe_uid'];
    $setarr = array('uid' => $uid, 'type' => $type, 'new' => 1, 'authorid' => $authorid, 'author' => $_SGLOBAL['supe_username'], 'note' => addslashes(sstripslashes($note)), 'dateline' => $_SGLOBAL['timestamp']);
    $filter = empty($tospace['privacy']['filter_note']) ? array() : array_keys($tospace['privacy']['filter_note']);
    if (cknote_uid($setarr, $filter)) {
        //更新用户通知
        $_SGLOBAL['db']->query("UPDATE " . tname('space') . " SET notenum=notenum+1 WHERE uid='{$uid}'");
        if ($returnid) {
            return inserttable('notification', $setarr, $returnid);
        } else {
            inserttable('notification', $setarr);
        }
    }
}
开发者ID:shiyake,项目名称:php-ihome,代码行数:25,代码来源:function_cp.php


示例7: add_comment


//.........这里部分代码省略.........
                showmessage('no_privilege_ckfriend_blog');
            } elseif (!$tospace['self'] && $blog['friend'] == 4) {
                $cookiename = "view_pwd_blog_{$blog['blogid']}";
                $cookievalue = empty($_G['cookie'][$cookiename]) ? '' : $_G['cookie'][$cookiename];
                if ($cookievalue != md5(md5($blog['password']))) {
                    showmessage('no_privilege_ckpassword_blog');
                }
            }
            if (!empty($blog['noreply'])) {
                showmessage('do_not_accept_comments');
            }
            if ($blog['target_ids']) {
                $blog['target_ids'] .= ",{$blog['uid']}";
            }
            $hotarr = array('blogid', $blog['blogid'], $blog['hotuser']);
            $stattype = 'blogcomment';
            break;
        case 'sid':
            $share = C::t('home_share')->fetch($id);
            if (empty($share)) {
                showmessage('sharing_does_not_exist');
            }
            $tospace = getuserbyuid($share['uid']);
            $hotarr = array('sid', $share['sid'], $share['hotuser']);
            $stattype = 'sharecomment';
            break;
        default:
            showmessage('non_normal_operation');
            break;
    }
    if (empty($tospace)) {
        showmessage('space_does_not_exist', '', array(), array('return' => true));
    }
    if (isblacklist($tospace['uid'])) {
        showmessage('is_blacklist');
    }
    if ($hotarr && $tospace['uid'] != $_G['uid']) {
        hot_update($hotarr[0], $hotarr[1], $hotarr[2]);
    }
    $fs = array();
    $fs['icon'] = 'comment';
    $fs['target_ids'] = '';
    $fs['friend'] = '';
    $fs['body_template'] = '';
    $fs['body_data'] = array();
    $fs['body_general'] = '';
    $fs['images'] = array();
    $fs['image_links'] = array();
    switch ($idtype) {
        case 'uid':
            $fs['icon'] = 'wall';
            $fs['title_template'] = 'feed_comment_space';
            $fs['title_data'] = array('touser' => "<a href=\"home.php?mod=space&uid={$tospace['uid']}\">{$tospace['username']}</a>");
            break;
        case 'picid':
            $fs['title_template'] = 'feed_comment_image';
            $fs['title_data'] = array('touser' => "<a href=\"home.php?mod=space&uid={$tospace['uid']}\">" . $tospace['username'] . "</a>");
            $fs['body_template'] = '{pic_title}';
            $fs['body_data'] = array('pic_title' => $pic['title']);
            $fs['body_general'] = $summay;
            $fs['images'] = array(pic_get($pic['filepath'], 'album', $pic['thumb'], $pic['remote']));
            $fs['image_links'] = array("home.php?mod=space&uid={$tospace['uid']}&do=album&picid={$pic['picid']}");
            $fs['target_ids'] = $album['target_ids'];
            $fs['friend'] = $album['friend'];
            break;
        case 'blogid':
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:67,代码来源:function_comment.php


示例8: showmessage

 }
 //检测用户
 if ($uid == $_SGLOBAL['supe_uid']) {
     showmessage('friend_self_error');
 }
 if ($space['friends'] && in_array($uid, $space['friends'])) {
     showmessage('you_have_friends');
 }
 //实名认证
 ckrealname('friend');
 $tospace = getspace($uid);
 if (empty($tospace)) {
     showmessage('space_does_not_exist');
 }
 //黑名单
 if (isblacklist($tospace['uid'])) {
     showmessage('is_blacklist');
 }
 //用户组
 $groups = getfriendgroup();
 //检测现在状态
 $status = getfriendstatus($_SGLOBAL['supe_uid'], $uid);
 if ($status == 1) {
     showmessage('you_have_friends');
 } else {
     //检查数目
     $maxfriendnum = checkperm('maxfriendnum');
     if ($maxfriendnum && $space['friendnum'] >= $maxfriendnum + $space['addfriend']) {
         if ($_SGLOBAL['magic']['friendnum']) {
             showmessage('enough_of_the_number_of_friends_with_magic');
         } else {
开发者ID:NaturalWill,项目名称:UCQA,代码行数:31,代码来源:cp_friend.php


示例9: trim

include_once 'do_mobileverify.php';
//$userid = 96;
//$username = 'anminghao';
$Body = trim($_POST['message']);
//$Body ='This is a message.';
//$type = 'doing';
//$id = 484;
$type = trim($_POST['type']);
$id = intval($_POST['typeid']);
$FromDevice = trim($_POST['fromdevice']);
//am 修改 start
//检查类别
switch ($type) {
    case 'space':
        $tospace = getspace($id);
        if ($id == $space['uid'] || empty($tospace) || isblacklist($tospace['uid'])) {
            $arrs = array('flag' => 'fail');
            $result = json_encode($arrs);
            $result = preg_replace("#\\\\u([0-9a-f]{4})#ie", "iconv('UCS-2BE', 'UTF-8', pack('H4', '\\1'))", $result);
            echo $result;
            exit;
        }
        $arr['title_template'] = cplang('share_space');
        $arr['body_template'] = '<b>{username}</b><br>{reside}<br>{spacenote}';
        $arr['body_data'] = array('username' => "<a href=\"space.php?uid={$id}\">" . $_SN[$tospace['uid']] . "</a>", 'reside' => $tospace['resideprovince'] . $tospace['residecity'], 'spacenote' => $tospace['spacenote']);
        $arr['image'] = ckavatar($id) ? avatar($id, 'middle', true) : UC_API . '/images/noavatar_middle.gif';
        $arr['image_link'] = "space.php?uid={$id}";
        //通知
        $note_uid = $id;
        $note_message = cplang('note_share_space');
        break;
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:do_addshare.php


示例10: _pmSend

 private function _pmSend($res, $data)
 {
     global $_G;
     $touid = (int) $data['toUid'];
     $pmid = (int) $data['pmid'];
     $_GET['topmuid'] = $touid;
     $_POST['message'] = $this->_transMessage($data['msg']);
     $_POST['subject'] = '';
     $users = array();
     $type = 0;
     $waittime = interval_check('post');
     if ($waittime > 0) {
         // showmessage('message_can_not_send_2', '', array(), array('return' => true));
         return $this->makeErrorInfo($res, lang('message', 'message_can_not_send_2'));
     }
     if (($checkMessage = mobcent_cknewuser()) != '') {
         return $this->makeErrorInfo($res, WebUtils::emptyHtml($checkMessage));
     }
     if (!checkperm('allowsendpm')) {
         // showmessage('no_privilege_sendpm', '', array(), array('return' => true));
         return $this->makeErrorInfo($res, 'no_privilege_sendpm');
     }
     if ($touid) {
         if (isblacklist($touid)) {
             // showmessage('is_blacklist', '', array(), array('return' => true));
             return $this->makeErrorInfo($res, lang('message', 'is_blacklist'));
         }
     }
     // !($_G['group']['exempt'] & 1) && checklowerlimit('sendpm', 0, $coef);
     $message = (!empty($_POST['messageappend']) ? $_POST['messageappend'] . "\n" : '') . trim($_POST['message']);
     if (empty($message)) {
         // showmessage('unable_to_send_air_news', '', array(), array('return' => true));
         return $this->makeErrorInfo($res, lang('message', 'unable_to_send_air_news'));
     }
     // $message = censor($message);
     loadcache(array('smilies', 'smileytypes'));
     foreach ($_G['cache']['smilies']['replacearray'] as $key => $smiley) {
         $_G['cache']['smilies']['replacearray'][$key] = '[img]' . $_G['siteurl'] . 'static/image/smiley/' . $_G['cache']['smileytypes'][$_G['cache']['smilies']['typearray'][$key]]['directory'] . '/' . $smiley . '[/img]';
     }
     $message = preg_replace($_G['cache']['smilies']['searcharray'], $_G['cache']['smilies']['replacearray'], $message);
     $subject = '';
     if ($type == 1) {
         $subject = dhtmlspecialchars(trim($_POST['subject']));
     }
     include_once libfile('function/friend');
     $return = 0;
     if ($touid || $pmid) {
         if ($touid) {
             if ($value = getuserbyuid($touid)) {
                 $value['onlyacceptfriendpm'] = $value['onlyacceptfriendpm'] ? $value['onlyacceptfriendpm'] : ($_G['setting']['onlyacceptfriendpm'] ? 1 : 2);
                 if ($_G['group']['allowsendallpm'] || $value['onlyacceptfriendpm'] == 2 || $value['onlyacceptfriendpm'] == 1 && friend_check($touid)) {
                     $return = sendpm($touid, $subject, $message, '', 0, 0, $type);
                 } else {
                     // showmessage('message_can_not_send_onlyfriend', '', array(), array('return' => true));
                     return $this->makeErrorInfo($res, lang('message', 'message_can_not_send_onlyfriend'));
                 }
             } else {
                 // showmessage('message_bad_touid', '', array(), array('return' => true));
                 return $this->makeErrorInfo($res, lang('message', 'message_bad_touid'));
             }
         } else {
             $topmuid = intval($_GET['topmuid']);
             $return = sendpm($topmuid, $subject, $message, '', $pmid, 0);
         }
     } elseif ($users) {
         $newusers = $uidsarr = $membersarr = array();
         if ($users) {
             $membersarr = C::t('common_member')->fetch_all_by_username($users);
             foreach ($membersarr as $aUsername => $aUser) {
                 $uidsarr[] = $aUser['uid'];
             }
         }
         if (empty($membersarr)) {
             showmessage('message_bad_touser', '', array(), array('return' => true));
         }
         if (isset($membersarr[$_G['uid']])) {
             showmessage('message_can_not_send_to_self', '', array(), array('return' => true));
         }
         friend_check($uidsarr);
         foreach ($membersarr as $key => $value) {
             $value['onlyacceptfriendpm'] = $value['onlyacceptfriendpm'] ? $value['onlyacceptfriendpm'] : ($_G['setting']['onlyacceptfriendpm'] ? 1 : 2);
             if ($_G['group']['allowsendallpm'] || $value['onlyacceptfriendpm'] == 2 || $value['onlyacceptfriendpm'] == 1 && $_G['home_friend_' . $value['uid'] . '_' . $_G['uid']]) {
                 $newusers[$value['uid']] = $value['username'];
                 unset($users[array_search($value['username'], $users)]);
             }
         }
         if (empty($newusers)) {
             showmessage('message_can_not_send_onlyfriend', '', array(), array('return' => true));
         }
         foreach ($newusers as $key => $value) {
             if (isblacklist($key)) {
                 showmessage('is_blacklist', '', array(), array('return' => true));
             }
         }
         $coef = count($newusers);
         $return = sendpm(implode(',', $newusers), $subject, $message, '', 0, 1, $type);
     } else {
         // showmessage('message_can_not_send_9', '', array(), array('return' => true));
         return $this->makeErrorInfo($res, lang('message', 'message_can_not_send_9'));
     }
//.........这里部分代码省略.........
开发者ID:caidongyun,项目名称:CS,代码行数:101,代码来源:PMAdminAction.php


示例11: _adminUser

 private function _adminUser($act, $uid)
 {
     global $_G;
     $errorMsg = '';
     require_once libfile('function/spacecp');
     require_once libfile('function/home');
     require_once libfile('function/friend');
     if (friend_request_check($uid) && $act == 'add') {
         $act = 'add2';
     }
     if ($act == 'add' || $act == 'add2') {
         if ($uid == $_G['uid']) {
             $list = $this->makeErrorInfo($res, 'friend_self_error');
             $this->_exitWithHtmlAlert($list['errcode']);
         }
         if (friend_check($uid)) {
             $list = $this->makeErrorInfo($res, 'you_have_friends');
             $this->_exitWithHtmlAlert($list['errcode']);
         }
         $tospace = getuserbyuid($uid);
         if (empty($tospace)) {
             $list = $this->makeErrorInfo($res, 'space_does_not_exist');
             $this->_exitWithHtmlAlert($list['errcode']);
         }
         if (isblacklist($tospace['uid'])) {
             $list = $this->makeErrorInfo($res, 'is_blacklist');
             $this->_exitWithHtmlAlert($list['errcode']);
         }
         space_merge($space, 'count');
         space_merge($space, 'field_home');
         $maxfriendnum = checkperm('maxfriendnum');
         if ($maxfriendnum && $space['friends'] >= $maxfriendnum + $space['addfriend']) {
             if ($_G['magic']['friendnum']) {
                 $list = $this->makeErrorInfo($res, 'enough_of_the_number_of_friends_with_magic');
                 $this->_exitWithHtmlAlert($list['errcode']);
             } else {
                 $list = $this->makeErrorInfo($res, 'enough_of_the_number_of_friends');
                 $this->_exitWithHtmlAlert($list['errcode']);
             }
         }
         if ($act == 'add') {
             if (!checkperm('allowfriend')) {
                 $list = $this->makeErrorInfo($res, 'no_privilege_addfriend');
                 $this->_exitWithHtmlAlert($list['errcode']);
             }
             if (C::t('home_friend_request')->count_by_uid_fuid($uid, $_G['uid'])) {
                 $list = $this->makeErrorInfo($res, 'waiting_for_the_other_test');
                 $this->_exitWithHtmlAlert($list['errcode']);
             }
         }
     }
     require_once libfile('function/friend');
     require_once libfile('function/spacecp');
     if (!empty($_POST)) {
         switch ($act) {
             case 'add':
                 $note = $_GET['note'];
                 if (!friend_request_check($uid)) {
                     $_POST['gid'] = $gid;
                     $_POST['note'] = censor(htmlspecialchars(cutstr($note, strtolower(CHARSET) == 'utf-8' ? 30 : 20, '')));
                     friend_add($uid, $_POST['gid'], $_POST['note']);
                     $note = array('uid' => $_G['uid'], 'url' => 'home.php?mod=spacecp&ac=friend&op=add&uid=' . $_G['uid'] . '&from=notice', 'from_id' => $_G['uid'], 'from_idtype' => 'friendrequest', 'note' => !empty($_POST['note']) ? lang('spacecp', 'friend_request_note', array('note' => $_POST['note'])) : '');
                     notification_add($uid, 'friend', 'friend_request', $note);
                     // ios push
                     UserUtils::pushIOSMessage($uid, 'friend', $_G['username'] . WebUtils::t(' 请求加您为好友') . $note['note']);
                     require_once libfile('function/mail');
                     $values = array('username' => $tospace['username'], 'url' => getsiteurl() . 'home.php?mod=spacecp&ac=friend&amp;op=request');
                     sendmail_touser($uid, lang('spacecp', 'friend_subject', $values), '', 'friend_add');
                     $list = $this->makeErrorInfo($res, 'request_has_been_sent');
                     $this->_exitWithHtmlAlert($list['errcode']);
                 }
                 $this->_exitWithHtmlAlert($res['errcode']);
             case 'add2':
                 global $_G;
                 require_once libfile('function/home');
                 $_POST['gid'] = intval($gid);
                 friend_add($uid, $uid);
                 if (ckprivacy('friend', 'feed')) {
                     require_once libfile('function/feed');
                     feed_add('friend', 'feed_friend_title', array('touser' => "<a href=\"home.php?mod=space&uid={$tospace['uid']}\">{$tospace['username']}</a>"));
                 }
                 notification_add($uid, 'friend', 'friend_add');
                 // showmessage('friends_add', dreferer(), array('username' => $tospace['username'], 'uid'=>$uid, 'from' => $_GET['from']), array('showdialog'=>1, 'showmsg' => true, 'closetime' => true));
                 $list = $this->makeErrorInfo($res, 'friends_add', array('{username}' => $tospace['username']));
                 $this->_exitWithHtmlAlert($list['errcode']);
                 break;
             case 'ignore':
                 global $_G;
                 require_once libfile('function/friend');
                 friend_delete($uid);
                 $params['noError'] = 1;
                 $list = $this->makeErrorInfo($res, 'do_success', $params);
                 $this->_exitWithHtmlAlert($list['errcode']);
                 break;
             case 'shield':
                 global $_G, $space;
                 // $type = empty($_GET['type'])?'':preg_replace("/[^0-9a-zA-Z\_\-\.]/", '', $_GET['type']);
                 // if(submitcheck('ignoresubmit')) {
                 $authorid = empty($_POST['authorid']) ? 0 : intval($_POST['authorid']);
                 $type = 'friend';
//.........这里部分代码省略.........
开发者ID:caidongyun,项目名称:CS,代码行数:101,代码来源:UserAdminViewAction.php


示例12: cplang

     $arr['title_template'] = cplang('share_image');
     $arr['body_template'] = cplang('album') . ': <b>{albumname}</b><br>{username}<br>{title}';
     $arr['body_data'] = array('albumname' => "<a href=\"space.php?uid={$pic['uid']}&do=album&id={$pic['albumid']}\">{$pic['albumname']}</a>", 'username' => "<a href=\"space.php?uid={$pic['uid']}\">" . $_SN[$pic['uid']] . "</a>", 'title' => getstr($pic['title'], 100, 0, 1, 0, 0, -1));
     $arr['image'] = mkpicurl($pic);
     $arr['image_link'] = "space.php?uid={$pic['uid']}&do=album&picid={$pic['picid']}";
     //通知
     $note_uid = $pic['uid'];
     $note_message = cplang('note_share_pic', array("space.php?uid={$pic['uid']}&do=album&picid={$pic['picid']}", $pic['albumname']));
     break;
 case 'thread':
     $query = $_SGLOBAL['db']->query("SELECT t.*, p.message FROM " . tname('thread') . " t\r\n\t\t\t\tLEFT JOIN " . tname('post') . " p ON p.tid=t.tid AND p.isthread='1'\r\n\t\t\t\tWHERE t.tid='{$id}'");
     if (!($thread = $_SGLOBAL['db']->fetch_array($query))) {
         showmessage('topics_does_not_exist');
     }
     //黑名单
     if (isblacklist($thread['uid'])) {
         showmessage('is_blacklist');
     }
     include_once S_ROOT . './data/data_profield.php';
     $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('mtag') . " WHERE tagid='{$thread['tagid']}'");
     $mtag = $_SGLOBAL['db']->fetch_array($query);
     $mtag['title'] = $_SGLOBAL['profield'][$mtag['fieldid']]['title'];
     //实名
     realname_set($thread['uid'], $thread['username']);
     realname_get();
     $arr['title_template'] = cplang('share_thread');
     $arr['body_template'] = '<b>{subject}</b><br>{username}<br>' . cplang('mtag') . ': {mtag} ({field})<br>{message}';
     $arr['body_data'] = array('subject' => "<a href=\"space.php?uid={$thread['uid']}&do=thread&id={$thread['tid']}\">{$thread['subject']}</a>", 'username' => "<a href=\"space.php?uid={$thread['uid']}\">" . $_SN[$thread['uid']] . "</a>", 'mtag' => "<a href=\"space.php?do=mtag&tagid={$mtag['tagid']}\">{$mtag['tagname']}</a>", 'field' => "<a href=\"space.php?do=mtag&id={$mtag['fieldid']}\">{$mtag['title']}</a>", 'message' => getstr($thread['message'], 150, 0, 1, 0, 0, -1));
     $arr['image'] = '';
     $arr['image_link'] = '';
     //通知
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:31,代码来源:cp_share.php


示例13: showmessage

        include_once S_ROOT . './source/function_delete.php';
        if (deleteblogs(array($blogid))) {
            showmessage('do_success', "space.php?uid={$blog['uid']}&do=blog&view=me");
        } else {
            showmessage('failed_to_delete_operation');
        }
    }
} elseif ($_GET['op'] == 'trace') {
    if (!checkperm('allowtrace')) {
        showmessage('no_privilege');
    }
    if ($blog['uid'] == $_SGLOBAL['supe_uid']) {
        showmessage('trace_no_self');
    }
    //黑名单
    if (isblacklist($blog['uid'])) {
        showmessage('is_blacklist');
    }
    //检查是否留过脚印
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('trace') . " WHERE blogid='{$blog['blogid']}' AND uid='{$_SGLOBAL['supe_uid']}'");
    if ($value = $_SGLOBAL['db']->fetch_array($query)) {
        showmessage('trace_have');
    } else {
        $setarr = array('blogid' => $blog['blogid'], 'uid' => $_SGLOBAL['supe_uid'], 'username' => $_SGLOBAL['supe_username'], 'dateline' => $_SGLOBAL['timestamp']);
        inserttable('trace', $setarr, 0, true);
        //更新日志脚印数
        $_SGLOBAL['db']->query("UPDATE " . tname('blog') . " SET tracenum=tracenum+1 WHERE blogid='{$blog['blogid']}'");
        //发送通知
        notification_add($blog['uid'], 'blogtrace', cplang('note_blog_trace', array("space.php?uid={$blog['uid']}&do=blog&id={$blog['blogid']}", $blog['subject'])));
        //feed
        if (ckprivacy('trace', 1)) {
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:31,代码来源:cp_blog.php


示例14: _userFriendSetting

 private function _userFriendSetting($res, $uid, $gid, $note)
 {
     global $_G;
     require_once libfile('function/friend');
     require_once libfile('function/spacecp');
     require_once libfile('function/home');
     if (!checkperm('allowfriend')) {
         return $this->makeErrorInfo($res, 'no_privilege_addfriend');
     }
     if ($uid == $_G['uid']) {
         return $this->makeErrorInfo($res, 'friend_self_error');
     }
     if (friend_check($uid)) {
         return $this->makeErrorInfo($res, 'you_have_friends');
     }
     $tospace = getuserbyuid($uid);
     if (empty($tospace)) {
         return $this->makeErrorInfo($res, 'space_does_not_exist');
     }
     if (isblacklist($tospace['uid'])) {
         return $this->makeErrorInfo($res, 'is_blacklist');
     }
     // $res['body']['gidInfo'] = $this->_getFriendGroupList();
     space_merge($space, 'count');
     space_merge($space, 'field_home');
     $maxfriendnum = checkperm('maxfriendnum');
     if ($maxfriendnum && $space['friends'] >= $maxfriendnum + $space['addfriend']) {
         if ($_G['magic']['friendnum']) {
             return $this->makeErrorInfo($res, 'enough_of_the_number_of_friends_with_magic');
         } else {
             return $this->makeErrorInfo($res, 'enough_of_the_number_of_friends');
         }
     }
     if (friend_request_check($uid)) {
         // if(submitcheck('add2submit')) {
         $_POST['gid'] = intval($gid);
         friend_add($uid, $uid);
         if (ckprivacy('friend', 'feed')) {
             require_once libfile('function/feed');
             feed_add('friend', 'feed_friend_title', array('touser' => "<a href=\"home.php?mod=space&uid={$tospace['uid']}\">{$tospace['username']}</a>"));
         }
         notification_add($uid, 'friend', 'friend_add');
         // showmessage('friends_add', dreferer(), array('username' => $tospace['username'], 'uid'=>$uid, 'from' => $_GET['from']), array('showdialog'=>1, 'showmsg' => true, 'closetime' => true));
         return $this->makeErrorInfo($res, 'friends_add', array('{username}' => $tospace['username']));
         // }
         // $op = 'add2';
         // $groupselect = empty($space['privacy']['groupname']) ? array(1 => ' checked') : array();
         // $navtitle = lang('core', 'title_friend_add');
         // include template('home/spacecp_friend');
         // exit();
     } else {
         if (C::t('home_friend_request')->count_by_uid_fuid($uid, $_G['uid'])) {
             return $this->makeErrorInfo($res, 'waiting_for_the_other_test');
         }
         $_POST['gid'] = $gid;
         $_POST['note'] = censor(htmlspecialchars(cutstr($note, strtolower(CHARSET) == 'utf-8' ? 30 : 20, '')));
         friend_add($uid, $_POST['gid'], $_POST['note']);
         $note = array('uid' => $_G['uid'], 'url' => 'home.php?mod=spacecp&ac=friend&op=add&uid=' . $_G['uid'] . '&from=notice', 'from_id' => $_G['uid'], 'from_idtype' => 'friendrequest', 'note' => !empty($_POST['note']) ? lang('spacecp', 'friend_request_note', array('note' => $_POST['note'])) : '');
         notification_add($uid, 'friend', 'friend_request', $note);
         require_once libfile('function/mail');
         $values = array('username' => $tospace['username'], 'url' => getsiteurl() . 'home.php?mod=spacecp&ac=friend&amp;op=request');
         sendmail_touser($uid, lang('spacecp', 'friend_subject', $values), '', 'friend_add');
         return $this->makeErrorInfo($res, 'request_has_been_sent');
     }
     return $res;
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:66,代码来源:UserAdminAction.php


示例15: array

     $arr['body_data'] = array('user' => "<a href=\"space.php?uid={$poll['uid']}\">" . $_SN[$poll['uid']] . "</a>", 'subject' => "<a href=\"space.php?uid={$poll['uid']}&do=poll&pid={$poll['pid']}\">{$poll['subject']}</a>", 'option' => $optionstr);
     //通知
     $note_uid = $poll['uid'];
     $note_message = cplang('note_share_poll', array("space.php?uid={$poll['uid']}&do=poll&pid={$poll['pid']}", $poll['subject']));
     $hotarr = array('pid', $poll['pid'], $poll['hotuser']);
     break;
 case 'job':
     $query = $_SGLOBAL['db']->query("SELECT j.*,jc.description FROM " . tname('job') . " j left join " . tname('job_content_3') . " jc on j.id=jc.jobid where j.id={$id}");
     if (!($job = $_SGLOBAL['db']->fetch_array($query))) {
         showmessage('job_does_not_exist');
     }
     if ($job['uid'] == $space['uid']) {
         showmessage('share_not_self');
     }
     //黑名单
     if (isblacklist($job['uid'])) {
         showmessage('is_blacklist');
     }
     //实名
     realname_set($job['uid']);
     realname_get();
     $arr['title_template'] = cplang('share_job');
     $arr['body_template'] = '<b>{subject}</b><br>{username}<br>{message}';
     $arr['body_data'] = array('userby' => $_SN[$job['uid']], 'userby_id' => $_job['uid'], 'subject' => "<a href=\"job.php?do=nei&m=view&id={$job['id']}\">{$job['title']}</a>", 'username' => "<a href=\"space.php?uid={$job['uid']}\">" . $_SN[$job['uid']] . "</a>", 'message' => getstr($job['description'], 150, 0, 1, 0, 0, -1));
     //通知
     $note_uid = $job['uid'];
     $note_message = cplang('note_share_blog', array("job.php?do=nei&m=view&id={$job['id']}", $job['title']));
     break;
 default:
     //获得feed
     $topic = array();
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:cp_share.php


示例16: showmessage

     showmessage('should_write_that');
 }
 $updo = array();
 if ($id) {
     $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('docomment') . " WHERE id='{$id}'");
     $updo = $_SGLOBAL['db']->fetch_array($query);
 }
 if (empty($updo) && $doid) {
     $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('doing') . " WHERE doid='{$doid}'");
     $updo = $_SGLOBAL['db']->fetch_array($query);
 }
 if (empty($updo)) {
     showmessage('docomment_error');
 } else {
     //黑名单
     if (isblacklist($updo['uid'])) {
         showme 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP isc_chmod函数代码示例发布时间:2022-05-15
下一篇:
PHP isb函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap