信呼OA版本v2.3.8

This commit is contained in:
雨中磐石
2022-08-14 16:47:40 +08:00
parent 4640677d27
commit e3fcd913e3
1405 changed files with 133635 additions and 73 deletions

View File

@@ -0,0 +1,63 @@
<?php
/**
* 作者:信呼开发团队(雨中磐石)
* 官网http://www.rockoa.com
* 软件信呼OA
* REIM即使通信平台回调
*/
class reimplatClassAction extends apiAction{
public function initAction()
{
$this->display= false;
}
//平台上通知过来的数据
public function indexAction()
{
return 'success'; //这个用不到就直接返回了
$body = $this->getpostdata();
if(!$body)return;
$db = m('reimplat:dept');
$key = $db->gethkey();
$bodystr = $this->jm->strunlook($body, $key);
if(!$bodystr)return;
$data = json_decode($bodystr, true);
$msgtype = arrvalue($data,'msgtype');
$msgevent= arrvalue($data,'msgevent');
//用户状态改变停用
if($msgtype=='subscribe'){
$user = arrvalue($data, 'user');
$zt = '0';
if($msgevent=='yes')$zt = '1';
if($msgevent=='stop')$zt = '2';
$db->update('`status`='.$zt.'',"`user`='$user'");
}
//修改手机号
if($msgtype=='editmobile'){
$user = arrvalue($data, 'user');
$mobile = arrvalue($data, 'mobile');
$where = "`user`='$user'";
$upstr = "`mobile`='$mobile'";
$db->update($upstr, $where);
$dbs = m('admin');
$dbs->update($upstr,$where);
$uid = $dbs->getmou('id',$where);
m('userinfo')->update($upstr,"`id`='$uid'");
}
//修改密码
if($msgtype=='editpass'){
$user = arrvalue($data, 'user');
$pass = arrvalue($data, 'pass');
if($pass && $user){
$where = "`user`='$user'";
$mima = md5($pass);
m('admin')->update("`pass`='$mima',`editpass`=`editpass`+1", $where);
}
}
}
}