发布v2.5.6版本
This commit is contained in:
@@ -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',',video_bool,');
|
||||
if($stype==0)$msg = $this->saveconfig('title,imgcompress,watertype,video_bool,flowchehuitime,saasmode,hoemtimeout,usercache,xiangrecord,beianhao',',video_bool,');
|
||||
|
||||
return $msg;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ $(document).ready(function(){
|
||||
|
||||
<div style="padding-top:20px">
|
||||
|
||||
<form id="tablstal0{rand}" name="form0_{rand}">
|
||||
<form id="tablstal0{rand}" name="form0_{rand}" autocomplete="off">
|
||||
<table cellspacing="0" border="0" cellpadding="0">
|
||||
|
||||
|
||||
@@ -171,6 +171,10 @@ $(document).ready(function(){
|
||||
<tr><td align="right" style="color:gray">详情页处理记录:</td><td><select style="width:200px" name="xiangrecord" class="form-control"><option value="">默认是关闭的</option><option <?php if(getconfig('xiangrecord')=='1')echo 'selected';?> value="1">展开处理记录</option></select></td></tr>
|
||||
<tr><td height="10"></td></tr>
|
||||
|
||||
<tr><td align="right" style="color:gray">登录页ICP/IP备案号:</td><td><input name="beianhao" type="text" value="<?=getconfig('beianhao')?>" style="width:200px" placeholder="不设置显示" class="form-control">
|
||||
</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> 保存</button> <span id="msgview0_{rand}"></span>
|
||||
|
||||
@@ -91,6 +91,9 @@ $(document).ready(function(){
|
||||
js.tanbody('color','选择主题颜色',310,200,{
|
||||
html:h
|
||||
});
|
||||
},
|
||||
setphpini:function(){
|
||||
js.open('?m=cogini&a=phpini&d=system');
|
||||
}
|
||||
};
|
||||
js.initbtn(c);
|
||||
@@ -182,6 +185,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> <font color=#888888>设置上传大小</font></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
56
webmain/system/cogini/coginiAction.php
Normal file
56
webmain/system/cogini/coginiAction.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
class coginiClassAction extends Action
|
||||
{
|
||||
|
||||
|
||||
public function phpiniAction()
|
||||
{
|
||||
}
|
||||
|
||||
public function phpinishowAction()
|
||||
{
|
||||
}
|
||||
|
||||
public function phpinisaveAction()
|
||||
{
|
||||
if(getconfig('systype')=='demo')return returnerror('演示禁止操作');
|
||||
$path = trim($this->post('path'));
|
||||
if(!$path || !file_exists($path))return returnerror('无权限设置,请找到对应文件修改'.$path.'');
|
||||
$cont = @file_get_contents($path);
|
||||
if(!$cont)return returnerror('无权限获取'.$path.'内容');
|
||||
$str = '';
|
||||
$conta= explode("\n", $cont);
|
||||
foreach($conta as $k=>$s){
|
||||
if($k>0)$str.=chr(10);
|
||||
$s2 = $s;
|
||||
$s1 = '';
|
||||
if($s){
|
||||
$s1 = $this->phpinisave($s,'upload_max_filesize');
|
||||
if(!$s1)$s1 = $this->phpinisave($s,'post_max_size');
|
||||
if(!$s1)$s1 = $this->phpinisave($s,'memory_limit');
|
||||
if(!$s1)$s1 = $this->phpinisave($s,'max_execution_time');
|
||||
if(!$s1)$s1 = $this->phpinisave($s,'max_input_vars');
|
||||
if(!$s1)$s1 = $this->phpinisave($s,'html_errors', false, 'On');
|
||||
if(!$s1)$s1 = $this->phpinisave($s,'error_log', true);
|
||||
if(!$s1)$s1 = $this->phpinisave($s,'upload_tmp_dir', true);
|
||||
}
|
||||
if($s1)$s2 = $s1;
|
||||
$str.=$s2;
|
||||
}
|
||||
$bo = @file_put_contents($path, $str);
|
||||
if(!$bo)return returnerror('无权限写入'.$path.'');
|
||||
return returnsuccess();
|
||||
}
|
||||
|
||||
private function phpinisave($s1,$key,$ybo=false,$sv='')
|
||||
{
|
||||
if(contain($s1,$key) && contain($s1,'=')){
|
||||
$val = trim($this->post($key));
|
||||
if(!$val)$val = $sv;
|
||||
if(!$val)return '';
|
||||
if($ybo)$val = '"'.$val.'"';
|
||||
return ''.$key.' = '.$val.'';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
}
|
||||
144
webmain/system/cogini/tpl_cogini_phpini.html
Normal file
144
webmain/system/cogini/tpl_cogini_phpini.html
Normal file
@@ -0,0 +1,144 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>设置php.ini</title>
|
||||
<link rel="stylesheet" type="text/css" href="<?=$da['p']?>/css/css.css"/>
|
||||
<script type="text/javascript" src="js/jquery.js"></script>
|
||||
<script type="text/javascript" src="js/js.js"></script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<script>
|
||||
var path = '';
|
||||
function showinit(str){
|
||||
str = strreplace(str);
|
||||
$('#phpinipath').html(str);
|
||||
path = str;
|
||||
}
|
||||
|
||||
function save(o1){
|
||||
var da = js.getformdata();
|
||||
da.path = path;
|
||||
js.setmsg('保存中...');
|
||||
o1.disabled = true;
|
||||
js.ajax('?m=cogini&a=phpinisave&d=system', da, function(ret){
|
||||
if(ret.success){
|
||||
js.setmsg('保存成功,需要重启服务才能生效','green');
|
||||
}else{
|
||||
js.setmsg(ret.msg);
|
||||
}
|
||||
o1.disabled = false;
|
||||
},'post,json');
|
||||
|
||||
}
|
||||
function changeval(o1,lx){
|
||||
var val = o1.value;
|
||||
if(val)form(lx).value = val;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
<div align="center" style="padding:10px">
|
||||
<form name="myform">
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><b>设置php.ini谨慎设置</b></td>
|
||||
</tr>
|
||||
<tr><td height="10"></td></tr>
|
||||
<tr>
|
||||
<td align="right" style="padding-right:8px;color:#888888">php.ini的路径</td>
|
||||
<td align="left" id="phpinipath"></td>
|
||||
</tr>
|
||||
|
||||
<tr><td height="10"></td></tr>
|
||||
<tr>
|
||||
<td align="right" style="padding-right:8px;color:#888888">上传大小<br>upload_max_filesize</td>
|
||||
<td align="left">
|
||||
<input class="input" name="upload_max_filesize" style="width:100px" value="<?=ini_get('upload_max_filesize')?>"><select class="input" onchange="changeval(this,'upload_max_filesize')">
|
||||
<option value="">选择</option>
|
||||
<option value="128M">128M</option>
|
||||
<option value="512M">512M</option>
|
||||
<option value="1024M">1024M</option>
|
||||
<option value="2048M">2048M</option>
|
||||
<option value="4056M">4056M</option>
|
||||
<option value="8112M">8112M</option>
|
||||
<option value="16224M">16G</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td height="10"></td></tr>
|
||||
<tr>
|
||||
<td align="right" style="padding-right:8px;color:#888888">最大提交大小<br>post_max_size</td>
|
||||
<td align="left"><input class="input" name="post_max_size" style="width:100px" value="<?=ini_get('post_max_size')?>"><select class="input" onchange="changeval(this,'post_max_size')">
|
||||
<option value="">选择</option>
|
||||
<option value="128M">128M</option>
|
||||
<option value="512M">512M</option>
|
||||
<option value="1024M">1024M</option>
|
||||
<option value="2048M">2048M</option>
|
||||
<option value="4056M">4056M</option>
|
||||
<option value="8112M">8112M</option>
|
||||
<option value="16224M">16G</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td height="10"></td></tr>
|
||||
<tr>
|
||||
<td align="right" style="padding-right:8px;color:#888888">运行内存大小<br>memory_limit</td>
|
||||
<td align="left"><input class="input" name="memory_limit" style="width:100px" value="<?=ini_get('memory_limit')?>"><select class="input" onchange="changeval(this,'memory_limit')">
|
||||
<option value="">选择</option>
|
||||
<option value="128M">128M</option>
|
||||
<option value="512M">512M</option>
|
||||
<option value="1024M">1024M</option>
|
||||
<option value="2048M">2048M</option>
|
||||
<option value="4056M">4056M</option>
|
||||
<option value="8112M">8112M</option>
|
||||
<option value="16224M">16G</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td height="10"></td></tr>
|
||||
<tr>
|
||||
<td align="right" style="padding-right:8px;color:#888888">运行超时时间<br>max_execution_time</td>
|
||||
<td align="left"><input class="input" name="max_execution_time" style="width:80px" value="<?=ini_get('max_execution_time')?>"> 秒</td>
|
||||
</tr>
|
||||
|
||||
<tr><td height="10"></td></tr>
|
||||
<tr>
|
||||
<td align="right" style="padding-right:8px;color:#888888">最大POST参数<br>max_input_vars</td>
|
||||
<td align="left"><input class="input" name="max_input_vars" style="width:80px" value="<?=ini_get('max_input_vars')?>"> 个</td>
|
||||
</tr>
|
||||
|
||||
<tr><td height="10"></td></tr>
|
||||
<tr>
|
||||
<td align="right" style="padding-right:8px;color:#888888">记录php错误文件<br>error_log</td>
|
||||
<td align="left"><textarea class="textarea" style="height:60px" name="error_log" value=""><?=ini_get('error_log')?></textarea> </td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td height="10"></td></tr>
|
||||
<tr>
|
||||
<td align="right" style="padding-right:8px;color:#888888">上传文件临时目录<br>upload_tmp_dir</td>
|
||||
<td align="left"><textarea class="textarea" style="height:50px" name="upload_tmp_dir" value=""><?=ini_get('upload_tmp_dir')?></textarea> </td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td height="10"></td></tr>
|
||||
<tr>
|
||||
<td align="right" style="padding-right:8px;color:#888888"></td>
|
||||
<td align="left"><input class="webbtn" onclick="save(this)" value="保存" type="button"> <span id="msgview"></span></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<iframe style="display:none" src="?m=cogini&a=phpinishow&d=system"></iframe>
|
||||
</body>
|
||||
</html>
|
||||
16
webmain/system/cogini/tpl_cogini_phpinishow.html
Normal file
16
webmain/system/cogini/tpl_cogini_phpinishow.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
phpinfo();
|
||||
?>
|
||||
<script src="js/jquery.js"></script>
|
||||
<script>
|
||||
var obj = $('.v');
|
||||
var len = obj.length,o1,i,v;
|
||||
for(i=0;i<len;i++){
|
||||
o1 = $(obj[i]);
|
||||
v = o1.html();
|
||||
if(v.indexOf('php.ini')>-1){
|
||||
parent.showinit(v);
|
||||
break;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user