* 2023-01-21 v2.6.9 Happy New Year
- 修复BMP格式无法增加水印(不建议开启,非常耗时)
- 修复上传用户组会串联变成管理员权限 [#61](https://github.com/icret/EasyImages2.0/issues/61)
- 增加了上传提示和登录提示
- 增加自定义存储分类路径 设置方法参考 [PHP date() 函数](https://www.runoob.com/php/php-date.html)
- 更改后台部分管理设置的位置
- 优化操作逻辑和信息提示
This commit is contained in:
icret
2023-01-21 11:56:00 +08:00
committed by GitHub
parent cbaf3a30ae
commit 9af638a2bd
18 changed files with 404 additions and 268 deletions

View File

@@ -63,36 +63,26 @@ if ($config['captcha']) {
// 提交登录
if (isset($_POST['password']) and isset($_POST['user'])) {
global $guestConfig;
$postUser = strip_tags($_POST['user']);
$postPWD = strip_tags($_POST['password']);
$login = _login($_POST['user'], $_POST['password']);
$login = json_decode($login, true);
if ($postUser == $config['user'] || in_array($guestConfig[$postUser], $guestConfig)) {
if ($postPWD == $config['password'] || $postPWD == $guestConfig[$postUser]['password']) {
// 将账号密码序列化后存储
$setCOK = serialize(array($postUser, $postPWD));
setcookie('auth', $setCOK, time() + 3600 * 24 * 14, '/');
echo '
<script>
new $.zui.Messager("登录成功", {type: "primary" // 定义颜色主题
}).show();
</script>';
header("refresh:2;url=" . $config['domain'] . "");
} else {
echo '
<script>
new $.zui.Messager("密码错误", {type: "danger" // 定义颜色主题
}).show();
</script>';
header("refresh:2;");
}
if ($login['code'] == 200) {
echo '
<script>
new $.zui.Messager("' . $login["messege"] . '" , {
type: "primary", // 定义颜色主题
icon: "check" // 定义消息图标
}).show();
</script>';
header("refresh:2;url=" . $config['domain'] . "");
} else {
echo '
<script>
new $.zui.Messager("账号不存在", {type: "danger" // 定义颜色主题
<script>
new $.zui.Messager("' . $login["messege"] . '" , {
type: "danger", // 定义颜色主题
icon: "times" // 定义消息图标
}).show();
</script>';
</script>';
header("refresh:2;");
}
}
@@ -109,8 +99,8 @@ if (isset($_POST['password']) and isset($_POST['user'])) {
</h4>
</div>
<div class="modal-body">
<p class="text-primary">忘记账号可以打开<code>/config/config.php</code>文件找到user对应的键值->填入</p>
<p class="text-success">忘记密码请将密码转换成MD5小写(<a href="<?php echo $config['domain'] . '/application/md5.php'; ?>" target="_blank" class="text-purple">转换网址</a>)->打开<code>/config/config.php</code>文件->找到password对应的键值->填入</p>
<p class="text-primary">忘记账号可以打开<code>/config/config.php</code>文件找到<code data-toggle="tooltip" title="'user'=><strong>admin</strong>'">user</code>对应的键值->填入</p>
<p class="text-success">忘记密码请将密码转换成MD5小写(<a href="<?php echo $config['domain'] . '/application/md5.php'; ?>" target="_blank" class="text-purple">转换网址</a>)->打开<code>/config/config.php</code>文件->找到<code data-toggle="tooltip" title="'password'=>'<strong>e6e0612609</strong>'">password</code>对应的键值->填入</p>
<h4 class="text-danger">更改后会立即生效并重新登录,请务必牢记账号和密码! </h4>
</div>
<div class="modal-footer">
@@ -133,12 +123,12 @@ if (isset($_POST['password']) and isset($_POST['user'])) {
<input type="password" name="password" id="password" class="form-control" value="" placeholder="输入登录密码" autocomplete="off" required="required">
<input type="hidden" name="password" id="md5_password">
<?php if ($config['captcha']) : ?>
<input class="form-control" type="text" name="code" value="" placeholder="输入下方4位数验证码" autocomplete="off" required="required" />
<div class="form-group">
<div class="col">
<label><img src="../application/captcha.php" onClick="this.src='../application/captcha.php?nocache='+Math.random()" title="点击换一张" /></label>
<input class="form-control" type="text" name="code" value="" placeholder="输入下方4位数验证码" autocomplete="off" required="required" />
<div class="form-group">
<div class="col">
<label><img src="../application/captcha.php" onClick="this.src='../application/captcha.php?nocache='+Math.random()" title="点击换一张" /></label>
</div>
</div>
</div>
<?php endif; ?>
<button type="submit" class="btn btn-block btn-primary">登 录</button>
<p class="signup">忘记账号或密码请查看<a href="#fogot" data-moveable="inside" data-remember-pos="false" data-toggle="modal" data-target="#fogot" data-position="center">帮助信息</a></p>