更新 v1.8.5

This commit is contained in:
LyLme 2024-01-09 11:08:01 +08:00
parent 54a345e324
commit 4f6579764f
4 changed files with 137 additions and 110 deletions

View File

@ -1,7 +1,9 @@
<?php
include_once("../include/common.php");
if(isset($islogin) == 1) {
} else exit("<script language='javascript'>window.location.href='./login.php';</script>");
} else {
exit("<script language='javascript'>window.location.href='./login.php';</script>");
}
?>
<!DOCTYPE html>
<html lang="zh-CN">
@ -31,13 +33,12 @@ if(isset($islogin)==1) {
<a href="javascript:void(0)"><i class="mdi mdi-palette"></i>网站配置</a>
<ul class="nav nav-subnav">
<li> <a href="./set.php">网站基本设置</a> </li>
<li> <a href="./tag.php">导航菜单设置</a> </li>
<li> <a href="./sou.php">搜索引擎设置</a> </li>
<li> <a href="./theme.php">网站主题设置</a> </li>
<li> <a href="./about.php">关于页面设置</a> </li>
<li> <a href="./user.php">修改账号密码</a> </li>
</ul>
</li>
<li class="nav-item active"> <a href="./theme.php"><i class="mdi mdi-invert-colors"></i>主题设置</a> </li>
<li class="nav-item active"> <a href="./apply.php"><i class="mdi mdi-link"></i>收录管理 </a>
<?php $applyrows = $DB->num_rows($DB->query("SELECT * FROM `lylme_apply` WHERE `apply_status` = 0"));
if($applyrows > 0) {
@ -48,6 +49,8 @@ if($applyrows>0) {
<li class="nav-item nav-item-has-subnav">
<li class="nav-item active"> <a href="./group.php"><i class="mdi mdi-folder"></i>分组管理</a></li>
<li class="nav-item active"> <a href="./link.php"><i class="mdi mdi-web"></i>链接管理</a></li>
<li class="nav-item active"> <a href="./tag.php"><i class="mdi mdi-cube"></i>导航菜单</a></li>
<li class="nav-item active"> <a href="./sou.php"><i class="mdi mdi-magnify"></i>搜索引擎</a></li>
<li class="nav-item active"> <a href="./pwd.php"><i class="mdi mdi-key-variant"></i>加密管理</a></li>
<li class="nav-item active"> <a href="./update.php"><i class="mdi mdi-update"></i>检查更新</a> </li>
<li class="nav-item active"> <a href="./wxplus.php"><i class="mdi mdi-wechat"></i>微信推送</a> </li>

View File

@ -15,8 +15,7 @@ $sousrows=$DB->num_rows($DB->query("SELECT * FROM `lylme_sou`"));
$set = isset($_GET['set']) ? $_GET['set'] : null;
if($set=='add')
{
if($set == 'add') {
echo '<h4>新增搜索接</h4>
<div class="panel-body">
<form action="./sou.php?set=add_submit" method="POST">
@ -68,9 +67,7 @@ echo '<h4>新增搜索接</h4>
</div>
<br/><a href="./sou.php"><<返回</a>
</div></div>';
}
elseif($set=='edit')
{
} elseif($set == 'edit') {
$id = $_GET['id'];
$row2 = $DB->query("select * from lylme_sou where sou_id='$id' limit 1");
@ -96,7 +93,7 @@ echo '<h4>修改搜索引擎</h4>
<label>*搜索引擎地址: (*必填)</label><br>
<input type="text" class="form-control" name="link" value="' . $row['sou_link'] . '" required placeholder="https://www.baidu.com/s?word=">
<small class="help-block">例:百度搜索 <code>https://www.baidu.com/s?word=</code><a href="https://blog.lylme.com/archives/lylme_spage.html#sou">查看获取接口教程</a>
<br>注意:当前仅支持搜索词作为末尾,例如:<code>https://www.baidu.com/s?word=搜索内容</code><br>如果使用GET请求搜索搜索词不处于末尾<code>https://www.baidu.com/s?wd=搜索词&ie=UTF-8</code>可将搜索词参数调换到末尾,如<code>https://www.baidu.com/s?ie=UTF-8&wd=搜索词</code>多个GET参数用以<code>&</code>分隔<br>如果搜索词不在末尾且非GET请求,如<code>https://xxx.com/s/搜索词.html</code>类似情况可用PHP页面定制搜索接口<a href="https://blog.lylme.com/archives/lylme_spage.html#souphp">查看教程</a></small>
<br>注意:当前仅支持搜索词作为末尾,例如:<code>https://www.baidu.com/s?word=搜索内容</code><br>如果使用GET请求搜索搜索词不处于末尾<code>https://www.baidu.com/s?wd=搜索词&ie=UTF-8</code>可将搜索词参数调换到末尾,如<code>https://www.baidu.com/s?ie=UTF-8&wd=搜索词</code>多个GET参数用以<code>&</code>分隔<br>如果搜索词不在末尾,如<code>https://xxx.com/s/搜索词.html</code>类似情况可用PHP定制搜索接口<a href="https://doc.lylme.com/spage/#/search-help">查看教程</a></small>
</div>
<div class="form-group">
<label>搜索引擎手机端地址: (选填) </label><br>
@ -122,7 +119,9 @@ echo '<h4>修改搜索引擎</h4>
<label class="btn-block" for="web_tq_status">启用开关</label>
<label class="lyear-switch switch-solid switch-primary">
<input type="checkbox"';
if($row['sou_st']==1){ echo 'checked="checked"'; }
if($row['sou_st'] == 1) {
echo 'checked="checked"';
}
echo 'name="st" value="true">
<span></span>
</label>
@ -133,9 +132,7 @@ echo '<h4>修改搜索引擎</h4>
</div>
<br/><a href="./sou.php"><<返回</a>
</div></div>';
}
elseif($set=='add_submit')
{
} elseif($set == 'add_submit') {
$name = $_POST['name'];
$alias = $_POST['alias'];
$hint = $_POST['hint'];
@ -143,7 +140,11 @@ $link=$_POST['link'];
$waplink = $_POST['waplink'];
$color = $_POST['color'];
$icon = $_POST['icon'];
if($_POST['st']==true){$st=1;}else{$st=0;}
if($_POST['st'] == true) {
$st = 1;
} else {
$st = 0;
}
$sou_order = $sousrows + 1;
if (empty($name) && empty($alias) && empty($hint) && empty($link) && empty($color) && empty($icon)) {
@ -156,17 +157,17 @@ $sql="INSERT INTO `lylme_sou` (`sou_id`, `sou_alias`, `sou_name`, `sou_hint`, `s
if($DB->query($sql)) {
echo '<script>alert("添加搜索引擎 ' . $name . ' 成功!");window.location.href="./sou.php";</script>';
}else
} else {
echo '<script>alert("添加搜索引擎失败!");history.go(-1);</script>';
}
}
elseif($set=='edit_submit')
{
} elseif($set == 'edit_submit') {
$id = $_GET['id'];
$rows2 = $DB->query("select * from lylme_sou where sou_id='$id' limit 1");
$rows = $DB->fetch($rows2);
if(!$rows)
if(!$rows) {
echo '<script>alert("当前记录不存在!");history.go(-1);</script>';
}
$name = $_POST['name'];
$alias = $_POST['alias'];
$hint = $_POST['hint'];
@ -175,7 +176,11 @@ $waplink=$_POST['waplink'];
$color = $_POST['color'];
$icon = $_POST['icon'];
$order = $_POST['order'];
if($_POST['st']==true){$st=1;}else{$st=0;}
if($_POST['st'] == true) {
$st = 1;
} else {
$st = 0;
}
if (empty($name) && empty($alias) && empty($hint) && empty($link) && empty($color) && empty($icon) && empty($order)) {
echo '<script>alert("保存错误,请确保带星号的都不为空!");history.go(-1);</script>';
@ -184,23 +189,21 @@ if (empty($name) && empty($alias)&& empty($hint) && empty($link) && empty($color
$sql = "UPDATE `lylme_sou` SET `sou_alias` = '" . $alias . "', `sou_name` = '" . $name . "', `sou_hint` = '" . $hint . "', `sou_color` = '" . $color . "', `sou_link` = '" . $link . "', `sou_waplink` = '" . $waplink . "', `sou_icon` = '" . $icon . "', `sou_st` = '" . $st . "', `sou_order` = '" . $order . "' WHERE `lylme_sou`.`sou_id` = " . $id . ";";
if($DB->query($sql))
if($DB->query($sql)) {
echo '<script>alert("修改搜索引擎 ' . $name . ' 成功!");window.location.href="./sou.php";</script>';
else
} else {
echo '<script>alert("修改失败!");history.go(-1);</script>';
}
}
elseif($set=='delete')
{
} elseif($set == 'delete') {
$id = $_GET['id'];
$sql = "DELETE FROM lylme_sou WHERE sou_id='$id'";
if($DB->query($sql))
if($DB->query($sql)) {
echo '<script>alert("删除成功!");window.location.href="./sou.php";</script>';
else
} else {
echo '<script>alert("删除失败!");history.go(-1);</script>';
}
else
{
} else {
echo '<div class="alert alert-info">系统共有 <b>' . $sousrows . '</b> 个搜索引擎<br/><a href="./sou.php?set=add" class="btn btn-primary">新增搜索引擎</a></div> <div class="table-responsive">
<table class="table table-striped">
<thead><tr><th>排序权重</th><th>名称</th><th>别名</th><th>地址</th><th>状态</th><th>操作</th></tr></thead>
@ -208,11 +211,14 @@ echo '<div class="alert alert-info">系统共有 <b>'.$sousrows.'</b> 个搜索
$rs = $DB->query("SELECT * FROM `lylme_sou` ORDER BY `lylme_sou`.`sou_order` ASC");
while($res = $DB->fetch($rs))
{
while($res = $DB->fetch($rs)) {
echo '<tr><td><b>' . $res['sou_order'] . '</b></td><td><b><font color="' . $res['sou_color'] . '">' . $res['sou_name'] . '</font></b></td><td>' . $res['sou_alias'] . '</td><td>' . $res['sou_link'] . '</td><td>';
if($res['sou_st'] == 1){echo '<span class="label label-success">开启</span>';}else{echo '<span class="label label-danger">关闭</span>';}
if($res['sou_st'] == 1) {
echo '<span class="label label-success">开启</span>';
} else {
echo '<span class="label label-danger">关闭</span>';
}
echo '</td><td><a href="./sou.php?set=edit&id=' . $res['sou_id'] . '" class="btn btn-info btn-xs">编辑</a>&nbsp;<a href="./sou.php?set=delete&id=' . $res['sou_id'] . '" class="btn btn-xs btn-danger" onclick="return confirm(\'确定删除 ' . $res['sou_name'] . '\');">删除</a></td></tr>';
}

View File

@ -78,6 +78,23 @@ if($sqlvn < $filevn) {
saveSetting('admin_pwd', $admin_pwd);
}
}
if($sqlvn < 10805) {
$version = 'v1.8.5';
if (!isset($conf['about'])) {
$about_file = ROOT . 'about/about.txt';
if(file_exists($about_file)) {
$about = file_get_contents($about_file);
} else {
$about = "INSERT INTO `lylme_config` (`id`, `k`, `v`, `description`) VALUES (NULL, '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>', NULL)";
}
$DB->query(daddslashes($about));
@unlink($about_file);
@unlink(ROOT . 'about/说明.txt');
}
}
$sql = explode(';', $sql);
for ($i = 0;$i < count($sql);$i++) {

View File

@ -50,7 +50,8 @@ INSERT INTO `lylme_config` VALUES
(19, 'wap_background', NULL, '手机端背景'),
(20, 'wxplus', '', '微信推送密钥'),
(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>', '关于页面');
DROP TABLE IF EXISTS `lylme_groups`;
CREATE TABLE `lylme_groups` (