发布v2.6.8版本
This commit is contained in:
@@ -7,13 +7,20 @@
|
||||
class JPushChajian extends Chajian{
|
||||
|
||||
|
||||
//-------------最新原生app推送app是1.2.3版本 和 最新app+---------------
|
||||
/**
|
||||
* -------------最新原生app推送app是1.2.3版本 和 最新app+---------------
|
||||
* title 没有base64的标题
|
||||
* desc 已经base64了
|
||||
* cont 原始的内容json
|
||||
* palias 可推送信息
|
||||
*/
|
||||
public function push($title, $desc, $cont, $palias)
|
||||
{
|
||||
|
||||
$uids = $palias['uids'];
|
||||
$alias2019 = $palias['alias2019'];
|
||||
$pushuids = $palias['pushuids']; //可以推送的用户ID
|
||||
$pushuids = $palias['pushuids']; //可以推送的用户ID 就是ispush=1
|
||||
$jparr = $palias['jparr']; //应用内消息
|
||||
$xmpush = c('xmpush');
|
||||
$hwpush = c('hwpush');
|
||||
$getui = c('getui');
|
||||
@@ -33,8 +40,8 @@ class JPushChajian extends Chajian{
|
||||
$xharr = array(
|
||||
'uids' => $uids,
|
||||
'title' => $this->rock->jm->base64encode($title),
|
||||
//'cont' => $this->rock->jm->base64encode($cont),
|
||||
'desc' => $desc,
|
||||
'jpreg' => arrvalue($palias, 'jpreg'),
|
||||
'systype'=> getconfig('systype')
|
||||
);
|
||||
|
||||
@@ -162,4 +169,27 @@ class JPushChajian extends Chajian{
|
||||
}
|
||||
return $stv;
|
||||
}
|
||||
|
||||
/**
|
||||
* 极光自定义消息发送20250105
|
||||
*/
|
||||
public function sendJpush($arr)
|
||||
{
|
||||
$receid = $arr['receid'];
|
||||
if(isempt($receid))return;
|
||||
$toregid= array();
|
||||
//$this->rock->debugs($arr,'sendJpush');
|
||||
$rows = m('logintoken')->getall('`uid` in('.$receid.') AND `online`=1 AND `ispush`=1');
|
||||
foreach($rows as $k=>$rs){
|
||||
$regid = arrvalue($rs,'regid');
|
||||
if(!isempt($regid))$toregid[] = $regid;
|
||||
}
|
||||
if(!$toregid)return;
|
||||
$runurl = c('xinhu')->geturlstr('jpushmess', array(
|
||||
'msgcont' => $this->rock->jm->base64encode(json_encode($arr)),
|
||||
'toregid' => join(',', $toregid)
|
||||
));
|
||||
$str = c('curl')->getcurl($runurl);
|
||||
return 'ok';
|
||||
}
|
||||
}
|
||||
@@ -110,6 +110,18 @@ class checkChajian extends Chajian{
|
||||
return preg_replace('/[a-zA-Z]/','', $str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 仅支持0-9A-Za-z - |
|
||||
* return boolean
|
||||
*/
|
||||
public function onlynoen($str)
|
||||
{
|
||||
$str1 = ''.$str.'';
|
||||
$bobg = preg_replace("/[a-zA-Z0-9_]/",'', $str1);
|
||||
$bobg = str_replace(array('-','|'),'', $bobg);
|
||||
return $bobg;
|
||||
}
|
||||
|
||||
/**
|
||||
* 替换空格
|
||||
*/
|
||||
@@ -133,4 +145,36 @@ class checkChajian extends Chajian{
|
||||
}
|
||||
return implode('', $strArr);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 判断是不是内网地址
|
||||
*/
|
||||
public function isneiurl($str)
|
||||
{
|
||||
$strt = strtolower($str);
|
||||
$strt = str_replace($strt, 'https:', 'http:');
|
||||
$nearr= array('localhost','127.0.0','192.','10.','172.');
|
||||
$bool = false;
|
||||
foreach($nearr as $ip){
|
||||
if(contain($str, 'http://'.$ip.'')){
|
||||
$bool = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $bool;
|
||||
}
|
||||
|
||||
/**
|
||||
* 过滤sql的
|
||||
*/
|
||||
public function onlysql($str)
|
||||
{
|
||||
$str = $this->rock->iconvsql($str);
|
||||
$str = str_replace('(','(', $str);
|
||||
$str = str_replace(')',')', $str);
|
||||
$str = str_replace(',',',', $str);
|
||||
return $str;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -76,7 +76,7 @@ class curlChajian extends Chajian{
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||
if($this->rock->HTTPweb)curl_setopt($ch, CURLOPT_USERAGENT, $this->rock->HTTPweb);
|
||||
if($this->rock->ip)$headarr['X-FORWARDED-FOR'] = $this->rock->ip;
|
||||
//if($this->rock->ip)$headarr['X-FORWARDED-FOR'] = $this->rock->ip;
|
||||
if($ishttps==1){
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
}
|
||||
@@ -114,7 +114,7 @@ class curlChajian extends Chajian{
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
//curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
||||
}
|
||||
if($this->rock->ip)$headarr['X-FORWARDED-FOR'] = $this->rock->ip;
|
||||
//if($this->rock->ip)$headarr['X-FORWARDED-FOR'] = $this->rock->ip;
|
||||
//设置head
|
||||
if($headarr){
|
||||
$heads = array();
|
||||
|
||||
@@ -197,6 +197,7 @@ class dateChajian extends Chajian
|
||||
|
||||
public function cnweek($date)
|
||||
{
|
||||
if(isempt($date))return '';
|
||||
$arr = array('日','一','二','三','四','五','六');
|
||||
return $arr[date('w', strtotime($date))];
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ class downChajian extends Chajian{
|
||||
$msg = '';
|
||||
$data = array();
|
||||
if(is_array($upses)){
|
||||
$noasyn = $this->rock->get('noasyn'); //=yes就不同步到文件平台
|
||||
$noasyn = $this->rock->get('noasyn');$noasyn = ''; //=yes就不同步到文件平台
|
||||
$noyaso = $this->rock->get('noyaso'); //=yes就不压缩
|
||||
$fileext= substr($upses['fileext'],0,10);
|
||||
$arrs = array(
|
||||
@@ -162,14 +162,28 @@ class downChajian extends Chajian{
|
||||
}
|
||||
}
|
||||
|
||||
$shuiyin = $this->rock->get('shuiyin');
|
||||
if($upses['picw']>$lw || $upses['pich']>$lh){
|
||||
$imgaa = c('image', true);
|
||||
$imgaa->createimg($thumbpath);
|
||||
$thumbpath = $imgaa->thumbnail($lw, $lh, 1);
|
||||
if(contain($thumbpath, 'reimchat'))$shuiyin = 'size';
|
||||
if($shuiyin=='size'){
|
||||
$imgaa->createimg($thumbpath);
|
||||
$imgaa->addwater($arrs['filesizecn']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($upses['picw'] == 0 && $upses['pich']==0)$thumbpath = '';
|
||||
$arrs['thumbpath'] = $thumbpath;
|
||||
|
||||
//有缩略图先上传到云里 && $this->rock->get('sysuptype')=='img'
|
||||
if($thumbpath){
|
||||
$tarr = $this->uploadBase($thumbpath);
|
||||
if($tarr['success'] && isset($tarr['url']))$arrs['thumbplat'] = $tarr['url'];
|
||||
}
|
||||
|
||||
$bo = $this->db->record('[Q]file',$arrs);
|
||||
if(!$bo)$this->reutnmsg($this->db->error());
|
||||
@@ -194,18 +208,38 @@ class downChajian extends Chajian{
|
||||
c('rockqueue')->sendfile($id, $stime);
|
||||
}
|
||||
|
||||
if(arrvalue($arrs, 'thumbplat')){
|
||||
$data['filepath'] = $arrs['thumbplat'];
|
||||
$data['thumbpath'] = $arrs['thumbplat'];
|
||||
}
|
||||
}else{
|
||||
$data['msg'] = $upses;
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 简单上传要调用
|
||||
*/
|
||||
private function uploadBase($path)
|
||||
{
|
||||
if(getconfig('qcloudCos_autoup')){
|
||||
return c('qcloudCos')->uploadFile($path);
|
||||
}else{
|
||||
if(getconfig('alioss_autoup')){
|
||||
$obj = c('alioss');
|
||||
if(method_exists($obj, 'uploadFile'))return $obj->uploadFile($path);
|
||||
}
|
||||
}
|
||||
return returnerror();
|
||||
}
|
||||
|
||||
//过滤特殊文件名
|
||||
private function replacefile($str)
|
||||
{
|
||||
$s = strtolower($str);
|
||||
$s2 = $s.'';
|
||||
$lvlaraa = explode(',','user(),found_rows,(),select*from,select*,%20,<,>');
|
||||
$lvlaraa = explode(',','user(),found_rows,(),select*from,select*,%20,<,>,\,');
|
||||
$s = str_replace($lvlaraa, '', $s);
|
||||
if($s!=$s2)$str = $s;
|
||||
return $str;
|
||||
|
||||
@@ -104,12 +104,12 @@ class imageChajian extends Chajian
|
||||
添加文字水印
|
||||
$str 添加文字
|
||||
*/
|
||||
public function addwater($str,$color='#000000',$size=20,$align='rb')
|
||||
public function addwater($str,$color='#000000',$size=5,$align='lt')
|
||||
{
|
||||
if(!$this->bool)return;
|
||||
$font = '../fonts/FZZHYJW.TTF'; //方正稚艺简体
|
||||
$lw = strlen($str)*($size/2);
|
||||
$lh = $size*0.5;
|
||||
$font = 'arial.ttf';
|
||||
$lw = strlen($str)*($size);
|
||||
$lh = $size*1.5;
|
||||
$color = $this->color($color,$this->img);
|
||||
$x = 2;
|
||||
$y = 2;
|
||||
@@ -129,7 +129,8 @@ class imageChajian extends Chajian
|
||||
$y = ($this->h - $lh) * 0.5;
|
||||
break;
|
||||
}
|
||||
imagettftext($this->img, $size,0, $x, $y, $color, $font, $str);
|
||||
//imagettftext($this->img, $size,0, $x, $y, $color, $font, $str);
|
||||
imagestring($this->img, $size, $x, $y, $str, $color);
|
||||
$sapath = str_replace('.'.$this->ext.'', '_water.'.$this->ext.'', $this->path);
|
||||
$sapath = $this->path;
|
||||
$this->saveas($sapath, $this->img);//另存为
|
||||
|
||||
@@ -63,7 +63,7 @@ class inputChajian extends Chajian
|
||||
$str = '<input class="inputs" style="border:none;background:none" name="base_sericnum" value="'.$this->flow->createnum().'" readonly>';
|
||||
}
|
||||
if($fid=='file_content'){
|
||||
$str = '<input name="fileid" type="hidden" id="fileidview-inputEl"><div id="view_fileidview" style="width:98%;flex:1;height:auto;min-height:60px;border:1px #cccccc solid;border:var(--border); background:white;background:var(--main-bgcolor);border-radius:5px;;overflow:auto"></div><div id="fileupaddbtn"><a href="javascript:;" class="blue" onclick="c.upload()"><u>+添加文件</u></a></div>';
|
||||
$str = '<input name="fileid" type="hidden" id="fileidview-inputEl"><div id="view_fileidview" style="height:auto;min-height:60px;border:1px #cccccc solid;border:var(--border); background:white;background:var(--main-bgcolor);border-radius:5px;;overflow:auto"></div><div id="fileupaddbtn"><a href="javascript:;" class="blue" onclick="c.upload()"><u>+添加文件</u></a></div>';
|
||||
}
|
||||
|
||||
if($fid=='删'){
|
||||
@@ -127,7 +127,7 @@ class inputChajian extends Chajian
|
||||
$onblue = ' onblur="c.inputblur(this, '.$iszb.')"';
|
||||
$iszhang= false;
|
||||
if($type=='text' && !isempt($data)){
|
||||
$attr.=' onkeyup="c.autocomplete(this,\''.$data.'\','.$a['id'].', '.$iszb.',event)" onclick="this.onkeyup()"';
|
||||
$attr.=' onclick="c.autocomplete(this,\''.$data.'\','.$a['id'].', '.$iszb.',event)"';
|
||||
}
|
||||
$str = '<input class="inputs" type="text" value="'.$val.'" '.$attr.''.$onblue.''.$styles.''.$lenstr.' name="'.$fname.'">';
|
||||
|
||||
@@ -211,6 +211,7 @@ class inputChajian extends Chajian
|
||||
if($iszb>0)$zbnae = ''.($iszb-1).''.$leox.'';
|
||||
$str = '<div class="btn-group"><input '.$attr.''.$onblue.''.$styles.''.$lenstr.' class="inputs" style="flex:1" value="'.$val.'" type="text" name="'.$fname.'">';
|
||||
if($isbt=='0')$str .= '<button onclick="c.selectmapclear(\''.$fname.'\',\''.$zbnae.'\','.$iszb.')" class="webbtn" type="button">x</button>';
|
||||
if(contain($this->rock->HTTPweb, 'XINHUOAAPP'))$str .= '<button onclick="c.selectlocation(\''.$fname.'\',\''.$zbnae.'\','.$iszb.')" class="webbtn" type="button">定位</button>';
|
||||
$str .= '<button type="button" onclick="c.selectmap(\''.$fname.'\',\''.$zbnae.'\',\''.$fieldname.'\','.$iszb.')" class="webbtn">选</button></div>';
|
||||
}
|
||||
if($type=='htmlediter'){
|
||||
@@ -384,6 +385,7 @@ class inputChajian extends Chajian
|
||||
$barr[] = array(
|
||||
'name' => $rs[1],
|
||||
'value' => $rs[0],
|
||||
'color' => $rs[2]
|
||||
);
|
||||
}
|
||||
$fopt = $barr;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
//腾讯地图的。
|
||||
class mapqqChajian extends Chajian{
|
||||
|
||||
private $mapqq_key = '';
|
||||
@@ -12,7 +13,7 @@ class mapqqChajian extends Chajian{
|
||||
{
|
||||
$key = getconfig('qqmapkey');
|
||||
if(!$key){
|
||||
$key = $this->rock->jm->base64decode('NTVRQlotSkdZTE8tQkFMV1gtU1pFNEgtNVNWNUstSkNGVjc:');
|
||||
$key = $this->rock->jm->base64decode('T0I0QlotRDRXM1UtQjdWVk8tNFBKV1ctNlRLREotV1BCNzc:');
|
||||
}else{
|
||||
$this->mapqq_key = $key;
|
||||
}
|
||||
|
||||
@@ -48,6 +48,33 @@ class qcloudCosChajian extends Chajian{
|
||||
return $ret;
|
||||
}
|
||||
|
||||
//上传
|
||||
public function uploadFile($path)
|
||||
{
|
||||
$ret = $this->upload(ROOT_PATH.'/'.$path,'', $path);
|
||||
if(!$ret)return returnerror();
|
||||
if(!isset($ret['url']))return returnerror();
|
||||
$barr = returnsuccess();
|
||||
$barr['url'] = $ret['url'];
|
||||
return $barr;
|
||||
}
|
||||
|
||||
/**
|
||||
* 简单上传要调用
|
||||
*/
|
||||
public function uploadBase($path)
|
||||
{
|
||||
if(getconfig('qcloudCos_autoup')){
|
||||
return $this->uploadFile($path);
|
||||
}else{
|
||||
if(getconfig('alioss_autoup')){
|
||||
$obj = c('alioss');
|
||||
if(method_exists($obj, 'uploadFile'))return $obj->uploadFile($path);
|
||||
}
|
||||
}
|
||||
return returnerror();
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建文件夹
|
||||
*/
|
||||
|
||||
@@ -98,58 +98,33 @@ class rockfileChajian extends Chajian{
|
||||
*/
|
||||
public function uploadfile($fileid)
|
||||
{
|
||||
$frs = m('file')->getone($fileid);
|
||||
$fobj = m('file');
|
||||
$frs = $fobj->getone($fileid);
|
||||
if(!$frs)return returnerror('1');
|
||||
$path = ROOT_PATH.'/'.$frs['filepath'];
|
||||
if(!file_exists($path))return returnerror('404');
|
||||
$barr = $this->upload($path, array(
|
||||
|
||||
$url = $this->geturlstr('upload','upfile', array(
|
||||
'optid' => $frs['optid'],
|
||||
'noasyn' => 'no', //no和yes
|
||||
'fileexs' => $frs['fileext'],
|
||||
'optname' => $this->rock->jm->base64encode($frs['optname']),
|
||||
'filename' => $this->rock->jm->base64encode($frs['filename']),
|
||||
'optname' => $this->rock->jm->base64encode($frs['optname'])
|
||||
));
|
||||
if(!$barr['success'])return $barr;
|
||||
$data = $barr['data'];
|
||||
|
||||
$result = c('curl')->postcurl($url, array('file' => new CURLFile($path, '', $frs['filename'])), 1);
|
||||
if(!$result)return returnerror('errors');
|
||||
|
||||
if(substr($result,0,1)!='{')return returnerror($result);
|
||||
$data = json_decode($result, true);
|
||||
|
||||
$filenum = arrvalue($data, 'filenum');
|
||||
$thumbpath = arrvalue($data, 'thumbpath');
|
||||
if($filenum){
|
||||
$guar['filenum'] = $filenum;
|
||||
if($thumbpath)$guar['thumbplat'] = $thumbpath;
|
||||
m('file')->update($guar,$fileid);
|
||||
$guar['filenum'] = $filenum;
|
||||
if($fobj->isimg($frs['fileext']))$guar['thumbplat'] = $thumbpath;
|
||||
$fobj->update($guar,$fileid);
|
||||
unlink($path);
|
||||
$path = ROOT_PATH.'/'.$frs['thumbpath'];
|
||||
if($path && file_exists($path))unlink($path);
|
||||
}
|
||||
return $barr;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件(分割发送)
|
||||
*/
|
||||
public function upload($path,$upcs=array(), $fcs=0.5)
|
||||
{
|
||||
if(!file_exists($path))return returnerror('404');
|
||||
$oi = 0;
|
||||
$fp = fopen($path,'rb');
|
||||
$filesize= filesize($path);
|
||||
$fileext = c('upfile')->getext($path);
|
||||
$size = $fcs*1024*1024;
|
||||
$zong = ceil($filesize/$size);
|
||||
if($zong<=0)$zong = 1;
|
||||
$barr = false;
|
||||
$biaoshi = rand(100000,999999);
|
||||
while(!feof($fp)){
|
||||
$cont = fread($fp, $size);
|
||||
$conts= base64_encode($cont);
|
||||
$upcan= array('ci'=>$oi,'biaoshi'=>$biaoshi,'zong'=>$zong,'filesize' => $filesize,'fileext'=>$fileext);
|
||||
foreach($upcs as $k=>$v)$upcan[$k] = $v;
|
||||
$barr = $this->postdata('upfile','index', $conts, $upcan);
|
||||
if(!$barr['success'])break;
|
||||
$oi++;
|
||||
}
|
||||
fclose ($fp);
|
||||
if($barr)return $barr;
|
||||
return returnerror('无效文件');
|
||||
return returnsuccess();
|
||||
}
|
||||
}
|
||||
131
include/chajian/rockwxqyChajian.php
Normal file
131
include/chajian/rockwxqyChajian.php
Normal file
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
/**
|
||||
* 信呼企业微信平台
|
||||
* 2024-11-09
|
||||
*/
|
||||
|
||||
class rockwxqyChajian extends Chajian
|
||||
{
|
||||
private $platurl = '',$cnum = '';
|
||||
private $optionobj;
|
||||
|
||||
protected function initChajian()
|
||||
{
|
||||
$this->platurl = getconfig('rockwxqy_url');
|
||||
if(!$this->platurl){
|
||||
$this->platurl = $this->rock->jm->base64decode('aHR0cHM6Ly93eHF5LnJvY2tvYS5jb20v');
|
||||
}
|
||||
$this->optionobj = m('option');
|
||||
$this->cnum = $this->optionobj->getval('wxqyplat_cnum');
|
||||
}
|
||||
|
||||
public function isconfig()
|
||||
{
|
||||
if($this->cnum)return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public function geturlstr($act, $can=array(),$mact='')
|
||||
{
|
||||
$url = $this->platurl;
|
||||
$mode= 'wxqyopen';
|
||||
if($mact)$mode = $mact;
|
||||
$url.= 'index.php?a='.$act.'&m='.$mode.'';
|
||||
$url.= '&cnum='.$this->cnum.'&xinhukey='.getconfig('xinhukey').'';
|
||||
if(is_array($can))foreach($can as $k=>$v)$url.='&'.$k.'='.$v.'';
|
||||
return $url;
|
||||
}
|
||||
|
||||
public function getdata($act, $can=array(), $data=array())
|
||||
{
|
||||
if(!$this->cnum)return returnerror('未设置单位编号');
|
||||
$url = $this->geturlstr($act, $can);
|
||||
if($data){
|
||||
$cont = c('curl')->postcurl($url, $data);
|
||||
}else{
|
||||
$cont = c('curl')->getcurl($url);
|
||||
}
|
||||
$data = array('code'=>201,'success'=>false,'msg'=>'出错了返回:'.htmlspecialchars($cont).'');
|
||||
if($cont!='' && substr($cont,0,1)=='{'){
|
||||
$data = json_decode($cont, true);
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function postdata($act, $data=array(), $can=array())
|
||||
{
|
||||
return $this->getdata($act, $can, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发消息
|
||||
*/
|
||||
public function sendmess($id, $title, $mess, $url='',$picurl='')
|
||||
{
|
||||
$where = '`uid` in('.$id.')';
|
||||
if($id=='all')$where = '1=1';
|
||||
$rows = m('zwxqy_user')->getall(''.$where.' AND `state`=1','userid,agentid,cnum');
|
||||
if(!$rows)return returnerror('nouser');
|
||||
$sdata = array(
|
||||
'touser' => $rows,
|
||||
'title' => $this->rock->jm->base64encode($title),
|
||||
'mess' => $this->rock->jm->base64encode($mess),
|
||||
'url' => $this->rock->jm->base64encode($url),
|
||||
'picurl' => $this->rock->jm->base64encode($picurl),
|
||||
);
|
||||
return $this->postdata('sendmess', json_encode($sdata));
|
||||
}
|
||||
|
||||
/**
|
||||
* 快捷登录
|
||||
*/
|
||||
public function authlogin()
|
||||
{
|
||||
$backurl = $this->rock->get('backurl');
|
||||
$rs = m('zwxqy_user')->getone('`state`=1');
|
||||
if(!$rs){
|
||||
$url = '?d=we&m=login&errmsg='.$this->rock->jm->base64encode('没有激活的用户').'';
|
||||
}else{
|
||||
$url = $this->platurl.'?m=main&yyid='.$rs['agentid'].'';
|
||||
}
|
||||
if($backurl)$url.='&backurl='.$backurl.'';
|
||||
$this->rock->location($url);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取打卡记录(需要用异步)
|
||||
*/
|
||||
public function getcheckindata($uids='', $startdt='', $enddt='', $page=1)
|
||||
{
|
||||
$obj = m('weixinqy:daka');
|
||||
if(!method_exists($obj, 'savecheckindata'))return returnerror('未安装企业微信插件');
|
||||
|
||||
$where = '`uid` in('.$uids.') AND ';
|
||||
if($uids=='')$where = '';
|
||||
$rows = m('zwxqy_user')->getall(''.$where.'`state`=1','userid,uid');
|
||||
if(!$rows)return returnerror('没有激活的用户');
|
||||
$userids = $uids = $uarrs = array();
|
||||
foreach($rows as $k=>$rs){
|
||||
$userids[] = $rs['userid'];
|
||||
$uids[] = $rs['uid'];
|
||||
$uarrs[$rs['userid']] = $rs['uid'];
|
||||
}
|
||||
$sdata = array(
|
||||
'userids' => $userids,
|
||||
'uids' => $uids,
|
||||
'startdt' => $startdt,
|
||||
'enddt' => $enddt,
|
||||
);
|
||||
$barr = $this->postdata('checkindata', json_encode($sdata));
|
||||
if(!$barr['success'])return $barr;
|
||||
$this->rock->debugs($barr['data'],'djcheckdata');
|
||||
$data = $barr['data'];
|
||||
if(isset($data['checkindata'])){
|
||||
$obj->savecheckindata($data, $uarrs);
|
||||
}
|
||||
if(isset($data['hardwaredata'])){
|
||||
$obj->hardwaredata($data['hardwaredata'], $uarrs);
|
||||
}
|
||||
return $barr;
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ class upfileChajian extends Chajian{
|
||||
private $jpgallext = '|jpg|png|gif|bmp|jpeg|'; //图片格式
|
||||
|
||||
//可上传文件类型,也就是不保存为uptemp的文件
|
||||
private $upallfile = '|doc|docx|xls|xlsx|ppt|pptx|pdf|swf|rar|zip|txt|gz|wav|mp3|avi|mp4|flv|wma|chm|apk|amr|log|json|cdr|psd|';
|
||||
private $upallfile = '|doc|docx|xls|xlsx|ppt|pptx|pdf|swf|rar|zip|txt|gz|wav|mp3|avi|mp4|flv|wma|chm|apk|amr|log|json|cdr|psd|caf|wps|';
|
||||
|
||||
/**
|
||||
初始化
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user