更新 v1.8.0

This commit is contained in:
LyLme 2024-01-09 15:59:25 +08:00
parent 419d154f11
commit 43f3cc5220
5 changed files with 69 additions and 50 deletions

View File

@ -1,21 +1,41 @@
<?php include("../include/common.php"); ?> <?php include("../include/common.php"); ?>
<html lang="zh-cn"> <html lang="zh-cn">
<head>
<meta charset="UTF-8">
<title>关于 - <?php echo explode("-", $conf['title'])[0];?></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link href="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/docsify/4.12.2/themes/vue.min.css" type="text/css" rel="stylesheet">
<style>body:not(.ready){overflow:auto!important}#main{max-width:90%}p.footer{margin-top:60px}p.footer a{text-decoration:none}</style>
</head>
<body>
<div class="markdown-section" id="main"> <head>
<?php <meta charset="UTF-8">
echo($conf['about']); <title>关于 - <?php echo explode("-", $conf['title'])[0]; ?></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link href="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/docsify/4.12.2/themes/vue.min.css" type="text/css" rel="stylesheet">
<style>
body:not(.ready) {
overflow: auto !important
}
#main {
max-width: 90%
}
p.footer {
margin-top: 60px
}
p.footer a {
text-decoration: none
}
</style>
</head>
<body>
<div class="markdown-section" id="main">
<?php
echo($conf['about_content']);
?> ?>
<center>
<center><p class="footer"><?php echo $conf['copyright']?></p></center> <p class="footer"><?php echo $conf['copyright'] ?></p>
</div> </center>
</div>
</body> </body>
</html> </html>

View File

@ -3,13 +3,13 @@ $title = '关于页面设置';
include './head.php'; include './head.php';
if ($_GET['set'] == 'conf_submit') { if ($_GET['set'] == 'conf_submit') {
$about = $_POST['about']; $about = $_POST['about'];
saveSetting('about', $about); saveSetting('about_content', $about);
echo '<script>alert("修改成功!");window.location.href="./about.php";</script>'; echo '<script>alert("修改成功!");window.location.href="./about.php";</script>';
exit(); exit();
} }
if ($_GET['set'] == 'default') { if ($_GET['set'] == 'default') {
saveSetting('about', "<h3>关于本站</h3>\r\n<p>感谢来访,本站致力于简洁高效的上网导航和搜索入口,安全快捷。</p>\r\n<p>如果您喜欢我们的网站,请将本站添加到收藏夹(快捷键<code>Ctrl+D</code>),并<a href=\"https://jingyan.baidu.com/article/4dc40848868eba89d946f1c0.html\" target=\"_blank\">设为浏览器主页</a>,方便您的下次访问,感谢支持。<p>\r\n<hr>\r\n<h3>本站承诺</h3>\r\n<p><strong>绝对不会收集用户的隐私信息</strong><p>\r\n<p>区别于部分导航网站,本站链接直接跳转目标,不会对链接处理再后跳转,不会收集用户的隐藏信息,包括但不限于点击记录,访问记录和搜索记录,请放心使用</p>\r\n<hr>\r\n<h3>申请收录</h3>\r\n<p>请点<a href=\"../apply\" target=\"_blank\">这里</a></p>\r\n<hr>\r\n<h3>联系我们</h3>\r\n<p>若您在使用本站时遇到了包括但不限于以下问题:</p>\r\n<li>图标缺失</li>\r\n<li>目标网站无法打开</li>\r\n<li>描述错误</li>\r\n<li>网站违规</li>\r\n<li>收录加急处理</li>\r\n<li>链接删除</li>\r\n<p><strong>请发邮件与我们联系</strong></p>\r\n<h5>联系邮箱</h5>\r\n<p><a href=\"mailto:无\">无</a></p>\r\n<h5>联系说明</h5>\r\n<p>为了您的问题能快速被处理,建议在邮件主题添加【反馈】【投诉】【推荐】【友链】</p>"); saveSetting('about_content', "<h3>关于本站</h3>\r\n<p>感谢来访,本站致力于简洁高效的上网导航和搜索入口,安全快捷。</p>\r\n<p>如果您喜欢我们的网站,请将本站添加到收藏夹(快捷键<code>Ctrl+D</code>),并<a href=\"https://jingyan.baidu.com/article/4dc40848868eba89d946f1c0.html\" target=\"_blank\">设为浏览器主页</a>,方便您的下次访问,感谢支持。<p>\r\n<hr>\r\n<h3>本站承诺</h3>\r\n<p><strong>绝对不会收集用户的隐私信息</strong><p>\r\n<p>区别于部分导航网站,本站链接直接跳转目标,不会对链接处理再后跳转,不会收集用户的隐藏信息,包括但不限于点击记录,访问记录和搜索记录,请放心使用</p>\r\n<hr>\r\n<h3>申请收录</h3>\r\n<p>请点<a href=\"../apply\" target=\"_blank\">这里</a></p>\r\n<hr>\r\n<h3>联系我们</h3>\r\n<p>若您在使用本站时遇到了包括但不限于以下问题:</p>\r\n<li>图标缺失</li>\r\n<li>目标网站无法打开</li>\r\n<li>描述错误</li>\r\n<li>网站违规</li>\r\n<li>收录加急处理</li>\r\n<li>链接删除</li>\r\n<p><strong>请发邮件与我们联系</strong></p>\r\n<h5>联系邮箱</h5>\r\n<p><a href=\"mailto:无\">无</a></p>\r\n<h5>联系说明</h5>\r\n<p>为了您的问题能快速被处理,建议在邮件主题添加【反馈】【投诉】【推荐】【友链】</p>");
echo '<script>alert("恢复默认成功!");window.location.href="./about.php";</script>'; echo '<script>alert("恢复默认成功!");window.location.href="./about.php";</script>';
exit(); exit();
} }
@ -31,7 +31,7 @@ if ($_GET['set'] == 'default') {
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="about">关于页内容</label> <label for="about">关于页内容</label>
<textarea width="200px" type="text" rows="20" class="form-control" name="about" placeholder="显示在关于页面的内容"><?php echo($conf['about']); ?></textarea> <textarea width="200px" type="text" rows="20" class="form-control" name="about" placeholder="显示在关于页面的内容"><?php echo($conf['about_content']); ?></textarea>
<small class="help-block">显示在关于页面的内容<code>使用HTML代码编写</code></small> <small class="help-block">显示在关于页面的内容<code>使用HTML代码编写</code></small>
工具:<a href="https://www.lylme.com/html/" target="_blank">在线MD编辑器</a> 编辑后复制html代码粘贴 工具:<a href="https://www.lylme.com/html/" target="_blank">在线MD编辑器</a> 编辑后复制html代码粘贴
</div> </div>

View File

@ -1,6 +1,6 @@
<?php <?php
if(empty(constant("VERSION"))) { if (empty(constant("VERSION"))) {
return 0; return 0;
} }
function get_vernum($version) function get_vernum($version)
@ -11,14 +11,14 @@ function get_vernum($version)
} }
$sqlvn = get_vernum($conf['version']); //数据库版本 $sqlvn = get_vernum($conf['version']); //数据库版本
$filevn = get_vernum(constant("VERSION")); // 文件版本 $filevn = get_vernum(constant("VERSION")); // 文件版本
if($sqlvn < $filevn) { if ($sqlvn < $filevn) {
//文件版本大于数据库版本执行更新 //文件版本大于数据库版本执行更新
$sql = ''; $sql = '';
if($sqlvn < 10101) { if ($sqlvn < 10101) {
$version = 'v1.1.1'; $version = 'v1.1.1';
$sql = $sql . file_get_contents(ROOT . 'install/data/update.sql'); $sql = $sql . file_get_contents(ROOT . 'install/data/update.sql');
} }
if($sqlvn < 10103) { if ($sqlvn < 10103) {
$version = 'v1.1.3'; $version = 'v1.1.3';
@unlink(ROOT . 'include/head.php'); @unlink(ROOT . 'include/head.php');
@unlink(ROOT . 'include/home.php'); @unlink(ROOT . 'include/home.php');
@ -26,49 +26,49 @@ if($sqlvn < $filevn) {
@unlink(ROOT . 'include/footer.php'); @unlink(ROOT . 'include/footer.php');
$sql = $sql . file_get_contents(ROOT . 'install/data/update1.sql'); $sql = $sql . file_get_contents(ROOT . 'install/data/update1.sql');
} }
if($sqlvn < 10104) { if ($sqlvn < 10104) {
$version = 'v1.1.4'; $version = 'v1.1.4';
} }
if($sqlvn < 10105) { if ($sqlvn < 10105) {
$version = 'v1.1.5'; $version = 'v1.1.5';
$sql = $sql . file_get_contents(ROOT . 'install/data/update2.sql'); $sql = $sql . file_get_contents(ROOT . 'install/data/update2.sql');
} }
if($sqlvn < 10106) { if ($sqlvn < 10106) {
$version = 'v1.1.6'; $version = 'v1.1.6';
$sql = $sql . file_get_contents(ROOT . 'install/data/update3.sql'); $sql = $sql . file_get_contents(ROOT . 'install/data/update3.sql');
} }
if($sqlvn < 10109) { if ($sqlvn < 10109) {
$version = 'v1.1.9'; $version = 'v1.1.9';
$sql = $sql . file_get_contents(ROOT . 'install/data/update4.sql'); $sql = $sql . file_get_contents(ROOT . 'install/data/update4.sql');
} }
if($sqlvn < 10200) { if ($sqlvn < 10200) {
$version = 'v1.2.0'; $version = 'v1.2.0';
$sql = $sql . file_get_contents(ROOT . 'install/data/update5.sql'); $sql = $sql . file_get_contents(ROOT . 'install/data/update5.sql');
} }
if($sqlvn < 10205) { if ($sqlvn < 10205) {
$version = 'v1.2.5'; $version = 'v1.2.5';
} }
if($sqlvn < 10300) { if ($sqlvn < 10300) {
$version = 'v1.3.0'; $version = 'v1.3.0';
} }
if($sqlvn < 10304) { if ($sqlvn < 10304) {
$version = 'v1.3.4'; $version = 'v1.3.4';
} }
if($sqlvn < 10500) { if ($sqlvn < 10500) {
$version = 'v1.5.0'; $version = 'v1.5.0';
} }
if($sqlvn < 10501) { if ($sqlvn < 10501) {
$version = 'v1.5.1'; $version = 'v1.5.1';
$sql = $sql . file_get_contents(ROOT . 'install/data/update6.sql'); $sql = $sql . file_get_contents(ROOT . 'install/data/update6.sql');
} }
if($sqlvn < 10600) { if ($sqlvn < 10600) {
$version = 'v1.6.0'; $version = 'v1.6.0';
$sql = $sql . file_get_contents(ROOT . 'install/data/update7.sql'); $sql = $sql . file_get_contents(ROOT . 'install/data/update7.sql');
} }
if($sqlvn < 10700) { if ($sqlvn < 10700) {
$version = 'v1.7.0'; $version = 'v1.7.0';
} }
if($sqlvn < 10800) { if ($sqlvn < 10800) {
$version = 'v1.8.0'; $version = 'v1.8.0';
$sql = $sql . file_get_contents(ROOT . 'install/data/update8.sql'); $sql = $sql . file_get_contents(ROOT . 'install/data/update8.sql');
if (!isset($conf['md5pass'])) { if (!isset($conf['md5pass'])) {
@ -77,29 +77,27 @@ if($sqlvn < $filevn) {
$DB->query("INSERT INTO `lylme_config` (`k`, `v`, `description`) VALUES ('md5pass', '1', '启用md5加密密码');"); $DB->query("INSERT INTO `lylme_config` (`k`, `v`, `description`) VALUES ('md5pass', '1', '启用md5加密密码');");
saveSetting('admin_pwd', $admin_pwd); saveSetting('admin_pwd', $admin_pwd);
} }
} }
if($sqlvn < 10805) { if ($sqlvn < 10805) {
$version = 'v1.8.5'; $version = 'v1.8.5';
if (!isset($conf['about'])) { if (!isset($conf['about'])) {
$DB->query("INSERT INTO `lylme_config` (`k`, `v`, `description`) VALUES ('about', '1', '新版关于页面');");
$about_file = ROOT . 'about/about.txt'; $about_file = ROOT . 'about/about.txt';
if(file_exists($about_file)) { if (file_exists($about_file)) {
$about_content = daddslashes(file_get_contents($about_file)); $about_content = str_replace(PHP_EOL, '\r\n', daddslashes(file_get_contents($about_file)));
$about_content = str_replace(PHP_EOL, '\r\n', $about_content); $about = " INSERT INTO `lylme_config` (`k`, `v`, `description`) VALUES ('about_content', '$about_content', '关于页面');";
$about = "INSERT INTO `lylme_config` (`id`, `k`, `v`, `description`) VALUES (NULL, 'about', '$about_content', '关于页面');"; $DB->query($about);
@unlink(ROOT . 'about/说明.txt');
} }
$DB->query($about);
@unlink(ROOT . 'about/说明.txt');
} }
} }
$sql = explode(';', $sql); $sql = explode(';', $sql);
for ($i = 0;$i < count($sql);$i++) { for ($i = 0; $i < count($sql); $i++) {
if (trim($sql[$i]) == '') { if (trim($sql[$i]) == '') {
continue; continue;
} }
if($DB->query($sql[$i])) { if ($DB->query($sql[$i])) {
} }
} }
saveSetting('version', $version); saveSetting('version', $version);

View File

@ -46,12 +46,13 @@ INSERT INTO `lylme_config` VALUES
(15, 'template', 'default', '网站模板'), (15, 'template', 'default', '网站模板'),
(16, 'wztj', '', '网站统计代码(自定义footer)'), (16, 'wztj', '', '网站统计代码(自定义footer)'),
(17, 'tq', 'true', '天气显示开关'), (17, 'tq', 'true', '天气显示开关'),
(18, 'version', 'v1.8.0', '程序版本'), (18, 'version', 'v1.8.5', '程序版本'),
(19, 'wap_background', NULL, '手机端背景'), (19, 'wap_background', NULL, '手机端背景'),
(20, 'wxplus', '', '微信推送密钥'), (20, 'wxplus', '', '微信推送密钥'),
(21, 'wxplustime', '20:00', '微信推送时间'), (21, 'wxplustime', '20:00', '微信推送时间'),
(22, 'yan', 'true', '随机一言开关'), (22, 'yan', 'true', '随机一言开关'),
(23, 'about', '<h3>关于本站</h3>\r\n<p>感谢来访,本站致力于简洁高效的上网导航和搜索入口,安全快捷。</p>\r\n<p>如果您喜欢我们的网站,请将本站添加到收藏夹(快捷键<code>Ctrl+D</code>),并<a href=\"https://jingyan.baidu.com/article/4dc40848868eba89d946f1c0.html\" target=\"_blank\">设为浏览器主页</a>,方便您的下次访问,感谢支持。<p>\r\n<hr>\r\n<h3>本站承诺</h3>\r\n<p><strong>绝对不会收集用户的隐私信息</strong><p>\r\n<p>区别于部分导航网站,本站链接直接跳转目标,不会对链接处理再后跳转,不会收集用户的隐藏信息,包括但不限于点击记录,访问记录和搜索记录,请放心使用</p>\r\n<hr>\r\n<h3>申请收录</h3>\r\n<p>请点<a href=\"../apply\" target=\"_blank\">这里</a></p>\r\n<hr>\r\n<h3>联系我们</h3>\r\n<p>若您在使用本站时遇到了包括但不限于以下问题:</p>\r\n<li>图标缺失</li>\r\n<li>目标网站无法打开</li>\r\n<li>描述错误</li>\r\n<li>网站违规</li>\r\n<li>收录加急处理</li>\r\n<li>链接删除</li>\r\n<p><strong>请发邮件与我们联系</strong></p>\r\n<h5>联系邮箱</h5>\r\n<p><a href=\"mailto:无\">无</a></p>\r\n<h5>联系说明</h5>\r\n<p>为了您的问题能快速被处理,建议在邮件主题添加【反馈】【投诉】【推荐】【友链】</p>', '关于页面'); (23, 'about', '1', '新版关于页面'),
(24, 'about_content', '<h3>关于本站</h3>\r\n<p>感谢来访,本站致力于简洁高效的上网导航和搜索入口,安全快捷。</p>\r\n<p>如果您喜欢我们的网站,请将本站添加到收藏夹(快捷键<code>Ctrl+D</code>),并<a href=\"https://jingyan.baidu.com/article/4dc40848868eba89d946f1c0.html\" target=\"_blank\">设为浏览器主页</a>,方便您的下次访问,感谢支持。<p>\r\n<hr>\r\n<h3>本站承诺</h3>\r\n<p><strong>绝对不会收集用户的隐私信息</strong><p>\r\n<p>区别于部分导航网站,本站链接直接跳转目标,不会对链接处理再后跳转,不会收集用户的隐藏信息,包括但不限于点击记录,访问记录和搜索记录,请放心使用</p>\r\n<hr>\r\n<h3>申请收录</h3>\r\n<p>请点<a href=\"../apply\" target=\"_blank\">这里</a></p>\r\n<hr>\r\n<h3>联系我们</h3>\r\n<p>若您在使用本站时遇到了包括但不限于以下问题:</p>\r\n<li>图标缺失</li>\r\n<li>目标网站无法打开</li>\r\n<li>描述错误</li>\r\n<li>网站违规</li>\r\n<li>收录加急处理</li>\r\n<li>链接删除</li>\r\n<p><strong>请发邮件与我们联系</strong></p>\r\n<h5>联系邮箱</h5>\r\n<p><a href=\"mailto:无\">无</a></p>\r\n<h5>联系说明</h5>\r\n<p>为了您的问题能快速被处理,建议在邮件主题添加【反馈】【投诉】【推荐】【友链】</p>', '关于页面');
DROP TABLE IF EXISTS `lylme_groups`; DROP TABLE IF EXISTS `lylme_groups`;
CREATE TABLE `lylme_groups` ( CREATE TABLE `lylme_groups` (

View File

@ -1,5 +1,5 @@
-- v1.8.0 -- v1.8.0
ALTER TABLE `lylme_apply` CHANGE `apply_mail` `apply_desc` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '链接描述'; ALTER TABLE `lylme_apply` CHANGE `apply_mail` `apply_desc` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;
ALTER TABLE `lylme_links` CHANGE `PS` `link_desc` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '链接描述'; ALTER TABLE `lylme_links` CHANGE `PS` `link_desc` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '链接描述';
ALTER TABLE `lylme_tags` ADD `sort` INT NOT NULL DEFAULT '10' COMMENT '权重' AFTER `tag_target`; ALTER TABLE `lylme_tags` ADD `sort` INT NOT NULL DEFAULT '10' COMMENT '权重' AFTER `tag_target`;
ALTER TABLE `lylme_config` ADD UNIQUE( `k`); ALTER TABLE `lylme_config` ADD UNIQUE( `k`);