All code
commit
e8ea46c644
@ -0,0 +1,201 @@
|
|||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
@ -0,0 +1,24 @@
|
|||||||
|
<h3>关于本站</h3>
|
||||||
|
<p>感谢来访,本站致力于简洁高效的上网导航和搜索入口,安全快捷。</p>
|
||||||
|
<p>如果您喜欢我们的网站,请将本站添加到收藏夹(快捷键<code>Ctrl+D</code>),并<a href="https://jingyan.baidu.com/article/4dc40848868eba89d946f1c0.html" target="_blank">设为浏览器主页</a>,方便您的下次访问,感谢支持。<p>
|
||||||
|
<hr>
|
||||||
|
<h3>本站承诺</h3>
|
||||||
|
<p><strong>绝对不会收集用户的隐私信息</strong><p>
|
||||||
|
<p>区别于部分导航网站,本站链接直接跳转目标,不会对链接处理再后跳转,不会收集用户的隐藏信息,包括但不限于点击记录,访问记录和搜索记录,请放心使用</p>
|
||||||
|
<hr>
|
||||||
|
<h3>申请收录</h3>
|
||||||
|
<p>请点<a href="../apply" target="_blank">这里</a></p>
|
||||||
|
<hr>
|
||||||
|
<h3>联系我们</h3>
|
||||||
|
<p>若您在使用本站时遇到了包括但不限于以下问题:</p>
|
||||||
|
<li>图标缺失</li>
|
||||||
|
<li>目标网站无法打开</li>
|
||||||
|
<li>描述错误</li>
|
||||||
|
<li>网站违规</li>
|
||||||
|
<li>收录加急处理</li>
|
||||||
|
<li>链接删除</li>
|
||||||
|
<p><strong>请发邮件与我们联系</strong></p>
|
||||||
|
<h5>联系邮箱</h5>
|
||||||
|
<p><a href="mailto:未配置邮箱">未配置邮箱</a></p>
|
||||||
|
<h5>联系说明</h5>
|
||||||
|
<p>为了您的问题能快速被处理,建议在邮件主题添加【反馈】【投诉】【推荐】【友链】</p>
|
@ -0,0 +1,32 @@
|
|||||||
|
<?php include("../include/common.php"); ?>
|
||||||
|
<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">
|
||||||
|
<?php
|
||||||
|
$about = 'about.txt';
|
||||||
|
//本页内容请修改about.txt文件防止更新后index.php文件被覆盖
|
||||||
|
|
||||||
|
if(file_exists($about)){
|
||||||
|
//文件存在,直接输出文件内容
|
||||||
|
echo file_get_contents($about);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//文件不存在
|
||||||
|
@file_put_contents($about,'<h1>404</h1>');
|
||||||
|
echo file_get_contents($about);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<center><p class="footer"><?php echo $conf['copyright']?></p></center>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
include_once("../include/common.php");
|
||||||
|
if(isset($islogin)==1) {
|
||||||
|
} else exit("<script language='javascript'>window.location.href='./login.php';</script>");
|
||||||
|
header('Content-Type:application/json');
|
||||||
|
|
||||||
|
$set= isset($_GET['set']) ? $_GET['set'] : null;
|
||||||
|
switch($set) {
|
||||||
|
//修改分组
|
||||||
|
case 'status':
|
||||||
|
$id = $_POST['id'];
|
||||||
|
$sw = $_POST['status'];
|
||||||
|
$sql = "UPDATE `lylme_apply` SET `apply_status` = '".$sw."' WHERE `lylme_apply`.`apply_id` = ".$id.";";
|
||||||
|
if($sw==1) {
|
||||||
|
if ($DB->query($sql)) {
|
||||||
|
$applyres = $DB->get_row("SELECT * FROM `lylme_apply` WHERE `apply_id` = ".$id);
|
||||||
|
$name=strip_tags(daddslashes($applyres['apply_name']));
|
||||||
|
$url=strip_tags(daddslashes($applyres['apply_url']));
|
||||||
|
$icon=daddslashes($applyres['apply_icon']);
|
||||||
|
$group_id=strip_tags(daddslashes($applyres['apply_group']));
|
||||||
|
$mail=strip_tags(daddslashes($applyres['apply_mail']));
|
||||||
|
$link_order = $DB->count('select MAX(id) from `lylme_links`')+1;
|
||||||
|
$sql1 = "INSERT INTO `lylme_links` (`id`, `name`, `group_id`, `url`, `icon`, `PS`,`link_order`) VALUES (NULL, '" . $name . "', '" . $group_id . "', '" . $url . "', '" . $icon . "', '" . $mail . "的提交 ', '" . $link_order . "');";
|
||||||
|
if($DB->query($sql1)) {
|
||||||
|
exit('{"code": "200","msg":"成功!网站已成功收录!"}');
|
||||||
|
} else {
|
||||||
|
exit('{"code": "-1","操作失败!原因:\n'.$DB->error().'"}');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if($sw==2){
|
||||||
|
if ($DB->query($sql)) {
|
||||||
|
exit('{"code": "200","msg":"操作成功!"}');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
exit('{"code": "-1","操作失败!原因:\n'.$DB->error().'"}');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
exit('{"code": "-2","操作失败!-2"}');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'delete':
|
||||||
|
$id = $_POST['id'];
|
||||||
|
$delsql = 'DELETE FROM `lylme_apply` WHERE apply_id =' . $id;
|
||||||
|
if ($DB->query($delsql)) {
|
||||||
|
exit('{"code": "200","msg":"操作成功!"}');
|
||||||
|
}else{
|
||||||
|
exit('{"code": "-2","操作失败!-2"}');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
exit('error');
|
||||||
|
break;
|
||||||
|
}
|
@ -0,0 +1,114 @@
|
|||||||
|
<?php
|
||||||
|
include_once("../include/common.php");
|
||||||
|
if(isset($islogin)==1) {
|
||||||
|
} else exit("<script language='javascript'>window.location.href='./login.php';</script>");
|
||||||
|
$submit = isset($_GET['submit']) ? $_GET['submit'] : null;
|
||||||
|
switch($submit) {
|
||||||
|
|
||||||
|
//修改分组
|
||||||
|
case 'set_group':
|
||||||
|
foreach($_POST['links'] as $lk=> $lv) {
|
||||||
|
$sql = "UPDATE `lylme_links` SET `group_id` = '".$_POST['group_id']."' WHERE `lylme_links`.`id` = ".$lv.";";
|
||||||
|
$DB->query($sql);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'allorder':
|
||||||
|
//拖拽排序
|
||||||
|
for ($i=0; $i<count($_POST["link_array"]); $i++) {
|
||||||
|
$sql = "UPDATE `lylme_links` SET `link_order` = '".$i."' WHERE `lylme_links`.`id` = ".$_POST["link_array"][$i].";";
|
||||||
|
$DB->query($sql);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'pwd_link':
|
||||||
|
//链接加密
|
||||||
|
foreach($_POST['links'] as $lk=> $lv) {
|
||||||
|
$sql = "UPDATE `lylme_links` SET `link_pwd` = '".$_POST['pwd_id']."' WHERE `lylme_links`.`id` = ".$lv.";";
|
||||||
|
$DB->query($sql);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'on':
|
||||||
|
//链接启用
|
||||||
|
foreach($_POST['links'] as $lk=> $lv) {
|
||||||
|
$sql = "UPDATE `lylme_links` SET `link_status` = '1' WHERE `lylme_links`.`id` = ".$lv.";";
|
||||||
|
$DB->query($sql);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'off':
|
||||||
|
//链接禁用
|
||||||
|
foreach($_POST['links'] as $lk=> $lv) {
|
||||||
|
$sql = "UPDATE `lylme_links` SET `link_status` = '0' WHERE `lylme_links`.`id` = ".$lv.";";
|
||||||
|
$DB->query($sql);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'del':
|
||||||
|
//链接删除
|
||||||
|
foreach($_POST['links'] as $lk=> $lv) {
|
||||||
|
$sql = "DELETE FROM `lylme_links` WHERE `lylme_links`.`id` = ".$lv.";";
|
||||||
|
$DB->query($sql);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
//获取链接信息
|
||||||
|
case 'geturl':
|
||||||
|
$url = $_GET['url'];
|
||||||
|
$head = get_head($url);
|
||||||
|
if(empty($head['title'])&&empty($head['icon']))exit('Unable to access');
|
||||||
|
//download_img($url,head['icon']);
|
||||||
|
header('Content-Type:application/json');
|
||||||
|
exit(json_encode($head,JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE)); //输出json
|
||||||
|
break;
|
||||||
|
//检测更新
|
||||||
|
case 'update':
|
||||||
|
function zipExtract ($src, $dest) {
|
||||||
|
$zip = new ZipArchive();
|
||||||
|
if ($zip->open($src)===true) {
|
||||||
|
$zip->extractTo($dest);
|
||||||
|
$zip->close();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
function deldir($dir) {
|
||||||
|
if(!is_dir($dir))return false;
|
||||||
|
$dh=opendir($dir);
|
||||||
|
while ($file=readdir($dh)) {
|
||||||
|
if($file!="." && $file!="..") {
|
||||||
|
$fullpath=$dir."/".$file;
|
||||||
|
if(!is_dir($fullpath)) {
|
||||||
|
unlink($fullpath);
|
||||||
|
} else {
|
||||||
|
deldir($fullpath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($dh);
|
||||||
|
if(rmdir($dir)) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$scriptpath=str_replace('\\','/',$_SERVER['SCRIPT_NAME']);
|
||||||
|
$scriptpath = substr($scriptpath, 0, strrpos($scriptpath, '/'));
|
||||||
|
$admin_path = substr($scriptpath, strrpos($scriptpath, '/')+1);
|
||||||
|
$RemoteFile = $_POST['file'];
|
||||||
|
$ZipFile = "lylme_spage-update.zip";
|
||||||
|
copy($RemoteFile,$ZipFile) or die("无从更新服务器下载更新包文件!");
|
||||||
|
if (zipExtract($ZipFile,ROOT)) {
|
||||||
|
if($admin_path!='admin' && is_dir(ROOT.'admin')) {
|
||||||
|
//修改后台地址
|
||||||
|
deldir(ROOT.$admin_path);
|
||||||
|
rename(ROOT.'admin',ROOT.$admin_path);
|
||||||
|
}
|
||||||
|
unlink($ZipFile);
|
||||||
|
exit ('success');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
unlink($ZipFile);
|
||||||
|
exit('无法解压文件!请手动下载更新包解压');
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
exit('error');
|
||||||
|
break;
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
.clr-picker{display:none;flex-wrap:wrap;position:absolute;width:200px;z-index:1000;border-radius:10px;background-color:#fff;justify-content:space-between;box-shadow:0 0 5px rgba(0,0,0,.05),0 5px 20px rgba(0,0,0,.1);-moz-user-select:none;-webkit-user-select:none;user-select:none}.clr-picker.clr-open{display:flex}.clr-dark{background-color:#444}.clr-gradient{position:relative;width:100%;height:100px;margin-bottom:15px;border-radius:3px 3px 0 0;background-image:linear-gradient(rgba(0,0,0,0),#000),linear-gradient(90deg,#fff,currentColor);cursor:pointer}.clr-marker{position:absolute;width:12px;height:12px;margin:-6px 0 0 -6px;border:1px solid #fff;border-radius:50%;background-color:currentColor;cursor:pointer}.clr-picker input[type=range]::-webkit-slider-runnable-track{width:100%;height:8px}.clr-picker input[type=range]::-webkit-slider-thumb{width:8px;height:8px;-webkit-appearance:none}.clr-picker input[type=range]::-moz-range-track{width:100%;height:8px;border:0}.clr-picker input[type=range]::-moz-range-thumb{width:8px;height:8px;border:0}.clr-hue{background-image:linear-gradient(to right,red 0,#ff0 16.66%,#0f0 33.33%,#0ff 50%,#00f 66.66%,#f0f 83.33%,red 100%)}.clr-alpha,.clr-hue{position:relative;width:calc(100% - 40px);height:8px;margin:5px 20px;border-radius:4px}.clr-alpha span{display:block;height:100%;width:100%;border-radius:inherit;background-image:linear-gradient(90deg,rgba(0,0,0,0),currentColor)}.clr-alpha input,.clr-hue input{position:absolute;width:calc(100% + 16px);height:16px;left:-8px;top:-4px;margin:0;background-color:transparent;opacity:0;cursor:pointer;appearance:none;-webkit-appearance:none}.clr-alpha div,.clr-hue div{position:absolute;width:16px;height:16px;left:0;top:0;margin:-4px 0 0 -8px;border:2px solid #fff;border-radius:50%;background-color:currentColor;box-shadow:0 0 1px #888;pointer-events:none}.clr-alpha div:before{content:'';position:absolute;height:100%;width:100%;left:0;top:0;border-radius:50%;background-color:currentColor}.clr-swatches{order:2;width:calc(100% - 40px);margin:0 20px}.clr-swatches div{display:flex;flex-wrap:wrap;padding-bottom:12px;justify-content:center}.clr-swatches button{position:relative;width:20px;height:20px;margin:0 8px 6px 0;border:0;border-radius:50%;color:inherit;text-indent:-1000px;white-space:nowrap;overflow:hidden;cursor:pointer}.clr-swatches button:last-child,.clr-swatches button:nth-child(6n){margin-right:0}.clr-swatches button:after{content:'';display:block;position:absolute;width:100%;height:100%;left:0;top:0;border-radius:inherit;background-color:currentColor;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.clr-dark .clr-swatches button:after{box-shadow:inset 0 0 0 1px rgba(255,255,255,.3)}input.clr-color{order:1;width:120px;height:32px;margin:15px 20px 15px 0;padding:0 15px;border:1px solid #ddd;border-radius:16px;color:#444;background-color:#fff;font-family:sans-serif;font-size:14px;text-align:left;box-shadow:none}.clr-dark input.clr-color{color:#fff;border-color:#777;background-color:#555}input.clr-color:focus{outline:0;border:1px solid #aaa}.clr-preview{position:relative;width:32px;height:32px;margin:15px 0 20px 20px;border:0;border-radius:50%;overflow:hidden;cursor:pointer}.clr-preview:after,.clr-preview:before{content:'';position:absolute;height:100%;width:100%;left:0;top:0;border:1px solid #fff;border-radius:50%}.clr-preview:after{border:0;background-color:currentColor;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.clr-dark .clr-preview:after{box-shadow:inset 0 0 0 1px rgba(255,255,255,.5)}.clr-alpha div,.clr-color,.clr-hue div,.clr-marker{box-sizing:border-box}.clr-field{display:inline-block;position:relative;color:#000}.clr-field button{position:absolute;width:30px;height:100%;right:0;top:50%;transform:translateY(-50%);border:0;color:inherit;text-indent:-1000px;white-space:nowrap;overflow:hidden;pointer-events:none}.clr-field button:after{content:'';display:block;position:absolute;width:100%;height:100%;left:0;top:0;border-radius:inherit;background-color:currentColor;box-shadow:inset 0 0 1px rgba(0,0,0,.5)}.clr-alpha,.clr-alpha div,.clr-field button,.clr-preview:before,.clr-swatches button{background-image:repeating-linear-gradient(45deg,#aaa 25%,transparent 25%,transparent 75%,#aaa 75%,#aaa),repeating-linear-gradient(45deg,#aaa 25%,#fff 25%,#fff 75%,#aaa 75%,#aaa);background-position:0 0,4px 4px;background-size:8px 8px}.clr-marker:focus{outline:0}.clr-keyboard-nav .clr-alpha input:focus+div,.clr-keyboard-nav .clr-hue input:focus+div,.clr-keyboard-nav .clr-marker:focus{outline:0;box-shadow:0 0 0 2px #1e90ff,0 0 2px 2px #fff}
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 2.1 MiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,17 @@
|
|||||||
|
<script language="javascript">
|
||||||
|
function loginout(){
|
||||||
|
if( confirm("你确实要退出吗?")){
|
||||||
|
window.parent.location.href="login.php?logout";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="js/bootstrap.min.js"></script>
|
||||||
|
<script type="text/javascript" src="js/perfect-scrollbar.min.js"></script>
|
||||||
|
<script type="text/javascript" src="js/main.min.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
<?php $DB->close(); ?>
|
@ -0,0 +1,124 @@
|
|||||||
|
<?php
|
||||||
|
include_once("../include/common.php");
|
||||||
|
if(isset($islogin)==1) {
|
||||||
|
} else exit("<script language='javascript'>window.location.href='./login.php';</script>");
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
|
||||||
|
<title><?php echo $title.' - '.$conf['title'];?></title>
|
||||||
|
<link rel="icon" href="/assets/img/logo.png" type="image/ico">
|
||||||
|
<meta name="author" content="yinqi">
|
||||||
|
<link href="css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link href="css/materialdesignicons.min.css" rel="stylesheet">
|
||||||
|
<link href="css/style.min.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<div class="lyear-layout-web">
|
||||||
|
<div class="lyear-layout-container">
|
||||||
|
<!--左侧导航-->
|
||||||
|
<aside class="lyear-layout-sidebar">
|
||||||
|
<!-- logo -->
|
||||||
|
<div id="logo" class="sidebar-header">
|
||||||
|
<a href="/"><img src="/assets/img/logo-sidebar.png" alt="LyLme" title="返回首页" /></a>
|
||||||
|
</div>
|
||||||
|
<div class="lyear-layout-sidebar-scroll">
|
||||||
|
<nav class="sidebar-main">
|
||||||
|
<ul class="nav nav-drawer">
|
||||||
|
<li class="nav-item active"> <a href="./"><i class="mdi mdi-home-map-marker"></i>后台首页</a> </li>
|
||||||
|
<li class="nav-item nav-item-has-subnav">
|
||||||
|
<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="./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) {
|
||||||
|
echo'<style> .applyrow{width: 18px;height: 18px;top: 15px;right: 24px;font-size: 10px;font-weight: bold;color: #fff;background-color: red;border-radius: 100%;text-align: center;vertical-align: middle;position: absolute;line-height: 1.5;}</style>
|
||||||
|
<div class="applyrow">'.$applyrows.'</div>';
|
||||||
|
}
|
||||||
|
?></li>
|
||||||
|
<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="./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> <a href="javascript:loginout()"><i class="mdi mdi-logout"></i> 退出登录</a> </li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<div class="sidebar-footer">
|
||||||
|
<p class="copyright">Copyright ©
|
||||||
|
<?php echo(date('Y'));
|
||||||
|
?> Powered by <br> <a href="https://gitee.com/LyLme/lylme_spage"><?php echo explode("-", $conf['title'])[0];?> </a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<!--End 左侧导航-->
|
||||||
|
<!--头部信息-->
|
||||||
|
<header class="lyear-layout-header">
|
||||||
|
<nav class="navbar navbar-default">
|
||||||
|
<div class="topbar">
|
||||||
|
<div class="topbar-left">
|
||||||
|
<div class="lyear-aside-toggler">
|
||||||
|
<span class="lyear-toggler-bar"></span>
|
||||||
|
<span class="lyear-toggler-bar"></span>
|
||||||
|
<span class="lyear-toggler-bar"></span>
|
||||||
|
</div>
|
||||||
|
<span class="navbar-page-title"> <?php echo $title;
|
||||||
|
?></span>
|
||||||
|
</div>
|
||||||
|
<ul class="topbar-right">
|
||||||
|
<li class="dropdown dropdown-profile">
|
||||||
|
<a href="javascript:void(0)" data-toggle="dropdown">
|
||||||
|
<span><?php echo $conf['admin_user'];
|
||||||
|
?><span class="caret"></span></span>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu dropdown-menu-right">
|
||||||
|
<li> <a href="./user.php"><i class="mdi mdi-lock-outline"></i> 修改密码</a> </li>
|
||||||
|
<li class="divider"></li>
|
||||||
|
<li> <a href="javascript:loginout()"><i class="mdi mdi-logout-variant"></i> 退出登录</a> </li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="dropdown dropdown-skin">
|
||||||
|
<span data-toggle="dropdown" class="icon-palette" aria-expanded="false"><i class="mdi mdi-palette"></i></span>
|
||||||
|
<ul class="dropdown-menu dropdown-menu-right" data-stoppropagation="true">
|
||||||
|
<li class="drop-title"><p>主题</p></li>
|
||||||
|
<li class="drop-skin-li clearfix">
|
||||||
|
<span class="inverse">
|
||||||
|
<input type="radio" name="site_theme" value="default" id="site_theme_1" >
|
||||||
|
<label for="site_theme_1" onclick="theme('default')"></label>
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
<input type="radio" name="site_theme" value="dark" id="site_theme_2" checked="">
|
||||||
|
<label for="site_theme_2" onclick="theme('dark')"></label>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
<script>
|
||||||
|
function theme(theme){
|
||||||
|
localStorage.setItem("theme", theme);
|
||||||
|
}
|
||||||
|
var themes = localStorage.getItem("theme");
|
||||||
|
if(themes != "dark"){
|
||||||
|
var themes = 'default';
|
||||||
|
document.getElementById('site_theme_1').checked = true;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
document.getElementById('site_theme_2').checked = true;
|
||||||
|
}
|
||||||
|
document.write('<body data-theme="'+themes+'">');
|
||||||
|
</script>
|
||||||
|
<!--End 头部信息-->
|
@ -0,0 +1,233 @@
|
|||||||
|
<?php
|
||||||
|
$title = '后台管理';
|
||||||
|
include './head.php';
|
||||||
|
$last = date("Ym");
|
||||||
|
if(@file_get_contents('log.txt') != $last || !file_exists('cache.php')){
|
||||||
|
$update = update();
|
||||||
|
file_put_contents('log.txt',$last);
|
||||||
|
var_export($update,true);
|
||||||
|
$content = "<?php\nreturn ".var_export($update,true)."\n?>";
|
||||||
|
file_put_contents('cache.php', $content);
|
||||||
|
}
|
||||||
|
$mysqlversion=$DB->count("select VERSION()");
|
||||||
|
function tjsj($tjname) {
|
||||||
|
if($tjname=='') {
|
||||||
|
echo '0';
|
||||||
|
} else {
|
||||||
|
echo $tjname;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!--页面主要内容-->
|
||||||
|
<main class="lyear-layout-content">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<?php
|
||||||
|
$update = require('cache.php');
|
||||||
|
if(!empty($update)) {
|
||||||
|
if($update['switch']) {
|
||||||
|
if($update['msg_switch'] && !empty($update['msg'])) {
|
||||||
|
echo '<div class="card"><div class="card-header"><h4>'.$update['title'].'</h4></div><ul class="list-group">'.$update['msg'].'</ul></div>';
|
||||||
|
}
|
||||||
|
if(getver($update['version']) > getver($conf['version'])) {
|
||||||
|
echo '<div class="card"><div class="card-header"><h4>更新提示</h4></div><ul class="list-group">'.$update['update_msg'].'</ul></div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6 col-lg-3">
|
||||||
|
<div class="card bg-primary">
|
||||||
|
<div class="card-body clearfix">
|
||||||
|
<div class="pull-right">
|
||||||
|
<p class="h6 text-white m-t-0">链接数量</p>
|
||||||
|
<p class="h3 text-white m-b-0 fa-1-5x"><?php tjsj($linksrows);
|
||||||
|
?></p>
|
||||||
|
</div>
|
||||||
|
<div class="pull-left"> <span class="img-avatar img-avatar-48 bg-translucent"><i class="mdi mdi-web fa-1-5x"></i></span> </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6 col-lg-3">
|
||||||
|
<div class="card bg-danger">
|
||||||
|
<div class="card-body clearfix">
|
||||||
|
<div class="pull-right">
|
||||||
|
<p class="h6 text-white m-t-0">今日浏览量</p>
|
||||||
|
<p class="h3 text-white m-b-0 fa-1-5x"><?php tjsj($tjtoday);
|
||||||
|
?></p>
|
||||||
|
</div>
|
||||||
|
<div class="pull-left"> <span class="img-avatar img-avatar-48 bg-translucent"><i class="mdi mdi-account fa-1-5x"></i></span> </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6 col-lg-3">
|
||||||
|
<div class="card bg-success">
|
||||||
|
<div class="card-body clearfix">
|
||||||
|
<div class="pull-right">
|
||||||
|
<p class="h6 text-white m-t-0">昨日浏览量</p>
|
||||||
|
<p class="h3 text-white m-b-0 fa-1-5x"><?php tjsj($tjyesterday);
|
||||||
|
?></p>
|
||||||
|
</div>
|
||||||
|
<div class="pull-left"> <span class="img-avatar img-avatar-48 bg-translucent"><i class="mdi mdi-account-convert fa-1-5x"></i></span> </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6 col-lg-3">
|
||||||
|
<div class="card bg-purple">
|
||||||
|
<div class="card-body clearfix">
|
||||||
|
<div class="pull-right">
|
||||||
|
<p class="h6 text-white m-t-0">累计浏览量</p>
|
||||||
|
<p class="h3 text-white m-b-0 fa-1-5x"><?php tjsj($tjtotal);
|
||||||
|
?></p>
|
||||||
|
</div>
|
||||||
|
<div class="pull-left"> <span class="img-avatar img-avatar-48 bg-translucent"><i class="mdi mdi-account-multiple fa-1-5x"></i></span> </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
if($applyrows>0) {
|
||||||
|
echo'
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6 col-lg-12">
|
||||||
|
<div class="card bg-info">
|
||||||
|
<div class="card-body clearfix">
|
||||||
|
<a href="./apply.php"> <div class="pull-right">
|
||||||
|
<p class="h6 text-white m-t-0">待审核链接</p>
|
||||||
|
<p class="h3 text-white m-b-0 fa-1-5x">'.$applyrows.'</p>
|
||||||
|
</div></a>
|
||||||
|
<div class="pull-left"> <span class="img-avatar img-avatar-48 bg-translucent"><i class="mdi mdi-link fa-1-5x"></i></span> </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h4>仪表盘柱状统计图</h4>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<canvas class="js-chartjs-bars"></canvas>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h4>仪表盘折线统计图</h4>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<canvas class="js-chartjs-lines"></canvas>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h4>服务器信息</h4>
|
||||||
|
</div>
|
||||||
|
<ul class="list-group">
|
||||||
|
<li class="list-group-item">
|
||||||
|
<b>PHP 版本:</b><?php echo phpversion() ?>
|
||||||
|
<?php if(ini_get('safe_mode')) {
|
||||||
|
echo '线程安全';
|
||||||
|
} else {
|
||||||
|
echo '非线程安全';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<b>MySQL 版本:</b><?php echo $mysqlversion ?>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<b>服务器软件:</b><?php echo $_SERVER['SERVER_SOFTWARE'] ?>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<b>程序名称:</b>六零导航页(LyLme Spage)
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<b>建站日期:</b><?php echo $conf['build']?>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<b>当前版本:</b><?php echo $conf['version']?> <a href="./update.php" target="_blant">检查更新</a>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<b>最新版本:</b> <?php echo $update['version']?> <a href="https://gitee.com/LyLme/lylme_spage/releases" target="_blant">查看更新说明</a>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<b>项目作者:</b>六零 <a href="https://www.lylme.com/support/" target="_blant">捐赠作者</a>
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item">
|
||||||
|
<b>项目地址:</b>https://github.com/LyLme/lylme_spage
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<!--End 页面主要内容-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
include './footer.php';
|
||||||
|
?>
|
||||||
|
<!--图表插件-->
|
||||||
|
<script type="text/javascript" src="js/Chart.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function(e) {
|
||||||
|
var $dashChartBarsCnt = jQuery( '.js-chartjs-bars' )[0].getContext( '2d' ),
|
||||||
|
$dashChartLinesCnt = jQuery( '.js-chartjs-lines' )[0].getContext( '2d' );
|
||||||
|
var $dashChartBarsData = {
|
||||||
|
labels: ['今日浏览', '昨日浏览', '本月浏览', '总浏览', '链接数', '分组数'],
|
||||||
|
datasets: [ {
|
||||||
|
label: '数量',
|
||||||
|
borderWidth: 1,
|
||||||
|
borderColor: 'rgba(0,0,0,0)',
|
||||||
|
backgroundColor: 'rgba(51,202,185,0.5)',
|
||||||
|
hoverBackgroundColor: "rgba(51,202,185,0.7)",
|
||||||
|
hoverBorderColor: "rgba(0,0,0,0)",
|
||||||
|
data: [<?php echo $tjtoday;
|
||||||
|
?>, <?php echo $tjyesterday;
|
||||||
|
?>, <?php echo $tjmonth;
|
||||||
|
?>, <?php echo $tjtotal;
|
||||||
|
?>, <?php echo $linksrows;
|
||||||
|
?>, <?php echo $groupsrows;
|
||||||
|
?>]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
;
|
||||||
|
var $dashChartLinesData = {
|
||||||
|
labels: ['今日浏览', '昨日浏览', '本月浏览', '总浏览', '链接数', '分组数'],
|
||||||
|
datasets: [ {
|
||||||
|
label: '数量',
|
||||||
|
data: [<?php echo $tjtoday;
|
||||||
|
?>, <?php echo $tjyesterday;
|
||||||
|
?>, <?php echo $tjmonth;
|
||||||
|
?>, <?php echo $tjtotal;
|
||||||
|
?>,<?php echo $linksrows;
|
||||||
|
?>, <?php echo $groupsrows;
|
||||||
|
?>],
|
||||||
|
borderColor: '#358ed7',
|
||||||
|
backgroundColor: 'rgba(53, 142, 215, 0.175)',
|
||||||
|
borderWidth: 1,
|
||||||
|
fill: false,
|
||||||
|
lineTension: 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
;
|
||||||
|
new Chart($dashChartBarsCnt, {
|
||||||
|
type: 'bar',
|
||||||
|
data: $dashChartBarsData
|
||||||
|
}
|
||||||
|
);
|
||||||
|
var myLineChart = new Chart($dashChartLinesCnt, {
|
||||||
|
type: 'line',
|
||||||
|
data: $dashChartLinesData,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
</script>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,146 @@
|
|||||||
|
function listTable(query){
|
||||||
|
var url = window.document.location.href.toString();
|
||||||
|
var queryString = url.split("?")[1];
|
||||||
|
query = query || queryString;
|
||||||
|
layer.closeAll();
|
||||||
|
var ii = layer.load(2, {shade:[0.1,'#fff']});
|
||||||
|
$.ajax({
|
||||||
|
type : 'GET',
|
||||||
|
url : 'table_group.php?'+query,
|
||||||
|
dataType : 'html',
|
||||||
|
cache : false,
|
||||||
|
success : function(data) {
|
||||||
|
layer.close(ii);
|
||||||
|
$("#listTable").html(data);
|
||||||
|
},
|
||||||
|
error:function(data){
|
||||||
|
layer.msg('服务器错误');
|
||||||
|
lightyear.loading('hide');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//载入页面
|
||||||
|
$(document).ready(function(){
|
||||||
|
if($("#listTable").length>0){
|
||||||
|
listTable()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$(document).on('click', '.sort-up', function(){
|
||||||
|
//上移
|
||||||
|
if($(this).parents('tr').prevAll().length > 0){
|
||||||
|
$(this).parents('tr').prev().before($(this).parents('tr').prop('outerHTML'));
|
||||||
|
$(this).parents('tr').remove();
|
||||||
|
save_order();
|
||||||
|
}
|
||||||
|
}).on('click', '.sort-down', function(){
|
||||||
|
//下移
|
||||||
|
if($(this).parents('tr').nextAll().length > 0){
|
||||||
|
$(this).parents('tr').next().after($(this).parents('tr').prop('outerHTML'));
|
||||||
|
$(this).parents('tr').remove();
|
||||||
|
save_order();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//保存排序
|
||||||
|
function save_order(){
|
||||||
|
var groups =[];
|
||||||
|
var $inputArr = $('input[name="group_id"]');
|
||||||
|
$inputArr.each(function(){
|
||||||
|
groups.push($(this).val());
|
||||||
|
});
|
||||||
|
|
||||||
|
lightyear.loading('show');
|
||||||
|
$.ajax({
|
||||||
|
url:"group.php?set=sort",
|
||||||
|
method:"POST",
|
||||||
|
data:{groups:groups},
|
||||||
|
success:function(data){
|
||||||
|
lightyear.loading('hide');
|
||||||
|
lightyear.notify('操作成功!', 'success', 1000);
|
||||||
|
listTable();
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
error:function(data){
|
||||||
|
layer.msg('服务器错误');
|
||||||
|
lightyear.loading('hide');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//启用分组
|
||||||
|
function on_group(id){
|
||||||
|
lightyear.loading('show');
|
||||||
|
$.ajax({
|
||||||
|
url:"group.php?set=on",
|
||||||
|
method:"POST",
|
||||||
|
data:{group_id:id},
|
||||||
|
success:function(data){
|
||||||
|
lightyear.loading('hide');
|
||||||
|
lightyear.notify('操作成功!', 'success', 1000);
|
||||||
|
listTable();
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
error:function(data){
|
||||||
|
layer.msg('服务器错误');
|
||||||
|
lightyear.loading('hide');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//禁用分组
|
||||||
|
function off_group(id){
|
||||||
|
lightyear.loading('show');
|
||||||
|
$.ajax({
|
||||||
|
url:"group.php?set=off",
|
||||||
|
method:"POST",
|
||||||
|
data:{group_id:id},
|
||||||
|
success:function(data){
|
||||||
|
lightyear.loading('hide');
|
||||||
|
lightyear.notify('操作成功!', 'success', 1000);
|
||||||
|
listTable();
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
error:function(data){
|
||||||
|
layer.msg('服务器错误');
|
||||||
|
lightyear.loading('hide');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除分组
|
||||||
|
function del_group(id) {
|
||||||
|
$.confirm({
|
||||||
|
title: '警告',
|
||||||
|
content: '删除分组会<b>同时删除该分组下的所有链接</b>,该操作不可逆!<br><font color="red">是否继续?</font>',
|
||||||
|
type: 'red',
|
||||||
|
typeAnimated: true,
|
||||||
|
buttons: {
|
||||||
|
tryAgain: {
|
||||||
|
text: '确定',
|
||||||
|
btnClass: 'btn-red',
|
||||||
|
action: function(){
|
||||||
|
lightyear.loading('show');
|
||||||
|
$.ajax({
|
||||||
|
url:"group.php?set=del",
|
||||||
|
method:"POST",
|
||||||
|
data:{
|
||||||
|
group_id:id
|
||||||
|
},
|
||||||
|
success:function(data){
|
||||||
|
lightyear.loading('hide');
|
||||||
|
lightyear.notify('操作成功!', 'success', 1000);
|
||||||
|
listTable();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
close: {
|
||||||
|
text: '取消'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,433 @@
|
|||||||
|
//请求页面
|
||||||
|
function listTable(query){
|
||||||
|
var url = window.document.location.href.toString();
|
||||||
|
var queryString = url.split("?")[1];
|
||||||
|
query = query || queryString;
|
||||||
|
layer.closeAll();
|
||||||
|
var ii = layer.load(2, {shade:[0.1,'#fff']});
|
||||||
|
$.ajax({
|
||||||
|
type : 'GET',
|
||||||
|
url : 'table_link.php?'+query,
|
||||||
|
dataType : 'html',
|
||||||
|
cache : false,
|
||||||
|
success : function(data) {
|
||||||
|
layer.close(ii);
|
||||||
|
$("#listTable").html(data);
|
||||||
|
$("#link").dragsort({
|
||||||
|
dragBetween: true,
|
||||||
|
dragSelector: "td.lylme",
|
||||||
|
dragEnd: showbutton,
|
||||||
|
placeHolderTemplate: "<tr></tr>",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
error:function(data){
|
||||||
|
layer.msg('服务器错误');
|
||||||
|
lightyear.loading('hide');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//载入页面
|
||||||
|
$(document).ready(function(){
|
||||||
|
if($("#listTable").length>0){
|
||||||
|
listTable()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//获取选中
|
||||||
|
function get_check(){
|
||||||
|
var chk_value =[];
|
||||||
|
$('input[name="link-check"]:checked').each(function(){
|
||||||
|
chk_value.push($(this).val());
|
||||||
|
});
|
||||||
|
return chk_value;
|
||||||
|
}
|
||||||
|
|
||||||
|
//多选启用
|
||||||
|
function on_link(){
|
||||||
|
if(get_check().length == 0){
|
||||||
|
$.alert("未选择链接");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lightyear.loading('show');
|
||||||
|
$.ajax({
|
||||||
|
url:"ajax_link.php?submit=on",
|
||||||
|
method:"POST",
|
||||||
|
data:{links:get_check()},
|
||||||
|
success:function(data){
|
||||||
|
lightyear.loading('hide');
|
||||||
|
lightyear.notify('操作成功!', 'success', 1000);
|
||||||
|
listTable();
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
error:function(data){
|
||||||
|
layer.msg('服务器错误');
|
||||||
|
lightyear.loading('hide');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//多选禁用
|
||||||
|
function off_link(){
|
||||||
|
if(get_check().length == 0){
|
||||||
|
$.alert("未选择链接");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lightyear.loading('show');
|
||||||
|
$.ajax({
|
||||||
|
url:"ajax_link.php?submit=off",
|
||||||
|
method:"POST",
|
||||||
|
data:{links:get_check()},
|
||||||
|
success:function(data){
|
||||||
|
lightyear.loading('hide');
|
||||||
|
lightyear.notify('操作成功!', 'success', 1000);
|
||||||
|
listTable();
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
error:function(data){
|
||||||
|
layer.msg('服务器错误');
|
||||||
|
lightyear.loading('hide');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//获取网站信息
|
||||||
|
function geturl(){
|
||||||
|
var url = $("input[name=\'url\']").val();
|
||||||
|
if(!url){
|
||||||
|
layer.msg('链接地址不能为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$('#loading').css("display","flex");
|
||||||
|
if (!/^http[s]?:\/\/+/.test(url)&&url!="") {
|
||||||
|
var url = "http://"+url;
|
||||||
|
$("input[name=\'url\']").val(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url:"ajax_link.php?submit=geturl",
|
||||||
|
type:"GET",
|
||||||
|
dataType:"json",
|
||||||
|
data:{url:url},
|
||||||
|
success:function(data){
|
||||||
|
$("input[name=\'name\']").val(data.title);
|
||||||
|
if(!data.title && !data.icon){
|
||||||
|
layer.msg('获取失败,请手动填写');
|
||||||
|
}
|
||||||
|
else if(!data.icon){
|
||||||
|
layer.msg('未获取到网站图标');
|
||||||
|
}
|
||||||
|
layer.msg('正则抓取目标网站图标...');
|
||||||
|
downloadimg(data.icon,url);
|
||||||
|
$('#loading').css("display","none");
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
error:function(data){
|
||||||
|
layer.msg('获取失败,目标网站无法访问或防火墙限制!');
|
||||||
|
$('#loading').css("display","none");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//抓取网站图标
|
||||||
|
function downloadimg(url,referer){
|
||||||
|
$.ajax({
|
||||||
|
url:"/include/file.php",
|
||||||
|
type:"POST",
|
||||||
|
dataType:"json",
|
||||||
|
data:{url:url,referer:referer},
|
||||||
|
success:function(data){
|
||||||
|
if(data.code == '200'){
|
||||||
|
layer.msg(data.msg);
|
||||||
|
$("textarea[name=\'icon\']").val(data.url);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
layer.msg(data.msg);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error:function(data){
|
||||||
|
layer.msg('服务器错误');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//上传图标
|
||||||
|
function uploadimg(e) {
|
||||||
|
var formData = new FormData();
|
||||||
|
formData.append("file", $("#file")[0].files[0]);
|
||||||
|
$.ajax({
|
||||||
|
method: 'POST',
|
||||||
|
url: '/include/file.php',
|
||||||
|
data: formData,
|
||||||
|
timeout: 20000,
|
||||||
|
cache: false,
|
||||||
|
processData: false,
|
||||||
|
contentType: false,
|
||||||
|
dataType:"JSON",
|
||||||
|
success:function(data){
|
||||||
|
if(data.code == '200'){
|
||||||
|
layer.msg(data.msg);
|
||||||
|
$("textarea[name=\'icon\']").val(data.url);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
layer.msg(data.msg);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error:function(data){
|
||||||
|
layer.msg('服务器错误');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//多选删除
|
||||||
|
function del_link(id){
|
||||||
|
var link_id = [];
|
||||||
|
link_id.push(id);
|
||||||
|
link_id = id ? link_id :get_check();
|
||||||
|
if(link_id.length == 0){
|
||||||
|
$.alert("未选择链接");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$.alert({
|
||||||
|
title: '警告',
|
||||||
|
content: '确定要删除吗?删除后不可恢复',
|
||||||
|
buttons: {
|
||||||
|
confirm: {
|
||||||
|
text: '删除',
|
||||||
|
btnClass: 'btn-danger',
|
||||||
|
action: function(){
|
||||||
|
lightyear.loading('show');
|
||||||
|
$.ajax({
|
||||||
|
url:"ajax_link.php?submit=del",
|
||||||
|
method:"POST",
|
||||||
|
data:{
|
||||||
|
links:link_id
|
||||||
|
},
|
||||||
|
success:function(data){
|
||||||
|
lightyear.loading('hide');
|
||||||
|
lightyear.notify('操作成功!', 'success', 1000);
|
||||||
|
listTable();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
error:function(data){
|
||||||
|
layer.msg('服务器错误');
|
||||||
|
lightyear.loading('hide');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cancel: {
|
||||||
|
text: '取消'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//全选
|
||||||
|
function check_all(){
|
||||||
|
var ischecked = $("#check_all").prop('checked');
|
||||||
|
if(ischecked == true){
|
||||||
|
$('[name="link-check"]').prop('checked',true);
|
||||||
|
}else{
|
||||||
|
$('[name="link-check"]').prop('checked',false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//拖拽排序
|
||||||
|
$(document).ready(function(){
|
||||||
|
$("#link").dragsort({ itemSelector: "tr",
|
||||||
|
dragEnd: showbutton,
|
||||||
|
dragBetween: true, dragSelector: "tr",placeHolderTemplate: "<tr></tr>" });
|
||||||
|
});
|
||||||
|
|
||||||
|
//显示保存
|
||||||
|
function showbutton() {
|
||||||
|
$("#save_order").show();
|
||||||
|
}
|
||||||
|
|
||||||
|
//保存拖拽排序
|
||||||
|
function save_order(){
|
||||||
|
var link_array =[];
|
||||||
|
var $inputArr = $('input[name="link-check"]');
|
||||||
|
$inputArr.each(function(){
|
||||||
|
link_array.push($(this).val());
|
||||||
|
});
|
||||||
|
|
||||||
|
lightyear.loading('show');
|
||||||
|
$.ajax({
|
||||||
|
url:"ajax_link.php?submit=allorder",
|
||||||
|
method:"POST",
|
||||||
|
data:{link_array:link_array},
|
||||||
|
success:function(data){
|
||||||
|
lightyear.loading('hide');
|
||||||
|
lightyear.notify('操作成功!', 'success', 1000);
|
||||||
|
listTable();
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
error:function(data){
|
||||||
|
layer.msg('服务器错误');
|
||||||
|
lightyear.loading('hide');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//点击排序
|
||||||
|
$(document).on('click', '.sort-up', function(){
|
||||||
|
//上移一行
|
||||||
|
if($(this).parents('tr').prevAll().length > 0){
|
||||||
|
$(this).parents('tr').prev().before($(this).parents('tr').prop('outerHTML'));
|
||||||
|
$(this).parents('tr').remove();
|
||||||
|
save_order();
|
||||||
|
}
|
||||||
|
}).on('click', '.sort-down', function(){
|
||||||
|
//下移一行
|
||||||
|
if($(this).parents('tr').nextAll().length > 0){
|
||||||
|
$(this).parents('tr').next().after($(this).parents('tr').prop('outerHTML'));
|
||||||
|
$(this).parents('tr').remove();
|
||||||
|
save_order();
|
||||||
|
}
|
||||||
|
}).on('click', '.sort-goup', function(){
|
||||||
|
//移到顶部
|
||||||
|
if($(this).parents('tr').prevAll().length > 0){
|
||||||
|
$(this).parents('tbody').children("tr:first-child").before($(this).parents('tr').prop('outerHTML'));
|
||||||
|
$(this).parents('tr').remove();
|
||||||
|
save_order();
|
||||||
|
}
|
||||||
|
}).on('click', '.sort-godown', function(){
|
||||||
|
//移到底部
|
||||||
|
if($(this).parents('tr').nextAll().length > 0){
|
||||||
|
$(this).parents('tbody').children("tr:last-child").after($(this).parents('tr').prop('outerHTML'));
|
||||||
|
$(this).parents('tr').remove();
|
||||||
|
save_order();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
//移到分组
|
||||||
|
function edit_group(mv_group) {
|
||||||
|
if(get_check().length == 0){
|
||||||
|
$.alert("未选择链接");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$.confirm({
|
||||||
|
title: '移动分组',
|
||||||
|
content: mv_group,
|
||||||
|
buttons: {
|
||||||
|
formSubmit: {
|
||||||
|
text: '移动',
|
||||||
|
btnClass: 'btn-blue',
|
||||||
|
action: function () {
|
||||||
|
var group_id = this.$content.find('.group_id').val();
|
||||||
|
if(!group_id){
|
||||||
|
$.alert('请选择要移动到的分组');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lightyear.loading('show');
|
||||||
|
$.ajax({
|
||||||
|
url:"ajax_link.php?submit=set_group",
|
||||||
|
method:"POST",
|
||||||
|
data:{links:get_check(),group_id:group_id},
|
||||||
|
success:function(data){
|
||||||
|
console.log(data);
|
||||||
|
lightyear.loading('hide');
|
||||||
|
lightyear.notify('操作成功!', 'success', 1000);
|
||||||
|
listTable();
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
error:function(data){
|
||||||
|
layer.msg('服务器错误');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cancel: {
|
||||||
|
text: '取消'
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
//链接加密
|
||||||
|
function pwd_link(pwd_list) {
|
||||||
|
if(get_check().length == 0){
|
||||||
|
$.alert("未选择链接");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$.confirm({
|
||||||
|
title: '加密链接',
|
||||||
|
content: pwd_list,
|
||||||
|
buttons: {
|
||||||
|
formSubmit: {
|
||||||
|
text: '加密',
|
||||||
|
btnClass: 'btn-blue',
|
||||||
|
action: function () {
|
||||||
|
var pwd_id = this.$content.find('.pwd_id').val();
|
||||||
|
if(!pwd_id){
|
||||||
|
$.alert('请选择添加到的加密组');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
lightyear.loading('show');
|
||||||
|
$.ajax({
|
||||||
|
url:"ajax_link.php?submit=pwd_link",
|
||||||
|
method:"POST",
|
||||||
|
data:{links:get_check(),pwd_id:pwd_id},
|
||||||
|
success:function(data){
|
||||||
|
console.log(data);
|
||||||
|
lightyear.loading('hide');
|
||||||
|
lightyear.notify('操作成功!', 'success', 1000);
|
||||||
|
listTable();
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
error:function(data){
|
||||||
|
layer.msg('服务器错误');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cancel: {
|
||||||
|
text: '取消'
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//点击排序(弃用)
|
||||||
|
// function sort(id,mod,gid){
|
||||||
|
// lightyear.loading('show');
|
||||||
|
// $.ajax({
|
||||||
|
// url:"ajax_link.php?submit=order",
|
||||||
|
// method:"POST",
|
||||||
|
// data:{id:id,mod:mod,gid:gid},
|
||||||
|
// success:function(data){
|
||||||
|
// lightyear.loading('hide');
|
||||||
|
// lightyear.notify('操作成功!', 'success', 1000);
|
||||||
|
// listTable();
|
||||||
|
// return true;
|
||||||
|
// },
|
||||||
|
// error:function(data){
|
||||||
|
// layer.msg('服务器错误');
|
||||||
|
// lightyear.loading('hide');
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
function pwd_links(){
|
||||||
|
$.alert({
|
||||||
|
title: '分组已加密',
|
||||||
|
content: '当前分组已设置为加密,若想单独设置链接加密,请先删除该分组的加密',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$(document).on('click', '.tips', function(){
|
||||||
|
$.alert({
|
||||||
|
title: '提示',
|
||||||
|
content: '<hr><h4>拖动排序</h4><li>在电脑端可以拖拽链接的<b>名称</b>进行排序,拖拽完成后点击“保存排序”即可生效</li><hr><h4>链接加密</h4><li>加密后的链接地址在本页面显示为<font color="#f96197">粉色</font>,以便标识</li><li>加密分组后该分组下的链接单独设置的加密将失效,删除分组的加密后即可恢复</li><li><b>加密后链接只能使用密码登录后方可查看</b></li>',
|
||||||
|
});
|
||||||
|
});
|
@ -0,0 +1,161 @@
|
|||||||
|
;
|
||||||
|
|
||||||
|
jQuery( function() {
|
||||||
|
$("body").on('click','[data-stopPropagation]',function (e) {
|
||||||
|
e.stopPropagation();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 滚动条
|
||||||
|
const ps = new PerfectScrollbar('.lyear-layout-sidebar-scroll', {
|
||||||
|
swipeEasing: false,
|
||||||
|
suppressScrollX: true
|
||||||
|
});
|
||||||
|
|
||||||
|
// 侧边栏
|
||||||
|
$(document).on('click', '.lyear-aside-toggler', function() {
|
||||||
|
$('.lyear-layout-sidebar').toggleClass('lyear-aside-open');
|
||||||
|
$("body").toggleClass('lyear-layout-sidebar-close');
|
||||||
|
|
||||||
|
if ($('.lyear-mask-modal').length == 0) {
|
||||||
|
$('<div class="lyear-mask-modal"></div>').prependTo('body');
|
||||||
|
} else {
|
||||||
|
$( '.lyear-mask-modal' ).remove();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 遮罩层
|
||||||
|
$(document).on('click', '.lyear-mask-modal', function() {
|
||||||
|
$( this ).remove();
|
||||||
|
$('.lyear-layout-sidebar').toggleClass('lyear-aside-open');
|
||||||
|
$('body').toggleClass('lyear-layout-sidebar-close');
|
||||||
|
});
|
||||||
|
|
||||||
|
// 侧边栏导航
|
||||||
|
$(document).on('click', '.nav-item-has-subnav > a', function() {
|
||||||
|
$subnavToggle = jQuery( this );
|
||||||
|
$navHasSubnav = $subnavToggle.parent();
|
||||||
|
$topHasSubNav = $subnavToggle.parents('.nav-item-has-subnav').last();
|
||||||
|
$subnav = $navHasSubnav.find('.nav-subnav').first();
|
||||||
|
$viSubHeight = $navHasSubnav.siblings().find('.nav-subnav:visible').outerHeight();
|
||||||
|
$scrollBox = $('.lyear-layout-sidebar-scroll');
|
||||||
|
$navHasSubnav.siblings().find('.nav-subnav:visible').slideUp(500).parent().removeClass('open');
|
||||||
|
$subnav.slideToggle( 300, function() {
|
||||||
|
$navHasSubnav.toggleClass( 'open' );
|
||||||
|
|
||||||
|
// 新增滚动条处理
|
||||||
|
var scrollHeight = 0;
|
||||||
|
pervTotal = $topHasSubNav.prevAll().length,
|
||||||
|
boxHeight = $scrollBox.outerHeight(),
|
||||||
|
innerHeight = $('.sidebar-main').outerHeight(),
|
||||||
|
thisScroll = $scrollBox.scrollTop(),
|
||||||
|
thisSubHeight = $(this).outerHeight(),
|
||||||
|
footHeight = 121;
|
||||||
|
|
||||||
|
if (footHeight + innerHeight - boxHeight >= (pervTotal * 48)) {
|
||||||
|
scrollHeight = pervTotal * 48;
|
||||||
|
}
|
||||||
|
if ($subnavToggle.parents('.nav-item-has-subnav').length == 1) {
|
||||||
|
$scrollBox.animate({scrollTop: scrollHeight}, 300);
|
||||||
|
} else {
|
||||||
|
// 子菜单操作
|
||||||
|
if (typeof($viSubHeight) != 'undefined' && $viSubHeight != null) {
|
||||||
|
scrollHeight = thisScroll + thisSubHeight - $viSubHeight;
|
||||||
|
$scrollBox.animate({scrollTop: scrollHeight}, 300);
|
||||||
|
} else {
|
||||||
|
if ((thisScroll + boxHeight - $scrollBox[0].scrollHeight) == 0) {
|
||||||
|
scrollHeight = thisScroll - thisSubHeight;
|
||||||
|
$scrollBox.animate({scrollTop: scrollHeight}, 300);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// 提示
|
||||||
|
if($('[data-toggle="tooltip"]')[0]) {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip({
|
||||||
|
"container" : 'body',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 弹出框
|
||||||
|
if($('[data-toggle="popover"]')[0]) {
|
||||||
|
$('[data-toggle="popover"]').popover();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 标签
|
||||||
|
$('.js-tags-input').each(function() {
|
||||||
|
var $this = $(this);
|
||||||
|
$this.tagsInput({
|
||||||
|
height: $this.data('height') ? $this.data('height') : '38px',
|
||||||
|
width: '100%',
|
||||||
|
defaultText: $this.attr("placeholder"),
|
||||||
|
removeWithBackspace: true,
|
||||||
|
delimiter: [',']
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// 时间选择
|
||||||
|
jQuery('.js-datetimepicker').each(function() {
|
||||||
|
var $input = jQuery(this);
|
||||||
|
$input.datetimepicker({
|
||||||
|
format: $input.data('format') ? $input.data('format') : false,
|
||||||
|
useCurrent: $input.data('use-current') ? $input.data('use-current') : false,
|
||||||
|
locale: moment.locale('' + ($input.data('locale') ? $input.data('locale') : '') + ''),
|
||||||
|
showTodayButton: $input.data('show-today-button') ? $input.data('show-today-button') : false,
|
||||||
|
showClear: $input.data('show-clear') ? $input.data('show-clear') : false,
|
||||||
|
showClose: $input.data('show-close') ? $input.data('show-close') : false,
|
||||||
|
sideBySide: $input.data('side-by-side') ? $input.data('side-by-side') : false,
|
||||||
|
inline: $input.data('inline') ? $input.data('inline') : false,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// 日期选择
|
||||||
|
jQuery('.js-datepicker').each(function() {
|
||||||
|
var options = {
|
||||||
|
weekStart: 1,
|
||||||
|
autoclose: typeof($(this).data('auto-close')) != 'undefined' ? $(this).data('auto-close') : true,
|
||||||
|
language: 'zh-CN', // 默认简体中文
|
||||||
|
multidateSeparator: ', ', // 默认多个日期用,分隔
|
||||||
|
format: $(this).data('date-format') ? $(this).data('date-format') : 'yyyy-mm-dd',
|
||||||
|
};
|
||||||
|
|
||||||
|
if ( $(this).prop("tagName") != 'INPUT' ) {
|
||||||
|
options.inputs = [$(this).find('input:first'), $(this).find('input:last')];
|
||||||
|
}
|
||||||
|
|
||||||
|
$(this).datepicker(options);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 颜色选取
|
||||||
|
jQuery('.js-colorpicker').each(function() {
|
||||||
|
var $colorpicker = jQuery(this);
|
||||||
|
var $colorpickerMode = $colorpicker.data('colorpicker-mode') ? $colorpicker.data('colorpicker-mode') : 'hex';
|
||||||
|
var $colorpickerinline = $colorpicker.data('colorpicker-inline') ? true: false;
|
||||||
|
$colorpicker.colorpicker({
|
||||||
|
'format': $colorpickerMode,
|
||||||
|
'inline': $colorpickerinline
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// 复选框全选
|
||||||
|
$("#check-all").change(function () {
|
||||||
|
if ($boxname = $(this).data('name')) {
|
||||||
|
$(this).closest('table').find("input[name='" + $boxname + "']").prop('checked', $(this).prop("checked"));
|
||||||
|
} else {
|
||||||
|
$(this).closest('table').find(".lyear-checkbox input[type='checkbox']").prop('checked', $(this).prop("checked"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 设置主题配色
|
||||||
|
setTheme = function(input_name, data_name) {
|
||||||
|
$("input[name='"+input_name+"']").click(function(){
|
||||||
|
$('body').attr(data_name, $(this).val());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
setTheme('site_theme', 'data-theme');
|
||||||
|
setTheme('logo_bg', 'data-logobg');
|
||||||
|
setTheme('header_bg', 'data-headerbg');
|
||||||
|
setTheme('sidebar_bg', 'data-sidebarbg');
|
||||||
|
|
||||||
|
});
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,222 @@
|
|||||||
|
<?php
|
||||||
|
$title = '链接管理';
|
||||||
|
include './head.php';
|
||||||
|
$grouplists = $DB->query("SELECT * FROM `lylme_groups`");
|
||||||
|
$pwd_lists = $DB->query("SELECT * FROM `lylme_pwd`");
|
||||||
|
?>
|
||||||
|
<main class="lyear-layout-content">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<?php
|
||||||
|
$set = isset($_GET['set']) ? $_GET['set'] : null;
|
||||||
|
if ($set == 'add') {
|
||||||
|
echo '<h4>新增链接</h4>
|
||||||
|
<div class="panel-body">
|
||||||
|
<form action="./link.php?set=add_submit" method="POST">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>*URL链接地址:</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" class="form-control" name="url" placeholder="链接" value="" required>
|
||||||
|
<span class="input-group-btn">
|
||||||
|
<button class="btn btn-default" onclick="geturl()" type="button">获取</button>
|
||||||
|
</span>
|
||||||
|
</div></div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>*网站名称:</label><br>
|
||||||
|
<input type="text" class="form-control" placeholder="网站名称" name="name" value="" required>
|
||||||
|
<input type="text" class="coloris form-control" onchange="select_color()" placeholder="链接颜色" name="color" value="" />
|
||||||
|
</div>
|
||||||
|
<div class="input-group">
|
||||||
|
<label>链接图标:</label><br>
|
||||||
|
<textarea type="text" class="form-control" name="icon" placeholder="网站图标"></textarea>
|
||||||
|
<span class="input-group-btn">
|
||||||
|
<input type="file" id="file" onchange="uploadimg()" accept="image/png, image/jpeg,image/gif,image/x-icon" style="display: none" />
|
||||||
|
<button class="btn btn-default" id="uploadImage" onclick="$("#file").click();" type="button">选择</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<small class="help-block"><b>可选方案:</b><br>1. 填写图标的<code>URL</code>地址,如<code>/img/logo.png</code>或<code>http://www.xxx.com/img/logo.png</code><br>
|
||||||
|
2. 粘贴图标的<code>SVG</code>代码,<a href="./help.php?doc=icon" target="_blank">查看教程</a><br>3. 留空使用默认图标<br>4. 从本地上传</small>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>*分组:</label><br>
|
||||||
|
<select class="form-control" name="group_id">';
|
||||||
|
while ($grouplist = $DB->fetch($grouplists)) {
|
||||||
|
if ($grouplist["group_id"] == $row['group_id']) {
|
||||||
|
$select = 'selected="selected"';
|
||||||
|
} else {
|
||||||
|
$select = '';
|
||||||
|
}
|
||||||
|
echo '<option value="' . $grouplist["group_id"] . '">' . $grouplist["group_id"] . ' - ' . $grouplist["group_name"] . '</option>';
|
||||||
|
}
|
||||||
|
echo '</select></div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="submit" class="btn btn-primary btn-block" value="添加"></form>
|
||||||
|
</div>
|
||||||
|
<br/><a href="./link.php"><<返回</a>
|
||||||
|
</div></div>';
|
||||||
|
} elseif ($set == 'edit') {
|
||||||
|
$id = $_GET['id'];
|
||||||
|
$row2 = $DB->query("select * from lylme_links where id='$id' limit 1");
|
||||||
|
$row = $DB->fetch($row2);
|
||||||
|
preg_match_all('/<font color=[\"|\']+(.*?)[\"|\']>/i',$row['name'],$color);
|
||||||
|
echo '<h4>修改链接信息</h4>
|
||||||
|
<div class="panel-body">
|
||||||
|
<form action="./link.php?set=edit_submit&id=' . $id . '" method="POST">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>*URL链接地址:</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" class="form-control" name="url" placeholder="链接" value="' . $row['url'] . '" required>
|
||||||
|
<span class="input-group-btn">
|
||||||
|
<button class="btn btn-default" onclick="geturl()" type="button">获取</button>
|
||||||
|
</span>
|
||||||
|
</div></div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>*网站名称:</label><br>
|
||||||
|
<input type="text" class="form-control" name="name" id="urlname" value="' . strip_tags($row['name']) . '" required>
|
||||||
|
<input type="text" class="coloris form-control" onchange="select_color()" placeholder="留空默认" name="color" value="'.$color[1][0].'" />
|
||||||
|
</div>
|
||||||
|
<div class="input-group">
|
||||||
|
<label>链接图标:</label><br>
|
||||||
|
<textarea type="text" class="form-control" name="icon" >' . $row['icon'] . '</textarea>
|
||||||
|
<span class="input-group-btn">
|
||||||
|
<input type="file" id="file" onchange="uploadimg()" accept="image/png, image/jpeg,image/gif,image/x-icon" style="display: none" />
|
||||||
|
<button class="btn btn-default" id="uploadImage" onclick="$("#file").click();" type="button">选择</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<small class="help-block"><b>可选方案:</b><br>1. 填写图标的<code>URL</code>地址,如<code>/img/logo.png</code>或<code>http://www.xxx.com/img/logo.png</code><br>
|
||||||
|
2. 粘贴图标的<code>SVG</code>代码,<a href="./help.php?doc=icon" target="_blank">查看教程</a><br>2. 留空使用默认图标<br>4. 从本地上传</small>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>*分组:</label><br>
|
||||||
|
<select class="form-control" name="group_id">';
|
||||||
|
while ($grouplist = $DB->fetch($grouplists)) {
|
||||||
|
if ($grouplist["group_id"] == $row['group_id']) {
|
||||||
|
$select = 'selected="selected"';
|
||||||
|
} else {
|
||||||
|
$select = '';
|
||||||
|
}
|
||||||
|
echo '<option value="' . $grouplist["group_id"] . '" ' . $select . '>' . $grouplist["group_id"] . ' - ' . $grouplist["group_name"] . '</option>';
|
||||||
|
}
|
||||||
|
echo '</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>链接加密:</label><br>
|
||||||
|
<select class="form-control" required name="link_pwd">';
|
||||||
|
$pwd_lists = $DB->query("SELECT * FROM `lylme_pwd`");
|
||||||
|
while ($pwd_list = $DB->fetch($pwd_lists)) {
|
||||||
|
if($row['link_pwd']==$pwd_list["pwd_id"]) {
|
||||||
|
$sel = 'selected="selected"';
|
||||||
|
} else {
|
||||||
|
$sel ='';
|
||||||
|
}
|
||||||
|
echo '<option value="' . $pwd_list["pwd_id"] . '" '.$sel.' >' . $pwd_list["pwd_id"] . ' - ' . $pwd_list["pwd_name"] . ' | 密码['. $pwd_list["pwd_key"].']</option>';
|
||||||
|
}
|
||||||
|
if(empty($row['link_pwd'])) $sele = 'selected="selected"';
|
||||||
|
echo '
|
||||||
|
<option value="0" '.$sele.'>0 - 不加密</option></select>
|
||||||
|
<small class="help-block"><code>注意:对链接所在的分组加密后,单独设置的链接加密将会失效</code><br>
|
||||||
|
加密后只能通过输入密码访问,使用该功能先配置加密组
|
||||||
|
<a href="./pwd.php" target="_blank">管理加密组</a></small>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="submit" class="btn btn-primary btn-block" value="修改"></form>
|
||||||
|
</div>
|
||||||
|
<br/><a href="./link.php"><<返回</a>
|
||||||
|
</div></div>
|
||||||
|
';
|
||||||
|
} elseif ($set == 'add_submit') {
|
||||||
|
$color = $_POST['color'];
|
||||||
|
$name = $_POST['name'];
|
||||||
|
if(empty($color)) {
|
||||||
|
$name1 = $name;
|
||||||
|
} else {
|
||||||
|
$name1 = '<font color="'.$color.'">'.$name.'</font>';
|
||||||
|
}
|
||||||
|
$url = $_POST['url'];
|
||||||
|
$icon = $_POST['icon'];
|
||||||
|
$group_id = $_POST['group_id'];
|
||||||
|
$link_order = $linksrows + 1;
|
||||||
|
if ($name == NULL or $url == NULL) {
|
||||||
|
echo '<script>alert("保存错误,请确保带星号的都不为空!");history.go(-1);</script>';
|
||||||
|
} else {
|
||||||
|
$sql = "INSERT INTO `lylme_links` (`id`, `name`, `group_id`, `url`, `icon`, `PS`,`link_order`) VALUES (NULL, '" . $name1 . "', '" . $group_id . "', '" . $url . "', '" . $icon . "', '" . $name . "', '" . $link_order . "');";
|
||||||
|
if ($DB->query($sql)) {
|
||||||
|
echo '<script>alert("添加链接 ' . $name . ' 成功!");window.location.href="./link.php";</script>';
|
||||||
|
} else echo '<script>alert("添加链接失败!");history.go(-1);</script>';
|
||||||
|
}
|
||||||
|
} elseif ($set == 'edit_submit') {
|
||||||
|
$id = $_GET['id'];
|
||||||
|
$rows2 = $DB->query("select * from lylme_links where id='$id' limit 1");
|
||||||
|
$rows = $DB->fetch($rows2);
|
||||||
|
if (!$rows) exit('<script>alert("当前记录不存在!");history.go(-1);</script>');
|
||||||
|
$color = $_POST['color'];
|
||||||
|
$name = $_POST['name'];
|
||||||
|
if(empty($color)) {
|
||||||
|
$name1 = $name;
|
||||||
|
} else {
|
||||||
|
$name1 = '<font color="'.$color.'">'.$name.'</font>';
|
||||||
|
}
|
||||||
|
$url = $_POST['url'];
|
||||||
|
$icon = $_POST['icon'];
|
||||||
|
$link_pwd = $_POST['link_pwd'];
|
||||||
|
$group_id = $_POST['group_id'];
|
||||||
|
if ($name == NULL or $url == NULL) {
|
||||||
|
echo '<script>alert("保存错误,请确保带星号的都不为空!");history.go(-1);</script>';
|
||||||
|
} else {
|
||||||
|
$sql = "UPDATE `lylme_links` SET `name` = '" . $name1 . "', `url` = '" . $url . "', `icon` = '" . $icon . "', `group_id` = '" . $group_id . "', `link_pwd` = " . $link_pwd . " WHERE `lylme_links`.`id` = '" . $id . "';";
|
||||||
|
// exit($sql);
|
||||||
|
if ($DB->query($sql)) echo '<script>alert("修改链接 ' . $name . ' 成功!");window.location.href="./link.php";</script>'; else echo '<script>alert("修改链接失败!");history.go(-1);</script>';
|
||||||
|
}
|
||||||
|
// } elseif ($set == 'delete') {
|
||||||
|
// $id = $_GET['id'];
|
||||||
|
// $sql = "DELETE FROM lylme_links WHERE id='$id'";
|
||||||
|
// if ($DB->query($sql)) echo '<script>alert("删除成功!");window.location.href="./link.php";</script>';
|
||||||
|
// else echo '<script>alert("删除失败!");history.go(-1);</script>';
|
||||||
|
} else {
|
||||||
|
echo '<div id="listTable"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
';
|
||||||
|
}
|
||||||
|
include './footer.php';
|
||||||
|
?>
|
||||||
|
<script type="text/javascript" src="js/jquery.dragsort-0.5.2.min.js"></script>
|
||||||
|
<link href="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery-confirm/3.3.0/jquery-confirm.min.css" type="text/css" rel="stylesheet" />
|
||||||
|
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/layer/3.1.1/layer.min.js" type="application/javascript"></script>
|
||||||
|
<script src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery-confirm/3.3.0/jquery-confirm.min.js" type="application/javascript"></script>
|
||||||
|
<!--选色器-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/coloris.min.css" />
|
||||||
|
<script type="text/javascript" src="js/coloris.min.js"></script>
|
||||||
|
<script type="text/javascript">Coloris( {
|
||||||
|
el:'.coloris',swatches:['#000000','#555555','#666666','#264653','#2a9d8f','#f4a261','#e76f51','#ff0000','#d62828','#023e8a','#0077b6','#0096c7']
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style>.clr-alpha {display: none !important;}</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
select_color();
|
||||||
|
function select_color() {
|
||||||
|
var fontcolor = $('input[name="color"]').val();
|
||||||
|
$('#urlname').css("color",fontcolor);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<!--选色器-->
|
||||||
|
<!--消息提示-->
|
||||||
|
<script src="js/bootstrap-notify.min.js"></script>
|
||||||
|
<script type="text/javascript" src="js/lightyear.js"></script>
|
||||||
|
<script type="text/javascript" src="js/link.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
//分组移动
|
||||||
|
var mv_group ='<form action="" class="formName">' + '<select class="form-control group_id" required><option value="">请选择分组...</option>'+'<?php while ($grouplist = $DB->fetch($grouplists)) {
|
||||||
|
echo '<option value="' . $grouplist["group_id"] . '">' . $grouplist["group_id"] . ' - ' . $grouplist["group_name"] . '</option>';}?>'+ '</select>';
|
||||||
|
//链接加密
|
||||||
|
var pwd_list = '<form action="" class="formName">' + '<select class="form-control pwd_id" required>'+'<?php while ($pwd_list = $DB->fetch($pwd_lists)) {
|
||||||
|
echo '<option value="' . $pwd_list["pwd_id"] . '">' . $pwd_list["pwd_id"] . ' - ' . $pwd_list["pwd_name"] . '</option>';}?>'+ '<option value="0">0 - 取消加密</option></select><br><a href="./pwd.php" target="_blank">管理加密组</a>';
|
||||||
|
</script>
|
@ -0,0 +1,115 @@
|
|||||||
|
<?php
|
||||||
|
include("../include/common.php");
|
||||||
|
if(isset($_POST['user']) && isset($_POST['pass'])){
|
||||||
|
$user=daddslashes($_POST['user']);
|
||||||
|
$pass=daddslashes($_POST['pass']);
|
||||||
|
if($user==$conf['admin_user'] && $pass==$conf['admin_pwd']) {
|
||||||
|
$session=md5($user.$pass);
|
||||||
|
$token=authcode("{$user}\t{$session}", 'ENCODE', SYS_KEY);
|
||||||
|
setcookie("admin_token", $token, time() + 604800);
|
||||||
|
@header('Content-Type: text/html; charset=UTF-8');
|
||||||
|
exit("<script language='javascript'>alert('登陆管理中心成功!');window.location.href='./';</script>");
|
||||||
|
}elseif ($pass != $conf['admin_pwd']) {
|
||||||
|
@header('Content-Type: text/html; charset=UTF-8');
|
||||||
|
exit("<script language='javascript'>alert('用户名或密码不正确!');history.go(-1);</script>");
|
||||||
|
}
|
||||||
|
}elseif(isset($_GET['logout'])){
|
||||||
|
setcookie("admin_token", "", time() - 604800);
|
||||||
|
@header('Content-Type: text/html; charset=UTF-8');
|
||||||
|
exit("<script language='javascript'>alert('您已成功注销本次登陆!');window.location.href='./login.php';</script>");
|
||||||
|
}elseif(isset($islogin)==1){
|
||||||
|
exit("<script language='javascript'>alert('您已登陆!');window.location.href='./';</script>");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
|
||||||
|
<title>后台登录 - <?php echo explode("-", $conf['title'])[0];?></title>
|
||||||
|
<link href="css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link href="css/materialdesignicons.min.css" rel="stylesheet">
|
||||||
|
<link href="css/style.min.css" rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
.lyear-wrapper {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.lyear-login {
|
||||||
|
display: flex !important;
|
||||||
|
min-height: 100vh;
|
||||||
|
align-items: center !important;
|
||||||
|
justify-content: center !important;
|
||||||
|
}
|
||||||
|
.lyear-login:after{
|
||||||
|
content: '';
|
||||||
|
min-height: inherit;
|
||||||
|
font-size: 0;
|
||||||
|
}
|
||||||
|
.login-center {
|
||||||
|
background: #fff;
|
||||||
|
min-width: 29.25rem;
|
||||||
|
padding: 2.14286em 3.57143em;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin: 2.85714em;
|
||||||
|
}
|
||||||
|
.login-header {
|
||||||
|
margin-bottom: 1.5rem !important;
|
||||||
|
}
|
||||||
|
.login-center .has-feedback.feedback-left .form-control {
|
||||||
|
padding-left: 38px;
|
||||||
|
padding-right: 12px;
|
||||||
|
}
|
||||||
|
.login-center .has-feedback.feedback-left .form-control-feedback {
|
||||||
|
left: 0;
|
||||||
|
right: auto;
|
||||||
|
width: 38px;
|
||||||
|
height: 38px;
|
||||||
|
line-height: 38px;
|
||||||
|
z-index: 4;
|
||||||
|
color: #dcdcdc;
|
||||||
|
}
|
||||||
|
.login-center .has-feedback.feedback-left.row .form-control-feedback {
|
||||||
|
left: 15px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<?php
|
||||||
|
if(!empty($background = background())){
|
||||||
|
$background = str_replace('./','../',$background);
|
||||||
|
echo '<div class="row lylme-wrapper" style="background-image: url('.$background.');background-size: cover;">';}
|
||||||
|
?>
|
||||||
|
<div class="row lyear-wrapper">
|
||||||
|
<div class="lyear-login">
|
||||||
|
<div class="login-center">
|
||||||
|
<div class="login-header text-center">
|
||||||
|
<h2>后台登录</h2>
|
||||||
|
</div>
|
||||||
|
<form action="" method="post">
|
||||||
|
<div class="form-group has-feedback feedback-left">
|
||||||
|
<input type="text" placeholder="用户名" class="form-control" name="user" id="username" value="<?php echo @$_POST['user']?>"/>
|
||||||
|
<span class="mdi mdi-account form-control-feedback" aria-hidden="true"></span>
|
||||||
|
</div>
|
||||||
|
<div class="form-group has-feedback feedback-left">
|
||||||
|
<input type="password" placeholder="密码" class="form-control" id="password" name="pass" />
|
||||||
|
<span class="mdi mdi-lock form-control-feedback" aria-hidden="true"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<button class="btn btn-block btn-primary" type="submit" id="login">登录</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<hr>
|
||||||
|
<footer class="col-sm-12 text-center">
|
||||||
|
<p class="m-b-0">Copyright ©2021 - <?php echo(date('Y')); ?> <a href="/"><?php echo explode("-", $conf['title'])[0];?></a></p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="js/bootstrap.min.js"></script>
|
||||||
|
<script type="text/javascript">;</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,132 @@
|
|||||||
|
<?php
|
||||||
|
$title = '加密组管理';
|
||||||
|
include './head.php';
|
||||||
|
?>
|
||||||
|
<main class="lyear-layout-content">
|
||||||
|
|
||||||
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<?php
|
||||||
|
$set = isset($_GET['set']) ? $_GET['set'] : null;
|
||||||
|
if ($set == 'add') {
|
||||||
|
echo '<h4>新增加密组</h4>
|
||||||
|
<div class="panel-body"><form action="./pwd.php?set=add_submit" method="POST">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>*加密组名称:</label><br>
|
||||||
|
<input type="text" class="form-control" name="pwd_name" value="" required>
|
||||||
|
<small class="help-block">加密组名称,如:<code>会员组</code></small>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>*加密组密码:</label><br>
|
||||||
|
<input type="text" class="form-control" name="pwd_key" value="" required>
|
||||||
|
<small class="help-block">加密组的密码(不超过20个字符)<br><code>提示:密码和其他加密组密码相同时,登录时显示同密码的所有加密链接</code></small>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>加密组备注:</label><br>
|
||||||
|
<input type="text" class="form-control" name="pwd_ps" value="">
|
||||||
|
<small class="help-block">加密组备注,仅在后台显示(可不填)</small>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="submit" class="btn btn-primary btn-block" value="添加"></form>
|
||||||
|
</div>
|
||||||
|
<br/><a href="./pwd.php"><<返回加密组列表</a>
|
||||||
|
</div></div>
|
||||||
|
';
|
||||||
|
} elseif ($set == 'edit') {
|
||||||
|
$id = $_GET['id'];
|
||||||
|
$pg = $DB->fetch($DB->query("SELECT * FROM `lylme_pwd` WHERE `pwd_id` = ".$id));
|
||||||
|
echo '<h4>修改加密组信息</h4>
|
||||||
|
<div class="panel-body"><form action="./pwd.php?set=edit_submit&id=' . $id . '" method="POST">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>*加密组名称:</label><br>
|
||||||
|
<input type="text" class="form-control" name="pwd_name" value="'.$pg['pwd_name'].'" required>
|
||||||
|
<small class="help-block">加密组名称,如:<code>会员组</code></small>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>*加密组密码:</label><br>
|
||||||
|
<input type="text" class="form-control" name="pwd_key" value="'.$pg['pwd_key'].'" required>
|
||||||
|
<small class="help-block">加密组的密码(不超过20个字符)<br><code>提示:密码和其他加密组密码相同时,登录时显示同密码的所有加密链接</code></small>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>加密组备注:</label><br>
|
||||||
|
<input type="text" class="form-control" name="pwd_ps" value="'.$pg['pwd_key'].'">
|
||||||
|
<small class="help-block">加密组备注,仅在后台显示(可不填)</small>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="submit" class="btn btn-primary btn-block" value="修改"></form>
|
||||||
|
</div>
|
||||||
|
<br/><a href="./pwd.php"><<返回加密组列表</a>
|
||||||
|
</div></div>
|
||||||
|
';
|
||||||
|
} elseif ($set == 'add_submit') {
|
||||||
|
$pwd_name = $_POST['pwd_name'];
|
||||||
|
$pwd_key = $_POST['pwd_key'];
|
||||||
|
$pwd_ps = $_POST['pwd_ps'];
|
||||||
|
if (empty($pwd_name) || empty($pwd_key)) {
|
||||||
|
echo '<script>alert("失败,请确保带星号的项目都不为空!");history.go(-1);</script>';
|
||||||
|
}else {
|
||||||
|
$sql = "INSERT INTO `lylme_pwd` (`pwd_id`, `pwd_name`, `pwd_key`, `pwd_ps`) VALUES (NULL, '".$pwd_name."', '".$pwd_key."', '".$pwd_ps."');";
|
||||||
|
if($DB->query($sql)) {
|
||||||
|
echo '<script>window.location.href="./pwd.php";</script>';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo '<script>alert("添加失败");history.go(-1);</script>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} elseif ($set == 'edit_submit') {
|
||||||
|
$id = $_GET['id'];
|
||||||
|
$pwd_name = $_POST['pwd_name'];
|
||||||
|
$pwd_key = $_POST['pwd_key'];
|
||||||
|
$pwd_ps = $_POST['pwd_ps'];
|
||||||
|
if (empty($pwd_name) || empty($pwd_key)) {
|
||||||
|
echo '<script>alert("失败,请确保带星号的项目都不为空!");history.go(-1);</script>';
|
||||||
|
}else {
|
||||||
|
$sql = "UPDATE `lylme_pwd` SET `pwd_name` = '".$pwd_name."', `pwd_key` = '".$pwd_key."', `pwd_ps` = '".$pwd_ps."' WHERE `lylme_pwd`.`pwd_id` = ".$id.";";
|
||||||
|
if($DB->query($sql)) {
|
||||||
|
echo '<script>window.location.href="./pwd.php";</script>';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo '<script>alert("修改失败'.$sql.'");history.go(-1);</script>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} elseif ($set == 'delete') {
|
||||||
|
$id = $_GET['id'];
|
||||||
|
$delsql = "DELETE FROM `lylme_pwd` WHERE `lylme_pwd`.`pwd_id` = ".$id;
|
||||||
|
if ($DB->query($delsql)){
|
||||||
|
echo '<script>window.location.href="./pwd.php";</script>';
|
||||||
|
}else{
|
||||||
|
echo '<script>alert("删除失败!");history.go(-1);</script>';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<div class="alert alert-info"><h4>链接加密</h4><li>加密后的链接地址在本页面显示为<font color="#f96197">粉色</font>,以便标识</li><li>加密分组后该分组下的链接单独设置的加密将失效,删除分组的加密后即可恢复</li><li><b>加密后链接只能使用密码登录后方可查看</b></li><li>若多个加密组使用相同的密码,登录后会同时显示使用该密码的所有链接</li><li>默认登录地址:<code>'. siteurl().'/pwd</code>(可自行修改目录名更改)</li><br><a href="./pwd.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></tr></thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$pgs = $DB->query("SELECT * FROM `lylme_pwd`");
|
||||||
|
while ($pg = $DB->fetch($pgs)) {
|
||||||
|
echo '<tr><td>' . $pg['pwd_name'] . '</td>
|
||||||
|
<td>' . $pg['pwd_key'] . '</td><td>' . $pg['pwd_ps'] . '</td><td> <a href="./pwd.php?set=edit&id=' . $pg['pwd_id'] . '" class="btn btn-info btn-xs">编辑</a> <a href="./pwd.php?set=delete&id=' . $pg['pwd_id'] . '" class="btn btn-xs btn-danger" onclick="return confirm(\'是否删除加密组 ' . $pg['pwd_name'] .'\');">删除</a> </td></tr>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
include './footer.php';
|
||||||
|
?>
|
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
include_once("../include/common.php");
|
||||||
|
if(isset($islogin)==1) {
|
||||||
|
} else exit("<script language='javascript'>window.location.href='./login.php';</script>");
|
||||||
|
|
||||||
|
echo '<div class="alert alert-info">系统共有 <b>' . $groupsrows . '</b> 个分组<br/><a href="./group.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>
|
||||||
|
<tbody>';
|
||||||
|
|
||||||
|
$sql = " 1";
|
||||||
|
$rs = $DB->query("SELECT * FROM lylme_groups WHERE{$sql} order by group_order asc");
|
||||||
|
while ($res = $DB->fetch($rs)) {
|
||||||
|
$pwd = $DB->get_row("SELECT `pwd_id`, `pwd_key` FROM `lylme_pwd` WHERE `pwd_id` = ".$res['group_pwd'])['pwd_key'];
|
||||||
|
echo '<tr><td><input type="hidden" name="group_id" value="'.$res['group_id'].'">' . $res['group_name'] . '</td><td>
|
||||||
|
<button class="btn btn-primary btn-xs sort-up">上移</button> <button class="btn btn-cyan btn-xs sort-down">下移</button></td>
|
||||||
|
<td>'. $DB->num_rows($DB->query("SELECT `id` FROM `lylme_links` WHERE `group_id` =".$res['group_id'])).'</td>
|
||||||
|
<td>';
|
||||||
|
if($pwd||$res['group_pwd']){
|
||||||
|
if(empty($pwd)){
|
||||||
|
echo '<font color="red">失效[请重新设置加密组]</font>';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo '<font color="f96197">'.$pwd.'</font>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{echo '<font color="green">未加密</font>';}
|
||||||
|
echo ' </td><td>';
|
||||||
|
|
||||||
|
if($res['group_status']){
|
||||||
|
echo '<button class="btn btn-pink btn-xs" onclick="off_group('.$res['group_id'].')">禁用</button>';
|
||||||
|
}else{
|
||||||
|
echo '<button class="btn btn-success btn-xs" onclick="on_group('.$res['group_id'].')">启用</button>';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo'</td><td> <a href="./group.php?set=edit&id=' . $res['group_id'] . '" class="btn btn-info btn-xs">编辑</a> <button class="btn btn-xs btn-danger" onclick="del_group('.$res['group_id'].')">删除</button></td></tr>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
@ -0,0 +1,82 @@
|
|||||||
|
<?php
|
||||||
|
include_once("../include/common.php");
|
||||||
|
if(isset($islogin)==1) {
|
||||||
|
} else exit("<script language='javascript'>window.location.href='./login.php';</script>");
|
||||||
|
|
||||||
|
$page = isset($_GET['page'])? $_GET['page'] : 1;
|
||||||
|
$groups = $DB->query("SELECT * FROM `lylme_groups` ORDER BY `group_order` ASC"); //获取分组
|
||||||
|
$gpwd = $DB->fetch($DB->query("SELECT `group_id`, `group_pwd` FROM `lylme_groups` WHERE `group_id` = ".$page))["group_pwd"]; //分组加密状态
|
||||||
|
$rs = $DB->query("SELECT * FROM `lylme_links` WHERE `group_id` = ".$page." ORDER BY `lylme_links`.`id` ASC"); //获取链接
|
||||||
|
$grouprows=$DB->num_rows($rs);
|
||||||
|
echo '<div class="alert alert-info">系统收录: <b>' . $linksrows . '</b> 个链接 / 当前分组: <b>'.$grouprows.'</b>个链接
|
||||||
|
<i class="mdi mdi-help-circle tips"></i>
|
||||||
|
</div>
|
||||||
|
<nav><ul class="pagination">';
|
||||||
|
while ($group = $DB->fetch($groups)) {
|
||||||
|
echo '<li ';
|
||||||
|
if($page ==$group["group_id"]){echo 'class="active"';}
|
||||||
|
echo '><a href="?page='.$group["group_id"].'">'.$group["group_name"].'</a></li>';
|
||||||
|
}
|
||||||
|
echo '</ul>
|
||||||
|
</nav>
|
||||||
|
<!-- 功能按钮 S-->
|
||||||
|
<div id="toolbar" class="toolbar-btn-action">
|
||||||
|
<a href="./link.php?set=add" class="btn btn-primary btn-label">
|
||||||
|
<label><i class="mdi mdi-plus" aria-hidden="true"></i></label>新增</a>
|
||||||
|
<button id="btn_edit" type="button" class="btn btn-success btn-label" onclick="on_link()">
|
||||||
|
<label><i class="mdi mdi-check" aria-hidden="true"></i></label>启用</button>
|
||||||
|
<button id="btn_edit" type="button" class="btn btn-warning btn-label" onclick="off_link()">
|
||||||
|
<label><i class="mdi mdi-block-helper" aria-hidden="true"></i></label>禁用 </button>
|
||||||
|
<button id="btn_delete" type="button" class="btn btn-danger btn-label" onclick="del_link()">
|
||||||
|
<label><i class="mdi mdi-window-close" aria-hidden="true"></i></label>删除</button>
|
||||||
|
<button id="edit_group" type="button" class="btn btn-info btn-label" onclick="edit_group(mv_group)">
|
||||||
|
<label><i class="mdi mdi-account-edit" aria-hidden="true"></i></label>移动</button>
|
||||||
|
';
|
||||||
|
if(empty($gpwd)){
|
||||||
|
echo '<button id="btn_delete" type="button" class="btn btn btn-pink btn-label" onclick="pwd_link(pwd_list)">
|
||||||
|
<label><i class="mdi mdi-key-variant" aria-hidden="true"></i></label>加密</button>';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
echo '<button id="btn_delete" type="button" class="btn btn btn-pink btn-label" onclick="pwd_links()">
|
||||||
|
<label><i class="mdi mdi-key-variant" aria-hidden="true"></i></label>分组已加密</button>';
|
||||||
|
}
|
||||||
|
echo '
|
||||||
|
<button class="btn btn-label btn btn-purple" id="save_order" style="display:none" onclick="save_order()">
|
||||||
|
<label><i class="mdi mdi-checkbox-marked-circle-outline"></i></label> 保存排序</button>
|
||||||
|
</div>
|
||||||
|
<!-- 功能按钮 E -->
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-striped" id="classlisttbody">
|
||||||
|
<thead><tr style="cursor: pointer">
|
||||||
|
<th><input type="checkbox" class="checkbox-parent" id="check_all" onclick="check_all()"></th>
|
||||||
|
<th>排序</th><th>名称</th><th>链接</th><th>分组</th><th>启用</th><th>操作</th></tr></thead>
|
||||||
|
<tbody id="link">';
|
||||||
|
|
||||||
|
$rs = $DB->query("SELECT * FROM `lylme_links` WHERE `group_id` = ".$page." ORDER BY `lylme_links`.`link_order` ASC");
|
||||||
|
while ($res = $DB->fetch($rs)) {
|
||||||
|
|
||||||
|
echo '<tr><td><input type="checkbox" name="link-check" value="'.$res['id'].'"></td>
|
||||||
|
<!-- 链接排序 S -->
|
||||||
|
<td><a class="btn btn-success btn-xs sort-goup" data-toggle="tooltip" data-placement="top" title="移到顶部"><i class="mdi mdi-arrow-collapse-up"></i></a>
|
||||||
|
<a class="btn btn-info btn-xs sort-godown" data-toggle="tooltip" data-placement="top" title="移到底部"><i class="mdi mdi-arrow-collapse-down"></i></a>
|
||||||
|
<a class="btn btn-primary btn-xs sort-up" data-toggle="tooltip" data-placement="top" title="移到上一行"><i class="mdi mdi-arrow-up"></i></a>
|
||||||
|
<a class="btn btn-cyan btn-xs sort-down" data-toggle="tooltip" data-placement="top" title="移到下一行"><i class="mdi mdi-arrow-down"></i></a></td>
|
||||||
|
<!-- 链接排序 E -->
|
||||||
|
<td class="lylme">' . $res['name'] . '</td><td>';
|
||||||
|
if(!empty($res['link_pwd'])||!empty($gpwd)){ echo '<font color="#f96197">'. $res['url'] .'</font>';}else{echo $res['url'];}
|
||||||
|
echo
|
||||||
|
'</td><td>'. $DB->fetch($DB->query("SELECT * FROM `lylme_groups` WHERE `group_id` = " . $res['group_id'])) ["group_name"]. '</td>
|
||||||
|
<td>';
|
||||||
|
if($res['link_status']=="0"){ echo '<font color="red">禁用</font>';}else{echo '<font color="green">启用</font>';}
|
||||||
|
$de_llink = "del_link('".$res['id']."')";
|
||||||
|
echo'</td>
|
||||||
|
<td><a href="./link.php?set=edit&id=' . $res['id'] . '" class="btn btn-info btn-primary">编辑</a> <button class="btn btn-primary btn-danger" onclick="'.$de_llink.'">删除</button></td></tr>';
|
||||||
|
;
|
||||||
|
}
|
||||||
|
echo '
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>';
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,86 @@
|
|||||||
|
<?php
|
||||||
|
$title = '主题设置';
|
||||||
|
include './head.php';
|
||||||
|
function theme($theme,$str){
|
||||||
|
$theme_ini = ROOT.'template/'.$theme.'/theme.ini';
|
||||||
|
$arr = json_decode(file_get_contents($theme_ini), true);
|
||||||
|
if(!empty($arr[$str])){
|
||||||
|
return strip_tags($arr[$str]);
|
||||||
|
}
|
||||||
|
else if($str =='theme_version'){
|
||||||
|
return '未知';
|
||||||
|
}
|
||||||
|
else if($str =='theme_name'){
|
||||||
|
return $theme;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$set=isset($_GET['set'])?$_GET['set']:null;
|
||||||
|
if(!empty($set)) {
|
||||||
|
if(saveSetting('template',$set)) {
|
||||||
|
exit('<script>alert("主题修改成功!");window.location.href="./theme.php";</script>');
|
||||||
|
} else {
|
||||||
|
exit('<script>alert("主题修改失败!");window.location.href="./theme.php";</script>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<main class="lyear-layout-content">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header"><h4>主题设置 <a href="https://spage.lylme.com/themes" target="_blank">更多主题 >></a></h4></div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>主题名称</th>
|
||||||
|
<th>主题说明</th>
|
||||||
|
<th>主题作者</th>
|
||||||
|
<th>在线演示</th>
|
||||||
|
<th>选择主题</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$theme_path = ROOT.'template/';
|
||||||
|
$themes = glob($theme_path."*", GLOB_ONLYDIR);
|
||||||
|
foreach($themes as $theme) {
|
||||||
|
$theme = str_replace($theme_path ,"" , $theme);
|
||||||
|
echo'<tr><td><h4>'.theme($theme,"theme_name").' </h4>版本:'.theme($theme,"theme_version").'</td>';
|
||||||
|
|
||||||
|
echo '<td><p>'.theme($theme,"theme_explain").'</p>';
|
||||||
|
if(theme($theme,"theme_course")){
|
||||||
|
echo ' <a href="'.theme($theme,"theme_course").'" target="_blank">主题教程</a>';
|
||||||
|
}
|
||||||
|
echo'</td>';
|
||||||
|
echo '<td><p>'.theme($theme,"author_name").'</p>';
|
||||||
|
if(theme($theme,"author_link")){
|
||||||
|
echo ' <a href="'.theme($theme,"author_link").'" target="_blank">作者主页</a>';
|
||||||
|
}
|
||||||
|
echo '</td><td>';
|
||||||
|
if(theme($theme,"theme_demo")){
|
||||||
|
echo '<p><a class="btn btn-default" href="'.theme($theme,"theme_demo").'" target="_blank">在线演示</a></p>';
|
||||||
|
}
|
||||||
|
echo '</td>';
|
||||||
|
if($conf['template'] == $theme) {
|
||||||
|
echo '<td><p class="btn btn-default disabled">当前使用</p></td>';
|
||||||
|
} else {
|
||||||
|
echo '<td><a href="./theme.php?set='.$theme.'" class="btn btn-label btn-primary"><label><i class="mdi mdi-checkbox-marked-circle-outline"></i></label>使用</a></td>';
|
||||||
|
}
|
||||||
|
echo '</tr>'."\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<?php
|
||||||
|
include './footer.php';
|
||||||
|
?>
|
@ -0,0 +1,128 @@
|
|||||||
|
<?php
|
||||||
|
include("../include/common.php");
|
||||||
|
$grouplists =$DB->query("SELECT * FROM `lylme_groups`");
|
||||||
|
if(!empty($url = isset($_GET['url']) ? $_GET['url'] : null)) {
|
||||||
|
header('Content-Type:application/json');
|
||||||
|
//获取网站信息
|
||||||
|
$head = get_head($_GET['url']);
|
||||||
|
$head = json_encode($head,JSON_UNESCAPED_UNICODE); //将合并后的数组转换为json
|
||||||
|
exit($head); //输出json
|
||||||
|
|
||||||
|
} else if(isset($_GET['submit']) == 'post') {
|
||||||
|
if(isset($_REQUEST['authcode'])) {
|
||||||
|
session_start();
|
||||||
|
if(strtolower($_REQUEST['authcode'])== $_SESSION['authcode']) {
|
||||||
|
$status = isset($conf["apply"]) ? $conf["apply"] :0;
|
||||||
|
if($status==2) {
|
||||||
|
exit('{"code": "400", "msg": "网站已关闭收录"}');
|
||||||
|
}
|
||||||
|
exit(apply($_POST['name'], $_POST['url'], $_POST['icon'], $_POST['group_id'], $status));
|
||||||
|
} else {
|
||||||
|
exit('{"code": "-6", "msg": "验证码错误"}');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
|
||||||
|
<title>申请收录 - <?php echo explode("-", $conf['title'])[0];
|
||||||
|
?></title>
|
||||||
|
<link rel="icon" href="<?php echo get_urlpath($conf['logo'],siteurl().'/apply');?>" type="image/ico">
|
||||||
|
<link href="https://cdn.lylme.com/admin/lyear/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link href="https://cdn.lylme.com/admin/lyear/css/style.min.css" rel="stylesheet">
|
||||||
|
<style>#loading{position:absolute;left:0;top:0;height:100vh;width:100vw;z-index:100;display:none;align-items:center;justify-content:center;color:#bbb;font-size:16px}#loading>img{height:18px;width:18px}.lylme-wrapper{position:relative}.lylme-form{display:flex !important;min-height:100vh;align-items:center !important;justify-content:center !important}.lylme-form:after{content:'';min-height:inherit;font-size:0}.lylme-center{background:#fff;min-width:29.25rem;padding:30px;border-radius:20px;margin:2.85714em}.lylme-header{margin-bottom:1.5rem !important}.lylme-center .has-feedback.feedback-left .form-control-feedback{left:0;right:auto;width:38px;height:38px;line-height:38px;z-index:4;color:#dcdcdc}.lylme-center .has-feedback.feedback-left.row .form-control-feedback{left:15px}.code{height:38px}.apply_gg{margin:20px 0;font-size:15px;line-height:2}.home{text-decoration:none;color:#bbb;line-height:2}li{list-style-type:none}ol,ul{padding-left:10px}</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="loading"><img src="https://cdn.lylme.com/admin/lyear/img/loading.gif"/>
|
||||||
|
正在获取....</div>
|
||||||
|
<?php
|
||||||
|
if(!empty($background = background())) {
|
||||||
|
$background = str_replace('./','../',$background);
|
||||||
|
echo '<div class="row lylme-wrapper" style="background-image: url('.$background.');background-size: cover;">';
|
||||||
|
} else {
|
||||||
|
echo '<div class="row lylme-wrapper">';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="lylme-form">
|
||||||
|
<div class="lylme-center">
|
||||||
|
<?php if($conf["apply"]==2) {
|
||||||
|
exit('<div class="lylme-header text-center"><h2>网站已关闭收录</h2></div>'. $conf['apply_gg']. '</div>');
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="lylme-header text-center"><h2>申请收录</h2></div>
|
||||||
|
<div class="apply_gg">
|
||||||
|
<?php echo $conf['apply_gg']?>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>*URL链接地址:</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" class="form-control" name="url" placeholder="完整链接或域名" value="" onchange="gurl()" required >
|
||||||
|
<span class="input-group-btn">
|
||||||
|
<button class="btn btn-default" onclick="get_url()" type="button">自动获取</button>
|
||||||
|
</span>
|
||||||
|
</div></div>
|
||||||
|
<div class="form-group has-feedback feedback-left row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<label>* 选择分组:</label>
|
||||||
|
<select title="分组" class="form-control" name="group_id" required>
|
||||||
|
<option value="">请选择</option>
|
||||||
|
<?php
|
||||||
|
while($grouplist = $DB->fetch($grouplists)) {
|
||||||
|
echo '
|
||||||
|
<option value="'.$grouplist["group_id"].'">'.$grouplist["group_name"].'</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
<span class="mdi mdi-folder form-control-feedback" aria-hidden="true"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group has-feedback feedback-left row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<label>* 网站名称:</label>
|
||||||
|
<input type="text" class="form-control" id="title" name="name" value="" required placeholder="网站名称">
|
||||||
|
<span class="mdi mdi-format-title form-control-feedback" aria-hidden="true"></span>
|
||||||
|
<small class="help-block">填写网站名称</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>网站图标:</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<!-- 用于展示上传文件名的表单 -->
|
||||||
|
<input type="text" id="icon" class="form-control" name="icon" placeholder="填写图标的URL地址">
|
||||||
|
<!-- 点击触发按钮 -->
|
||||||
|
<span class="input-group-btn">
|
||||||
|
<input type="file" id="file" onchange="uploadimg()" accept="image/png, image/jpeg,image/gif,image/x-icon" style="display: none" />
|
||||||
|
<button class="btn btn-default" id="uploadImage" onclick="$('#file').click();" type="button">选择</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<img id="review" src="" width="100px" height="100px" class="center-block" style="display: none;"/>
|
||||||
|
<span class="mdi mdi-emoticon form-control-feedback" aria-hidden="true"></span>
|
||||||
|
<small class="help-block">填写图标的<code>URL</code>地址,如:<code>http://www.xxx.com/logo.png</code><br>
|
||||||
|
部分网站无法自动获取,请手动填写</small>
|
||||||
|
</div>
|
||||||
|
<div class="form-group has-feedback feedback-left row">
|
||||||
|
<label>* 验证码:</label>
|
||||||
|
<div class="col-xs-8">
|
||||||
|
<input type="text" name="authcode" class="form-control" placeholder="验证码" required>
|
||||||
|
<span class="mdi mdi-check form-control-feedback" aria-hidden="true"></span>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-4">
|
||||||
|
<img id="captcha_img" title="验证码" src='../include/validatecode.php' class="pull-right code" onclick="recode()"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button class="btn btn-primary btn-block" onclick="submit()">提交</button>
|
||||||
|
</div>
|
||||||
|
<center><p><a href="../" class="home">返回首页</a></p><?php echo $conf['copyright']?></center>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-2-M/jquery/3.5.1/jquery.min.js" type="application/javascript"></script>
|
||||||
|
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/layer/3.1.1/layer.min.js" type="application/javascript"></script>
|
||||||
|
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/sweetalert/2.1.2/sweetalert.min.js" type="application/javascript"></script>
|
||||||
|
<script src="https://cdn.lylme.com/lylme_spage/js/apply.js" type="application/javascript"></script>
|
||||||
|
</html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 188 KiB |
Binary file not shown.
After Width: | Height: | Size: 7.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
/*数据库配置*/
|
||||||
|
$dbconfig=array(
|
||||||
|
"host" => "localhost", //数据库服务器
|
||||||
|
"port" => 3306, //数据库端口
|
||||||
|
"user" => "", //数据库用户名
|
||||||
|
"pwd" => "", //数据库密码
|
||||||
|
"dbname" => "", //数据库名
|
||||||
|
);
|
||||||
|
?>
|
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
@header ("Content-type:text/html;charset=utf-8");
|
||||||
|
define('IN_CRONLITE', true);
|
||||||
|
define('SYS_KEY', 'lylme_key');
|
||||||
|
define('SYSTEM_ROOT', dirname(__FILE__).'/');
|
||||||
|
define('ROOT', dirname(SYSTEM_ROOT).'/');
|
||||||
|
error_reporting(0);
|
||||||
|
require ROOT.'config.php';
|
||||||
|
if(!defined('SQLITE') && (!$dbconfig['user']||!$dbconfig['pwd']||!$dbconfig['dbname']))
|
||||||
|
{
|
||||||
|
@unlink(ROOT.'install/install.lock');
|
||||||
|
header('Content-type:text/html;charset=utf-8');
|
||||||
|
echo '你还没安装!<a href="install/">点此安装</a>';
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
include_once(SYSTEM_ROOT."db.class.php");
|
||||||
|
$DB=new DB($dbconfig['host'],$dbconfig['user'],$dbconfig['pwd'],$dbconfig['dbname'],$dbconfig['port']);
|
||||||
|
$rs= $DB->query("SELECT * FROM `lylme_config`");
|
||||||
|
while($row = $DB->fetch($rs)) $conf[$row['k']]=$row['v'];
|
||||||
|
include_once(SYSTEM_ROOT."lists.php");
|
||||||
|
include_once(SYSTEM_ROOT."function.php");
|
||||||
|
include_once(SYSTEM_ROOT."member.php");
|
||||||
|
include_once(SYSTEM_ROOT."tj.php");
|
||||||
|
include_once(SYSTEM_ROOT."version.php");
|
||||||
|
include_once(SYSTEM_ROOT."updbase.php");
|
||||||
|
$linksrows=$DB->num_rows($DB->query("SELECT * FROM `lylme_links`"));
|
||||||
|
$groupsrows=$DB->num_rows($DB->query("SELECT * FROM `lylme_groups`"));
|
||||||
|
$cdnpublic = cdnpublic($conf['cdnpublic']);
|
||||||
|
$templatepath ='./template/'.$conf["template"];
|
||||||
|
$template = $templatepath.'/index.php';
|
||||||
|
$background = $conf["background"];
|
||||||
|
$wap_background = $conf["wap_background"];
|
||||||
|
if(checkmobile()){if(!empty($wap_background)){$background_img = $wap_background;}
|
||||||
|
else{$background_img = $background; }}else{$background_img = $background; }
|
||||||
|
?>
|
@ -0,0 +1,191 @@
|
|||||||
|
<?php
|
||||||
|
//MySQL、MySQLi、SQLite 三合一数据库操作类
|
||||||
|
if(!defined('IN_CRONLITE'))exit();
|
||||||
|
|
||||||
|
$nomysqli=false;
|
||||||
|
|
||||||
|
if(defined('SQLITE')==true){
|
||||||
|
class DB {
|
||||||
|
var $link = null;
|
||||||
|
|
||||||
|
function __construct($db_file){
|
||||||
|
global $siteurl;
|
||||||
|
$this->link = new PDO('sqlite:'.ROOT.'includes/sqlite/'.$db_file.'.db');
|
||||||
|
if (!$this->link) die('Connection Sqlite failed.\n');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function fetch($q){
|
||||||
|
return $q->fetch();
|
||||||
|
}
|
||||||
|
function get_row($q){
|
||||||
|
$sth = $this->link->query($q);
|
||||||
|
return $sth->fetch();
|
||||||
|
}
|
||||||
|
function count($q){
|
||||||
|
$sth = $this->link->query($q);
|
||||||
|
return $sth->fetchColumn();
|
||||||
|
}
|
||||||
|
function query($q){
|
||||||
|
return $this->result=$this->link->query($q);
|
||||||
|
}
|
||||||
|
function affected(){
|
||||||
|
return $this->result->rowCount();
|
||||||
|
}
|
||||||
|
function error(){
|
||||||
|
$error = $this->link->errorInfo();
|
||||||
|
return '['.$error[1].'] '.$error[2];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif(extension_loaded('mysqli') && $nomysqli==false) {
|
||||||
|
class DB {
|
||||||
|
var $link = null;
|
||||||
|
|
||||||
|
function __construct($db_host,$db_user,$db_pass,$db_name,$db_port){
|
||||||
|
|
||||||
|
$this->link = mysqli_connect($db_host, $db_user, $db_pass, $db_name, $db_port);
|
||||||
|
|
||||||
|
if (!$this->link) die('Connect Error (' . mysqli_connect_errno() . ') '.mysqli_connect_error());
|
||||||
|
|
||||||
|
//mysqli_select_db($this->link, $db_name) or die(mysqli_error($this->link));
|
||||||
|
|
||||||
|
|
||||||
|
mysqli_query($this->link,"set sql_mode = ''");
|
||||||
|
//字符转换,读库
|
||||||
|
mysqli_query($this->link,"set character set 'utf8'");
|
||||||
|
//写库
|
||||||
|
mysqli_query($this->link,"set names 'utf8'");
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
function fetch($q){
|
||||||
|
return mysqli_fetch_assoc($q);
|
||||||
|
}
|
||||||
|
function num_rows($result){
|
||||||
|
return mysqli_num_rows($result);
|
||||||
|
}
|
||||||
|
function get_row($q){
|
||||||
|
$result = mysqli_query($this->link,$q);
|
||||||
|
return mysqli_fetch_assoc($result);
|
||||||
|
}
|
||||||
|
function get_column($q){
|
||||||
|
$result = mysqli_query($this->link,$q);
|
||||||
|
$row = mysqli_fetch_array($result);
|
||||||
|
return $row[0];
|
||||||
|
}
|
||||||
|
function count($q){
|
||||||
|
$result = mysqli_query($this->link,$q);
|
||||||
|
$count = mysqli_fetch_array($result);
|
||||||
|
return $count[0];
|
||||||
|
}
|
||||||
|
function query($q){
|
||||||
|
return mysqli_query($this->link,$q);
|
||||||
|
}
|
||||||
|
function escape($str){
|
||||||
|
return mysqli_real_escape_string($this->link,$str);
|
||||||
|
}
|
||||||
|
function insert($q){
|
||||||
|
if(mysqli_query($this->link,$q))
|
||||||
|
return mysqli_insert_id($this->link);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
function affected(){
|
||||||
|
return mysqli_affected_rows($this->link);
|
||||||
|
}
|
||||||
|
function insert_array($table,$array){
|
||||||
|
$q = "INSERT INTO `$table`";
|
||||||
|
$q .=" (`".implode("`,`",array_keys($array))."`) ";
|
||||||
|
$q .=" VALUES ('".implode("','",array_values($array))."') ";
|
||||||
|
|
||||||
|
if(mysqli_query($this->link,$q))
|
||||||
|
return mysqli_insert_id($this->link);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
function error(){
|
||||||
|
$error = mysqli_error($this->link);
|
||||||
|
$errno = mysqli_errno($this->link);
|
||||||
|
return '['.$errno.'] '.$error;
|
||||||
|
}
|
||||||
|
function close(){
|
||||||
|
$q = mysqli_close($this->link);
|
||||||
|
return $q;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else { // we use the old mysql
|
||||||
|
class DB {
|
||||||
|
var $link = null;
|
||||||
|
|
||||||
|
function __construct($db_host,$db_user,$db_pass,$db_name,$db_port){
|
||||||
|
|
||||||
|
$this->link = @mysql_connect($db_host.':'.$db_port, $db_user, $db_pass);
|
||||||
|
|
||||||
|
if (!$this->link) die('Connect Error (' . mysql_errno() . ') '.mysql_error());
|
||||||
|
|
||||||
|
mysql_select_db($db_name, $this->link) or die(mysql_error($this->link));
|
||||||
|
|
||||||
|
mysql_query("set sql_mode = ''");
|
||||||
|
//字符转换,读库
|
||||||
|
mysql_query("set character set 'utf8'");
|
||||||
|
//写库
|
||||||
|
mysql_query("set names 'utf8'");
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
function fetch($q){
|
||||||
|
return mysql_fetch_assoc($q);
|
||||||
|
}
|
||||||
|
function num_rows($result){
|
||||||
|
return mysql_num_rows($result);
|
||||||
|
}
|
||||||
|
function get_row($q){
|
||||||
|
$result = mysql_query($q, $this->link);
|
||||||
|
return mysql_fetch_assoc($result);
|
||||||
|
}
|
||||||
|
function get_column($q){
|
||||||
|
$result = mysql_query($q, $this->link);
|
||||||
|
$row = mysql_fetch_array($result);
|
||||||
|
return $row[0];
|
||||||
|
}
|
||||||
|
function count($q){
|
||||||
|
$result = mysql_query($q, $this->link);
|
||||||
|
$count = mysql_fetch_array($result);
|
||||||
|
return $count[0];
|
||||||
|
}
|
||||||
|
function query($q){
|
||||||
|
return mysql_query($q, $this->link);
|
||||||
|
}
|
||||||
|
function escape($str){
|
||||||
|
return mysql_real_escape_string($str, $this->link);
|
||||||
|
}
|
||||||
|
function affected(){
|
||||||
|
return mysql_affected_rows($this->link);
|
||||||
|
}
|
||||||
|
function insert($q){
|
||||||
|
if(mysql_query($q, $this->link))
|
||||||
|
return mysql_insert_id($this->link);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
function insert_array($table,$array){
|
||||||
|
$q = "INSERT INTO `$table`";
|
||||||
|
$q .=" (`".implode("`,`",array_keys($array))."`) ";
|
||||||
|
$q .=" VALUES ('".implode("','",array_values($array))."') ";
|
||||||
|
|
||||||
|
if(mysql_query($q, $this->link))
|
||||||
|
return mysql_insert_id($this->link);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
function error(){
|
||||||
|
$error = mysql_error($this->link);
|
||||||
|
$errno = mysql_errno($this->link);
|
||||||
|
return '['.$errno.'] '.$error;
|
||||||
|
}
|
||||||
|
function close(){
|
||||||
|
$q = mysql_close($this->link);
|
||||||
|
return $q;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
if(!empty($_GET['url'])){
|
||||||
|
$url = $_GET['url'];
|
||||||
|
header("Location:$url");
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
include("common.php");
|
||||||
|
session_start(); //设置session
|
||||||
|
if($_POST['exit']=='exit'){
|
||||||
|
//注销登录
|
||||||
|
$_SESSION['pass'] = 0;
|
||||||
|
$_SESSION['list'] = array();
|
||||||
|
header("Location: ".$_SERVER['HTTP_REFERER']);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
if($_SESSION['pass'] != 1){
|
||||||
|
//未登录
|
||||||
|
$pass = daddslashes($_POST['pass']);
|
||||||
|
if(!empty($pass)){
|
||||||
|
//用户提交登录
|
||||||
|
$show = array();
|
||||||
|
$pwds = $DB->query("SELECT `pwd_id`, `pwd_key` FROM `lylme_pwd` WHERE `pwd_key` LIKE '".$pass."';");
|
||||||
|
while ($pwd = $DB->fetch($pwds)) {
|
||||||
|
array_push($show,$pwd[pwd_id]);
|
||||||
|
}
|
||||||
|
if(empty($show)){
|
||||||
|
//无数据
|
||||||
|
exit('<script>alert("密码错误!");window.location.href="'.$_SERVER['HTTP_REFERER'].'";</script>');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
//有数据
|
||||||
|
$_SESSION['list'] = $show;
|
||||||
|
$_SESSION['pass'] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//已登录
|
||||||
|
if(!empty($pass)){
|
||||||
|
$show = array();
|
||||||
|
$pwds = $DB->query("SELECT `pwd_id`, `pwd_key` FROM `lylme_pwd` WHERE `pwd_key` LIKE '".$pass."';");
|
||||||
|
while ($pwd = $DB->fetch($pwds)) {
|
||||||
|
array_push($show,$pwd['pwd_id']);
|
||||||
|
}
|
||||||
|
if(empty($show)){
|
||||||
|
$_SESSION['pass'] = 0;
|
||||||
|
$_SESSION['list'] = array();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(basename($_SERVER['PHP_SELF']) != basename(__FILE__)) return;
|
||||||
|
header("Location: ../");
|
||||||
|
?>
|
@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
// +----------------------------------------------------------+
|
||||||
|
// | LyLme Spage |
|
||||||
|
// +----------------------------------------------------------+
|
||||||
|
// | Copyright (c) 2022 LyLme |
|
||||||
|
// +----------------------------------------------------------+
|
||||||
|
// | File: lists.php |
|
||||||
|
// +----------------------------------------------------------+
|
||||||
|
// | Authors: LyLme <admin@lylme.com> |
|
||||||
|
// | date: 2022-06-10 |
|
||||||
|
// +----------------------------------------------------------+
|
||||||
|
function lists($htmls) {
|
||||||
|
global $DB;
|
||||||
|
$groups = $DB->query("SELECT * FROM `lylme_groups` ORDER BY `group_order` ASC");
|
||||||
|
// 获取分类
|
||||||
|
$i = 0;
|
||||||
|
//初始化循环次数
|
||||||
|
while ($group = $DB->fetch($groups)) {
|
||||||
|
//循环所有分组
|
||||||
|
$html = rearr($group,$htmls);
|
||||||
|
if($group["group_status"]=='0') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if(!in_array($group['group_pwd'],$_SESSION['list'])&&!empty($group['group_pwd'])) {
|
||||||
|
//如果 分组加密未在认证列表 并且分组设置了密码(不显示分组)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$sql = "SELECT * FROM `lylme_links` WHERE `group_id` = " . $group['group_id']." ORDER BY `link_order` ASC;";
|
||||||
|
$group_links = $DB->query($sql);
|
||||||
|
$link_num = $DB->num_rows($group_links);
|
||||||
|
// 获取返回字段条目数量
|
||||||
|
echo $html['g1'].$html['g2'];
|
||||||
|
//输出分组图标和标题
|
||||||
|
if ($link_num == 0) {
|
||||||
|
echo $html['g3'] . "\n\n";
|
||||||
|
$i = 0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
while ($link = $DB->fetch($group_links)) {
|
||||||
|
// 循环每个链接
|
||||||
|
$html = rearr($link,$htmls);
|
||||||
|
// 返回指定分组下的所有字段
|
||||||
|
$lpwd = true;
|
||||||
|
if ($link_num > $i) {
|
||||||
|
$i = $i + 1;
|
||||||
|
if(!empty($group['group_pwd'])&&!empty($link['link_pwd'])) {
|
||||||
|
//分组和链接同时加密
|
||||||
|
//忽略链接加密正常显示分组
|
||||||
|
} else if(!in_array($link['link_pwd'],$_SESSION['list'])&&!empty($link['link_pwd'])) {
|
||||||
|
//当前链接加密
|
||||||
|
$lpwd = false;
|
||||||
|
}
|
||||||
|
if($link['link_status'] && $lpwd ) {
|
||||||
|
echo "\n" .$html['l1'].$html['l2'].$html['l3'];
|
||||||
|
}
|
||||||
|
//输出图标和链接
|
||||||
|
}
|
||||||
|
if ($link_num == $i) {
|
||||||
|
//判断当前分组链接循环完毕
|
||||||
|
echo $html['g3'] . "\n\n";
|
||||||
|
//输出分类结束标签
|
||||||
|
$i = 0;
|
||||||
|
break;
|
||||||
|
//重置$i为0跳出当前循环
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
if(isset($_COOKIE["admin_token"]))
|
||||||
|
{
|
||||||
|
$token=authcode(daddslashes($_COOKIE['admin_token']), 'DECODE', SYS_KEY);
|
||||||
|
list($user, $sid) = explode("\t", $token);
|
||||||
|
$session=md5($conf['admin_user'].$conf['admin_pwd']);
|
||||||
|
if($session==$sid) {
|
||||||
|
$islogin=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
$file = SYSTEM_ROOT."/log.txt";
|
||||||
|
if(!file_exists($file)){
|
||||||
|
touch($file);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$fp=fopen($file,'r+');
|
||||||
|
$content='';
|
||||||
|
if (flock($fp,LOCK_EX)){
|
||||||
|
while (($buffer=fgets($fp,1024))!=false){
|
||||||
|
$content=$content.$buffer;
|
||||||
|
}
|
||||||
|
$tjdate=unserialize($content);
|
||||||
|
//设置记录键值
|
||||||
|
$tjtotal = 'total';
|
||||||
|
$tjmonth = date('Ym');
|
||||||
|
$tjtoday = date('Ymd');
|
||||||
|
$tjyesterday = date('Ymd',strtotime("-1 day"));
|
||||||
|
$tongji = array();
|
||||||
|
if(strpos($_SERVER['REQUEST_URI'],'admin')==false){
|
||||||
|
|
||||||
|
$tongji[$tjtotal] = $tjdate[$tjtotal] + 1;
|
||||||
|
// 本月访问量增加
|
||||||
|
$tongji[$tjmonth] = $tjdate[$tjmonth] + 1;
|
||||||
|
// 今日访问增加
|
||||||
|
$tongji[$tjtoday] = $tjdate[$tjtoday] + 1;
|
||||||
|
//保持昨天访问
|
||||||
|
$tongji[$tjyesterday] = $tjdate[$tjyesterday];
|
||||||
|
ftruncate($fp,0); // 将文件截断到给定的长度
|
||||||
|
rewind($fp); // 倒回文件指针的位置
|
||||||
|
fwrite($fp, serialize($tongji));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$tongji[$tjtotal] = $tjdate[$tjtotal] ;
|
||||||
|
// 本月访问量增加
|
||||||
|
$tongji[$tjmonth] = $tjdate[$tjmonth];
|
||||||
|
// 今日访问增加
|
||||||
|
$tongji[$tjtoday] = $tjdate[$tjtoday];
|
||||||
|
//保持昨天访问
|
||||||
|
$tongji[$tjyesterday] = $tjdate[$tjyesterday];
|
||||||
|
}
|
||||||
|
flock($fp,LOCK_UN);
|
||||||
|
fclose($fp);
|
||||||
|
//输出数据
|
||||||
|
$tjtotal = $tongji[$tjtotal];
|
||||||
|
$tjmonth = $tongji[$tjmonth];
|
||||||
|
$tjtoday = $tongji[$tjtoday];
|
||||||
|
$tjyesterday = $tongji[$tjyesterday]?$tongji[$tjyesterday]:0;
|
||||||
|
//访总问 {$tjtotal} 本月 {$tjmonth} 昨日 {$tjyesterday} 今日 {$tjtoday}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
@ -0,0 +1,67 @@
|
|||||||
|
<?php
|
||||||
|
if(empty(constant("VERSION")))return 0;
|
||||||
|
function get_vernum($version){
|
||||||
|
$vn = explode('.',str_replace('v','',$version));
|
||||||
|
$vernum = $vn[0].sprintf("%02d",$vn[1]).sprintf("%02d",$vn[2]);
|
||||||
|
return $vernum;
|
||||||
|
}
|
||||||
|
$sqlvn = get_vernum($conf['version']); //数据库版本
|
||||||
|
$filevn = get_vernum(constant("VERSION")); // 文件版本
|
||||||
|
if($sqlvn < $filevn){
|
||||||
|
//文件版本大于数据库版本执行更新
|
||||||
|
$sql= '';
|
||||||
|
if($sqlvn < 10101) {
|
||||||
|
$version = 'v1.1.1';
|
||||||
|
$sql = $sql.file_get_contents(ROOT.'install/update.sql');
|
||||||
|
}
|
||||||
|
if($sqlvn < 10103) {
|
||||||
|
$version = 'v1.1.3';
|
||||||
|
@unlink(ROOT.'include/head.php');
|
||||||
|
@unlink(ROOT.'include/home.php');
|
||||||
|
@unlink(ROOT.'include/apply.php');
|
||||||
|
@unlink(ROOT.'include/footer.php');
|
||||||
|
$sql = $sql.file_get_contents(ROOT.'install/update1.sql');
|
||||||
|
}
|
||||||
|
if($sqlvn < 10104) {
|
||||||
|
$version = 'v1.1.4';
|
||||||
|
}
|
||||||
|
if($sqlvn < 10105) {
|
||||||
|
$version = 'v1.1.5';
|
||||||
|
$sql = $sql.file_get_contents(ROOT.'install/update2.sql');
|
||||||
|
}
|
||||||
|
if($sqlvn < 10106) {
|
||||||
|
$version = 'v1.1.6';
|
||||||
|
$sql = $sql.file_get_contents(ROOT.'install/update3.sql');
|
||||||
|
}
|
||||||
|
if($sqlvn < 10109) {
|
||||||
|
$version = 'v1.1.9';
|
||||||
|
$sql = $sql.file_get_contents(ROOT.'install/update4.sql');
|
||||||
|
}
|
||||||
|
if($sqlvn < 10200) {
|
||||||
|
$version = 'v1.2.0';
|
||||||
|
$sql = $sql.file_get_contents(ROOT.'install/update5.sql');
|
||||||
|
}
|
||||||
|
if($sqlvn < 10205) {
|
||||||
|
$version = 'v1.2.5';
|
||||||
|
}
|
||||||
|
if($sqlvn < 10300) {
|
||||||
|
$version = 'v1.3.0';
|
||||||
|
}
|
||||||
|
if($sqlvn < 10304) {
|
||||||
|
$version = 'v1.3.4';
|
||||||
|
}
|
||||||
|
if($sqlvn < 10500) {
|
||||||
|
$version = 'v1.5.0';
|
||||||
|
}
|
||||||
|
if($sqlvn < 10501) {
|
||||||
|
$version = 'v1.5.1';
|
||||||
|
$sql = $sql.file_get_contents(ROOT.'install/update6.sql');
|
||||||
|
}
|
||||||
|
$sql=explode(';',$sql);
|
||||||
|
for ($i=0;$i<count($sql);$i++) {
|
||||||
|
if (trim($sql[$i])=='')continue;
|
||||||
|
if($DB->query($sql[$i])) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
saveSetting('version',$version);
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
define('VERSION', '1.5.1');
|
||||||
|
?>
|
@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
@header('Content-Type: text/html; charset=UTF-8');
|
||||||
|
if (!file_exists('install/install.lock'))
|
||||||
|
exit('<title>安装程序</title>您还未安装,点击<a href="install"><font color="blue">这里</font></a>开始安装!');
|
||||||
|
include "./include/common.php";
|
||||||
|
session_start(); //设置session
|
||||||
|
$_SESSION['list'] = isset($_SESSION['list'])?$_SESSION['list']:array();
|
||||||
|
include $template;
|
||||||
|
?>
|
@ -0,0 +1,244 @@
|
|||||||
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET NAMES utf8 */;
|
||||||
|
/*!50503 SET NAMES utf8mb4 */;
|
||||||
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||||
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `lylme_apply`;
|
||||||
|
CREATE TABLE IF NOT EXISTS `lylme_apply` (
|
||||||
|
`apply_id` int(4) NOT NULL AUTO_INCREMENT,
|
||||||
|
`apply_name` varchar(20) NOT NULL,
|
||||||
|
`apply_url` varchar(255) NOT NULL,
|
||||||
|
`apply_group` int(2) NOT NULL,
|
||||||
|
`apply_icon` text NOT NULL,
|
||||||
|
`apply_mail` varchar(30) NOT NULL,
|
||||||
|
`apply_time` datetime NOT NULL,
|
||||||
|
`apply_status` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`apply_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='收录申请';
|
||||||
|
|
||||||
|
DELETE FROM `lylme_apply`;
|
||||||
|
/*!40000 ALTER TABLE `lylme_apply` DISABLE KEYS */;
|
||||||
|
/*!40000 ALTER TABLE `lylme_apply` ENABLE KEYS */;
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `lylme_config`;
|
||||||
|
CREATE TABLE IF NOT EXISTS `lylme_config` (
|
||||||
|
`k` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '键',
|
||||||
|
`v` text COLLATE utf8mb4_unicode_ci COMMENT '值',
|
||||||
|
`description` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '描述',
|
||||||
|
PRIMARY KEY (`k`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT COMMENT='导航配置';
|
||||||
|
|
||||||
|
DELETE FROM `lylme_config`;
|
||||||
|
/*!40000 ALTER TABLE `lylme_config` DISABLE KEYS */;
|
||||||
|
INSERT INTO `lylme_config` (`k`, `v`, `description`) VALUES
|
||||||
|
('admin_user', 'admin', '管理员账号'),
|
||||||
|
('admin_pwd', '123456', '管理员密码'),
|
||||||
|
('apply', '0', '收录申请'),
|
||||||
|
('apply_gg', '<b>收录说明:</b><br>1. 禁止提交违规违法站点<br>2. 页面整洁,无多个弹窗广告和恶意跳转<br>3. 非盈利性网站,网站正常访问<br>4. 添加本站友链或网站已ICP备案优先收录<br>', '收录公告'),
|
||||||
|
('background', './assets/img/background.jpg', '背景图片'),
|
||||||
|
('cdnpublic', NULL, 'CDN地址'),
|
||||||
|
('copyright', 'Copyright ©2022 <a href="/">LyLme Spage</a>. All Rights Reserved.', '版权代码'),
|
||||||
|
('description', '六零导航页(LyLme Spage)致力于简洁高效无广告的上网导航和搜索入口,沉淀最具价值链接,全站无商业推广,简约而不简单。', '网站描述'),
|
||||||
|
('home-title', '<h2 class="title">上网,从这里开始!</h2>', '首页标题'),
|
||||||
|
('icp', '', '备案号'),
|
||||||
|
('keywords', '六零导航页,百度搜索,哔哩哔哩搜索,知乎搜索,六零导航,LyLme Spage,六零,LyLme,网站导航,上网导航', '关键字'),
|
||||||
|
('logo', './assets/img/logo.png', '网站图标'),
|
||||||
|
('template', 'default', '网站模板'),
|
||||||
|
('title', '上网导航 - LyLme Spage', '网站名称'),
|
||||||
|
('tq', 'true', '天气显示开关'),
|
||||||
|
('version', 'v1.3.0', '程序版本'),
|
||||||
|
('wap_background', NULL, '手机端背景'),
|
||||||
|
('wztj', '', '网站统计代码'),
|
||||||
|
('yan', 'true', '随机一言开关');
|
||||||
|
/*!40000 ALTER TABLE `lylme_config` ENABLE KEYS */;
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `lylme_groups`;
|
||||||
|
CREATE TABLE IF NOT EXISTS `lylme_groups` (
|
||||||
|
`group_id` int(2) NOT NULL AUTO_INCREMENT COMMENT '分组ID',
|
||||||
|
`group_name` varchar(10) NOT NULL COMMENT '分组名称',
|
||||||
|
`group_icon` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '分组图标',
|
||||||
|
`group_order` int(4) NOT NULL DEFAULT '5' COMMENT '分组排序',
|
||||||
|
`group_status` int(1) NOT NULL DEFAULT '1' COMMENT '分组状态',
|
||||||
|
`group_pwd` int(2) NOT NULL DEFAULT '0' COMMENT '加密组ID',
|
||||||
|
PRIMARY KEY (`group_id`) USING BTREE,
|
||||||
|
UNIQUE KEY `group_name` (`group_name`) USING BTREE
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;
|
||||||
|
|
||||||
|
DELETE FROM `lylme_groups`;
|
||||||
|
/*!40000 ALTER TABLE `lylme_groups` DISABLE KEYS */;
|
||||||
|
INSERT INTO `lylme_groups` (`group_id`, `group_name`, `group_icon`, `group_order`, `group_status`, `group_pwd`) VALUES
|
||||||
|
(1, '常用导航', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-remen"></use></svg>', 1, 1, 0),
|
||||||
|
(2, '设计视觉', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-sheji"></use></svg>', 2, 1, 0),
|
||||||
|
(3, '社交&存储', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-msg"></use></svg>', 3, 1, 0),
|
||||||
|
(4, '工具', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-ai-tool"></use></svg>', 4, 1, 0),
|
||||||
|
(5, '开发', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-kongzhitai"></use></svg>', 5, 1, 0),
|
||||||
|
(6, '游戏娱乐', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-game00"></use></svg>', 6, 1, 0),
|
||||||
|
(7, '网站公告', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-gg00"></use></svg>', 7, 1, 0);
|
||||||
|
/*!40000 ALTER TABLE `lylme_groups` ENABLE KEYS */;
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `lylme_links`;
|
||||||
|
CREATE TABLE IF NOT EXISTS `lylme_links` (
|
||||||
|
`id` int(4) NOT NULL AUTO_INCREMENT COMMENT '网站ID',
|
||||||
|
`name` varchar(20) NOT NULL COMMENT '链接标题',
|
||||||
|
`group_id` int(2) NOT NULL DEFAULT '1' COMMENT '分组名称',
|
||||||
|
`url` varchar(255) NOT NULL COMMENT '链接地址',
|
||||||
|
`icon` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '链接图标',
|
||||||
|
`PS` varchar(255) DEFAULT NULL COMMENT '备注',
|
||||||
|
`link_order` int(4) DEFAULT '10' COMMENT '链接排序',
|
||||||
|
`link_status` int(1) NOT NULL DEFAULT '1' COMMENT '链接状态',
|
||||||
|
`link_pwd` int(2) DEFAULT '0' COMMENT '加密组ID',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
KEY `组` (`group_id`) USING BTREE,
|
||||||
|
CONSTRAINT `组` FOREIGN KEY (`group_id`) REFERENCES `lylme_groups` (`group_id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;
|
||||||
|
|
||||||
|
DELETE FROM `lylme_links`;
|
||||||
|
/*!40000 ALTER TABLE `lylme_links` DISABLE KEYS */;
|
||||||
|
INSERT INTO `lylme_links` (`id`, `name`, `group_id`, `url`, `icon`, `PS`, `link_order`, `link_status`, `link_pwd`) VALUES
|
||||||
|
(1, '百度', 1, 'https://www.baidu.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-icon_baidulogo"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(2, '腾讯视频', 1, 'https://v.qq.com', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-tengxunshipin"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(3, '优酷', 1, 'https://www.youku.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-youku"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(4, '爱奇艺', 1, 'https://www.iqiyi.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-aiqiyi"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(5, '淘宝', 1, 'https://www.taobao.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-taobao"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(6, '哔哩哔哩', 1, 'https://www.bilibili.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-bili"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(7, '微博', 1, 'https://www.weibo.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-weibo"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(8, 'QQ邮箱', 1, 'https://mail.qq.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-qqmail00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(9, '百度贴吧', 1, 'https://tieba.baidu.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-tieba00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(10, 'CCTV直播', 1, 'https://tv.cctv.com/live/index.shtml', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-cctv"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(11, '抖音网页版', 1, 'https://www.douyin.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-douyin00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(12, '快手网页版', 1, 'https://www.kuaishou.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-kuaishou00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(13, '网易云音乐', 1, 'https://music.163.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-wyyyy00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(14, 'QQ音乐', 1, 'https://y.qq.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-qqmusic00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(15, '酷狗音乐', 1, 'https://www.kugou.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-kugou00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(16, '虎牙直播', 1, 'https://www.huya.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-huya00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(17, '斗鱼直播', 1, 'https://www.douyu.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-douyu00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(18, '企鹅电竞', 1, 'https://egame.qq.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-qie00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(19, '微信文件传输助手', 1, 'https://filehelper.weixin.qq.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-wechat00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(20, '六零', 1, 'https://www.lylme.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-home00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(21, 'Office模板', 2, 'https://www.officeplus.cn/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-office00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(22, '搞定设计', 2, 'https://www.gaoding.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-gaoding00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(23, '素材天下', 2, 'http://www.sucaitianxia.net/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-video"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(24, '千库网', 2, 'https://588ku.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-qianku00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(25, '图怪兽', 2, 'https://818ps.com', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-tu00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(26, '站酷', 2, 'https://www.zcool.com.cn/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-zhanku"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(27, '阿里图标', 2, 'https://www.iconfont.cn/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-iconfont"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(28, 'IconFinder', 2, 'https://www.iconfinder.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-eye"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(29, '优设教程', 2, 'https://uiiiuiii.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-jiaocheng"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(30, '知乎', 3, 'https://www.zhihu.com/explore', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-zhihu"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(31, '豆瓣', 3, 'https://www.douban.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-douban"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(32, '简书', 3, 'https://www.jianshu.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-jianshu"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(33, '阿里云盘', 3, 'https://www.aliyundrive.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-alipan00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(34, '百度网盘', 3, 'https://pan.baidu.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-baidupan00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(35, '蓝奏云', 3, 'https://www.lanzou.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-lanzou00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(36, '迅雷云盘', 3, 'https://pan.xunlei.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-xunleipan00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(37, 'OneDrive', 3, 'https://onedrive.live.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-OneDrive00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(38, '天翼云盘', 3, 'https://cloud.189.cn/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-tianyipan00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(39, 'UC网盘', 3, 'https://www.yun.cn/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-yunpan"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(40, 'QQ邮箱', 3, 'https://mail.qq.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-qqmail00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(41, 'Gmail', 3, 'https://mail.google.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-gmail"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(42, 'Hotmail', 3, 'https://outlook.live.com/mail/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-windows"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(43, '网易邮箱', 3, 'https://mail.163.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-wangyi"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(44, '新浪邮箱', 3, 'https://mail.sina.com.cn/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-xinlangwang"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(45, '阿里邮箱', 3, 'https://mail.aliyun.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-yunyouxiang"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(46, '在线工具', 4, 'https://tool.lu/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-ai-tool"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(47, 'IP查询', 4, 'https://ip.cn/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-wangluo"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(48, '文档在线转换', 4, 'https://xpdf.net/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-docto"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(49, '谷歌翻译', 4, 'https://translate.google.cn/?hl=zh-CN', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-fanyi"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(50, '有道翻译', 4, 'https://fanyi.youdao.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-youdao00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(51, 'HTML在线运行', 4, 'https://c.runoob.com/front-end/61/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-html00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(52, 'MD编辑器', 4, 'https://www.lylme.com/html/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-md"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(53, '微PE工具', 4, 'http://www.wepe.com.cn/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-wepe00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(54, '在线代码格式化', 4, 'https://tool.oschina.net/codeformat/html/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-base64"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(55, 'JS混淆器', 4, 'http://tool.chinaz.com/tools/jscodeconfusion.aspx', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-jshunxiao"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(56, '站长工具', 4, 'http://tool.chinaz.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-zhanzhang00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(57, '在线Ping', 4, 'https://ping.chinaz.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-wangluo1"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(58, 'ICP备案查询', 4, 'https://icp.chinaz.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-icp00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(59, '在线PS', 4, 'https://www.photopea.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-ps00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(60, 'W3school', 5, 'http://www.w3school.com.cn/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-h5"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(61, 'Github', 5, 'https://github.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-github"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(62, '码云Gitee', 5, 'https://gitee.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-gitee00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(63, 'Linux命令查询', 5, 'https://linux.lylme.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-linux"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(64, 'CSDN', 5, 'https://www.csdn.net/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-csdn"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(65, 'CdnJs', 5, 'https://cdnjs.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-cdnjs"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(66, '字节跳动CDN', 5, 'https://cdn.bytedance.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-zjtd00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(67, 'Font Awesome', 5, 'https://fontawesome.com/icons?https://fontawesome.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-font-awesome"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(68, 'MSDN我告诉你', 5, 'https://msdn.itellyou.cn/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-msdn00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(69, '腾讯云', 5, 'https://cloud.tencent.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-qcloud00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(70, '阿里云', 5, 'https://www.aliyun.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-alicloud00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(71, '4399小游戏', 6, 'http://www.4399.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-439900"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(72, '7k7k小游戏', 6, 'http://www.7k7k.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-7k7k00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(73, '英雄联盟', 6, 'https://lol.qq.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-lol00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(74, '永劫无间', 6, 'https://www.yjwujian.cn/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-yjwj00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(75, 'STEAM', 6, 'https://store.steampowered.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-steam00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(76, '王者荣耀', 6, 'https://pvp.qq.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-wzry00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(77, '3DM GAME', 6, 'https://www.3dmgame.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-games00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(78, '官方主页', 7, 'https://www.lylme.com/', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-home00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(79, '申请收录', 7, '/apply', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-sq00"></use></svg>', NULL, 10, 1, 0),
|
||||||
|
(80, '建议&反馈', 7, 'https://support.qq.com/products/356339', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-fk00"></use></svg>', NULL, 10, 1, 0);
|
||||||
|
/*!40000 ALTER TABLE `lylme_links` ENABLE KEYS */;
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `lylme_pwd`;
|
||||||
|
CREATE TABLE IF NOT EXISTS `lylme_pwd` (
|
||||||
|
`pwd_id` int(2) NOT NULL AUTO_INCREMENT COMMENT '加密组ID',
|
||||||
|
`pwd_name` varchar(20) NOT NULL COMMENT '加密组名称',
|
||||||
|
`pwd_key` varchar(20) NOT NULL COMMENT '加密组密码',
|
||||||
|
`pwd_ps` varchar(30) DEFAULT NULL COMMENT '加密组备注',
|
||||||
|
PRIMARY KEY (`pwd_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
DELETE FROM `lylme_pwd`;
|
||||||
|
/*!40000 ALTER TABLE `lylme_pwd` DISABLE KEYS */;
|
||||||
|
/*!40000 ALTER TABLE `lylme_pwd` ENABLE KEYS */;
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `lylme_sou`;
|
||||||
|
CREATE TABLE IF NOT EXISTS `lylme_sou` (
|
||||||
|
`sou_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '搜索引擎ID',
|
||||||
|
`sou_alias` varchar(20) NOT NULL COMMENT '搜索引擎别名',
|
||||||
|
`sou_name` varchar(20) NOT NULL COMMENT '搜索引擎名称',
|
||||||
|
`sou_hint` varchar(30) NOT NULL DEFAULT '请输入搜索关键词' COMMENT '搜索引擎提示文字',
|
||||||
|
`sou_color` varchar(20) NOT NULL DEFAULT '#696a6d' COMMENT '搜索引擎字体颜色',
|
||||||
|
`sou_link` varchar(255) NOT NULL COMMENT '搜索引擎地址',
|
||||||
|
`sou_waplink` varchar(255) DEFAULT NULL COMMENT '搜索引擎移动端地址',
|
||||||
|
`sou_icon` text NOT NULL COMMENT '搜索引擎图标',
|
||||||
|
`sou_st` int(1) NOT NULL DEFAULT '1' COMMENT '搜索引擎开关',
|
||||||
|
`sou_order` int(2) NOT NULL COMMENT '搜索引擎排序',
|
||||||
|
PRIMARY KEY (`sou_id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='搜索引擎';
|
||||||
|
|
||||||
|
DELETE FROM `lylme_sou`;
|
||||||
|
/*!40000 ALTER TABLE `lylme_sou` DISABLE KEYS */;
|
||||||
|
INSERT INTO `lylme_sou` (`sou_id`, `sou_alias`, `sou_name`, `sou_hint`, `sou_color`, `sou_link`, `sou_waplink`, `sou_icon`, `sou_st`, `sou_order`) VALUES
|
||||||
|
(1, 'baidu', '百度一下', '百度一下,你就知道', '#0c498c', 'https://www.baidu.com/s?word=', 'https://m.baidu.com/s?word=', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-icon_baidulogo"></use></svg>', 1, 1),
|
||||||
|
(2, 'sogou', '搜狗搜索', '上网从搜狗开始', '#696a6d', 'https://www.sogou.com/web?query=', NULL, '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-sougou"></use></svg>', 1, 2),
|
||||||
|
(3, 'bing', 'Bing必应', '微软必应搜索', '#696a6d', 'https://cn.bing.com/search?q=', NULL, '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-bing"></use></svg>', 1, 3),
|
||||||
|
(4, 'zhihu', '知乎搜索', '有问题,上知乎', '#0084fe', 'https://www.zhihu.com/search?q=', NULL, '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-zhihu"></use></svg>', 1, 4),
|
||||||
|
(5, 'bilibili', '哔哩哔哩', '(゜-゜)つロ 干杯~', '#00aeec', 'https://search.bilibili.com/all?keyword=', NULL, '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-bili"></use></svg>', 1, 5),
|
||||||
|
(6, 'weibo', '微博搜索', '随时随地发现新鲜事', '#ff5722', 'https://s.weibo.com/weibo/', '', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-weibo"></use></svg>', 1, 6),
|
||||||
|
(7, 'google', '谷歌搜索', '值得信任的搜索引擎', '#3B83FA', 'https://www.google.com.hk/search?hl=zh-CN&q=', '', '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-google00"></use></svg>', 1, 7),
|
||||||
|
(8, 'fanyi', '在线翻译', '输入翻译内容(自动检测语言)', '#0084fe', 'https://translate.google.cn/?hl=zh-CN&sl=auto&tl=zh-CN&text=', NULL, '<svg class="icon" aria-hidden="true"><use xlink:href="#icon-fanyi"></use></svg>', 1, 8);
|
||||||
|
/*!40000 ALTER TABLE `lylme_sou` ENABLE KEYS */;
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `lylme_tags`;
|
||||||
|
CREATE TABLE IF NOT EXISTS `lylme_tags` (
|
||||||
|
`tag_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`tag_name` varchar(30) NOT NULL,
|
||||||
|
`tag_link` varchar(60) NOT NULL,
|
||||||
|
`tag_target` int(1) NOT NULL DEFAULT '1',
|
||||||
|
PRIMARY KEY (`tag_id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
DELETE FROM `lylme_tags`;
|
||||||
|
/*!40000 ALTER TABLE `lylme_tags` DISABLE KEYS */;
|
||||||
|
INSERT INTO `lylme_tags` (`tag_id`, `tag_name`, `tag_link`, `tag_target`) VALUES
|
||||||
|
(1, '主页', 'https://www.lylme.com/', 0),
|
||||||
|
(2, '博客', 'https://blog.lylme.com/', 1),
|
||||||
|
(3, 'Github', 'https://github.com/lylme', 1),
|
||||||
|
(4, '关于本站', '/about', 1),
|
||||||
|
(5, '申请收录', '/apply', 1),
|
||||||
|
(6, '查看', '/pwd', 0);
|
||||||
|
/*!40000 ALTER TABLE `lylme_tags` ENABLE KEYS */;
|
||||||
|
|
||||||
|
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
||||||
|
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
|
||||||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
@ -0,0 +1,81 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" />
|
||||||
|
<title>六零导航页 - 用户协议</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<p align="center" style="text-align:center;text-indent:30.1pt;">
|
||||||
|
<b>六零导航页 - 用户使用协议</b>
|
||||||
|
</p>
|
||||||
|
<h3 style="margin-top: 25px;">1. 说明</h3>
|
||||||
|
1.1 用户即指六零导航页(以下简称“本程序”)后下载、安装、使用本程序的用户。
|
||||||
|
</p>
|
||||||
|
<p style="margin-top: 25px;">
|
||||||
|
<b>2.用户使用基本规则</b>
|
||||||
|
<p>
|
||||||
|
2.1 用户在使用本程序时,必须遵循以下原则:
|
||||||
|
</p>
|
||||||
|
<p style="text-indent:14.0pt;">
|
||||||
|
2.1.1 遵守中国及所在国有关的法律和法规;
|
||||||
|
</p>
|
||||||
|
<p style="text-indent:14.0pt;">
|
||||||
|
2.1.2 用户不得侵任何人的知识产权,包括但不限于不得将侵犯任何人的专利、商标、著作权、商业秘密或其他专属权利;
|
||||||
|
</p>
|
||||||
|
<p style="text-indent:14.0pt;">
|
||||||
|
2.1.3 用户不得侵犯涉密信息,包括但不限于不得将无权传送的内容(例如商业秘密、内部资料、机密资料、个人信息等)进行上载、张贴、发送电子邮件或以其他方式发布、传送、传播、储存、或提供;
|
||||||
|
</p>
|
||||||
|
<p style="text-indent:14.0pt;">
|
||||||
|
2.1.4 用户不得为任何非法目的而使用本程序,包括但不限于应当遵守法律法规,以及所有与网络服务有关的网络协议、规定和程序,不得利用本程序进行任何可能对互联网的正常运转造成不利影响的行为,或其他任何非法行为;
|
||||||
|
</p>
|
||||||
|
<p style="text-indent:14.0pt;">
|
||||||
|
2.1.5 用户无权实施包括但不限于下列行为:删除本程序及其他副本上所有关于版权的信息、内容,对本程序进行反向工程、反向汇编、反向编译等;
|
||||||
|
</p>
|
||||||
|
<p style="text-indent:14.0pt;">
|
||||||
|
2.1.6 用户不得利用本服务实施侵权行为,包括但不限于不得使用虚假、冒充他人或其他方的信息安装、使用本程序,不得冒充任何人或机构,或以虚伪不实的方式谎称或使人误认为其言论或身份与任何人或任何机构有关;不得伪造标题或以其他方式操控识别资料,使人误认为该内容为程序作者所传送;不得利用本程序网络服务系统传播任何骚扰性的、中伤他人的、辱骂性的、庸俗淫秽的或其他任何非法的信息资料;
|
||||||
|
</p>
|
||||||
|
<p style="text-indent:14.0pt;">
|
||||||
|
2.1.7 用户不得破坏本服务的提供,或侵犯本服务相关的任何权利,包括但不限于不得将有关干扰、破坏或限制任何计算机软件、硬件或通讯设备功能的软件病毒或其他计算机代码、档案和程序之资料,加以上载、张贴或其他方式的传播;
|
||||||
|
</p>
|
||||||
|
|
||||||
|
2.2 用户禁止利用本程序及相关服务进行以下活动:
|
||||||
|
</p>
|
||||||
|
<p style="text-indent:14.0pt;">
|
||||||
|
2.2.1 反对宪法所确定的基本原则的;
|
||||||
|
</p>
|
||||||
|
<p style="text-indent:14.0pt;">
|
||||||
|
2.2.2 危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的;
|
||||||
|
</p>
|
||||||
|
<p style="text-indent:14.0pt;">
|
||||||
|
2.2.3 损害国家荣誉和利益的;
|
||||||
|
</p>
|
||||||
|
<p style="text-indent:14.0pt;">
|
||||||
|
2.2.4 煽动民族仇恨、民族歧视,破坏民族团结的;
|
||||||
|
</p>
|
||||||
|
<p style="text-indent:14.0pt;">
|
||||||
|
2.2.5 破坏国家宗教政策,宣扬邪教和封建迷信的;
|
||||||
|
</p>
|
||||||
|
<p style="text-indent:14.0pt;">
|
||||||
|
2.2.6 散布谣言,扰乱社会秩序,破坏社会稳定的;
|
||||||
|
</p>
|
||||||
|
<p style="text-indent:14.0pt;">
|
||||||
|
2.2.7 散布淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪的;
|
||||||
|
</p>
|
||||||
|
<p style="text-indent:14.0pt;">
|
||||||
|
2.2.8 侵害他人合法权益的;
|
||||||
|
</p>
|
||||||
|
<p style="text-indent:14.0pt;">
|
||||||
|
2.2.9 含有法律法规禁止的其他内容的。
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
2.3 <b><u>如用户违反以上约定,产生的一切法律后果,用户将以自己的名义独立承担所有的法律责任,造成的一切损失,由用户承担。</u></b>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -0,0 +1,47 @@
|
|||||||
|
-- 表 `lylme_sou`
|
||||||
|
CREATE TABLE `lylme_sou` (
|
||||||
|
`sou_id` int(11) NOT NULL COMMENT '搜索引擎ID',
|
||||||
|
`sou_alias` varchar(20) NOT NULL COMMENT '搜索引擎别名',
|
||||||
|
`sou_name` varchar(20) NOT NULL COMMENT '搜索引擎名称',
|
||||||
|
`sou_hint` varchar(30) NOT NULL DEFAULT '请输入搜索关键词' COMMENT '搜索引擎提示文字',
|
||||||
|
`sou_color` varchar(20) NOT NULL DEFAULT '#696a6d' COMMENT '搜索引擎字体颜色',
|
||||||
|
`sou_link` varchar(255) NOT NULL COMMENT '搜索引擎地址',
|
||||||
|
`sou_waplink` varchar(255) DEFAULT NULL COMMENT '搜索引擎移动端地址',
|
||||||
|
`sou_icon` text NOT NULL COMMENT '搜索引擎图标',
|
||||||
|
`sou_st` int(1) NOT NULL DEFAULT '1' COMMENT '搜索引擎开关',
|
||||||
|
`sou_order` int(2) NOT NULL COMMENT '搜索引擎排序'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='搜索引擎';
|
||||||
|
INSERT INTO `lylme_sou` (`sou_id`, `sou_alias`, `sou_name`, `sou_hint`, `sou_color`, `sou_link`, `sou_waplink`, `sou_icon`, `sou_st`, `sou_order`) VALUES
|
||||||
|
(1, 'baidu', '百度一下', '百度一下,你就知道', '#0c498c', 'https://www.baidu.com/s?word=', 'https://m.baidu.com/s?word=', '<svg class=\"icon\" aria-hidden=\"true\"><use xlink:href=\"#icon-icon_baidulogo\"></use></svg>', 1, 1),
|
||||||
|
(2, 'sogou', '搜狗搜索', '上网从搜狗开始', '#696a6d', 'https://www.sogou.com/web?query=', NULL, '<svg class=\"icon\" aria-hidden=\"true\"><use xlink:href=\"#icon-sougou\"></use></svg>', 1, 2),
|
||||||
|
(3, 'bing', 'Bing必应', '微软必应搜索', '#696a6d', 'https://cn.bing.com/search?q=', NULL, '<svg class=\"icon\" aria-hidden=\"true\"><use xlink:href=\"#icon-bing\"></use></svg>', 1, 3),
|
||||||
|
(4, 'zhihu', '知乎搜索', '有问题,上知乎', '#0084fe', 'https://www.zhihu.com/search?q=', NULL, '<svg class=\"icon\" aria-hidden=\"true\"><use xlink:href=\"#icon-zhihu\"></use></svg>', 1, 4),
|
||||||
|
(5, 'bilibili', '哔哩哔哩', '(゜-゜)つロ 干杯~', '#00aeec', 'https://search.bilibili.com/all?keyword=', NULL, '<svg class=\"icon\" aria-hidden=\"true\"><use xlink:href=\"#icon-bili\"></use></svg>', 1, 5),
|
||||||
|
(6, 'weibo', '微博搜索', '随时随地发现新鲜事', '#ff5722', 'https://s.weibo.com/weibo/', NULL, '<svg class=\"icon\" aria-hidden=\"true\"><use xlink:href=\"#icon-weibo\"></use></svg>', 1, 6),
|
||||||
|
(7, 'google', '谷歌搜索', '值得信任的搜索引擎', '#3B83FA', 'https://www.google.com.hk/search?hl=zh-CN&q=', NULL, '<svg class=\"icon\" aria-hidden=\"true\"><use xlink:href=\"#icon-google00\"></use></svg>', 1, 7),
|
||||||
|
(8, 'fanyi', '在线翻译', '输入翻译内容(自动检测语言)', '#0084fe', 'https://translate.google.cn/?hl=zh-CN&sl=auto&tl=zh-CN&text=', NULL, '<svg class=\"icon\" aria-hidden=\"true\"><use xlink:href=\"#icon-fanyi\"></use></svg>', 1, 8);
|
||||||
|
ALTER TABLE `lylme_sou`
|
||||||
|
ADD PRIMARY KEY (`sou_id`);
|
||||||
|
ALTER TABLE `lylme_sou`
|
||||||
|
MODIFY `sou_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '搜索引擎ID', AUTO_INCREMENT=9;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
|
||||||
|
-- 表`lylme_tags`
|
||||||
|
CREATE TABLE `lylme_tags` (
|
||||||
|
`tag_id` int(11) NOT NULL,
|
||||||
|
`tag_name` varchar(30) NOT NULL,
|
||||||
|
`tag_link` varchar(60) NOT NULL,
|
||||||
|
`tag_target` int(1) NOT NULL DEFAULT '1'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
INSERT INTO `lylme_tags` (`tag_id`, `tag_name`, `tag_link`, `tag_target`) VALUES
|
||||||
|
(1, '主页', 'https://www.lylme.com/', 0),
|
||||||
|
(2, '博客', 'https://blog.lylme.com/', 1),
|
||||||
|
(3, 'Github', 'https://github.com/lylme', 1),
|
||||||
|
(4, '关于本站', '/about', 1);
|
||||||
|
ALTER TABLE `lylme_tags`
|
||||||
|
ADD PRIMARY KEY (`tag_id`);
|
||||||
|
ALTER TABLE `lylme_tags`
|
||||||
|
MODIFY `tag_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
|
||||||
|
COMMIT;
|
||||||
|
UPDATE `lylme_config` SET `v` = 'v1.1.2' WHERE `lylme_config`.`k` = 'version';
|
@ -0,0 +1,17 @@
|
|||||||
|
INSERT INTO `lylme_config` VALUES ('template', 'default','网站模板');
|
||||||
|
INSERT INTO `lylme_config` VALUES ('cdnpublic', NULL,'CDN地址');
|
||||||
|
INSERT INTO `lylme_config` VALUES ('apply', 0,'收录申请');
|
||||||
|
CREATE TABLE `lylme_apply` (
|
||||||
|
`apply_id` int(4) NOT NULL,
|
||||||
|
`apply_name` varchar(20) NOT NULL,
|
||||||
|
`apply_url` varchar(255) NOT NULL,
|
||||||
|
`apply_group` int(2) NOT NULL,
|
||||||
|
`apply_icon` text NOT NULL,
|
||||||
|
`apply_mail` varchar(30) NOT NULL,
|
||||||
|
`apply_time` datetime NOT NULL,
|
||||||
|
`apply_status` int(11) NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='收录申请';
|
||||||
|
ALTER TABLE `lylme_apply` ADD PRIMARY KEY (`apply_id`);
|
||||||
|
ALTER TABLE `lylme_apply` MODIFY `apply_id` int(4) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=0;
|
||||||
|
COMMIT;
|
||||||
|
UPDATE `lylme_config` SET `v` = 'v1.1.3' WHERE `lylme_config`.`k` = 'version';
|
@ -0,0 +1,3 @@
|
|||||||
|
INSERT INTO `lylme_config` (`k`, `v`, `description`) VALUES
|
||||||
|
('apply_gg', '<b>收录说明:</b><br>1. 禁止提交违规违法站点<br>2. 页面整洁,无多个弹窗广告和恶意跳转<br>3. 非盈利性网站,网站正常访问<br>4. 添加本站友链或网站已ICP备案优先收录<br>', '收录公告'),
|
||||||
|
('wap_background', '/assets/img/wapbackground.jpg', '手机端背景');
|
@ -0,0 +1,3 @@
|
|||||||
|
-- v1.1.6
|
||||||
|
ALTER TABLE `lylme_links` ADD `link_status` INT(1) NOT NULL DEFAULT '1' COMMENT '链接状态' AFTER `link_order`;
|
||||||
|
ALTER TABLE `lylme_groups` ADD `group_status` INT(1) NOT NULL DEFAULT '1' COMMENT '分组状态' AFTER `group_order`;
|
@ -0,0 +1,14 @@
|
|||||||
|
-- v1.1.9
|
||||||
|
ALTER TABLE `lylme_links` ADD `link_pwd` INT(2) NULL DEFAULT '0' COMMENT '加密组ID' AFTER `link_status`;
|
||||||
|
ALTER TABLE `lylme_groups` ADD `group_pwd` INT(2) NOT NULL DEFAULT '0' COMMENT '加密组ID' AFTER `group_status`;
|
||||||
|
CREATE TABLE `lylme_pwd` (
|
||||||
|
`pwd_id` int(2) NOT NULL COMMENT '加密组ID',
|
||||||
|
`pwd_name` varchar(20) NOT NULL COMMENT '加密组名称',
|
||||||
|
`pwd_key` varchar(20) NOT NULL COMMENT '加密组密码',
|
||||||
|
`pwd_ps` varchar(30) DEFAULT NULL COMMENT '加密组备注'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
ALTER TABLE `lylme_pwd`
|
||||||
|
ADD PRIMARY KEY (`pwd_id`);
|
||||||
|
ALTER TABLE `lylme_pwd`
|
||||||
|
MODIFY `pwd_id` int(2) NOT NULL AUTO_INCREMENT COMMENT '加密组ID', AUTO_INCREMENT=1;
|
||||||
|
INSERT INTO `lylme_tags` (`tag_id`, `tag_name`, `tag_link`, `tag_target`) VALUES (NULL, '查看', '/pwd', '0');
|
@ -0,0 +1,2 @@
|
|||||||
|
-- v1.2.0
|
||||||
|
INSERT INTO `lylme_tags` (`tag_id`, `tag_name`, `tag_link`, `tag_target`) VALUES (NULL, '关于本站', '/about', '1');
|
@ -0,0 +1,2 @@
|
|||||||
|
-- v1.5.1
|
||||||
|
ALTER TABLE `lylme_links` CHANGE `name` `name` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '链接标题';
|
@ -0,0 +1,88 @@
|
|||||||
|
<?php
|
||||||
|
include("../include/common.php");
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-cn">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<title>访问管理</title>
|
||||||
|
<style>
|
||||||
|
*{margin:0;padding:0;box-sizing:border-box}
|
||||||
|
body{text-align:center;color:#7b8993}
|
||||||
|
.form-wrapper{padding-top:50px;border-radius:15px;margin:50px auto;position:relative;width:375px;background: #fff;}
|
||||||
|
form{padding:30px 20px 0}
|
||||||
|
.form-item{margin-bottom:10px;width:100%}
|
||||||
|
.form-item input{border-radius:15px;border:1px solid #ccc;border-radius:15px;color:#000;font-size:1em;height:50px;padding:0 16px;transition:background 0.3s ease-in-out;width:100%}
|
||||||
|
.form-item input:focus{outline:none;border-color:#9ecaed;box-shadow:0 0 10px #9ecaed}
|
||||||
|
.button-panel{margin:20px 0 0;width:100%}
|
||||||
|
.button-panel .button{-webkit-appearance:none;background:#009dff;border:none;border-radius:15px;color:#fff;cursor:pointer;height:50px;font-family:'Open Sans',sans-serif;font-size:1.2em;letter-spacing:0.05em;text-align:center;text-transform:uppercase;transition:background 0.3s ease-in-out;width:100%}
|
||||||
|
.button:hover{background:#00c8ff}
|
||||||
|
@media only screen
|
||||||
|
and (max-width:320px){.form-wrapper{padding-top:10%;border-radius:2px;margin:50px auto;position:relative;width:320px}
|
||||||
|
}.top{background:#009dff;position:fixed;z-index:1031;top:0;left:0;height:4px;transition:all 1s;width:0;overflow:hidden}
|
||||||
|
.colors{width:100%;height:4px}
|
||||||
|
.top-banner{background-color:#333}
|
||||||
|
.nav{margin-bottom:30px}
|
||||||
|
.nav li.current a{background-color:#009DFF;color:#fff;padding:10px}
|
||||||
|
.nav a{margin:5px;color:#333;text-decoration:none}
|
||||||
|
.home{text-decoration: none;color: #bbb;line-height: 4;}
|
||||||
|
.body{background-size: cover;display: flex;height: 100vh;align-items: center;justify-content: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if(!empty($background = background())){
|
||||||
|
$background = str_replace('./','../',$background);
|
||||||
|
echo '<div class="body" style="background-image: url('.$background.');">';}
|
||||||
|
?>
|
||||||
|
<div class="form-wrapper">
|
||||||
|
|
||||||
|
<div class="nav">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if($DB->num_rows($DB->query("SELECT * FROM `lylme_pwd`"))!=0){echo '<h1>访问管理</h1>';?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
session_start(); //设置session
|
||||||
|
if($_SESSION['pass'] != 1){?>
|
||||||
|
<p>请输入密码登录</p>
|
||||||
|
<form name="form" action="../include/go.php" method="POST">
|
||||||
|
<div class="form">
|
||||||
|
|
||||||
|
<div class="form-item">
|
||||||
|
<input type="password" autocomplete="new-password" name="pass" required="required" value="" placeholder="密码" autocomplete="off">
|
||||||
|
</div>
|
||||||
|
<div class="button-panel">
|
||||||
|
<input type="submit" class="button" title="登录" value="登录">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form><?php }else{ ?>
|
||||||
|
<form name="form" action="../include/go.php" method="POST">
|
||||||
|
<div class="form">
|
||||||
|
<div class="button-panel">
|
||||||
|
<p> 欢迎回来,您已登录!<br><br>用户组:
|
||||||
|
<?php foreach($_SESSION['list'] as $list){
|
||||||
|
echo(' ['.$list.'] ');
|
||||||
|
}
|
||||||
|
?></p>
|
||||||
|
<div class="form-item">
|
||||||
|
<input type="hidden" autocomplete="new-password" name="exit" required="required" value="exit" >
|
||||||
|
</div>
|
||||||
|
<input type="submit" class="button" title="注销登录" value="注销登录">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}else{echo '<h2>当前站点未启用链接加密</h2>';}
|
||||||
|
?>
|
||||||
|
<a href="../" class="home">返回首页</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
include("../include/common.php");
|
||||||
|
$id = daddslashes($_GET['id']);
|
||||||
|
$sites = $DB->query("select * from lylme_links where id='$id' limit 1");
|
||||||
|
$site = $DB->fetch($sites);
|
||||||
|
$info = get_head($site["url"]);
|
||||||
|
if (empty($site["icon"])) {
|
||||||
|
$site["icon"] = '<img src="/assets/img/default-icon.png" alt="' . $site["name"] . '" />';
|
||||||
|
} else if (!preg_match("/^<svg*/", $site["icon"])) {
|
||||||
|
$site["icon"] = '<img src="' . $site["icon"] . '" alt="' . $site["name"] . '" />';
|
||||||
|
} else {
|
||||||
|
$site["icon"] = $site["icon"];
|
||||||
|
}
|
||||||
|
if(empty($DB->num_rows($sites)) || $site['link_pwd']!=0){
|
||||||
|
include(theme_file('404.php')); //页面不存在
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$groups = $DB->query("select `group_name`,`group_icon` from lylme_groups where group_id=".$site['group_id']." limit 1");
|
||||||
|
$group = $DB->fetch($groups);
|
||||||
|
include(theme_file('site.php'));
|
||||||
|
|
||||||
|
// $pv =$site['link_pv']+1;
|
||||||
|
// $DB->query("UPDATE `lylme_links` SET `link_pv` = '".$pv."' WHERE `lylme_links`.`id` = $id;");
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变量说明
|
||||||
|
* $groups['group_name'] 所在分组名称
|
||||||
|
* $groups['group_icon'] 所在分组图标
|
||||||
|
* $site['id'] 链接ID
|
||||||
|
* $site['name'] 链接名称
|
||||||
|
* $site['url'] 链接地址
|
||||||
|
* $site['PS'] 链接描述
|
||||||
|
* $info['title'] 网站标题
|
||||||
|
* $info['description'] 网站描述
|
||||||
|
* $info['keywords'] 网站关键词
|
||||||
|
**/
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
include_once("../include/common.php");
|
||||||
|
header("Content-type: text/xml");
|
||||||
|
header('HTTP/1.1 200 OK');
|
||||||
|
echo '<?xml version="1.0" encoding="utf-8"?>'."\n".'<urlset>'."\n";
|
||||||
|
?>
|
||||||
|
<url>
|
||||||
|
<loc><?php echo siteurl()?></loc>
|
||||||
|
<lastmod><?php echo date('Y-m-d');?></lastmod>
|
||||||
|
<changefreq>daily</changefreq>
|
||||||
|
<priority>1.0</priority>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc><?php echo siteurl().'/apply'?></loc>
|
||||||
|
<lastmod><?php echo date('Y-m');?>-01</lastmod>
|
||||||
|
<changefreq>monthly</changefreq>
|
||||||
|
<priority>0.9</priority>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc><?php echo siteurl().'/about'?></loc>
|
||||||
|
<lastmod><?php echo date('Y-m');?>-01</lastmod>
|
||||||
|
<changefreq>monthly</changefreq>
|
||||||
|
<priority>0.9</priority>
|
||||||
|
</url>
|
||||||
|
<?php
|
||||||
|
$sites = $DB->query("SELECT `id` FROM `lylme_links` WHERE `link_pwd` = 0");
|
||||||
|
while ( $site = $DB->fetch($sites)) { ?>
|
||||||
|
<url>
|
||||||
|
<loc><?php echo(siteurl().'/site-'.$site['id'].'.html');?></loc>
|
||||||
|
<lastmod><?php echo date('Y-m');?>-01</lastmod>
|
||||||
|
<changefreq>monthly</changefreq>
|
||||||
|
<priority>0.8</priority>
|
||||||
|
</url>
|
||||||
|
<?php } ?>
|
||||||
|
</urlset>
|
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
header("status: 404 Not Found");
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
|
||||||
|
<title>404 - 页面不存在</title>
|
||||||
|
<link href="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/bootstrap/5.1.3/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
|
||||||
|
<style>
|
||||||
|
body{background-color:#fff}
|
||||||
|
.error-page{height:100%;position:fixed;width:100%}
|
||||||
|
.error-body{padding-top:5%}
|
||||||
|
.error-body h1{font-size:210px;font-weight:700;text-shadow:4px 4px 0 #f5f6fa,6px 6px 0 #33cabb;line-height:210px;color:#33cabb}
|
||||||
|
.error-body h4{margin:30px 0px}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<section class="error-page">
|
||||||
|
<div class="error-box">
|
||||||
|
<div class="error-body text-center">
|
||||||
|
<h1>404</h1>
|
||||||
|
<h4>抱歉,页面不存在!</h4>
|
||||||
|
<a href="/" class="btn btn-primary ">返回首页</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,47 @@
|
|||||||
|
<html lang="zh-cn">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title><?php echo $site['name'] . " - " .explode("-", $conf['title'])[0];?></title>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
|
<meta name="keywords" content="<?php echo $site['name'].','.$conf['keywords']?>" />
|
||||||
|
<meta name="description" content="<?php echo explode("-", $conf['title'])[0];?>已收录站点:<?php echo $site['name'].'。'.$conf['description']?>" />
|
||||||
|
<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{background:#fff!important}
|
||||||
|
body:not(.ready){overflow:auto!important}
|
||||||
|
#main{max-width:90%}
|
||||||
|
p.footer{margin-top:60px}
|
||||||
|
a{text-decoration:none}
|
||||||
|
svg.icon{width:40px;height:40px}
|
||||||
|
p.footer{width:100%;position:fixed;bottom:0;text-align:center}
|
||||||
|
span.site_name{font-size:22px;margin:0;font-weight:700;margin-left:5px}
|
||||||
|
.service-wrap-w a{color:#fff!important}
|
||||||
|
#SOHUCS #SOHU_MAIN .module-mobile-cmt-header{background-color:#fff!important}
|
||||||
|
</style>
|
||||||
|
<link href="https://cdn.lylme.com/admin/lyear/css/style.min.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="markdown-section" id="main">
|
||||||
|
<?php
|
||||||
|
echo $site["icon"].'<span class="site_name">'. $site["name"].'</span>';
|
||||||
|
if(!empty($info['title'])){
|
||||||
|
echo '<p><b>网站标题:</b>'.$info['title'].'</p>';
|
||||||
|
}
|
||||||
|
if(!empty($info['description'])){
|
||||||
|
echo '<p><b>网站描述:</b>'.$info['description'].'</p>';
|
||||||
|
}
|
||||||
|
if(!empty($info['keywords'])){
|
||||||
|
echo '<p><b>网站关键词:</b>'.$info['keywords'].'</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '<p><b>所在分组:</b>'.$group['group_name'].'</p>
|
||||||
|
';
|
||||||
|
echo "<p><a class='btn btn-pink' href='/'>返回</a> <a rel='nofollow' class='btn btn-success' href='". $site["url"]."'>访问</a></p>";
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script src="/assets/js/svg.js"></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,4 @@
|
|||||||
|
RewriteEngine On
|
||||||
|
#RewriteBase /
|
||||||
|
RewriteRule ^site-(\d+)\.html$ /site/index.php?id=$1
|
||||||
|
RewriteRule ^/sitemap.xml$ /site/sitemap.php
|
@ -0,0 +1,2 @@
|
|||||||
|
rewrite ^/site-(\d+)\.html$ /site/index.php?id=$1;
|
||||||
|
rewrite ^/sitemap.xml$ /site/sitemap.php;
|
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"author_name": "5iux",
|
||||||
|
"author_link": "https://github.com/5iux/sou",
|
||||||
|
"theme_name": "5iux",
|
||||||
|
"theme_version": "2.0",
|
||||||
|
"theme_explain": "5IUX搜索",
|
||||||
|
"theme_demo": "https://spage.lylme.com/theme/5iux"
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
#### 六零导航页主题目录
|
||||||
|
|
||||||
|
[六零导航页主题开发文档](http://doc.lylme.com/dev/theme)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue