信呼OA版本v2.3.8

This commit is contained in:
雨中磐石
2022-08-14 16:47:40 +08:00
parent 4640677d27
commit e3fcd913e3
1405 changed files with 133635 additions and 73 deletions

View File

@@ -0,0 +1,417 @@
<?php
class cogClassAction extends Action
{
public function sysinfoAjax()
{
$fields = array(
'title' => '系统名称',
'url' => '系统URL地址',
'localurl' => '系统本地地址',
'outurl' => '外网地址',
'db_drive' => '操作数据库驱动',
'db_host' => '数据库地址',
'db_name' => '数据库名称',
'version' => '版本',
'phpos' => '服务器',
'phpver' => 'PHP版本',
'mysqlver' => 'mysql版本',
'SERVER_SOFTWARE' => 'web服务器',
'upload_max_filesize' => '最大上传大小',
'post_max_size' => 'POST最大',
'memory_limit' => '使用最大内存',
'curl' => '是否支持CURL',
'max_execution_time' => 'PHP执行超时时间',
);
$data = array(
'title' => getconfig('title'),
'url' => getconfig('url'),
'localurl' => getconfig('localurl'),
'taskurl' => getconfig('taskurl'),
'outurl' => getconfig('outurl'),
'xinhukey' => getconfig('xinhukey'),
'db_host' => DB_HOST,
'db_name' => DB_BASE,
'db_drive' => getconfig('db_drive'),
'version' => '信呼V'.VERSION.'',
'phpos' => PHP_OS,
'phpver' => PHP_VERSION,
'mysqlver' => $this->db->getsyscount('version'),
'SERVER_SOFTWARE' => $_SERVER['SERVER_SOFTWARE'],
'upload_max_filesize' => ini_get('upload_max_filesize'),
'post_max_size' => ini_get('post_max_size'),
'memory_limit' => ini_get('memory_limit'),
'max_execution_time' => ini_get('max_execution_time').'秒',
);
if(!function_exists('curl_init')){
$data['curl'] = '<font color=red>不支持</font>';
}else{
$data['curl'] = '<font color=green>支持</font>';
}
$this->returnjson(array(
'fields' => $fields,
'data' => $data,
));
}
public function getinfoAjax()
{
$arr['title'] = getconfig('title');
$arr['outurl'] = getconfig('outurl');
$arr['url'] = arrvalue($GLOBALS['_tempconf'],'url');
$arr['localurl'] = getconfig('localurl');
$arr['apptitle'] = getconfig('apptitle');
$arr['platurl'] = getconfig('platurl');
$arr['reimtitle'] = getconfig('reimtitle');
$arr['asynkey'] = getconfig('asynkey');
$arr['openkey'] = getconfig('openkey');
$arr['db_drive'] = getconfig('db_drive');
$arr['xinhukey'] = getconfig('xinhukey');
$arr['bcolorxiang'] = getconfig('bcolorxiang');
$arr['qqmapkey'] = getconfig('qqmapkey');
$arr['asynsend'] = getconfig('asynsend');
$arr['defstype'] = getconfig('defstype','1');
$arr['officeyl'] = getconfig('officeyl'); //文档预览
$arr['officebj'] = getconfig('officebj');
$arr['apptheme'] = getconfig('apptheme');
$arr['officebj_key'] = getconfig('officebj_key');
$arr['useropt'] = getconfig('useropt');
$arr['sqllog'] = getconfig('sqllog') ? '1' : '0';
$arr['debug'] = getconfig('debug') ? '1' : '0';
$arr['reim_show'] = getconfig('reim_show') ? '1' : '0';
$arr['mobile_show'] = getconfig('mobile_show') ? '1' : '0';
$arr['companymode'] = getconfig('companymode') ? '1' : '0';
$arr['isshou'] = $this->isshouquan() ? '1' : '0';
$arr['editpass'] = getconfig('editpass','0');
$arr['asyntest'] = $this->option->getval('asyntest');
$loginyzm = getconfig('loginyzm');
if(!$loginyzm)$loginyzm = '0';
$arr['loginyzm'] = $loginyzm;
if(getconfig('systype')=='demo'){
$arr['xinhukey']='';
$arr['officebj_key']='';
}
if(!isempt($arr['xinhukey']))$arr['xinhukey'] = substr($arr['xinhukey'],0,5).'*****'.substr($arr['xinhukey'],-5);
$this->returnjson($arr);
}
private function isshouquan()
{
$key = getconfig('authorkey');
if(!isempt($key) && $this->rock->isjm($key)){
return true;
}else{
return false;
}
}
public function savecongAjax()
{
if(getconfig('systype')=='demo')exit('演示上禁止设置');
if($this->getsession('isadmin')!='1')exit('非管理员不能操作');
$puurl = $this->option->getval('reimpushurlsystem',1);
$_confpath = $this->rock->strformat('?0/?1/?1Config.php', ROOT_PATH, PROJECT);
$arr = require($_confpath);
$title = $this->post('title');
if(!isempt($title))$arr['title'] = $title;
$arr['url'] = $this->post('url');
$arr['outurl'] = $this->post('outurl');
$arr['reimtitle'] = $this->post('reimtitle');
$arr['qqmapkey'] = $this->post('qqmapkey');
$arr['platurl'] = $this->post('platurl');
$apptitle = $this->post('apptitle');
if(!isempt($apptitle))$arr['apptitle'] = $apptitle;
$asynkey = $this->post('asynkey');
if(!isempt($asynkey))$arr['asynkey'] = $asynkey;
$db_drive = $this->post('db_drive');
if(!isempt($db_drive)){
if($db_drive=='mysql' && !function_exists('mysql_connect'))exit('未开启mysql扩展模块');
if($db_drive=='mysqli' && !class_exists('mysqli'))exit('未开启mysqli扩展模块');
if($db_drive=='pdo' && !class_exists('PDO'))exit('未开启pdo扩展模块');
$arr['db_drive'] = $db_drive;
}
$arr['localurl'] = $this->post('localurl');
$arr['openkey'] = $this->post('openkey');
$arr['xinhukey'] = $this->post('xinhukey');
if(contain($arr['xinhukey'],'**'))$arr['xinhukey'] = getconfig('xinhukey');
$arr['bcolorxiang'] = $this->post('bcolorxiang');
$arr['officeyl'] = $this->post('officeyl');
$arr['useropt'] = $this->post('useropt');
$arr['editpass'] = $this->post('editpass');
$arr['defstype'] = $this->post('defstype','1');
$arr['officebj'] = $this->post('officebj');
$arr['officebj_key']= $this->post('officebj_key');
$asynsend = $this->post('asynsend');
$arr['asynsend'] = $asynsend;
$arr['sqllog'] = $this->post('sqllog')=='1';
$arr['debug'] = $this->post('debug')=='1';
$arr['reim_show'] = $this->post('reim_show')=='1';
$arr['mobile_show'] = $this->post('mobile_show')=='1';
$arr['companymode'] = $this->post('companymode')=='1';
$arr['loginyzm'] = $this->post('loginyzm');
$arr['apptheme'] = $this->post('apptheme');
if($asynsend == '1' && isempt($puurl))exit('未安装或开启服务端不能使用异步发送消息');
$xpd = explode(',', "\\,', ,<,>,*,%,&");
$xpd[]= "\n";
foreach($arr as $k=>$v)if(!is_bool($v))$arr[$k] = str_replace($xpd,'',$v);
$smarr['url'] = '系统URL';
$smarr['localurl'] = '本地系统URL用于服务器上浏览地址';
$smarr['title'] = '系统默认标题';
$smarr['neturl'] = '系统外网地址,用于公网';
$smarr['apptitle'] = 'APP上和手机网页版上的标题';
$smarr['reimtitle'] = 'REIM即时通信上标题';
$smarr['weblogo'] = 'PC客户端上的logo图片';
$smarr['db_host'] = '数据库地址';
$smarr['db_user'] = '数据库用户名';
$smarr['db_pass'] = '数据库密码';
$smarr['db_base'] = '数据库名称';
$smarr['perfix'] = '数据库表名前缀';
$smarr['qom'] = 'session、cookie前缀';
$smarr['highpass'] = '超级管理员密码,可用于登录任何帐号';
$smarr['db_drive'] = '操作数据库驱动有mysql,mysqli,pdo三种';
$smarr['randkey'] = '系统随机字符串密钥';
$smarr['asynkey'] = '这是异步任务key';
$smarr['openkey'] = '对外接口openkey';
$smarr['sqllog'] = '是否记录sql日志保存'.UPDIR.'/sqllog下';
$smarr['asynsend'] = '是否异步发送提醒消息0同步1自己服务端异步2官网VIP用户异步';
$smarr['install'] = '已安装,不要去掉啊';
$smarr['xinhukey'] = '信呼官网key用于在线升级使用';
$smarr['bcolorxiang'] = '单据详情页面上默认展示线条的颜色';
$smarr['debug'] = '为true调试开发模式,false上线模式';
$smarr['reim_show'] = '首页是否显示REIM';
$smarr['mobile_show'] = '首页是否显示手机版';
$smarr['loginyzm'] = '登录方式:0仅使用帐号+密码,1帐号+密码/手机+验证码,2帐号+密码+验证码,3仅使用手机+验证码';
$smarr['officeyl'] = '文档Excel.Doc预览类型,0自己部署插件1使用官网支持任何平台';
$smarr['officedk'] = '文件预览打开方式1新窗口打开';
$smarr['useropt'] = '1记录用户操作保存到日志里,空不记录';
$smarr['defstype'] = 'PC后台主题皮肤可以设置1到34';
$smarr['editpass'] = '用户登录修改密码0不用修改1强制用户必须修改';
$smarr['companymode'] = '多单位模式true就是开启';
$smarr['outurl'] = '这个地址当你内网地址访问时向手机推送消息的地址';
$smarr['officebj'] = '文档在线编辑1官网提供或者自己部署';
$smarr['officebj_key'] = '文档在线编辑agentkey';
$smarr['apptheme'] = '系统或app的主题颜色';
$str1 = '';
foreach($arr as $k=>$v){
$bz = '';
if(isset($smarr[$k]))$bz=' //'.$smarr[$k].'';
if(is_bool($v)){
$v = $v ? 'true' : 'false';
}else{
$v = "'$v'";
}
$str1.= " '$k' => $v,$bz\n";
}
$str = '<?php
if(!defined(\'HOST\'))die(\'not access\');
//[管理员]在'.$this->now.'通过[系统→系统工具→系统设置],保存修改了配置文件
return array(
'.$str1.'
);';
@$bo = file_put_contents($_confpath, $str);
if($bo){
echo 'ok';
}else{
echo '保存失败无法写入:'.$_confpath.'';
}
}
public function logbefore($table)
{
$key = $this->post('key');
$s = '';
if($key != ''){
$s = "and (`type`='$key' or `optname` like '$key%' or `remark` like '$key%' or `web`='$key' or `ip`='$key')";
}
return $s;
}
public function logintokenbefore($table)
{
$key = $this->post('key');
$s = '';
if($key != ''){
$s = "and (`name` like '%$key%' or `cfrom` like '%$key%' or `web` like '%$key%')";
}
return $s;
}
public function delloginAjax()
{
$id = c('check')->onlynumber($this->post('id'));
m('logintoken')->delete('id in('.$id.')');
backmsg();
}
public function dellogAjax()
{
$id = c('check')->onlynumber($this->post('id'));
m('log')->delete('id in('.$id.')');
backmsg();
}
public function clearlogAjax()
{
$lx = (int)$this->get('lx','0');
$where = "`type`='异步队列'";
if($lx==0)$where = '1=1';
m('log')->delete($where);
return returnsuccess();
}
public function saveautherAjax()
{
if(getconfig('systype')=='demo')exit('演示上不要操作');
$autherkey = $this->post('key');
$ym = $this->post('ym');
$barr = c('xinhuapi')->authercheck($autherkey, $ym);
if($barr['success']){
echo 'ok';
}else{
echo $barr['msg'];
}
}
public function savelixianAjax()
{
if(getconfig('systype')=='demo')exit('演示上不要操作');
$aukey = $this->post('key');
$ym = $this->post('ym');
$path = 'config/rockauther.php';
if(!file_exists($path))exit('没有下载签授文件到系统上');
$da = require($path);
$barr = c('xinhuapi')->autherfile($da, $aukey, $ym);
if($barr['success']){
@unlink($path);
echo 'ok';
}else{
echo $barr['msg'];
}
}
public function autherAjax()
{
$aukey = $this->option->getval('auther_aukey');
$use = '1';
$barr = array();
if(isempt($aukey)){
$use = '0';
}else{
$barr['enddt'] = $this->option->getval('auther_enddt');
$barr['yuming']= $this->option->getval('auther_yuming');
$barr['aukey'] = substr($aukey,0,5).'****'.substr($aukey,-5);
}
$barr['use'] = $use;
return returnsuccess($barr);
}
public function autherdelAjax()
{
if(getconfig('systype')=='demo')return returnerror('演示上不要操作');
return c('xinhuapi')->autherdel();
}
public function tongbudwAjax()
{
$rows = m('company')->getall('iscreate=1');
foreach($rows as $k=>$rs){
$base = ''.DB_BASE.'_company_'.$rs['num'].'';
$this->sevessee($base, 'auther_aukey');
$this->sevessee($base, 'auther_enddt');
$this->sevessee($base, 'auther_yuming');
$this->sevessee($base, 'auther_authkey');
}
return '同步成功';
}
private function sevessee($base, $key)
{
$val = $this->option->getval($key);
$sql = "update ".$base.".`[Q]option` set `value`='$val',`optdt`='{$this->now}' where `num`='$key'";
$this->db->query($sql, false);
}
/**
* 更多保存设置
*/
public function savemoresetAjax()
{
if(getconfig('systype')=='demo')return '演示不要改';
$stype = (int)$this->post('stype','0');
$msg = 'ok';
if($stype==0)$msg = $this->saveconfig('title,imgcompress,watertype,video_bool,flowchehuitime,saasmode',',video_bool,');
return $msg;
}
private function saveconfig($cont, $bsto)
{
$path = ''.P.'/'.P.'Config.php';
$neir = file_get_contents($path);
$zdar = explode(',', $cont);
$neira= explode("\n", $neir);
$strs = '';
$szida= array();
foreach($neira as $line){
if($line==');')break;
$bo = false;
foreach($zdar as $fid){
if(contain($line,"'".$fid."'")){
$val = $this->post($fid);
if(contain($val,'*****')){
$strs.="".$line."\n";
}else{
$val = $this->rock->xssrepstr($val);
$vals = "'".$val."'";
if(contain($bsto,','.$fid.','))$vals = ($val=='1') ? 'true' : 'false';
$strs.=" '".$fid."' => ".$vals.",\n";
}
$bo = true;
$szida[]=$fid;
}
}
if(!$bo)$strs.="".$line."\n";
}
foreach($zdar as $fid){
if(!in_array($fid, $szida)){
$val = $this->post($fid);
$strs.=" '".$fid."' => '".$val."',\n";
}
}
$strs.=');';
$bo = @file_put_contents($path,$strs);
if(!$bo)return '无权限写入:'.$path.'';
return 'ok';
}
}

View File

@@ -0,0 +1,137 @@
<?php if(!defined('HOST'))die('not access');?>
<script >
$(document).ready(function(){
var barr = {};
var c={
save:function(o1){
var key = get('autherkey_{rand}').value,mvd='msgview{rand}';
if(!key){js.setmsg('请输入签授密钥','',mvd);return;}
o1.disabled=true;
$('#savewen{rand}').hide();
js.setmsg('验证中...','',mvd);
js.ajax(js.getajaxurl('saveauther','{mode}','{dir}'),{key:key,ym:HOST}, function(s){
if(s!='ok'){
js.setmsg(s,'',mvd);
o1.disabled=false;
}else{
js.setmsg('验证成功','green',mvd);
c.load();
}
},'post',false);
},
wenyz:function(o1){
var key = get('autherkey_{rand}').value,mvd='msgview{rand}';
if(!key){js.setmsg('请输入签授密钥','',mvd);return;}
o1.disabled=true;
$('#savebtn{rand}').hide();
js.setmsg('验证中...','',mvd);
js.ajax(js.getajaxurl('savelixian','{mode}','{dir}'),{key:key,ym:HOST}, function(s){
if(s!='ok'){
js.setmsg(s,'',mvd);
o1.disabled=false;
}else{
js.setmsg('验证成功','green',mvd);
c.load();
}
},'post',false);
},
load:function(){
var mvd='msgview{rand}';
js.setmsg('获取中...','',mvd);
js.ajax(js.getajaxurl('auther','{mode}','{dir}'),false, function(ret){
var da = ret.data;
js.setmsg('','',mvd);
if(da.use=='1'){
$('#auther_kq{rand}').html('<font color="green">已签授</font>');
get('autherkey_{rand}').readOnly=true;
get('autherkey_{rand}').value=da.aukey;
$('#auther_enddt{rand}').html(jm.uncrypt(da.enddt));
var str = jm.uncrypt(da.yuming);
if((','+str+',').indexOf(','+HOST+',')<0)str+='<font style="font-size:12px" color="red">(与当前'+HOST+'域名不符合)</font>';
$('#auther_yuming{rand}').html(str);
$('#savebtn{rand}').hide();
$('#savewen{rand}').hide();
$('#savedel{rand}').show();
}else{
$('#auther_kq{rand}').html('<font color="red">未签授</font>');
$('#auther_enddt{rand}').html('-');
$('#auther_yuming{rand}').html('-');
get('autherkey_{rand}').value='';
get('autherkey_{rand}').readOnly=false;
$('#savebtn{rand}').show();
$('#savewen{rand}').show();
$('#savedel{rand}').hide();
}
},'get,json');
},
savedel:function(o1){
js.confirm('确定要删除签授吗?', function(jg){if(jg=='yes')c.savedel2(o1);});
},
savedel2:function(o1){
var mvd='msgview{rand}';
js.setmsg('删除中...','',mvd);
o1.disabled=true;
js.ajax(js.getajaxurl('autherdel','{mode}','{dir}'),false, function(ret){
if(ret.success){
js.setmsg('','',mvd);
c.load();
}else{
js.setmsg(ret.msg,'',mvd);
}
},'get,json');
},
tongbudw:function(){
js.loading();
js.ajax(js.getajaxurl('tongbudw','{mode}','{dir}'),false, function(ret){
js.msgok(ret);
},'get');
}
};
js.initbtn(c);
c.load();
});
</script>
<div style="padding:10px;" align="center">
<div align="left" style="width:400px">
<table cellspacing="0" border="0" cellpadding="0">
<tr>
<td colspan="2"><h4>系统签授(这个跟<font color=red>授权</font>没有任何关系)</h4></td>
</tr>
<tr>
<td colspan="2"><div style="font-size:13px;color:#888888;padding-bottom:20px">是为了防止系统盗版使用,需要把你部署的系统签名授权,绑定了域名和有效时间,签授后才能有效享有系统功能,更好的升级维护,登录<a href="<?=URLY?>" target="_blank">官网</a>用户中心→系统签授,获取签授密钥。</div></td>
</tr>
<tr>
<td height="40" width="70">签授情况</td>
<td><span id="auther_kq{rand}"><font color="red">未签授</font></span> <a click="load" href="javascript:;"><i class="icon-refresh"></i></a></td>
</tr>
<tr>
<td height="40">有效期至</td>
<td id="auther_enddt{rand}">-</td>
</tr>
<tr>
<td height="40">绑定域名</td>
<td><div id="auther_yuming{rand}" class="wrap">-</div></td>
</tr>
<tr>
<td height="60">签授密钥</td>
<td ><input id="autherkey_{rand}" readOnly placeholder="可从官网用户中心中获取" style="width:300px" class="form-control"></td>
</tr>
<tr>
<td ></td>
<td style="padding-top:20px">
<button click="save" id="savebtn{rand}" style="display:none" class="btn btn-success" type="button"><i class="icon-key"></i> 提交验证</button>&nbsp;&nbsp;
<button click="wenyz" id="savewen{rand}" style="display:none" class="btn btn-primary" type="button"><i class="icon-file"></i> 文件验证</button>
<button click="savedel" id="savedel{rand}" style="display:none" class="btn btn-danger" type="button"><i class="icon-key"></i> 删除签授</button>
<?php
if(!COMPANYNUM && getconfig('platdwnum'))echo '&nbsp;&nbsp;<button click="tongbudw" class="btn btn-primary" type="button">同步到单位数据</button>';
?>
&nbsp;<span id="msgview{rand}"></span></td>
</tr>
</table>
</div>
</div>

View File

@@ -0,0 +1,110 @@
<?php if(!defined('HOST'))die('not access');?>
<script >
$(document).ready(function(){
{params};
var atype=params.atype;
var a = $('#veiw_{rand}').bootstable({
tablename:'log',celleditor:true,sort:'id',dir:'desc',modedir:'{mode}:{dir}',params:{'atype':atype},checked:true,fanye:true,
storebeforeaction:'logbefore',
columns:[{
text:'类型',dataIndex:'type'
},{
text:'操作人',dataIndex:'optname',sortable:true
},{
text:'备注',dataIndex:'remark',align:'left',renderer:function(v,d){
if(d.url && d.level==2){
if(d.url.indexOf('http')==0){
v+='<br>'+d.url+'';
}else{
v+='<br><a href="'+d.url+'" target="_blank">查看详情</a>';
}
}
if(d.url && d.level==3){
if(!ISDEMO)v+='<br>'+d.url+'';
if(d.result)v+='<br>运行结果:<br>'+d.result+'';
}
return v;
},renderstyle:function(){
return 'word-wrap:break-word;word-break:break-all;white-space:normal;';
}
},{
text:'操作时间',dataIndex:'optdt',sortable:true
},{
text:'IP',dataIndex:'ip'
},{
text:'浏览器',dataIndex:'web'
},{
text:'Device',dataIndex:'device'
},{
text:'级别',dataIndex:'level'
},{
text:'ID',dataIndex:'id',sortable:true
}],
rendertr:function(d){
var s = '';
if(d.level==2)s='style="color:red"';
return s;
}
});
var c = {
delss:function(){
a.del({url:js.getajaxurl('dellog','{mode}','{dir}'),checked:true});
},
search:function(){
var s=get('key_{rand}').value;
a.setparams({key:s},true);
},
daochu:function(){
a.exceldown();
},
qingkong:function(ox,lx){
var set = ['全部','异步队列'];
js.confirm('确定要清空'+set[lx]+'的日志记录吗?', function(jg){
if(jg=='yes')c.qingkongs(lx);
});
},
qingkongs:function(lx){
js.loading('清空中...');
$.get(js.getajaxurl('clearlog','{mode}','{dir}',{lx:lx}), function(){
js.msgok('已清空');
a.reload();
});
},
loginji:function(){
addtabs({name:'登录记录',num:'loginjl',url:'system,cog,login',icons:'legal'});
}
};
js.initbtn(c);
});
</script>
<div>
<table width="100%"><tr>
<td>
<input class="form-control" style="width:300px" id="key_{rand}" placeholder="类型/操作人/浏览器/IP/备注">
</td>
<td nowrap style="padding-left:10px">
<button class="btn btn-default" click="search" type="button">搜索</button>&nbsp;
<button class="btn btn-default" click="daochu,1" type="button">导出</button>
</td>
<td width="80%"></td>
<td align="right" nowrap>
<button class="btn btn-default" click="loginji" type="button">查看登录记录</button>&nbsp;
<button class="btn btn-default" click="qingkong,1" type="button">仅清空异步队列</button>&nbsp;
<button class="btn btn-default" click="qingkong,0" type="button">清空全部</button>&nbsp;
<button class="btn btn-danger" id="del_{rand}" click="delss" type="button"><i class="icon-trash"></i> 删除</button>
</td>
</tr>
</table>
</div>
<div class="blank10"></div>
<div id="veiw_{rand}"></div>

View File

@@ -0,0 +1,78 @@
<?php if(!defined('HOST'))die('not access');?>
<script >
$(document).ready(function(){
{params};
var a = $('#veiw_{rand}').bootstable({
tablename:'logintoken',celleditor:true,sort:'moddt',dir:'desc',modedir:'{mode}:{dir}',checked:true,fanye:true,
storebeforeaction:'logintokenbefore',
columns:[{
text:'姓名',dataIndex:'name'
},{
text:'用户ID',dataIndex:'uid',sortable:true
},{
text:'来源',dataIndex:'cfrom',sortable:true
},{
text:'IP',dataIndex:'ip'
},{
text:'浏览器',dataIndex:'web'
},{
text:'Device',dataIndex:'device'
},{
text:'app推送',dataIndex:'ispush',type:'checkbox',sortable:true
},{
text:'在线状态',dataIndex:'online',type:'checkbox',sortable:true
},{
text:'最后在线',dataIndex:'moddt',sortable:true
},{
text:'ID',dataIndex:'id',sortable:true
}],
rendertr:function(d){
var s = '';
if(d.online==0)s='style="color:#aaaaaa"';
return s;
}
});
var c = {
delss:function(){
a.del({url:js.getajaxurl('dellogin','{mode}','{dir}'),checked:true});
},
search:function(){
var s=get('key_{rand}').value;
a.setparams({key:s},true);
},
daochu:function(){
a.exceldown();
}
};
js.initbtn(c);
});
</script>
<div>
<table width="100%"><tr>
<td>
<input class="form-control" style="width:300px" id="key_{rand}" placeholder="来源/姓名/浏览器">
</td>
<td nowrap style="padding-left:10px">
<button class="btn btn-default" click="search" type="button">搜索</button>&nbsp;
<button class="btn btn-default" click="daochu,1" type="button">导出</button>
</td>
<td width="80%"></td>
<td align="right" nowrap>
<button class="btn btn-danger" id="del_{rand}" click="delss" type="button"><i class="icon-trash"></i> 删除</button>
</td>
</tr>
</table>
</div>
<div class="blank10"></div>
<div id="veiw_{rand}"></div>

View File

@@ -0,0 +1,124 @@
<?php if(!defined('HOST'))die('not access');?>
<script>
$(document).ready(function(){
var c = {
init:function(){
},
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();
},
savecog:function(o1,lx){
var msgid = 'msgview'+lx+'_{rand}';
var da = js.getformdata('form'+lx+'_{rand}');
js.setmsg('保存中...','', msgid);
da.stype = lx;
js.ajax(js.getajaxurl('savemoreset','{mode}','{dir}'), da, function(s){
if(s=='ok'){
js.setmsg('保存成功','green', msgid);
}else{
js.setmsg(s,'', msgid);
}
},'post');
}
};
js.initbtn(c);
c.init();
});
</script>
<div style="padding:10px 30px">
<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}" style="display:none" click="tesgs,1">
<a style="TEXT-DECORATION:none">阿里云短信</a>
</li>
</ul>
<div style="padding-top:20px">
<form id="tablstal0{rand}" name="form0_{rand}">
<table cellspacing="0" border="0" cellpadding="0">
<tr><td align="right" style="color:gray">系统标题:</td><td><input name="title" type="text" value="<?=getconfig('title')?>" style="width:300px" class="form-control"></td></tr>
<tr><td height="10"></td></tr>
<tr><td align="right" style="color:gray">图片压缩尺寸:</td><td><input name="imgcompress" type="text" value="<?=getconfig('imgcompress')?>" style="width:200px" placeholder="不设置不压缩" class="form-control">
<span style="color:#aaaaaa;">仅对jpg文件压缩格式宽x高如800x1000</span>
</td></tr>
<tr><td height="10"></td></tr>
<tr><td align="right" style="color:gray">详情页水印:</td><td><select style="width:200px" name="watertype" class="form-control"><option value="">默认没有开启</option><option <?php if(getconfig('watertype')=='1')echo 'selected';?> value="1">开启</option></select>
<span style="color:#aaaaaa;"><a target="_blank" href="<?=URLY?>view_shuiyin.html">帮助</a>说明</span></td></tr>
<tr><td height="10"></td></tr>
<tr><td align="right" style="color:gray">APP音视频通话</td><td><select style="width:200px" name="video_bool" class="form-control"><option value="0">关闭</option><option <?php if(getconfig('video_bool'))echo 'selected';?> value="1">开启</option></select>
<span style="color:#aaaaaa;">开启后需要到[系统→系统工具→插件模块]安装音视频通话的插件</span></td></tr>
<tr><td height="10"></td></tr>
<tr><td align="right" style="color:gray">人员审批撤回时间:</td><td><input name="flowchehuitime" type="number" value="<?=getconfig('flowchehuitime')?>" onfocus="js.focusval=this.value" onblur="js.number(this)" min="0" style="width:200px" placeholder="默认是2小时" class="form-control"></select>
<span style="color:#aaaaaa;">默认2小时已完成审批不支持撤回</span></td></tr>
<tr><td height="10"></td></tr>
<tr><td align="right" style="color:gray">SAAS多单位模式</td><td><select style="width:200px" name="saasmode" class="form-control"><option value="">默认没有开启</option><option <?php if(getconfig('saasmode')=='1')echo 'selected';?> value="1">开启(用不到不要开启)</option></select>
<span style="color:#aaaaaa;">授权版使用,<a target="_blank" href="<?=URLY?>view_xinhuduo.html">帮助</a>说明,每个单位一个访问地址数据库分开。</span></td></tr>
<tr><td height="10"></td></tr>
<tr>
<td align="right"></td>
<td align="left"><button click="savecog,0" class="btn btn-success" type="button"><i class="icon-save"></i>&nbsp;保存</button>&nbsp;<span id="msgview0_{rand}"></span>
</td>
</tr>
</table>
</form>
<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">&nbsp;<span id="msgview_{rand}"></span>
</td>
</tr>
</table>
</form>
</div>
</div>

View File

@@ -0,0 +1,286 @@
<?php if(!defined('HOST'))die('not access');?>
<script >
$(document).ready(function(){
var barr = {};
var c={
init:function(){
this.loadys();
js.ajax(js.getajaxurl('getinfo','{mode}','{dir}'),{},function(a){
barr = a;
for(var i in a)$('#'+i+'_{rand}').val(a[i]);
if(a.isshou=='1')$('#benquan_{rand}').html('<font color=green>授权版</font>');
if(isempt(a.asyntest))get('asynsend_{rand}').length=1;
if(a.officebj=='1')$('#divofficebj_key').show();
},'get,json');
},
loadys:function(){
if(!get('defstype_{rand}'))return;
var ysarr = 'cerulean,cosmo,cyborg,darkly,flatly,journal,lumen,paper,readable,sandstone,simplex,slate,spacelab,superhero,united,xinhu,yeti';
var sear = ysarr.split(','),i,len=sear.length,das = [];
for(i=0;i<len;i++){
das.push({name:sear[i],value:i+1});
das.push({name:sear[i]+'_def',value:i+1+len});
}
js.setselectdata(get('defstype_{rand}'),das,'value');
},
isurl:function(na,dz){
if(dz){
if(dz.substr(0,4)!='http')return ''+na+'必须http开头';
if(dz.substr(-1)!='/')return ''+na+'必须/结尾';
}
return '';
},
save:function(o){
var d={};
for(var i in barr){
d[i] = $('#'+i+'_{rand}').val();
}
if(d.title==''){
js.msg('msg','系统标题不能为空');
return;
}
var keys = d.xinhukey;
if(keys && keys.indexOf('*')==-1 && keys.length!=32){
js.msg('msg','官网key格式有误是32位md5格式请看帮助获取');
get('xinhukey_{rand}').focus();
return;
}
if(d.officeyl==5 && d.officebj!=1){
js.msg('msg','文档在线编辑请选第二个,否则无法使用');
get('officebj_{rand}').focus();
return;
}
if(d.platurl && d.platurl==NOWURL){
js.msg('msg','平台使用地址不能跟当前地址一样');
get('platurl_{rand}').focus();
return;
}
js.ajax(js.getajaxurl('savecong','{mode}','{dir}'), d, function(s){
if(s!='ok')js.msg('msg', s);
},'post',false,'保存中...,保存成功');
},
blurls:function(o){
var val = strreplace(o.value);
if(val=='')return;
if(val.substr(0,4)!='http')val='http://'+val+'';
var la = val.substr(-1);
if(la!='/')val+='/';
o.value=val;
},
auther:function(){
addtabs({name:'系统签授',num:'auther',url:'system,cog,auther',icons:'key'});
},
moreset:function(){
addtabs({name:'更多系统设置',num:'moreset',url:'system,cog,moreset',icons:'cog'});
},
changebj:function(o1){
if(o1.value=='1'){
$('#divofficebj_key').show();
}else{
$('#divofficebj_key').hide();
}
},
xuanys:function(){
var zys = ['#1389D3','#99cc66','#003366','#6666CC','#CC3333','#009966','#333333','#990066','#333300','#333366','#99CC99','#663366','#003399','#666699'];
var h = '<div style="padding:10px"><table class="cursor"><tr>';
for(var i=0;i<zys.length;i++){
h+='<td width="20" onclick="xuancolora{rand}(\''+zys[i]+'\')" width="20" bgcolor="'+zys[i]+'">&nbsp;</td>';
}
h+='</tr></table></div>';
js.tanbody('color','选择主题颜色',310,200,{
html:h
});
}
};
js.initbtn(c);
c.init();
$('#url_{rand}').blur(function(){
c.blurls(this);
});
$('#localurl_{rand}').blur(function(){
c.blurls(this);
});
$('#platurl_{rand}').blur(function(){
c.blurls(this);
});
$('#outurl_{rand}').blur(function(){
c.blurls(this);
});
$('#officebj_{rand}').change(function(){
c.changebj(this);
});
xuancolora{rand}=function(col){
get('apptheme_{rand}').value=col;
js.tanclose('color');
}
});
</script>
<div align="left">
<div style="padding:10px;">
<table cellspacing="0" width="900" border="0" cellpadding="0">
<tr>
<td colspan="4"><div class="inputtitle">基本信息
<div style="padding:5px;line-height:18px;font-size:12px;color:#888888">此保存在配置文件下,也可以自己打开配置文件(webmain/webmainConfig.php)来修改</div>
</div></td>
</tr>
<tr>
<td colspan="4" class="tdinput" ><div align="center" style="line-height:30px">系统版本:<b id="benquan_{rand}" style="font-size:20px"><font color=red>开源版</font></b><input id="isshou_{rand}" type="hidden" class="form-control">&nbsp;&nbsp;<button click="auther" class="btn btn-success btn-xs">系统签授</button>&nbsp;&nbsp;<button click="moreset" style="display:" class="btn btn-default btn-xs">更多设置</button></div></td>
</tr>
<tr>
<td align="right" width="15%" width="180">系统标题:</td>
<td class="tdinput" width="35%" ><input id="title_{rand}" class="form-control"></td>
<td align="right" width="15%" >APP移动端上标题</td>
<td class="tdinput" width="35%"><input id="apptitle_{rand}" class="form-control"></td>
</tr>
<tr>
<td align="right">REIM即时通信标题</td>
<td class="tdinput"><input id="reimtitle_{rand}" class="form-control"></td>
<td align="right"><a target="_blank" href="<?=URLY?>">信呼官网</a>key</td>
<td class="tdinput"><input id="xinhukey_{rand}" class="form-control">
<font color="#888888">用于在线升级使用,看<a target="_blank" href="<?=URLY?>view_xhkey.html">[帮助]</a>获取</font></td>
</tr>
<tr>
<td align="right">系统URL地址</td>
<td class="tdinput"><input id="url_{rand}" placeholder="为空默认自动识别" class="form-control"><font color="#888888">可以为空不用设置的,<a onclick="get('url_{rand}').value=''" href="javascript:;">[清空]</a></font></td>
<td align="right">系统本地地址:</td>
<td class="tdinput"><input id="localurl_{rand}" class="form-control">
<font color="#888888">用于计划任务异步任务使用没有可跟系统URL一样</font></td>
</tr>
<tr>
<td align="right">系统外网地址:</td>
<td class="tdinput"><input id="outurl_{rand}" placeholder="不知道做啥的,就不要去设置" class="form-control"></td>
<?php if(getconfig('platdwnum')){?>
<td align="right">平台使用地址:</td>
<td class="tdinput"><input id="platurl_{rand}" placeholder="不能跟当前地址一样" class="form-control"></td>
<?php }?>
</tr>
<tr>
<td align="right">系统主题色:</td>
<td class="tdinput">
<div class="input-group">
<input placeholder="RGB格式颜色" class="form-control" id="apptheme_{rand}" >
<span class="input-group-btn">
<button class="btn btn-default" click="xuanys" type="button"><i class="icon-search"></i></button>
</span>
</div>
</td>
</tr>
<tr>
<td colspan="4"><div class="inputtitle">高级设置</div></td>
</tr>
<tr>
<td align="right">debug模式</td>
<td class="tdinput"><select id="debug_{rand}" class="form-control"><option value="0">上线模式</option><option value="1">开发调试模式</option></select></td>
<td align="right">操作数据库驱动:</td>
<td class="tdinput"><select id="db_drive_{rand}" class="form-control"><option value="mysql">mysql(不推荐)</option><option value="mysqli">mysqli</option><option value="pdo">pdo</option></select></td>
</tr>
<tr>
<td align="right">异步任务key</td>
<td class="tdinput"><input id="asynkey_{rand}" class="form-control"></td>
<td align="right">对外接口openkey</td>
<td class="tdinput"><input id="openkey_{rand}" class="form-control"></td>
</tr>
<tr>
<td align="right">提醒消息发送方式:</td>
<td class="tdinput"><select id="asynsend_{rand}" class="form-control"><option value="0">同步发送</option><option value="1">异步发送(自己服务端)</option></select>
<font color="#888888">提醒消息发送微信消息提示发送,邮件提醒发送等,异步发送能大大提高效率。</font></td>
<td align="right">是否记录访问sql日志</td>
<td class="tdinput"><select id="sqllog_{rand}" class="form-control"><option value="0">否</option><option value="1">是</option></select><font color="#888888">开启了日志将记录在目录<?=UPDIR?>/sqllog下</font></td>
</tr>
<tr>
<td align="right">详情上线条颜色:</td>
<td class="tdinput"><input id="bcolorxiang_{rand}" placeholder="用于单据详情默认颜色" maxlength="7" class="form-control"></td>
<td align="right">PC首页显示</td>
<td class="tdinput">REIM<select id="reim_show_{rand}" ><option value="0">不显示</option><option value="1">显示</option></select>&nbsp;&nbsp;手机版:<select id="mobile_show_{rand}" ><option value="0">不显示</option><option value="1">显示</option></select></td>
</tr>
<tr>
<td align="right">腾讯地图KEY</td>
<td class="tdinput"><input id="qqmapkey_{rand}" placeholder="可不设置可到https://lbs.qq.com/下申请" class="form-control"></select></td>
<td align="right">登录方式:</td>
<td class="tdinput"><select id="loginyzm_{rand}" class="form-control"><option value="0">仅使用帐号+密码</option><option value="1">帐号+密码/手机+手机验证码</option><option value="2">帐号+密码+手机验证码</option><option value="3">仅使用手机+手机验证码</option></select></td>
</tr>
<tr>
<td align="right">文档在线预览:</td>
<td class="tdinput"><select id="officeyl_{rand}" class="form-control"><option value="0">自己服务器安装office转PDF服务</option>
<option value="1">使用官网插件(官网VIP专用),不需要安装任何插件。</option>
<option value="2">使用微软在线预览office服务(需要公网域名)</option>
<option value="4">自己服务器安装LibreOffice转PDF服务(Win和Linux)都可以部署</option>
<option value="5">使用在线编辑服务预览(→右边那需要选第二个)</option>
</select></td>
<td align="right">文档在线编辑:</td>
<td class="tdinput">
<select id="officebj_{rand}" class="form-control"><option value="">安装客户端在线编辑插件</option><option value="1">官网提供在线编辑服务(官网VIP专用)</option></select>
<div id="divofficebj_key" style="display:none">在线编辑agentkey看<a target="_blank" href="<?=URLY?>view_agentkey.html">[帮助]</a>获取<input class="form-control" id="officebj_key_{rand}"></div>
</td>
</tr>
<tr>
<td align="right">PC后端默认主题</td>
<td class="tdinput"><select id="defstype_{rand}" style="width:80px"></select>&nbsp;必须去<a href="<?=URLY?>view_themes.html" target="_blank">下载主题包</a>,否则不能使用</td>
<td align="right">记录用户操作:</td>
<td class="tdinput"><select id="useropt_{rand}" class="form-control"><option value="">不记录</option><option value="1">记录到日志里</option></select></td>
</tr>
<tr>
<?php if(!getconfig('platdwnum')){?>
<td align="right">多单位模式:</td>
<td class="tdinput"><select id="companymode_{rand}" class="form-control"><option value="0">不开启</option><option value="1">开启(各单位分开数据管理)</option></select></td>
<?php }?>
<td align="right">登录修改密码:</td>
<td class="tdinput"><select id="editpass_{rand}" class="form-control"><option value="0">不用修改</option><option value="1">强制用户必须修改</option></select></td>
</tr>
<tr>
<td align="right"></td>
<td style="padding:15px 0px" colspan="3" align="left"><button click="save" class="btn btn-success" type="button"><i class="icon-save"></i>&nbsp;保存</button>
</td>
</tr>
</table>
</div>
</div>

View File

@@ -0,0 +1,22 @@
<?php if(!defined('HOST'))die('not access');?>
<script >
$(document).ready(function(){
js.ajax(js.getajaxurl('sysinfo','{mode}','{dir}'),{},function(a){
var s='<table>';
for(var f in a.fields){
s+='<tr><td align="right"><b>'+a.fields[f]+'</b>&nbsp;</td><td>'+a.data[f]+'</td></tr>';
}
s+='</table>';
$('#veiw_{rand}').html(s);
},'get,json');
});
</script>
<div style="padding:50px; line-height:34px">
<div>以下配置信息,请到系统的配置文件下修改(webmain/webmainConfig.php)<a href="?a=phpinfo" target="_blank">查看phpinfo</a></div>
<div class="blank1"></div>
<div id="veiw_{rand}"></div>
</div>