信呼v2.5.3版本
This commit is contained in:
@@ -8,6 +8,7 @@ class cogClassAction extends Action
|
||||
'url' => '系统URL地址',
|
||||
'localurl' => '系统本地地址',
|
||||
'outurl' => '外网地址',
|
||||
'rootpath' => '系统根目录',
|
||||
'db_drive' => '操作数据库驱动',
|
||||
'db_host' => '数据库地址',
|
||||
'db_name' => '数据库名称',
|
||||
@@ -32,6 +33,7 @@ class cogClassAction extends Action
|
||||
'xinhukey' => getconfig('xinhukey'),
|
||||
'db_host' => DB_HOST,
|
||||
'db_name' => DB_BASE,
|
||||
'rootpath' => ROOT_PATH,
|
||||
'db_drive' => getconfig('db_drive'),
|
||||
'version' => '信呼V'.VERSION.'',
|
||||
'phpos' => PHP_OS,
|
||||
|
||||
@@ -165,7 +165,7 @@ $(document).ready(function(){
|
||||
<span style="color:#aaaaaa;">单位分钟,默认是0没有限制</span></td></tr>
|
||||
<tr><td height="10"></td></tr>
|
||||
|
||||
<tr><td align="right" style="color:gray">读取人员缓存方式:</td><td><select style="width:200px" name="usercache" class="form-control"><option value="">默认本地浏览器缓存</option><option <?php if(getconfig('usercache')=='1')echo 'selected';?> value="1">不缓存本地浏览器</option></select></td></tr>
|
||||
<tr><td align="right" style="color:gray">读取人员本地缓存方式:</td><td><select style="width:200px" name="usercache" class="form-control"><option value="">默认本地浏览器缓存</option><option <?php if(getconfig('usercache')=='1')echo 'selected';?> value="1">不缓存本地浏览器</option></select></td></tr>
|
||||
<tr><td height="10"></td></tr>
|
||||
|
||||
<tr>
|
||||
|
||||
@@ -72,6 +72,13 @@ class optionClassAction extends Action
|
||||
}
|
||||
}
|
||||
|
||||
public function downshubefore()
|
||||
{
|
||||
$pid = (int)$this->post('pid','0');
|
||||
$this->pid = $pid;
|
||||
return 'and `pid`='.$pid.'';
|
||||
}
|
||||
|
||||
public function downshuafter($table, $rows)
|
||||
{
|
||||
$db = m($table);
|
||||
@@ -79,8 +86,26 @@ class optionClassAction extends Action
|
||||
$dcount = $db->rows('pid='.$rs['id'].'');
|
||||
if($dcount>0)$rows[$k]['dcount'] = $dcount;
|
||||
}
|
||||
$darr = array();
|
||||
if($this->pid>0){
|
||||
$this->getdonwds($db,$this->pid);
|
||||
$darr = $this->downarr;
|
||||
}
|
||||
return array(
|
||||
'rows' => $rows
|
||||
'rows' => $rows,
|
||||
'darr' => $darr
|
||||
);
|
||||
}
|
||||
|
||||
private $downarr = array();
|
||||
private function getdonwds($db,$id)
|
||||
{
|
||||
if($id>1){
|
||||
$rs = $db->getone('`id`='.$id.'','id,pid,name,num');
|
||||
if($rs){
|
||||
$this->getdonwds($db, $rs['pid']);
|
||||
$this->downarr[] = $rs;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,8 +29,8 @@ $(document).ready(function(){
|
||||
});
|
||||
|
||||
var a = $('#view_{rand}').bootstable({
|
||||
tablename:'option',celleditor:true,sort:'sort',dir:'asc',modedir:'{mode}:{dir}',storeafteraction:'downshuafter',
|
||||
autoLoad:false,where:'and pid=-1',bodyStyle:'height:'+(viewheight-72)+'px;overflow:auto',
|
||||
tablename:'option',celleditor:true,sort:'sort',dir:'asc',modedir:'{mode}:{dir}',storeafteraction:'downshuafter',storebeforeaction:'downshubefore',
|
||||
autoLoad:false,params:{pid:-1},bodyStyle:'height:'+(viewheight-72)+'px;overflow:auto',
|
||||
columns:[{
|
||||
text:'名称',dataIndex:'name',sortable:true,editor:true
|
||||
},{
|
||||
@@ -54,9 +54,10 @@ $(document).ready(function(){
|
||||
return s;
|
||||
}
|
||||
}],
|
||||
load:function(){
|
||||
load:function(d){
|
||||
get('add_{rand}').disabled=false;
|
||||
get('del_{rand}').disabled=true;
|
||||
c.showdownlist(d.darr);
|
||||
},
|
||||
itemclick:function(){
|
||||
get('del_{rand}').disabled=false;
|
||||
@@ -72,8 +73,19 @@ $(document).ready(function(){
|
||||
var c = {
|
||||
zhankai:function(ad){
|
||||
$('#downshow_{rand}').html('<b>['+ad.id+'.'+ad.name+']</b>的下级选项');
|
||||
nowid = ad.id;
|
||||
a.search("and `pid`="+ad.id+"");
|
||||
this.showdown(ad.id);
|
||||
},
|
||||
showdownlist:function(dl){
|
||||
var str='<b>路径:</b>';
|
||||
for(var i=0;i<dl.length;i++){
|
||||
if(i>0)str+=' <font color="#cccccc">></font> ';
|
||||
str+=' <a href="javascript:;" onclick="option{rand}.showdown('+dl[i].id+')">'+dl[i].name+'</a> ';
|
||||
}
|
||||
$('#downshow_{rand}').html(str);
|
||||
},
|
||||
showdown:function(id1){
|
||||
nowid = id1;
|
||||
a.setparams({'pid':id1}, true);
|
||||
},
|
||||
search:function(){
|
||||
var s = get('key_{rand}').value;
|
||||
@@ -95,7 +107,8 @@ $(document).ready(function(){
|
||||
var ad = this.optdata;
|
||||
if(d.lx==0){
|
||||
$('#downshow_{rand}').html('<b>['+ad.id+'.'+ad.name+']</b>的下级选项');
|
||||
a.search("and `pid`="+ad.id+"");
|
||||
//a.search("and `pid`="+ad.id+"");
|
||||
a.setparams({'pid':ad.id}, true);
|
||||
}
|
||||
if(d.lx==1){
|
||||
c.xiajili();
|
||||
@@ -123,9 +136,9 @@ $(document).ready(function(){
|
||||
this.showdwon(num);
|
||||
},
|
||||
clickwin:function(o, lx){
|
||||
var a = this.clicktypewin(false, 0);
|
||||
var as = this.clicktypewin(false, 0);
|
||||
optlx = 1;
|
||||
a.setValue('pid', nowid);
|
||||
as.setValue('pid', nowid);
|
||||
},
|
||||
clicktypeeidt:function(){
|
||||
var d = at.changedata;
|
||||
@@ -165,6 +178,8 @@ $(document).ready(function(){
|
||||
};
|
||||
js.initbtn(c);
|
||||
$('#optionview_{rand}').css('height',''+(viewheight-142)+'px');
|
||||
|
||||
option{rand} = c;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user