Skip to content

Commit

Permalink
Optimize code
Browse files Browse the repository at this point in the history
  • Loading branch information
icret committed Mar 7, 2024
1 parent bbcf8af commit ae92162
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 22 deletions.
Binary file removed install/README/1305032567.png
Binary file not shown.
Binary file removed install/README/2657944724.png
Binary file not shown.
Binary file removed install/README/3053540273.png
Binary file not shown.
Binary file removed install/README/674074848.png
Binary file not shown.
Binary file removed install/README/chmod.png
Binary file not shown.
Binary file removed install/README/info.png
Binary file not shown.
Binary file removed install/README/log.png
Binary file not shown.
22 changes: 11 additions & 11 deletions install/contorl.php
Expand Up @@ -6,7 +6,7 @@
}

if (isset($_POST['password'])) {
if ($_POST['password'] == $_POST['repassword']) {
if ($_POST['password'] === $_POST['repassword']) {

$config['password'] = hash('sha256', $_POST['password']);
$config['user'] = $_POST['user'];
Expand All @@ -27,11 +27,12 @@
$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) {
Expand All @@ -42,7 +43,7 @@

// 删除多余文件.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');
Expand All @@ -59,11 +60,10 @@
}
}
}
?>
<!-- 跳转主页 -->

// 跳转主页
echo '
<script>
window.alert("安装成功,即将为您跳转到登陆界面!");
location.href="../admin/index.php";
</script>
';
<script>
window.alert("安装成功,即将为您跳转到登陆界面!");
location.href = "../admin/index.php";
</script>
9 changes: 3 additions & 6 deletions install/install.php
Expand Up @@ -25,7 +25,7 @@
<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>
Expand Down Expand Up @@ -176,12 +176,9 @@ function(e) {
<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>

Expand Down
4 changes: 2 additions & 2 deletions public/static/viewjs/viewer.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions public/static/viewjs/viewer.min.js

Large diffs are not rendered by default.

0 comments on commit ae92162

Please sign in to comment.