信呼OA版本v2.3.8
This commit is contained in:
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>
|
||||
Reference in New Issue
Block a user