信呼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,11 @@
<?php
/**
* 桌面首页项(底部版权提示)
* 我们系统的开源,你们可以直接使用,给点面子不,版权信息就留着吧不要去掉;当然拉,你不给面子可以去掉或修改。
* 欢迎来官网www.rockoa.com下咨询去掉了就无法在线升级了。
*/
defined('HOST') or die ('not access');
?>
<div class="tishi" align="center">Copyright &copy;<?=date('Y')?> &nbsp;<?=substr(URLY,7,-1)?> &nbsp;<?=TITLE?>v<?=VERSION?> &nbsp;版权所有:<a href="<?=URLY?>" id="homefooter" target="_blank">信呼开发团队</a></div>

View File

@@ -0,0 +1,23 @@
<?php
/**
* 桌面首页项(关于官网)
*/
defined('HOST') or die ('not access');
?>
<div align="left" class="list-group">
<div class="list-group-item list-group-item-success">
<i class="icon-phone"></i> <?=$itemnowname?>
</div>
<div class="list-group-item">
<div style="line-height:25px">
软件:信呼<br>
官网:<a href="<?=URLY?>" target="_blank"><?=URLY?></a><br>
版本V<?=VERSION?><br>
下载服务端PC客户端APP<a href="<?=URLY?>view_down.html" target="_blank">[去下载]</a><br>
声明:我们是开源的,请遵守我们的<a href="<?=URLY?>view_version.html" target="_blank">开源协议</a>,谢谢!<br>
帮助:提供开发帮助使用文档<a href="<?=URLY?>help.html" target="_blank">[查看]<a href="<?=URLY?>view_bidu.html" target="_blank">[必读]</a>
</div>
</div>
</div>

View File

@@ -0,0 +1,28 @@
<?php
/**
* 桌面首页项(我的申请)
*/
defined('HOST') or die ('not access');
?>
<script>
moemyapplylist=function(){
addtabs({num:'applymy',url:'main,fwork,bill,atype=my',icons:'align-left',name:'我的申请'});
}
homeobject.show_apply_list=function(a){
var s='',a1,i;
$('#myapplylist a[temp]').remove();
for(i=0;i<a.length;i++){
a1=a[i];
s+='<a style="TEXT-DECORATION:none" temp="list" onclick="openxiangs(\''+a1.modename+'\',\''+a1.modenum+'\',\''+a1.id+'\');" class="list-group-item">◇'+a1.cont+'</a>';
}
if(a1)$('#myapplylisttotal').html(a1.count);
$('#myapplylist').append(s);
}
</script>
<div align="left" id="myapplylist" style="min-width:300px" class="list-group">
<div class="list-group-item list-group-item-info">
<i class="icon-align-left"></i> <?=$itemnowname?>(<span id="myapplylisttotal">0</span>)
<a style="float:right;TEXT-DECORATION:none" onclick="moemyapplylist()">更多&gt;&gt;</a>
</div>
</div>

View File

@@ -0,0 +1,91 @@
<?php
/**
* 桌面首页项(便笺)
*/
defined('HOST') or die ('not access');
?>
<div align="left" style="min-width:300px" class="list-group">
<div class="list-group-item list-group-item-danger">
<i class="icon-edit"></i> <?=$itemnowname?>
<button type="btn" onclick="openinput('便笺','bianjian','','homebsbianjback')" class="btn btn-default btn-xs"><i class="icon-plus"></i> 新增</button>
<a style="float:right;TEXT-DECORATION:none" onclick="morebianjian()">更多&gt;&gt;</a>
</div>
<div class="list-group-item" style="padding:0">
<table width="100%">
<tr valign="top">
<td><div style="width:350px;height:290px" id="bianjian_view"></div></td>
<td width="100%">
<div align="center" style="line-height:40px;background:#f1f1f1"><span id="bianjianmonth"></span></div>
<div style="padding:5px" id="bianqianlists"></div>
<div style="color:#cccccc;margin-top:40px" id="bianqianlists22" align="center">无便笺内容</div>
</td>
</tr>
</table>
</div>
</div>
<script>
morebianjian=function(){
addtabs({num:'bianjian',url:'flow,page,bianjian,atype=my',icons:'edit',name:'我的便笺'});
}
homeobject.show_bianjian_list=function(a){
}
homeobject.bianjian_init=function(){
this.shownowdstr=function(dt1){
if(!this.bianjiandatass)return;
var ndts = this.bianjiandatass[dt1];
var str = '';
if(ndts)for(var i=0;i<ndts.length;i++){
str+='<div style="padding:5px 0px">['+ndts[i].time+']'+ndts[i].state+''+ndts[i].content+'</div>';
}
$('#bianqianlists').html(str);
$('#bianqianlists22').show();
if(str)$('#bianqianlists22').hide();
}
this.bianjianobjmb = $('#bianjian_view').rockcalendar({
height:280,
changemonth:function(y, m,o1){
$('#bianjianmonth').html('<font onclick="homeobject.bianjianobjmb.fanmonth(-1)"><i class="icon-double-angle-left"></i></font> <font onclick="homeobject.bianjianobjmb.nowmonth()">'+y+'年'+xy10(m)+'月</font> <font onclick="homeobject.bianjianobjmb.fanmonth(1)"><i class="icon-double-angle-right"></i></font>');
homeobject.bianjiangetdata(o1.dayobj[1].day,o1.dayobj[42].day);
},
renderer:function(day, s, s1,s2,col1,col2){
var s = '<div align="center" style="line-height:16px"><font color='+col1+'>'+s1+'</font><br><font temp="bianjian_'+day+'" color="red" style="font-size:10px;display:none">●</font></div>';
return s;
},
onclick:function(gY,gm,d){
var ndt = ''+gY+'-'+xy10(gm)+'-'+xy10(d)+'';
homeobject.nowtime = ndt;
homeobject.shownowdstr(ndt);
}
});
}
homeobject.bianjiangetdata=function(st1,st2){
js.ajaxbool = false;
js.ajax(publicmodeurl('bianjian','homedata'),{st1:st1,st2:st2},function(ret){
homeobject.bianjiangetshowdata(ret.rows);
},'get,json');
}
homeobject.bianjiangetshowdata=function(da){
this.bianjiandatass = da;
for(var d in da){
$('font[temp="bianjian_'+d+'"]').show();
}
this.shownowdstr(this.nowtime);
}
homebsbianjback=function(){
homeobject.bianjianobjmb.nowmonth();
}
</script>

View File

@@ -0,0 +1,28 @@
<?php
/**
* 桌面首页项(通知公告)
*/
defined('HOST') or die ('not access');
?>
<script>
moregonggao=function(){
addtabs({num:'gong',url:'flow,page,gong,atype=my',icons:'volume-up',name:'通知公告'});
}
homeobject.show_gong_list=function(a){
var s='',a1,i,col;
$('#homegonglist a[temp]').remove();
for(i=0;i<a.length;i++){
a1=a[i];
col=(a1.ishui==1)?'#aaaaaa':'';
s+='<a temp="list" style="color:'+col+';TEXT-DECORATION:none" onclick="openxiangs(\''+a1.typename+'\',\'gong\',\''+a1.id+'\');" class="list-group-item">◇【'+a1.typename+'】'+a1.title+'('+a1.indate+')</a>';
}
$('#homegonglist').append(s);
}
</script>
<div align="left" id="homegonglist" style="min-width:300px" class="list-group">
<div class="list-group-item list-group-item-info">
<i class="icon-volume-up"></i> <?=$itemnowname?>
<a style="float:right;TEXT-DECORATION:none" onclick="moregonggao()">更多&gt;&gt;</a>
</div>
</div>

View File

@@ -0,0 +1,26 @@
<?php
/**
* 桌面首页项(通知公告)
*/
defined('HOST') or die ('not access');
?>
<div align="left" class="list-group">
<div class="list-group-item list-group-item-default">
<i class="icon-comments-alt"></i> <?=$itemnowname?>
</div>
<div class="list-group-item">
<table style="background:none">
<tr valign="top">
<td>
<div style="line-height:26px;padding:5px;">结合了信呼OA系统单据待办推送提醒到个人微信和企业微信上也可快捷登录定位打卡部门用户同步等更多介绍<a href="<?=URLY?>view_weixinqy.html" target="_blank">[企业微信]</a>。<br>
1、申请企业微信体验去<a href="<?=URLY?>view_qywxty.html" target="_blank">[申请]</a>。<br>
2、可到【系统→系统工具→升级系统】下安装有问题<a target="_blank" href="http://kefu.rockoa.com/?m=front&a=chat&key=6f46a242ffa9&cfrom=oanet">[<i class="icon-headphones"></i>信呼客服]</a>
</div>
</td>
</tr></table>
</div>
</div>

View File

@@ -0,0 +1,49 @@
<?php
/**
* 桌面首页项(快捷入口)
*/
defined('HOST') or die ('not access');
?>
<script>
homeobject.showicons=function(a){
if(a.length%2!=0)a.push({name:'none'});
a.push({name:'刷新统计中...',icons:'refresh',num:'refresh',color:'#888888'});
this.menuarr = a;
var o = $('#kuailistdonw'),s='<table width="100%"><tr>',a1,oi=0,s1t='';
for(var i=0; i<a.length-1;i++){
oi++;
s1t= '';
a1 = a[i];
if(oi%2!=0)s1t='style="border-right:1px #dddddd solid"';
s+='<td width="50%" '+s1t+'>';
if(a1.name!='none'){
s+=' <a style="border-radius:0px;border:none;TEXT-DECORATION:none" onclick="opentabsshowshwo('+i+',this)" class="list-group-item"><font color="'+a1.color+'"><i class="icon-'+a1.icons+'"></i></font> &nbsp;'+a1.name+'<span badge="'+a[i].num+'" style="display:none;background:red" class="badge red"></span></a>';
}else{
s+=' <a style="border-radius:0px;border:none;" class="list-group-item">&nbsp;</a>';
}
s+='</td>';
if(oi%2==0)s+='</tr><tr style="border-top:1px #dddddd solid">';
}
s+='</tr></table>';
o.html(s);
}
opentabsshowshwo=function(oi,o1){
var a = homeobject.menuarr[oi];
if(a.num=='refresh'){
homeobject.refresh();
}else{
var anum = {num:a.num,url:a.url,name:a.name,icons:a.icons,id:a.id};
addtabs(anum);
}
return false;
}
</script>
<div class="panel panel-default">
<div class="panel-heading">
<div style="font-size:14px"><i class="icon-refresh"></i> <?=$itemnowname?>
<a style="float:right;TEXT-DECORATION:none" click="refresh" id="refresh_text">刷新</a>
</div>
</div>
<div id="kuailistdonw"></div>
</div>

View File

@@ -0,0 +1,41 @@
<?php
/**
* 桌面首页项(快捷入口)
*/
defined('HOST') or die ('not access');
?>
<script>
homeobject.showicons=function(a){
a.push({name:'刷新统计中...',icons:'refresh',num:'refresh',color:'#888888'});
this.menuarr = a;
var o = $('.rowaaaa'),s='',cols='';
o.html('');
for(var i=0; i<a.length;i++){
cols = a[i].color;
if(homestyle=='2')cols=maincolor;
s='';
s+='<div onclick="opentabsshowshwo('+i+')" align="center" style="cursor:pointer;width:135px;float:left;margin:10px 15px;background:'+cols+';border:none" onmouseover="this.style.opacity=0.8" onmouseout="this.style.opacity=1" class="thumbnail">';
s+=' <div style="position:relative;padding:15px 0px">';
s+=' <div style="color:white;font-size:36px"><i class="icon-'+a[i].icons+'"></i></div>';
s+=' <a style="TEXT-DECORATION:none;color:white" id="'+a[i].num+'_text">'+a[i].name+'</a>';
s+=' <span class="badge" badge="'+a[i].num+'" style="background:red;position:absolute;top:5px;right:5px;display:none"></span>';
s+=' </div>';
s+='</div>';
o.append(s);
}
}
opentabsshowshwo=function(oi,o1){
var a = homeobject.menuarr[oi];
if(a.num=='refresh'){
homeobject.refresh();
}else{
var anum = {num:a.num,url:a.url,name:a.name,icons:a.icons,id:a.id};
addtabs(anum);
}
return false;
}
</script>
<div class="rowaaaa" style="display:inline-block" align="left"></div>
<div class="blank10"></div>

View File

@@ -0,0 +1,104 @@
<?php
/**
* 桌面首页项(考勤打卡)
*/
defined('HOST') or die ('not access');
?>
<div align="left" class="list-group">
<div class="list-group-item list-group-item-default">
<i class="icon-time"></i> <?=$itemnowname?>
<a style="float:right;TEXT-DECORATION:none" href="javascript:;" onclick="moredakajili()">考勤表&gt;&gt;</a>
</div>
<div class="list-group-item">
<table style="background:none">
<tr>
<td width="190">
<div align="center">
<div id="nowtimess" style="font-size:30px">17:16:23</div>
<div class="blank10"></div>
<div id="nowtimess1" style="color:#888888">2017年01月17日(星期三)</div>
<div class="blank10"></div>
<div><input type="button" id="dabtn{rand}" value="打卡" class="btn btn-success"> &nbsp; <button type="button" onclick="homereload('daka')" class="btn btn-default">刷新</button></div>
</div>
</td>
<td>
<div class="wrap">今日打卡:<span id="dktime{rand}"></span></div>
<div id="daklistdtr">
<div class="blank5"></div>
<div>上班</div>
<div class="blank5"></div>
<div>下班</div>
</div>
</td>
</tr>
</table>
</div>
</div>
<script>
//初始化
homeobject.kqdk_init=function(){
$('#dabtn{rand}').click(function(){
adddakas(this);
});
this.timeshowcishu = 0;
function adddaka(o,dacs){
js.ajax('api.php?m=kaoqin&a=adddkjl',dacs, function(d){
if(d.code==200){
js.alert('打卡成功:'+d.data+'');
o.value = '打卡成功';
homeobject.timeshowcishu=0;
homereload();
}else{
js.msg('msg',d.msg);
o.disabled = false;
o.value='重试打卡';
}
},'get,json');
}
function adddakas(o){
o.disabled = true;o.value='打卡中...';
js.cliendsend('getipmac',{},function(ret){
adddaka(o,{ip:ret.ip,mac:ret.mac});
},function(){
adddaka(o,{});
return true;
});
}
}
//数秒显示时间
homeobject.showtime=function(){
var time = js.serverdt('Y年m月d日(星期W) H:i:s').split(' ');
$('#nowtimess').html(time[1]);
$('#nowtimess1').html(time[0]);
this.timeshowcishu++;
if(this.timeshowcishu==10){
var o = get('dabtn{rand}');
o.disabled=false;
}
}
homeobject.show_kqdk_list=function(a){
var sbarr = a.sbarr;
var s = '',i;
for(i=0;i<sbarr.length;i++){
s+='<div class="blank10"></div><div>'+sbarr[i].name+'('+sbarr[i].stime.substr(0,5)+'→'+sbarr[i].etime.substr(0,5)+')'+sbarr[i].state+'</div>';
}
$('#daklistdtr').html(s);
var dkarr = a.dkarr;
var s = '',i,oi=1;
for(i=0;i<dkarr.length;i++){
s+=','+dkarr[i].dktime+'';
oi++;
}
if(s!='')s=s.substr(1);
$('#dktime{rand}').html(s);
get('dabtn{rand}').value='第'+oi+'次打卡';
}
moredakajili=function(){
addtabs({url:'main,kaoqin,geren',name:'我的考勤表',num:'mykqbiao'});
}
</script>

View File

@@ -0,0 +1,49 @@
<?php
/**
* 桌面首页项(考勤统计)
*/
defined('HOST') or die ('not access');
?>
<script>
homeobject.show_kqtotal_list=function(arr){
if(typeof(echarts)=='undefined')return;
if(!this.myChartkqtotal)this.myChartkqtotal = echarts.init(get('kqtotal_list{rand}'));
var option = {
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b}: {c} ({d}%)"
},
legend: {
orient: 'vertical',
x: 'right',
data:arr.data
},
series: [
{
name:'出勤情况',
type:'pie',
radius: ['50%', '70%'],
itemStyle:{
normal:{
//color:function(params){
// return params.data.color;
//}
}
},
data:arr.rows
}
]
};
this.myChartkqtotal.setOption(option);
}
</script>
<div class="panel panel-default">
<div class="panel-heading">
<div class="panel-title"><?=$itemnowname?>(<?=$rock->date?>)</div>
</div>
<div class="panel-body">
<div id="kqtotal_list{rand}" style="height:250px;"></div>
</div>
</div>

View File

@@ -0,0 +1,28 @@
<?php
/**
* 桌面首页项(会议)
*/
defined('HOST') or die ('not access');
?>
<script>
moremeets=function(){
addtabs({num:'meet',url:'flow,page,meet,atype=today',name:'今日会议'});
}
homeobject.show_meet_list=function(a){
var s='',a1,i;
$('#homemeetlist a[temp]').remove();
for(i=0;i<a.length;i++){
a1=a[i];
s+='<a temp="list" style="TEXT-DECORATION:none;" onclick="openxiangs(\'会议\',\'meet\',\''+a1.id+'\');" class="list-group-item">◇'+a1.title+'</a>';
}
$('#homemeetlist').append(s);
}
</script>
<div align="left" id="homemeetlist" class="list-group">
<div class="list-group-item list-group-item-success">
<i class="icon-flag"></i> <?=$itemnowname?>
<a style="float:right;TEXT-DECORATION:none" onclick="moremeets()">更多&gt;&gt;</a>
</div>
</div>

View File

@@ -0,0 +1,77 @@
<?php
/**
* 桌面首页项(新闻资讯)
*/
defined('HOST') or die ('not access');
?>
<script>
morenewss=function(){
addtabs({num:'news',url:'flow,page,news,atype=my',icons:'volume-up',name:'新闻资讯'});
}
homeobject.show_news_list=function(a){
var s='',a1,i,typa = a.typearr,act,c1;
typa.unshift({'name':'新闻'});
for(i=0;i<typa.length;i++){
act='';
c1 = (i==0)?'0':'1';
if(i==0)act='active';
s+='<li tab="'+i+'" onclick="homeobject.clicknewstabs('+i+',\''+typa[i].name+'\')" class="'+act+'"><a style="TEXT-DECORATION:none; border-top:0; border-left-width:'+c1+'px;border-radius:0">'+typa[i].name+'</a></li>';
}
$('#newstabs_{rand}').html(s);
this.newsrows = [];
this.newsrows[0] = a.rows;
this.shownewsss(a.rows);
}
homeobject.clicknewstabs=function(oi,na){
if(get('losnew{rand}'))return;
var o1 = $('#newstabs_{rand}');
o1.find('li').removeClass('active');
o1.find('li[tab="'+oi+'"]').addClass('active');
var das = this.newsrows[oi];
if(typeof(das)=='undefined'){
$('#newstabs_{rand}').after('<div id="losnew{rand}" style="margin:10px" align="center"><img src="images/mloading.gif"></div>');
js.ajax(publicmodeurl('news','getnews'),{typename:na},function(ret){
homeobject.newsrows[oi]=ret;
homeobject.shownewsss(ret);
},'get,json');
}else{
this.shownewsss(das);
}
}
homeobject.shownewsss=function(das){
var i,s='',len=das.length,a1,c1,c2;
$('#homenewslist{rand} a[temp]').remove();
$('#losnew{rand}').remove();
for(i=0;i<len;i++){
a1 = das[i];
c1 = (i>0) ? '1' : '0';
c2 = (i==len-1) ? '0' : '1';
if(!isempt(a1.fengmian)){
s+='<a onclick="openxiangs(\''+a1.typename+'\',\'news\',\''+a1.id+'\');" style="TEXT-DECORATION:none;border-top-width:'+c1+'px;border-bottom-width:'+c2+'px;border-right:0;border-left:0" temp="list" class="list-group-item">';
s+='<table style="background:none"><tr>';
s+='<td style="padding-right:10px"><div style="height:80px;display:table-cell;overflow:hidden;vertical-align:middle"><img src="'+a1.fengmian+'" width="100"></div></td>';
s+='<td><h5 class="text-left">'+a1.title+'</h5><div><small>'+a1.smallcont+'</small></div></td>';
s+='</tr></table>';
s+='</a>';
}else{
s+='<a onclick="openxiangs(\''+a1.typename+'\',\'news\',\''+a1.id+'\');" style="TEXT-DECORATION:none;border-right:0;border-left:0;border-bottom-width:'+c2+'px;border-top-width:'+c1+'px" temp="list" class="list-group-item">◇【'+a1.typename+'】'+a1.title+'</a>';
}
}
$('#homenewslist{rand}').append(s);
}
</script>
<div class="panel panel-danger">
<div class="panel-heading">
<h3 class="panel-title"><i class="icon-globe"></i> <?=$itemnowname?>
<a style="float:right;TEXT-DECORATION:none" href="javascript:;" onclick="morenewss()">更多&gt;&gt;</a>
</h3>
</div>
<div class="panel-body" id="homenewslist{rand}" style="padding:0px">
<ul class="nav nav-tabs" id="newstabs_{rand}"></ul>
</div>
</div>

View File

@@ -0,0 +1,28 @@
<?php
/**
* 桌面首页项(公文查阅)
*/
defined('HOST') or die ('not access');
?>
<script>
moreofficic=function(){
addtabs({num:'officic',url:'flow,page,officic,atype=my',icons:'suitcase',name:'公文查阅'});
}
homeobject.show_officic_list=function(a){
var s='',a1,i,col;
$('#homeofficiclist a[temp]').remove();
for(i=0;i<a.length;i++){
a1=a[i];
col=(a1.ishui==1)?'#aaaaaa':'';
s+='<a temp="list" style="color:'+col+'" onclick="openxiangs(\'公文查阅\',\'officic\',\''+a1.id+'\');" class="list-group-item">◇ ['+a1.num+'] '+a1.title+'</a>';
}
$('#homeofficiclist').append(s);
}
</script>
<div align="left" id="homeofficiclist" style="min-width:300px" class="list-group">
<div class="list-group-item list-group-item-danger">
<i class="icon-suitcase"></i> 公文查阅
<a style="float:right" onclick="moreofficic();">更多&gt;&gt;</a>
</div>
</div>

View File

@@ -0,0 +1,29 @@
<?php
/**
* 桌面首页项(系统日志)
*/
defined('HOST') or die ('not access');
?>
<script>
openxtrilises=function(){
addtabs({num:'syslog',url:'system,cog,log',icons:'bookmark-empty',name:'日志查看'});
}
homeobject.show_syslog_list=function(a){
var s='',a1,i,atr;
$('#homesysloglist a[temp]').remove();
for(i=0;i<a.length;i++){
a1=a[i];
atr='';
if(a1.level=='2')atr='color:red';
s+='<a temp="list" style="TEXT-DECORATION:none;'+atr+'" class="list-group-item">◇【'+a1.type+'】'+a1.remark+'('+a1.optdt+')</a>';
}
$('#homesysloglist').append(s);
}
</script>
<div align="left" id="homesysloglist" class="list-group">
<div class="list-group-item list-group-item-default">
<i class="icon-bookmark-empty"></i> <?=$itemnowname?>
<a style="float:right;TEXT-DECORATION:none" onclick="openxtrilises()">更多&gt;&gt;</a>
</div>
</div>

View File

@@ -0,0 +1,50 @@
<?php
/**
* 桌面首页项(登录统计)
*/
defined('HOST') or die ('not access');
?>
<script>
homeobject.show_tjlogin_list=function(arr){
if(typeof(echarts)=='undefined')return;
if(!this.myCharttjlogina)this.myCharttjlogina = echarts.init(get('tjlogin_list{rand}'));
console.log(arr);
var option = {
tooltip: {
trigger: 'item',
formatter: "{b}: {c}人 ({d}%)"
},
legend: {
orient: 'vertical',
x: 'right',
data:arr.data
},
series: [
{
type:'pie',
radius: ['50%', '70%'],
itemStyle:{
normal:{
color:function(params){
return params.data.color;
}
}
},
data:arr.rows
}
]
};
this.myCharttjlogina.setOption(option);
}
</script>
<div class="panel panel-default">
<div class="panel-heading">
<div class="panel-title"><?=$itemnowname?>(<?=$rock->date?>)</div>
</div>
<div class="panel-body">
<div id="tjlogin_list{rand}" style="height:250px;"></div>
</div>
</div>

View File

@@ -0,0 +1,116 @@
<?php
class indexClassAction extends Action{
private function homeicons()
{
$myext = $this->getsession('adminallmenuid');
$where = '';
if($myext != '-1'){
$caids = str_replace(array('[',']'), array('',''), $myext);
if(isempt($caids))$caids='0';
$where = ' and `id` in('.$caids.')';
}
$mrows = m('menu')->getrows("`ishs`=1 and `status`=1 $where ", "`id`,`num`,`name`,`url`,`color`,`icons`",'`sort`');
return $mrows;
}
public function gettotalAjax()
{
$loadci = (int)$this->get('loadci','0');
$optdta = $this->get('optdt');
$optdt = $this->now;
$uid = $this->adminid;
$urs = m('admin')->getone("`id`='$uid' and `status`=1");
if(!$urs)exit('用户不存在');
$arr['optdt'] = $optdt;
$todo = m('todo')->rows("uid='$uid' and `status`=0 and `tododt`<='$optdt'");
$arr['todo'] = $todo;
$arr['reimstotal'] = 0;
if(getconfig('reim_show',true))$arr['reimstotal'] = m('reim')->getreimwd($uid);
if($loadci==0){
$arr['showkey'] = $this->jm->base64encode($this->jm->getkeyshow());
$arr['menuarr'] = $this->homeicons();
$arr['token'] = $this->admintoken;
$arr['authkey'] = $this->option->getval('auther_authkey');
$_key = substr(md5(URL.getconfig('randkey')),0,20);
$usedt = $this->option->getval($_key);
if(isempt($usedt)){
$usedt = $this->jm->base64encode(date('Y-m-d', time()+7*24*3600));
$this->option->setval($_key.'@-102', $usedt);
}
$arr['usedt'] = $usedt;
if(DB_USER=='root'){
$sqld = $this->db->getall('select @@global.sql_mode as total');
if($sqld){
$sqlmodel = $sqld[0]['total'];
$arr['sqlmodel'] = $sqlmodel;
$sqlsr = explode(',', $sqlmodel);
$kes = 'ONLY_FULL_GROUP_BY';
$nstr = array();
if(in_array($kes, $sqlsr))foreach($sqlsr as $_kt)if($_kt!=$kes)$nstr[]=$_kt;
if($nstr)$this->db->query("set @@global.sql_mode ='".join(',', $nstr)."'",false);
}
}
}
$s = $s1 = '';
if($loadci==0){
if($todo>0){
$s = '您还有<font color=red>('.$todo.')</font>条未读提醒信息;<a onclick="return opentixiangs()" href="javascript:">[查看]</a>';
$s1= '您还有('.$todo.')条未读提醒信息;';
}
}else{
m('dept')->online(1);//在线状态更新
if($todo>0){
$rows = m('todo')->getrows("uid='$uid' and `status`=0 and `optdt`>'$optdta' and `tododt`<='$optdt' order by `id` limit 3");
foreach($rows as $k=>$rs){
$s .= ''.($k+1).'、['.$rs['title'].']'.$rs['mess'].'。<br>';
$s1.= ''.($k+1).'、['.$rs['title'].']'.$rs['mess'].'。'."\n";
}
}
}
$msgar[0] = $s;
$msgar[1] = $s1;
$arr['msgar'] = $msgar; //右下角提示
//桌面项的数据和红数字统计
$itemsarr = m('homeitems')->getitemsdata($this->get('nums'));
foreach($itemsarr as $k=>$v)$arr[$k] = $v;
$arr['notodo'] = $this->option->getval('gerennotodo_'.$uid.'');
$arr['editpass']= m('admin')->iseditpass($uid);
$arr['miaoshu'] = (int)$this->option->getval('syshometime', '200');
$arr['tanwidth']= $this->option->getval('tanwidth', '900x800');
return $arr;
}
//显示手机版二维码
public function getqrcoresAjax()
{
if(!function_exists('ImageCreate')){
echo ''.URL.'?d=we';
}else{
echo 'ok';
}
}
public function getqrcodeAjax()
{
header("Content-type:image/png");
$urls= $this->rock->getouturl();
c('cache')->set('login'.$this->adminuser.'', $this->adminid, 300);
$url = ''.$urls.'?m=login&d=we&token='.$this->admintoken.'&user='.$this->jm->base64encode($this->adminuser).'';
if(COMPANYNUM)$url.='&dwnum='.COMPANYNUM.'';
$img = c('qrcode')->show($url);
echo $img;
}
}

View File

@@ -0,0 +1,230 @@
<?php
/**
* 桌面首页显示
*/
defined('HOST') or die ('not access');
?>
<script>
var todocontent = '',homeobject={},homenums=<?=json_encode($homearrs)?>;
</script>
<div style="padding:10px">
<?php
if(in_array('kjrko',$homearrs)){
$paths = ''.ROOT_PATH.'/'.P.'/home/desktop/items_kjrko.php';
if(file_exists($paths))include_once($paths);
}
?>
<div align="left">
<table style="background:none" border="0" width="100%" cellspacing="0" cellpadding="0">
<tr valign="top">
<?php
$bili = 100 / count($homeitems);
echo '<td width="'.$bili.'%">';
if(isset($homeitems[0]))foreach($homeitems[0] as $hi=>$hrs){
$itemnowname = $hrs['name'];
$paths = ''.ROOT_PATH.'/'.P.'/home/desktop/items_'.$hrs['num'].'.php';
if(file_exists($paths))include_once($paths);
}
echo '</td>';
for($i=1;$i<=3;$i++)if(isset($homeitems[$i])){
echo '<td width="'.$bili.'%" style="padding-left:20px;">';
foreach($homeitems[$i] as $hi=>$hrs){
$itemnowname = $hrs['name'];
$paths = ''.ROOT_PATH.'/'.P.'/home/desktop/items_'.$hrs['num'].'.php';
if(file_exists($paths))include_once($paths);
}
echo '</td>';
}
?>
</tr>
</table>
</div>
<?php
$paths = ''.ROOT_PATH.'/'.P.'/home/desktop/footer.php';
if(file_exists($paths))include_once($paths);
?>
</div>
<script>
$(document).ready(function(){
var optdt = '',loadci=0, taskarr={}, miao=200,reimtitle='REIM';
var c= {
itot:function(rlx){
clearTimeout(this.tims);
var nums = '',i;
for(i=0;i<homenums.length;i++){
nums+=','+homenums[i]+'';
}
if(!rlx)rlx='';
var url = js.getajaxurl('gettotal','index','home', {atype:rlx,loadci:loadci,optdt:optdt,nums:nums.substr(1)});
$('#refresh_text').html(this.bd2('5Yi35paw57uf6K6h5LitLi4u'));
js.ajaxbool =false;
js.ajax(url,{},function(da){
c.itots(da);
},'get,json');
homeobject.refresh=function(){c.refresh();};
},
init:function(){
this.itot();
var i,nust;
for(i=0;i<homenums.length;i++){
nust = homenums[i];
if(homeobject[''+nust+'_init'])homeobject[''+nust+'_init']();
}
},
refresh:function(){
this.itot();
},
bd2:function(s){
return jm.base64decode(s);
},
shumiao:function(oi){
clearTimeout(this.tims);
if(oi<=0){
this.itot();
}else{
$('#refresh_text').html(this.bd2('ezB956eS5ZCO5Yi35pawJmd0OyZndDs:').replace('{0}', oi));
this.tims = setTimeout(function(){c.shumiao(oi-1)},1000);
}
if(homeobject.showtime)homeobject.showtime();
},
auther:function(a){
if(HOST==this.bd2('MTI3LjAuMC4x') || HOST==this.bd2('bG9jYWxob3N0'))return;
var akey = a.authkey,usedt = a.usedt;
if(!usedt)return '5peg5pWI6K6.6Zeu';
if(usedt>=js.now())return;
if(!akey)return '6K!35YWI562!5o6I57O757uf5Zyo5L2.55So77yMPGEgaHJlZj0iaHR0cDovL3d3dy5yb2Nrb2EuY29tL3ZpZXdfYXV0aGVyLmh0bWwiIHRhcmdldD0iX2JsYW5rIj7luK7liqk8L2E!';
},
itots:function(a){
miao = a.miaoshu;
if(a.tanwidth)js.winiframewidth=a.tanwidth;
this.shumiao(miao);
loadci++;
optdt = a.optdt;
if(loadci==1){
jm.setJmstr(jm.base64decode(a.showkey));
admintoken = a.token;
if(homeobject.showicons)homeobject.showicons(a.menuarr);
var mts = this.auther(a);
if(mts)js.alert(this.bd2(mts));
}
var oi,i,nust;
for(i=0;i<homenums.length;i++){
nust = homenums[i];
if(a[''+nust+'arr']){
if(homeobject['show'+nust+'list'])homeobject['show'+nust+'list'](a[''+nust+'arr']);
if(homeobject['show_'+nust+'_list'])homeobject['show_'+nust+'_list'](a[''+nust+'arr']);
}
}
if(a.reimstotal=='0')a.reimstotal='';
$('#reim_stotal').html(a.reimstotal+'');
try{resizewh();}catch(e){}
if(a.reimstotal!='' && a.notodo!='1'){
notifyobj.show({
icon:'images/todo.png',title:''+reimtitle+'提醒',rand:'reimto',
body:'未读'+reimtitle+'消息('+a.reimstotal+')条',
click:function(){
openreim();
}
});
}
menubadge = a.total;
showmenubadge();
var s=a.msgar[0],s1=a.msgar[1];
if(s!=''){
todocontent = s;
var tx = this.opennewtx(1);
if(tx=='0' && a.notodo!='1'){
$('#tishidivshow').fadeIn();
$('#tishicontent').html(s);
notifyobj.showpopup(s1,{icon:'images/todo.png',rand:'systodo',title:this.bd2('57O757uf5o!Q6YaS'),click:function(b){
opentixiangs();
return true;
}});
}
}
if(a.editpass==0)this.showp();
}
}
c.opennewtx=function(lx){
return '0';
}
c.showp = function(){
loadmenu = clickmenu=function(){
js.msgerror(this.bd2('6K!35YWI5L!u5pS55a!G56CB5ZCO5Zyo5L2.55So'));
}
this.shumiao=function(){};
js.alert(this.bd2('57O757uf5byA5ZCv5by65Yi25L!u5pS55a!G56CB77yM6K!35YWI5L!u5pS55ZCO5Zyo5L2.55So'),this.bd2('5L!u5pS55a!G56CB5o!Q56S6'), function(){
addtabs({num:'grcog',url:'system,geren,cog,stype=pass',hideclose:true,name:c.bd2('5L!u5pS55a!G56CB'),icons:'lock'});
});
}
js.initbtn(c);
c.init();
opentixiangs=function(){
opentixiang();
hideTishi();
return false;
}
hideTishi=function(){
$('#tishidivshow').fadeOut();
return false;
}
openmobile=function(){
js.tanbody('loginmobile','登录手机版', 300,200,{
html:'<div style="height:160px;padding:5px" align="center"><div><img id="logeweerew" src="images/logo.png" width="130" height="130"></div><div>5分钟内直接扫一扫即可登录</div></div>'
});
var surl = js.getajaxurl('getqrcode','index','home'),surls = js.getajaxurl('getqrcores','index','home');
$.get(surls,function(ass){
if(ass!='ok'){
$('#logeweerew').parent().html('<div style="padding:10px 20px;text-align:left">未开启gd库不能生成二维码<br>可手机浏览器输入地址:<br>'+ass+'</div>');
}else{
get('logeweerew').src=surl;
}
});
}
homereload=function(rlx){
c.itot(rlx);
}
openreim=function(o1){
$('#reim_stotal').html('');
var str = reimtitle;
if(o1)str=strreplace($(o1).text());
var ops = js.openrun('reim','winfocus');
if(!ops){
js.cliendsend('focus',{},false,function(){
js.confirm('可能没有使用'+str+'的PC客户端是否打开网页版的',function(jg){
if(jg=='yes'){
js.open('?d=reim',260,530,'reim');
}
});
return true;
});
}else{
js.open('?d=reim',260,530,'reim');
}
}
notifyobj=new notifyClass({
title:'系统提醒',
sound:'web/res/sound/email.mp3',
sounderr:'',
soundbo:true,
showbool:true
});
});
</script>