发布v2.7.0版本

This commit is contained in:
雨中磐石
2025-07-18 14:38:01 +08:00
parent d0c604e040
commit 5cec56526e
31 changed files with 235 additions and 204 deletions

View File

@@ -6,11 +6,11 @@
官网网站http://www.rockoa.com/
源码仅供学习二次开发使用,禁止二次发布,禁止用于商业用途出售等(违者必究)
版权Copyright @2016-2025 信呼开发团队
版本整理时间2025-05-27 23:59:59
版本号V2.6.9
版本整理时间2025-07-18 23:59:59
版本号V2.7.0
### V2.6.9更新说明
### V2.7.0更新说明
1、完善系统安全性。
2、更多升级日志详见http://www.rockoa.com/view_core.html

View File

@@ -1,3 +1,3 @@
<?php
//版本20250526
return '2.6.9';
//版本20250718
return '2.7.0';

View File

@@ -241,7 +241,6 @@ class downChajian extends Chajian{
$s2 = $s.'';
$lvlaraa = explode(',',' ,user(),found_rows,(),\',",select*from,select*,%20,<,>,\,');
$s = str_replace($lvlaraa, '', $s);
$s = str_replace(array('(',')'), array('',''), $s);
if($s!=$s2)$str = $s;
return $str;
}

View File

@@ -126,27 +126,27 @@ class htmlChajian extends Chajian{
{
if($lx=='')$lx='xls';
$borst = '.5pt';
$sty = 'style="white-space:nowrap;border:'.$borst.' solid #000000;font-size:12px;"';
$sty = 'style="white-space:nowrap;border:'.$borst.' solid #000000;font-size:12px;{0}"';
$s = '<html><head><meta charset="utf-8"><title>'.$title.'</title></head><body>';
$s .= '<table border="0" style="border-collapse:collapse;">';
$hlen = 1;
$s1='<tr height="30"><td '.$sty.'>序号</td>';
$s1='<tr height="30"><td '.$this->getstyle($sty).'>序号</td>';
foreach($headArr as $na){
$hlen++;
$s1.='<td '.$sty.'>'.$na.'</td>';
$s1.='<td '.$this->getstyle($sty).'>'.$na.'</td>';
}
$s1.='</tr>';
$s.='<tr height="40"><td '.$sty.' colspan="'.$hlen.'">'.$title.'</td></tr>';
$s.='<tr height="40"><td '.$this->getstyle($sty).' colspan="'.$hlen.'">'.$title.'</td></tr>';
$s.=$s1;
foreach($rows as $k=>$rs){
$atr = '';
if(isset($rs['trbgcolor']))$atr=' bgcolor="'.$rs['trbgcolor'].'"';
$s.='<tr height="26"'.$atr.'>';
$s.='<td align="center" '.$sty.'>'.($k+1).'</td>';
$s.='<td align="center" '.$this->getstyle($sty).'>'.($k+1).'</td>';
foreach($headArr as $kf=>$na){
$val = '';
if(isset($rs[$kf]))$val=$rs[$kf];
$s.='<td '.$sty.'>'.$this->execelval($val).'</td>';
$s.='<td '.$this->getstyle($sty,'mso-number-format:\@').'>'.$val.'</td>';
}
$s.='</tr>';
}
@@ -166,14 +166,20 @@ class htmlChajian extends Chajian{
$bo = $this->rock->createtxt(iconv('utf-8','gb2312',$url), $s);
return $url;
}
//超过11位的数字就会变型处理
private function execelval($str)
{
return $str;
if($str!=''){
if(is_numeric($str) && strlen($str)>11)$str=''.$str.'&nbsp;';
}
return $str;
}
private function getstyle($sty, $vs='')
{
return str_replace('{0}',$vs,$sty);
}

View File

@@ -134,9 +134,9 @@ class rockeditChajian extends Chajian{
/**
* 获取推送配置
*/
public function getwsinfo()
public function getwsinfo($cans)
{
$barr = $this->getdata('file','wsinfo');
$barr = $this->getdata('file','wsinfo', $cans);
if(!$barr['success'])return '';
return $barr['data'];
}

View File

@@ -405,6 +405,7 @@ appbacklocation=function(res){
js.dw.dwsuccess({
latitude:latitude,
longitude:longitude,
accuracy:accuracy
accuracy:accuracy,
address:res.address
});
}

View File

@@ -199,6 +199,7 @@ js.open=function(url,w,h,wina,can,wjcan){
if(!w)w=750;if(!h)h=500;
var l=(screen.width-w)*0.5,t=(screen.height-h)*0.5-50,rnd = parseInt(Math.random()*50);
if(rnd%2==0){l=l+rnd;t=t-rnd;}else{l=l-rnd;t=t+rnd;}
w = parseInt(w);h = parseInt(h);l = parseInt(l);t = parseInt(t);
if(!can)can={};
var s='resizable=yes,scrollbars=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no';
var a1={'left':''+l+'px','top':''+t+'px','width':''+w+'px','height':''+h+'px'};

View File

@@ -5,7 +5,7 @@
* homepage:www.rockoa.com
*/
var agentarr={},userarr={},grouparr={},cnum='',windowfocus=true,jietubool=false;
var agentarr={},userarr={},grouparr={},cnum='',windowfocus=true,jietubool=false,fileinfoa={};
var reim={
chatobj:{},
@@ -1487,6 +1487,7 @@ function chatcreate(cans){
this.showobj.perfectScrollbar();
if(this.sendinfo.uptypes)this.uptypes = this.sendinfo.uptypes;
if(this.sendinfo.uploadurl)this.upurl = this.sendinfo.uploadurl+'&laiyuan=web';
if(this.sendinfo.uploadinfo)fileinfoa[this.type] = this.sendinfo.uploadinfo;
this.showtitle();
}
this.loadci++;
@@ -1528,6 +1529,7 @@ function chatcreate(cans){
nfr1 = js.getoption('filesrc_'+frs.fileid+'');
if(nfr1)frs.thumbpath = nfr1;
}
if(frs)frs.type = this.type;
nr = this.contshozt(frs);
if(nr=='')nr= jm.base64decode(d.cont);
rnd = 'mess_'+sid+'';
@@ -1935,8 +1937,8 @@ function chatcreate(cans){
return;
}
var tm= this.upfilearr,conss='';
if(this.type=='gout')a.fileid = a.filenum;
f = a;
if(this.type=='gout' || this.type=='zixun')a.fileid = a.filenum;
f = a;a.type = this.type;
strformat.upsuccess(a);
if(js.isimg(f.fileext)){
conss = '[图片 '+f.filesizecn+']';
@@ -2188,6 +2190,7 @@ function chatcreate(cans){
}
if(d1.filename){
if(d1.filenum)d1.fileid = d1.filenum;
d1.type = this.type;
s1=strformat.contshozt(d1);
}
s+='<div class="lists" onclick="'+this.objstr+'.clickstar('+i+',this,event)" style="border-bottom-width:1px">';
@@ -2360,9 +2363,9 @@ strformat.openurl=function(dz){
}
}
strformat.clickfile=function(fid,lx){
strformat.clickfile=function(fid,lx, type){
if(isNaN(fid)){
reim.outgroup.fileopt(fid,lx);
reim.outgroup.fileopt(fid,lx,type);
}else{
js.fileopt(fid,lx);
}
@@ -2497,9 +2500,11 @@ reim.outgroup={
}
}
},
fileopt:function(id1,lx){
fileopt:function(id1,lx, type){
js.loading('加载中...');
reim.ajax(this.geturl('fileinfo'),{lx:lx,id:id1},function(ret){
var surl = this.geturl('fileinfo');
if(fileinfoa[type])surl = fileinfoa[type];
reim.ajax(surl,{lx:lx,id:id1},function(ret){
var da = ret.data,url = da.url;
js.unloading();
if(da.lx==1){

View File

@@ -102,7 +102,7 @@ reim.kefu = {
}
},
onmessage:function(d){
console.log(d);
//console.log(d);
var lx=d.type;
if(lx=='chehui'){
$('#qipaocont_mess_'+d.messid+'').html(js.getmsg(jm.base64decode(d.mess),'green'));

View File

@@ -1,11 +1,13 @@
/**
* 在线编辑获取内容的
* 在线编辑获取内容的20250606
*/
js.plugin_rockoffice = function(conf){
if(conf){
this.plugin_rockofficefileid= 0;
this.plugin_rockoffice_conf = conf;
this.plugin_rockofficeopen();
if(conf.erand)js.plugin_rockofficestartv();
}
}
@@ -26,7 +28,7 @@ js.plugin_rockofficeopen = function(){
};
ws.onerror = function(e){
js.plugin_rockofficebool = false;
//setTimeout('js.plugin_rockofficeopen()',3000);
js.plugin_rockofficetime = setTimeout('js.plugin_rockofficeopen()',5000);
};
ws.onmessage = function(evt){
js.plugin_rockofficebool = true;
@@ -41,9 +43,35 @@ js.plugin_rockofficemessage = function(d){
if(d.waitmsg)js.msg('wait',jm.base64decode(d.waitmsg));
if(d.msg)js.msg('success',jm.base64decode(d.msg));
if(d.xxtype=='glast'){
$.get('api.php?m=upload&a=editfileb&fileid='+d.fileid+'', function(s){
js.plugin_rockoffice_conf = '';
if(s)js.msg('success',s);
});
js.plugin_rockofficegetfile(d.fileid);
}
}
js.plugin_rockofficegetfile = function(fid){
if(this.plugin_rockofficefileid == fid)return;
this.plugin_rockofficefileid = fid;
$.get('api.php?m=upload&a=editfileb&fileid='+fid+'', function(s){
js.plugin_rockoffice_conf = '';
if(s)js.msg('success',s);
});
}
js.plugin_rockofficestart = function(){
var d = this.plugin_rockoffice_conf;
if(!d)return;
if(this.plugin_rockofficefileid == d.fileid)return;
$.get('api.php?m=upload&a=editfilec&fileid='+d.fileid+'&erand='+d.erand+'', function(s){
if(s=='start'){
js.msg('wait','获取编辑文件中...');
js.plugin_rockofficegetfile(d.fileid);
}
if(s=='wait'){
js.plugin_rockofficestartv();
}
});
}
js.plugin_rockofficestartv = function(){
clearTimeout(js.plugin_rockofficestarts);
js.plugin_rockofficestarts = setTimeout('js.plugin_rockofficestart()',10*1000);
}

View File

@@ -193,7 +193,7 @@ var strformat = {
}
if(snr){
nr+= '<div><img src="'+snr+'" onclick="strformat.clickimg(this)" id="jietuimg_'+nuid+'" width="150"></div>';
nr+= '<div><a onclick="im.upbase64(\''+nuid+'\')" href="javascript:;">[发送截图]</a>';
nr+= '<div><a onclick="im.upbase64(\''+nuid+'\');$(this).remove();" href="javascript:;">[发送截图]</a>';
}
nr+= '<div class="progresscls"><div id="progresscls_'+nuid+'" class="progressclssse"></div><div class="progressclstext" id="progresstext_'+nuid+'">0%</div></div>';
nr+= '<div id="progcanter_'+nuid+'"><a href="javascript:;" onclick="strformat.cancelup(\''+nuid+'\')">取消</a></div>';
@@ -256,6 +256,7 @@ var strformat = {
var s='',slx,sttr;
if(!d)return s;
if(!d.fileid)d.fileid=d.id;
var type = d.type;if(!type)type='';//会话类型
if(js.isimg(d.fileext)){
sttr='';
if(d.thumbpath){
@@ -275,7 +276,7 @@ var strformat = {
}else{
slx = d.fileext;if(!lj)lj='';
if(js.fileall.indexOf(','+slx+',')<0)slx='wz';
s='<table><tr><td><div class="qipaofile">'+d.fileext.toUpperCase()+'</div></td><td>'+d.filename+'<br><span style="font-size:12px;color:#888888">('+d.filesizecn+')&nbsp;&nbsp;<a href="javascript:;" onclick="strformat.clickfile(\''+d.fileid+'\',1)">下载</a>&nbsp;&nbsp;<a href="javascript:;" onclick="strformat.clickfile(\''+d.fileid+'\',0)">预览</a></span></td></tr></table>';
s='<table><tr><td><div class="qipaofile">'+d.fileext.toUpperCase()+'</div></td><td>'+d.filename+'<br><span style="font-size:12px;color:#888888">('+d.filesizecn+')&nbsp;&nbsp;<a href="javascript:;" onclick="strformat.clickfile(\''+d.fileid+'\',1,\''+type+'\')">下载</a>&nbsp;&nbsp;<a href="javascript:;" onclick="strformat.clickfile(\''+d.fileid+'\',0,\''+type+'\')">预览</a></span></td></tr></table>';
}
return s;
},

View File

@@ -96,7 +96,7 @@ class inputAction extends Action
}
if($oldrs)$this->rs = $oldrs;
$uaarr = $farrs = array();
$lvls = array('text','textarea','ditumap');
$lvls = array('textnot','textarea','ditumap');
foreach($fieldsarr as $k=>$rs){
$fid = $rs['fields'];
$fi1 = substr($fid, 0, 5);

View File

@@ -110,7 +110,8 @@ class mode_knowtraimClassAction extends inputAction{
$mdos = m('flow:knowtraim');
foreach($rows as $k=>$rs){
$zt = $mdos->getstatestr($rs['state']);
$rows[$k]['startdt'] = ''.substr($rs['startdt'],5,11).'至'.substr($rs['enddt'],5,11).'('.$zt.')';
//$rows[$k]['startdt'] = ''.substr($rs['startdt'],5,11).'至'.substr($rs['enddt'],5,11).'('.$zt.')';
$rows[$k]['startdt'] = ''.$rs['startdt'].'至'.$rs['enddt'].'('.$zt.')';
if($rs['fenshu']=='0' && $rs['isks']==0)$rows[$k]['fenshu']='';
if(!isempt($rs['ksedt']))$rows[$k]['ksedt'] = ''.substr($rs['kssdt'],5,11).'至'.substr($rs['ksedt'],5,11).'';
$strs = ($rs['isks']=='1') ? '<font color=green>已考试</font>' : '<font color=red>未考试</font>';

View File

@@ -70,6 +70,9 @@ $(document).ready(function(){
search:function(){
var s=get('key_{rand}').value;
a.setparams({key:s},true);
},
view:function(){
}
};
js.initbtn(c);

View File

@@ -798,6 +798,7 @@ class mode_'.$modenum.'ClassAction extends inputAction{
if($rows){
$flow = m('flow')->initflow($this->moders['num']);
$mbil = m('flowbill');
$mcom = m('company');
foreach($rows as $k=>$rs){
$zt = '';
if(isset($rs['status']))$zt = $rs['status'];
@@ -829,6 +830,13 @@ class mode_'.$modenum.'ClassAction extends inputAction{
}
$narr['status'] = $flow->getstatus($rs,'',$otehsr,1);
$narr['chushu'] = $flow->flogmodel->rows("`table`='".$flow->mtable."' and `mid`='".$rs['id']."'");
$comid = arrvalue($rs,'comid');
$narr['comid'] = $comid;
if($comid){
$cmrs = $mcom->getXinxi($rs['comid']);
if($cmrs)$narr['comid'] = $cmrs['id'].'.'.$cmrs['name'];
}
$arr[] = $narr;
}

View File

@@ -19,6 +19,8 @@ $(document).ready(function(){
text:'ID',dataIndex:'id',sortable:true
},{
text:'状态',dataIndex:'status',sortable:true
},{
text:'所属单位',dataIndex:'comid',sortable:true
},{
text:'处理记录',dataIndex:'chushu',renderer:function(v,d,i){
var s='&nbsp;';

View File

@@ -6,31 +6,34 @@ $(document).ready(function(){
if(!zt)zt='';
if(!mid)mid='0';
var bools=false;
var columns = [{
text:'模块',dataIndex:'modename'
},{
text:'部门',dataIndex:'deptname'
},{
text:'申请人',dataIndex:'name'
},{
text:'单号',dataIndex:'sericnum'
},{
text:'申请日期',dataIndex:'applydt',sortable:true
},{
text:'摘要',dataIndex:'summary',align:'left',renderer:function(v){
return '<div style="min-width:400px">'+v+'</div>';
}
},{
text:'操作人',dataIndex:'optname',sortable:true
}];
if(companymode)columns.push({text:'所属单位※',dataIndex:'comidname'});
columns.push({text:'状态',dataIndex:'status',sortable:true});
columns.push({text:'',dataIndex:'caozuo',callback:'opegs{rand}'});
var a = $('#view_{rand}').bootstable({
tablename:'flow_bill',params:{'atype':atype,'zt':zt,'modeid':mid},fanye:true,
url:publicstore('{mode}','{dir}'),checked:atype=='daib',
storeafteraction:'flowbillafter',storebeforeaction:'flowbillbefore',
columns:[{
text:'模块',dataIndex:'modename'
},{
text:'部门',dataIndex:'deptname'
},{
text:'申请人',dataIndex:'name'
},{
text:'单号',dataIndex:'sericnum'
},{
text:'申请日期',dataIndex:'applydt',sortable:true
},{
text:'摘要',dataIndex:'summary',align:'left',renderer:function(v){
return '<div style="min-width:400px">'+v+'</div>';
}
},{
text:'操作人',dataIndex:'optname',sortable:true
},{
text:'状态',dataIndex:'status',sortable:true
},{
text:'',dataIndex:'caozuo',callback:'opegs{rand}'
}],
columns:columns,
celldblclick:function(){
c.view();
},

View File

@@ -75,4 +75,17 @@ class companyClassModel extends Model
{
m('userract')->update("`company`='$name'","`companyid`='$id'");//员工合同
}
/**
* 所属单位名称
*/
public function comidname($comid)
{
if($comid && is_numeric($comid)){
$mors = $this->getXinxi($comid);
return arrvalue($mors, 'name');
}else{
return $comid;
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -173,7 +173,7 @@ class flow_gongClassModel extends flowModel
'order' => '`istop` desc,`optdt` desc',
'keywere' => $keywere,
'where' => $whyere,
'fields' => 'id,typename,optdt,title,optname,zuozhe,indate,recename,fengmian,mintou,`status`,`istop`,`appxs`'
'fields' => 'id,typename,optdt,title,optname,zuozhe,indate,recename,fengmian,mintou,`status`,`istop`,`appxs`,`comid`'
);
}

View File

@@ -37,7 +37,7 @@ class flow_userClassModel extends flowModel
$where.= " and instr(`deptpath`,'[$detpid]')>0";
}
return array(
'fields'=> '`name`,`id`,`id` as uid,`face`,`sort`,`deptallname`,deptpath,`ranking`,`tel`,`mobile`,`email`,`user`,num,workdate,sex,deptname,deptnames,superman,status,type,online,lastonline,isvcard,`companyid`',
'fields'=> '`name`,`id`,`id` as uid,`face`,`sort`,`deptallname`,deptpath,`ranking`,`tel`,`mobile`,`email`,`user`,num,workdate,sex,deptname,deptnames,superman,status,type,online,lastonline,isvcard,`companyid`,`comid`',
'order' => '`status` desc,`sort`',
'where' => $where
);

View File

@@ -136,6 +136,7 @@ class flowbillClassModel extends Model
$modename = $rs['modename'];
$summary = '';
$summarx = '';
$comidname = '';
$modenum = '';
$statustext = '记录不存在';
$statusstr = '不存在';
@@ -155,6 +156,7 @@ class flowbillClassModel extends Model
$rers = $this->db->getone('[Q]'.$rs['table'].'', $rs['mid']);
if($rers){
$tihsrs = $flow->rsreplace($rers, 2, null, 1);
$comidname = $tihsrs['comidname'];
$summary = $this->rock->reparr($mors['summary'], $tihsrs);
$summarx = $this->rock->reparr($mors['summarx'], $tihsrs);
@@ -190,6 +192,7 @@ class flowbillClassModel extends Model
if(!isempt($rs['checksm']))$cont.='<br>处理说明:'.$rs['checksm'].'';
}
}
if(ISMORECOM)$cont.='<br>所属单位※:'.$comidname.'';
$srows[]= array(
'title' => $title,
@@ -298,6 +301,7 @@ class flowbillClassModel extends Model
$modename = $rs['modename'];
$summary = '';
$modenum = '';
$comidname = '';
$statustext = '记录不存在';
$statuscolor= '#888888';
$ishui = 0;
@@ -319,6 +323,7 @@ class flowbillClassModel extends Model
$tihsrs = $flow->rsreplace($rers, 2, null, 1);
$summary = $this->rock->reparr($mors['summary'], $tihsrs);
$comidname = $tihsrs['comidname'];//所属单位
$nowsets = $rs['nowcheckname']; //当前审核人
$ztarr = $flow->getstatus($rers, $mors['statusstr'], $nowsets);
$statustext = $ztarr[0];
@@ -349,6 +354,7 @@ class flowbillClassModel extends Model
'modename' => $modename,
'modenum' => $modenum,
'summary' => $summary,
'comidname' => $comidname,
'status' => $statusstr
);
}

View File

@@ -113,6 +113,8 @@ class modeClassModel extends Model
}
}
}
$farr[] = array('name'=>arrvalue($chufarr, 'comidname', lang('所属单位※')),'fields'=>'comidname','islb'=>(ISMORECOM)?1:0);
$jgpstr = '<!--SCRIPTend-->';
$hstart = '<!--HTMLstart-->';

View File

@@ -163,6 +163,11 @@ class publicClassAction extends ActionNot{
$otype = (int)$this->get('otype','0');
$this->smartydata['id'] = $id;
$this->smartydata['otype'] = $otype;
$urlbj = getconfig('officebj_url');
//说明是自己部署编辑平台用旧的页面
if(!isempt($urlbj) && !contain($urlbj,'rockoa.com') && getconfig('systype') != 'dev')
$this->displayfile = ''.P.'/public/tpl_public_fileedit_old.html';
}
/**

View File

@@ -8,13 +8,14 @@
<script type="text/javascript" src="js/js.js"></script>
<script type="text/javascript" src="js/base64-min.js"></script>
<script>
var id = '<?=$da['id']?>',otype='<?=$da['otype']?>',nowda,ldata;
var id = '<?=$da['id']?>',otype='<?=$da['otype']?>',nowda,ldata,erand;
function initbody(){
erand = js.request('erand');//编辑号
js.setmsg('初始中...');
$.ajax({
type:'get',dataType:'json',
url:'api.php?m=upload&a=officeexists&id='+id+'&otype='+otype+'',
url:'api.php?m=upload&a=officeexists&id='+id+'&otype='+otype+'&erand='+erand+'',
success:function(ret){
if(ret.success){
var da = ret.data;

View File

@@ -0,0 +1,46 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>文档处理</title>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/js.js"></script>
<script>
var id = '<?=$da['id']?>',otype='<?=$da['otype']?>';
function initbody(){
var kei = 'fileid'+id+'';
var msg = sessionStorage.getItem(kei);
if(msg){
$('#zongmsgve').html('刚刚已经打开此文件<br><br><a href="javascript:;" onclick="js.reload()">重新进去</a><a href="javascript:;" onclick="js.back()">&lt;&lt;返回</a>');
sessionStorage.removeItem(kei,'');
return;
}
var url = 'api.php?m=upload&a=sendedit&id='+id+'&otype='+otype+'';
$.ajax({
type:'get',
url:url,
success:function(s){
var ret = js.decode(s);
if(ret.success){
var da = ret.data;
$('#msgview').html('跳转中...');
sessionStorage.setItem(kei,'trueabc');
js.location(da.url);
}else{
$('#msgview').html('<font color=red>'+ret.msg+'</font>');
}
},
error:function(e){
$('#msgview').html(e.responseText);
}
});
}
</script>
</head>
<body style="padding:0px;margin:0px;">
<div style="margin-top:20%" align="center" id="zongmsgve">
<img src="images/mloading.gif" align="absmiddle">&nbsp;<span id="msgview">处理中...</span>
</div>
</body>
</html>

View File

@@ -257,8 +257,8 @@ $(document).ready(function(){
<td align="right">文档在线编辑:</td>
<td class="tdinput">
<select id="officebj_{rand}" class="form-control"><option value="">安装客户端在线编辑插件</option><option value="1">官网提供在线编辑服务(官网VIP专用)</option></select>
<div id="divofficebj_key" style="display:none"><input placeholder="在线编辑key可不用设置" class="form-control" id="officebj_key_{rand}"></div>
<select id="officebj_{rand}" class="form-control"><option value="">安装客户端在线编辑插件</option><option value="1">官网提供在线编辑服务(按次收费)</option></select>
<div id="divofficebj_key" style="display:none"><input placeholder="在线编辑key可不用设置" class="form-control" id="officebj_key_{rand}"> <a target="_blank" href="<?=URLY?>view_onlineoffice.html">关于在线编辑说明</a></div>
</td>
</tr>

View File

@@ -32,8 +32,13 @@ class uploadClassAction extends apiAction
$this->returnjson($arr);
}
/**
* 从编辑文件中心获取最新编辑的文件20250610
*/
public function editfilebAction()
{
//用那个异步去获取(待开发)
$fileid = (int)$this->get('fileid','0');
$frs = m('file')->getone($fileid);
if(!$frs)return 'error';
@@ -58,6 +63,22 @@ class uploadClassAction extends apiAction
}
}
//判断是否编辑完成
public function editfilecAction()
{
$fileid = (int)$this->get('fileid','0');
$erand = $this->get('erand');
$frs = m('file')->getone($fileid);
if(!$erand || !$frs)return 'error';
$barr = c('rockedit')->getdata('file','editfilec', array(
'filekey' => getconfig('xinhukey'),
'filenum' => $frs['onlynum'],
'erand' => $erand
));
if($barr['success'])return $barr['data'];
return 'wait';
}
/**
* 这个是用来在线编辑文档上传的
@@ -378,9 +399,20 @@ class uploadClassAction extends apiAction
//编辑
if($type==2){
if(getconfig('officebj')=='1'){
$erand = rand(1000000,9999999);
$data['fileext']= 'rockedit';
$data['url'] = 'index.php?m=public&a=fileedit&id='.$fileid.'';
$data['editwsinfo'] = c('rockedit')->getwsinfo();
$data['url'] = 'index.php?m=public&a=fileedit&id='.$fileid.'&erand='.$erand.'';
$data['editwsinfo'] = c('rockedit')->getwsinfo(array(
'erand' => $erand,
'fileid'=> $fileid
));
/*
c('rockqueue')->push('rockoffice,gedit', array(
'erand' => $erand,
'cishu' =>1,
'fileid' =>$fileid,
'optid' => $this->adminid
), time() + 10);*/
}else{
if($ismobile==1)return returnerror('移动端不支持在线编辑');
$data['fileext']='rockoffice';
@@ -668,6 +700,7 @@ class uploadClassAction extends apiAction
'optid' => $this->adminid,
'otype' => $otype,
'fileext' => $frs['fileext'],
'erand' => $this->get('erand'),
'filename' => $this->rock->jm->base64encode($frs['filename']),
'optname' => $this->rock->jm->base64encode($this->adminname),
'face' => $this->rock->jm->base64encode(m('admin')->getface($urs['face'])),

View File

@@ -7,11 +7,15 @@ class uploawClassAction extends apiAction
}
/**
* 上传文件(外部信息收集使用的)
* 上传文件(外部信息收集使用的),弃用
*/
public function upfileAction()
{
if(!$_FILES)exit('sorry!');
return 'error0';
/*
$mid = (int)$this->get('mid','0');
$to = m('planm')->rows('`id`='.$mid.' and `type`=2 and `fenlei`=1 and `status`=1');
if($to==0 || !$_FILES)exit('sorry!');
$upimg = c('upfile');
$maxsize= (int)$this->get('maxsize', $upimg->getmaxzhao());//上传最大M
$uptypes= 'jpg|png|docx|doc|pdf|xlsx|xls|zip|rar';
@@ -21,5 +25,6 @@ class uploawClassAction extends apiAction
$arr = c('down')->uploadback($upses);
$arr['autoup'] = (getconfig('qcloudCos_autoup') || getconfig('alioss_autoup')) ? 1 : 0; //是否上传其他平台
return $arr;
*/
}
}

View File

@@ -10,63 +10,7 @@ class openmodhetongClassAction extends openapiAction
public function dataAction()
{
return retuenerror('20240429最新已弃用');
$mobile = $this->get('mobile');
$xcytype = $this->get('xcytype');
$openid = $this->get('openid');
$nickName = $this->jm->base64decode($this->get('nickName'));
$htdata = array();
$db = m('wxxcyus');
$uarr['mobile'] = $mobile;
$uarr['xcytype'] = $xcytype;
$uarr['openid'] = $openid;
$uarr['nickName'] = $nickName;
$uarr['province'] = $this->get('province');
$uarr['city'] = $this->get('city');
$uarr['gender'] = $this->get('gender');
$uarr['dingyue'] = $this->get('dingyue');
$uarr['avatarUrl'] = $this->jm->base64decode($this->get('avatarUrl'));
$where = "`openid`='$openid'";
if($db->rows($where)==0){
$uarr['adddt'] = $this->now;
$where='';
}else{
$uarr['optdt'] = $this->now;
}
$db->record($uarr, $where);
$custid = '0'; //客户id
$rows = m('customer')->getall("`mobile`='$mobile' and `status`=1",'id');
foreach($rows as $k=>$rs)$custid.=','.$rs['id'].'';
if($custid!='0'){
$htrows = m('custract')->getall('custid in('.$custid.')','custid,custname,id,startdt,enddt,signdt,type,money,num','id desc');
$dt = $this->rock->date;
foreach($htrows as $k=>$rs){
if($rs['startdt']>$dt){
$statustext='待生效';
$statuscolor='blue';
}else if($rs['startdt']<=$dt && $rs['enddt']>=$dt){
$statustext='生效中';
$statuscolor='green';
}else if($rs['enddt']<$dt){
$statustext='已过期';
$statuscolor='gray';
}
$htdata[] = array(
'id' => $rs['id'],
'name' => $rs['custname'],
'modenum' => 'custract',
'explain' => '金额:'.$rs['money'].',编号:'.$rs['num'].',有效期:'.$rs['startdt'].'→'.$rs['enddt'].'',
'statustext'=>$statustext,
'statuscolor'=>$statuscolor,
);
}
}
return returnsuccess(array(
'htdata' => $htdata,
));
}
/**
@@ -75,23 +19,6 @@ class openmodhetongClassAction extends openapiAction
public function customerAction()
{
return retuenerror('20240429最新已弃用');
$mobile = $this->get('mobile');
$xcytype = $this->get('xcytype');
$openid = $this->get('openid');
$sql = "select a.id,a.name,a.unitname,b.name as yewuname from [Q]customer a left join [Q]admin b on a.uid=b.id where a.`mobile`='$mobile' and a.`status`=1";
$rows = $this->db->getall($sql);
$custdata = array();
foreach($rows as $k=>$rs){
$custdata[] = array(
'id' => $rs['id'],
'name' => $rs['name'],
'modenum' => 'customer',
'explain' => '业务员:'.$rs['yewuname'].'',
);
}
return returnsuccess(array(
'custdata' => $custdata,
));
}
}

View File

@@ -10,70 +10,5 @@ class openxiangClassAction extends openapiAction
$this->showreturn('', '此页面弃用', 201);//2025-04-09
}
/**
* 详情
*/
public function dataAction()
{
$list['hetong'] = 'custract,customer'; //配置可读取模块
$num = $this->get('num');
$xcytype = $this->get('xcytype');
$mid = (int)$this->get('mid','0');
if(isempt($num) || !$xcytype || $mid==0)return returnerror('num isempt');
$kears = arrvalue($list, $xcytype);
if(!$kears)return returnerror('无效模块1');
if(!in_array($num,explode(',', $kears)))return returnerror('无效模块2');
$flow = m('flow')->initflow($num,$mid, false);
$barr['modename'] = $flow->modename;
$barr['btndata'] = array();
$barr['xiangdata']= array();
if(method_exists($flow,'openxiang')){
$lbarr = $flow->openxiang();
if(is_array($lbarr))foreach($lbarr as $k=>$v)$barr[$k]=$v;
}
return returnsuccess($barr);
}
/**
* 操作菜单
*/
public function optmenuAction()
{
$num = $this->get('num');
$xcytype = $this->get('xcytype');
$mid = (int)$this->get('mid','0');
$menuid = (int)$this->get('menuid','0');
$sm = c('check')->onlysql($this->jm->base64decode($this->get('sm')));
if(isempt($num) || !$xcytype || $mid==0)return returnerror('num isempt');
$flow = m('flow')->initflow($num,$mid, false);
$msg = $flow->optmenu($menuid,1,$sm);
if($msg!='ok')return returnerror($msg);
return returnsuccess($msg);
}
/**
* 下载文件
*/
public function downurlAction()
{
$id = (int)$this->get('id','0');
$openid = $this->get('openid');
if(isempt($openid))return;
if(m('wxxcyus')->rows("`openid`='$openid'")==0)return;
m('file')->show($id, true);
}
/**
* 返回文件详情
*/
public function fileinfoAction()
{
$id = (int)$this->get('id','0');
$openid = $this->get('openid');
if(isempt($openid))return returnerror('无效openid1');
if(m('wxxcyus')->rows("`openid`='$openid'")==0)return returnerror('无效openid');
$frs = m('file')->getone($id,'id,filename,filesize,fileext,filepath,filepathout');
return returnsuccess($frs);
}
}