信呼OA版本v2.3.8
This commit is contained in:
237
webmain/system/geren/gerenAction.php
Normal file
237
webmain/system/geren/gerenAction.php
Normal file
@@ -0,0 +1,237 @@
|
||||
<?php
|
||||
class gerenClassAction extends Action
|
||||
{
|
||||
public function getinitAjax()
|
||||
{
|
||||
$uid = $this->adminid;
|
||||
$carr= m('admin')->getcompanyinfo($uid);
|
||||
|
||||
return array(
|
||||
'gerentodo' => $this->option->getval('gerennotodo_'.$uid.''),
|
||||
'qmimgstr' => $this->option->getval('qmimgstr_'.$uid.''),
|
||||
'carr' => $carr,
|
||||
);
|
||||
}
|
||||
|
||||
public function cogsaveAjax()
|
||||
{
|
||||
$uid = $this->adminid;
|
||||
$this->option->setval('gerennotodo_'.$uid.'', $this->get('gerentodo','0'));
|
||||
}
|
||||
|
||||
//保存图片
|
||||
public function qmimgsaveAjax()
|
||||
{
|
||||
$uid = $this->adminid;
|
||||
$str = '';
|
||||
$qmimgstr = $this->post('qmimgstr');
|
||||
if(!isempt($qmimgstr)){
|
||||
if(contain($qmimgstr,'.')){
|
||||
$str = $qmimgstr;
|
||||
}else{
|
||||
$qma = explode(',', $qmimgstr);
|
||||
$str = ''.UPDIR.'/'.date('Y-m').'/'.$uid.'qming_'.rand(1000,9999).'.png';
|
||||
$this->rock->createtxt($str, base64_decode($qma[1]));
|
||||
}
|
||||
}
|
||||
$this->option->setval('qmimgstr_'.$uid.'', $str);
|
||||
}
|
||||
|
||||
public function filebefore($table)
|
||||
{
|
||||
$key = $this->post('key');
|
||||
$atype = $this->post('atype');
|
||||
$dt1 = $this->post('dt1');
|
||||
$dt2 = $this->post('dt2');
|
||||
$where = 'and optid='.$this->adminid.'';
|
||||
if($atype=='all'){
|
||||
$where='';
|
||||
if($this->adminid>1)$where=m('admin')->getcompanywhere(3);
|
||||
}
|
||||
if($key!=''){
|
||||
$where.=" and (`optname` like '%$key%' or `filename` like '%$key%' or `mtype`='$key')";
|
||||
}
|
||||
if($dt1!='')$where.=" and `adddt`>='".$dt1." 00:00:00'";
|
||||
if($dt2!='')$where.=" and `adddt`<='".$dt2." 23:59:59'";
|
||||
return array(
|
||||
'where' => $where,
|
||||
|
||||
);
|
||||
}
|
||||
public function fileafter($table, $rows)
|
||||
{
|
||||
$fobj = m('file');
|
||||
foreach($rows as $k=>&$rs){
|
||||
$rs['thumbpath'] = $fobj->getthumbpath($rs);
|
||||
$fpath = $rs['filepath'];
|
||||
|
||||
$status= 1;
|
||||
if(substr($fpath,0,4)=='http'){
|
||||
$status = 2;
|
||||
}else{
|
||||
if(isempt($rs['filenum']) && !file_exists($fpath))$status=0;
|
||||
$filepathout = arrvalue($rs, 'filepathout');
|
||||
if(!file_exists($fpath) && !isempt($filepathout)){
|
||||
if($fobj->isimg($rs['fileext']))$rs['filepath'] = $filepathout;
|
||||
$status=2;
|
||||
}
|
||||
}
|
||||
$rs['status'] = $status;
|
||||
}
|
||||
return array(
|
||||
'rows' => $rows
|
||||
);
|
||||
}
|
||||
|
||||
public function delfileAjax()
|
||||
{
|
||||
$id = c('check')->onlynumber($this->post('id','0'));
|
||||
m('file')->delfile($id);
|
||||
backmsg();
|
||||
}
|
||||
|
||||
public function defaultAction()
|
||||
{
|
||||
$this->title = '修改头像';
|
||||
$face = $this->db->getmou($this->T('admin'),'face',"`id`='$this->adminid'");
|
||||
$imgurl = '';
|
||||
if(!$this->rock->isempt($face)){
|
||||
$imgurl='../../'.preg_replace("/_crop\d{4}/",'',$face);
|
||||
}
|
||||
//$face = $this->rock->repempt($face,'images/white.gif');
|
||||
$this->smartydata['face'] = $face;
|
||||
$this->smartydata['imgurl'] = $imgurl;
|
||||
}
|
||||
|
||||
public function changestyleAjax()
|
||||
{
|
||||
$style = (int)$this->post('style','0');
|
||||
m('admin')->update('`style`='.$style.'', 'id='.$this->adminid.'');
|
||||
}
|
||||
|
||||
|
||||
public function editpassAjax()
|
||||
{
|
||||
$id = $this->adminid;
|
||||
if(getconfig('systype')=='demo')exit('演示上不要修改');
|
||||
$oldpass = $this->rock->post('passoldPost');
|
||||
$pasword = $this->rock->post('passwordPost');
|
||||
$msg = '';
|
||||
if($this->rock->isempt($pasword))$msg ='新密码不能为空';
|
||||
if($msg == ''){
|
||||
$oldpassa = $this->db->getmou($this->T('admin'),"`pass`","`id`='$id'");
|
||||
if($oldpassa != md5($oldpass))$msg ='旧密码不正确';
|
||||
if($msg==''){
|
||||
if($oldpassa == md5($pasword))$msg ='新密码不能和旧密码相同';
|
||||
}
|
||||
}
|
||||
if($msg == ''){
|
||||
if(!$this->db->record($this->T('admin'), "`pass`='".md5($pasword)."',`editpass`=`editpass`+1", "`id`='$id'"))$msg = $this->db->error();
|
||||
}
|
||||
if($msg=='')$msg='success';
|
||||
echo $msg;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
保存头像
|
||||
*/
|
||||
public function savefaceAjax()
|
||||
{
|
||||
$id = $this->adminid;
|
||||
$arr = array('face'=>$this->rock->post('facePost'));
|
||||
$msg = '';
|
||||
if(!$this->db->record($this->T('admin'),$arr, "`id`='$id'"))$msg= $this->db->error();
|
||||
if($msg=='')$msg='success';
|
||||
echo $msg;
|
||||
}
|
||||
|
||||
public function todoydAjax()
|
||||
{
|
||||
m('todo')->update("status=1,`readdt`='$this->now'", "`id` in(".$this->post('s').") and `status`=0");
|
||||
}
|
||||
|
||||
public function totaldaetods($table, $rows)
|
||||
{
|
||||
$wdtotal = m('todo')->rows("`uid`='$this->adminid' and `status`=0 and `tododt`<='$this->now'");
|
||||
return array('wdtotal'=>$wdtotal);
|
||||
}
|
||||
|
||||
public function beforetotaldaetods($table)
|
||||
{
|
||||
$s = " and `uid`='$this->adminid' and `tododt`<='$this->now'";
|
||||
$key = $this->post('key');
|
||||
if($key)$s.=" and (`title` like '%$key%' or `mess` like '%$key%')";
|
||||
return $s;
|
||||
}
|
||||
|
||||
public function getlinksAjax()
|
||||
{
|
||||
$rows = m('links')->getrows('1=1','*','`type`,`sort`');
|
||||
echo json_encode($rows);
|
||||
}
|
||||
|
||||
|
||||
//导入个人通讯录
|
||||
public function piliangaddAjax()
|
||||
{
|
||||
$rows = c('html')->importdata('name,unitname,tel,mobile,email,gname,address','name');
|
||||
$oi = 0;
|
||||
$db = m('vcard');
|
||||
foreach($rows as $k=>$rs){
|
||||
$rs['optdt'] = $this->now;
|
||||
$rs['uid'] = $this->adminid;
|
||||
$rs['optname'] = $this->adminname;
|
||||
$db->insert($rs);
|
||||
$oi++;
|
||||
}
|
||||
backmsg('','成功导入'.$oi.'条数据');
|
||||
}
|
||||
|
||||
public function filelogs_before($table)
|
||||
{
|
||||
$where = '';
|
||||
$fileid = (int)$this->post('fileid','0');
|
||||
$where = "and `fileid`='$fileid'";
|
||||
return $where;
|
||||
}
|
||||
|
||||
public function delfilelogsAjax()
|
||||
{
|
||||
$id = (int)$this->post('id','0');
|
||||
m('files')->delete($id);
|
||||
backmsg();
|
||||
}
|
||||
|
||||
|
||||
//获取背景图片
|
||||
public function getbeijingAjax()
|
||||
{
|
||||
$dev = $this->option->getval('beijing_'.$this->adminid.'','images/beijing/bj0.jpg');
|
||||
$path = ''.ROOT_PATH.'/images/beijing';
|
||||
if(!is_dir($path))return returnsuccess(array(
|
||||
'dev' => $dev,
|
||||
'rows'=> array()
|
||||
));
|
||||
$barr = array();
|
||||
$bar = glob(''.$path.'/*.jpg');
|
||||
$isno = false;
|
||||
if($bar)foreach($bar as $k=>$fil1){
|
||||
$faiar = explode('images', $fil1);
|
||||
$lujg = 'images'.$faiar[1].'';
|
||||
if($lujg==$dev)$isno = true;
|
||||
$barr[] = $lujg;
|
||||
}
|
||||
if(!$isno)$barr[] = $dev;
|
||||
return returnsuccess(array(
|
||||
'dev'=> $dev,
|
||||
'rows'=>$barr
|
||||
));
|
||||
}
|
||||
|
||||
public function savebeijingAjax()
|
||||
{
|
||||
$val = $this->post('value');
|
||||
$this->option->setval('beijing_'.$this->adminid.'',$val);
|
||||
}
|
||||
}
|
||||
350
webmain/system/geren/rock_geren_cog.php
Normal file
350
webmain/system/geren/rock_geren_cog.php
Normal file
@@ -0,0 +1,350 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
{params}
|
||||
var stype = params.stype;
|
||||
var valchange = ''+adminstyle,zleng=-1;
|
||||
var ysarr = '使用默认,cerulean,cosmo,cyborg,darkly,flatly,journal,lumen,paper,readable,sandstone,simplex,slate,spacelab,superhero,united,xinhu,yeti';
|
||||
var companyinfoall;
|
||||
var c = {
|
||||
init:function(){
|
||||
js.ajax(js.getajaxurl('getinit','{mode}','{dir}'),false,function(ret){
|
||||
get('gerentodo{rand}').checked = (ret.gerentodo=='1');
|
||||
var imgs = ret.qmimgstr;
|
||||
if(imgs){
|
||||
var s = '<br><img id="imgqianming" src="'+imgs+'" height="90">';
|
||||
$('#qianmingshow').append(s);
|
||||
}
|
||||
c.showcompany(ret.carr);
|
||||
},'get,json');
|
||||
|
||||
|
||||
var sear = ysarr.split(','),i,len=sear.length,s='<tr>',oi=0,zarr=[],za,sel='';
|
||||
zleng = len-1;
|
||||
for(i=0;i<len;i++){
|
||||
zarr.push({text:sear[i],value:i});
|
||||
if(i>0)zarr.push({text:sear[i]+'_default',value:i+zleng});
|
||||
}
|
||||
for(i=0;i<zarr.length;i++){
|
||||
za = zarr[i];
|
||||
oi++;
|
||||
sel = (valchange==za.value)?'checked' : '';
|
||||
s+='<td align="center" style="padding:10px"><label><a style="TEXT-DECORATION:none">'+za.text+'</a><br><input type="radio" '+sel+' name="_stylechange" value="'+za.value+'"></label>';
|
||||
s+='</td>';
|
||||
if(oi%7==0)s+='</tr><tr>';
|
||||
}
|
||||
s+='</tr>';
|
||||
$('#tablstal2{rand}').prepend(s);
|
||||
if(adminid!=1)$('#zhutibao{rand}').remove();
|
||||
},
|
||||
showcompany:function(ad){
|
||||
var s='',a1,i,col;
|
||||
var darr = ad.companyinfoall,s1='',act;
|
||||
companyinfoall = darr;
|
||||
$('#companylist{rand} a[temp]').remove();
|
||||
for(i=0;i<darr.length;i++){
|
||||
a1=darr[i];
|
||||
s1=a1.name;
|
||||
act='';
|
||||
//if(a1.id==ad.companyinfo.id)act=' active';
|
||||
if(!isempt(a1.city))s1+='<font color=#aaaaaa>('+a1.city+''+a1.address+')</font>';
|
||||
s+='<a temp="list" style="TEXT-DECORATION:none" class="list-group-item'+act+'"><img src="'+a1.logo+'" align="absmiddle" height="20" width="20"> '+s1+'';
|
||||
if(a1.id==ad.companyinfo.id){
|
||||
s+=' <span class="label label-success"><i class="icon-ok"></i>当前</span>';
|
||||
}else{
|
||||
s+=' <button type="button" onclick="qiehun{rand}('+i+')" class="btn btn-default btn-xs">切换</button>';
|
||||
}
|
||||
s+='</a>';
|
||||
}
|
||||
$('#companylist{rand}').append(s);
|
||||
},
|
||||
savecog:function(){
|
||||
js.msg('wait','保存中...');
|
||||
js.ajax(js.getajaxurl('cogsave','{mode}','{dir}'),{
|
||||
gerentodo:get('gerentodo{rand}').checked ? 1 : 0
|
||||
},function(ret){
|
||||
js.msg('success','保存成功');
|
||||
},'get');
|
||||
},
|
||||
savepass:function(o1){
|
||||
var fm = 'form_{rand}';
|
||||
var msgview = 'msgview_{rand}';
|
||||
|
||||
var opass = form('passoldPost',fm).value;
|
||||
var pass = form('passwordPost',fm).value;
|
||||
var pass1 = form('password1Post',fm).value;
|
||||
|
||||
if(opass==''){
|
||||
js.setmsg('旧密码不能为空','red', msgview);
|
||||
form('passoldPost',fm).focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(pass.length <4){
|
||||
js.setmsg('新密码不能少于4个字符','red', msgview);
|
||||
form('passwordPost',fm).focus();
|
||||
return false;
|
||||
}
|
||||
if(!/[a-zA-Z]{1,}/.test(pass) || !/[0-9]{1,}/.test(pass)){
|
||||
js.setmsg('新密码必须使用字母+数字','red', msgview);
|
||||
form('passwordPost',fm).focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(opass==pass){
|
||||
js.setmsg('新密码不能和旧密码相同','red', msgview);
|
||||
form('passwordPost',fm).focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(pass!=pass1){
|
||||
js.setmsg('确认密码不一致','red', msgview);
|
||||
form('password1Post',fm).focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
var data = js.getformdata(fm);
|
||||
form('submitbtn',fm).disabled=true;
|
||||
js.setmsg('修改中...','#ff6600', msgview);
|
||||
$.post(js.getajaxurl('editpass','geren','system'),data,function(da){
|
||||
if(da=='success'){
|
||||
var msg = '密码修改成功';
|
||||
js.setmsg(msg,'green', msgview);
|
||||
if(stype=='pass'){
|
||||
js.alert(msg+',点确定后继续使用系统','', function(){
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
}else{
|
||||
if(da=='')da='修改失败';
|
||||
js.setmsg(da,'red', msgview);
|
||||
form('submitbtn',fm).disabled=false;
|
||||
}
|
||||
});
|
||||
},
|
||||
tesgs:function(o1,lx){
|
||||
$('#tagsl{rand}').find('li').removeClass('active');
|
||||
o1.className='active';
|
||||
$('#tablstal0{rand}').hide();
|
||||
$('#tablstal1{rand}').hide();
|
||||
$('#tablstal2{rand}').hide();
|
||||
$('#tablstal3{rand}').hide();
|
||||
|
||||
$('#tablstal'+lx+'{rand}').show();
|
||||
if(lx==3)js.importjs('mode/plugin/jquery-signature.js');
|
||||
},
|
||||
savestyle:function(){
|
||||
adminstyle = valchange;
|
||||
js.ajax(js.getajaxurl('changestyle','geren','system'),{style:valchange},function(s){
|
||||
js.msg('success','保存成功');
|
||||
});
|
||||
},
|
||||
qmimgstr:'',
|
||||
qianming:function(o1){
|
||||
this.qianmingbo=false;
|
||||
js.tanbody('qianming','请在空白区域写上你的姓名',500,300,{
|
||||
html:'<div data-width="480" data-height="220" data-border="1px dashed #cccccc" data-line-color="#000000" data-auto-fit="true" id="qianmingdiv" style="margin:10px;height:220px;cursor:default;width:480px"></div>',
|
||||
btn:[{text:'确定签名'},{text:'重写'}]
|
||||
});
|
||||
$('#qianmingdiv').jqSignature().on('jq.signature.changed', function() {
|
||||
c.qianmingbo=true;
|
||||
});
|
||||
|
||||
|
||||
$('#qianming_btn0').click(function(){
|
||||
c.qianmingok();
|
||||
});
|
||||
$('#qianming_btn1').click(function(){
|
||||
$('#imgqianming').remove();
|
||||
$('#qianmingdiv').jqSignature('clearCanvas');
|
||||
c.qianmingbo = false;
|
||||
c.qmimgstr = '';
|
||||
});
|
||||
},
|
||||
qianmingok:function(){
|
||||
if(!this.qianmingbo)return;
|
||||
$('#imgqianming').remove();
|
||||
var dataUrl = $('#qianmingdiv').jqSignature('getDataURL');
|
||||
var s = '<br><img id="imgqianming" src="'+dataUrl+'" height="90">';
|
||||
c.qmimgstr = dataUrl;
|
||||
$('#qianmingshow').append(s);
|
||||
js.tanclose('qianming');
|
||||
},
|
||||
saveqian:function(){
|
||||
this.saveqians(false);
|
||||
},
|
||||
saveqians:function(bo){
|
||||
if(this.qmimgstr=='' && !bo){
|
||||
js.msg('msg','没有修改无需保存');
|
||||
return;
|
||||
}
|
||||
js.msg('wait','保存中...');
|
||||
js.ajax(js.getajaxurl('qmimgsave','{mode}','{dir}'),{
|
||||
qmimgstr:this.qmimgstr
|
||||
},function(ret){
|
||||
js.msg('success','保存成功');
|
||||
},'post');
|
||||
},
|
||||
saveqians1:function(){
|
||||
this.qmimgstr = '';
|
||||
$('#imgqianming').remove();
|
||||
this.saveqians(true);
|
||||
},
|
||||
qianup:function(){
|
||||
js.upload('upimg{rand}',{maxup:'1',thumbnail:'150x150','title':'上传签名图片',uptype:'image'});
|
||||
}
|
||||
};
|
||||
js.initbtn(c);
|
||||
c.init();
|
||||
|
||||
upimg{rand}=function(a){
|
||||
var f = a[0];
|
||||
$('#imgqianming').remove();
|
||||
var dataUrl = f.filepath;
|
||||
var s = '<br><img id="imgqianming" src="'+dataUrl+'" height="90">';
|
||||
c.qmimgstr = dataUrl;
|
||||
$('#qianmingshow').append(s);
|
||||
}
|
||||
|
||||
$("input[name='_stylechange']").click(function(){
|
||||
var val = parseFloat(this.value);
|
||||
valchange=val;
|
||||
var sear = ysarr.split(',')
|
||||
if(val>0){
|
||||
var xz = val+0,tou='inverse';
|
||||
if(xz>zleng){
|
||||
xz=xz-zleng;
|
||||
tou='default';
|
||||
}
|
||||
if(get('navtopheader'))get('navtopheader').className='navbar navbar-'+tou+' navbar-static-top';
|
||||
get('mainstylecss').href='mode/bootstrap3.3/css/bootstrap_'+sear[xz]+'.css';
|
||||
}else{
|
||||
js.msg('success','使用默认主题的保存后,刷新页面即可');
|
||||
}
|
||||
});
|
||||
if(stype=='pass'){
|
||||
c.tesgs(get('passli{rand}'),1);
|
||||
changetabs=c.tesgs=function(){}
|
||||
}
|
||||
|
||||
qiehun{rand}=function(oi){
|
||||
var d1 = companyinfoall[oi];
|
||||
js.confirm('确定要切换到单位上“'+d1.name+'”吗?', function(jg){
|
||||
if(jg=='yes'){
|
||||
js.loading('切换中...');
|
||||
js.ajax('api.php?m=index&a=changecompany',{id:d1.id}, function(){
|
||||
js.msgok('切换成功');
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(!companymode)$('#companylist{rand}').hide();
|
||||
});
|
||||
</script>
|
||||
<div style="padding:10px">
|
||||
|
||||
<ul id="tagsl{rand}" class="nav nav-tabs">
|
||||
|
||||
<li click="tesgs,0" class="active">
|
||||
<a style="TEXT-DECORATION:none"><i class="icon-cog"></i> 基本设置</a>
|
||||
</li>
|
||||
<li id="passli{rand}" click="tesgs,1">
|
||||
<a style="TEXT-DECORATION:none"><i class="icon-lock"></i> 修改密码</a>
|
||||
</li>
|
||||
|
||||
<li click="tesgs,2">
|
||||
<a style="TEXT-DECORATION:none"><i class="icon-magic"></i> 切换主题皮肤</a>
|
||||
</li>
|
||||
<li click="tesgs,3">
|
||||
<a style="TEXT-DECORATION:none"><i class="icon-edit"></i> 签名图片</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div style="padding-top:20px">
|
||||
|
||||
<table cellspacing="0" id="tablstal0{rand}" border="0" cellpadding="0">
|
||||
|
||||
<tr>
|
||||
|
||||
<td colspan="2">
|
||||
|
||||
<div align="left" id="companylist{rand}" style="max-width:400px;margin-left:50px" class="list-group">
|
||||
<div class="list-group-item list-group-item-info">
|
||||
我加入的单位
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right" width="80"></td>
|
||||
<td class="tdinput"><label><input id="gerentodo{rand}" type="checkbox"> <a style="TEXT-DECORATION:none">后台不显示提醒消息</a></label></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td align="right"></td>
|
||||
<td style="padding:15px 0px" colspan="3" align="left"><button click="savecog" class="btn btn-success" type="button"><i class="icon-save"></i> 保存</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<form id="tablstal1{rand}" style="display:none" name="form_{rand}">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="100" align="right" height="50">旧密码:</td>
|
||||
<td><input style="width:250px" name="passoldPost" type="password" class="form-control"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right" height="70">新密码:</td>
|
||||
<td><input style="width:250px" name="passwordPost" placeholder="至少4位字母+数字组合" type="password" class="form-control"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right" height="70">确认密码:</td>
|
||||
<td><input style="width:250px" name="password1Post" type="password" class="form-control"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td height="60" align="right"></td>
|
||||
<td align="left"><input class="btn btn-success" click="savepass" name="submitbtn" value="修改" type="button"> <span id="msgview_{rand}"></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
|
||||
|
||||
<table id="tablstal2{rand}" style="display:none;margin-left:70px">
|
||||
|
||||
<tr>
|
||||
<td colspan="10" style="padding-left:20px"><input class="btn btn-success" click="savestyle" name="submitbtn" value="保存修改" type="button">
|
||||
<span id="zhutibao{rand}"> 切换出现无样式请到官网<a href="<?=URLY?>view_themes.html" target="_blank">下载主题包</a>。</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table id="tablstal3{rand}" style="display:none;margin-left:70px">
|
||||
|
||||
<tr>
|
||||
<td align="center" style="padding:15px">
|
||||
<div id="qianmingshow" align="left"><input type="button" click="qianming" class="btn btn-default btn-xs" value="手写签名"> <input type="button" click="qianup" class="btn btn-default btn-xs" value="上传签名图片"></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="padding-left:15px"><input class="btn btn-success" click="saveqian" value="保存签名图片" type="button"> <input class="btn btn-default btn-xs" click="saveqians1" value="清空签名" type="button"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
70
webmain/system/geren/rock_geren_contacts.php
Normal file
70
webmain/system/geren/rock_geren_contacts.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
var a = $('#veiw_{rand}').bootstable({
|
||||
tablename:'contacts',celleditor:true,sort:'sort',dir:'asc',keywhere:'and optid={adminid}',
|
||||
columns:[{
|
||||
text:'姓名',dataIndex:'uname'
|
||||
},{
|
||||
text:'用户id',dataIndex:'uid'
|
||||
},{
|
||||
text:'排序号',dataIndex:'sort',editor:true
|
||||
}],
|
||||
itemclick:function(){
|
||||
btn(false);
|
||||
}
|
||||
});
|
||||
|
||||
var c = {
|
||||
del:function(){
|
||||
a.del({check:function(lx){if(lx=='yes')btn(true)}});
|
||||
},
|
||||
clickwin:function(o1,lx){
|
||||
var h = $.bootsform({
|
||||
title:'常联系人',height:400,width:400,
|
||||
tablename:'contacts',isedit:lx,url:publicsave(),params:{int_filestype:'sort',otherfields:'optdt={now},optid={adminid},optname={admin}'},
|
||||
submitfields:'uname,sort,uid',
|
||||
items:[{
|
||||
name:'uid',type:'hidden'
|
||||
},{
|
||||
labelText:'常联系人',type:'changeuser',changeuser:{
|
||||
type:'user',idname:'uid',title:'选择人员'
|
||||
},name:'uname',clearbool:true,required:true
|
||||
},{
|
||||
labelText:'排序号',name:'sort',type:'number',value:'0'
|
||||
}],
|
||||
success:function(){
|
||||
a.reload();
|
||||
}
|
||||
});
|
||||
if(lx==1){
|
||||
h.setValues(a.changedata);
|
||||
}
|
||||
},
|
||||
refresh:function(){
|
||||
a.reload();
|
||||
}
|
||||
};
|
||||
|
||||
function btn(bo){
|
||||
get('del_{rand}').disabled = bo;
|
||||
get('edit_{rand}').disabled = bo;
|
||||
}
|
||||
|
||||
js.initbtn(c);
|
||||
});
|
||||
</script>
|
||||
<div>
|
||||
<ul class="floats">
|
||||
<li class="floats50">
|
||||
<button class="btn btn-primary" click="clickwin,0" type="button"><i class="icon-plus"></i> 新增</button>
|
||||
<button class="btn btn-success" click="refresh" type="button"><i class="icon-refresh"></i> 刷新</button>
|
||||
</li>
|
||||
<li style="text-align:right" class="floats50">
|
||||
<button class="btn btn-danger" id="del_{rand}" click="del" disabled type="button"><i class="icon-trash"></i> 删除</button>
|
||||
<button class="btn btn-info" id="edit_{rand}" click="clickwin,1" disabled type="button"><i class="icon-edit"></i> 编辑 </button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div id="veiw_{rand}"></div>
|
||||
139
webmain/system/geren/rock_geren_file.php
Normal file
139
webmain/system/geren/rock_geren_file.php
Normal file
@@ -0,0 +1,139 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
{params};
|
||||
var atype=params.atype;
|
||||
var checkeds = adminid==1;
|
||||
var a = $('#veiw_{rand}').bootstable({
|
||||
tablename:'file',celleditor:true,sort:'id',dir:'desc',modedir:'{mode}:{dir}',params:{'atype':atype},fanye:true,checked:checkeds,
|
||||
storebeforeaction:'filebefore',storeafteraction:'fileafter',
|
||||
columns:[{
|
||||
text:'类型',dataIndex:'fileext',renderer:function(v, d){
|
||||
if(!isempt(d.thumbpath))return '<img src="'+d.thumbpath+'" width="24" height="24">';
|
||||
var lxs = js.filelxext(v);
|
||||
return '<img src="web/images/fileicons/'+lxs+'.gif">';
|
||||
}
|
||||
},{
|
||||
text:'名称',dataIndex:'filename',align:'left',renderer:function(v,d){
|
||||
var ss='';
|
||||
if(d.status==2)ss='<img title="远程文件" src="web/images/fileicons/html.gif">';
|
||||
return ''+v+''+ss+'';
|
||||
}
|
||||
},{
|
||||
text:'大小',dataIndex:'filesizecn',sortable:true
|
||||
},{
|
||||
text:'上传时间',dataIndex:'adddt',sortable:true
|
||||
},{
|
||||
text:'创建人',dataIndex:'optname',sortable:true
|
||||
},{
|
||||
text:'IP',dataIndex:'ip'
|
||||
},{
|
||||
text:'浏览器',dataIndex:'web'
|
||||
},{
|
||||
text:'下载次数',dataIndex:'downci',sortable:true,renderer:function(v,d,oi){
|
||||
return ''+v+'<a href="javascript:;" onclick="showvies{rand}('+oi+',2)">查看</a>';
|
||||
}
|
||||
},{
|
||||
text:'关联表',dataIndex:'mtype'
|
||||
},{
|
||||
text:'关联表ID',dataIndex:'mid'
|
||||
},{
|
||||
text:'ID',dataIndex:'id',sortable:true
|
||||
},{
|
||||
text:'关联模块',dataIndex:'mknum'
|
||||
},{
|
||||
text:'',dataIndex:'opt',renderer:function(v,d,oi){
|
||||
if(d.status=='0'){
|
||||
return '已删';
|
||||
}else{
|
||||
return '<a href="javascript:;" onclick="showvies{rand}('+oi+',0)">预览</a> <a href="javascript:;" onclick="showvies{rand}('+oi+',1)"><i class="icon-arrow-down"></i></a>';
|
||||
}
|
||||
}
|
||||
}],
|
||||
itemclick:function(){
|
||||
btn(false);
|
||||
},
|
||||
itemdblclick:function(d){
|
||||
c.openlogs(d);
|
||||
}
|
||||
});
|
||||
|
||||
showvies{rand}=function(oi,lx){
|
||||
var d=a.getData(oi);
|
||||
if(lx==2){
|
||||
c.openlogs(d);
|
||||
return;
|
||||
}
|
||||
if(lx==1){
|
||||
js.downshow(d.id,d.filenum)
|
||||
}else{
|
||||
js.yulanfile(d.id,d.fileext,d.filepath,d.filename,d.filenum);
|
||||
}
|
||||
}
|
||||
|
||||
var c = {
|
||||
del:function(){
|
||||
a.del({url:js.getajaxurl('delfile','{mode}','{dir}'),checked:checkeds});
|
||||
},
|
||||
search:function(){
|
||||
var s=get('key_{rand}').value;
|
||||
a.setparams({key:s,dt1:get('dt1_{rand}').value,dt2:get('dt2_{rand}').value},true);
|
||||
},
|
||||
openlogs:function(d){
|
||||
addtabs({name:'文件操作记录','num':'files'+d.id+'',url:'system,geren,files,fileid='+d.id+',filename='+jm.base64encode(d.filename)+''});
|
||||
},
|
||||
clickdt:function(o1, lx){
|
||||
$(o1).rockdatepicker({initshow:true,view:'date',inputid:'dt'+lx+'_{rand}'});
|
||||
}
|
||||
};
|
||||
|
||||
function btn(bo){
|
||||
//get('del_{rand}').disabled = bo;
|
||||
}
|
||||
js.initbtn(c);
|
||||
a.settishi('<div class="tishi">提示:上传的文件可能会在某些单据上,删除请谨慎。</div>');
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
<table width="100%"><tr>
|
||||
<td>
|
||||
<input class="form-control" style="width:180px" id="key_{rand}" placeholder="文件名/创建人/关联表">
|
||||
</td>
|
||||
<td nowrap> 上传日期 </td>
|
||||
<td nowrap>
|
||||
<div style="width:150px" class="input-group">
|
||||
<input placeholder="" readonly class="form-control" id="dt1_{rand}" >
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" click="clickdt,1" type="button"><i class="icon-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td nowrap> 至 </td>
|
||||
<td nowrap>
|
||||
<div style="width:150px" class="input-group">
|
||||
<input placeholder="" readonly class="form-control" id="dt2_{rand}" >
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" click="clickdt,2" type="button"><i class="icon-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td style="padding-left:10px">
|
||||
<button class="btn btn-default" click="search" type="button">搜索</button>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td width="80%"></td>
|
||||
<td align="right" nowrap>
|
||||
|
||||
<button class="btn btn-danger" id="del_{rand}" click="del" type="button"><i class="icon-trash"></i> 删除</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div id="veiw_{rand}"></div>
|
||||
75
webmain/system/geren/rock_geren_files.php
Normal file
75
webmain/system/geren/rock_geren_files.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
{params};
|
||||
var fileid=params.fileid;
|
||||
if(!fileid)fileid='';
|
||||
var a = $('#veiw_{rand}').bootstable({
|
||||
tablename:'files',sort:'id',dir:'desc',modedir:'{mode}:{dir}',params:{'fileid':fileid},fanye:true,
|
||||
storebeforeaction:'filelogs_before',
|
||||
columns:[{
|
||||
text:'操作人',dataIndex:'optname',sortable:true
|
||||
},{
|
||||
text:'IP',dataIndex:'ip'
|
||||
},{
|
||||
text:'浏览器',dataIndex:'web'
|
||||
},{
|
||||
text:'类型',dataIndex:'type',sortable:true,renderer:function(v){
|
||||
var s=' ';
|
||||
if(v=='0')s='预览';
|
||||
if(v=='1')s='下载';
|
||||
if(v=='2')s='在线编辑';
|
||||
return s;
|
||||
}
|
||||
},{
|
||||
text:'时间',dataIndex:'optdt',sortable:true
|
||||
}],
|
||||
itemclick:function(){
|
||||
btn(false);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var c = {
|
||||
del:function(){
|
||||
a.del({url:js.getajaxurl('delfilelogs','{mode}','{dir}')});
|
||||
},
|
||||
search:function(){
|
||||
var s=get('key_{rand}').value;
|
||||
a.setparams({key:s},true);
|
||||
}
|
||||
};
|
||||
|
||||
function btn(bo){
|
||||
get('del_{rand}').disabled = bo;
|
||||
}
|
||||
js.initbtn(c);
|
||||
$('#showfiels{rand}').html('<h4>文件“'+jm.base64decode(params.filename)+'”的操作记录:</h4>');
|
||||
if(admintype=='0')$('#del_{rand}').hide();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
<table width="100%"><tr>
|
||||
<td width="80%">
|
||||
<div id="showfiels{rand}"></div>
|
||||
</td>
|
||||
<td style="padding-left:10px">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td></td>
|
||||
<td align="right" nowrap>
|
||||
|
||||
<button class="btn btn-danger" id="del_{rand}" click="del" disabled type="button"><i class="icon-trash"></i> 删除</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div id="veiw_{rand}"></div>
|
||||
109
webmain/system/geren/rock_geren_todo.php
Normal file
109
webmain/system/geren/rock_geren_todo.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
var a = $('#veiw_{rand}').bootstable({
|
||||
tablename:'todo',checked:true,fanye:true,statuschange:false,
|
||||
url:js.getajaxurl('publicstore','{mode}','{dir}'),defaultorder:'`id` desc',
|
||||
storeafteraction:'totaldaetods',storebeforeaction:'beforetotaldaetods',
|
||||
columns:[{
|
||||
text:'类型',dataIndex:'title',sortable:true,renderer:function(v,d){
|
||||
var s = v;
|
||||
if(d.status==1)s='<font color=#aaaaaa>'+v+'</font>';
|
||||
return s;
|
||||
}
|
||||
},{
|
||||
text:'信息内容',align:'left',dataIndex:'mess',renderer:function(v,d, oi){
|
||||
var s = v;
|
||||
if(d.status==1)s='<font color=#aaaaaa>'+v+'</font>';
|
||||
if(!isempt(d.modenum) && d.mid>0){
|
||||
s+=' <a href="javascript:;" onclick="chsksse{rand}('+oi+')">[查看]</a>';
|
||||
}
|
||||
return s;
|
||||
}
|
||||
},{
|
||||
text:'时间',dataIndex:'optdt',sortable:true,renderer:function(v,d){
|
||||
var s = v;
|
||||
if(d.status==1)s='<font color=#aaaaaa>'+v+'</font>';
|
||||
return s;
|
||||
}
|
||||
},{
|
||||
text:'状态',dataIndex:'status',sortable:true,renderer:function(v){
|
||||
var s = '<font color=red>未读</font>';
|
||||
if(v==1)s='<font color=#aaaaaa>已读</font>';
|
||||
return s;
|
||||
}
|
||||
}],
|
||||
itemclick:function(d,oi, o1){
|
||||
//if(d.status==0)c.yidchuls(d.id, true);
|
||||
},
|
||||
load:function(){
|
||||
$('#guestbook_wd').html(''+a.getData('wdtotal'))
|
||||
}
|
||||
});
|
||||
chsksse{rand}=function(oi){
|
||||
var d=a.getData(oi);
|
||||
openxiangs(d.title,d.modenum,d.mid);
|
||||
}
|
||||
var c = {
|
||||
del:function(){
|
||||
a.del({checked:true});
|
||||
},
|
||||
yidu:function(o1, lx){
|
||||
var s = a.getchecked();
|
||||
if(s==''){
|
||||
js.msg('msg','没有选中行');
|
||||
return;
|
||||
}
|
||||
this.yidchuls(s, true);
|
||||
},
|
||||
yidchuls:function(s,lxs){
|
||||
if(lxs)js.msg('wait','处理中...');
|
||||
$.post(js.getajaxurl('todoyd','geren','system'),{s:s}, function(){
|
||||
if(lxs){
|
||||
js.msg('success','处理成功');
|
||||
a.reload()
|
||||
}
|
||||
});
|
||||
},
|
||||
daochu:function(){
|
||||
a.exceldown();
|
||||
},
|
||||
search:function(){
|
||||
var s=get('key_{rand}').value;
|
||||
a.setparams({key:s},true);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
js.initbtn(c);
|
||||
c{rand} = c;
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td nowrap>
|
||||
<button class="btn btn-success" click="yidu,1" type="button">标为已读</button>
|
||||
</td>
|
||||
|
||||
<td width="95%" align="left">
|
||||
|
||||
<div class="input-group" style="width:220px;">
|
||||
<input class="form-control" id="key_{rand}" onkeydown="if(event.keyCode==13)c{rand}.search()" placeholder="关键词">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" click="search" type="button"><i class="icon-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
<td align="right" nowrap>
|
||||
<button class="btn btn-default" click="daochu" 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>
|
||||
158
webmain/system/geren/rock_geren_vcard.php
Normal file
158
webmain/system/geren/rock_geren_vcard.php
Normal file
@@ -0,0 +1,158 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
var pid,typeid=0,sspid=0;
|
||||
var at = $('#optionview_{rand}').bootstree({
|
||||
url:js.getajaxurl('gettreedata','option','system',{'num':'gerenvcard_'+adminid+''}),
|
||||
columns:[{
|
||||
text:'分组',dataIndex:'name',align:'left',xtype:'treecolumn',width:'79%'
|
||||
},{
|
||||
text:'排序号',dataIndex:'sort',width:'20%'
|
||||
}],
|
||||
load:function(d){
|
||||
if(sspid==0){
|
||||
typeid = d.pid;
|
||||
sspid = d.pid;
|
||||
c.loadfile('','所有联系人');
|
||||
}
|
||||
},
|
||||
itemdblclick:function(d){
|
||||
typeid = d.id;
|
||||
c.loadfile(d.name,d.name);
|
||||
}
|
||||
});;
|
||||
var modenum = 'vcard';
|
||||
var a = $('#view_{rand}').bootstable({
|
||||
tablename:modenum,celleditor:true,sort:'sort',dir:'asc',fanye:true,autoLoad:false,modenum:modenum,modename:'个人通讯录',
|
||||
columns:[{
|
||||
text:'姓名',dataIndex:'name'
|
||||
},{
|
||||
text:'性别',dataIndex:'sex'
|
||||
},{
|
||||
text:'单位',dataIndex:'unitname'
|
||||
},{
|
||||
text:'电话',dataIndex:'tel',editor:true
|
||||
},{
|
||||
text:'手机号',dataIndex:'mobile',editor:true
|
||||
},{
|
||||
text:'邮箱',dataIndex:'email'
|
||||
},{
|
||||
text:'所在组',dataIndex:'gname',editor:true
|
||||
},{
|
||||
text:'地址',dataIndex:'address'
|
||||
},{
|
||||
text:'排序号',dataIndex:'sort',editor:true,sortable:true
|
||||
},{
|
||||
text:'操作时间',dataIndex:'optdt'
|
||||
},{
|
||||
text:'',dataIndex:'caozuo'
|
||||
}]
|
||||
});
|
||||
|
||||
|
||||
var c = {
|
||||
reload:function(){
|
||||
at.reload();
|
||||
},
|
||||
loadfile:function(spd,nsd){
|
||||
$('#megss{rand}').html(nsd);
|
||||
a.setparams({'gname':spd}, true);
|
||||
},
|
||||
genmu:function(){
|
||||
typeid = sspid;
|
||||
at.changedata={};
|
||||
this.loadfile('','所有联系人');
|
||||
},
|
||||
clicktypeeidt:function(){
|
||||
var d = at.changedata;
|
||||
if(d.id)c.clicktypewin(false, 1, d);
|
||||
},
|
||||
clicktypewin:function(o1, lx, da){
|
||||
var h = $.bootsform({
|
||||
title:'组',height:250,width:300,
|
||||
tablename:'option',labelWidth:50,
|
||||
isedit:lx,submitfields:'name,sort,pid',cancelbtn:false,
|
||||
items:[{
|
||||
labelText:'组名',name:'name',required:true
|
||||
},{
|
||||
labelText:'上级id',name:'pid',value:0,type:'hidden'
|
||||
},{
|
||||
labelText:'排序号',name:'sort',type:'number',value:0
|
||||
}],
|
||||
success:function(){
|
||||
at.reload();
|
||||
}
|
||||
});
|
||||
if(lx==1)h.setValues(da);
|
||||
if(lx==0)h.setValue('pid', sspid);
|
||||
return h;
|
||||
},
|
||||
typedel:function(o1){
|
||||
at.del({
|
||||
url:js.getajaxurl('deloption','option','system')
|
||||
});
|
||||
},
|
||||
adds:function(){
|
||||
openinput('个人通讯录',modenum);
|
||||
},
|
||||
search:function(){
|
||||
var s=get('key_{rand}').value;
|
||||
a.setparams({key:s},true);
|
||||
},
|
||||
daochu:function(){
|
||||
a.exceldown();
|
||||
},
|
||||
daoru:function(){
|
||||
managelistvcard = a;
|
||||
addtabs({num:'daoruvcard',url:'flow,input,daoru,modenum=vcard',icons:'plus',name:'导入个人通讯录'});
|
||||
}
|
||||
};
|
||||
js.initbtn(c);
|
||||
$('#optionview_{rand}').css('height',''+(viewheight-70)+'px');
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<table width="100%">
|
||||
<tr valign="top">
|
||||
<td width="220">
|
||||
<div style="border:1px #cccccc solid">
|
||||
<div id="optionview_{rand}" style="height:400px;overflow:auto;"></div>
|
||||
<div class="panel-footer">
|
||||
<a href="javascript:" click="clicktypewin,0" onclick="return false"><i class="icon-plus"></i></a>
|
||||
<a href="javascript:" click="clicktypeeidt" onclick="return false"><i class="icon-edit"></i></a>
|
||||
<a href="javascript:" click="typedel" onclick="return false"><i class="icon-trash"></i></a>
|
||||
<a href="javascript:" click="reload" onclick="return false"><i class="icon-refresh"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td width="10"></td>
|
||||
<td>
|
||||
<div>
|
||||
<table width="100%"><tr>
|
||||
<td align="left" nowrap>
|
||||
<button class="btn btn-primary" click="adds" type="button"><i class="icon-plus"></i> 新增</button>
|
||||
<button class="btn btn-default" click="genmu" type="button">所有联系人</button>
|
||||
|
||||
</td>
|
||||
|
||||
<td style="padding-left:10px">
|
||||
<input class="form-control" style="width:180px" id="key_{rand}" placeholder="标题">
|
||||
</td>
|
||||
<td style="padding-left:10px">
|
||||
<button class="btn btn-default" click="search" type="button">搜索</button>
|
||||
</td>
|
||||
<td width="90%">
|
||||
<span id="megss{rand}"></span>
|
||||
</td>
|
||||
<td align="right" nowrap>
|
||||
<button class="btn btn-default" click="daoru" type="button">导入个人通讯录</button>
|
||||
<button class="btn btn-default" click="daochu" type="button">导出</button>
|
||||
</td>
|
||||
</tr></table>
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div id="view_{rand}"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
Reference in New Issue
Block a user