本文整理汇总了PHP中M::sendRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP M::sendRequest方法的具体用法?PHP M::sendRequest怎么用?PHP M::sendRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类M
的用法示例。
在下文中一共展示了M::sendRequest方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Showmsg
$errorname = $sendtoname;
Showmsg('user_not_exists');
}
$uids[] = $userId;
}
if (is_array($touid)) {
foreach ($touid as $key => $value) {
if (is_numeric($value)) {
$uids[] = $value;
}
}
}
!$uids && Showmsg('msg_empty');
$toUsers = $userService->getUserNamesByUserIds($uids);
$inColonyUsers = array();
$query = $db->query("SELECT username FROM pw_cmembers WHERE uid IN(" . S::sqlImplode($uids) . ") AND colonyid=" . S::sqlEscape($cyid));
while ($rt = $db->fetch_array($query)) {
$inColonyUsers[] = $rt['username'];
}
$toUsers = array_diff($toUsers, $inColonyUsers);
M::sendRequest($winduid, $toUsers, array('create_uid' => $winduid, 'create_username' => $windid, 'title' => getLangInfo('writemsg', 'email_' . $type . '_invite_subject'), 'content' => getLangInfo('writemsg', 'email_' . $type . '_invite_content'), 'extra' => serialize(array('cyid' => $id))), 'request_group', 'request_group');
if ($inColonyUsers) {
$inColonyUsers = implode(',', $inColonyUsers);
Showmsg('colony_invite_message');
} else {
Showmsg('operate_success');
}
}
} else {
Showmsg('undefined_action');
}
示例2: exit
<?php
!defined('P_W') && exit('Forbidden');
!$winduid && Showmsg('undefined_action');
$rt = $db->get_one('SELECT r.timelimit,t.fid,t.subject,t.authorid,t.postdate,t.special,t.state,f.forumadmin FROM pw_reward r LEFT JOIN pw_threads t ON r.tid=t.tid LEFT JOIN pw_forums f ON t.fid=f.fid WHERE r.tid=' . S::sqlEscape($tid));
if (empty($rt) || $rt['timelimit'] > $timestamp || $rt['special'] != 3 || $rt['state'] != 0) {
Showmsg('illegal_tid');
}
$rt['authorid'] != $winduid && Showmsg('reward_noright');
!$rt['forumadmin'] && Showmsg('reward_no_forumadmin');
//* include_once pwCache::getPath(D_P . 'data/bbscache/forum_cache.php');
pwCache::getData(D_P . 'data/bbscache/forum_cache.php');
$admin_db = explode(',', substr($rt['forumadmin'], 1, -1));
M::sendRequest($winduid, array($admin_db), array('create_uid' => $winduid, 'create_username' => $windid, 'title' => getLangInfo('writemsg', 'rewardmsg_title'), 'content' => getLangInfo('writemsg', 'rewardmsg_content', array('fid' => $rt['fid'], 'tid' => $tid, 'subject' => $rt['subject'], 'postdate' => get_date($rt['postdate']), 'forum' => $forum[$rt['fid']]['name'], 'admindate' => get_date($timestamp), 'reason' => "None"))));
Showmsg('rewardmsg_success');
示例3: getstatus
if ($hash == appkey($o_u, $app) && $winduid && $o_u !== $winduid) {
$userService = L::loadClass('UserService', 'user');
/* @var $userService PW_UserService */
$ckuser = $userService->get($o_u);
$iffriend = $friendServer->getFriendByUidAndFriendid($winduid, $o_u);
if ($ckuser && empty($iffriend)) {
$friendcheck = getstatus($ckuser['userstatus'], PW_USERSTATUS_CFGFRIEND, 3);
if (!$friendcheck) {
$db->query("DELETE FROM pw_attention WHERE uid=" . S::sqlEscape($winduid) . " AND friendid=" . S::sqlEscape($o_u));
addSingleFriend(true, $winduid, $o_u, $timestamp, 0);
addSingleFriend(true, $o_u, $winduid, $timestamp, 0);
M::sendNotice(array($ckuser['username']), array('title' => getLangInfo('writemsg', 'friend_add_title_1', array('username' => $windid)), 'content' => getLangInfo('writemsg', 'friend_add_content_1', array('uid' => $winduid, 'username' => $windid))));
} elseif ($friendcheck == 1) {
$db->query("DELETE FROM pw_attention WHERE uid=" . S::sqlEscape($winduid) . " AND friendid=" . S::sqlEscape($touid));
addSingleFriend(false, $winduid, $o_u, $timestamp, 1);
M::sendRequest($winduid, array($ckuser['username']), array('create_uid' => $winduid, 'create_username' => $windid, 'title' => getLangInfo('writemsg', 'friend_add_title_2', array('username' => $windid)), 'content' => getLangInfo('writemsg', 'friend_add_content_2', array('uid' => $winduid, 'username' => $windid, 'msg' => stripslashes($checkmsg)))), 'request_friend', 'request_friend');
}
Cookie('o_invite', '');
}
}
function addSingleFriend($updatemem, $winduid, $frienduid, $timestamp, $status, $friendtype = 0, $checkmsg = '')
{
global $db;
$pwSQL = S::sqlSingle(array('uid' => $winduid, 'friendid' => $frienduid, 'joindate' => $timestamp, 'status' => $status, 'descrip' => $checkmsg, 'ftid' => $friendtype));
$attentionService = L::loadClass('Attention', 'friend');
/* @var $attentionService PW_Attention */
if ($isAttention = $attentionService->isFollow($winduid, $frienduid)) {
$db->update("UPDATE pw_friends SET status = 0 WHERE uid=" . S::sqlEscape($winduid) . " AND friendid=" . S::sqlEscape($frienduid));
} else {
if ($winduid != $frienduid) {
$db->update("INSERT INTO pw_friends SET {$pwSQL}");
示例4: _sendJoinMsg
function _sendJoinMsg($frombbs)
{
global $winduid, $windid;
$lang = array('cname' => S::escapeChar($this->info['cname']), 'colonyurl');
$group = $this->info['ifcheck'] == 1 ? '3' : '2';
if ($frombbs) {
$colonyurl = 'thread.php?cyid=' . $this->cyid . '&showtype=member&group=' . $group;
} else {
$colonyurl = 'apps.php?q=group&a=member&cyid=' . $this->cyid . '&group=' . $group;
}
$managers = $this->getUserNames($this->getManager());
if ($this->info['ifcheck'] == 1) {
M::sendRequest($windid, $managers, array('create_uid' => $winduid, 'create_username' => $windid, 'title' => getLangInfo('writemsg', 'colony_join_title_check', array('cname' => S::escapeChar($this->info['cname']))), 'content' => getLangInfo('writemsg', 'colony_join_content_check', array('uid' => $winduid, 'username' => $windid, 'cname' => S::escapeChar($this->info['cname']), 'colonyurl' => $colonyurl)), 'extra' => serialize(array('cyid' => $this->cyid, 'check' => 1))), 'request_group', 'request_group');
} else {
M::sendNotice($managers, array('title' => getLangInfo('writemsg', 'colony_join_title', array('cname' => S::escapeChar($this->info['cname']))), 'content' => getLangInfo('writemsg', 'colony_join_content', array('cname' => S::escapeChar($this->info['cname']), 'colonyurl' => $colonyurl))));
}
}