/** * 验证聊天双方是否合法,合法则返回双方的基本信息 * @param $fromuid * @param $touid * @param $serverid */ function ChatUser($fromuid, $touid, $serverid) { $chatcheck = new ChatAction(); $data = $chatcheck->getUserInfo($fromuid, $touid, $serverid); if (!is_array($data) && $data) { switch ($data) { case '1': $msg = '不能向自己发起聊天请求!'; break; case '2': $msg = '只有高级会员才可以发起在线聊天!'; break; case '3': $msg = '不能向同性会员发起在线聊天!'; break; case '4': $msg = '没有该会员!'; break; case '5': $msg = '你可能屏蔽了这个会员,不能发起在线聊天!'; break; case '6': $msg = '对不起您不能模拟操作!'; break; case '7': $msg = '请先登录!'; break; case '8': $msg = '用户的用户ID为空!'; break; default: $msg = '操作错误!'; break; } $return = array('msg' => $msg, 'status' => 0); } else { $return = array('data' => $data, 'status' => 1); } return $return; }
public function _initialize(){ parent :: _initialize(); $this -> assign('token', session('token')); }
function public_showmsg_three($uid) { /* if(!in_array($uid,array('30002761','30017759'))){ global $_MooClass, $dbTablePre; $msg = $_MooClass ['MooMySQL']->getOne ( "select s_fromid from {$dbTablePre}service_chat where s_uid='$uid' and s_status=0 and s_time>" . mktime ( 0, 0, 0, date ( 'm', time () ), date ( 'd', time () ), date ( 'Y', time () ) ) ,true); if ($msg) { return $msg; } else { return 0; } }else{ */ include_once 'module/chat/ChatAction.class.php'; $chat = new ChatAction(); //$chat -> hasInlineChat($uid); $data = $chat->hasInlineChat($uid); if (is_array($data) && !empty($data)) { return $data; } else { return 0; } //} }
public function _initialize() { parent::_initialize(); }