信呼OA版本v2.3.8
This commit is contained in:
570
webmain/reim/chat/chat.js
Normal file
570
webmain/reim/chat/chat.js
Normal file
@@ -0,0 +1,570 @@
|
||||
js.apiurl = function(m,a,cans){
|
||||
var url='api.php?m='+m+'&a='+a+'&adminid='+adminid+'';
|
||||
url+='&cfrom=reim';
|
||||
if(!cans)cans={};
|
||||
for(var i in cans)url+='&'+i+'='+cans[i]+'';
|
||||
return url;
|
||||
}
|
||||
js.ajax = function(m,a,d,funs, mod,checs, erfs, glx){
|
||||
if(js.ajaxbool && !js.ajaxwurbo)return;
|
||||
clearTimeout(js.ajax_time);
|
||||
var url = js.apiurl(m,a);
|
||||
js.ajaxbool = true;
|
||||
if(!mod)mod='mode';
|
||||
if(typeof(erfs)!='function')erfs=function(){};
|
||||
if(typeof(funs)!='function')funs=function(){};
|
||||
if(!checs)checs=function(){};
|
||||
var bs = checs(d);
|
||||
if(typeof(bs)=='string'&&bs!=''){
|
||||
js.msg('msg', bs);
|
||||
return;
|
||||
}
|
||||
if(typeof(bs)=='object')d=js.apply(d,bs);
|
||||
var tsnr = '努力处理中...';
|
||||
if(mod=='wait')js.msg(mod, tsnr);
|
||||
function errsoers(ts){
|
||||
js.setmsg(ts);
|
||||
js.msg('msg',ts);
|
||||
js.ajaxbool = false;
|
||||
erfs(ts);
|
||||
}
|
||||
var type=(!d)?'get':'post';if(glx)type=glx;
|
||||
var ajaxcan={
|
||||
type:type,dataType:'json',data:d,url:url,
|
||||
success:function(ret){
|
||||
js.ajaxbool=false;
|
||||
clearTimeout(js.ajax_time);
|
||||
if(ret.code!=200){
|
||||
errsoers(ret.msg);
|
||||
}else{
|
||||
js.setmsg('');
|
||||
js.msg('none');
|
||||
funs(ret.data);
|
||||
}
|
||||
},
|
||||
error:function(e){
|
||||
errsoers('内部出错:'+e.responseText+'');
|
||||
}
|
||||
};
|
||||
$.ajax(ajaxcan);
|
||||
js.ajax_time = setTimeout(function(){
|
||||
if(js.ajaxbool){
|
||||
errsoers('Error:请求超时?');
|
||||
}
|
||||
}, 1000*30);
|
||||
}
|
||||
js.downshow=function(id){
|
||||
this.location('?id='+id+'&a=down');
|
||||
}
|
||||
|
||||
var im={
|
||||
minid:999999999,
|
||||
init:function(){
|
||||
strformat.emotspath='web/';
|
||||
this.type = receinfor.type;
|
||||
this.gid = receinfor.gid;
|
||||
this.showobj = $('#showview');
|
||||
this.inputobj = $('#contentss');
|
||||
this.loaddata();
|
||||
$('a[tools]').click(function(e){
|
||||
im.toolsclick(this,e);
|
||||
return false;
|
||||
});
|
||||
this.inputobj.focus();
|
||||
$('body').keydown(im.onkeydown);
|
||||
|
||||
this.showobj.mousewheel(function(e){
|
||||
im.mousewheel(e.deltaY);
|
||||
});
|
||||
this.resethie();
|
||||
$(window).resize(function(){
|
||||
im.resethie();
|
||||
});
|
||||
this.charcontobj = $.rockmenu({
|
||||
data:[],
|
||||
itemsclick:function(d){
|
||||
im.clickmenuss(d);
|
||||
}
|
||||
});
|
||||
this.initupfile();
|
||||
document.ondragover=function(e){e.preventDefault();};
|
||||
document.ondrop=function(e){e.preventDefault();};
|
||||
document.addEventListener('drop', function(e) {
|
||||
var files = e.dataTransfer;
|
||||
im.filedrop(files);
|
||||
}, false);
|
||||
},
|
||||
resethie:function(){
|
||||
var h = winHb()-40-30-80-40;
|
||||
this.showobj.css('height',''+h+'px');
|
||||
},
|
||||
submitinput:function(){
|
||||
try{im.sendcont();}catch(e){}
|
||||
return false;
|
||||
},
|
||||
mousewheel:function(lx){
|
||||
//向上
|
||||
if(lx==1){
|
||||
var t = this.showobj.scrollTop();
|
||||
if(t==0&&get('loadmored')&&!js.ajaxbool)this.loadmoreda(get('loadmored'));
|
||||
}
|
||||
},
|
||||
onkeydown:function(e){
|
||||
var code = e.keyCode;
|
||||
if(code==27){im.close();return false;}
|
||||
if(e.altKey){
|
||||
if(code == 67){im.close();return false;}
|
||||
if(code == 83){im.sendcont();return false;}
|
||||
}
|
||||
if(e.ctrlKey){
|
||||
if(code == 13){im.sendcont();return false;}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
toolsclick:function(o1,evt){
|
||||
var o = $(o1);
|
||||
var lx= o.attr('tools');
|
||||
if(lx=='send')this.sendcont();
|
||||
if(lx=='emts')this.getemts(o);
|
||||
if(lx=='clear')this.clearping();
|
||||
if(lx=='crop')im.cropScreen(false);
|
||||
if(lx=='close')this.close();
|
||||
if(lx=='file')this.sendfile(true);
|
||||
if(lx=='change')this.changesend(o);
|
||||
if(lx=='cropput')js.msg('msg','请使用快捷键Ctrl+V');
|
||||
},
|
||||
close:function(){
|
||||
window.close();
|
||||
},
|
||||
clearping:function(){
|
||||
this.showobj.html('');
|
||||
},
|
||||
getheight:function(ss){
|
||||
var hei = 50;if(!ss)ss=0;
|
||||
if(get('header_title'))hei+=50;
|
||||
return $(window).height()-hei+ss;
|
||||
},
|
||||
|
||||
//判断是否可以发消息
|
||||
sendbool:function(){
|
||||
var bo = true;
|
||||
if(receinfor.type=='group' && receinfor.innei==0)bo=false;
|
||||
if(!bo)js.msg('msg','你不在此会话中,不允许发送');
|
||||
return bo;
|
||||
},
|
||||
|
||||
loaddata:function(o1, iref){
|
||||
if(this.boolload)return;
|
||||
var iref = (!iref)?false:true;
|
||||
var minid= 0;
|
||||
if(iref)minid=this.minid;
|
||||
if(o1)$(o1).html('<img src="images/loadings.gif" height="14" width="15" align="absmiddle"> 加载中...');
|
||||
this.boolload = true;
|
||||
this.isshangla = false;
|
||||
js.ajax('reim','getrecord',{type:this.type,gid:this.gid,minid:minid,lastdt:''},function(ret){
|
||||
if(o1)$(o1).html('');
|
||||
im.boolload = false;
|
||||
im.loaddatashow(ret, iref);
|
||||
},'none', false,false,'get');
|
||||
},
|
||||
readinforshow:function(){
|
||||
//setTimeout('im.readinforshows()',1000*10);
|
||||
},
|
||||
readinforshows:function(){
|
||||
var minid=this.minid;
|
||||
js.ajax('reim','getrecord',{type:this.type,gid:this.gid,minid:0,lastdt:this.lastdt},function(ret){
|
||||
im.loaddatashow(ret, false, true);
|
||||
im.readinforshow();
|
||||
},'none', false,false,'get');
|
||||
},
|
||||
showdata:{},
|
||||
loaddatashow:function(ret,isbf, isls){
|
||||
var a = ret.rows;
|
||||
this.lastdt = ret.nowdt;
|
||||
$('#showviewload').remove();
|
||||
var i,len = a.length,cont,lex,nas,fase,nr,d,na=[],rnd,sid;
|
||||
$('#loadmored').remove();
|
||||
if(isbf){
|
||||
if(len>0)this.showobj.prepend('<div class="showblanks">---------↑以上是新加载---------</div>');
|
||||
na = a;
|
||||
}else{
|
||||
for(i= len-1; i>=0; i--)na.push(a[i]);
|
||||
}
|
||||
for(i= 0; i<len; i++){
|
||||
d = na[i];
|
||||
sid = parseFloat(d.id);
|
||||
lex = 'right';
|
||||
nas = '我';
|
||||
fase= adminface;
|
||||
if(d.sendid!=adminid){
|
||||
lex='left';
|
||||
nas= d.sendname;
|
||||
fase= d.face;
|
||||
}
|
||||
this.showdata[sid]=d;
|
||||
nr = this.contshozt(d.filers);
|
||||
if(nr=='')nr= jm.base64decode(d.cont);
|
||||
rnd = 'mess_'+sid+'';
|
||||
cont= strformat.showqp(lex,nas,d.optdt,nr ,'', fase, rnd);
|
||||
if(!isbf){
|
||||
this.addcont(cont, isbf);
|
||||
}else{
|
||||
this.showobj.prepend(cont);
|
||||
}
|
||||
$('#qipaocont_'+rnd+'').contextmenu(function(e){
|
||||
im.contright(this,e);
|
||||
return false;
|
||||
});
|
||||
if(sid<this.minid)this.minid=sid;
|
||||
}
|
||||
if(len>0 && !isls){
|
||||
var s = '<div id="histordiv" class="showblanks" >';
|
||||
if(ret.wdtotal==0){
|
||||
s+='---------↑以上是历史记录---------';
|
||||
if(len>=5){
|
||||
this.showobj.prepend('<div id="loadmored" class="showblanks" ><a href="javascript:;" onclick="im.loadmoreda(this)">点击加载更多...</a></div>');
|
||||
this.isshangla = true;
|
||||
}
|
||||
}else{
|
||||
s+='---↑以上是历史,还有未读信息'+ret.wdtotal+'条,<a href="javascript:;" onclick="im.loaddata(this)">点击加载</a>---';
|
||||
}
|
||||
s+='</div>';
|
||||
if(!isbf)this.addcont(s);
|
||||
if(isbf)this._addclickf();
|
||||
}
|
||||
},
|
||||
contright:function(o1,e){
|
||||
var o=$(o1),rnd=o.attr('rand');
|
||||
this.randmess = rnd;//,{name:'转发...',lx:4}
|
||||
var ids=rnd.replace('mess_',''),da=this.showdata[ids];
|
||||
this.rightdata = da;
|
||||
var d=[{name:'复制',lx:0},{name:'删除',lx:1},{name:'刷新',lx:5}];
|
||||
if(this.type=='group')d.push({name:'@TA',lx:3});
|
||||
|
||||
//if(da.sendid==adminid)d.push({name:'撤回',lx:6});
|
||||
|
||||
this.charcontobj.setData(d);
|
||||
this.charcontobj.showAt(e.clientX,e.clientY,130);
|
||||
},
|
||||
clickmenuss:function(d){
|
||||
var lx=d.lx;
|
||||
var ids=this.randmess.replace('mess_','');
|
||||
if(lx==0){
|
||||
var cont = $('#qipaocont_'+this.randmess+'').text();
|
||||
if(cont)this.addinput(cont);
|
||||
}
|
||||
if(lx==1){
|
||||
$('#ltcont_'+this.randmess+'').remove();
|
||||
|
||||
if(ids)js.ajax('reim','clearrecord',{type:this.type,gid:this.gid,ids:ids},false,'none');
|
||||
}
|
||||
if(lx==2){
|
||||
js.confirm('确定要清除1个月前的记录吗?',function(lx){
|
||||
if(lx=='yes')im.clearjilss(30);
|
||||
});
|
||||
}
|
||||
if(lx==3){
|
||||
var cont = $('#ltname_'+this.randmess+'').text();
|
||||
if(cont)this.addinput('@'+cont);
|
||||
}
|
||||
if(lx==4){
|
||||
js.changeuser(false,'usercheck','转发给...', {
|
||||
onselect:function(sna,sid){
|
||||
if(!sid)return;
|
||||
im.zhuangfa(sid, ids);
|
||||
}
|
||||
});
|
||||
}
|
||||
if(lx==5){
|
||||
location.reload();
|
||||
}
|
||||
if(lx==6){
|
||||
$('#qipaocont_'+this.randmess+'').html('撤回消息');
|
||||
}
|
||||
},
|
||||
//转发
|
||||
zhuangfa:function(touid, ids){
|
||||
|
||||
},
|
||||
clearjilss:function(d){
|
||||
js.ajax('reim','clearrecord',{type:this.type,gid:this.gid,day:d},function(s){
|
||||
js.msg('success','清除成功');
|
||||
});
|
||||
},
|
||||
loadmoreda:function(o1){
|
||||
this.loaddata(o1, true);
|
||||
},
|
||||
addcont:function(cont, isbf){
|
||||
var o = this.showobj;
|
||||
if(cont){if(isbf){o.prepend(cont);}else{o.append(cont);}}
|
||||
clearTimeout(this.scrolltime);
|
||||
this.scrolltime = setTimeout(function(){
|
||||
im.showobj.animate({scrollTop:get('showview').scrollHeight},100);
|
||||
im._addclickf();
|
||||
}, 50);
|
||||
},
|
||||
_addclickf:function(){
|
||||
var o = this.showobj.find('img[fid]');
|
||||
o.unbind('click');
|
||||
o.click(function(){
|
||||
im.clickimg(this);
|
||||
});
|
||||
},
|
||||
clickimg:function(o1){
|
||||
var o=$(o1);
|
||||
var fid=o.attr('fid');
|
||||
var src = o1.src.replace('_s.','.');
|
||||
$.imgview({url:src,ismobile:false});
|
||||
},
|
||||
contshozt:function(d){
|
||||
return strformat.contshozt(d,'web/');
|
||||
},
|
||||
sendcont : function(ssnr){
|
||||
if(js.ajaxbool || !this.sendbool())return;
|
||||
js.msg('none');
|
||||
var o = this.inputobj;
|
||||
var nr = strformat.sendinstr(o.val());
|
||||
nr = nr.replace(/</gi,'<').replace(/>/gi,'>').replace(/\n/gi,'<br>');
|
||||
if(ssnr)nr=ssnr;
|
||||
if(isempt(nr))return false;
|
||||
var conss = jm.base64encode(nr);
|
||||
if(conss.length>500){
|
||||
js.msg('msg','发送内容太多了');
|
||||
return;
|
||||
}
|
||||
var nuid= js.now('time'),optdt = js.serverdt();
|
||||
if(optdt==this.nowoptdt){
|
||||
js.msg('msg','消息发太快了');
|
||||
return;
|
||||
}
|
||||
this.nowoptdt = optdt;
|
||||
var cont= strformat.showqp('right','我',optdt, nr, nuid, adminface);
|
||||
this.addcont(cont);
|
||||
o.val('').focus();
|
||||
this.sendconts(conss, nuid, optdt, 0);
|
||||
return false;
|
||||
},
|
||||
sendconts:function(conss, nuid, optdt, fid){
|
||||
try{opener.reim.addhistory(this.type,this.gid,0,conss,optdt,adminname);}catch(e){}
|
||||
var d = {cont:conss,gid:this.gid,type:this.type,nuid:nuid,optdt:optdt,fileid:fid};
|
||||
js.ajax('reim','sendinfor',d,function(ret){
|
||||
im.sendsuccess(ret,nuid);
|
||||
},'none',false,function(){
|
||||
im.senderror(nuid);
|
||||
});
|
||||
},
|
||||
senderror:function(nuid){
|
||||
js.ajaxbool = false;
|
||||
get(nuid).src='images/error.png';
|
||||
get(nuid).title='发送失败';
|
||||
},
|
||||
sendsuccess:function(d,nuid){
|
||||
this.bool = false;
|
||||
if(!d.id){
|
||||
this.senderror(nuid);
|
||||
return;
|
||||
}
|
||||
$('#'+d.nuid+'').remove();
|
||||
var bo = false;
|
||||
d.messid=d.id;
|
||||
d.face = adminface;
|
||||
if(this.type=='group')d.gface=receinfor.face;
|
||||
var bo = serversend(d);
|
||||
//if(!bo)js.msg('msg','信息不能及时推送,但已保存到服务器');
|
||||
},
|
||||
addinput:function(s){
|
||||
var val = this.inputobj.val()+s;
|
||||
this.inputobj.val(val).focus();
|
||||
},
|
||||
initupfile:function(){
|
||||
if(typeof(uploadobj)=='undefined')uploadobj = $.rockupload({
|
||||
inputfile:'allfileinput',
|
||||
initpdbool:false,
|
||||
updir:'reimchat',
|
||||
onchange:function(f){
|
||||
im.sendfileshow(f);
|
||||
},
|
||||
onprogress:function(f,per,evt){
|
||||
strformat.upprogresss(per,im._sssnuid);
|
||||
},
|
||||
onsuccess:function(f,str,o1){
|
||||
im.sendfileok(f,str);
|
||||
},
|
||||
onerror:function(str){
|
||||
js.msg('msg', str);
|
||||
im.senderror(im.upfilearr.nuid);
|
||||
}
|
||||
});
|
||||
strformat.upobj = uploadobj;
|
||||
},
|
||||
sendfile:function(bo){
|
||||
if(!this.sendbool())return;
|
||||
if(bo)uploadobj.click();
|
||||
},
|
||||
filedrop:function(fobj){
|
||||
if(!this.sendbool())return;
|
||||
uploadobj.change(fobj);
|
||||
},
|
||||
//上传的文件预览显示
|
||||
sendfileshow:function(f, snr){
|
||||
if(!f)f={};
|
||||
f.face = adminface;
|
||||
var fa = strformat.showupfile(f, snr);
|
||||
var cont= fa.cont;
|
||||
this._sssnuid = fa.nuid;
|
||||
this._sssoptdt = fa.optdt;
|
||||
this.upfilearr = fa;
|
||||
this.addcont(cont);
|
||||
},
|
||||
sendfileok:function(f,str){
|
||||
var a=js.decode(str);
|
||||
if(!a.id){
|
||||
this.senderror(this._sssnuid);
|
||||
strformat.uperror(this._sssnuid);
|
||||
js.msg('msg', str);
|
||||
return;
|
||||
}
|
||||
var contss = strformat.upsuccess(a, this._sssnuid);
|
||||
this.sendconts(jm.base64encode(contss), this._sssnuid, this._sssoptdt, a.id);
|
||||
},
|
||||
fileyulan:function(pn,fid){
|
||||
var url = '?m=public&a=fileviewer&id='+fid+'';
|
||||
parent.js.open(url, 700, 500);
|
||||
},
|
||||
getemts:function(o){
|
||||
if(!get('aemtsdiv')){
|
||||
var s = '<div id="aemtsdiv" style="width:400px;height:200px;overflow-y:auto;border:1px #cccccc solid;background:white;box-shadow:0px 0px 5px rgba(0,0,0,0.3);left:3px;top:5px;position:absolute;display:none;z-index:6">';
|
||||
s+='<div style="padding:5px">';
|
||||
s+=this.getemtsbq('qq',0, 96, 11, 24);
|
||||
s+='</div>';
|
||||
s+='</div>';
|
||||
$('body').append(s);
|
||||
js.addbody('emts','hide','aemtsdiv');
|
||||
}
|
||||
var o1 = $('#aemtsdiv');
|
||||
o1.toggle();
|
||||
var off = o.offset();
|
||||
o1.css('top',''+(off.top-205)+'px');
|
||||
},
|
||||
getemtsbq:function(wj, oi1,oi2, fzd, dx){
|
||||
var i,oi=0,j1 = js.float(100/fzd);
|
||||
var s = '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
|
||||
for(i=oi1; i<=oi2; i++){
|
||||
oi++;
|
||||
s+='<td width="'+j1+'%" title="'+strformat.emotsarr[i+1]+'" align="center"><img onclick="im.backemts(\''+strformat.emotsarr[i+1]+'\')" src="web/images/im/emots/'+wj+'/'+i+'.gif" width="'+dx+'" height="'+dx+'"></td>';
|
||||
if(oi % fzd==0)s+='</tr><tr>';
|
||||
}
|
||||
s+='</tr></table>';
|
||||
return s;
|
||||
},
|
||||
backemts:function(s){
|
||||
this.addinput(s);
|
||||
$('#aemtsdiv').hide();
|
||||
},
|
||||
getpath:function(){
|
||||
if(!this.pathobj)this.pathobj = require('path');
|
||||
var oatg = this.pathobj.dirname(process.execPath);
|
||||
oatg = oatg.replace(/\\/g, '/');
|
||||
return oatg;
|
||||
},
|
||||
//截屏
|
||||
cropScreen:function(lx){
|
||||
if(nwjsgui){
|
||||
var oatg = this.getpath();
|
||||
nw.Shell.openItem(''+oatg+'/images/reimcaptScreen.exe');
|
||||
}else{
|
||||
js.msg('msg','无法截屏,请使用REIM客户端/第三方快捷键,<a href="http://www.rockoa.com/view_client.html" target="_blank">[去下载]</a>');
|
||||
return;
|
||||
}
|
||||
},
|
||||
readclip:function(evt){
|
||||
var clipboardData = evt.clipboardData;
|
||||
if(!clipboardData)return;
|
||||
for(var i=0; i<clipboardData.items.length; i++){
|
||||
var item = clipboardData.items[i];
|
||||
if(item.kind=='file'&&item.type.match(/^image\//i)){
|
||||
var blob = item.getAsFile(),reader = new FileReader();
|
||||
reader.onload=function(){
|
||||
var cont=this.result;
|
||||
im.sendfileshow(false, cont);
|
||||
}
|
||||
reader.readAsDataURL(blob);
|
||||
}
|
||||
}
|
||||
},
|
||||
upbase64:function(nuid,nus){
|
||||
var o = get('jietuimg_'+nuid+'');
|
||||
this.sendfile(false);
|
||||
uploadobj.sendbase64(o.src);
|
||||
},
|
||||
|
||||
//显示用户
|
||||
showuser:function(){
|
||||
var s = '<div id="showuserlist" style="height:160px;overflow:auto;padding:5px 10px"><div align="center" style="padding:10px;"><img src="images/mloading.gif" align="absmiddle"> 加载人员...</div></div>';
|
||||
js.tanbody('syscogshow','会话上人员',350,100,{html:s});
|
||||
js.ajax('reim','getgroupuser',{type:this.type,gid:this.gid},function(ret){
|
||||
im.showusershow(ret.uarr);
|
||||
},'none', false,false,'get');
|
||||
},
|
||||
showusershow:function(a){
|
||||
var i,len=a.length,s='',oi=0;
|
||||
|
||||
s+='<table width="100%"><tr>';
|
||||
for(i=0;i<len;i++){
|
||||
oi++;
|
||||
s+='<td width="20%"><div style="padding:5px" align="center"><div><img style="height:40px;width:40px;border-radius:50%" onclick="$.imgview({url:this.src})" src="'+a[i].face+'"></div><div style="color:#888888">'+a[i].name+'</div></div></td>';
|
||||
if(oi%4==0)s+='</tr><tr>';
|
||||
}
|
||||
s+='</tr></table>';
|
||||
$('#showuserlist').html(s);
|
||||
},
|
||||
|
||||
//邀请
|
||||
yaoqing:function(){
|
||||
if(this.type!='group')return;
|
||||
js.changeuser(false,'usercheck','邀请人到会话中', {
|
||||
onselect:function(sna,sid){
|
||||
if(!sid)return;
|
||||
im.yaoqings(sid);
|
||||
}
|
||||
});
|
||||
},
|
||||
yaoqings:function(sid){
|
||||
js.msg('wait','邀请中...');
|
||||
js.ajax('reim','yaoqinguid',{val:sid,gid:this.gid},function(da){
|
||||
if(da.indexOf('success')==0){
|
||||
var uids = da.replace('success','');
|
||||
js.alert('邀请成功','',function(){
|
||||
location.reload();
|
||||
});
|
||||
//if(uids != '')
|
||||
}else{
|
||||
js.msg('msg',da);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//退出会话
|
||||
exitgroup:function(){
|
||||
if(this.type!='group')return;
|
||||
js.confirm('确定要退出会话吗?',function(lx){
|
||||
if(lx=='yes'){
|
||||
im.exitgroups();
|
||||
}
|
||||
});
|
||||
},
|
||||
exitgroups:function(){
|
||||
js.msg('wait','退出中...');
|
||||
js.ajax('reim','exitgroup',{gid:this.gid}, function(da){
|
||||
js.alert('成功退出会话','',function(){
|
||||
try{opener.reim.exitgroup(im.gid)}catch(e){}
|
||||
im.close();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
strformat.clickfile=function(fid,lx){
|
||||
js.fileopt(fid,lx);
|
||||
}
|
||||
23
webmain/reim/chat/chatAction.php
Normal file
23
webmain/reim/chat/chatAction.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
class chatClassAction extends ActionNot{
|
||||
|
||||
public function initAction()
|
||||
{
|
||||
if($this->adminid==0){
|
||||
exit('登录已经失效了');
|
||||
}
|
||||
}
|
||||
|
||||
public function defaultAction()
|
||||
{
|
||||
$type = $this->get('type');
|
||||
$uid = (int)$this->get('uid');
|
||||
$db = m('reim');
|
||||
$arr = $db->getreceinfor($type, $uid);
|
||||
if(!isset($arr['name']))exit('error');
|
||||
$this->title = $arr['name'];
|
||||
if(isset($arr['utotal']))$this->title.='('.$arr['utotal'].')';
|
||||
$this->assign('arr', $arr);
|
||||
}
|
||||
|
||||
}
|
||||
139
webmain/reim/chat/tpl_chat.html
Normal file
139
webmain/reim/chat/tpl_chat.html
Normal file
@@ -0,0 +1,139 @@
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title><?=$da['title']?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"/>
|
||||
<link rel="stylesheet" type="text/css" href="<?=$da['p']?>/css/reim_index.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="<?=$da['p']?>/css/reim.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/css/chat.css"/>
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="<?=$arr['face']?>" />
|
||||
<script type="text/javascript" src="web/res/js/jquery.1.9.1.min.js"></script>
|
||||
<script type="text/javascript" src="js/js.js"></script>
|
||||
<script type="text/javascript" src="web/res/perfectscrollbar/jquery.mousewheel.js"></script>
|
||||
<script type="text/javascript" src="js/base64-min.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/strformat.js"></script>
|
||||
<script type="text/javascript" src="<?=$da['p']?>/<?=$da['d']?><?=$da['m']?>/<?=$da['m']?>.js"></script>
|
||||
<style>
|
||||
.showblanks{padding:10px;color:#aaaaaa;font-size:12px;text-align:center}
|
||||
.qipao .qipaocont{font-size:16px}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
var receinfor=<?=json_encode($arr)?>;
|
||||
js.servernow = '<?=$da['now']?>';
|
||||
function initbody(){
|
||||
adminid = '<?=$da['adminid']?>';
|
||||
adminname = '<?=$da['adminname']?>';
|
||||
adminface = js.getoption('loginface','images/noface.png');
|
||||
im.init();
|
||||
}
|
||||
function recemess(){
|
||||
im.readinforshows();
|
||||
}
|
||||
function serversend(a){
|
||||
var bo = false;
|
||||
try{bo = opener.reim.serversend(a);}catch(e){}
|
||||
return bo;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
<body style="overflow:hidden;" scroll="no">
|
||||
|
||||
|
||||
<table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div oncontextmenu="return false" class="gusertop gradient" style="height:40px;overflow:hidden">
|
||||
<div class="div01"><img style="background-color:#ffffff;border-radius:2px" id="uface" src="<?=$arr['face']?>" height="24" width="24"></div>
|
||||
<div class="div02">
|
||||
<?php
|
||||
echo $da['title'];
|
||||
if($arr['type']=='user'){
|
||||
echo '('.$arr['unitname'].'.'.$arr['ranking'].')';
|
||||
}else{
|
||||
$did = $arr['deptid'];
|
||||
if($did=='1')echo ' <span class="reimlabel">全员</span>';
|
||||
if($did>'1')echo ' <span class="reimlabel1">部门</span>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php if($arr['type']=='group' && $arr['innei']>0 && isempt($arr['deptid'])){?>
|
||||
<div title="退出会话" onclick="im.exitgroup()" class="div03">
|
||||
<i class="icon-signout"></i>
|
||||
</div>
|
||||
<div title="邀请" onclick="im.yaoqing()" class="div03">
|
||||
<i class="icon-plus"></i>
|
||||
</div>
|
||||
<?php }?>
|
||||
<div title="人员" onclick="im.showuser()" class="div03">
|
||||
<i class="icon-<?=$arr['type']?>"></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="100%" width="100%">
|
||||
|
||||
<table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td height="100%">
|
||||
<div id="showview" oncontextmenu="return false" style="height:100%;width:100%;overflow:auto">
|
||||
<div align="center" id="showviewload" style="padding:10px;"><img src="images/mloading.gif" align="absmiddle"> 加载历史记录...</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div oncontextmenu="return false" style="height:30px; background-color:#eeeeee;overflow:hidden">
|
||||
<div class="toolsliao">
|
||||
<a tools="emts" title="添加表情"><img src="web/images/im/emts.png"></a>
|
||||
|
||||
<a tools="file" title="发送图片/文件"><img src="web/images/im/files.png"></a>
|
||||
<a tools="crop" title="截屏"><img src="web/images/im/crop.png"></a>
|
||||
<a tools="cropput" title="粘贴截屏图片"><img src="web/images/im/crop1.png"></a>
|
||||
<a tools="clear" title="清屏"><img src="web/images/im/clear.png"></a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="height:80px;overflow:hidden;position:relative;margin-left:3px;" id="contentdiv"><textarea onpaste="im.readclip(event)" class="content" id="contentss"></textarea></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div oncontextmenu="return false" style="height:40px; background-color:#eeeeee;overflow:hidden">
|
||||
<div align="right" style="padding:9px">
|
||||
<a class="webbtn" title="快捷键:Alt+C/Esc" tools="close">关闭(C)</a>
|
||||
<a class="webbtn" title="快捷键:Alt+S" tools="send">发送(S)</a><a class="webbtn" style="padding-left:5px;padding-right:5px;border-left:1px #0572AD solid" tools="change">↓</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript" src="web/res/js/jquery-imgview.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/jquery-rockupload.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/jquery-changeuser.js"></script>
|
||||
<script type="text/javascript" src="web/res/mode/menu/jquery-rockmenu.js"></script>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="web/res/mode/menu/jquery-rockmenu.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/fontawesome/css/font-awesome.min.css">
|
||||
<!--[if IE 7 ]><link rel="stylesheet" type="text/css" href="web/res/fontawesome/css/font-awesome-ie7.min.css"><![endif]-->
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
63
webmain/reim/index/indexAction.php
Normal file
63
webmain/reim/index/indexAction.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
class indexClassAction extends ActionNot
|
||||
{
|
||||
public function initAction()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function defaultAction()
|
||||
{
|
||||
$ybarr = $this->option->authercheck();
|
||||
if(is_string($ybarr))return $ybarr;
|
||||
|
||||
if($this->adminid==0){
|
||||
$this->rock->location('?d=reim&m=login');
|
||||
}
|
||||
$this->title = getconfig('reimtitle','REIM');
|
||||
$my = $this->db->getone('[Q]admin', "`id`='$this->adminid'",'`face`,`id`,`name`,`ranking`,`deptname`,`deptallname`,`type`,`style`');
|
||||
|
||||
$this->smartydata['my'] = $my;
|
||||
$this->smartydata['face'] = $this->rock->repempt($my['face'], 'images/noface.png');
|
||||
}
|
||||
|
||||
public function xinAction()
|
||||
{
|
||||
$ybarr = $this->option->authercheck();
|
||||
if(is_string($ybarr))return $ybarr;
|
||||
|
||||
if($this->adminid==0){
|
||||
$this->rock->location('?d=reim&m=login&a=xin');
|
||||
}
|
||||
$this->title = getconfig('reimtitle','REIM');
|
||||
$my = $this->db->getone('[Q]admin', "`id`='$this->adminid'",'`face`,`id`,`name`,`ranking`,`deptname`,`deptallname`,`type`,`style`');
|
||||
|
||||
$this->smartydata['my'] = $my;
|
||||
$this->smartydata['face'] = $this->rock->repempt($my['face'], 'images/noface.png');
|
||||
$this->smartydata['logo'] = 'images/logo.png';
|
||||
$this->smartydata['showtitle'] = TITLE;
|
||||
|
||||
if(ISMORECOM){
|
||||
$companyinfo = m('admin')->getcompanyinfo($this->adminid, 1);
|
||||
$oaname = $companyinfo['oaname'];
|
||||
if(!isempt($oaname))$this->smartydata['showtitle'] = $oaname;
|
||||
$this->smartydata['logo'] = $companyinfo['logo'];
|
||||
}
|
||||
}
|
||||
|
||||
public function xinaAction()
|
||||
{
|
||||
$ybarr = $this->option->authercheck();
|
||||
if(is_string($ybarr))return $ybarr;
|
||||
|
||||
if($this->adminid==0){
|
||||
$this->rock->location('?d=reim&m=login&a=xina');
|
||||
}
|
||||
$this->xinAction();
|
||||
}
|
||||
|
||||
public function istsings()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
61
webmain/reim/index/tpl_index.html
Normal file
61
webmain/reim/index/tpl_index.html
Normal file
@@ -0,0 +1,61 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><?=$da['title']?></title>
|
||||
<meta name="description" content="">
|
||||
<meta name="keywords" content="">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
|
||||
<meta name="format-detection" content="telephone=no"/>
|
||||
<meta name="format-detection" content="email=no"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/fontawesome/css/font-awesome.min.css">
|
||||
<!--[if IE 7 ]><link rel="stylesheet" type="text/css" href="web/res/fontawesome/css/font-awesome-ie7.min.css"><![endif]-->
|
||||
<link rel="stylesheet" type="text/css" href="webmain/css/reim.css" />
|
||||
<link rel="stylesheet" type="text/css" href="webmain/css/reim_index.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/mode/menu/jquery-rockmenu.css"/>
|
||||
<link rel="shortcut icon" href="favicon.ico" />
|
||||
<script type="text/javascript" src="web/res/js/jquery.1.9.1.min.js"></script>
|
||||
<script type="text/javascript" src="js/js.js"></script>
|
||||
<script type="text/javascript" src="js/base64-min.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/nwjs.js"></script>
|
||||
<script type="text/javascript" src="web/res/mode/menu/jquery-rockmenu.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/notify.js"></script>
|
||||
<script type="text/javascript" src="js/reim.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/websocket.js"></script>
|
||||
<script type="text/javascript" src="web/res/perfectscrollbar/jquery.mousewheel.js"></script>
|
||||
<script type="text/javascript">
|
||||
js.servernow = '<?=$da['now']?>';
|
||||
PROJECT = '<?=$da['p']?>';
|
||||
adminip = '<?=$da['ip']?>';
|
||||
systitle = '<?=$da['title']?>';
|
||||
function globalbody(){
|
||||
adminid = '<?=$da['adminid']?>';
|
||||
adminface = '<?=$da['face']?>';
|
||||
adminname = '<?=$da['adminname']?>';
|
||||
adminuser = '<?=$da['adminuser']?>';
|
||||
deptallname = '<?=$da['my']['deptallname']?>';
|
||||
adminranking= '<?=$da['my']['ranking']?>';
|
||||
}
|
||||
|
||||
function initbody(){
|
||||
reim.show();
|
||||
}
|
||||
function winfocus(){
|
||||
window.focus();
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.reim_main{width:auto}
|
||||
</style>
|
||||
</head>
|
||||
<body style="overflow:hidden;" scroll="no">
|
||||
<div id="reim_viewshow">
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="web/res/js/jquery-imgview.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/jquery-rockupload.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
139
webmain/reim/index/tpl_index_xin.html
Normal file
139
webmain/reim/index/tpl_index_xin.html
Normal file
@@ -0,0 +1,139 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><?=$da['title']?></title>
|
||||
<meta name="description" content="">
|
||||
<meta name="keywords" content="">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
|
||||
<meta name="format-detection" content="telephone=no"/>
|
||||
<meta name="format-detection" content="email=no"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/fontawesome/css/font-awesome.min.css">
|
||||
<!--[if IE 7 ]><link rel="stylesheet" type="text/css" href="web/res/fontawesome/css/font-awesome-ie7.min.css"><![endif]-->
|
||||
<link rel="stylesheet" type="text/css" href="web/res/css/webimcss.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/perfectscrollbar/perfect-scrollbar.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/mode/menu/jquery-rockmenu.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/css/chat.css"/>
|
||||
<link rel="shortcut icon" id="ico" href="<?=$da['logo']?>" />
|
||||
<script type="text/javascript" src="web/res/js/jquery.1.9.1.min.js"></script>
|
||||
<script type="text/javascript" src="js/js.js"></script>
|
||||
<script type="text/javascript" src="js/base64-min.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/nwjs.js"></script>
|
||||
<script type="text/javascript" src="web/res/mode/menu/jquery-rockmenu.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/notify.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/strformat.js"></script>
|
||||
<script type="text/javascript" src="js/reim_xin.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/websocket.js"></script>
|
||||
<script type="text/javascript" src="web/res/perfectscrollbar/perfect-scrollbar.js"></script>
|
||||
<script type="text/javascript" src="web/res/perfectscrollbar/jquery.mousewheel.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/jquery-imgview.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/jquery-rockupload.js"></script>
|
||||
<script type="text/javascript" src="mode/plugin/jquery-rockmodels.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/jquery-changeuser.js"></script>
|
||||
<style>
|
||||
.close{height:24px;width:24px;display:block;text-align:center;line-height:20px;cursor:pointer;font-size:20px;color:#f1f1f1;float:left}
|
||||
.close:hover{color:white;}
|
||||
</style>
|
||||
<script>
|
||||
js.servernow = '<?=$da['now']?>';
|
||||
PROJECT = '<?=$da['p']?>';
|
||||
adminip = '<?=$da['ip']?>';
|
||||
systitle = '<?=$da['title']?>';
|
||||
companymode = <?=(getconfig('companymode')? 'true' : 'false')?>;
|
||||
function globalbody(){
|
||||
adminid = '<?=$da['adminid']?>';
|
||||
adminface = '<?=$da['face']?>';
|
||||
adminname = '<?=$da['adminname']?>';
|
||||
adminuser = '<?=$da['adminuser']?>';
|
||||
deptallname = '<?=$da['my']['deptallname']?>';
|
||||
adminranking= '<?=$da['my']['ranking']?>';
|
||||
}
|
||||
function initbody(){
|
||||
reim.init();
|
||||
}
|
||||
function winfocus(){
|
||||
window.focus();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body style="border:0px rgba(0,0,0,0.2) solid;overflow:hidden" oncontextmenu="return false" scroll="no">
|
||||
<div id="closediv" style="position:absolute;right:10px;top:15px;z-index:5">
|
||||
<span onclick="reim.winzuida();" title="最大化" class="close">□</span>
|
||||
<span onclick="reim.winclose();" title="关闭" class="close">×</span>
|
||||
</div>
|
||||
<div style="position:absolute;bottom:15px;left:5px;width:60px;">
|
||||
<div align="center" id="reimcog" class="cursor" style="color:#aaaaaa;font-size:16px">
|
||||
<i class="icon-cog"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="mindivshow" style="height:538px;overflow:hidden;background:#f3f8fd;border:0px rgba(0,0,0,0.2) solid;border-radius:5px;box-shadow:0px 0px 8px rgba(0,0,0,0.3);margin:5px">
|
||||
<div style="height:50px;overflow:hidden;color:white; background:#1389D3;">
|
||||
<table width="100%" height="50px">
|
||||
<tr>
|
||||
<td style="padding-left:15px;" ><div style="height:24px;overflow:hidden"><img height="24" width="24" id="myshow_logo" src="<?=$da['logo']?>"></div></td>
|
||||
<td onclick="reim.clickcompany(this)" style="padding-left:5px;font-size:16px" nowrap><span id="myshow_companyname"><?=$da['showtitle']?></span></td>
|
||||
<td width="100%" style="-webkit-app-region:drag;"> </td>
|
||||
<td align="right"><input id="reim_keysou" placeholder="搜索联系人/会话/应用" class="msousou"></td>
|
||||
<td><div style="width:50px"></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<table style="width:100%;" height="100%">
|
||||
<tr valign="top">
|
||||
<td height="100%" style="border-right:1px #dddddd solid" width="60" bgcolor="#f5f9ff">
|
||||
<div align="center" style="width:60px;overflow:hidden">
|
||||
<div style="margin-top:20px"><img title="<?=$da['adminname']?>" onclick="reim.openmyinfo()" src="images/noface.png" id="myface" style="border-radius:50%;" align="absmiddle" height="40" width="40">
|
||||
</div>
|
||||
<div style="margin-top:20px;">
|
||||
<div class="cursor lefticons" id="changetabs0" onclick="reim.changetabs(0)" title="消息" style="color:#1389D3;">
|
||||
<i class="icon-comment-alt"></i>
|
||||
<span id="chat_stotal" class="badge"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top:10px;">
|
||||
<div class="cursor lefticons" id="changetabs1" onclick="reim.changetabs(1)" title="组织结构">
|
||||
<i class="icon-sitemap"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top:10px;">
|
||||
<div class="cursor lefticons" id="changetabs2" onclick="reim.changetabs(2)" title="应用">
|
||||
<i class="icon-th-large"></i>
|
||||
<span id="agenh_stotal" class="badge"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td width="220px" id="maincenter" style="border-right:1px #dddddd solid">
|
||||
<div id="centlist" style="height:300px;overflow:hidden;position:relative">
|
||||
<div id="centshow0">
|
||||
<div id="historylist"></div>
|
||||
<div id="historylist_tems" style="padding-top:150px;text-align:center;color:#dddddd">
|
||||
<span style="font-size:40px"><i class="icon-comment-alt"></i></span><br>暂无消息
|
||||
</div>
|
||||
</div>
|
||||
<div id="centshow1" style="display:none">
|
||||
<div style="padding:5px;color:#aaaaaa;border-bottom:1px #f1f1f1 solid">组织结构</div>
|
||||
<div id="showdept"></div>
|
||||
<div id="showgroup"></div>
|
||||
<div align="center" style="padding:10px;"><a onclick="reim.initload(true)" style="font-size:12px;color:#bbbbbb" href="javascript:;"><i class="icon-refresh"></i> 刷新</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div id="viewzhulist" style="height:300px;overflow:hidden;">
|
||||
<div align="center" tabs="home" id="tabs_home" style="margin-top:100px;font-size:150px;color:#edf4fb">
|
||||
<i class="icon-comment-alt"></i>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
149
webmain/reim/index/tpl_index_xina.html
Normal file
149
webmain/reim/index/tpl_index_xina.html
Normal file
@@ -0,0 +1,149 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><?=$da['showtitle']?></title>
|
||||
<meta name="description" content="">
|
||||
<meta name="keywords" content="">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
|
||||
<meta name="format-detection" content="telephone=no"/>
|
||||
<meta name="format-detection" content="email=no"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/fontawesome/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="web/res/css/webimcss.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/perfectscrollbar/perfect-scrollbar.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/mode/menu/jquery-rockmenu.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/css/chat.css"/>
|
||||
<link rel="shortcut icon" id="ico" href="<?=$da['logo']?>" />
|
||||
<script type="text/javascript" src="web/res/js/jquery.1.9.1.min.js"></script>
|
||||
<script type="text/javascript" src="js/js.js"></script>
|
||||
<script type="text/javascript" src="js/base64-min.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/nwjs.js"></script>
|
||||
<script type="text/javascript" src="web/res/mode/menu/jquery-rockmenu.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/notify.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/strformat.js"></script>
|
||||
<script type="text/javascript" src="js/reim_xina.js?<?=time()?>"></script>
|
||||
<script type="text/javascript" src="web/res/js/websocket.js"></script>
|
||||
<script type="text/javascript" src="web/res/perfectscrollbar/perfect-scrollbar.js"></script>
|
||||
<script type="text/javascript" src="web/res/perfectscrollbar/jquery.mousewheel.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/jquery-imgview.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/jquery-rockupload.js"></script>
|
||||
<script type="text/javascript" src="mode/plugin/jquery-rockmodels.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/jquery-changeuser.js"></script>
|
||||
<style>
|
||||
.lefticons{color:#ffffff;height:70px;line-height:70px}
|
||||
.lefticons:hover{background: rgba(0,0,0,0.05);}
|
||||
.leftactive {background: rgba(0,0,0,0.1);}
|
||||
<?php
|
||||
$col = getconfig('apptheme','#1389D3');
|
||||
$cola= c('image')->colorTorgb($col);
|
||||
echo 'body{--main-color:'.$col.'}.leftcls{background:'.$col.'}.webbtn{background:'.$col.'}.qipao .qipaocontright{background:rgba('.$cola[0].','.$cola[1].','.$cola[2].',0.4)}.qipao .qipaoright{border-color: transparent transparent transparent rgba('.$cola[0].','.$cola[1].','.$cola[2].',0.4)}';
|
||||
?>
|
||||
</style>
|
||||
<script>
|
||||
companynum = '<?=COMPANYNUM?>';
|
||||
maincolor = '<?=$col?>';
|
||||
js.servernow = '<?=$da['now']?>';
|
||||
PROJECT = '<?=$da['p']?>';
|
||||
adminip = '<?=$da['ip']?>';
|
||||
systitle = '<?=$da['title']?>';
|
||||
companymode = <?=(getconfig('companymode')? 'true' : 'false')?>;
|
||||
video_bool = <?=(getconfig('video_bool')? 'true' : 'false')?>;
|
||||
function globalbody(){
|
||||
adminid = '<?=$da['adminid']?>';
|
||||
adminface = '<?=$da['face']?>';
|
||||
adminname = '<?=$da['adminname']?>';
|
||||
adminuser = '<?=$da['adminuser']?>';
|
||||
deptallname = '<?=$da['my']['deptallname']?>';
|
||||
adminranking= '<?=$da['my']['ranking']?>';
|
||||
}
|
||||
function initbody(){
|
||||
reim.init();
|
||||
}
|
||||
function winfocus(){
|
||||
window.focus();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body style="background:#f5f5f5;border:0px rgba(0,0,0,0.2) solid;overflow:hidden" oncontextmenu="return false" scroll="no">
|
||||
|
||||
<div class="cursor lefticons" align="center" id="reimcog" style="position:fixed;bottom:0px;left:0px;width:60px;line-height:50px;height:50px;color:#ffffff;font-size:16px;"><i class="icon-reorder"></i></div>
|
||||
|
||||
<div id="mindivshow">
|
||||
|
||||
<table style="width:100%;" height="100%">
|
||||
<tr valign="top">
|
||||
<td height="100%" style="border-right:0px #dddddd solid" width="60" class="leftcls">
|
||||
<div align="center" style="width:60px;overflow:hidden">
|
||||
<div style="margin-top:20px"><img title="<?=$da['adminname']?>" onclick="reim.openmyinfo()" src="images/noface.png" id="myface" style="border-radius:50%;" align="absmiddle" height="40" width="40">
|
||||
</div>
|
||||
<div style="margin-top:20px;">
|
||||
<div class="cursor lefticons leftactive" id="changetabs0" onclick="reim.changetabs(0)" title="消息">
|
||||
<i class="icon-comment-alt"></i>
|
||||
<span id="chat_stotal" class="badge"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="cursor lefticons" id="changetabs1" onclick="reim.changetabs(1)" title="组织结构">
|
||||
<i class="icon-sitemap"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="cursor lefticons" id="changetabs2" onclick="reim.changetabs(2)" title="应用">
|
||||
<i class="icon-th-large"></i>
|
||||
<span id="agenh_stotal" class="badge"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cursor lefticons" style="display:none" id="changetabs3" onclick="reim.changetabs(3)" title="客服">
|
||||
<i class="icon-headphones"></i>
|
||||
<span id="wait_stotal" class="badge"></span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td width="220px" id="maincenter" bgcolor="#ebebeb" style="border-right:1px #dddddd solid">
|
||||
<div style="height:60px;overflow:hidden" align="center"><input id="reim_keysou" placeholder="搜索联系人/会话/应用" style="border:none;background-color:#d4d6d9; width:150px;height:30px;border-radius:5px;margin-top:13px;padding:0px 10px" type="text"> <span class="cursor" id="homeplus" style="color:#999999"><i class="icon-plus"></i></span></div>
|
||||
|
||||
<div id="centlist" style="height:300px;overflow:hidden;position:relative;width:220px">
|
||||
<div id="centshow0">
|
||||
<div id="historylist"></div>
|
||||
<div id="historylist_tems" style="padding-top:150px;text-align:center;color:#dddddd">
|
||||
<span style="font-size:40px"><i class="icon-comment-alt"></i></span><br>暂无消息
|
||||
</div>
|
||||
</div>
|
||||
<div id="centshow1" style="display:none">
|
||||
<div style="padding:5px;color:#aaaaaa;border-bottom:1px #e1e1e1 solid">组织结构</div>
|
||||
<div id="showdept"></div>
|
||||
<div id="showgroup"></div>
|
||||
<div align="center" style="padding:10px;"><a onclick="reim.initload(true)" style="font-size:12px;color:#bbbbbb" href="javascript:;"><i class="icon-refresh"></i> 刷新</a></div>
|
||||
</div>
|
||||
<?php if(getconfig('rockkefu_url')){?>
|
||||
<div id="centshow3" style="display:none">
|
||||
<div id="kefulistwait"></div>
|
||||
<div id="kefulist_tems" style="padding-top:150px;text-align:center;color:#dddddd">
|
||||
<span style="font-size:40px"><i class="icon-headphones"></i></span><br>暂无咨询消息
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div id="viewzhulist" style="height:300px;overflow:hidden;">
|
||||
<div align="center" tabs="home" id="tabs_home" style="margin-top:150px;font-size:150px;color:#e8e8e8">
|
||||
<i class="icon-comments-alt"></i>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
if(getconfig('rockkefu_url')){
|
||||
$_path = 'js/reim_xina_kefu.js';
|
||||
if(file_exists($_path))echo '<script src="'.$_path.'?'.time().'"></script>';
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
34
webmain/reim/login/loginAction.php
Normal file
34
webmain/reim/login/loginAction.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
class loginClassAction extends ActionNot
|
||||
{
|
||||
|
||||
public function defaultAction()
|
||||
{
|
||||
if($this->adminid>0){
|
||||
$this->rock->location('?d=reim');
|
||||
}
|
||||
$this->title = getconfig('reimtitle','REIM');
|
||||
|
||||
$this->assign('loginyzm', (int)getconfig('loginyzm','0'));
|
||||
}
|
||||
|
||||
public function xinAction()
|
||||
{
|
||||
if($this->adminid>0){
|
||||
$this->rock->location('?d=reim&a=xin');
|
||||
}
|
||||
$this->title = getconfig('reimtitle','REIM');
|
||||
|
||||
$this->assign('loginyzm', (int)getconfig('loginyzm','0'));
|
||||
}
|
||||
|
||||
public function xinaAction()
|
||||
{
|
||||
if($this->adminid>0){
|
||||
$this->rock->location('?d=reim&a=xina');
|
||||
}
|
||||
$this->title = getconfig('reimtitle','REIM');
|
||||
|
||||
$this->assign('loginyzm', (int)getconfig('loginyzm','0'));
|
||||
}
|
||||
}
|
||||
339
webmain/reim/login/tpl_login.html
Normal file
339
webmain/reim/login/tpl_login.html
Normal file
@@ -0,0 +1,339 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><?=$da['title']?></title>
|
||||
<meta name="description" content="">
|
||||
<meta name="keywords" content="">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
|
||||
<meta name="format-detection" content="telephone=no"/>
|
||||
<meta name="format-detection" content="email=no"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"/>
|
||||
<link rel="stylesheet" href="webmain/css/reim.css" />
|
||||
<link rel="shortcut icon" id="icon_show" href="favicon.ico" />
|
||||
<script type="text/javascript" src="js/jquery.js"></script>
|
||||
<script type="text/javascript" src="js/js.js"></script>
|
||||
<script type="text/javascript" src="js/base64-min.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/nwjs.js"></script>
|
||||
<script>
|
||||
CFROM = 'reim';
|
||||
var temp_token='';
|
||||
var logifouct=false;
|
||||
function initbody(){
|
||||
nwjs.init();
|
||||
var face = js.getoption('loginface');
|
||||
if(face)get('myface').src=face;
|
||||
|
||||
if(get('checkautologin')){
|
||||
get('checkautologin').checked = js.getoption('autologin')=='1';
|
||||
form('adminuser').value = js.getoption('adminuser');
|
||||
getpassobj().val(js.getoption('adminpass'));
|
||||
autologin(3);
|
||||
}
|
||||
form('adminmobile').value=js.getoption('adminmobile');
|
||||
|
||||
if(nwjsgui){
|
||||
$('#footerts').append('<a style="font-size:12px" onclick="return clearchater()" href="javascript:;">[清空缓存]</a>, <a style="font-size:12px" onclick="return gettoback(false)" href="javascript:;">[回到初始页]</a>');
|
||||
}
|
||||
|
||||
}
|
||||
function bodyunload(){
|
||||
|
||||
}
|
||||
|
||||
//回到初始页面
|
||||
function gettoback(){
|
||||
var ostr = '{"main": "index.html","name": "REIM","description": "REIM即时通信,是信呼团队开发的一款即时聊天应用,by http://www.rockoa.com/","version": "1.1.2","node-remote":"http://127.0.0.1/","window": {"title": "REIM","icon": "images/logo.png","frame": true,"width": 450,"height": 300,"position": "center","min_width": 450,"min_height": 300,"show_in_taskbar":true,"kiosk":false},"webkit": {"plugin": true,"page-cache":false}}';
|
||||
nwjs.fs.writeFile('package.json', ostr,function(err,d){
|
||||
if(err){
|
||||
js.msg('msg',err);
|
||||
return;
|
||||
}
|
||||
js.alert('已确认,请退出软件重新启动。','', function(){
|
||||
nwjsgui.App.quit();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function clearchater(){
|
||||
nwjsgui.App.clearCache();
|
||||
localStorage.clear();
|
||||
var na = nwjsgui.App.manifest.name;
|
||||
js.setoption('apiurl', apiurl);
|
||||
js.confirm('基本缓存已删除,更多缓存删除,是否打开对应['+na+']目录?需手动全部删除目录。',function(jg){
|
||||
if(jg=='yes'){
|
||||
var naea = nwjsgui.App.dataPath;
|
||||
var oru= naea.split(na)[0]+na;
|
||||
nwjsgui.Shell.openItem(oru);
|
||||
nwjsgui.App.quit();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function winfocus(){
|
||||
window.focus();
|
||||
}
|
||||
function autologin(ms){
|
||||
if(!logifouct && get('checkautologin') && get('checkautologin').checked && form('adminuser').value!='' && getpassobj().val()){
|
||||
form('submitbtn').value=''+ms+'秒后自动登录';
|
||||
if(ms==0){
|
||||
loginsubmit();
|
||||
}else{
|
||||
setTimeout('autologin('+(ms-1)+')',1000);
|
||||
}
|
||||
}else{
|
||||
form('submitbtn').value = '登录';
|
||||
}
|
||||
}
|
||||
function changeauto(o){
|
||||
var oi = '0';
|
||||
if(o.checked)oi='1';
|
||||
js.setoption('autologin', oi);
|
||||
}
|
||||
var loginyzm = '';
|
||||
function loginsubmit(lx){
|
||||
var ltype= form('logintype').value,user='',pass='';
|
||||
|
||||
if(ltype=='0'){
|
||||
user = form('adminuser').value;
|
||||
pass = getpassobj().val();
|
||||
if(user==''){
|
||||
js.msg('msg','用户名不能为空');
|
||||
form('adminuser').focus();
|
||||
return false;
|
||||
}
|
||||
if(pass==''){
|
||||
js.msg('msg','密码不能为空');
|
||||
getpassobj().focus();
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
user = form('adminmobile').value;
|
||||
if(user==''){
|
||||
js.msg('msg','手机号不能为空');
|
||||
form('adminmobile').focus();
|
||||
return false;
|
||||
}
|
||||
js.setoption('adminmobile', user);
|
||||
loginyzm = form('adminmobileyzm').value;
|
||||
if(loginyzm=='' || loginyzm.length!=6){
|
||||
js.msg('msg','手机验证码格式不对');
|
||||
form('adminmobileyzm').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
js.setoption('adminuser', user);
|
||||
js.setoption('adminpass', pass);
|
||||
|
||||
var btnobj = form('submitbtn');
|
||||
btnobj.value='登录中...';
|
||||
btnobj.disabled=true;
|
||||
var data = {};
|
||||
var url = js.getajaxurl('check','login');
|
||||
data.device = device;
|
||||
data.cfrom = 'reim';
|
||||
data.ltype = ltype;
|
||||
data.adminuser = jm.base64encode(user);
|
||||
data.adminpass = jm.base64encode(pass);
|
||||
data.yanzm = loginyzm;
|
||||
js.bool = true;
|
||||
loginyzm = '';
|
||||
js.ajax(url,data,function(a){
|
||||
if(a.success){
|
||||
get('myface').src=a.face;
|
||||
btnobj.value='登录成功';
|
||||
js.setoption('loginface', a.face);
|
||||
var curl = '?d=reim';
|
||||
loginsuccess(a);
|
||||
js.location(curl);
|
||||
}else{
|
||||
btnobj.value='登录';
|
||||
js.msg('msg',a.msg);
|
||||
btnobj.disabled=false;
|
||||
if(a.shouji){
|
||||
mobilejsho = a.mobile;
|
||||
js.prompt('输入手机验证码','手机号:'+a.shouji+' <span><a class="zhu" href="javascript:;" onclick="getcodes(this)">[获取验证码]</a></span>',function(jg,txt){
|
||||
if(jg=='yes' && txt){
|
||||
loginyzm = txt;
|
||||
loginsubmit();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},'post,json');
|
||||
}
|
||||
function loginsuccess(a){
|
||||
if(nwjsgui){
|
||||
var x = screen.width - window.screenX- $(window).width()-30;
|
||||
window.moveBy(x,0);
|
||||
}
|
||||
}
|
||||
|
||||
function getcodes(o1){
|
||||
var da = {'mobile':mobilejsho,'device':device};
|
||||
var o2 = $(o1).parent();
|
||||
o2.html(js.getmsg('获取中...'));
|
||||
js.ajax('api.php?m=yanzm',da,function(a){
|
||||
if(a.success){
|
||||
o2.html(js.getmsg('获取成功','green'));
|
||||
}else{
|
||||
o2.html(js.getmsg(a.msg));
|
||||
}
|
||||
},'post,json');
|
||||
}
|
||||
|
||||
function getpassobj(){
|
||||
return $('input[type=password]');
|
||||
}
|
||||
|
||||
//二维码登录
|
||||
function loginewm(){
|
||||
var s = '<div style="height:180px;" align="center"><img style="margin:5px" id="logeweerew" src="images/logo.png" width="170" height="170"></div><div style="padding:5px;" align="center"><span id="miaoshuv">请使用手机扫一扫</span>,还有<span id="miaoshu">60</span>秒</div>';
|
||||
js.tanbody('syscogshow','扫一扫登录',240,100,{html:s});
|
||||
var stra = parseInt(Math.random()*999999);
|
||||
randkey = js.getoption('ewmrandkey', 'ewm'+stra+'');
|
||||
js.setoption('ewmrandkey', randkey);
|
||||
get('logeweerew').src=js.apiurl('login','getewm',{'randkey':randkey});
|
||||
starttimest(60);
|
||||
}
|
||||
function starttimest(ms){
|
||||
if(!get('miaoshu'))return;
|
||||
if(ms<0){
|
||||
$('#miaoshu').parent().html('<font color=#888888>二维码已过期,请重新打开</font>');
|
||||
return;
|
||||
}
|
||||
$('#miaoshu').html(''+ms+'');
|
||||
if(ms<57){
|
||||
$.getJSON(js.apiurl('login','checkewm',{'randkey':randkey}),function(ret){
|
||||
setTimeout('starttimest('+(ms-1)+')',1000);
|
||||
var dst = ret.data.val;
|
||||
if(dst=='0'){
|
||||
$('#miaoshuv').html('<font color=green>请在手机按确认登录</font>');
|
||||
}
|
||||
if(dst=='-1'){
|
||||
$('#miaoshu').parent().html('<font color=#888888>已取消,请重新打开</font>');
|
||||
}
|
||||
if(dst>0){
|
||||
$('#miaoshu').parent().html('<font color=#ff6600><img src="images/loadings.gif" align="absmiddle"> 已确认,登录中...</font>');
|
||||
var da = ret.data;
|
||||
get('myface').src = da.face;
|
||||
form('adminuser').value=da.user;
|
||||
getpassobj().val(da.pass);
|
||||
loginsubmit(1);
|
||||
}
|
||||
});
|
||||
}else{
|
||||
setTimeout('starttimest('+(ms-1)+')',1000);
|
||||
}
|
||||
}
|
||||
|
||||
//获取验证码
|
||||
function getyzm(o1){
|
||||
mobilejsho = form('adminmobile').value;
|
||||
if(!mobilejsho){
|
||||
js.msg('msg','请输入手机号');
|
||||
form('adminmobile').focus();
|
||||
return;
|
||||
}
|
||||
var da = {'mobile':mobilejsho,'device':device};
|
||||
o1.value = '获取中...';
|
||||
js.setmsg();
|
||||
o1.disabled=true;
|
||||
js.ajax('api.php?m=yanzm&a=glogin',da,function(a){
|
||||
if(a.success){
|
||||
o1.value = '获取成功';
|
||||
js.msg('success', '验证码已发送到手机上');
|
||||
dshitime(60, o1);
|
||||
}else{
|
||||
o1.value = '重新获取';
|
||||
o1.disabled=false;
|
||||
js.msg('msg',a.msg);
|
||||
}
|
||||
},'post,json');
|
||||
}
|
||||
|
||||
function dshitime(sj,o1){
|
||||
if(sj==0){
|
||||
o1.disabled=false;
|
||||
o1.value='重新获取';
|
||||
return;
|
||||
}
|
||||
o1.disabled=true;
|
||||
o1.value=''+sj+'';
|
||||
setTimeout(function(){dshitime(sj-1, o1)},1000);
|
||||
}
|
||||
|
||||
function changlogin(){
|
||||
$('#loginview0').hide();
|
||||
$('#loginview1').show();
|
||||
form('logintype').value='1';
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.faceicons{height:100px;width:100px;overflow:hidden;border:1px #cccccc solid; background-color:white;border-radius:50%;}
|
||||
.foot{color:#aaaaaa;width:100%;width:100%;left:0px;bottom:10px;position:fixed;text-align:center;font-size:10px;padding:0px 5px}
|
||||
.input{width:100%;height:36px}
|
||||
</style>
|
||||
</head>
|
||||
<body style="overflow:hidden;" scroll="no">
|
||||
|
||||
<div>
|
||||
|
||||
<div>
|
||||
<div style="padding:15px 0px 15px 0px;font-size:18px"></div>
|
||||
<div style="-webkit-user-select:none;-webkit-app-region:drag;" align="center"><div class="faceicons"><img id="myface" onclick="location.reload()" title="<?=URL?>" src="images/logo.png" height="100" width="100"></div></div>
|
||||
<div class="blank30"></div>
|
||||
<form name="myform">
|
||||
|
||||
<?php if($loginyzm!=3){?>
|
||||
<div id="loginview0">
|
||||
<div style="padding:0px 20px">
|
||||
<input type="text" class="input" onfocus="logifouct=true" onKeyUp="if(event.keyCode==13)getpassobj().focus()" value="" name="adminuser" placeholder="请输入用户名/姓名/手机号">
|
||||
</div>
|
||||
<div class="blank20"></div>
|
||||
<div style="padding:0px 20px">
|
||||
<input class="input" onfocus="logifouct=true" onKeyUp="if(event.keyCode==13)loginsubmit(1)" type="password" placeholder="请输入密码">
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div style="padding:0px 20px">
|
||||
<label><input onclick="changeauto(this)" id="checkautologin" type="checkbox">下次自动登录</label> <img class="cursor" onclick="loginewm()" title="用二维码登录" src="images/ewml.png" align="absmiddle" width="16"> <?php if($loginyzm>0){?><a href="javascript:;" onclick="changlogin()">验证码登录</a><?php }?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="loginview1" style="display:none">
|
||||
<input type="hidden" name="logintype" value="0">
|
||||
<?php }else{?>
|
||||
<div id="loginview1">
|
||||
<input type="hidden" name="logintype" value="1">
|
||||
<?php }?>
|
||||
|
||||
<div style="padding:0px 20px">
|
||||
<input type="text" class="input" onKeyUp="if(event.keyCode==13)get('adminmobileyzm').focus()" maxlength="11" name="adminmobile" placeholder="请输入手机号">
|
||||
</div>
|
||||
<div class="blank20"></div>
|
||||
<div style="padding:0px 20px">
|
||||
<table width="100%"><tr>
|
||||
<td>
|
||||
<input class="input" name="adminmobileyzm" id="adminmobileyzm" onKeyUp="if(event.keyCode==13)loginsubmit(1)" maxlength="6" placeholder="请输入验证码">
|
||||
</td>
|
||||
<td><input type="button" onclick="getyzm(this)" style="height:36px;width:100px" value="获取验证码" class="webbtn" ></td>
|
||||
</tr></table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="blank20"></div>
|
||||
<div style="padding:0px 20px">
|
||||
<input style="width:100%;padding:10px" type="button" name="submitbtn" onClick="loginsubmit(1)" class="webbtn" name="button" value="登录">
|
||||
</div>
|
||||
</form>
|
||||
<div class="blank20"></div>
|
||||
<div align="center" id="footerts" style="color:#888888;font-size:12px"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="foot" style="display:">Copyright ©<?=date('Y')?> <?=TITLE?></div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
341
webmain/reim/login/tpl_login_xin.html
Normal file
341
webmain/reim/login/tpl_login_xin.html
Normal file
@@ -0,0 +1,341 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><?=$da['title']?></title>
|
||||
<meta name="description" content="">
|
||||
<meta name="keywords" content="">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
|
||||
<meta name="format-detection" content="telephone=no"/>
|
||||
<meta name="format-detection" content="email=no"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/css/webimcss.css"/>
|
||||
<link rel="shortcut icon" id="icon_show" href="favicon.ico" />
|
||||
<script type="text/javascript" src="js/jquery.js"></script>
|
||||
<script type="text/javascript" src="js/js.js"></script>
|
||||
<script type="text/javascript" src="js/base64-min.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/nwjs.js"></script>
|
||||
<style>
|
||||
.lmaisft{text-align:center;-webkit-app-region:no-drag;}
|
||||
.close{height:20px;width:20px;display:block;text-align:center;line-height:18px;cursor:pointer;font-size:16px}
|
||||
.close:hover{background:#ff1118;color:white}
|
||||
</style>
|
||||
<script>
|
||||
CFROM = 'reim';
|
||||
var temp_token='';
|
||||
var logifouct=false;
|
||||
function initbody(){
|
||||
js.xpbodysplit = 5;
|
||||
|
||||
nwjs.init();
|
||||
resize();
|
||||
$(window).resize(resize);
|
||||
var face = js.getoption('loginface');
|
||||
if(face)get('myface').src=face;
|
||||
|
||||
if(get('checkautologin')){
|
||||
get('checkautologin').checked = js.getoption('autologin')=='1';
|
||||
form('adminuser').value = js.getoption('adminuser');
|
||||
getpassobj().val(js.getoption('adminpass'));
|
||||
autologin(3);
|
||||
}
|
||||
if(form('adminmobile'))form('adminmobile').value=js.getoption('adminmobile');
|
||||
|
||||
if(nwjsgui){
|
||||
$('#footerts').append('<a style="font-size:12px" onclick="return clearchater()" href="javascript:;">清缓存</a>');
|
||||
}
|
||||
//禁止后退
|
||||
try{
|
||||
history.pushState(null, null, document.URL);
|
||||
window.addEventListener('popstate', function (){
|
||||
history.pushState(null, null, document.URL);
|
||||
});
|
||||
}catch(e){}
|
||||
if(winWb()>320)rewinheight(400,300);
|
||||
if(jisxobo()){
|
||||
js.xpbodysplit = 0;
|
||||
get('mindivshowzhu').style.margin='0px';
|
||||
}
|
||||
}
|
||||
|
||||
//是不是xp和win7的版本
|
||||
function jisxobo(){
|
||||
var llq = navigator.userAgent.toLowerCase();
|
||||
if(llq.indexOf('windows nt 5')>0 || llq.indexOf('windows nt 6.1')>0){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function clearchater(){
|
||||
nwjsgui.App.clearCache();
|
||||
localStorage.clear();
|
||||
var na = nwjsgui.App.manifest.name;
|
||||
js.confirm('基本缓存已删除,更多缓存删除,是否打开对应['+na+']目录?需手动全部删除目录。',function(jg){
|
||||
if(jg=='yes'){
|
||||
var naea = nwjsgui.App.dataPath;
|
||||
var oru= naea.split(na)[0]+na;
|
||||
nwjsgui.Shell.openItem(oru);
|
||||
nwjsgui.App.quit();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function autologin(ms){
|
||||
if(!logifouct && get('checkautologin') && get('checkautologin').checked && form('adminuser').value!='' && getpassobj().val()){
|
||||
form('submitbtn').value=''+ms+'秒后自动登录';
|
||||
if(ms==0){
|
||||
loginsubmit();
|
||||
}else{
|
||||
setTimeout('autologin('+(ms-1)+')',1000);
|
||||
}
|
||||
}else{
|
||||
form('submitbtn').value = '登录';
|
||||
}
|
||||
}
|
||||
|
||||
function bodyunload(){
|
||||
nwjs.removetray();
|
||||
}
|
||||
function resize(){
|
||||
var tt=$(window).height()-$('.lmaisft').height();
|
||||
var ts=(tt*0.5)-20;
|
||||
if(ts<10)ts=10;
|
||||
var lx1 = 0;
|
||||
if(jisxobo())lx1=10;
|
||||
$('#mindivshow').css('height',''+(winHb()-42+lx1)+'px');
|
||||
}
|
||||
|
||||
|
||||
var loginyzm = '';
|
||||
function loginsubmit(lx){
|
||||
var ltype= form('logintype').value,user='',pass='';
|
||||
|
||||
if(ltype=='0'){
|
||||
user = form('adminuser').value;
|
||||
pass = getpassobj().val();
|
||||
if(user==''){
|
||||
js.msg('msg','用户名不能为空');
|
||||
form('adminuser').focus();
|
||||
return false;
|
||||
}
|
||||
if(pass==''){
|
||||
js.msg('msg','密码不能为空');
|
||||
getpassobj().focus();
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
user = form('adminmobile').value;
|
||||
if(user==''){
|
||||
js.msg('msg','手机号不能为空');
|
||||
form('adminmobile').focus();
|
||||
return false;
|
||||
}
|
||||
js.setoption('adminmobile', user);
|
||||
loginyzm = form('adminmobileyzm').value;
|
||||
if(loginyzm=='' || loginyzm.length!=6){
|
||||
js.msg('msg','手机验证码格式不对');
|
||||
form('adminmobileyzm').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
js.setoption('adminuser', user);
|
||||
js.setoption('adminpass', pass);
|
||||
|
||||
var btnobj = form('submitbtn');
|
||||
btnobj.value='登录中...';
|
||||
btnobj.disabled=true;
|
||||
var data = {};
|
||||
var url = js.getajaxurl('check','login');
|
||||
data.device = device;
|
||||
data.cfrom = 'reim';
|
||||
data.ltype = ltype;
|
||||
data.adminuser = jm.base64encode(user);
|
||||
data.adminpass = jm.base64encode(pass);
|
||||
data.yanzm = loginyzm;
|
||||
js.bool = true;
|
||||
loginyzm = '';
|
||||
js.ajax(url,data,function(a){
|
||||
if(a.success){
|
||||
get('myface').src=a.face;
|
||||
btnobj.value='登录成功';
|
||||
js.setoption('loginface', a.face);
|
||||
var curl = '?d=reim&a=xin';
|
||||
loginsuccess(a);
|
||||
js.location(curl);
|
||||
}else{
|
||||
btnobj.value='登录';
|
||||
js.msg('msg',a.msg);
|
||||
btnobj.disabled=false;
|
||||
if(a.shouji){
|
||||
mobilejsho = a.mobile;
|
||||
js.prompt('输入手机验证码','手机号:'+a.shouji+' <span><a class="zhu" href="javascript:;" onclick="getcodes(this)">[获取验证码]</a></span>',function(jg,txt){
|
||||
if(jg=='yes' && txt){
|
||||
loginyzm = txt;
|
||||
loginsubmit();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},'post,json');
|
||||
}
|
||||
function loginsuccess(a){
|
||||
$('#mindivshows').hide();
|
||||
if(nwjsgui){
|
||||
rewinheight(600, 900);
|
||||
}
|
||||
}
|
||||
|
||||
function getpassobj(){
|
||||
return $('input[type=password]');
|
||||
}
|
||||
function changeauto(o){
|
||||
var oi = '0';
|
||||
if(o.checked)oi='1';
|
||||
js.setoption('autologin', oi);
|
||||
}
|
||||
function winclose(){
|
||||
nwjs.closebool=true;
|
||||
nwjs.win.close();
|
||||
}
|
||||
|
||||
function rewinheight(hei, wid){
|
||||
var l = (screen.width-wid)*0.5;
|
||||
var t = (screen.height-hei)*0.5-20;
|
||||
nwjs.win.moveTo(parseInt(l),parseInt(t));
|
||||
nwjs.win.resizeTo(wid,hei);
|
||||
}
|
||||
|
||||
function getcodes(o1){
|
||||
var da = {'mobile':mobilejsho,'device':device};
|
||||
var o2 = $(o1).parent();
|
||||
o2.html(js.getmsg('获取中...'));
|
||||
js.ajax('api.php?m=yanzm',da,function(a){
|
||||
if(a.success){
|
||||
o2.html(js.getmsg('获取成功','green'));
|
||||
}else{
|
||||
o2.html(js.getmsg(a.msg));
|
||||
}
|
||||
},'post,json');
|
||||
}
|
||||
|
||||
//获取验证码
|
||||
function getyzm(o1){
|
||||
mobilejsho = form('adminmobile').value;
|
||||
if(!mobilejsho){
|
||||
js.msg('msg','请输入手机号');
|
||||
form('adminmobile').focus();
|
||||
return;
|
||||
}
|
||||
var da = {'mobile':mobilejsho,'device':device};
|
||||
o1.value = '获取中...';
|
||||
js.setmsg();
|
||||
o1.disabled=true;
|
||||
js.ajax('api.php?m=yanzm&a=glogin',da,function(a){
|
||||
if(a.success){
|
||||
o1.value = '获取成功';
|
||||
js.msg('success', '验证码已发送到手机上');
|
||||
dshitime(60, o1);
|
||||
}else{
|
||||
o1.value = '重新获取';
|
||||
o1.disabled=false;
|
||||
js.msg('msg',a.msg);
|
||||
}
|
||||
},'post,json');
|
||||
}
|
||||
|
||||
function dshitime(sj,o1){
|
||||
if(sj==0){
|
||||
o1.disabled=false;
|
||||
o1.value='重新获取';
|
||||
return;
|
||||
}
|
||||
o1.disabled=true;
|
||||
o1.value=''+sj+'';
|
||||
setTimeout(function(){dshitime(sj-1, o1)},1000);
|
||||
}
|
||||
|
||||
function changlogin(){
|
||||
$('#loginview0').hide();
|
||||
$('#loginview1').show();
|
||||
form('logintype').value='1';
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
<body style="overflow:hidden;">
|
||||
<div style="position:absolute;right:6px;top:6px;-webkit-app-region:no-drag;z-index:5">
|
||||
<span onclick="winclose();" title="关闭" class="close">×</span>
|
||||
</div>
|
||||
<div id="mindivshowzhu" style="background:#f5f5f5;border:1px #cccccc solid;overflow:hidden; border-radius:5px;box-shadow:0px 0px 8px rgba(0,0,0,0.3);margin:5px">
|
||||
|
||||
<div style="height:30px;overflow:hidden;-webkit-app-region:drag;margin-right:30px;user-select:none;"> </div>
|
||||
|
||||
<div align="center" id="mindivshow" style="height:348px;overflow:hidden;">
|
||||
<div id="mindivshows">
|
||||
<div class="lmaisft">
|
||||
<div id="topblank" style="height:5px;overflow:hidden"></div>
|
||||
<div style="user-select:none;-webkit-user-select: none;" align="center"><img onclick="location.reload()" title="<?=URL?>" src="images/logo.png" id="myface" style="border-radius:50%;" align="absmiddle" height="80" width="80"></div>
|
||||
<div class="blank10"></div>
|
||||
<form style="padding:10px;" name="myform">
|
||||
<?php if($loginyzm!=3){?>
|
||||
<div id="loginview0">
|
||||
<div>
|
||||
<div><input type="text" onfocus="logifouct=true" style="height:35px;width:190px;border-radius:5px" class="input" onKeyUp="if(event.keyCode==13)getpassobj().focus()" placeholder="请输入用户名/姓名/手机号" id="adminuser" name="adminuser" ></div>
|
||||
</div>
|
||||
<div class="blank20"></div>
|
||||
<div>
|
||||
<div><input onfocus="logifouct=true" style="height:35px;width:190px;border-radius:5px" class="input" onKeyUp="if(event.keyCode==13)loginsubmit(1)" value="" type="password" placeholder="请输入密码"></div>
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div align="center">
|
||||
<div style="width:190px" align="left"><label><input onclick="changeauto(this)" id="checkautologin" type="checkbox">下次自动登录</label><?php if($loginyzm>0){?> <a href="javascript:;" onclick="changlogin()">验证码登录</a><?php }?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="loginview1" style="display:none">
|
||||
<input type="hidden" name="logintype" value="0">
|
||||
<?php }else{?>
|
||||
<div id="loginview1">
|
||||
<input type="hidden" name="logintype" value="1">
|
||||
<?php }?>
|
||||
|
||||
|
||||
<div>
|
||||
<input type="text" style="height:35px;width:190px;border-radius:5px" class="input" onKeyUp="if(event.keyCode==13)get('adminmobileyzm').focus()" maxlength="11" name="adminmobile" placeholder="请输入手机号">
|
||||
</div>
|
||||
<div class="blank20"></div>
|
||||
<div align="center">
|
||||
<table><tr>
|
||||
<td>
|
||||
<input class="input" style="height:35px;width:100px;border-top-left-radius:5px;border-bottom-left-radius:5px" name="adminmobileyzm" id="adminmobileyzm" onKeyUp="if(event.keyCode==13)loginsubmit(1)" maxlength="6" placeholder="请输入验证码">
|
||||
</td>
|
||||
<td><input type="button" onclick="getyzm(this)" style="height:35px;width:90px;border-top-right-radius:5px;border-bottom-right-radius:5px" value="获取验证码" class="webbtn" ></td>
|
||||
</tr></table>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="blank20"></div>
|
||||
|
||||
<div align="center">
|
||||
<input type="button" id="btn0" style="height:35px;width:190px;border-radius:5px;font-size:16px" onClick="loginsubmit(1)" class="btn" name="submitbtn" value="登录">
|
||||
|
||||
</div>
|
||||
<span id="msgview"></span>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div align="center" id="footerts" style="color:#888888;font-size:12px"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
340
webmain/reim/login/tpl_login_xina.html
Normal file
340
webmain/reim/login/tpl_login_xina.html
Normal file
@@ -0,0 +1,340 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><?=$da['title']?></title>
|
||||
<meta name="description" content="">
|
||||
<meta name="keywords" content="">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
|
||||
<meta name="format-detection" content="telephone=no"/>
|
||||
<meta name="format-detection" content="email=no"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/css/webimcss.css"/>
|
||||
<link rel="shortcut icon" id="icon_show" href="favicon.ico" />
|
||||
<script type="text/javascript" src="js/jquery.js"></script>
|
||||
<script type="text/javascript" src="js/js.js"></script>
|
||||
<script type="text/javascript" src="js/base64-min.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/nwjs.js"></script>
|
||||
<style>
|
||||
.lmaisft{text-align:center;-webkit-app-region:no-drag;}
|
||||
.close{height:20px;width:20px;display:block;text-align:center;line-height:18px;cursor:pointer;font-size:16px}
|
||||
.close:hover{background:#ff1118;color:white}
|
||||
.inputlog{height:40px;width:220px;border-radius:5px}
|
||||
<?php
|
||||
$col = getconfig('apptheme','#1389D3');
|
||||
echo 'body{--main-color:'.$col.'}';
|
||||
?>
|
||||
</style>
|
||||
<script>
|
||||
CFROM = 'reim';
|
||||
var temp_token='';
|
||||
var logifouct=false;
|
||||
function initbody(){
|
||||
|
||||
nwjs.init();
|
||||
resize();
|
||||
$(window).resize(resize);
|
||||
var face = js.getoption('loginface');
|
||||
if(face)get('myface').src=face;
|
||||
|
||||
if(get('checkautologin')){
|
||||
get('checkautologin').checked = js.getoption('autologin')=='1';
|
||||
form('adminuser').value = js.getoption('adminuser');
|
||||
getpassobj().val(js.getoption('adminpass'));
|
||||
autologin(3);
|
||||
}
|
||||
if(form('adminmobile'))form('adminmobile').value=js.getoption('adminmobile');
|
||||
|
||||
if(nwjsgui){
|
||||
$('#footerts').append('<a style="font-size:12px" onclick="return clearchater()" href="javascript:;">清缓存</a>');
|
||||
}
|
||||
//禁止后退
|
||||
try{
|
||||
history.pushState(null, null, document.URL);
|
||||
window.addEventListener('popstate', function (){
|
||||
history.pushState(null, null, document.URL);
|
||||
});
|
||||
}catch(e){}
|
||||
if(winWb()>400)rewinheight(400,380);
|
||||
if(jisxobo()){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//是不是xp和win7的版本
|
||||
function jisxobo(){
|
||||
var llq = navigator.userAgent.toLowerCase();
|
||||
if(llq.indexOf('windows nt 5')>0 || llq.indexOf('windows nt 6.1')>0){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function clearchater(){
|
||||
nwjsgui.App.clearCache();
|
||||
localStorage.clear();
|
||||
var na = nwjsgui.App.manifest.name;
|
||||
js.confirm('基本缓存已删除,更多缓存删除,是否打开对应['+na+']目录?需手动全部删除目录。',function(jg){
|
||||
if(jg=='yes'){
|
||||
var naea = nwjsgui.App.dataPath;
|
||||
var oru= naea.split(na)[0]+na;
|
||||
nwjsgui.Shell.openItem(oru);
|
||||
nwjsgui.App.quit();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function autologin(ms){
|
||||
if(!logifouct && get('checkautologin') && get('checkautologin').checked && form('adminuser').value!='' && getpassobj().val()){
|
||||
form('submitbtn').value=''+ms+'秒后自动登录';
|
||||
if(ms==0){
|
||||
loginsubmit();
|
||||
}else{
|
||||
setTimeout('autologin('+(ms-1)+')',1000);
|
||||
}
|
||||
}else{
|
||||
form('submitbtn').value = '登录';
|
||||
}
|
||||
}
|
||||
|
||||
function bodyunload(){
|
||||
nwjs.removetray();
|
||||
}
|
||||
function resize(){
|
||||
var tt=$(window).height()-$('.lmaisft').height();
|
||||
var ts=(tt*0.5)-20;
|
||||
if(ts<10)ts=10;
|
||||
var lx1 = 0;
|
||||
if(jisxobo())lx1=10;
|
||||
$('#mindivshow').css('height',''+(winHb()-42+lx1)+'px');
|
||||
}
|
||||
|
||||
|
||||
var loginyzm = '';
|
||||
function loginsubmit(lx){
|
||||
var ltype= form('logintype').value,user='',pass='';
|
||||
|
||||
if(ltype=='0'){
|
||||
user = form('adminuser').value;
|
||||
pass = getpassobj().val();
|
||||
if(user==''){
|
||||
js.msg('msg','用户名不能为空');
|
||||
form('adminuser').focus();
|
||||
return false;
|
||||
}
|
||||
if(pass==''){
|
||||
js.msg('msg','密码不能为空');
|
||||
getpassobj().focus();
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
user = form('adminmobile').value;
|
||||
if(user==''){
|
||||
js.msg('msg','手机号不能为空');
|
||||
form('adminmobile').focus();
|
||||
return false;
|
||||
}
|
||||
js.setoption('adminmobile', user);
|
||||
loginyzm = form('adminmobileyzm').value;
|
||||
if(loginyzm=='' || loginyzm.length!=6){
|
||||
js.msg('msg','手机验证码格式不对');
|
||||
form('adminmobileyzm').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
js.setoption('adminuser', user);
|
||||
js.setoption('adminpass', pass);
|
||||
|
||||
var btnobj = form('submitbtn');
|
||||
btnobj.value='登录中...';
|
||||
btnobj.disabled=true;
|
||||
var data = {};
|
||||
var url = js.getajaxurl('check','login');
|
||||
data.device = device;
|
||||
data.cfrom = 'reim';
|
||||
data.ltype = ltype;
|
||||
data.adminuser = jm.base64encode(user);
|
||||
data.adminpass = jm.base64encode(pass);
|
||||
data.yanzm = loginyzm;
|
||||
js.bool = true;
|
||||
loginyzm = '';
|
||||
js.ajax(url,data,function(a){
|
||||
if(a.success){
|
||||
get('myface').src=a.face;
|
||||
btnobj.value='登录成功';
|
||||
js.setoption('loginface', a.face);
|
||||
var curl = '?d=reim&a=xina';
|
||||
loginsuccess(a);
|
||||
js.location(curl);
|
||||
}else{
|
||||
btnobj.value='登录';
|
||||
js.msg('msg',a.msg);
|
||||
btnobj.disabled=false;
|
||||
if(a.shouji){
|
||||
mobilejsho = a.mobile;
|
||||
js.prompt('输入手机验证码','手机号:'+a.shouji+' <span><a class="zhu" href="javascript:;" onclick="getcodes(this)">[获取验证码]</a></span>',function(jg,txt){
|
||||
if(jg=='yes' && txt){
|
||||
loginyzm = txt;
|
||||
loginsubmit();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},'post,json');
|
||||
}
|
||||
function loginsuccess(a){
|
||||
$('#mindivshows').hide();
|
||||
if(nwjsgui){
|
||||
rewinheight(600, 900);
|
||||
}
|
||||
}
|
||||
|
||||
function getpassobj(){
|
||||
return $('input[type=password]');
|
||||
}
|
||||
function changeauto(o){
|
||||
var oi = '0';
|
||||
if(o.checked)oi='1';
|
||||
js.setoption('autologin', oi);
|
||||
}
|
||||
function winclose(){
|
||||
nwjs.closebool=true;
|
||||
nwjs.win.close();
|
||||
}
|
||||
|
||||
function rewinheight(hei, wid){
|
||||
var l = (screen.width-wid)*0.5;
|
||||
var t = (screen.height-hei)*0.5-20;
|
||||
nwjs.win.moveTo(parseInt(l),parseInt(t));
|
||||
nwjs.win.resizeTo(wid,hei);
|
||||
}
|
||||
|
||||
function getcodes(o1){
|
||||
var da = {'mobile':mobilejsho,'device':device};
|
||||
var o2 = $(o1).parent();
|
||||
o2.html(js.getmsg('获取中...'));
|
||||
js.ajax('api.php?m=yanzm',da,function(a){
|
||||
if(a.success){
|
||||
o2.html(js.getmsg('获取成功','green'));
|
||||
}else{
|
||||
o2.html(js.getmsg(a.msg));
|
||||
}
|
||||
},'post,json');
|
||||
}
|
||||
|
||||
//获取验证码
|
||||
function getyzm(o1){
|
||||
mobilejsho = form('adminmobile').value;
|
||||
if(!mobilejsho){
|
||||
js.msg('msg','请输入手机号');
|
||||
form('adminmobile').focus();
|
||||
return;
|
||||
}
|
||||
var da = {'mobile':mobilejsho,'device':device};
|
||||
o1.value = '获取中...';
|
||||
js.setmsg();
|
||||
o1.disabled=true;
|
||||
js.ajax('api.php?m=yanzm&a=glogin',da,function(a){
|
||||
if(a.success){
|
||||
o1.value = '获取成功';
|
||||
js.msg('success', '验证码已发送到手机上');
|
||||
dshitime(60, o1);
|
||||
}else{
|
||||
o1.value = '重新获取';
|
||||
o1.disabled=false;
|
||||
js.msg('msg',a.msg);
|
||||
}
|
||||
},'post,json');
|
||||
}
|
||||
|
||||
function dshitime(sj,o1){
|
||||
if(sj==0){
|
||||
o1.disabled=false;
|
||||
o1.value='重新获取';
|
||||
return;
|
||||
}
|
||||
o1.disabled=true;
|
||||
o1.value=''+sj+'';
|
||||
setTimeout(function(){dshitime(sj-1, o1)},1000);
|
||||
}
|
||||
|
||||
function changlogin(){
|
||||
$('#loginview0').hide();
|
||||
$('#loginview1').show();
|
||||
form('logintype').value='1';
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body style="overflow:hidden;background:#f5f5f5">
|
||||
|
||||
<div >
|
||||
|
||||
<div style="height:30px;overflow:hidden;-webkit-app-region:drag;margin-right:30px;user-select:none;"> </div>
|
||||
|
||||
<div align="center" id="mindivshow" style="height:348px;overflow:hidden;">
|
||||
<div id="mindivshows">
|
||||
<div class="lmaisft">
|
||||
<div id="topblank" style="height:5px;overflow:hidden"></div>
|
||||
<div style="user-select:none;-webkit-user-select: none;" align="center"><img onclick="location.reload()" title="<?=URL?>" src="images/logo.png" id="myface" style="border-radius:50%;" align="absmiddle" height="80" width="80"></div>
|
||||
<div class="blank10"></div>
|
||||
<form style="padding:10px;" name="myform">
|
||||
<?php if($loginyzm!=3){?>
|
||||
<div id="loginview0">
|
||||
<div>
|
||||
<div><input type="text" onfocus="logifouct=true" class="input inputlog" onKeyUp="if(event.keyCode==13)getpassobj().focus()" placeholder="请输入用户名/姓名/手机号" id="adminuser" name="adminuser" ></div>
|
||||
</div>
|
||||
<div class="blank20"></div>
|
||||
<div>
|
||||
<div><input onfocus="logifouct=true" class="input inputlog" onKeyUp="if(event.keyCode==13)loginsubmit(1)" value="" type="password" placeholder="请输入密码"></div>
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div align="center">
|
||||
<div style="width:190px" align="left"><label><input onclick="changeauto(this)" id="checkautologin" type="checkbox">下次自动登录</label><?php if($loginyzm>0){?> <a href="javascript:;" onclick="changlogin()">验证码登录</a><?php }?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="loginview1" style="display:none">
|
||||
<input type="hidden" name="logintype" value="0">
|
||||
<?php }else{?>
|
||||
<div id="loginview1">
|
||||
<input type="hidden" name="logintype" value="1">
|
||||
<?php }?>
|
||||
|
||||
|
||||
<div>
|
||||
<input type="text" class="input inputlog" onKeyUp="if(event.keyCode==13)get('adminmobileyzm').focus()" maxlength="11" name="adminmobile" placeholder="请输入手机号">
|
||||
</div>
|
||||
<div class="blank20"></div>
|
||||
<div align="center">
|
||||
<table><tr>
|
||||
<td>
|
||||
<input class="input" style="height:40px;width:130px;border-top-left-radius:5px;border-bottom-left-radius:5px" name="adminmobileyzm" id="adminmobileyzm" onKeyUp="if(event.keyCode==13)loginsubmit(1)" maxlength="6" placeholder="请输入验证码">
|
||||
</td>
|
||||
<td><input type="button" onclick="getyzm(this)" style="height:40px;width:90px;border-top-right-radius:5px;border-bottom-right-radius:5px" value="获取验证码" class="webbtn" ></td>
|
||||
</tr></table>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="blank20"></div>
|
||||
|
||||
<div align="center">
|
||||
<input type="button" id="btn0" style="height:40px;width:190px;border-radius:5px;font-size:16px" onClick="loginsubmit(1)" class="btn" name="submitbtn" value="登录">
|
||||
|
||||
</div>
|
||||
<span id="msgview"></span>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div align="center" id="footerts" style="color:#888888;font-size:12px"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
232
webmain/reim/record/recordAction.php
Normal file
232
webmain/reim/record/recordAction.php
Normal file
@@ -0,0 +1,232 @@
|
||||
<?php
|
||||
class recordClassAction extends Action
|
||||
{
|
||||
public function storebeforeshow($table)
|
||||
{
|
||||
$dt1 = $this->post('dt1');
|
||||
$dt2 = $this->post('dt2');
|
||||
$key = $this->post('key');
|
||||
$atype = $this->post('atype');
|
||||
$receid = $this->post('receid');
|
||||
$whe = $this->rock->dbinstr('`receuid`', $this->adminid);
|
||||
$where = 'and '.$whe.'';
|
||||
|
||||
if($atype=='all'){
|
||||
$where = '';
|
||||
}
|
||||
|
||||
if(!isempt($dt1))$where.=" and `optdt`>='$dt1 00:00:00'";
|
||||
if(!isempt($dt2))$where.=" and `optdt`<='$dt2 23:59:59'";
|
||||
if(!isempt($receid)){
|
||||
$where.=" and ((`sendid` in($receid)) or (`type`='user' and `receid` in($receid)))";
|
||||
}
|
||||
if(!isempt($key)){
|
||||
$key = $this->rock->jm->base64encode($key);
|
||||
$where.=" and `cont` like '%$key%'";
|
||||
}
|
||||
|
||||
return $where;
|
||||
}
|
||||
|
||||
//数据显示后处理
|
||||
public function storeaftershow($table,$rows)
|
||||
{
|
||||
$suids = '0';
|
||||
$guids = '0';
|
||||
$fuids = '0';
|
||||
$typearr = array('user'=>'单人','group'=>'群会话');
|
||||
foreach($rows as $k=>$rs){
|
||||
$suids.=','.$rs['sendid'].'';
|
||||
|
||||
$rows[$k]['typetxt']= arrvalue($typearr, $rs['type']);
|
||||
if($rs['type']=='user'){
|
||||
$suids.=','.$rs['receid'].'';
|
||||
}else{
|
||||
$guids.=','.$rs['receid'].'';
|
||||
}
|
||||
if($rs['fileid']!='0')$fuids.=','.$rs['fileid'].'';
|
||||
}
|
||||
$warr = $farr = $garr = array();
|
||||
|
||||
if($suids!='0')$farr = $this->db->getarr('[Q]admin', "`id` in($suids)",'`face`,`name`');
|
||||
if($guids!='0')$garr = $this->db->getarr('[Q]im_group', "`id` in($guids)",'`face`,`name`');
|
||||
|
||||
if($fuids!='0')$warr = $this->db->getarr('[Q]file', "`id` in($fuids)",'filename,filesizecn,fileext,filepath,thumbpath,filenum'); //相关文件
|
||||
$fobj = m('file');
|
||||
$ztfo = m('im_messzt');
|
||||
foreach($rows as $k=>$rs){
|
||||
$sendid = $rs['sendid'];
|
||||
$receid = $rs['receid'];
|
||||
$type = $rs['type'];
|
||||
if(isset($farr[$sendid])){
|
||||
$rows[$k]['sendname'] = $farr[$sendid]['name'];
|
||||
}
|
||||
if($type=='user'){
|
||||
if(isset($farr[$receid])){
|
||||
$rows[$k]['recename'] = $farr[$receid]['name'];
|
||||
}
|
||||
}else{
|
||||
if(isset($garr[$receid])){
|
||||
$rows[$k]['recename'] = $garr[$receid]['name']; //群名称
|
||||
}
|
||||
}
|
||||
//发送人是我判断是否已读未读
|
||||
$zttext = '';
|
||||
if($type=='user'){
|
||||
if($rs['zt']=='1'){
|
||||
$zttext = '已读';
|
||||
$rows[$k]['ishui']=1;
|
||||
}else{
|
||||
$zttext = '<font color=red>未读</font>';
|
||||
}
|
||||
}else{
|
||||
if($sendid == $this->adminid){
|
||||
$tos = $ztfo->rows('mid='.$rs['id'].'');
|
||||
if($tos==0){
|
||||
$zttext = '全部已读';
|
||||
$rows[$k]['ishui']=1;
|
||||
}else{
|
||||
$zttext = '<font color=red>'.$tos.'人未读</font>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$rows[$k]['zttext'] = $zttext;
|
||||
|
||||
$fileid = $rs['fileid'];
|
||||
|
||||
|
||||
if(isset($warr[$fileid])){
|
||||
$fileid = $fobj->getfilestr($warr[$fileid],1);
|
||||
}
|
||||
|
||||
if($fileid=='0')$fileid = '';
|
||||
$rows[$k]['fileid'] = $fileid;
|
||||
}
|
||||
|
||||
return array(
|
||||
'rows' => $rows
|
||||
);
|
||||
}
|
||||
|
||||
//删除聊天记录
|
||||
public function delrecordAjax()
|
||||
{
|
||||
$id = $this->post('id');
|
||||
$atype = $this->post('atype');
|
||||
if($atype!='all'){
|
||||
if(!isempt($id)){
|
||||
m('reim')->clearrecord('',0,$this->adminid, $id);
|
||||
}
|
||||
}else{
|
||||
//管理员删除
|
||||
if($this->getsession('isadmin')!='1')backmsg('非管理员不能操作');
|
||||
|
||||
if(!isempt($id)){
|
||||
m('im_mess')->delete('id in('.$id.')');
|
||||
m('im_messzt')->delete('mid in('.$id.')');
|
||||
}
|
||||
}
|
||||
backmsg();
|
||||
}
|
||||
|
||||
public function delqingchuAjax()
|
||||
{
|
||||
$tas = (int)m('option')->getval('chatrecorddt','0');
|
||||
if($tas<=0)$tas = 180;
|
||||
$dt = date('Y-m-d H:i:s', time()-$tas*24*3600);
|
||||
m('im_mess')->delete("`optdt`<='$dt'");
|
||||
m('im_history')->delete("`optdt`<='$dt'");
|
||||
m('im_messzt')->delete("`mid` not in(select `id` from `[Q]im_mess`)");
|
||||
echo $tas;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function storebefore_tonghuashow($table)
|
||||
{
|
||||
$dt1 = $this->post('dt1');
|
||||
$dt2 = $this->post('dt2');
|
||||
$key = $this->post('key');
|
||||
$atype = $this->post('atype');
|
||||
$receid = $this->post('receid');
|
||||
$where = 'and (`faid`='.$this->adminid.' or `joinids`='.$this->adminid.')';
|
||||
|
||||
if($atype=='all'){
|
||||
$where = '';
|
||||
}
|
||||
|
||||
if(!isempt($dt1))$where.=" and `adddt`>='$dt1 00:00:00'";
|
||||
if(!isempt($dt2))$where.=" and `adddt`<='$dt2 23:59:59'";
|
||||
if(!isempt($receid)){
|
||||
$where.=" and (`faid` in($receid) or `joinids` in($receid))";
|
||||
}
|
||||
if(!isempt($key)){
|
||||
//$key = $this->rock->jm->base64encode($key);
|
||||
//$where.=" and `cont` like '%$key%'";
|
||||
}
|
||||
|
||||
return $where;
|
||||
}
|
||||
|
||||
//数据显示后处理
|
||||
public function storeafter_tonghuashow($table,$rows)
|
||||
{
|
||||
$suids = '0';
|
||||
$typearr = array('语音','视频');
|
||||
foreach($rows as $k=>$rs){
|
||||
$suids.=','.$rs['faid'].'';
|
||||
if(!isempt($rs['joinids']))$suids.=','.$rs['joinids'].'';
|
||||
|
||||
}
|
||||
$farr= array();
|
||||
|
||||
if($suids!='0')$farr = $this->db->getarr('[Q]admin', "`id` in($suids)",'`face`,`name`');
|
||||
|
||||
$statea = array('呼叫中','<font color=green>接通</font>','<font color=red>拒绝</font>','取消','等待接听','超时取消');
|
||||
|
||||
foreach($rows as $k=>$rs){
|
||||
$faid = $rs['faid'];
|
||||
$joinids = $rs['joinids'];
|
||||
if(isset($farr[$faid])){
|
||||
$rows[$k]['faid'] = $farr[$faid]['name'];
|
||||
}
|
||||
|
||||
if(isset($farr[$joinids])){
|
||||
$rows[$k]['joinids'] = $farr[$joinids]['name'];
|
||||
}
|
||||
if($rs['state']==1 && !isempt($rs['jiedt']) && !isempt($rs['enddt'])){
|
||||
$sj = strtotime($rs['enddt']) - strtotime($rs['jiedt']);
|
||||
$rows[$k]['remark'] = '接听'.$sj.'秒';
|
||||
}
|
||||
$rows[$k]['type'] = $typearr[$rs['type']];
|
||||
$rows[$k]['state'] = $statea[$rs['state']];
|
||||
}
|
||||
|
||||
return array(
|
||||
'rows' => $rows
|
||||
);
|
||||
}
|
||||
|
||||
//删除聊天记录
|
||||
public function delrecord_tonghuaAjax()
|
||||
{
|
||||
$id = $this->post('id');
|
||||
$atype = $this->post('atype');
|
||||
//管理员删除
|
||||
if($this->getsession('isadmin')!='1')backmsg('非管理员不能操作');
|
||||
|
||||
m('im_tonghua')->delete('id in('.$id.')');
|
||||
backmsg();
|
||||
}
|
||||
|
||||
public function downloadAction()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function historyAction()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
118
webmain/reim/record/rock_record.php
Normal file
118
webmain/reim/record/rock_record.php
Normal file
@@ -0,0 +1,118 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
{params}
|
||||
var atype = params.atype;
|
||||
var a = $('#veiw_{rand}').bootstable({
|
||||
tablename:'im_mess',celleditor:false,sort:'id',dir:'desc',checked:true,modedir:'{mode}:{dir}',
|
||||
storeafteraction:'storeaftershow',params:{'atype':atype},storebeforeaction:'storebeforeshow',fanye:true,
|
||||
columns:[{
|
||||
text:'发送人',dataIndex:'sendname'
|
||||
},{
|
||||
text:'接收人',dataIndex:'recename',editor:true
|
||||
},{
|
||||
text:'消息类型',dataIndex:'typetxt'
|
||||
},{
|
||||
text:'消息内容',dataIndex:'cont',align:'left',renderer:function(v){
|
||||
return jm.base64decode(v);
|
||||
},renderstyle:function(v,d){
|
||||
return 'word-wrap:break-word;word-break:break-all;white-space:normal;';
|
||||
}
|
||||
},{
|
||||
text:'相关文件',dataIndex:'fileid'
|
||||
},{
|
||||
text:'发送时间',dataIndex:'optdt'
|
||||
},{
|
||||
text:'状态',dataIndex:'zttext'
|
||||
},{
|
||||
text:'ID',dataIndex:'id',sortable:true
|
||||
}]
|
||||
});
|
||||
|
||||
var c = {
|
||||
del:function(){
|
||||
a.del({url:js.getajaxurl('delrecord','{mode}','{dir}',{'atype':atype}),checked:true});
|
||||
},
|
||||
daochu:function(){
|
||||
a.exceldown();
|
||||
},
|
||||
search:function(){
|
||||
a.setparams({
|
||||
dt1:get('dt1_{rand}').value,
|
||||
dt2:get('dt2_{rand}').value,
|
||||
key:get('key_{rand}').value,
|
||||
receid:get('receid{rand}').value
|
||||
},true);
|
||||
},
|
||||
removes:function(){
|
||||
get('recename{rand}').value='';
|
||||
get('receid{rand}').value='';
|
||||
},
|
||||
getdists:function(o1, lx){
|
||||
var cans = {
|
||||
nameobj:get('recename{rand}'),
|
||||
idobj:get('receid{rand}'),
|
||||
type:'usercheck',
|
||||
title:'选择发送人/接收人'
|
||||
};
|
||||
js.getuser(cans);
|
||||
},
|
||||
qingchu:function(){
|
||||
js.confirm('确定要清除一些记录嘛?',function(jg){
|
||||
if(jg=='yes')c.qingchus();
|
||||
});
|
||||
},
|
||||
qingchus:function(){
|
||||
js.loading('清除中...');
|
||||
js.ajax(js.getajaxurl('delqingchu','{mode}','{dir}'),{},function(ss){
|
||||
js.msgok('清除成功'+ss+'天前的记录');
|
||||
a.reload();
|
||||
});
|
||||
}
|
||||
};
|
||||
a.settishi('请定时删除记录太久的记录,防止访问慢');
|
||||
js.initbtn(c);
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td nowrap>日期从 </td>
|
||||
<td nowrap>
|
||||
<input style="width:110px" onclick="js.changedate(this)" readonly class="form-control datesss" id="dt1_{rand}" >
|
||||
</td>
|
||||
<td nowrap> 至 </td>
|
||||
<td nowrap>
|
||||
<input style="width:110px" onclick="js.changedate(this)" readonly class="form-control datesss" id="dt2_{rand}" >
|
||||
</td>
|
||||
|
||||
<td style="padding-left:10px">
|
||||
<input class="form-control" style="width:110px" id="key_{rand}" placeholder="消息内容">
|
||||
</td>
|
||||
<td style="padding-left:10px">
|
||||
<div style="width:230px" class="input-group">
|
||||
<input readonly class="form-control" placeholder="发送人/接收人" id="recename{rand}" >
|
||||
<input type="hidden" id="receid{rand}" >
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" click="removes" type="button"><i class="icon-remove"></i></button>
|
||||
<button class="btn btn-default" click="getdists,1" type="button"><i class="icon-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td style="padding-left:10px">
|
||||
<button class="btn btn-default" click="search" type="button">搜索</button></button>
|
||||
</td>
|
||||
<td width="90%" style="padding-left:10px"></td>
|
||||
|
||||
<td align="right" id="tdright_{rand}" nowrap>
|
||||
<button class="btn btn-default" click="qingchu" type="button">清理记录</button>
|
||||
<button class="btn btn-default" click="daochu,1" type="button">导出</button>
|
||||
<button class="btn btn-danger" click="del" type="button"><i class="icon-trash"></i> 删除</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div id="veiw_{rand}"></div>
|
||||
96
webmain/reim/record/rock_record_tonghua.php
Normal file
96
webmain/reim/record/rock_record_tonghua.php
Normal file
@@ -0,0 +1,96 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
{params}
|
||||
var atype = params.atype;
|
||||
var a = $('#veiw_{rand}').bootstable({
|
||||
tablename:'im_tonghua',celleditor:false,sort:'id',dir:'desc',checked:true,modedir:'{mode}:{dir}',
|
||||
storeafteraction:'storeafter_tonghuashow',params:{'atype':atype},storebeforeaction:'storebefore_tonghuashow',fanye:true,
|
||||
columns:[{
|
||||
text:'发送人',dataIndex:'faid'
|
||||
},{
|
||||
text:'接收人',dataIndex:'joinids'
|
||||
},{
|
||||
text:'通话类型',dataIndex:'type',sortable:true
|
||||
},{
|
||||
text:'发起时间',dataIndex:'adddt'
|
||||
},{
|
||||
text:'结束时间',dataIndex:'enddt'
|
||||
},{
|
||||
text:'状态',dataIndex:'state',sortable:true
|
||||
},{
|
||||
text:'备注',dataIndex:'remark',align:'left'
|
||||
},{
|
||||
text:'ID',dataIndex:'id',sortable:true
|
||||
}]
|
||||
});
|
||||
|
||||
var c = {
|
||||
del:function(){
|
||||
a.del({url:js.getajaxurl('delrecord_tonghua','{mode}','{dir}',{'atype':atype}),checked:true});
|
||||
},
|
||||
daochu:function(){
|
||||
a.exceldown();
|
||||
},
|
||||
search:function(){
|
||||
a.setparams({
|
||||
dt1:get('dt1_{rand}').value,
|
||||
dt2:get('dt2_{rand}').value,
|
||||
receid:get('receid{rand}').value
|
||||
},true);
|
||||
},
|
||||
removes:function(){
|
||||
get('recename{rand}').value='';
|
||||
get('receid{rand}').value='';
|
||||
},
|
||||
getdists:function(o1, lx){
|
||||
var cans = {
|
||||
nameobj:get('recename{rand}'),
|
||||
idobj:get('receid{rand}'),
|
||||
type:'usercheck',
|
||||
title:'选择发送人/接收人'
|
||||
};
|
||||
js.getuser(cans);
|
||||
}
|
||||
};
|
||||
js.initbtn(c);
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td nowrap>发起日期从 </td>
|
||||
<td nowrap>
|
||||
<input style="width:110px" onclick="js.changedate(this)" readonly class="form-control datesss" id="dt1_{rand}" >
|
||||
</td>
|
||||
<td nowrap> 至 </td>
|
||||
<td nowrap>
|
||||
<input style="width:110px" onclick="js.changedate(this)" readonly class="form-control datesss" id="dt2_{rand}" >
|
||||
</td>
|
||||
|
||||
<td style="padding-left:10px">
|
||||
<div style="width:230px" class="input-group">
|
||||
<input readonly class="form-control" placeholder="发起人/接收人" id="recename{rand}" >
|
||||
<input type="hidden" id="receid{rand}" >
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" click="removes" type="button"><i class="icon-remove"></i></button>
|
||||
<button class="btn btn-default" click="getdists,1" type="button"><i class="icon-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td style="padding-left:10px">
|
||||
<button class="btn btn-default" click="search" type="button">搜索</button></button>
|
||||
</td>
|
||||
<td width="90%" style="padding-left:10px"></td>
|
||||
|
||||
<td align="right" id="tdright_{rand}" nowrap>
|
||||
<button class="btn btn-default" click="daochu,1" type="button">导出</button>
|
||||
<button class="btn btn-danger" click="del" type="button"><i class="icon-trash"></i> 删除</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div id="veiw_{rand}"></div>
|
||||
152
webmain/reim/record/tpl_record_download.html
Normal file
152
webmain/reim/record/tpl_record_download.html
Normal file
@@ -0,0 +1,152 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>下载管理器</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/css/webimcss.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/fontawesome/css/font-awesome.min.css">
|
||||
<link rel="shortcut icon" href="favicon.ico" />
|
||||
<script type="text/javascript" src="web/res/js/jquery.1.9.1.min.js"></script>
|
||||
<script type="text/javascript" src="js/js.js"></script>
|
||||
<script type="text/javascript" src="mode/plugin/jquery-rockmodels.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/perfectscrollbar/perfect-scrollbar.css"/>
|
||||
<script type="text/javascript" src="web/res/perfectscrollbar/perfect-scrollbar.js"></script>
|
||||
<script type="text/javascript" src="web/res/perfectscrollbar/jquery.mousewheel.js"></script>
|
||||
<style>
|
||||
<?php
|
||||
$col = getconfig('apptheme','#1389D3');
|
||||
echo 'body{--main-color:'.$col.'}';
|
||||
?>
|
||||
|
||||
.list{padding:10px 10px;border-top:1px #eeeeee solid}
|
||||
.list:hover{background:#f1f1f1}
|
||||
</style>
|
||||
<script>
|
||||
maincolor='<?=$col?>';
|
||||
function initbody(){
|
||||
c.init();
|
||||
}
|
||||
var c = {
|
||||
init:function(){
|
||||
this.getsese();
|
||||
$(window).resize(c.getsese);
|
||||
if(nwjsgui)this.showdata();
|
||||
$('#downlist').perfectScrollbar();
|
||||
},
|
||||
getsese:function(){
|
||||
var he = winHb()-50;
|
||||
$('#downlist').css('height',''+he+'px');
|
||||
},
|
||||
showdata:function(){
|
||||
chrome.downloads.search({}, function(e){
|
||||
c.showdatas(e);
|
||||
});
|
||||
},
|
||||
showdatas:function(da){
|
||||
da.sort(function(d1,d2){
|
||||
if(d1.id>d2.id)return 1;
|
||||
if(d1.id<d2.id)return -1;
|
||||
if(d1.id==d2.id)return 0;
|
||||
});
|
||||
for(var i=da.length-1;i>=0;i--)this.showlist(da[i]);
|
||||
if(da.length==0)$('#downlist').append('<div style="padding:50px;color:#cccccc;font-size:14px" align="center">无下载内容</div>');
|
||||
},
|
||||
showlist:function(d){
|
||||
var s = '',s1='',s2='',s3='';
|
||||
if(d.error=='USER_CANCELED'){
|
||||
d.filename='用户取消';
|
||||
d.exists = false;
|
||||
}
|
||||
if(!d.exists){
|
||||
s1='已删除 ';
|
||||
s2='text-decoration:line-through;';
|
||||
}else{
|
||||
s3=' <a onclick="c.show('+d.id+')" class="zhu">打开所在文件夹</a>';
|
||||
}
|
||||
if(d.state=='interrupted')s1+='中断 ';
|
||||
if(d.state=='in_progress'){
|
||||
var bil = js.float((d.bytesReceived/d.totalBytes)*100);
|
||||
s1+='<span id="loading'+d.id+'">正在下载('+bil+'%)...</span> ';
|
||||
c.reshowimt(d.id);
|
||||
}
|
||||
if(d.state=='complete')s1+='下载完成 ';
|
||||
|
||||
s+='<div id="list'+d.id+'" class="list">';
|
||||
s+=' <table><tr><td width="42">';
|
||||
s+=' <img id="icon'+d.id+'" src="images/noimg.jpg" align="absmiddle" width="32" height="32"> '
|
||||
s+=' </td><td>';
|
||||
s+=' <div style="'+s2+'">'+d.id+'、'+d.filename+' <span onclick="c.delete('+d.id+')" title="删除" class="cursor"><i class="icon-trash"></i></span></div>';
|
||||
s+=' <div style="font-size:12px;color:#888888">'+s1+''+js.formatsize(d.fileSize)+'('+js.now('now',new Date(d.startTime).getTime())+') '+s3+'</div>';
|
||||
//s+=' <div>'+JSON.stringify(d)+'</div>';
|
||||
s+=' </td></tr></table>'
|
||||
s+='</div>';
|
||||
$('#downlist').append(s);
|
||||
if(d.exists){
|
||||
chrome.downloads.getFileIcon(d.id,{}, function(str){
|
||||
get('icon'+d.id+'').src=str;
|
||||
});
|
||||
}
|
||||
},
|
||||
delete:function(id){
|
||||
chrome.downloads.erase({id:id}, function(){
|
||||
js.msgok('记录已删除');
|
||||
$('#list'+id+'').remove();
|
||||
})
|
||||
},
|
||||
show:function(id){
|
||||
chrome.downloads.show(id);
|
||||
},
|
||||
add:function(){
|
||||
js.prompt('新建下载','输入下载地址',function(jg,txt){
|
||||
if(jg=='yes' && txt.substr(0,4)=='http'){
|
||||
chrome.downloads.download({url:txt}, function(){
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
clearall:function(){
|
||||
chrome.downloads.erase({}, function(){
|
||||
js.msgok('记录已清空');
|
||||
js.reload();
|
||||
})
|
||||
},
|
||||
reshowimt:function(id){
|
||||
chrome.downloads.search({id:id}, function(da){
|
||||
c.reshowimts(da[0]);
|
||||
});
|
||||
},
|
||||
reshowimts:function(d){
|
||||
var s1 = '';
|
||||
if(d.state=='interrupted')s1='中断';
|
||||
if(d.state=='in_progress'){
|
||||
var bil = js.float((d.bytesReceived/d.totalBytes)*100);
|
||||
s1='正在下载('+bil+'%)...<a onclick="c.cancel('+d.id+')" class="zhu">取消下载</a>';
|
||||
setTimeout('c.reshowimt('+d.id+')',1000);
|
||||
}
|
||||
if(d.state=='complete')s1='下载完成';
|
||||
$('#loading'+d.id+'').html(s1);
|
||||
},
|
||||
cancel:function(id){
|
||||
chrome.downloads.cancel(id, function(){
|
||||
js.msgerror('下载已取消');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
<body style="overflow:hidden;background:white">
|
||||
<div id="downlist" style="height:100px;overflow:hidden;position:relative">
|
||||
|
||||
</div>
|
||||
<div style="height:50px;padding:0px 10px;text-align:right;line-height:50px;background:#f1f1f1;border-top:1px #cccccc solid">
|
||||
<!--<a class="zhu" title="新增下载" onclick="c.add()"><i class="icon-plus"></i></a> -->
|
||||
<a class="zhu" onclick="js.reload()"><i class="icon-refresh"></i> 刷新</a>
|
||||
<a class="zhu" onclick="c.clearall()"><i class="icon-trash"></i> 清空下载项</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
100
webmain/reim/record/tpl_record_history.html
Normal file
100
webmain/reim/record/tpl_record_history.html
Normal file
@@ -0,0 +1,100 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>消息记录</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/fontawesome/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="web/res/css/webimcss.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/perfectscrollbar/perfect-scrollbar.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/mode/menu/jquery-rockmenu.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/css/chat.css"/>
|
||||
<link rel="shortcut icon" href="favicon.ico" />
|
||||
<script type="text/javascript" src="web/res/js/jquery.1.9.1.min.js"></script>
|
||||
<script type="text/javascript" src="js/js.js"></script>
|
||||
<script type="text/javascript" src="js/base64-min.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/nwjs.js"></script>
|
||||
<script type="text/javascript" src="web/res/mode/menu/jquery-rockmenu.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/notify.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/strformat.js"></script>
|
||||
<script type="text/javascript" src="js/reim_xina.js?<?=time()?>"></script>
|
||||
<script type="text/javascript" src="web/res/js/websocket.js"></script>
|
||||
<script type="text/javascript" src="web/res/perfectscrollbar/perfect-scrollbar.js"></script>
|
||||
<script type="text/javascript" src="web/res/perfectscrollbar/jquery.mousewheel.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/jquery-imgview.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/jquery-rockupload.js"></script>
|
||||
<script type="text/javascript" src="mode/plugin/jquery-rockmodels.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/jquery-changeuser.js"></script>
|
||||
<style>
|
||||
<?php
|
||||
$col = getconfig('apptheme','#1389D3');
|
||||
$cola= c('image')->colorTorgb($col);
|
||||
echo 'body{--main-color:'.$col.'}.leftcls{background:'.$col.'}.webbtn{background:'.$col.'}.qipao .qipaocontright{background:rgba('.$cola[0].','.$cola[1].','.$cola[2].',0.4)}.qipao .qipaoright{border-color: transparent transparent transparent rgba('.$cola[0].','.$cola[1].','.$cola[2].',0.4)}';
|
||||
?>
|
||||
</style>
|
||||
<script>
|
||||
maincolor='<?=$col?>',adminname='',adminface='',video_bool=false,companynum='';
|
||||
date = js.now('Y-m-d');
|
||||
function initbody(){
|
||||
reim.outgroup.outunum = js.getoption('outunum');
|
||||
c.init();
|
||||
}
|
||||
var c = {
|
||||
init:function(){
|
||||
this.getsese();
|
||||
$(window).resize(c.getsese);
|
||||
var type = js.request('type');
|
||||
var gid = js.request('gid');
|
||||
reim.onlinearr = {};
|
||||
try{reim.onlinearr = opener.reim.onlinearr;}catch(e){}
|
||||
$('#historylist').perfectScrollbar();
|
||||
reshow(type,gid);
|
||||
},
|
||||
getsese:function(){
|
||||
var he = winHb();
|
||||
viewheight = he;
|
||||
$('#viewzhulist').css('height',''+he+'px');
|
||||
$('#historylist').css('height',''+he+'px');
|
||||
}
|
||||
}
|
||||
function reshow(type,reid){
|
||||
var num = ''+type+'_'+reid+'';
|
||||
if(num==c.num)return;
|
||||
c.num = num;
|
||||
|
||||
|
||||
reim.openchat(type,reid,'会话','images/noface.png');
|
||||
reim.chatobj[num].dktype = true;
|
||||
reim.chatobj[num].showtools();
|
||||
var rece = reim.chatobj[num].receinfo;
|
||||
reim.showhistorys({
|
||||
'name':rece.name,
|
||||
'type':type,
|
||||
'receid':reid,
|
||||
'receid':reid,
|
||||
'stotal':0,
|
||||
'face':rece.face,
|
||||
'deptid':rece.deptid,
|
||||
'cont':''
|
||||
},true,true);
|
||||
|
||||
//$('#toolsliao_'+num+'').remove();
|
||||
$('#input_content_'+num+'').parent().parent().remove();
|
||||
$('#chatsendbtn_'+num+'').parent().parent().remove();
|
||||
$('#viewcontent_'+num+'').attr('resizeh',91);
|
||||
reim.resize();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
<body style="overflow:hidden;background:#f5f5f5">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td bgcolor="#ebebeb" style="border-right:1px #dddddd solid"><div style="width:220px;overflow:hidden;height:200px;position:relative" id="historylist"></div></td>
|
||||
<td width="100%"><div id="viewzhulist" style="height:100px;overflow:hidden"></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
39
webmain/reim/tonghua/tonghuaAction.php
Normal file
39
webmain/reim/tonghua/tonghuaAction.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* 音视频通话使用的
|
||||
*/
|
||||
class tonghuaClassAction extends Action{
|
||||
|
||||
public function defaultAction()
|
||||
{
|
||||
$id = (int)$this->get('id','0');
|
||||
$channel = $this->get('channel');
|
||||
$iscall = 'true';
|
||||
if($channel){
|
||||
$thrs = m('im_tonghua')->getone("`channel`='$channel'");
|
||||
if(!$thrs)return '无效记录';
|
||||
$state= $thrs['state'];
|
||||
if($state==3 || $state==5)return '通话已取消';
|
||||
if($state!='0')return '通话记录无效';
|
||||
if($thrs['faid']!=$id)return '无效打开';
|
||||
if($thrs['joinids']!=$this->adminid)return '不是跟你的通话';
|
||||
$iscall = 'false';
|
||||
$sytime = time()-strtotime($thrs['adddt']);
|
||||
$thrs['sytime'] = $sytime;
|
||||
$this->assign('thrs', $thrs);
|
||||
}else{
|
||||
$thrs['sytime'] = 0;
|
||||
$thrs['channel'] = '';
|
||||
$thrs['type'] = 0;
|
||||
$this->assign('thrs', $thrs);
|
||||
}
|
||||
$dbs= m('admin');
|
||||
$ars= $dbs->getone('`id`='.$id.' and `status`=1','id,name,face');
|
||||
if(!$ars)return '用户不存在';
|
||||
$this->title = '与'.$ars['name'].'通话';
|
||||
$ars['face'] = $dbs->getface($ars['face']);
|
||||
$ars['iscall'] = $iscall;
|
||||
$this->assign('ars', $ars);
|
||||
}
|
||||
|
||||
}
|
||||
554
webmain/reim/tonghua/tpl_tonghua.html
Normal file
554
webmain/reim/tonghua/tpl_tonghua.html
Normal file
@@ -0,0 +1,554 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title><?=$da['title']?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/css/webimcss.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/fontawesome/css/font-awesome.min.css">
|
||||
<link rel="shortcut icon" href="favicon.ico" />
|
||||
<script type="text/javascript" src="js/jquery.js"></script>
|
||||
<script type="text/javascript" src="js/js.js"></script>
|
||||
<script type="text/javascript" src="js/base64-min.js"></script>
|
||||
<script type="text/javascript" src="mode/agora/AgoraRTC_N-4.7.1.js"></script>
|
||||
<script type="text/javascript" src="mode/plugin/jquery-rockmodels.js"></script>
|
||||
<script>
|
||||
adminid = <?=$da['adminid']?>;
|
||||
var localAudioTrack=false,localVideoTrack = false,remoteAudioTrack=false,remoteVideoTrack=false;
|
||||
function initbody(){
|
||||
c.init();
|
||||
}
|
||||
function bodyunload(){
|
||||
c.bodyunload(false);
|
||||
}
|
||||
var c = {
|
||||
iscall:<?=$ars['iscall']?>,
|
||||
type:0,
|
||||
callshu:30,
|
||||
id:<?=$ars['id']?>,
|
||||
nwwin:false,
|
||||
init:function(){
|
||||
this.typearr = ['语音','视频'];
|
||||
this.name = '<?=$ars['name']?>';
|
||||
this.playobj = get('notify_sound_tonghua');
|
||||
js.initbtn(this);
|
||||
//接收端
|
||||
if(!this.iscall){
|
||||
this.type = <?=$thrs['type']?>;
|
||||
this.channel = '<?=$thrs['channel']?>';
|
||||
this.jieshoucall();
|
||||
}else{
|
||||
$('#calldiv').show();
|
||||
}
|
||||
if(nwjsgui){
|
||||
this.nwwin = nw.Window.get();
|
||||
this.nwwin.on('close', function(){
|
||||
c.bodyunload(this);
|
||||
});
|
||||
}
|
||||
},
|
||||
hujiao:function(o1,lx){
|
||||
if(this.hujiaobo)return;
|
||||
js.loading('请求中...');
|
||||
this.hujiaobo = true;
|
||||
this.type = lx;
|
||||
js.ajax('tonghua|thinit',{id:this.id,type:lx},function(ret){
|
||||
c.hujiaoback(ret);
|
||||
}, 'get', function(str){
|
||||
js.msgerror(str);
|
||||
c.stateupdate(str);
|
||||
c.hujiaobo=false;
|
||||
});
|
||||
},
|
||||
stateupdate(str, bo){
|
||||
$('#wiatling').html(str);
|
||||
$('#wiatlings').html(str);
|
||||
document.title = str;
|
||||
if(bo)this.showtoast(str);
|
||||
},
|
||||
showtoast:function(str){
|
||||
js.msg('success',str);
|
||||
},
|
||||
hujiaoback:function(ret){
|
||||
this.thcan = ret.data;
|
||||
this.channel = this.thcan.channel;
|
||||
$('#backbtn').hide();
|
||||
$('#hujiaobtn').remove();
|
||||
$('#cancelbtn').show();
|
||||
this.initagoraRtc();
|
||||
this.callstartplay();
|
||||
this.callstrimes = js.now('time');
|
||||
this.callmiashue();
|
||||
this.hujiaobool = true;
|
||||
},
|
||||
callstartplay:function(){
|
||||
this.playobj.src='web/res/sound/call.mp3';
|
||||
if(this.playobj.play)this.playobj.play();
|
||||
},
|
||||
callstopplay:function(){
|
||||
if(this.playobj.pause)this.playobj.pause();
|
||||
},
|
||||
cancalpayls:function(){
|
||||
this.playobj.src='web/res/sound/gua.mp3';
|
||||
this.playobj.loop='';
|
||||
if(this.playobj.play)this.playobj.play();
|
||||
},
|
||||
|
||||
callmiashue:function(){
|
||||
clearTimeout(this.callmiashuetime);
|
||||
var sj = parseInt((js.now('time')-this.callstrimes)*0.001);
|
||||
if(sj>this.callshu){
|
||||
this.cancelhus(5);
|
||||
return;
|
||||
}
|
||||
if(sj%2==0 && sj>0 && !this.ztpandbool){
|
||||
this.ztpandbool = true;
|
||||
js.ajax('tonghua|state',{channel:this.channel}, function(ret){
|
||||
var zt = ret.data.state;
|
||||
c.ztpandbool = false;
|
||||
if(!c.calljutong && (zt=='tongyi' || zt=='jujue'))c.callbackss(zt);
|
||||
},'get', function(st1){
|
||||
c.ztpandbool = false;
|
||||
js.msg();
|
||||
});
|
||||
}
|
||||
this.stateupdate(''+this.typearr[this.type]+'通话呼叫中已呼叫'+sj+'秒...');
|
||||
this.callmiashuetime = setTimeout(function(){c.callmiashue()},1000);
|
||||
},
|
||||
initagoraRtc:async function(){
|
||||
client = AgoraRTC.createClient({ mode: "rtc", codec: "vp8" });
|
||||
|
||||
client.on("user-published", async (user, mediaType) => {
|
||||
await client.subscribe(user, mediaType);
|
||||
if (mediaType === "video") {
|
||||
remoteVideoTrack = user.videoTrack;
|
||||
remoteVideoTrack.play('remote_stream');
|
||||
}
|
||||
if (mediaType === "audio") {
|
||||
remoteAudioTrack = user.audioTrack;
|
||||
remoteAudioTrack.play();
|
||||
}
|
||||
});
|
||||
client.on("user-joined", (user) => {
|
||||
//showSuccess('有人来('+JSON.stringify(user)+')');
|
||||
});
|
||||
client.on("user-left", (user, reason) => {
|
||||
//showAlert('有人退出['+reason+']('+JSON.stringify(user)+')');
|
||||
c.guaduanok(false);
|
||||
});
|
||||
},
|
||||
cancelhu:function(){
|
||||
this.cancelhus(3);
|
||||
},
|
||||
closewin:function(bo){
|
||||
if(bo){
|
||||
if(this.nwwin){
|
||||
this.nwwin.close(true);
|
||||
}else{
|
||||
window.close();
|
||||
}
|
||||
}else{
|
||||
setTimeout(function(){c.closewin(true)},2000);
|
||||
}
|
||||
},
|
||||
cancelhus:function(zt){
|
||||
$('#cancelbtn').hide();
|
||||
this.hujiaobool = false;
|
||||
clearTimeout(this.callmiashuetime);
|
||||
var ss1='';if(zt==5)ss1='无人接听';
|
||||
js.loading(''+ss1+'取消呼叫中...');
|
||||
this.stateupdate(''+ss1+'取消呼叫中...');
|
||||
this.callstopplay();
|
||||
js.ajax('tonghua|cancel',{channel:this.thcan.channel,state:zt},function(ret){
|
||||
c.stateupdate(''+ss1+'已取消呼叫', true);
|
||||
c.closewin();
|
||||
}, 'get', function(str){
|
||||
$('#cancelbtn').show();
|
||||
js.msgerror(str);
|
||||
c.stateupdate(str);
|
||||
});
|
||||
},
|
||||
|
||||
//接通后显示视频
|
||||
localvadio:async function(){
|
||||
if(this.localvadiobool)return;
|
||||
this.localvadiobool = true;
|
||||
this.isjietong = true;
|
||||
this.showtoast(''+this.typearr[this.type]+'已接通');
|
||||
this.stateupdate('与'+this.name+''+this.typearr[this.type]+'通话中(00:00)');
|
||||
$('#backbtn').hide();
|
||||
this.starttime = js.now('time');
|
||||
this.showmian();
|
||||
|
||||
|
||||
$('#calldiv').remove();
|
||||
$('#canceldiv').show();
|
||||
|
||||
if(this.type==1){
|
||||
$('#shipindiv').show();
|
||||
$('#yuyindiv').hide();
|
||||
$('#local_stream').show();
|
||||
$('#remote_stream').show();
|
||||
}
|
||||
|
||||
await client.join(this.thcan.appid, this.thcan.channel, this.thcan.token, this.thcan.uid);
|
||||
|
||||
// 通过麦克风采集的音频创建本地音频轨道对象。
|
||||
localAudioTrack = await AgoraRTC.createMicrophoneAudioTrack();
|
||||
await client.publish(localAudioTrack);
|
||||
|
||||
if(this.type==1){
|
||||
// 通过摄像头采集的视频创建本地视频轨道对象。
|
||||
localVideoTrack = await AgoraRTC.createCameraVideoTrack();
|
||||
// 将这些音视频轨道对象发布到频道中。
|
||||
await client.publish(localVideoTrack);
|
||||
localVideoTrack.play('local_stream'); //播放视频
|
||||
}
|
||||
},
|
||||
showmian:function(){
|
||||
var sj = parseInt((js.now('time')-this.starttime)*0.001);
|
||||
this.tonghuasj = sj;
|
||||
var fz = 0;
|
||||
if(sj>59)fz = parseInt(sj/60);
|
||||
var ms = sj-fz*60;
|
||||
this.stateupdate(''+this.typearr[this.type]+'通话中('+xy10(fz)+':'+xy10(ms)+')');
|
||||
if(sj>0 && sj%2==0 && !this.showmiaobool){
|
||||
this.showmiaobool = true;
|
||||
js.ajax('tonghua|stateth',{channel:this.channel}, function(ret){
|
||||
var zt = ret.data.state;
|
||||
c.showmiaobool = false;
|
||||
if(zt=='jiesu')c.callbackss(zt);
|
||||
},'get', function(st1){
|
||||
c.showmiaobool = false;
|
||||
js.msg();
|
||||
});
|
||||
}
|
||||
this.showmiantime = setTimeout(function(){c.showmian()},1000);
|
||||
},
|
||||
|
||||
guaduan:function(){
|
||||
this.guaduanok(true);
|
||||
},
|
||||
guaduanok:function(bo){
|
||||
if(this.guaduanbool)return;
|
||||
this.guaduanbool = true;
|
||||
if(bo){
|
||||
this.showtoast('挂断中...');
|
||||
js.ajax('tonghua|jiesu',{channel:this.thcan.channel,toid:this.id}, function(ret){
|
||||
c.guaduanokok();
|
||||
},'get', function(str){
|
||||
c.guaduanokok();
|
||||
});
|
||||
}else{
|
||||
this.guaduanokok();
|
||||
}
|
||||
},
|
||||
guaduanokok:function(){
|
||||
clearTimeout(this.showmiantime);
|
||||
if(localAudioTrack)localAudioTrack.close();
|
||||
if(localVideoTrack)localVideoTrack.close();
|
||||
client.unpublish();
|
||||
client.leave();
|
||||
this.stateupdate('通话已结束', true);
|
||||
$('#canceldiv').remove();
|
||||
this.cancalpayls();
|
||||
this.closewin();
|
||||
},
|
||||
|
||||
|
||||
payerstart:function(){
|
||||
this.playobj.src='web/res/sound/mi.mp3';
|
||||
if(this.playobj.play)this.playobj.play();
|
||||
},
|
||||
payerend:function(){
|
||||
this.callstopplay();
|
||||
},
|
||||
qiehysq:function(){
|
||||
if(!this.yuancjinb){
|
||||
remoteAudioTrack.setVolume(0);
|
||||
this.yuancjinb = true;
|
||||
$('#jingyinclltxt').html('开启声音');
|
||||
get('jingyincll').className='icon-volume-off';
|
||||
}else{
|
||||
remoteAudioTrack.setVolume(100);
|
||||
this.yuancjinb = false;
|
||||
$('#jingyinclltxt').html('静音');
|
||||
get('jingyincll').className='icon-volume-up';
|
||||
}
|
||||
},
|
||||
|
||||
//接电话端处理初始化
|
||||
jieshoucall:function(){
|
||||
$('#backbtn').hide();
|
||||
$('#anjiandiv').show();
|
||||
js.ajax('tonghua|receopen',{channel:this.channel});
|
||||
this.jieshoutimes(-1);
|
||||
this.isyaoqbool = true;
|
||||
this.payerstart();
|
||||
},
|
||||
jieshoutimes:function(i1){
|
||||
var str = this.typearr[this.type];
|
||||
var sys = this.callshu - <?=$thrs['sytime']?> -i1;
|
||||
if(sys<0){
|
||||
this.stateupdate('超时自动取消', true);
|
||||
this.jiedianha(false,3);
|
||||
}else{
|
||||
if(i1%2==0 && i1>0 && !this.ztpandbool){
|
||||
this.ztpandbool = true;
|
||||
js.ajax('tonghua|state',{channel:this.channel}, function(ret){
|
||||
var zt = ret.data.state;
|
||||
c.ztpandbool = false;
|
||||
if(zt=='cancel' || zt=='tongyi' || zt=='jujue')c.callbackss(zt);
|
||||
},'get', function(st1){
|
||||
c.ztpandbool = false;
|
||||
js.msg();
|
||||
});
|
||||
}
|
||||
this.stateupdate('邀请与您'+str+'通话('+sys+')...');
|
||||
this.jieshoutimesa = setTimeout(function(){c.jieshoutimes(i1+1)},1000);
|
||||
}
|
||||
},
|
||||
jiedianha:function(o1,lx){
|
||||
clearTimeout(this.jieshoutimesa);
|
||||
this.ismybool = true;
|
||||
this.isyaoqbool = false;
|
||||
$('#anjiandiv').hide();
|
||||
this.payerend();
|
||||
if(lx==1){
|
||||
this.stateupdate('接通中...');
|
||||
this.initagoraRtc();
|
||||
js.ajax('tonghua|jietong',{channel:this.channel,state:1},function(ret){
|
||||
c.jietongback(ret);
|
||||
}, 'get', function(str){
|
||||
js.msgerror(str);
|
||||
c.stateupdate(str);
|
||||
$('#anjiandiv').show();
|
||||
});
|
||||
}
|
||||
if(lx==2){
|
||||
this.stateupdate('拒绝中...');
|
||||
js.ajax('tonghua|jie',{channel:this.channel,state:2},function(ret){
|
||||
var ms2 = '已拒绝通话';
|
||||
if(ret.data.satype)ms2 = ret.data.satype;
|
||||
c.jiequxian(ms2);
|
||||
},'get', function(str){
|
||||
js.msgerror(str);
|
||||
c.stateupdate(str);
|
||||
$('#anjiandiv').show();
|
||||
});
|
||||
}
|
||||
if(lx==3){
|
||||
this.closewin();
|
||||
}
|
||||
},
|
||||
jiequxian:function(s1){
|
||||
this.stateupdate(s1, true);
|
||||
this.closewin();
|
||||
},
|
||||
jietongback:function(ret){
|
||||
this.thcan = ret.data;
|
||||
if(ret.data.satype){
|
||||
this.jiequxian(ret.data.satype);
|
||||
}else{
|
||||
this.stateupdate(''+this.typearr[this.type]+'通话中...');
|
||||
this.localvadio();//被叫端接通
|
||||
}
|
||||
},
|
||||
bodyunload:function(win){
|
||||
var lx = '';
|
||||
if(this.isjietong){
|
||||
this.guaduan();
|
||||
lx = '挂断中...';
|
||||
}else{
|
||||
if(this.hujiaobool){
|
||||
this.cancelhu();
|
||||
lx='取消中...';
|
||||
}
|
||||
if(this.isyaoqbool){
|
||||
this.jiedianha(false,2);
|
||||
lx='邀请中..';
|
||||
}
|
||||
}
|
||||
if(!lx){
|
||||
win.close(true);
|
||||
}
|
||||
},
|
||||
callbackss:function(lx){
|
||||
this.callstopplay();
|
||||
clearTimeout(this.callmiashuetime);
|
||||
clearTimeout(this.jieshoutimesa);
|
||||
if(lx=='jujue'){
|
||||
this.calljutong = true;
|
||||
this.hujiaobool = false;
|
||||
if(this.iscall){
|
||||
$('#cancelbtn').remove();;
|
||||
this.stateupdate('对方拒绝通话', true);
|
||||
this.closewin();
|
||||
}
|
||||
if(!this.iscall && !this.ismybool){
|
||||
this.stateupdate('已在另端拒绝', true);
|
||||
$('#anjiandiv').remove();
|
||||
this.closewin();
|
||||
}
|
||||
}
|
||||
if(lx=='tongyi'){
|
||||
this.calljutong = true;
|
||||
this.hujiaobool = false;
|
||||
if(this.iscall){
|
||||
this.stateupdate('接通中...');
|
||||
this.localvadio(); //主叫端接通
|
||||
}
|
||||
if(!this.iscall && !this.ismybool){
|
||||
this.stateupdate('已在另端接通', true);
|
||||
$('#anjiandiv').remove();
|
||||
this.closewin();
|
||||
}
|
||||
}
|
||||
|
||||
//----以下是接收端处理----
|
||||
//呼叫已经取消
|
||||
if(lx=='cancel' && get('anjiandiv')){
|
||||
$('#anjiandiv').remove();
|
||||
clearTimeout(this.jieshoutimesa);
|
||||
this.stateupdate('对方已取消', true);
|
||||
this.closewin();
|
||||
}
|
||||
//对方挂电话
|
||||
if(lx=='jiesu'){
|
||||
this.guaduanok(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
js.ajax=function(lex,ds,fun,lxss,efun){
|
||||
var lexa = lex.split('|');
|
||||
if(!lxss)lxss='type';
|
||||
var cans = {
|
||||
url:js.apiurl(lexa[0],lexa[1]),
|
||||
data:ds,
|
||||
type:lxss,
|
||||
dataType:'json',
|
||||
success:function(ret){
|
||||
js.unloading();
|
||||
if(ret.success){
|
||||
if(fun)fun(ret);
|
||||
}else{
|
||||
if(efun)efun(ret.msg)
|
||||
}
|
||||
},
|
||||
error:function(e){
|
||||
js.unloading();
|
||||
if(efun)efun('处理出错:'+e.responseText+'');
|
||||
}
|
||||
}
|
||||
$.ajax(cans);
|
||||
}
|
||||
js.initbtn = function(obj){
|
||||
var o = $("[clickevt]"),i,o1,cl;
|
||||
for(i=0; i<o.length; i++){
|
||||
o1 = $(o[i]);
|
||||
cl = o1.attr('clickadd');
|
||||
if(cl!='true'){
|
||||
o1.click(function(eo){
|
||||
var cls = $(this).attr('clickevt');
|
||||
if(typeof(cls)=='string'){
|
||||
cls=cls.split(',');
|
||||
obj[cls[0]](this, cls[1], cls[2], eo);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
o.attr('clickadd','true');
|
||||
}
|
||||
function showAlert(str,col){
|
||||
var obj = $('div[temp="div"]'),hei=0;
|
||||
for(var i=0;i<obj.length;i++)hei+=$(obj[i]).height()+15;
|
||||
if(!col)col='red';
|
||||
var str = '<div temp="div" onclick="$(this).remove()" style="background:rgba(0,0,0,0.8);position:fixed;left:0px;top:'+hei+'px;padding:5px;color:'+col+'">'+str+'</div>';
|
||||
$('body').append(str);
|
||||
}
|
||||
|
||||
|
||||
function showSuccess(str){
|
||||
showAlert(str,'white');
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
<body style="overflow:hidden;background:#555555">
|
||||
|
||||
<div id="local_stream" style="width:100px;height:150px;right:0px;top:0px;border:0px red solid;position:fixed;z-index:2;display:none"></div>
|
||||
<div id="remote_stream" style="width:100%;height:100%;left:0px;top:0px;border:0px red solid;position:fixed;z-index:1;display:none"></div>
|
||||
|
||||
<div align="left" style="padding:0px 10px;height:60px;overflow:hidden;display:none;position:fixed;z-index:9;left:0;top:0" id="shipindiv">
|
||||
<table style="margin-top:10px"><tr>
|
||||
<td><img id="tonghuafaces" src="<?=$ars['face']?>" width="40px" height="40px" style="border-radius:50%"></td>
|
||||
<td width="5"></td>
|
||||
<td style="color:white"><?=$ars['name']?></td>
|
||||
<td width="10"></td>
|
||||
<td><div id="wiatlings" style="color:#888888;font-size:14px">等待呼叫</div></td>
|
||||
</tr></table>
|
||||
</div>
|
||||
<div align="center" style="position:fixed;z-index:9;left:0;top:0;width:100%" id="yuyindiv">
|
||||
<div style="margin-top:50px"><img id="tonghuaface" src="<?=$ars['face']?>" width="100px" height="100px" style="border-radius:50%"></div>
|
||||
<div style="color:white"><?=$ars['name']?></div>
|
||||
<div id="wiatling" style="color:#888888;font-size:14px;margin-top:5px">等待呼叫</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div align="center" id="calldiv" style="position:fixed;bottom:50px;width:100%;display:none;z-index:9">
|
||||
<div id="hujiaobtn">
|
||||
<div style="color:#888888;font-size:12px">请选择通话类型</div>
|
||||
<table><tr>
|
||||
<td align="center">
|
||||
<div class="webbtn" clickevt="hujiao,0" align="center" style="width:90px;height:90px;background:#ff6600;color:white;line-height:90px;border-radius:50%;font-size:16px;margin-top:10px;padding:0"><i class="icon-volume-up"></i> 语音</div>
|
||||
</td>
|
||||
<td width="50"></td>
|
||||
<td align="center">
|
||||
<div class="webbtn" clickevt="hujiao,1" align="center" style="width:90px;height:90px;background:#339933;color:white;line-height:90px;border-radius:50%;font-size:16px;padding:0;margin-top:20px"><i class="icon-facetime-video"></i> 视频</div>
|
||||
</td>
|
||||
</tr></table>
|
||||
</div>
|
||||
<div id="cancelbtn" style="display:none">
|
||||
<div class="webbtn" clickevt="cancelhu" style="width:80px;height:80px;background:#FF6666;color:white;line-height:80px;border-radius:50%;font-size:40px;padding:0;margin-top:20px;transform:rotate(135deg);"><i class="icon-phone"></i></div>
|
||||
<div style="color:#888888;font-size:12px;margin-top:5px">取消</div>
|
||||
</div>
|
||||
</div>
|
||||
<div align="center" id="canceldiv" style="position:fixed;bottom:0px;width:100%;display:none;height:120px;overflow:hidden;z-index:9">
|
||||
<table style="margin-top:10px"><tr>
|
||||
<td align="center">
|
||||
<div class="webbtn" clickevt="guaduan" style="width:80px;height:80px;background:#FF6666;color:white;line-height:80px;border-radius:50%;font-size:40px;padding:0;margin-top:20px;margin:0;transform:rotate(135deg);"><i class="icon-phone"></i></div>
|
||||
<div style="color:#888888;font-size:12px;margin-top:5px">挂断</div>
|
||||
</td>
|
||||
<td width="30"></td>
|
||||
<td align="center">
|
||||
<div class="webbtn" clickevt="qiehysq" style="width:80px;height:80px;background:white;color:#000000;line-height:80px;border-radius:50%;font-size:40px;padding:0;margin-top:20px;margin:0"><i id="jingyincll" class="icon-volume-up"></i></div>
|
||||
<div id="jingyinclltxt" style="color:#888888;font-size:12px;margin-top:5px">静音</div>
|
||||
</td>
|
||||
|
||||
</tr></table>
|
||||
</div>
|
||||
|
||||
<div align="center" id="anjiandiv" style="position:fixed;bottom:50px;width:100%;display:none;z-index:9">
|
||||
<div>
|
||||
<table><tr>
|
||||
<td align="center">
|
||||
<div class="webbtn" clickevt="jiedianha,2" style="width:80px;height:80px;background:#FF6666;color:white;line-height:80px;border-radius:50%;font-size:40px;padding:0;margin-top:20px;transform:rotate(135deg);"><i class="icon-phone"></i></div>
|
||||
<div style="color:#888888;font-size:12px;margin-top:5px">拒绝</div>
|
||||
</td>
|
||||
<td width="50"></td>
|
||||
<td align="center">
|
||||
<div class="webbtn" clickevt="jiedianha,1" style="width:80px;height:80px;background:#339933;color:white;line-height:80px;border-radius:50%;font-size:40px;padding:0;margin-top:20px"><i class="icon-phone"></i></div>
|
||||
<div style="color:#888888;font-size:12px;margin-top:5px">接听</div>
|
||||
</td>
|
||||
</tr></table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<audio id="notify_sound_tonghua" hidden="true" loop="loop" autoplay="autoplay" src=""></audio>
|
||||
</body>
|
||||
</html>
|
||||
38
webmain/reim/ying/tpl_ying.html
Normal file
38
webmain/reim/ying/tpl_ying.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title><?=$da['title']?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"/>
|
||||
<link rel="stylesheet" type="text/css" href="<?=$da['p']?>/css/reim.css"/>
|
||||
|
||||
<link rel="shortcut icon" href="<?=$arr['face']?>" />
|
||||
<script type="text/javascript" src="web/res/js/jquery.1.9.1.min.js"></script>
|
||||
<script type="text/javascript" src="js/js.js"></script>
|
||||
<script type="text/javascript" src="web/res/perfectscrollbar/jquery.mousewheel.js"></script>
|
||||
<script type="text/javascript" src="js/base64-min.js"></script>
|
||||
<script type="text/javascript" src="<?=$da['p']?>/<?=$da['d']?><?=$da['m']?>/<?=$da['m']?>.js"></script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
<body style="overflow:hidden;" scroll="no">
|
||||
|
||||
<script type="text/javascript" src="web/res/js/jquery-imgview.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/jquery-rockupload.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/jquery-changeuser.js"></script>
|
||||
<script type="text/javascript" src="web/res/mode/menu/jquery-rockmenu.js"></script>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="web/res/mode/menu/jquery-rockmenu.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/fontawesome/css/font-awesome.min.css">
|
||||
<!--[if IE 7 ]><link rel="stylesheet" type="text/css" href="web/res/fontawesome/css/font-awesome-ie7.min.css"><![endif]-->
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
121
webmain/reim/ying/tpl_ying_daka.html
Normal file
121
webmain/reim/ying/tpl_ying_daka.html
Normal file
@@ -0,0 +1,121 @@
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title><?=$da['title']?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"/>
|
||||
<link rel="stylesheet" type="text/css" href="web/res/css/webimcss.css"/>
|
||||
<link rel="shortcut icon" href="images/adddk.png" />
|
||||
<script type="text/javascript" src="js/jquery.js"></script>
|
||||
<script type="text/javascript" src="js/js.js"></script>
|
||||
<script type="text/javascript" src="web/res/js/nwjs.js"></script>
|
||||
<style>
|
||||
<?php
|
||||
$col = getconfig('apptheme','#1389D3');
|
||||
echo 'body{--main-color:'.$col.'}';
|
||||
?>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
maincolor = '<?=$col?>';
|
||||
var kqarr = <?=json_encode($kqarr)?>;
|
||||
js.servernow = '<?=$da['now']?>';
|
||||
|
||||
showkqdklist=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').html(s);
|
||||
get('dabtn').value='第'+oi+'次打卡';
|
||||
}
|
||||
function initbody(){
|
||||
js.getsplit();
|
||||
nwjs.init();
|
||||
showkqdklist(kqarr);
|
||||
|
||||
$('#dabtn').click(function(){
|
||||
adddaka(this);
|
||||
});
|
||||
timeshowcishu = 0;
|
||||
timeload();
|
||||
setInterval('timeload()', 1000);
|
||||
}
|
||||
|
||||
function timeload(){
|
||||
var time = js.serverdt('Y年m月d日(星期W) H:i:s').split(' ');
|
||||
$('#nowtimess').html(time[1]);
|
||||
$('#nowtimess1').html(time[0]);
|
||||
timeshowcishu++;
|
||||
if(timeshowcishu==10){
|
||||
var o = get('dabtn');
|
||||
if(o.disabled)location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
function adddaka(o){
|
||||
var dacs = {};
|
||||
o.disabled = true;o.value='打卡中...';
|
||||
if(typeof(nwjs)=='object')dacs = nwjs.getipmac();
|
||||
js.ajax('api.php?m=kaoqin&a=adddkjl',dacs, function(d){
|
||||
if(d.code==200){
|
||||
js.alert('打卡成功:'+d.data+'','', function(){
|
||||
location.reload();
|
||||
});
|
||||
o.value = '打卡成功';
|
||||
timeshowcishu=0;
|
||||
}else{
|
||||
js.msg('msg',d.msg);
|
||||
o.disabled = false;
|
||||
o.value='重试打卡';
|
||||
}
|
||||
},'get,json');//#EFF7FC
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
<body style="overflow:hidden;" scroll="no">
|
||||
|
||||
|
||||
|
||||
|
||||
<div align="center" style="margin:15px;padding-top:30px;" id="mdiv" class="panel-body">
|
||||
<table width="100%">
|
||||
<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" value="打卡" class="btn btn-success"> <button type="button" onclick="location.reload()" class="btn btn-default">刷新</button></div>
|
||||
</div>
|
||||
</td>
|
||||
<td style="font-size:14px;padding:0px 10px">
|
||||
<div class="wrap">今日打卡:<span id="dktime"></span></div>
|
||||
<div class="blank10"></div>
|
||||
<div id="daklistdtr">
|
||||
<div class="blank10"></div>
|
||||
<div>上班</div>
|
||||
<div class="blank5"></div>
|
||||
<div>下班</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1
webmain/reim/ying/ying.js
Normal file
1
webmain/reim/ying/ying.js
Normal file
@@ -0,0 +1 @@
|
||||
//应用的js
|
||||
32
webmain/reim/ying/yingAction.php
Normal file
32
webmain/reim/ying/yingAction.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
class yingClassAction extends ActionNot{
|
||||
|
||||
public function initAction()
|
||||
{
|
||||
if($this->adminid==0){
|
||||
exit('登录已经失效了');
|
||||
}
|
||||
}
|
||||
|
||||
public function defaultAction()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function dakaAction()
|
||||
{
|
||||
$this->title = '考勤打卡';
|
||||
|
||||
$kq = m('kaoqin');
|
||||
$dt = $this->rock->date;
|
||||
if($this->rock->get('atype')=='daka')$kq->kqanay($this->adminid, $dt);
|
||||
$sbarr = $kq->getsbanay($this->adminid, $dt);
|
||||
$dkarr = $kq->getdkjl($this->adminid, $dt);
|
||||
|
||||
$kqarr = array(
|
||||
'sbarr' => $sbarr,
|
||||
'dkarr' => $dkarr,
|
||||
);
|
||||
$this->assign('kqarr', $kqarr);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user