|
|
发表于 2025-12-25 23:42:51
|
显示全部楼层
http://64185.chez.com
欢迎测试,
今天小谷帮我写的导航提交系统。
源码分享给大家
前台有搜索框。
后台有功能如下:
排序功能,
编辑功能。
密码修改功能。
保存为index.php上传到自己的空间即可!
原始密码Tmd123
请往下拉,复制第二个代码
重要提示:必须在index.php的同目录下建立一个名为:sessions的文件夹,属性设置为777
- <?php
- /**
- * 炫彩导航 - 终极管理版 (全兼容修复版)
- * 功能:搜索、排序、编辑、审核、后台改密
- */
- header("Content-Type: text/html; charset=utf-8");
- session_start();
- $dataFile = "nav_db.json";
- $title = "炫彩收录导航";
- // --- 数据读取与初始化 ---
- if (!file_exists($dataFile)) {
- $data = array(
- "config" => array("password" => "Tmd123"),
- "active" => array(array("name"=>"百度","url"=>"https://www.baidu.com")),
- "pending" => array()
- );
- file_put_contents($dataFile, json_encode($data));
- } else {
- $data = json_decode(file_get_contents($dataFile), true);
- if (!isset($data['config'])) {
- $data['config'] = array("password" => "Tmd123");
- }
- }
- $admin_pass = $data['config']['password'];
- // --- 登录/退出逻辑 ---
- if (isset($_POST['login_pass'])) {
- if (trim($_POST['login_pass']) === $admin_pass) {
- $_SESSION['admin'] = "logined";
- setcookie("admin_auth", md5($admin_pass), time()+3600*24);
- header("Location: index.php"); exit;
- } else { echo "<script>alert('密码错误!');</script>"; }
- }
- if (isset($_GET['logout'])) {
- session_destroy(); setcookie("admin_auth", "", time()-3600);
- header("Location: index.php"); exit;
- }
- $isAdmin = (isset($_SESSION['admin']) && $_SESSION['admin'] === "logined") || (isset($_COOKIE['admin_auth']) && $_COOKIE['admin_auth'] === md5($admin_pass));
- // --- 核心业务逻辑 ---
- if ($isAdmin && isset($_POST['change_pw'])) {
- $new_pw = trim($_POST['new_password']);
- if (!empty($new_pw)) {
- $data['config']['password'] = $new_pw;
- file_put_contents($dataFile, json_encode($data));
- echo "<script>alert('密码修改成功!请重新登录');location.href='?logout=1';</script>";
- exit;
- }
- }
- if (isset($_POST['save_node'])) {
- $name = htmlspecialchars(trim($_POST['app_name']));
- $url = htmlspecialchars(trim($_POST['app_url']));
- $edit_id = $_POST['edit_id'];
- if ($edit_id !== "") {
- if($isAdmin) $data['active'][(int)$edit_id] = array("name"=>$name, "url"=>$url, "time"=>date("Y-m-d"));
- } else {
- $data['pending'][] = array("name"=>$name, "url"=>$url, "time"=>date("Y-m-d"));
- echo "<script>alert('申请已提交');</script>";
- }
- file_put_contents($dataFile, json_encode($data));
- header("Location: index.php"); exit;
- }
- if ($isAdmin && isset($_GET['action']) && isset($_GET['id'])) {
- $id = (int)$_GET['id'];
- switch ($_GET['action']) {
- case 'approve': $data['active'][] = $data['pending'][$id]; unset($data['pending'][$id]); break;
- case 'reject': unset($data['pending'][$id]); break;
- case 'del': unset($data['active'][$id]); break;
- case 'up': if($id>0){ $tmp=$data['active'][$id]; $data['active'][$id]=$data['active'][$id-1]; $data['active'][$id-1]=$tmp; } break;
- case 'down': if($id<count($data['active'])-1){ $tmp=$data['active'][$id]; $data['active'][$id]=$data['active'][$id+1]; $data['active'][$id+1]=$tmp; } break;
- }
- // 修复点:改用兼容低版本 PHP 的数组重排方式
- if(isset($data['pending'])) { $data['pending'] = array_values($data['pending']); } else { $data['pending'] = array(); }
- if(isset($data['active'])) { $data['active'] = array_values($data['active']); } else { $data['active'] = array(); }
-
- file_put_contents($dataFile, json_encode($data));
- header("Location: index.php"); exit;
- }
- $edit_node = array("name"=>"", "url"=>"", "id"=>"");
- if($isAdmin && isset($_GET['edit'])){
- $eid = (int)$_GET['edit'];
- if(isset($data['active'][$eid])){ $edit_node = $data['active'][$eid]; $edit_node['id'] = $eid; }
- }
- ?>
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title><?php echo $title; ?></title>
- <style>
- @keyframes gradient { 0% {background-position: 0% 50%;} 50% {background-position: 100% 50%;} 100% {background-position: 0% 50%;} }
- body { margin: 0; min-height: 100vh; background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab); background-size: 400% 400%; animation: gradient 15s ease infinite; font-family: sans-serif; color: #fff; }
- .container { max-width: 900px; margin: 0 auto; padding: 20px; }
- .glass { background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 15px; padding: 20px; margin-bottom: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
- .search-area { text-align: center; margin-bottom: 30px; }
- #search-input { width: 60%; max-width: 400px; background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4); padding: 12px 20px; border-radius: 30px; color: #fff; font-size: 16px; outline: none; transition: 0.3s; }
- #search-input:focus { width: 80%; background: #fff; color: #333; }
- .engine-btns { margin-top: 12px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
- .engine-btns button { background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 6px 15px; border-radius: 20px; cursor: pointer; font-size: 13px; }
- .nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; }
- .card-wrap { position: relative; }
- .nav-card { background: rgba(255, 255, 255, 0.2); padding: 20px; border-radius: 12px; text-decoration: none; color: #fff; text-align: center; font-weight: bold; display: block; border: 1px solid rgba(255,255,255,0.1); transition: 0.3s; overflow: hidden; text-overflow: ellipsis; }
- .nav-card:hover { background: #fff; color: #e73c7e; transform: translateY(-3px); }
- .sort-tools { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); display: none; background: rgba(0,0,0,0.7); border-radius: 10px; padding: 2px 8px; gap: 8px; z-index: 5; }
- .card-wrap:hover .sort-tools { display: flex; }
- .sort-tools a { color: #fff; text-decoration: none; font-size: 11px; }
- .del-tag { position: absolute; top: -8px; right: -5px; background: #ff4d4d; color: white; border-radius: 50%; width: 18px; height: 18px; text-decoration: none; font-size: 12px; line-height: 18px; text-align:center; }
- .edit-tag { position: absolute; top: -8px; left: -5px; background: #23a6d5; color: white; border-radius: 50%; width: 18px; height: 18px; text-decoration: none; font-size: 11px; line-height: 18px; text-align:center; }
- input { background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.3); padding: 10px; border-radius: 8px; color: #fff; outline: none; margin: 5px 0;}
- .btn-main { background: #fff; color: #e73c7e; border: none; padding: 10px 20px; border-radius: 8px; font-weight: bold; cursor: pointer; }
- footer { text-align: center; padding: 40px; background: rgba(0,0,0,0.2); margin-top: 40px; }
- </style>
- </head>
- <body>
- <div class="container">
- <h1 style="text-align:center; text-shadow: 0 4px 10px rgba(0,0,0,0.2);">✨ <?php echo $title; ?></h1>
- <div class="search-area">
- <input type="text" id="search-input" placeholder="输入关键词搜索..." onkeyup="filterLinks()">
- <div class="engine-btns">
- <button onclick="webSearch('https://www.baidu.com/s?wd=')">百度</button>
- <button onclick="webSearch('https://www.google.com/search?q=')">Google</button>
- <button onclick="webSearch('https://yandex.com/search/?text=')">Yandex</button>
- </div>
- </div>
- <?php if($isAdmin): ?>
- <div class="glass" style="border-left: 5px solid #00ff00;">
- <div style="display:flex; justify-content:space-between; align-items:flex-start;">
- <div>
- <h3 style="margin:0">🛠️ 管理中心 | <a href="?logout=1" style="color:yellow; text-decoration:none;">退出登录</a></h3>
- <div style="margin-top:10px;">
- <form method="POST" style="display:flex; gap:5px;">
- <input type="text" name="new_password" placeholder="设置新管理密码" style="padding:5px; font-size:12px;">
- <button type="submit" name="change_pw" class="btn-main" style="padding:5px 10px; font-size:12px;">修改密码</button>
- </form>
- </div>
- </div>
- <div style="text-align:right;">
- <?php if(!empty($data['pending'])): ?>
- <p style="margin:0; font-size:14px;">待审核 (<?php echo count($data['pending']); ?>)</p>
- <?php foreach($data['pending'] as $id => $item): ?>
- <div style="font-size:12px; margin-top:5px;">
- <?php echo $item['name']; ?>
- <a href="?action=approve&id=<?php echo $id; ?>" style="color:#0f0;">[准]</a>
- <a href="?action=reject&id=<?php echo $id; ?>" style="color:#f44;">[拒]</a>
- </div>
- <?php endforeach; ?>
- <?php endif; ?>
- </div>
- </div>
- </div>
- <?php endif; ?>
- <div class="nav-grid" id="link-container">
- <?php if(!empty($data['active'])): ?>
- <?php foreach($data['active'] as $id => $nav): ?>
- <div class="card-wrap" data-name="<?php echo strtolower(htmlspecialchars($nav['name'])); ?>">
- <a href="<?php echo $nav['url']; ?>" target="_blank" class="nav-card"><?php echo htmlspecialchars($nav['name']); ?></a>
- <?php if($isAdmin): ?>
- <a href="?edit=<?php echo $id; ?>#form" class="edit-tag">✎</a>
- <a href="?action=del&id=<?php echo $id; ?>" class="del-tag" onclick="return confirm('确定删除?')">×</a>
- <div class="sort-tools">
- <a href="?action=up&id=<?php echo $id; ?>">◀ 前移</a> <a href="?action=down&id=<?php echo $id; ?>">后移 ▶</a>
- </div>
- <?php endif; ?>
- </div>
- <?php endforeach; ?>
- <?php endif; ?>
- </div>
- <div id="form" class="glass" style="margin-top:40px; text-align:center;">
- <h3><?php echo ($edit_node['id']!=="") ? "📝 修改内容" : "📩 申请收录"; ?></h3>
- <form method="POST">
- <input type="hidden" name="edit_id" value="<?php echo $edit_node['id']; ?>">
- <input type="text" name="app_name" placeholder="网站名称" required style="width:120px;" value="<?php echo $edit_node['name']; ?>">
- <input type="url" name="app_url" placeholder="网址 https://..." required style="width:250px;" value="<?php echo $edit_node['url']; ?>">
- <button type="submit" name="save_node" class="btn-main"><?php echo ($edit_node['id']!=="") ? "保存修改" : "提交申请"; ?></button>
- <?php if($edit_node['id']!==""): ?><br><a href="index.php" style="color:#fff; font-size:12px;">取消编辑</a><?php endif; ?>
- </form>
- </div>
- </div>
- <script>
- function filterLinks() {
- let input = document.getElementById('search-input').value.toLowerCase();
- let cards = document.getElementsByClassName('card-wrap');
- for (let i = 0; i < cards.length; i++) {
- let name = cards[i].getAttribute('data-name');
- cards[i].style.display = name.includes(input) ? "block" : "none";
- }
- }
- function webSearch(baseUrl) {
- let query = document.getElementById('search-input').value;
- if (query) { window.open(baseUrl + encodeURIComponent(query), '_blank'); }
- else { alert('请输入搜索关键词'); }
- }
- </script>
- <footer>
- <?php if(!$isAdmin): ?>
- <form method="POST"><input type="password" name="login_pass" placeholder="管理密码" style="width:80px; font-size:12px;"><button type="submit" class="btn-main" style="padding:5px 10px; font-size:12px;">登录</button></form>
- <?php endif; ?>
- <p style="font-size:10px; opacity:0.5; margin-top:15px;">© 2025 <?php echo $title; ?> | 全兼容版</p>
- </footer>
- </body>
- </html>
复制代码
最新修改版:
- <?php
- /**
- * 炫彩导航 - 绚丽全能版 (兼容老版本PHP)
- * 炫彩导航 - 终极管理版 (全兼容修复版)
- * 功能:搜索、提交提示确认、排序、编辑、审核通过,审核不通过、后台改密
- * 初始密码:Tmd123
- */
- if(function_exists('date_default_timezone_set')){
- date_default_timezone_set('PRC');
- }
- ob_start();
- header("Content-Type: text/html; charset=utf-8");
- @session_start();
- define('DATA_FILE', 'nav_db.json');
- define('SITE_TITLE', '炫彩收录导航');
- define('DEFAULT_PASS', 'Tmd123');
- // --- 兼容性工具函数 ---
- function safe_input($str) {
- if(empty($str)) return '';
- if(get_magic_quotes_gpc()) $str = stripslashes($str);
- return htmlspecialchars(trim($str), ENT_QUOTES, 'UTF-8');
- }
- // 解决低版本 PHP preg_replace_callback 报错
- function json_encode_52($data) {
- if(function_exists('json_encode')){
- $json = json_encode($data);
- return preg_replace("#\\\u([0-9a-f]{4})#ie", "iconv('UCS-2BE', 'UTF-8', pack('H4', '\\1'))", $json);
- }
- return '';
- }
- function safe_save($file, $data) {
- $fp = fopen($file, 'w');
- if(!$fp) return false;
- flock($fp, LOCK_EX);
- $result = fwrite($fp, json_encode_52($data));
- flock($fp, LOCK_UN);
- fclose($fp);
- return $result !== false;
- }
- // --- 数据读取与初始化 ---
- if (!file_exists(DATA_FILE)) {
- $data = array(
- "config" => array("password" => md5(DEFAULT_PASS)),
- "active" => array(array("name"=>"百度","url"=>"https://www.baidu.com", "time"=>date("Y-m-d"))),
- "pending" => array()
- );
- safe_save(DATA_FILE, $data);
- } else {
- $data = json_decode(@file_get_contents(DATA_FILE), true);
- }
- $admin_hash = isset($data['config']['password']) ? $data['config']['password'] : md5(DEFAULT_PASS);
- // --- 权限管理 ---
- $isAdmin = false;
- if ((isset($_SESSION['admin']) && $_SESSION['admin'] === "logined") || (isset($_COOKIE['admin_auth']) && $_COOKIE['admin_auth'] === $admin_hash)) {
- $_SESSION['admin'] = "logined";
- $isAdmin = true;
- }
- // 登录与退出逻辑
- if (isset($_POST['login_pass'])) {
- if (md5(trim($_POST['login_pass'])) === $admin_hash) {
- $_SESSION['admin'] = "logined";
- setcookie("admin_auth", $admin_hash, time()+86400, '/');
- header("Location: index.php"); exit;
- } else { echo "<script>alert('管理口令错误!');</script>"; }
- }
- if (isset($_GET['logout'])) {
- session_destroy(); setcookie("admin_auth", "", time()-3600, '/');
- header("Location: index.php"); exit;
- }
- // --- 管理员操作:改密、审核、删除 ---
- if ($isAdmin && isset($_POST['update_pass'])) {
- $new_pw = trim($_POST['new_password']);
- if (strlen($new_pw) >= 5) {
- $data['config']['password'] = md5($new_pw);
- safe_save(DATA_FILE, $data);
- echo "<script>alert('密码已更新,请重新登录!'); window.location.href='?logout=1';</script>"; exit;
- }
- }
- if (isset($_POST['save_node'])) {
- $name = safe_input($_POST['app_name']);
- $url = safe_input($_POST['app_url']);
- $edit_id = $_POST['edit_id'];
- if ($isAdmin && $edit_id !== "") {
- $idx = intval($edit_id);
- if(isset($data['active'][$idx])) { $data['active'][$idx] = array("name"=>$name, "url"=>$url, "time"=>date("Y-m-d")); }
- safe_save(DATA_FILE, $data);
- header("Location: index.php"); exit;
- } else {
- $data['pending'][] = array("name"=>$name, "url"=>$url, "time"=>date("Y-m-d"));
- safe_save(DATA_FILE, $data);
- echo "<script>alert('提交成功,请等待管理员审核!'); window.location.href='index.php';</script>"; exit;
- }
- }
- if ($isAdmin && isset($_GET['action']) && isset($_GET['id'])) {
- $id = intval($_GET['id']);
- if($_GET['action'] == 'approve' && isset($data['pending'][$id])){
- $data['active'][] = $data['pending'][$id];
- unset($data['pending'][$id]);
- } elseif($_GET['action'] == 'reject' && isset($data['pending'][$id])){
- unset($data['pending'][$id]);
- } elseif($_GET['action'] == 'del' && isset($data['active'][$id])){
- unset($data['active'][$id]);
- }
- $data['active'] = array_values((array)$data['active']);
- $data['pending'] = array_values((array)$data['pending']);
- safe_save(DATA_FILE, $data);
- header("Location: index.php"); exit;
- }
- $edit_node = array("name"=>"", "url"=>"", "id"=>"");
- if($isAdmin && isset($_GET['edit'])){
- $eid = intval($_GET['edit']);
- if(isset($data['active'][$eid])){ $edit_node = $data['active'][$eid]; $edit_node['id'] = $eid; }
- }
- ?>
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title><?php echo SITE_TITLE; ?></title>
- <style>
- /* 绚丽多色流光动画 */
- @keyframes grad { 0% {background-position: 0% 50%;} 50% {background-position: 100% 50%;} 100% {background-position: 0% 50%;} }
- body { margin: 0; min-height: 100vh; background: linear-gradient(-45deg, #1a1a2e, #e94560, #1b998b, #f1a208, #0f3460); background-size: 500% 500%; animation: grad 18s ease infinite; font-family: sans-serif; color: #fff; }
- .container { max-width: 900px; margin: 0 auto; padding: 20px; }
- .glass { background: rgba(255, 255, 255, 0.12); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 18px; padding: 25px; margin-bottom: 25px; box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
-
- /* 搜索框设计 */
- .search-area { text-align: center; margin-bottom: 40px; }
- #search-input { width: 75%; max-width: 500px; background: rgba(255,255,255,0.25); border: 2px solid rgba(255,255,255,0.3); padding: 14px 25px; border-radius: 40px; color: #fff; outline: none; transition: 0.3s; font-size: 16px; }
- #search-input:focus { background: #fff; color: #222; }
- .engine-btns { margin-top: 15px; }
- .engine-btns button { background: rgba(255,255,255,0.15); border: 1px solid #fff; color: #fff; padding: 6px 18px; border-radius: 20px; cursor: pointer; font-size: 12px; margin: 4px; transition: 0.3s; }
- .engine-btns button:hover { background: #fff; color: #e94560; }
- /* 卡片网格 */
- .nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px; }
- .card-wrap { position: relative; }
- .nav-card { background: rgba(255, 255, 255, 0.15); padding: 25px 15px; border-radius: 15px; text-decoration: none; color: #fff; text-align: center; font-weight: bold; display: block; border: 1px solid rgba(255,255,255,0.1); transition: 0.3s; }
- .nav-card:hover { background: #fff; color: #1a1a2e; transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.4); }
-
- /* 管理员小图标 */
- .admin-tag { position: absolute; background: #00d2ff; color: #fff; border-radius: 50%; width: 24px; height: 24px; line-height: 24px; font-size: 13px; text-align: center; text-decoration: none; z-index: 10; border: 1px solid #fff; }
- .edit-tag { top: -10px; left: -8px; }
- .del-tag { top: -10px; right: -8px; background: #ff4757; }
- input { background: rgba(255,255,255,0.2); border: 1px solid #fff; padding: 10px; border-radius: 10px; color: #fff; margin: 5px; outline: none; }
- .btn-main { background: #fff; color: #e94560; border: none; padding: 10px 25px; border-radius: 10px; font-weight: bold; cursor: pointer; transition: 0.3s; }
- .btn-main:hover { background: #f1a208; color: #fff; transform: scale(1.05); }
-
- /* 管理登录区 */
- .admin-footer { background: rgba(0,0,0,0.4); margin-top: 60px; padding: 40px 20px; border-radius: 25px 25px 0 0; border-top: 1px solid rgba(255,255,255,0.1); }
- </style>
- </head>
- <body>
- <div class="container">
- <h1 style="text-align:center; font-size: 30px; text-shadow: 2px 4px 10px rgba(0,0,0,0.3);">🌈 <?php echo SITE_TITLE; ?></h1>
-
- <div class="search-area">
- <input type="text" id="search-input" placeholder="输入搜索词...">
- <div class="engine-btns">
- <button onclick="webSearch('https://www.baidu.com/s?wd=')">百度</button>
- <button onclick="webSearch('https://www.google.com/search?q=')">谷歌</button>
- <button onclick="webSearch('https://cn.bing.com/search?q=')">必应</button>
- <button onclick="webSearch('https://yandex.com/search/?text=')">Yandex</button>
- </div>
- </div>
- <?php if($isAdmin): ?>
- <div class="glass" style="border-left: 5px solid #f1a208;">
- <strong style="color:#f1a208;">🛡️ 管理员后台已登录</strong> | <a href="?logout=1" style="color:#fff; text-decoration:none;">[安全退出]</a>
- <form method="POST" style="margin-top:10px;">
- 改密:<input type="password" name="new_password" placeholder="输入新密码" required style="width:130px;">
- <button type="submit" name="update_pass" class="btn-main" style="padding:6px 15px; font-size:12px;">保存</button>
- </form>
- <?php if(!empty($data['pending'])): ?>
- <div style="margin-top:15px; border-top:1px dashed rgba(255,255,255,0.3); padding-top:10px;">
- 审核请求:
- <?php foreach($data['pending'] as $id => $item): ?>
- <div style="font-size:13px; margin:10px 0; background:rgba(0,0,0,0.2); padding:10px; border-radius:8px;">
- <strong><?php echo $item['name']; ?></strong> (<?php echo $item['url']; ?>)
- <a href="?action=approve&id=<?php echo $id; ?>" style="color:#00ffcc; margin-left:15px;">[准予收录]</a>
- <a href="?action=reject&id=<?php echo $id; ?>" style="color:#ff6b81; margin-left:10px;" onclick="return confirm('确定拒绝?')">[不通过]</a>
- </div>
- <?php endforeach; ?>
- </div>
- <?php endif; ?>
- </div>
- <?php endif; ?>
- <div class="nav-grid">
- <?php foreach($data['active'] as $id => $nav): ?>
- <div class="card-wrap">
- <a href="<?php echo $nav['url']; ?>" target="_blank" class="nav-card"><?php echo $nav['name']; ?></a>
- <?php if($isAdmin): ?>
- <a href="?edit=<?php echo $id; ?>#form" class="admin-tag edit-tag" title="编辑">✎</a>
- <a href="?action=del&id=<?php echo $id; ?>" class="admin-tag del-tag" onclick="return confirm('确定删除?')" title="删除">×</a>
- <?php endif; ?>
- </div>
- <?php endforeach; ?>
- </div>
- <div id="form" class="glass" style="margin-top:50px; text-align:center;">
- <h3 style="margin-top:0;"><?php echo ($edit_node['id']!=="") ? "📝 修改站点信息" : "📩 申请加入导航"; ?></h3>
- <form method="POST">
- <input type="hidden" name="edit_id" value="<?php echo $edit_node['id']; ?>">
- <input type="text" name="app_name" placeholder="网站名称" required value="<?php echo $edit_node['name']; ?>">
- <input type="url" name="app_url" placeholder="网址 http://..." required value="<?php echo $edit_node['url']; ?>">
- <br><br><button type="submit" name="save_node" class="btn-main">立即提交申请</button>
- </form>
- </div>
- </div>
- <script>
- function webSearch(baseUrl) {
- var query = document.getElementById('search-input').value;
- if (query) { window.open(baseUrl + encodeURIComponent(query), '_blank'); }
- else { alert('请输入关键词'); }
- }
- </script>
- <footer class="admin-footer" style="text-align:center;">
- <?php if(!$isAdmin): ?>
- <form method="POST">
- <span style="font-size:14px; opacity:0.8;">🔒 管理入口:</span>
- <input type="password" name="login_pass" placeholder="管理口令" style="width:140px;">
- <button type="submit" class="btn-main" style="padding:8px 20px; font-size:13px;">登录系统</button>
- </form>
- <?php endif; ?>
- <p style="opacity:0.5; font-size:12px; margin-top:20px;">© 2025 <?php echo SITE_TITLE; ?> - 保持探索的乐趣</p>
- </footer>
- </body>
- </html>
- <?php ob_end_flush(); ?>
复制代码 |
|