Optimize code

master
icret 2024-03-08 02:20:24 +08:00
parent bbcf8afb98
commit ae92162bb6
11 changed files with 19 additions and 22 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

View File

@ -6,7 +6,7 @@ if (file_exists(APP_ROOT . '/config/install.lock')) {
}
if (isset($_POST['password'])) {
if ($_POST['password'] == $_POST['repassword']) {
if ($_POST['password'] === $_POST['repassword']) {
$config['password'] = hash('sha256', $_POST['password']);
$config['user'] = $_POST['user'];
@ -27,11 +27,12 @@ if (isset($_POST['imgurl'])) {
$config_file = APP_ROOT . '/config/config.php';
cache_write($config_file, $config);
file_put_contents(APP_ROOT . '/config/install.lock', '安装程序锁定文件。'); // 创建安装程序锁
// 创建安装程序锁
file_put_contents(APP_ROOT . '/config/install.lock', '安装程序锁定文件。');
// 删除安装目录
if (isset($_POST['del_install'])) {
if ($_POST['del_install'] == "del") {
if ($_POST['del_install'] === "del") {
try {
@deldir(APP_ROOT . "/install");
} catch (Exception $e) {
@ -42,7 +43,7 @@ if (isset($_POST['del_install'])) {
// 删除多余文件.whitesource
if (isset($_POST['del_extra_files'])) {
if ($_POST['del_extra_files'] == "del") {
if ($_POST['del_extra_files'] === "del") {
try {
@unlink(APP_ROOT . '/LICENSE');
@unlink(APP_ROOT . '/README.md');
@ -59,11 +60,10 @@ if (isset($_POST['del_extra_files'])) {
}
}
}
?>
<!-- 跳转主页 -->
// 跳转主页
echo '
<script>
window.alert("安装成功,即将为您跳转到登陆界面!");
location.href="../admin/index.php";
</script>
';
<script>
window.alert("安装成功,即将为您跳转到登陆界面!");
location.href = "../admin/index.php";
</script>

View File

@ -25,7 +25,7 @@ if ($state !== 'checked') {
<link rel="shortcut icon" href="./../favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="./../public/static/zui/css/zui.min.css?v1.10.0">
<link rel="stylesheet" href="./../public/static/nprogress/nprogress.min.css?v1.10.0">
<script type="application/javascript" src="./../public/static/zui/lib/jquery/jquery-3.6.0.min.js?v3.4.1"></script>
<script type="application/javascript" src="./../public/static/zui/lib/jquery/jquery-3.6.4.min.js?v3.6.4"></script>
<script type="application/javascript" src="./../public/static/zui/js/zui.min.js?v1.10.0"></script>
<script type="application/javascript" src="./../public/static/qrcode/qrcode.min.js?v2.0"></script>
<script type="application/javascript" src="./../public/static/nprogress/nprogress.min.js"></script>
@ -176,12 +176,9 @@ if ($state !== 'checked') {
<hr>
<div>
<!-- 对话框触发按钮 -->
<a href="#" data-position="center" data-moveable="inside" data-moveable="true" data-toggle="modal" data-target="#myModal">
<i class="icon icon-qrcode"></i>二维码 </a>
<a href="#" data-position="center" data-moveable="inside" data-moveable="true" data-toggle="modal" data-target="#myModal"><i class="icon icon-qrcode"></i>二维码 </a>
</div>
<?php echo 'Copyright © 2018-' . date('Y'); ?>
<a href="https://png.cm/" target="_blank">EasyImage</a> By
<a href="https://blog.png.cm/902.html" target="_blank">Icret</a> Version:<a href="https://github.com/icret/EasyImages2.0" target="_blank"><?php echo APP_VERSION; ?></a>
<?php echo 'Copyright © 2018' . date('-Y'); ?> <a href="https://png.cm" target="_blank">EasyImage</a> By Icret Version:<a href="https://github.com/icret/EasyImages2.0" target="_blank"> <?php echo APP_VERSION; ?></a>
</footer>
</body>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long