mirror of
https://github.com/LyLme/lylme_spage.git
synced 2024-11-17 14:34:08 +08:00
优化 后台设置
This commit is contained in:
parent
38adf38d0d
commit
b0ff923693
@ -1,13 +1,23 @@
|
||||
<?php
|
||||
/*
|
||||
* @Description:
|
||||
* @Author: LyLme admin@lylme.com
|
||||
* @Date: 2024-01-23 12:25:35
|
||||
* @LastEditors: LyLme admin@lylme.com
|
||||
* @LastEditTime: 2024-04-14 05:29:51
|
||||
* @FilePath: /lylme_spage/admin/about.php
|
||||
* @Copyright (c) 2024 by LyLme, All Rights Reserved.
|
||||
*/
|
||||
$title = '关于页面设置';
|
||||
include './head.php';
|
||||
if ($_GET['set'] == 'conf_submit') {
|
||||
$set = isset($_GET['set'])?$_GET['set']:"";
|
||||
if ($set== 'conf_submit') {
|
||||
$about = $_POST['about'];
|
||||
saveSetting('about_content', $about);
|
||||
echo '<script>alert("修改成功!");window.location.href="./about.php";</script>';
|
||||
exit();
|
||||
}
|
||||
if ($_GET['set'] == 'default') {
|
||||
if ($set == 'default') {
|
||||
|
||||
saveSetting('about_content', "<h3>关于本站</h3>\r\n<p>感谢来访,本站致力于简洁高效的上网导航和搜索入口,安全快捷。</p>\r\n<p>如果您喜欢我们的网站,请将本站添加到收藏夹(快捷键<code>Ctrl+D</code>),并<a href=\"https://jingyan.baidu.com/article/4dc40848868eba89d946f1c0.html\" target=\"_blank\">设为浏览器主页</a>,方便您的下次访问,感谢支持。<p>\r\n<hr>\r\n<h3>本站承诺</h3>\r\n<p><strong>绝对不会收集用户的隐私信息</strong><p>\r\n<p>区别于部分导航网站,本站链接直接跳转目标,不会对链接处理再后跳转,不会收集用户的隐藏信息,包括但不限于点击记录,访问记录和搜索记录,请放心使用</p>\r\n<hr>\r\n<h3>申请收录</h3>\r\n<p>请点<a href=\"../apply\" target=\"_blank\">这里</a></p>\r\n<hr>\r\n<h3>联系我们</h3>\r\n<p>若您在使用本站时遇到了包括但不限于以下问题:</p>\r\n<li>图标缺失</li>\r\n<li>目标网站无法打开</li>\r\n<li>描述错误</li>\r\n<li>网站违规</li>\r\n<li>收录加急处理</li>\r\n<li>链接删除</li>\r\n<p><strong>请发邮件与我们联系</strong></p>\r\n<h5>联系邮箱</h5>\r\n<p><a href=\"mailto:无\">无</a></p>\r\n<h5>联系说明</h5>\r\n<p>为了您的问题能快速被处理,建议在邮件主题添加【反馈】【投诉】【推荐】【友链】</p>");
|
||||
echo '<script>alert("恢复默认成功!");window.location.href="./about.php";</script>';
|
||||
|
@ -9,44 +9,55 @@ 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 . ";";
|
||||
$sw = $_POST['status'] == 1 ? 1 : 2;
|
||||
$ids = $_POST['id'];
|
||||
if (!is_array($ids)) {
|
||||
//转为数组
|
||||
$ids = array($ids);
|
||||
}
|
||||
$e = 0;
|
||||
foreach ($ids as $id) {
|
||||
if ($sw == 1) {
|
||||
if ($DB->query($sql)) {
|
||||
$applyres = $DB->get_row("SELECT * FROM `lylme_apply` WHERE `apply_id` = " . $id);
|
||||
//将通过的链接插入到数据库
|
||||
$applyres = $DB->get_row("SELECT * FROM `lylme_apply` WHERE `apply_status` = 0 ANd `apply_id` = $id");
|
||||
if (!empty($applyres)) {
|
||||
$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']));
|
||||
$desc = strip_tags(daddslashes($applyres['apply_desc']));
|
||||
$link_order = $DB->count('select MAX(id) from `lylme_links`') + 1;
|
||||
$sql1 = "INSERT INTO `lylme_links` (`id`, `name`, `group_id`, `url`, `icon`, `link_desc`,`link_order`) VALUES (NULL, '" . $name . "', '" . $group_id . "', '" . $url . "', '" . $icon . "', '" . $desc . " ', '" . $link_order . "');";
|
||||
if($DB->query($sql1)) {
|
||||
exit('{"code": "200","msg":"成功!网站已成功收录!"}');
|
||||
} else {
|
||||
exit('{"code": "-1","操作失败!原因:\n' . $DB->error() . '"}');
|
||||
$DB->query("INSERT INTO `lylme_links` (`id`, `name`, `group_id`, `url`, `icon`, `link_desc`,`link_order`) VALUES (NULL, '$name', '$group_id', '$url', '$icon', '', '$link_order');");
|
||||
}
|
||||
}
|
||||
} elseif($sw == 2) {
|
||||
if ($DB->query($sql)) {
|
||||
exit('{"code": "200","msg":"操作成功!"}');
|
||||
} else {
|
||||
exit('{"code": "-1","操作失败!原因:\n' . $DB->error() . '"}');
|
||||
$sql = "UPDATE `lylme_apply` SET `apply_status` = '$sw' WHERE `apply_status` = 0 ANd `apply_id` = $id;";
|
||||
if (!$DB->query($sql)) {
|
||||
$e++;
|
||||
}
|
||||
}
|
||||
if ($e == 0) {
|
||||
exit('{"code": 200,"msg":"操作成功!"}');
|
||||
} else {
|
||||
exit('{"code": "-2","操作失败!-2"}');
|
||||
exit('{"code": 100,"msg":"错误,失败' . $e . '条"}');
|
||||
}
|
||||
break;
|
||||
//删除
|
||||
case 'delete':
|
||||
$id = $_POST['id'];
|
||||
$delsql = 'DELETE FROM `lylme_apply` WHERE apply_id =' . $id;
|
||||
if ($DB->query($delsql)) {
|
||||
exit('{"code": "200","msg":"操作成功!"}');
|
||||
$ids = $_POST['id'];
|
||||
if (!is_array($ids)) {
|
||||
$ids = array($ids);
|
||||
}
|
||||
$e = 0;
|
||||
foreach ($ids as $id) {
|
||||
if (!$DB->query("DELETE FROM `lylme_apply` WHERE apply_id = $id")) {
|
||||
$e++;
|
||||
}
|
||||
}
|
||||
if ($e == 0) {
|
||||
exit('{"code": 200,"msg":"操作成功!"}');
|
||||
} else {
|
||||
exit('{"code": "-2","操作失败!-2"}');
|
||||
exit('{"code": 100,"msg":"错误,失败' . $e . '条"}');
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -1,50 +1,105 @@
|
||||
<?php
|
||||
/*
|
||||
* @Description:
|
||||
* @Author: LyLme admin@lylme.com
|
||||
* @Date: 2024-01-23 12:25:35
|
||||
* @LastEditors: LyLme admin@lylme.com
|
||||
* @LastEditTime: 2024-04-13 17:25:21
|
||||
* @FilePath: /lylme_spage/admin/ajax_link.php
|
||||
* @Copyright (c) 2024 by LyLme, All Rights Reserved.
|
||||
*/
|
||||
header('Content-Type:application/json');
|
||||
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;
|
||||
$e = 0;
|
||||
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);
|
||||
if (!$DB->query($sql)) {
|
||||
$e++;
|
||||
}
|
||||
}
|
||||
if ($e == 0) {
|
||||
exit('{"code": 200,"msg":"操作成功!"}');
|
||||
} else {
|
||||
exit('{"code": 100,"msg":"错误,失败' . $e . '条"}');
|
||||
}
|
||||
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);
|
||||
if (!$DB->query($sql)) {
|
||||
$e++;
|
||||
}
|
||||
}
|
||||
if ($e == 0) {
|
||||
exit('{"code": 200,"msg":"操作成功!"}');
|
||||
} else {
|
||||
exit('{"code": 100,"msg":"错误,失败' . $e . '条"}');
|
||||
}
|
||||
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);
|
||||
if (!$DB->query($sql)) {
|
||||
$e++;
|
||||
}
|
||||
}
|
||||
if ($e == 0) {
|
||||
exit('{"code": 200,"msg":"操作成功!"}');
|
||||
} else {
|
||||
exit('{"code": 100,"msg":"错误,失败' . $e . '条"}');
|
||||
}
|
||||
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);
|
||||
if (!$DB->query($sql)) {
|
||||
$e++;
|
||||
}
|
||||
}
|
||||
if ($e == 0) {
|
||||
exit('{"code": 200,"msg":"操作成功!"}');
|
||||
} else {
|
||||
exit('{"code": 100,"msg":"错误,失败' . $e . '条"}');
|
||||
}
|
||||
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);
|
||||
if (!$DB->query($sql)) {
|
||||
$e++;
|
||||
}
|
||||
}
|
||||
if ($e == 0) {
|
||||
exit('{"code": 200,"msg":"操作成功!"}');
|
||||
} else {
|
||||
exit('{"code": 100,"msg":"错误,失败' . $e . '条"}');
|
||||
}
|
||||
break;
|
||||
case 'del':
|
||||
//链接删除
|
||||
foreach ($_POST['links'] as $lk => $lv) {
|
||||
$sql = "DELETE FROM `lylme_links` WHERE `lylme_links`.`id` = " . $lv . ";";
|
||||
$DB->query($sql);
|
||||
if (!$DB->query($sql)) {
|
||||
$e++;
|
||||
}
|
||||
}
|
||||
if ($e == 0) {
|
||||
exit('{"code": 200,"msg":"操作成功!"}');
|
||||
} else {
|
||||
exit('{"code": 100,"msg":"错误,失败' . $e . '条"}');
|
||||
}
|
||||
break;
|
||||
|
||||
@ -53,13 +108,12 @@ switch($submit) {
|
||||
$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) {
|
||||
function zipExtract($src, $dest)
|
||||
{
|
||||
$zip = new ZipArchive();
|
||||
if ($zip->open($src) === true) {
|
||||
$zip->extractTo($dest);
|
||||
@ -68,7 +122,8 @@ switch($submit) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function deldir($dir) {
|
||||
function deldir($dir)
|
||||
{
|
||||
if (!is_dir($dir)) return false;
|
||||
$dh = opendir($dir);
|
||||
while ($file = readdir($dh)) {
|
||||
@ -91,9 +146,17 @@ switch($submit) {
|
||||
$scriptpath = str_replace('\\', '/', $_SERVER['SCRIPT_NAME']);
|
||||
$scriptpath = substr($scriptpath, 0, strrpos($scriptpath, '/'));
|
||||
$admin_path = substr($scriptpath, strrpos($scriptpath, '/') + 1);
|
||||
$update = require('cache.php');
|
||||
if (!empty($update) && $update['switch']) {
|
||||
if (!$update['file'] == $_POST['file']) {
|
||||
exit('{"code": -1,"msg":"更新文件校验不通过!"}');
|
||||
}
|
||||
} else {
|
||||
exit('{"code": -99,"msg":"更新未经鉴权!"}');
|
||||
}
|
||||
$RemoteFile = $_POST['file'];
|
||||
$ZipFile = "lylme_spage-update.zip";
|
||||
copy($RemoteFile,$ZipFile) or die("无从更新服务器下载更新包文件!");
|
||||
copy($RemoteFile, $ZipFile) or die('{"code": 400,"msg":"无从更新服务器获取更新资源包!"}');
|
||||
if (zipExtract($ZipFile, ROOT)) {
|
||||
if ($admin_path != 'admin' && is_dir(ROOT . 'admin')) {
|
||||
//修改后台地址
|
||||
@ -101,14 +164,13 @@ switch($submit) {
|
||||
rename(ROOT . 'admin', ROOT . $admin_path);
|
||||
}
|
||||
unlink($ZipFile);
|
||||
exit ('success');
|
||||
}
|
||||
else {
|
||||
exit('{"code": 200,"msg":"更新成功"}');
|
||||
} else {
|
||||
unlink($ZipFile);
|
||||
exit('无法解压文件!请手动下载更新包解压');
|
||||
exit('{"code": 10,"msg":"无法解压文件!请手动下载更新包解压"}');
|
||||
}
|
||||
break;
|
||||
default:
|
||||
exit('error');
|
||||
exit('{"code": -2,"msg":"error"}');
|
||||
break;
|
||||
}
|
33
admin/ajax_theme.php
Normal file
33
admin/ajax_theme.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/*
|
||||
* @Description: 主题设置操作
|
||||
* @Author: LyLme admin@lylme.com
|
||||
* @Date: 2024-04-12 22:39:49
|
||||
* @LastEditors: LyLme admin@lylme.com
|
||||
* @LastEditTime: 2024-04-13 17:22:28
|
||||
* @FilePath: /lylme_spage/admin/ajax_theme.php
|
||||
* @Copyright (c) 2024 by LyLme, All Rights Reserved.
|
||||
*/
|
||||
|
||||
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;
|
||||
$data = isset($_POST) ? $_POST : null;
|
||||
if ($set == "save" && !empty($data)) {
|
||||
$theme_name = "theme_config_" . $conf['template'];
|
||||
// $data['status'] = isset($data['status']) && $data['status'] == "on" ? true : false;
|
||||
unset($data['file']);
|
||||
$data = json_encode($data);
|
||||
if (saveSetting($theme_name, $data, theme($conf['template'], 'theme_name') . "主题自定义设置")) {
|
||||
exit('{"code": 200,"msg":"保存成功"}');
|
||||
} else {
|
||||
exit('{"code": 0,"msg":"保存失败"}');
|
||||
}
|
||||
} else {
|
||||
exit('{"code": -1,"msg":"非法请求!"}');
|
||||
}
|
144
admin/apply.php
144
admin/apply.php
@ -1,15 +1,27 @@
|
||||
<?php
|
||||
/*
|
||||
* @Description: 申请收录
|
||||
* @Author: LyLme admin@lylme.com
|
||||
* @Date: 2024-01-23 12:25:35
|
||||
* @LastEditors: LyLme admin@lylme.com
|
||||
* @LastEditTime: 2024-04-13 17:05:21
|
||||
* @FilePath: /lylme_spage/admin/apply.php
|
||||
* @Copyright (c) 2024 by LyLme, All Rights Reserved.
|
||||
*/
|
||||
$title = '收录管理';
|
||||
include './head.php';
|
||||
$applyrows = $DB->num_rows($DB->query("SELECT * FROM `lylme_apply`"));
|
||||
$grouplists = $DB->query("SELECT * FROM `lylme_groups`");
|
||||
?>
|
||||
<script src="../assets/js/svg.js"></script>
|
||||
<style>td img,td svg.icon {
|
||||
<style>
|
||||
td img,
|
||||
td svg.icon {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
max-width: 35px;
|
||||
}
|
||||
|
||||
pre {
|
||||
line-height: 1 !important;
|
||||
}
|
||||
@ -90,15 +102,13 @@ echo 'value="2">关闭-关闭申请</option>
|
||||
<input type="submit" class="btn btn-primary btn-block" value="保存"></form>
|
||||
</div>
|
||||
<br/><a href="./apply.php"><<返回收录管理列表</a></div></div>';
|
||||
|
||||
} elseif ($set == 'conf_submit') {
|
||||
$apply = $_POST['apply'];
|
||||
$apply_gg = $_POST['apply_gg'];
|
||||
saveSetting('apply', $apply);
|
||||
saveSetting('apply_gg', $apply_gg);
|
||||
echo '<script>alert("修改成功!");window.location.href="./apply.php";</script>';
|
||||
}
|
||||
elseif ($set == 'edit_submit') {
|
||||
} elseif ($set == 'edit_submit') {
|
||||
$id = $_GET['id'];
|
||||
$rows2 = $DB->query("select * from lylme_apply where apply_id='$id' limit 1");
|
||||
$rows = $DB->fetch($rows2);
|
||||
@ -111,10 +121,10 @@ elseif ($set == 'edit_submit') {
|
||||
echo '<script>alert("保存错误,请确保带星号的都不为空!");history.go(-1);</script>';
|
||||
} else {
|
||||
$sql = "UPDATE `lylme_apply` SET `apply_name` = '" . $name . "', `apply_group` = '" . $group . "',`apply_icon` = '" . $icon . "',`apply_url` = '" . $url . "' WHERE `lylme_apply`.`apply_id` = '" . $id . "';";
|
||||
if ($DB->query($sql)) echo '<script>alert("修改 ' . $name . ' 成功!");window.location.href="./apply.php";</script>'; else echo '<script>alert("' . $sql . '修改失败!原因:\n'.$DB->error().'");history.go(-1);</script>';
|
||||
if ($DB->query($sql)) echo '<script>alert("修改 ' . $name . ' 成功!");window.location.href="./apply.php";</script>';
|
||||
else echo '<script>alert("' . $sql . '修改失败!原因:\n' . $DB->error() . '");history.go(-1);</script>';
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
echo '<pre>' . $conf['apply_gg'] . '<br><a href="./apply.php?set=conf">修改</a></pre>';
|
||||
echo '<div class="alert alert-info">
|
||||
收录申请统计: <b>' . $applyrows . '</b> 次<br/>
|
||||
@ -135,32 +145,55 @@ elseif ($set == 'edit_submit') {
|
||||
申请收录地址:<code>' . siteurl() . '/apply</code> <a href="' . siteurl() . '/apply" target="_blank">访问</a><br><br><sub>已审核的图标会被隐藏,点击图标可重新加载<br>部分网站图标一直处于加载或无法显示,可能原因:无法访问或跨域问题,建议建将图标本地化</sub></div>';
|
||||
|
||||
?>
|
||||
<div id="toolbar" class="toolbar-btn-action">
|
||||
<button id="btn_edit" type="button" class="btn btn-success btn-label" onclick="checked_status(1)">
|
||||
<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="checked_status(2)">
|
||||
<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="checked_del()">
|
||||
<label><i class="mdi mdi-window-close" aria-hidden="true"></i></label>删除</button>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="table-responsive" id="applylist">
|
||||
<table class="table table-striped">
|
||||
<thead><tr><th>序号</th><th>图标</th><th>名称</th><th>链接</th><th>访问</th><th>分组</th><th>审核</th><th>操作</th><th>申请时间</th></tr></thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<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>
|
||||
<th>审核</th>
|
||||
<th>操作</th>
|
||||
<th>申请时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$rs = $DB->query("SELECT * FROM `lylme_apply` ORDER BY `lylme_apply`.`apply_time` DESC");
|
||||
$i = 0;
|
||||
while ($res = $DB->fetch($rs)) {
|
||||
$i++;
|
||||
echo '<tr><td>';
|
||||
echo '<tr><td><input type="checkbox" name="link-check" value="' . $res['apply_id'] . '"></td><td>';
|
||||
|
||||
if($res["apply_status"]==0) {echo '<font color="#48b0f7"><b>'.$i.'</b></font>';}
|
||||
else{echo '<b>'.$i.'</b>';}
|
||||
if ($res["apply_status"] == 0) {
|
||||
echo '<font color="#48b0f7"><b>' . $i . '</b></font>';
|
||||
} else {
|
||||
echo '<b>' . $i . '</b>';
|
||||
}
|
||||
echo '</td><td>';
|
||||
if ($res["apply_status"] == 0) {
|
||||
if (empty($res["apply_icon"])) {
|
||||
echo '未提交图标';
|
||||
}
|
||||
else if (preg_match("/^<svg*/", $link["icon"])) {
|
||||
} else if (preg_match("/^<svg*/", $link["icon"])) {
|
||||
echo $link["icon"];
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
echo '<img class="lazy" src="https://cdn.lylme.com/admin/lyear/img/loading.gif" data-original="' . $res["apply_icon"] . '" />';
|
||||
}
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
echo '<img class="lazys" title="获取" src="https://cdn.lylme.com/admin/lyear/img/get.png" data-original="' . $res["apply_icon"] . '"';
|
||||
}
|
||||
echo '</td><td>' . $res['apply_name'] . '</td><td>' . $res['apply_url'] . '</td><td><a class="btn btn-purple btn-xs" href="../include/go.php?url=' . $res['apply_url'] . '" target="_blank">访问</a></td><td>' . $DB->fetch($DB->query("SELECT * FROM `lylme_groups` WHERE `group_id` = " . $res['apply_group']))["group_name"] . '
|
||||
@ -172,10 +205,12 @@ elseif ($set == 'edit_submit') {
|
||||
} else {
|
||||
echo '
|
||||
<button class="btn btn-primary btn-xs" onclick="status(' . $res['apply_id'] . ',1)">通过</button>
|
||||
<button class="btn btn-cyan btn-xs" onclick="status(' . $res['apply_id'] . ',2)">拒绝</a>';
|
||||
<button class="btn btn-warning btn-xs" onclick="status(' . $res['apply_id'] . ',2)">拒绝</a>';
|
||||
}
|
||||
echo '</td><td>';
|
||||
if($res["apply_status"]==0) {echo '<a href="./apply.php?set=edit&id=' . $res['apply_id'] . '" class="btn btn-info btn-xs">编辑</a> ';}
|
||||
if ($res["apply_status"] == 0) {
|
||||
echo '<a href="./apply.php?set=edit&id=' . $res['apply_id'] . '" class="btn btn-info btn-xs">编辑</a> ';
|
||||
}
|
||||
echo ' <button class="btn btn-xs btn-danger" onclick="deletes(' . $res['apply_id'] . ')">删除</button> </td>
|
||||
<td>' . $res['apply_time'] . '</td>
|
||||
</tr>';
|
||||
@ -194,67 +229,10 @@ elseif ($set == 'edit_submit') {
|
||||
}
|
||||
include './footer.php';
|
||||
?>
|
||||
<script src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery.lazyload/1.9.1/jquery.lazyload.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>
|
||||
function status(id,status){
|
||||
$.ajax({
|
||||
url:"ajax_apply.php?set=status",
|
||||
type:"POST",
|
||||
dataType:"json",
|
||||
data:{id:id,status:status},
|
||||
success:function(data){
|
||||
if(data.code == '200'){
|
||||
layer.msg(data.msg);
|
||||
$("#applylist").load(location.href+" #applylist>*","");
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
layer.msg(data.msg);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error:function(data){
|
||||
layer.msg('服务器错误');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function deletes(id){
|
||||
if(!confirm("确定删除?")){
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
url:"ajax_apply.php?set=delete",
|
||||
type:"POST",
|
||||
dataType:"json",
|
||||
data:{id:id},
|
||||
success:function(data){
|
||||
if(data.code == '200'){
|
||||
layer.msg(data.msg);
|
||||
$("#applylist").load(location.href+" #applylist>*","");
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
layer.msg(data.msg);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error:function(data){
|
||||
layer.msg('服务器错误');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
$("img.lazy").lazyload({
|
||||
threshold : 100
|
||||
});
|
||||
$(document).ready(function(){
|
||||
$(".lazys").click(function(){
|
||||
$(this).attr('src','https://cdn.lylme.com/admin/lyear/img/loading.gif');
|
||||
$(this).lazyload();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script src="/assets/admin/js/bootstrap-notify.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/admin/js/lightyear.js"></script>
|
||||
<script src="/assets/admin/js/jquery.lazyload.min.js" type="application/javascript"></script>
|
||||
<script src="/assets/admin/js/layer.min.js" type="application/javascript"></script>
|
||||
<link href="/assets/admin/js/jquery-confirm.min.css" type="text/css" rel="stylesheet" />
|
||||
<script src="/assets/admin/js/jquery-confirm.min.js" type="application/javascript"></script>
|
||||
<script src="/assets/admin/js/apply.js"></script>
|
5
admin/css/bootstrap.min.css
vendored
5
admin/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
1
admin/css/coloris.min.css
vendored
1
admin/css/coloris.min.css
vendored
@ -1 +0,0 @@
|
||||
.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}
|
1
admin/css/materialdesignicons.min.css
vendored
1
admin/css/materialdesignicons.min.css
vendored
File diff suppressed because one or more lines are too long
4538
admin/css/style.min.css
vendored
4538
admin/css/style.min.css
vendored
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
Before Width: | Height: | Size: 2.1 MiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,4 +1,5 @@
|
||||
<script language="javascript">
|
||||
|
||||
function loginout(){
|
||||
if( confirm("你确实要退出吗?")){
|
||||
window.parent.location.href="login.php?logout";
|
||||
@ -8,10 +9,10 @@ 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>
|
||||
<script type="text/javascript" src="/assets/admin/js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/admin/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/admin/js/perfect-scrollbar.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/admin/js/main.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
<?php $DB->close(); ?>
|
@ -173,9 +173,9 @@ else {
|
||||
}
|
||||
include './footer.php';
|
||||
?>
|
||||
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/layer/3.1.1/layer.min.js" type="application/javascript"></script>
|
||||
<script type="text/javascript" src="js/lightyear.js"></script>
|
||||
<script src="js/bootstrap-notify.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://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery-confirm/3.3.0/jquery-confirm.min.js" type="application/javascript"></script>
|
||||
<script type="text/javascript" src="js/group.js"></script>
|
||||
<script src="/assets/admin/js/layer.min.js" type="application/javascript"></script>
|
||||
<script type="text/javascript" src="/assets/admin/js/lightyear.js"></script>
|
||||
<script src="/assets/admin/js/bootstrap-notify.min.js"></script>
|
||||
<link href="/assets/admin/js/jquery-confirm.min.css" type="text/css" rel="stylesheet" />
|
||||
<script src="/assets/admin/js/jquery-confirm.min.js" type="application/javascript"></script>
|
||||
<script type="text/javascript" src="/assets/admin/js/group.js"></script>
|
@ -1,4 +1,13 @@
|
||||
<?php
|
||||
/*
|
||||
* @Description:
|
||||
* @Author: LyLme admin@lylme.com
|
||||
* @Date: 2024-01-23 12:25:35
|
||||
* @LastEditors: LyLme admin@lylme.com
|
||||
* @LastEditTime: 2024-04-14 14:16:13
|
||||
* @FilePath: /lylme_spage/admin/head.php
|
||||
* @Copyright (c) 2024 by LyLme, All Rights Reserved.
|
||||
*/
|
||||
include_once("../include/common.php");
|
||||
if (isset($islogin) == 1) {
|
||||
} else {
|
||||
@ -7,15 +16,16 @@ if(isset($islogin) == 1) {
|
||||
?>
|
||||
<!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">
|
||||
<link href="/assets/admin/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/assets/admin/css/materialdesignicons.min.css" rel="stylesheet">
|
||||
<link href="/assets/admin/css/style.min.css" rel="stylesheet">
|
||||
</head>
|
||||
<div class="lyear-layout-web">
|
||||
<div class="lyear-layout-container">
|
||||
@ -33,7 +43,6 @@ if(isset($islogin) == 1) {
|
||||
<a href="javascript:void(0)"><i class="mdi mdi-palette"></i>网站配置</a>
|
||||
<ul class="nav nav-subnav">
|
||||
<li> <a href="./set.php">网站基本设置</a> </li>
|
||||
<li> <a href="./theme.php">网站主题设置</a> </li>
|
||||
<li> <a href="./about.php">关于页面设置</a> </li>
|
||||
<li> <a href="./user.php">修改账号密码</a> </li>
|
||||
|
||||
@ -46,7 +55,7 @@ if($applyrows > 0) {
|
||||
<div class="applyrow">' . $applyrows . '</div>';
|
||||
}
|
||||
?></li>
|
||||
<li class="nav-item nav-item-has-subnav">
|
||||
<li class="nav-item active"> <a href="./theme.php"><i class="mdi mdi-seal"></i>主题设置</a></li>
|
||||
<li class="nav-item active"> <a href="./group.php"><i class="mdi mdi-folder"></i>分组管理</a></li>
|
||||
<li class="nav-item active"> <a href="./link.php"><i class="mdi mdi-web"></i>链接管理</a></li>
|
||||
<li class="nav-item active"> <a href="./tag.php"><i class="mdi mdi-cube"></i>导航菜单</a></li>
|
||||
@ -60,7 +69,7 @@ if($applyrows > 0) {
|
||||
<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>
|
||||
?> Powered by <br> <a href="https://github.com/LyLme/lylme_spage"><?php echo explode("-", $conf['title'])[0]; ?> </a></p>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
@ -93,7 +102,9 @@ if($applyrows > 0) {
|
||||
<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-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">
|
||||
@ -119,8 +130,7 @@ if($applyrows > 0) {
|
||||
if (themes != "dark") {
|
||||
var themes = 'default';
|
||||
document.getElementById('site_theme_1').checked = true;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
document.getElementById('site_theme_2').checked = true;
|
||||
}
|
||||
document.write('<body data-theme="' + themes + '">');
|
||||
|
@ -1,4 +1,13 @@
|
||||
<?php
|
||||
/*
|
||||
* @Description: 后台首页
|
||||
* @Author: LyLme admin@lylme.com
|
||||
* @Date: 2024-01-23 12:25:35
|
||||
* @LastEditors: LyLme admin@lylme.com
|
||||
* @LastEditTime: 2024-04-09 02:09:02
|
||||
* @FilePath: /lylme_spage/admin/index.php
|
||||
* @Copyright (c) 2024 by LyLme, All Rights Reserved.
|
||||
*/
|
||||
$title = '后台管理';
|
||||
include './head.php';
|
||||
$last = date("Ym");
|
||||
@ -177,7 +186,7 @@ if (!empty($update)) {
|
||||
include './footer.php';
|
||||
?>
|
||||
<!--图表插件-->
|
||||
<script type="text/javascript" src="js/Chart.js"></script>
|
||||
<script type="text/javascript" src="/assets/admin/js/Chart.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(e) {
|
||||
var $dashChartBarsCnt = jQuery('.js-chartjs-bars')[0].getContext('2d'),
|
||||
|
18962
admin/js/Chart.js
vendored
18962
admin/js/Chart.js
vendored
File diff suppressed because it is too large
Load Diff
2
admin/js/bootstrap-notify.min.js
vendored
2
admin/js/bootstrap-notify.min.js
vendored
File diff suppressed because one or more lines are too long
7
admin/js/bootstrap.min.js
vendored
7
admin/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
6
admin/js/coloris.min.js
vendored
6
admin/js/coloris.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,146 +0,0 @@
|
||||
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: '取消'
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
3
admin/js/jquery.dragsort-0.5.2.min.js
vendored
3
admin/js/jquery.dragsort-0.5.2.min.js
vendored
File diff suppressed because one or more lines are too long
4
admin/js/jquery.min.js
vendored
4
admin/js/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,88 +0,0 @@
|
||||
var lightyear = function(){
|
||||
|
||||
/**
|
||||
* 页面loading
|
||||
*/
|
||||
var pageLoader = function($mode) {
|
||||
var $loadingEl = jQuery('#lyear-loading');
|
||||
$mode = $mode || 'show';
|
||||
if ($mode === 'show') {
|
||||
if ($loadingEl.length) {
|
||||
$loadingEl.fadeIn(250);
|
||||
} else {
|
||||
jQuery('body').prepend('<div id="lyear-loading"><div class="spinner-border text-primary" role="status"><span class="sr-only">Loading...</span></div></div>');
|
||||
}
|
||||
} else if ($mode === 'hide') {
|
||||
if ($loadingEl.length) {
|
||||
$loadingEl.fadeOut(250);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* 页面小提示
|
||||
* @param $msg 提示信息
|
||||
* @param $type 提示类型:'info', 'success', 'warning', 'danger'
|
||||
* @param $delay 毫秒数,例如:1000
|
||||
* @param $icon 图标,例如:'fa fa-user' 或 'glyphicon glyphicon-warning-sign'
|
||||
* @param $from 'top' 或 'bottom'
|
||||
* @param $align 'left', 'right', 'center'
|
||||
* @param $url 跳转链接 例如: https://www.xxxx.com
|
||||
* @author CaiWeiMing <314013107@qq.com>
|
||||
*/
|
||||
var tips = function ($msg, $type, $delay, $icon, $from, $align, $url) {
|
||||
$type = $type || 'info';
|
||||
$delay = $delay || 1000;
|
||||
$from = $from || 'top';
|
||||
$align = $align || 'center';
|
||||
$enter = $type == 'danger' ? 'animated shake' : 'animated fadeInUp';
|
||||
$url = $url || url;
|
||||
jQuery.notify({
|
||||
icon: $icon,
|
||||
message: $msg
|
||||
},
|
||||
{
|
||||
element: 'body',
|
||||
type: $type,
|
||||
allow_dismiss: true,
|
||||
newest_on_top: true,
|
||||
showProgressbar: false,
|
||||
placement: {
|
||||
from: $from,
|
||||
align: $align
|
||||
},
|
||||
offset: 20,
|
||||
spacing: 10,
|
||||
z_index: 10800,
|
||||
delay: $delay,
|
||||
//timer: 1000,
|
||||
animate: {
|
||||
enter: $enter,
|
||||
exit: 'animated fadeOutDown'
|
||||
}
|
||||
});
|
||||
if($url!=''){
|
||||
setTimeout(function(){
|
||||
window.location.href=$url;
|
||||
},$delay);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
var url = '';
|
||||
|
||||
return {
|
||||
// 页面小提示
|
||||
notify : function ($msg, $type, $delay, $icon, $from, $align, $url) {
|
||||
tips($msg, $type, $delay, $icon, $from, $align, $url);
|
||||
},
|
||||
url : function ($url){
|
||||
url=$url;
|
||||
},
|
||||
// 页面加载动画
|
||||
loading : function ($mode) {
|
||||
pageLoader($mode);
|
||||
}
|
||||
};
|
||||
}();
|
433
admin/js/link.js
433
admin/js/link.js
@ -1,433 +0,0 @@
|
||||
//请求页面
|
||||
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>',
|
||||
});
|
||||
});
|
161
admin/js/main.min.js
vendored
161
admin/js/main.min.js
vendored
@ -1,161 +0,0 @@
|
||||
;
|
||||
|
||||
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');
|
||||
|
||||
});
|
6
admin/js/perfect-scrollbar.min.js
vendored
6
admin/js/perfect-scrollbar.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,4 +1,13 @@
|
||||
<?php
|
||||
/*
|
||||
* @Description:
|
||||
* @Author: LyLme admin@lylme.com
|
||||
* @Date: 2024-01-23 12:25:35
|
||||
* @LastEditors: LyLme admin@lylme.com
|
||||
* @LastEditTime: 2024-04-09 02:10:23
|
||||
* @FilePath: /lylme_spage/admin/link.php
|
||||
* @Copyright (c) 2024 by LyLme, All Rights Reserved.
|
||||
*/
|
||||
$title = '链接管理';
|
||||
include './head.php';
|
||||
$grouplists = $DB->query("SELECT * FROM `lylme_groups`");
|
||||
@ -198,20 +207,27 @@ if ($set == 'add') {
|
||||
}
|
||||
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>
|
||||
<script type="text/javascript" src="/assets/admin/js/jquery.dragsort-0.5.2.min.js"></script>
|
||||
<link href="/assets/admin/js/jquery-confirm.min.css" type="text/css" rel="stylesheet" />
|
||||
<script src="/assets/admin/js/layer.min.js" type="application/javascript"></script>
|
||||
<script src="/assets/admin/js/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']
|
||||
<link rel="stylesheet" type="text/css" href="/assets/admin/css/coloris.min.css" />
|
||||
<script type="text/javascript" src="/assets/admin/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>
|
||||
<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);
|
||||
@ -219,9 +235,9 @@ function select_color() {
|
||||
</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 src="/assets/admin/js/bootstrap-notify.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/admin/js/lightyear.js"></script>
|
||||
<script type="text/javascript" src="/assets/admin/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)) {
|
||||
|
@ -1,21 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* @Description: 后台登录页
|
||||
* @Author: LyLme admin@lylme.com
|
||||
* @Date: 2024-01-23 12:25:35
|
||||
* @LastEditors: LyLme admin@lylme.com
|
||||
* @LastEditTime: 2024-04-14 02:19:49
|
||||
* @FilePath: /lylme_spage/admin/login.php
|
||||
* @Copyright (c) 2024 by LyLme, All Rights Reserved.
|
||||
*/
|
||||
include("../include/common.php");
|
||||
header('Content-Type: text/html; charset=UTF-8');
|
||||
if (isset($_POST['user']) && isset($_POST['pass'])) {
|
||||
|
||||
if (isset($_REQUEST['authcode'])) {
|
||||
session_start();
|
||||
if (strtolower($_REQUEST['authcode']) == $_SESSION['authcode']) {
|
||||
$user = daddslashes($_POST['user']);
|
||||
$pass = md5('lylme' . 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');
|
||||
setcookie("admin_token", $token, time() + 604800, "/");
|
||||
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>");
|
||||
}
|
||||
} else {
|
||||
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');
|
||||
setcookie("admin_token", "", time() - 604800, "/");
|
||||
exit("<script language='javascript'>alert('您已成功注销本次登陆!');window.location.href='./login.php';</script>");
|
||||
} elseif (isset($islogin) == 1) {
|
||||
exit("<script language='javascript'>alert('您已登陆!');window.location.href='./';</script>");
|
||||
@ -23,28 +38,32 @@ if(isset($_POST['user']) && isset($_POST['pass'])) {
|
||||
?>
|
||||
<!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">
|
||||
<link href="../assets/admin/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="../assets/admin/css/materialdesignicons.min.css" rel="stylesheet">
|
||||
<link href="../assets/admin/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;
|
||||
@ -52,13 +71,16 @@ if(isset($_POST['user']) && isset($_POST['pass'])) {
|
||||
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;
|
||||
@ -68,6 +90,7 @@ if(isset($_POST['user']) && isset($_POST['pass'])) {
|
||||
z-index: 4;
|
||||
color: #dcdcdc;
|
||||
}
|
||||
|
||||
.login-center .has-feedback.feedback-left.row .form-control-feedback {
|
||||
left: 15px;
|
||||
}
|
||||
@ -89,15 +112,23 @@ if(!empty($background = background())) {
|
||||
</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']?>"/>
|
||||
<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" />
|
||||
<input type="password" placeholder="密码" class="form-control" id="password" name="pass" value="" />
|
||||
<span class="mdi mdi-lock form-control-feedback" aria-hidden="true"></span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group has-feedback feedback-left row">
|
||||
<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-block btn-primary" type="submit" id="login">登录</button>
|
||||
</div>
|
||||
@ -109,8 +140,14 @@ if(!empty($background = background())) {
|
||||
</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>
|
||||
<script type="text/javascript" src="../assets/admin/js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../assets/admin/js/bootstrap.min.js"></script>
|
||||
<script>
|
||||
function recode() {
|
||||
$('#captcha_img').attr('src', '../include/validatecode.php?r=' + Math.random());
|
||||
$("input[name=\'authcode\']").val('');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,4 +1,13 @@
|
||||
<?php
|
||||
/*
|
||||
* @Description:
|
||||
* @Author: LyLme admin@lylme.com
|
||||
* @Date: 2024-01-23 12:25:35
|
||||
* @LastEditors: LyLme admin@lylme.com
|
||||
* @LastEditTime: 2024-04-09 02:15:34
|
||||
* @FilePath: /lylme_spage/admin/pwd.php
|
||||
* @Copyright (c) 2024 by LyLme, All Rights Reserved.
|
||||
*/
|
||||
$title = '加密组管理';
|
||||
include './head.php';
|
||||
?>
|
||||
@ -72,8 +81,7 @@ if ($set == 'add') {
|
||||
$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{
|
||||
} else {
|
||||
echo '<script>alert("添加失败");history.go(-1);</script>';
|
||||
}
|
||||
}
|
||||
@ -88,8 +96,7 @@ if ($set == 'add') {
|
||||
$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{
|
||||
} else {
|
||||
echo '<script>alert("修改失败' . $sql . '");history.go(-1);</script>';
|
||||
}
|
||||
}
|
||||
@ -107,7 +114,14 @@ if ($set == 'add') {
|
||||
?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead><tr><th>名称</th><th>密码</th><th>备注</th><th>操作</th></tr></thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>名称</th>
|
||||
<th>密码</th>
|
||||
<th>备注</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$pgs = $DB->query("SELECT * FROM `lylme_pwd`");
|
||||
|
@ -1,6 +1,23 @@
|
||||
<?php
|
||||
/*
|
||||
* @Description: 后台网站配置
|
||||
* @Author: LyLme admin@lylme.com
|
||||
* @Date: 2024-01-23 12:25:35
|
||||
* @LastEditors: LyLme admin@lylme.com
|
||||
* @LastEditTime: 2024-04-14 14:08:30
|
||||
* @FilePath: /lylme_spage/admin/set.php
|
||||
* @Copyright (c) 2024 by LyLme, All Rights Reserved.
|
||||
*/
|
||||
$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);
|
||||
}
|
||||
function uploadimg($arr, $uppath, $uptype)
|
||||
{
|
||||
if ((($arr["type"] == "image/jpeg") || ($arr["type"] == "image/jpg") || ($arr["type"] == "image/png")) && $arr["size"] < 10485760) {
|
||||
@ -19,34 +36,33 @@ if ($set == 'save') {
|
||||
$wapbackground = $_POST['wapbackground'];
|
||||
$keywords = $_POST['keywords'];
|
||||
$description = $_POST['description'];
|
||||
$mode = $_POST['mode'];
|
||||
$snapshot = $_POST['snapshot'];
|
||||
$licensecode = $_POST['licensecode'];
|
||||
$copyright = $_POST['copyright'];
|
||||
$icp = $_POST['icp'];
|
||||
$yan = $_POST['yan'];
|
||||
$tq = $_POST['tq'];
|
||||
$wztj = $_POST['wztj'];
|
||||
$cdnpublic = $_POST['cdnpublic'];
|
||||
$home_title = $_POST['home-title'];
|
||||
if ($yan == 'true') {
|
||||
saveSetting('yan', 'true');
|
||||
} else {
|
||||
saveSetting('yan', 'false');
|
||||
}
|
||||
if ($tq == 'true') {
|
||||
saveSetting('tq', 'true');
|
||||
} else {
|
||||
saveSetting('tq', 'false');
|
||||
}
|
||||
saveSetting('title', $title);
|
||||
saveSetting('logo', $logo);
|
||||
saveSetting('background', $background);
|
||||
saveSetting('wap_background', $wapbackground);
|
||||
saveSetting('keywords', $keywords);
|
||||
saveSetting('description', $description);
|
||||
saveSetting('copyright', $copyright);
|
||||
saveSetting('icp', $icp);
|
||||
saveSetting('wztj', $wztj);
|
||||
saveSetting('cdnpublic', $cdnpublic);
|
||||
saveSetting('home-title', $home_title);
|
||||
saveSetting('title', $title, "网站名称");
|
||||
saveSetting('logo', $logo, "网站LOGO");
|
||||
saveSetting('background', $background, "背景图片");
|
||||
saveSetting('wap_background', $wapbackground, "手机背景图片");
|
||||
saveSetting('keywords', $keywords, "网站关键词");
|
||||
saveSetting('description', $description, "网站描述");
|
||||
saveSetting('mode', $mode, "网站运行模式");
|
||||
saveSetting('snapshot', $snapshot, "详情页快照API");
|
||||
saveSetting('copyright', $copyright, "底部版权");
|
||||
saveSetting('icp', $icp, "ICP备案号");
|
||||
saveSetting('wztj', $wztj, "自定义footer");
|
||||
saveSetting('cdnpublic', $cdnpublic, "CDN地址");
|
||||
saveSetting('c', $licensecode, "程序授权码");
|
||||
uploadimg($_FILES["logoimg"], 'assets/img/web-logo.png', 'logo');
|
||||
uploadimg($_FILES["wapbackgroundimg"], 'assets/img/web-wapbackground.jpg', 'wap_background');
|
||||
uploadimg($_FILES["backgroundimg"], 'assets/img/web-background.jpg', 'background');
|
||||
@ -91,7 +107,7 @@ if ($set == 'save') {
|
||||
<input type="file" style="display:none" accept="image/png,image/jpeg" id="backgroundimg" name="backgroundimg" onclick="updatetext('checkbackground');" />
|
||||
</div>
|
||||
</div>
|
||||
<small class="help-block">填写图片的URL:如<code>./assets/img/background.jpg</code>或<code><?php echo siteurl() ?>/assets/img/background.jpg</code>或从<code>本地上传</code><br>设置Bing每日壁纸:<a href="https://doc.lylme.com/spage/#/%E8%83%8C%E6%99%AF%E8%AE%BE%E7%BD%AE" target="_blank">查看教程</a><br>注:修改后需要清除浏览器缓存才会改变</small>
|
||||
<small class="help-block">填写图片的URL,如:<code>/assets/img/background.jpg</code>或从<code>本地上传</code><br>设置Bing每日壁纸:<code>/assets/img/bing.php</code><br>注:修改后需要清除浏览器缓存才会改变</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="wap_site_background">手机端背景图片</label>
|
||||
@ -111,22 +127,33 @@ if ($set == 'save') {
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="web_site_description">站点描述</label>
|
||||
<textarea class="form-control" id="web_site_description" rows="5" name="description" placeholder="请输入站点描述"><?php echo $conf['description'] ?></textarea>
|
||||
<small class="help-block">网站描述,有利于搜索引擎抓取相关信息</small>
|
||||
<textarea class="form-control" id="web_site_description" rows="2" name="description" placeholder="请输入站点描述"><?php echo $conf['description'] ?></textarea>
|
||||
<small class="help-block">网站描述,用于搜索引擎抓取相关信息</small>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="web_site_home-title">首页提示语</label>
|
||||
<textarea type="text" class="form-control" name="home-title" placeholder="请输入首页提示语,支持HTML代码"><?php echo $conf['home-title'] ?></textarea>
|
||||
<small class="help-block">首页提示语, 仅适用于部分主题<code>支持HTML代码</code></small>
|
||||
<label for="web_site_home-title">运行模式</label>
|
||||
<label class="lyear-radio radio-primary m-t-10">
|
||||
<input type="radio" <?php if (!$mode = $conf['mode'] == 2) echo 'checked="checked"'; ?> value="1" name="mode">
|
||||
<span>直接访问(默认)</span>
|
||||
</label>
|
||||
<label class="lyear-radio radio-primary m-t-10">
|
||||
<input type="radio" <?php if ($mode) echo 'checked="checked"'; ?> value="2" name="mode">
|
||||
<span>详情页模式</span>
|
||||
</label>
|
||||
|
||||
<small class="help-block">导航链接访问方式,详情页模式需要启用伪静态 <a href="https://doc.lylme.com/spage/#/urlwrite" target="_blank">查看教程</a></small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="web_site_copyright">版权信息</label>
|
||||
<textarea width="200px" type="text" rows="5" class="form-control" name="copyright" placeholder="请输入版权信息,支持HTML代码"><?php echo $conf['copyright'] ?></textarea>
|
||||
<textarea width="200px" type="text" rows="3" class="form-control" name="copyright" placeholder="请输入版权信息,支持HTML代码"><?php echo $conf['copyright'] ?></textarea>
|
||||
<small class="help-block">显示在首页底部的版权提示,<code>支持HTML代码</code></small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="web_site_wztj">自定义footer</label>
|
||||
<textarea type="text" rows="5" class="form-control" name="wztj" placeholder="可填写网站统计、引用JS文件等"><?php echo $conf['wztj'] ?></textarea>
|
||||
<textarea type="text" rows="10" class="form-control" name="wztj" placeholder="可填写网站统计、引用JS文件等"><?php echo $conf['wztj'] ?></textarea>
|
||||
<small class="help-block">站点底部自定义,可填写网站统计、JS代码(需要script标签)、CSS代码(需要style标签)等<code>支持HTML代码</code> <a href="https://doc.lylme.com/spage/#/footer" target="_blank">查看教程</a></small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -143,15 +170,16 @@ if ($set == 'save') {
|
||||
</label>
|
||||
<small class="help-block">显示在首页的随机一言,自定义一言文件路径,一行一条<code>/assets/date/date.dat</code> </small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="btn-block" for="web_tq_status">天气显示开关</label>
|
||||
<label class="lyear-switch switch-solid switch-primary">
|
||||
<input type="checkbox" <?php if ($conf['tq'] != 'false') {
|
||||
echo 'checked="checked"';
|
||||
} ?> name="tq" value="true">
|
||||
<span></span>
|
||||
</label>
|
||||
<small class="help-block">和风天气插件,若不能使用请申请自己的密钥填入,<a href="https://doc.lylme.com/spage/#/%E5%A4%A9%E6%B0%94" target="_blank">查看教程</a><br><code>注:baisu模板关闭后同时关闭时间显示</code> </small>
|
||||
<label for="web_site_snapshot">详情页快照生成API</label>
|
||||
<input class="form-control" type="text" id="web_site_snapshot" name="snapshot" value="<?php echo $conf['snapshot'] ?>" placeholder="请输入API接口地址">
|
||||
<small class="help-block">用于详情页生成网站缩略图,不填不启用,若不了解请留空 <a href="https://doc.lylme.com/spage/#/snapshot" target="_blank">查看教程</a></small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="web_site_licensecode">六零导航页授权密钥</label>
|
||||
<input class="form-control" type="text" id="web_site_licensecode" name="licensecode" value="<?php echo $conf['c'] ?>" placeholder="请输入授权密钥">
|
||||
<small class="help-block">微信关注【上云六零】公众号免费获取授权,授权后点击<a href="./update.php">检查更新</a>会自动下发授权密钥。<a href="https://doc.lylme.com/spage/#/license" target="_blank">查看说明</a> <br>内网用户需手动填入,当前域名:<code><?php echo $_SERVER['HTTP_HOST'] ?></code><br>授权正常请勿修改密钥</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary m-r-5">保 存</button>
|
||||
|
@ -1,4 +1,13 @@
|
||||
<?php
|
||||
/*
|
||||
* @Description:
|
||||
* @Author: LyLme admin@lylme.com
|
||||
* @Date: 2024-01-23 12:25:35
|
||||
* @LastEditors: LyLme admin@lylme.com
|
||||
* @LastEditTime: 2024-04-14 05:35:10
|
||||
* @FilePath: /lylme_spage/admin/table_group.php
|
||||
* @Copyright (c) 2024 by LyLme, All Rights Reserved.
|
||||
*/
|
||||
include_once("../include/common.php");
|
||||
if (isset($islogin) == 1) {
|
||||
} else exit("<script language='javascript'>window.location.href='./login.php';</script>");
|
||||
@ -9,10 +18,16 @@ echo '<div class="alert alert-info">系统共有 <b>' . $groupsrows . '</b> 个
|
||||
<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");
|
||||
$rs = $DB->query("SELECT * FROM lylme_groups 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'];
|
||||
$pwd = null;
|
||||
if (isset($res['group_pwd']) && $res['group_pwd'] !== 0) {
|
||||
|
||||
$pwd_row = $DB->get_row("SELECT `pwd_id`, `pwd_key` FROM `lylme_pwd` WHERE `pwd_id` = " . intval($res['group_pwd']));
|
||||
if ($pwd_row !== null) {
|
||||
$pwd = $pwd_row['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>
|
||||
@ -20,12 +35,12 @@ echo '<div class="alert alert-info">系统共有 <b>' . $groupsrows . '</b> 个
|
||||
if ($pwd || $res['group_pwd']) {
|
||||
if (empty($pwd)) {
|
||||
echo '<font color="red">失效[请重新设置加密组]</font>';
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
echo '<font color="f96197">' . $pwd . '</font>';
|
||||
}
|
||||
} else {
|
||||
echo '<font color="green">未加密</font>';
|
||||
}
|
||||
else{echo '<font color="green">未加密</font>';}
|
||||
echo ' </td><td>';
|
||||
|
||||
if ($res['group_status']) {
|
||||
|
@ -1,25 +1,10 @@
|
||||
<?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)) {
|
||||
if (saveSetting('template', $set, "网站主题")) {
|
||||
exit('<script>alert("主题修改成功!");window.location.href="./theme.php";</script>');
|
||||
} else {
|
||||
exit('<script>alert("主题修改失败!");window.location.href="./theme.php";</script>');
|
||||
@ -31,8 +16,11 @@ if(!empty($set)) {
|
||||
<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-header">
|
||||
<h4>主题设置 <a href="https://spage.lylme.com/themes" target="_blank">更多主题 >></a></h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<a href="./theme_setting.php" class="btn btn-label btn btn-default"><label><i class="mdi mdi-contrast-circle"></i></label>主题自定义设置</a>
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
76
admin/theme_setting.php
Normal file
76
admin/theme_setting.php
Normal file
@ -0,0 +1,76 @@
|
||||
<?php
|
||||
/*
|
||||
* @Description: 主题自定义设置
|
||||
* @Author: LyLme admin@lylme.com
|
||||
* @Date: 2024-04-12 14:30:34
|
||||
* @LastEditors: LyLme admin@lylme.com
|
||||
* @LastEditTime: 2024-04-14 05:49:36
|
||||
* @FilePath: /lylme_spage/admin/theme_setting.php
|
||||
* @Copyright (c) 2024 by LyLme, All Rights Reserved.
|
||||
*/
|
||||
$title = '主题自定义设置';
|
||||
include './head.php';
|
||||
?>
|
||||
<link href="../assets/js/layui/css/layui.css" type="text/css" rel="stylesheet" />
|
||||
<script src="../assets/js/layui/layui.js" type="application/javascript"></script>
|
||||
<link rel="stylesheet" href="../assets/admin/css/theme_setting.css">
|
||||
<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><?php echo theme($conf['template'], 'theme_name') . '主题 - 自定义设置'; ?></h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="layui-form layuimini-form">
|
||||
<?php
|
||||
$theme_configs = ROOT . 'template/' . $conf['template'] . '/config.php';
|
||||
if (file_exists($theme_configs) && ($result = @require $theme_configs) !== false && is_array($theme_config)) {
|
||||
|
||||
try {
|
||||
$theme_name = "theme_config_" . $conf['template'];
|
||||
if(isset($conf[$theme_name])){
|
||||
$form_data = json_decode($conf[$theme_name], true);
|
||||
|
||||
}
|
||||
$form_data = !empty($form_data) ? $form_data : [];
|
||||
echo Form::getInstance()
|
||||
->form_action('ajax_theme.php?set=save')
|
||||
|
||||
->form_method(Form::form_method_post)
|
||||
->form_schema($theme_config)
|
||||
->input_hidden("theme_path", $conf['template'])
|
||||
// ->switch('是否启用', '启用主题配置', 'status', true)
|
||||
->input_submit('保存', 'class="layui-btn" lay-submit lay-filter="saveBtn"')
|
||||
// ->input_submit('确认保存', 'class="btn btn-primary m-r-5"')
|
||||
->form_data($form_data)
|
||||
->create();
|
||||
} catch (Exception $e) {
|
||||
echo "主题配置载入失败";
|
||||
//$e->getMessage();
|
||||
}
|
||||
} else {
|
||||
echo "<h3>当前主题未适配主题自定义设置</h3>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/admin/js/theme_setting.js"></script>
|
||||
<!--选色器-->
|
||||
<link rel="stylesheet" type="text/css" href="/assets/admin/css/coloris.min.css" />
|
||||
<script type="text/javascript" src="/assets/admin/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>
|
||||
</main>
|
||||
<?php
|
||||
include './footer.php';
|
||||
?>
|
@ -1,8 +1,10 @@
|
||||
<?php
|
||||
|
||||
$title = '检查更新';
|
||||
include './head.php';
|
||||
@unlink('log.txt');
|
||||
$update = update();
|
||||
|
||||
?>
|
||||
<!--页面主要内容-->
|
||||
<main class="lyear-layout-content">
|
||||
@ -26,7 +28,8 @@ if(getver($update['version']) > getver($conf['version']) && !empty($update['vers
|
||||
<li class="list-group-item"><b>手动更新:</b>请前往<a href="https://gitee.com/LyLme/lylme_spage/releases" target="_blank" class="alert-link">码云</a>下载最新版本<code>lylme_spage_update.zip</code>后缀的更新包上传到网站根目录解压即可,程序会自动更新数据库</a></li>';
|
||||
}
|
||||
?>
|
||||
</ul></div>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
@ -34,11 +37,11 @@ if(getver($update['version']) > getver($conf['version']) && !empty($update['vers
|
||||
<?php
|
||||
include './footer.php';
|
||||
?>
|
||||
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/layer/3.1.1/layer.min.js" type="application/javascript"></script>
|
||||
<script type="text/javascript" src="js/lightyear.js"></script>
|
||||
<script src="js/bootstrap-notify.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://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery-confirm/3.3.0/jquery-confirm.min.js" type="application/javascript"></script>
|
||||
<script src="/assets/admin/js/layer.min.js" type="application/javascript"></script>
|
||||
<script type="text/javascript" src="/assets/admin/js/lightyear.js"></script>
|
||||
<script src="/assets/admin/js/bootstrap-notify.min.js"></script>
|
||||
<link href="/assets/admin/js/jquery-confirm.min.css" type="text/css" rel="stylesheet" />
|
||||
<script src="/assets/admin/js/jquery-confirm.min.js" type="application/javascript"></script>
|
||||
<script>
|
||||
function update() {
|
||||
$.confirm({
|
||||
@ -54,16 +57,19 @@ include './footer.php';
|
||||
$.ajax({
|
||||
url: "ajax_link.php?submit=update",
|
||||
method: "POST",
|
||||
data:{file:"<?php echo $update['file'] ?>"},
|
||||
data: {
|
||||
file: "<?php echo $update['file'] ?>"
|
||||
},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if(data == 'success'){
|
||||
if (data.code == 200) {
|
||||
lightyear.loading('hide');
|
||||
lightyear.notify('更新成功!', 'success', 1000);
|
||||
lightyear.notify(data.msg, 'success', 1000);
|
||||
window.location.replace("./");
|
||||
return true;
|
||||
} else {
|
||||
lightyear.loading('hide');
|
||||
lightyear.notify(data, 'warning', 2000);
|
||||
lightyear.notify(data.msg, 'danger', 2000);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user