更新内容:

系统设置新增功能
1. 是否启用登录密码加密:
在许多现代系统中,登录密码加密是默认启用的,以确保用户密码的安全性。所以新增了一个系统配置项,允许管理员决定是否启用登录密码的加密传输。这一功能增强了用户密码的安全性,防止密码泄露风险。
2. UID登录(允许通过UID的方式登录验证):
引入UID(用户唯一标识符)登录方式,除了传统的用户名/邮箱/手机号登录外,用户还可以通过其UID进行登录验证,为系统访问提供另一种灵活的身份验证方式。
3. 用户在线时间更新时长:
管理员可以自定义更新用户在线时间的时间频率,这有助于更准确地反映用户的活跃状态,并对系统资源的使用进行优化。
4. 图片处理库类型:
系统新增了图片处理库类型的选择功能,允许管理员根据实际需求选择合适的图像处理库来处理缩略图和水印,以满足不同的性能和效果需求。
新增性能优化栏
1. 禁止浏览器缓冲:
通过此设置,管理员可以控制是否禁止浏览器对页面内容进行缓存。在某些场景下,禁用缓存可以提高页面的实时性和准确性。
2. 在线保持时间:
设置用户会话(session)的在线保持时间,即用户在不进行任何操作后,多久后会被视为离线。这有助于管理系统的会话资源,避免资源浪费。
3. 关闭session机制:   提供选项关闭系统的session管理机制。在某些特殊应用场景下,可能不需要使用session来跟踪用户状态,关闭session可以减少服务器负担,提高性能。
系统工具新增文件权限检查栏:    系统工具中新增了文件权限检查功能,帮助管理员快速识别和修复文件权限问题,确保系统的正常运行和数据安全。
优化提示消息框UI:
对系统的提示消息框进行了UI优化,使其更加美观、易用,提升了用户的使用体验。
压缩css、js代码优化前端性能
对前端的CSS和JS代码进行了压缩处理,减少了文件体积,加快了加载速度,从而提升了前端性能。
This commit is contained in:
小胡
2024-07-21 18:38:53 +08:00
Unverified
parent c8204e5730
commit 53be1fecb4
106 changed files with 508 additions and 90640 deletions

View File

@@ -143,7 +143,6 @@ if (!submitcheck('settingsubmit')) {
$replace = empty($_G['cache']['censor']['replace']) ? '*' : $_G['cache']['censor']['replace'];
}
} else {
$settingnew = $_GET['settingnew'];
if ($operation == 'basic') {
$settingnew['bbname'] = $settingnew['sitename'];
@@ -203,14 +202,14 @@ if (!submitcheck('settingsubmit')) {
}
} elseif ($operation == 'notification') {
$settingnew['notification'] = intval($settingnew['notification']);
}elseif ($operation == 'watermark') {
} elseif ($operation == 'cachethread') {
$settingnew['onlinehold'] = intval($settingnew['onlinehold']) > 0 ? intval($settingnew['onlinehold']) : 15;
} elseif ($operation == 'watermark') {
$settingnew['watermark'] = intval($settingnew['watermark']);
}
elseif ($operation == 'denlu') {
} elseif ($operation == 'denlu') {
$settingnew['numberoflogins'] = intval($settingnew['numberoflogins']);
$settingnew['forbiddentime'] = intval($settingnew['forbiddentime']);
}
elseif ($operation == 'access') {
} elseif ($operation == 'access') {
isset($settingnew['reglinkname']) && empty($settingnew['reglinkname']) && $settingnew['reglinkname'] = lang('register_immediately');
$settingnew['pwlength'] = intval($settingnew['pwlength']);
$settingnew['regstatus'] = intval($settingnew['regstatus']);
@@ -237,7 +236,7 @@ if (!submitcheck('settingsubmit')) {
if (empty($settingnew['strongpw'])) {
$settingnew['strongpw'] = array();
}
}elseif($operation == 'space'){//空间设置
} elseif($operation == 'space'){//空间设置
$group = $_GET['group'];
foreach ($group as $key => $value) {
C::t('usergroup_field') -> update(intval($key), array('maxspacesize' => intval($value['maxspacesize']), 'maxattachsize' => intval($value['maxattachsize']), 'attachextensions' => trim($value['attachextensions'])));
@@ -270,7 +269,7 @@ if (!submitcheck('settingsubmit')) {
}
}*/
}elseif ($operation == 'datetime') {
} elseif ($operation == 'datetime') {
if (isset($settingnew['timeformat'])) {
$settingnew['timeformat'] = $settingnew['timeformat'] == '24' ? 'H:i' : 'h:i A';
}
@@ -289,45 +288,45 @@ if (!submitcheck('settingsubmit')) {
$data = array('replace' => trim($_GET['replace']), 'words' => $_GET['badwords']);
savecache('censor', $data);
showmessage('do_success', dreferer());
}elseif ($operation == 'loginset') {
if ($back = trim($settingnew['loginset']['background'])) {
if (strpos($back, '#') === 0) {
$settingnew['loginset']['bcolor'] = $back;
} else {
$arr = explode('.', $back);
$ext = array_pop($arr);
if ($ext && in_array(strtolower($ext), array('jpg', 'jpeg', 'gif', 'png'))) {
$settingnew['loginset']['img'] = $back;
$settingnew['loginset']['bcolor'] = '';
} elseif ($operation == 'loginset') {
if ($back = trim($settingnew['loginset']['background'])) {
if (strpos($back, '#') === 0) {
$settingnew['loginset']['bcolor'] = $back;
} else {
$settingnew['loginset']['url'] = $back;
$settingnew['loginset']['bcolor'] = '';
$arr = explode('.', $back);
$ext = array_pop($arr);
if ($ext && in_array(strtolower($ext), array('jpg', 'jpeg', 'gif', 'png'))) {
$settingnew['loginset']['img'] = $back;
$settingnew['loginset']['bcolor'] = '';
} else {
$settingnew['loginset']['url'] = $back;
$settingnew['loginset']['bcolor'] = '';
}
}
} else {
$settingnew['loginset']['bcolor'] = '';
}
if ($back = trim($settingnew['loginset']['kbcolor'])) {
if (strpos($back, '#') === 0 || strpos($back, 'rgb') === 0) {
$settingnew['loginset']['kbcolor'] = $back;
}else {
$arr = explode('.', $back);
$ext = array_pop($arr);
if ($ext && in_array(strtolower($ext), array('jpg', 'jpeg', 'gif', 'png'))) {
$settingnew['loginset']['kbcolor'] = $back;
}else {
$settingnew['loginset']['kbcolor'] ='';
}
}
}
} else {
$settingnew['loginset']['bcolor'] = '';
}
if ($back = trim($settingnew['loginset']['kbcolor'])) {
if (strpos($back, '#') === 0 || strpos($back, 'rgb') === 0) {
$settingnew['loginset']['kbcolor'] = $back;
}else {
$arr = explode('.', $back);
$ext = array_pop($arr);
if ($ext && in_array(strtolower($ext), array('jpg', 'jpeg', 'gif', 'png'))) {
$settingnew['loginset']['kbcolor'] = $back;
}else {
$settingnew['loginset']['kbcolor'] ='';
}
if ($back = trim($settingnew['loginset']['transparency'])) {
if (strpos($back, '#') === 0 || strpos($back, 'rgb') === 0) {
$settingnew['loginset']['transparency'] = $back;
}else {
$settingnew['loginset']['transparency'] ='';
}
}
if ($back = trim($settingnew['loginset']['transparency'])) {
if (strpos($back, '#') === 0 || strpos($back, 'rgb') === 0) {
$settingnew['loginset']['transparency'] = $back;
}else {
$settingnew['loginset']['transparency'] ='';
}
}
}elseif ($operation == 'qywechat') {
} elseif ($operation == 'qywechat') {
switch($_GET['fbind']) {
case 'bind' :
$wechat = new qyWechat( array('appid' => $settingnew['CorpID'], 'appsecret' => $settingnew['CorpSecret']));
@@ -345,7 +344,6 @@ if (!submitcheck('settingsubmit')) {
break;
}
}
$updatecache = FALSE;
$settings = array();
foreach ($settingnew as $key => $val) {

View File

@@ -17,6 +17,9 @@
<li class="nav-item">
<a <!--{if $operation=='permgroup'}-->class="nav-link active"<!--{/if}-->href="{MOD_URL}&operation=permgroup">{lang permGroupSet}</a>
</li>
<li class="nav-item">
<a <!--{if $operation=='cachethread'}-->class="nav-link active"<!--{/if}-->href="{MOD_URL}&operation=cachethread">性能优化</a>
</li>
<li class="nav-item">
<a <!--{if $operation=='censor' }-->class="nav-link active"<!--{/if}-->href="{MOD_URL}&operation=censor">{lang words_management}</a>
</li>

View File

@@ -96,6 +96,10 @@
<li class="nav-item"> <a class="nav-link" href="{MOD_URL}&operation=notification">{lang Notification Settings}</a> </li>
<li class="nav-item"> <a class="nav-link" href="{MOD_URL}&operation=watermark">水印设置</a></li>
</ul>
<!--{elseif $operation=='cachethread'}-->
<ul class="nav nav-pills">
<li class="nav-item"> <a class="nav-link active" href="{MOD_URL}&operation=cachethread">{lang set}</a></li>
</ul>
<!--{elseif $operation=='at'}-->
<ul class="nav nav-pills">
<li class="nav-item"> <a class="nav-link" href="{MOD_URL}&operation=basic">{lang members_verify_base}</a> </li>
@@ -268,6 +272,20 @@
</ul>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">图片处理库类型</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="imagelib1" name="settingnew[imagelib]" value="0" <!--{if !$setting[imagelib]}-->checked="checked" <!--{/if}-->>
<label class="form-check-label" for="imagelib1">GD</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="imagelib2" name="settingnew[imagelib]" value="1" <!--{if $setting[imagelib]}-->checked="checked"<!--{/if}-->>
<label class="form-check-label" for="imagelib2">ImageMagick</label>
</div>
<span class="help-block">处理缩略图和水印的图像处理库。GD 是最广泛的处理库但是使用的系统资源较多。ImageMagick速度快系统资源占用少但安全性相对较差且需要服务器安装 ImageMagick 扩展。</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">{lang file_sharing}</label>
<div class="col-sm-10">
@@ -386,7 +404,66 @@
jQuery('#' + ctrlid + '_Menu').html(vals[0].path + ' ');
jQuery('#sel_' + ctrlid).val(vals[0].orgid);
}
</script>
</script>
<!--{elseif $operation=='cachethread'}-->
<form id="cpform" action="{MOD_URL}" class="form-horizontal-left" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="denlu" name="operation">
<div class="row mb-3">
<label class="col-sm-2">禁止浏览器缓冲</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="nocacheheaders1" name="settingnew[nocacheheaders]" value="1" <!--{if $setting[nocacheheaders]}-->checked<!--{/if}-->>
<label class="form-check-label" for="nocacheheaders1">{lang yes}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="nocacheheaders2" name="settingnew[nocacheheaders]" value="0" <!--{if !$setting[nocacheheaders]}-->checked<!--{/if}-->>
<label class="form-check-label" for="nocacheheaders2">{lang no}</label>
</div>
<span class="help-block">禁止浏览器对系统页面进行缓冲,可用于解决极个别浏览器内容刷新不正常的问题,会加重服务器负担。</span>
</div>
</div>
<div class="row mb-3">
<label for="onlinehold" class="col-sm-2">在线保持时间</label>
<div class="col-sm-10">
<div class="input-group mb-3">
<input type="text" class="form-control" id="onlinehold" name="settingnew[onlinehold]" <!--{if isset($setting['onlinehold'])}-->value="$setting[onlinehold]" <!--{/if}-->>
<span class="input-group-text">{lang minute}</span>
</div>
<ul class="help-block">
<li>请根据访问情况设置合理的数值,访问量大的站点应当调小该数值,设置范围<code>5 - 60</code>,过大或者过小的设置都有可能会增大服务器资源开销本。</li>
</ul>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">关闭session机制</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="sessionclose1" name="settingnew[sessionclose]" value="1" <!--{if $setting[sessionclose]}-->checked<!--{/if}-->>
<label class="form-check-label" for="sessionclose1">{lang yes}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="sessionclose2" name="settingnew[sessionclose]" value="0" <!--{if !$setting[sessionclose]}-->checked<!--{/if}-->>
<label class="form-check-label" for="sessionclose2">{lang no}</label>
</div>
<span class="help-block">关闭session机制以后可明显降低站点的服务器负担建议在线用户数超过2万时开启本功能。注意游客数和用户的在线时长将不再进行统计在线用户列表功能将不可用</span>
</div>
</div>
<dl>
<input class="btn btn-primary" id="submit_editsubmit" name="settingsubmit" value="{lang save_changes}" type="submit">
</dl>
</form>
<script type="text/javascript" src="static/lyear/js/bootstrap-touchspin/jquery.bootstrap-touchspin.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
// 初始化数值
$("#onlinehold").TouchSpin({
min: 5,
initval: 60,
max:60,
});
});
</script>
<!--{elseif $operation=='at'}-->
<form id="cpform" action="{MOD_URL}" class="form-horizontal-left" method="post" name="cpform" style="margin-top: 15px;">
<input type="hidden" value="{FORMHASH}" name="formhash">
@@ -500,7 +577,6 @@
<form id="cpform" action="{MOD_URL}" class="form-horizontal-left" method="post" name="cpform">
<input type="hidden" value="{FORMHASH}" name="formhash">
<input type="hidden" value="upload" name="operation">
<div class="row mb-3">
<label for="upload_file_ext" class="col-sm-2">{lang setting_main_suffix}</label>
<div class="col-sm-10">
@@ -630,53 +706,53 @@
<input type="hidden" value="loginset" name="operation">
<input type="hidden" value="1" name="settingnew[loginset][available]">
<div class="row mb-3">
<label class="col-sm-2" for="settingnew[loginset][title]">{lang main_title_page}</label>
<label class="col-sm-2" for="title">{lang main_title_page}</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="settingnew[loginset][title]" name="settingnew[loginset][title]" value="$setting[loginset][title]"/>
<input type="text" class="form-control" id="title" name="settingnew[loginset][title]" value="$setting[loginset][title]"/>
<span class="help-block">{lang main_title_page_state}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="settingnew[loginset][subtitle]">{lang page_subtitle}</label>
<label class="col-sm-2" for="subtitle">{lang page_subtitle}</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="settingnew[loginset][subtitle]" name="settingnew[loginset][subtitle]" value="$setting[loginset][subtitle]"/>
<input type="text" class="form-control" id="subtitle" name="settingnew[loginset][subtitle]" value="$setting[loginset][subtitle]"/>
<span class="help-block">{lang page_subtitle_state}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="settingnew[loginset][background]">{lang page_background}</label>
<label class="col-sm-2" for="background">{lang page_background}</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="settingnew[loginset][background]" name="settingnew[loginset][background]" value="$setting[loginset][background]"/>
<input type="text" class="form-control" id="background" name="settingnew[loginset][background]" value="$setting[loginset][background]"/>
<span class="help-block">{lang for_color_set}设置的图片或网站会同步到首页背景设置。</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="settingnew[loginset][kbcolor]">登录框背景</label>
<label class="col-sm-2" for="kbcolor">登录框背景</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="settingnew[loginset][kbcolor]" name="settingnew[loginset][kbcolor]" value="$setting[loginset][kbcolor]">
<input type="text" class="form-control" id="kbcolor" name="settingnew[loginset][kbcolor]" value="$setting[loginset][kbcolor]">
<span class="help-block">可以为颜色(如:#FFF);图片(以.jpeg,.jpg,.png结尾)。</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="settingnew[loginset][transparency]">输入框背景颜色</label>
<label class="col-sm-2" for="transparency">输入框背景颜色</label>
<div class="col-sm-10">
<input type="text" id="settingnew[loginset][transparency]" class="form-control" name="settingnew[loginset][transparency]" value="$setting[loginset][transparency]">
<input type="text" id="transparency" class="form-control" name="settingnew[loginset][transparency]" value="$setting[loginset][transparency]">
<span class="help-block">只能输入颜色(如:rgba(8, 169, 249, 0.57))</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="settingnew[loginset][lwaveanimation]">登录框水波动画</label>
<label class="col-sm-2" for="lwaveanimation">登录框水波动画</label>
<div class="col-sm-10">
<div class="form-check form-switch">
<input type="checkbox" name="settingnew[loginset][lwaveanimation]" id="settingnew[loginset][lwaveanimation]" class="form-check-input" <!--{if $setting[loginset][lwaveanimation]}-->checked="checked"<!--{/if}-->>
<input type="checkbox" name="settingnew[loginset][lwaveanimation]" id="lwaveanimation" class="form-check-input" <!--{if $setting[loginset][lwaveanimation]}-->checked="checked"<!--{/if}-->>
</div>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2" for="settingnew[loginset][lwaveanimation]">管理员登录按钮</label>
<label class="col-sm-2" for="adminlogin">管理员登录按钮</label>
<div class="col-sm-10">
<div class="form-check form-switch">
<input type="checkbox" name="settingnew[loginset][adminlogin]" id="settingnew[loginset][adminlogin]" class="form-check-input" <!--{if $setting[loginset][adminlogin]}-->checked="checked"<!--{/if}-->>
<input type="checkbox" name="settingnew[loginset][adminlogin]" id="adminlogin" class="form-check-input" <!--{if $setting[loginset][adminlogin]}-->checked="checked"<!--{/if}-->>
</div>
</div>
</div>
@@ -904,6 +980,46 @@
<span class="help-block">{lang How many login failures are allowed before you can log in again}</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">登录密码加密</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="pwdsafety1" name="settingnew[pwdsafety]" value="1" <!--{if $setting[pwdsafety]}-->checked<!--{/if}-->>
<label class="form-check-label" for="pwdsafety1">{lang enable}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="pwdsafety2" name="settingnew[pwdsafety]" value="0" <!--{if !$setting[pwdsafety]}-->checked<!--{/if}-->>
<label class="form-check-label" for="pwdsafety2">{lang no_enable}</label>
</div>
<span class="help-block">选择“启用”,系统登录时的密码将进行加密后再传输</span>
</div>
</div>
<div class="row mb-3">
<label class="col-sm-2">UID登录</label>
<div class="col-sm-10">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="uidlogin1" name="settingnew[uidlogin]" value="1" <!--{if $setting[uidlogin]}-->checked<!--{/if}-->>
<label class="form-check-label" for="uidlogin1">{lang enable}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="uidlogin2" name="settingnew[uidlogin]" value="0" <!--{if !$setting[uidlogin]}-->checked<!--{/if}-->>
<label class="form-check-label" for="uidlogin2">{lang no_enable}</label>
</div>
<span class="help-block">选择“启用”系统登录时允许通过UID的方式登录验证</span>
</div>
</div>
<div class="row mb-3">
<label for="oltimespan" class="col-sm-2">用户在线时间更新时长</label>
<div class="col-sm-10">
<div class="input-group mb-3">
<input type="text" class="form-control" id="oltimespan" name="settingnew[oltimespan]" <!--{if isset($setting['fileVersion'])}-->value="$setting[oltimespan]" <!--{/if}-->>
<span class="input-group-text">{lang minute}</span>
</div>
<ul class="help-block">
<li>本设置用以设定更新用户在线时间的时间频率。例如设置为<code>15</code>,则用户每在线<code>15分钟</code>更新一次记录。设置的值越小,则统计越精确,但消耗资源越大。建议设置为<code>530</code>范围内,<code>0</code>为不记录用户在线时间。</li>
</ul>
</div>
</div>
<dl>
<input class="btn btn-primary" id="submit_editsubmit" name="settingsubmit" value="{lang save_changes}" type="submit">
</dl>

View File

@@ -0,0 +1,65 @@
<?php
/*
* @copyright Leyun internet Technology(Shanghai)Co.,Ltd
* @license http://www.dzzoffice.com/licenses/license.txt
* @package DzzOffice
* @link http://www.dzzoffice.com
* @author zyx(zyx@dzz.cc)
*/
if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
include_once libfile('function/admin');
$oparr = array('updatecache', 'database', /*'security','patch','update',*/
'cron', 'log','fileperms');
$leftmenu = array();
$op = $_GET['op'];
foreach ($oparr as $key => $value) {
$leftmenu[$value] = array('title' => lang($value), 'active' => '');
if ($value == $op)
$leftmenu[$value]['active'] = 'class="nav-link active"';
}
$navtitle = lang('fileperms') . ' - ' . lang('appname');
$step = max(1, intval($_GET['step']));
if ($step == 1) {
} elseif ($step == 2) {
$type = implode('_', (array)$_GET['type']);
} elseif ($step == 3) {
$type = explode('_', $_GET['type']);
try {
$entryarray = array(
'data',
'data/attachment',
'data/attachment/album',
'data/attachment/category',
'data/attachment/common',
'data/attachment/forum',
'data/attachment/group',
'data/attachment/portal',
'data/attachment/profile',
'data/attachment/swfupload',
'data/attachment/temp',
'data/cache',
'data/log',
'data/template',
'data/threadcache',
'data/diy'
);
$result = '';
foreach($entryarray as $entry) {
$fullentry = DZZ_ROOT.'./'.$entry;
if(!is_dir($fullentry) && !file_exists($fullentry)) {
continue;
} else {
if(!dir_writeable($fullentry)) {
$result .= '<li class="list-group-item text-danger d-flex justify-content-between align-items-start"><div class="ms-2 me-auto"><div class="fw-bold">'.(is_dir($fullentry) ? lang('dir') : lang('file')).'./'.$entry.'</div></div><span class="badge bg-danger rounded-pill">无法写入</span></li>';
}
}
}
$result .= '<li class="list-group-item d-flex justify-content-between align-items-start"><div class="ms-2 me-auto"><div class="fw-bold">文件及目录属性全部正确</div></div><span class="badge bg-primary rounded-pill">都能写入</span></li>';
} catch (Exception $e) {
$result .= "<li class=\"list-group-item text-danger\">发生错误:".$e->getMessage()."</li>";
}
}
include template('fileperms');
?>

View File

@@ -13,5 +13,6 @@ $lang = array (
'user_growth_statistics'=>' User growth statistics',
'user_total'=>' total users ',
'add_users'=>' New user ',
'fileperms'=>'File permission check',
);
?>

View File

@@ -13,5 +13,6 @@ $lang = array (
'user_growth_statistics'=>'用户数据统计',
'user_total'=>'用户总数',
'add_users'=>'新增用户',
'fileperms'=>'文件权限检查',
);
?>

View File

@@ -0,0 +1,56 @@
<!--{template common/header_simple_start}-->
<script src="admin/scripts/admin.js?{VERHASH}"></script>
<!--{template common/header_simple_end}-->
<!--{template common/commer_header}-->
<div class="bs-container clearfix">
<div class="bs-left-container clearfix">
<!--{template left}-->
</div>
<div class="left-drager">
<div class="left-drager-op">
<div class="left-drager-sub"></div>
</div>
</div>
<div class="bs-main-container clearfix">
<div class="main-content">
<!--{if $step==1}-->
<form method="post" class="form-horizontal form-horizontal-left" action="{MOD_URLOP}&step=2">
<input name="formhash" value="{VERHASH}" type="hidden">
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label">主要检查文件及文件夹的写入权限,点击下面按钮开始进行检查</label>
</div>
<dl>
<input class="btn btn-primary" name="confirmed" value="确定" type="submit">
</dl>
</form>
<!--{elseif $step==2}-->
<div class="text-center" style="margin:20px 0;">
<h2 class="text-success ml20">正在进行文件权限检查,请稍候......</h2>
<div class="progress progress-striped active">
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:0%"><span class="sr-only">100% Complete</span></div>
</div>
</div>
<dl><a href="{MOD_URLOP}&step=3" class="btn btn-primary">{lang message_redirect}</a></dl>
<script type="text/javascript">
jQuery('.progress-bar').animate({ width: '100%' }, 2000, function() {
window.location.href = '{MOD_URLOP}&step=3';
});
</script>
<!--{elseif $step==3}-->
<!--{if $result}-->
<div class="alert alert-warning d-flex align-items-center" role="alert">
<i class="dzz dzz-error me-2 fs-5"></i>
<div>
如果某个文件或目录被检查到“无法写入”(以红色列出),请即刻通过 FTP 或其他工具修改其属性(例如设置为 777),以确保站点功能的正常使用。
</div>
</div>
<ol class="list-group list-group-numbered">
$result
</ol>
<!--{else}-->
<!--{/if}-->
<!--{/if}-->
</div>
</div>
</div>
<!--{template common/footer_simple}-->

View File

@@ -1,5 +1,5 @@
{eval
$oparr=array('updatecache','database','cron','systemupgrade','xtxx');
$oparr=array('updatecache','database','cron','systemupgrade','xtxx','fileperms');
$leftmenu=array();
foreach($oparr as $key => $value){
$leftmenu[$value]=array('title'=>lang($value),'active'=>'');

View File

@@ -19,7 +19,7 @@ if($do == 'phpinfo'){
$navtitle = lang('xtxx') . ' - ' . lang('appname');
$about['version']='V'.CORE_VERSION;//版本信息
$about['xhversion']='V'.CORE_XHVERSION;//版本信息
$about['XHFIXBUG']=CORE_XHFIXBUG;//更新日期
$about['XHFIXBUG']=CORE_XHRELEASE;//更新日期
function shuchu(){
define('ROOT_PATH', dirname(__FILE__));
$lang=array (