webmain/task/runt/tonghuaAction.php

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
/**
*	语音通话
*	
*/
class tonghuaClassAction extends runtAction
{
	
	public function sendcpush($arr, $isnei=false)
	{
		$arr['msgtype'] = 'calltonghua';
		$arr['type']	= 'calltonghua';
		$reimobj 		= m('reim');
		$reimobj->pushserver('sendapp', $arr);
		$reimobj->pushserver('send', $arr);
		if($isnei)c('JPush')->sendJpush($arr);
	}

	/**
	*	呼叫发送
	*	http://192.168.1.2/app/xinhu/task.php?m=tonghua|runt&a=call&key=d9ydh2d8
	*/
	public function callAction()
	{
		$key 	= $this->getparams('key');
		$cishu 	= (int)$this->getparams('cishu','1');
		
		if($cishu>=15)return;
		if(!$key)return;
		$data = c('cache')->get($key);
		if(!$data)return;
		$channel = $data['channel'];
		$uid 	 = $data['uid'];
		$urs  = m('admin')->getone($uid);
		$thrs = m('im_tonghua')->getone("`channel`='$channel'");
		if(!$thrs)return;
		if($thrs['state']>0)return;
		$this->rock->adminid 	= $uid;
		$this->rock->adminname 	= $urs['name'];
		
		if($cishu==1){
			$typea= array('语音','视频');
			$cont = $this->jm->base64encode('['.$typea[$data['type']].'通话]');
			$pushcont = $this->jm->base64encode('邀请与您'.$typea[$data['type']].'通话...');
			m('reim')->sendinfor('user', $uid, $data['toid'], array(
				'optdt' => $thrs['adddt'],
				'cont'  => $cont,
				'pushcont'  => $pushcont,
				'msgid'  => $channel
			));
		}
		
		//每2秒呼叫一次
		$this->sendcpush(array(
			'adminid'	=> $uid,
			'adminname'	=> $urs['name'],
			'adminface' => m('admin')->getface($urs['face']),
			'th_type' 	=> $data['type'],
			'calltype'	=> 'call', 
			'th_channel' => $channel,
后面还有 75 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。