发布v2.5.7版本

This commit is contained in:
雨中磐石
2023-05-11 16:19:42 +08:00
parent 8145b2df84
commit 8c2983b577
63 changed files with 1371 additions and 162 deletions

View File

@@ -369,7 +369,7 @@ return array(
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,hoemtimeout,usercache,xiangrecord,beianhao',',video_bool,');
if($stype==0)$msg = $this->saveconfig('title,imgcompress,watertype,video_bool,flowchehuitime,saasmode,hoemtimeout,usercache,xiangrecord,beianhao,locallang',',video_bool,');
return $msg;
}

View File

@@ -109,6 +109,9 @@ $(document).ready(function(){
}
o1.disabled=false;
},'post');
},
shengclang:function(){
js.open('?m=cogini&a=langcog&d=system',900,600);
}
};
js.initbtn(c);
@@ -175,6 +178,18 @@ $(document).ready(function(){
</td></tr>
<tr><td height="10"></td></tr>
<tr><td align="right" style="color:gray">系统语言:</td><td><select style="width:200px" name="locallang" class="form-control">
<?php
$arrd = c('lang')->getLocal();
foreach($arrd['arr'] as $k1=>$v1){
$sel = (LANG == $v1)?'selected':'';
echo '<option value="'.$v1.'" '.$sel.'>'.$arrd['arrcn'][$k1].'('.$v1.')</option>';
}
?>
</select>
<button click="shengclang" style="display:" class="btn btn-default btn-xs">语言包管理</button></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>

View File

@@ -94,6 +94,9 @@ $(document).ready(function(){
},
setphpini:function(){
js.open('?m=cogini&a=phpini&d=system');
},
shengclang:function(){
js.open('?m=cogini&a=langcog&d=system',900,600);
}
};
js.initbtn(c);
@@ -134,7 +137,8 @@ $(document).ready(function(){
</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>
<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>
@@ -151,7 +155,7 @@ $(document).ready(function(){
<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>
<font color="#888888">用于在线升级使用,看<a target="_blank" href="<?=URLY?>view_xhkey.html">[帮助]</a>获取</font>,<a href="javascript:;" onclick="$.imgview({url:'http://www.rockoa.com/images/keyhelp.png'})">[怎么获取?]</a></td>
</tr>
<tr>
@@ -186,7 +190,9 @@ $(document).ready(function(){
</td>
<td align="right">php.ini设置</td>
<td class="tdinput"><button click="setphpini" class="btn btn-default" type="button">去设置php.ini</button>&nbsp;<font color=#888888>设置上传大小</font></td>
<td class="tdinput"><button click="setphpini" class="btn btn-default" type="button">去设置php.ini</button>&nbsp;<font color=#888888>设置上传大小</font>
<button click="shengclang" style="display:" class="btn btn-default btn-xs">语言包管理</button>
</td>
</tr>

View File

@@ -53,4 +53,15 @@ class coginiClassAction extends Action
}
return '';
}
public $publicfile = 'include/langlocal/langtxt/';
public function langcogAction()
{
return '授权版可用';
}
}

View File

@@ -90,4 +90,28 @@ class menuClassAction extends Action
m('menu')->delete($id);
return returnsuccess();
}
public function createmenuAjax()
{
$pid = (int)$this->get('menuid','0');
$where =' and (`id`='.$pid.' or `pid`='.$pid.' or `pid` in(select `id` from `[Q]menu` where `pid`='.$pid.'))';
$rows = $this->db->getall('select *,(select count(1)from `[Q]menu` where `pid`=a.id '.$where.')stotal from `[Q]menu` a where 1=1 '.$where.' order by pid,`sort`');
$str = '';
$ors = m('menu')->getone($pid);
foreach($rows as $k=>$rs){
if($k>0)$str.=''.chr(10).'ROCKSPLIT'.chr(10).'';
$str.="INSERT INTO `[Q]menu` (`id`,`name`,`pid`,`sort`,`url`,`num`,`icons`,`type`,`ispir`) select '".$rs['id']."','".$rs['name']."','".$rs['pid']."','".$rs['sort']."',".$this->seveslst($rs['url']).",".$this->seveslst($rs['num']).",".$this->seveslst($rs['icons']).",'".$rs['type']."','".$rs['ispir']."' from `[Q]menu` WHERE `id`=1 and NOT EXISTS(SELECT 1 FROM `[Q]menu` where `id`='".$rs['id']."');";
//$str.=''.chr(10).'ROCKSPLIT'.chr(10).'';
//$str.="update `[Q]menu` set `name`='".$rs['name']."',`status`=1,`url`=".$this->seveslst($rs['url']).",`pid`='".$rs['pid']."',`sort`='".$rs['sort']."' where `id`='".$rs['id']."';";
}
$bh = $ors['num'];
if(isempt($bh))$bh=$ors['id'];
$num = 'menu'.$bh.'';
$this->rock->createtxt('upload/data/'.$num.'.txt', $str);
}
public function seveslst($v)
{
if($v===null)return 'null';
return "'".$v."'";
}
}

View File

@@ -5,7 +5,7 @@ $(document).ready(function(){
tablename:'menu',url:js.getajaxurl('data','{mode}','{dir}'),method:'get',loadtree:false,
tree:true,celleditor:!ISDEMO,bodyStyle:'height:'+(viewheight-70)+'px;overflow:auto',
columns:[{
text:'菜单名称',dataIndex:'name',align:'left',editor:true,renderstyle:function(v,d){
text:'名称',dataIndex:'name',align:'left',editor:true,renderstyle:function(v,d){
return 'min-width:220px';
}
},{
@@ -61,6 +61,7 @@ $(document).ready(function(){
var c = {
changed:function(){
a.setparams({pid:this.value},true);
if(get('editss_{rand}'))get('editss_{rand}').disabled = (this.value=='0')
},
del:function(){
a.del({url:js.getajaxurl('delmenu','{mode}','{dir}')});
@@ -75,30 +76,30 @@ $(document).ready(function(){
clickwin:function(o1,lx){
if(ISDEMO){js.msg('success','演示站点禁止操作');return;}
var h = $.bootsform({
title:'菜单',height:500,width:400,
title:lang('菜单'),height:500,width:400,
tablename:'menu',isedit:lx,
params:{int_filestype:'ispir,status,sort,pid,ishs'},
submitfields:'num,name,url,icons,ispir,status,sort,pid,ishs,color',
items:[{
labelText:'编号',name:'num',repEmpty:true
labelText:lang('编号'),name:'num',repEmpty:true
},{
labelText:'菜单名称',name:'name',required:true
labelText:lang('菜单')+lang('名称'),name:'name',required:true
},{
labelText:'URL地址',name:'url',repEmpty:true
labelText:'URL'+lang('地址')+'',name:'url',repEmpty:true
},{
labelText:'图标',name:'icons',repEmpty:true
labelText:lang('图标'),name:'icons',repEmpty:true
},{
labelText:'上级',name:'pid',required:true,value:'0',type:'number'
labelText:''+lang('上级')+'',name:'pid',required:true,value:'0',type:'number'
},{
name:'status',labelBox:'启用',type:'checkbox',checked:true
name:'status',labelBox:lang('启用'),type:'checkbox',checked:true
},{
name:'ispir',labelBox:'验证(未√就是任何人可使用菜单)',type:'checkbox',checked:true
},{
name:'ishs',labelBox:'显示在首页',type:'checkbox'
name:'ishs',labelBox:lang('显示在首页'),type:'checkbox'
},{
labelText:'颜色',name:'color',repEmpty:true
labelText:lang('颜色'),name:'color',repEmpty:true
},{
labelText:'序号',name:'sort',type:'number',value:'0'
labelText:lang('排序'),name:'sort',type:'number',value:'0'
}],
success:function(){
a.reload();
@@ -107,6 +108,12 @@ $(document).ready(function(){
if(lx==1)h.setValues(a.changedata);
h.getField('name').focus();
if(lx==2)h.setValue('pid', a.changedata.id);
},
createsql:function(){
js.loading('创建中...');
js.ajax(js.getajaxurl('createmenu','{mode}','{dir}'),{menuid:get('soupid_{rand}').value},function(){
js.msgok('创建成功');
});
}
};
js.initbtn(c);
@@ -121,10 +128,10 @@ $(document).ready(function(){
<td nowrap>
<button class="btn btn-primary" click="clickwin,0" type="button"><i class="icon-plus"></i> 新增顶级</button> &nbsp;
<button class="btn btn-success" click="clickwin,2" id="down_{rand}" disabled type="button"><i class="icon-plus"></i> 新增下级</button>&nbsp;
<button class="btn btn-default" click="reload" type="button">刷新</button>
<button class="btn btn-default" click="reload" type="button"><?=lang('刷新')?></button>
</td>
<td style="padding-left:10px">
<td style="padding-left:10px" nowrap>
<select class="form-control" style="width:150px" id="soupid_{rand}" >
<option value="0">-所有的菜单-</option>
</select>
@@ -135,12 +142,17 @@ $(document).ready(function(){
<button class="btn btn-default" click="search" type="button"><i class="icon-search"></i></button>
</span>
</div>-->
<?php
if(getconfig('systype')=='dev')echo ' &nbsp; <button class="btn btn-default" id="editss_{rand}" click="createsql" disabled type="button">生成菜单文件</button>';
?>
</td>
<td width="80%"></td>
<td align="right" nowrap>
<button class="btn btn-danger" id="del_{rand}" click="del" disabled type="button"><i class="icon-trash"></i> 删除</button> &nbsp;
<button class="btn btn-info" id="edit_{rand}" click="clickwin,1" disabled type="button"><i class="icon-edit"></i> 编辑 </button>
<button class="btn btn-danger" id="del_{rand}" click="del" disabled type="button"><i class="icon-trash"></i> <?=lang('删除')?></button> &nbsp;
<button class="btn btn-info" id="edit_{rand}" click="clickwin,1" disabled type="button"><i class="icon-edit"></i> <?=lang('编辑')?> </button>
</td>
</tr>
</table>