This commit is contained in:
Flatlogic Bot 2026-02-04 12:54:55 +00:00
parent 4b40c1c287
commit 4d65748cc0
33 changed files with 1113 additions and 16 deletions

View File

@ -1,18 +1,10 @@
DirectoryIndex index.php index.html
Options -Indexes
Options -MultiViews
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
# 0) Serve existing files/directories as-is
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# 1) Internal map: /page or /page/ -> /page.php (if such PHP file exists)
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+?)/?$ $1.php [L]
# 2) Optional: strip trailing slash for non-directories (keeps .php links working)
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [R=301,L]
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

4
admin_credentials.txt Normal file
View File

@ -0,0 +1,4 @@
WordPress Admin Credentials:
URL: http://localhost/wp-admin
Username: admin
Password: 68qFk1wjjjeJ4ILZ

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

643
database.sql Normal file

File diff suppressed because one or more lines are too long

BIN
website.tar.gz Normal file

Binary file not shown.

View File

@ -0,0 +1,395 @@
<?php
/*
Plugin Name: 财神组定制功能
Description: 水印、TG图标、版权声明、字体、LOGO及高级样式定制
*/
add_action('wp_head', function() {
?>
<style>
/* 强制中文字体 */
body, h1, h2, h3, h4, h5, h6, p, a, span, div, li {
font-family: "Microsoft YaHei", "PingFang SC", "Heiti SC", "Source Han Sans CN", sans-serif !important;
}
/* 全屏多端颜色水印 */
.watermark-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 9998;
pointer-events: none;
overflow: hidden;
}
.watermark-text {
position: absolute;
width: 200%;
height: 200%;
top: -50%;
left: -50%;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="200"><text x="20" y="100" font-family="Arial" font-size="20" font-weight="bold" fill="rgba(212,175,55,0.15)" transform="rotate(-25)">财神组专用</text></svg>');
background-repeat: repeat;
animation: color-shift 15s infinite linear;
}
@keyframes color-shift {
0% { filter: hue-rotate(0deg); opacity: 0.4; }
50% { filter: hue-rotate(180deg); opacity: 0.7; }
100% { filter: hue-rotate(360deg); opacity: 0.4; }
}
/* 隐藏WordPress痕迹 */
.wp-block-post-template__footer, .wp-block-footer, .powered-by-wordpress, .site-info, footer.wp-block-template-part, .wp-block-header {
display: none !important;
}
/* 底部版权 */
.custom-footer {
text-align: center;
padding: 40px;
background: #fdfdfd;
border-top: 1px solid #eee;
color: #888;
font-size: 14px;
position: relative;
z-index: 10;
}
/* 整体布局调整 */
body {
background-color: #f4f4f4;
margin: 0;
padding: 0;
overflow-x: hidden;
color: #333;
}
.site-container {
display: flex;
min-height: 100vh;
}
/* 侧边栏布局 */
.custom-sidebar {
width: 320px;
background: #0a0a0a;
color: #fff;
height: 100vh;
position: fixed;
left: 0;
top: 0;
overflow-y: auto;
z-index: 1000;
box-shadow: 4px 0 20px rgba(0,0,0,0.5);
display: flex;
flex-direction: column;
border-right: 1px solid #222;
}
.sidebar-header {
padding: 40px 20px;
text-align: center;
background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
border-bottom: 1px solid #d4af37;
}
.sidebar-logo {
width: 120px;
height: 120px;
margin: 0 auto 15px;
border-radius: 50%;
border: 3px solid #d4af37;
padding: 5px;
background: #fff;
object-fit: cover;
box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}
.custom-sidebar h1 {
font-size: 22px;
color: #d4af37;
margin: 0;
letter-spacing: 1px;
font-weight: 900;
text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.custom-sidebar ul {
list-style: none;
padding: 20px 0;
margin: 0;
flex: 1;
}
.custom-sidebar a {
color: #ccc;
text-decoration: none;
display: block;
padding: 18px 25px;
transition: all 0.3s;
font-size: 15px;
border-left: 4px solid transparent;
position: relative;
font-weight: 500;
}
.custom-sidebar li.active a, .custom-sidebar a:hover {
background: rgba(212, 175, 55, 0.15);
color: #fff;
border-left-color: #d4af37;
}
/* 内容区布局 */
.custom-content-wrapper {
flex: 1;
margin-left: 320px;
background: #fff;
min-height: 100vh;
display: flex;
flex-direction: column;
position: relative;
}
.custom-content {
padding: 60px 80px;
flex: 1;
max-width: 900px;
margin: 0 auto;
width: 100%;
}
.entry-title {
font-size: 32px;
color: #111;
margin-bottom: 40px;
padding-bottom: 25px;
border-bottom: 1px solid #eee;
position: relative;
}
.entry-title::after {
content: '';
position: absolute;
bottom: -1px;
left: 0;
width: 80px;
height: 3px;
background: #d4af37;
}
.entry-content {
line-height: 1.8;
color: #333;
font-size: 18px;
white-space: pre-wrap;
}
/* 重点标记 */
b, strong {
color: #d4af37;
background: rgba(212, 175, 55, 0.05);
padding: 0 4px;
border-radius: 3px;
}
.highlight-box {
border-left: 4px solid #d4af37;
background: #fdfaf0;
padding: 25px;
margin: 25px 0;
border-radius: 0 8px 8px 0;
box-shadow: 2px 2px 10px rgba(0,0,0,0.02);
}
/* TG 闪动图标 */
.tg-float {
position: fixed;
bottom: 40px;
right: 40px;
width: 60px;
height: 60px;
background: #229ED9;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0 4px 15px rgba(34, 158, 217, 0.4);
z-index: 10000;
animation: pulse 2s infinite;
text-decoration: none;
}
.tg-float svg {
width: 30px;
height: 30px;
fill: white;
}
@keyframes pulse {
0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34, 158, 217, 0.7); }
70% { transform: scale(1.1); box-shadow: 0 0 0 15px rgba(34, 158, 217, 0); }
100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34, 158, 217, 0); }
}
.back-to-top {
position: fixed;
bottom: 120px;
right: 45px;
background: #fff;
color: #333;
width: 50px;
height: 50px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
cursor: pointer;
z-index: 9999;
font-size: 20px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
transition: all 0.3s;
border: 1px solid #eee;
}
.back-to-top:hover {
background: #d4af37;
color: #fff;
border-color: #d4af37;
}
@media (max-width: 1024px) {
.custom-sidebar { width: 280px; }
.custom-content-wrapper { margin-left: 280px; }
.custom-content { padding: 40px 40px; }
}
@media (max-width: 782px) {
.site-container { flex-direction: column; }
.custom-sidebar { width: 100%; height: auto; position: static; }
.custom-content-wrapper { margin-left: 0; }
.custom-content { padding: 30px 20px; }
.sidebar-header { padding: 20px; }
.sidebar-logo { width: 60px; height: 60px; }
}
</style>
<?php
});
// 重写整个前端页面结构
add_action('template_redirect', function() {
if (is_admin() || is_login()) return;
// 拦截所有前端页面请求
if (is_feed() || is_trackback() || is_favicon()) return;
global $post;
// 处理首页跳转
if (is_front_page()) {
$front_page_id = get_option('page_on_front');
if ($front_page_id) {
$post = get_post($front_page_id);
}
}
if (!$post || is_404()) {
// 如果找不到页面,重定向到 ID 为 52 的页面第1天
wp_redirect(get_permalink(52));
exit;
}
setup_postdata($post);
$current_id = $post->ID;
$title = get_the_title($current_id);
$content = apply_filters('the_content', $post->post_content);
// 获取所有发布状态的页面,按菜单顺序排列
$pages = get_posts(array(
'post_type' => 'page',
'post_status' => 'publish',
'posts_per_page' => -1,
'orderby' => 'menu_order',
'order' => 'ASC'
));
// Logo URL
$logo_url = '/wp-content/uploads/custom/logo.jpg';
if (file_exists(ABSPATH . 'wp-content/uploads/custom/logo.jpg')) {
$logo_url .= '?v=' . filemtime(ABSPATH . 'wp-content/uploads/custom/logo.jpg');
}
// 图标映射
$icons = [
1 => '👣',
2 => '🗣️',
3 => '❤️',
4 => '🎯',
5 => '✨',
6 => '📜',
];
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="<?php echo $logo_url; ?>" type="image/jpeg">
<link rel="shortcut icon" href="<?php echo $logo_url; ?>" type="image/jpeg">
<?php wp_head(); ?>
<title><?php echo $title; ?> - 财神组聊天构造</title>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div class="watermark-overlay"><div class="watermark-text"></div></div>
<div class="site-container">
<div class="custom-sidebar">
<div class="sidebar-header">
<img src="<?php echo $logo_url; ?>" alt="Logo" class="sidebar-logo">
<h1>财神组聊天构造</h1>
</div>
<ul>
<?php foreach ($pages as $index => $p): ?>
<?php
$url = get_permalink($p->ID);
$icon = isset($icons[$index + 1]) ? $icons[$index + 1] : '💎';
?>
<li class="<?php echo ($p->ID == $current_id) ? 'active' : ''; ?>">
<a href="<?php echo esc_url($url); ?>">
<span style="margin-right: 10px;"><?php echo $icon; ?></span>
<?php echo esc_html($p->post_title); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<div class="custom-content-wrapper">
<main class="custom-content">
<div class="content-card">
<h1 class="entry-title"><?php echo esc_html($title); ?></h1>
<div class="entry-content">
<?php echo $content; ?>
</div>
</div>
</main>
<footer class="custom-footer">
财神组内部资料,翻版必究
</footer>
</div>
</div>
<a href="https://t.me/zhangshihao818" class="tg-float" target="_blank" title="联系我们">
<svg viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.64 6.8c-.15 1.58-.8 5.42-1.13 7.19-.14.75-.42 1-.68 1.03-.58.05-1.02-.38-1.58-.75-.88-.58-1.38-.94-2.23-1.5-.99-.65-.35-1.01.22-1.59.15-.15 2.71-2.48 2.76-2.69a.2.2 0 00-.05-.18c-.06-.05-.14-.03-.21-.02-.09.02-1.49.95-4.22 2.79-.4.27-.76.41-1.08.4-.36-.01-1.04-.2-1.55-.37-.63-.2-1.12-.31-1.08-.66.02-.18.27-.36.74-.55 2.92-1.27 4.86-2.11 5.83-2.51 2.78-1.16 3.35-1.36 3.73-1.36.08 0 .27.02.39.12.1.08.13.19.14.27-.01.06.01.24 0 .38z"/></svg>
</a>
<div class="back-to-top" onclick="window.scrollTo({top: 0, behavior: 'smooth'})" title="返回顶部"></div>
<?php wp_footer(); ?>
</body>
</html>
<?php
exit;
});

View File

@ -0,0 +1,63 @@
<?php
/**
* Plugin Name: Flatlogic URL Preserver
* Description: Automatically attaches fl_project to all links on the page.
*/
if ( ! defined( 'ABSPATH' ) ) exit;
// Function to fetch the ID once per request
function fl_get_env_project_id() {
static $cached_id = null;
if ($cached_id !== null) return $cached_id;
$cached_id = getenv('PROJECT_ID');
if (!$cached_id) {
$envPath = ABSPATH . '../.env';
if (file_exists($envPath)) {
$lines = file($envPath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
foreach ($lines as $line) {
if (strpos(trim($line), 'PROJECT_ID=') === 0) {
$cached_id = trim(str_replace('PROJECT_ID=', '', $line), "\"' ");
break;
}
}
}
}
return $cached_id;
}
// The core function to modify the URL
function fl_append_project_param( $url ) {
$pid = fl_get_env_project_id();
if ( ! $pid || empty( $url ) || strpos( $url, '#' ) === 0 ) {
return $url;
}
// Only append if it's an internal link
if ( strpos( $url, home_url() ) === 0 || ( strpos( $url, '/' ) === 0 && strpos( $url, '//' ) !== 0 ) ) {
return add_query_arg( 'fl_project', $pid, $url );
}
return $url;
}
// Apply to all link filters
$filters = [
'post_link', 'page_link', 'post_type_link',
'term_link', 'attachment_link',
'author_link', 'category_link', 'tag_link'
];
foreach ( $filters as $f ) {
add_filter( $f, 'fl_append_project_param' );
}
// Special case: Navigation Menus
add_filter( 'nav_menu_link_attributes', function( $atts ) {
if ( isset( $atts['href'] ) ) {
$atts['href'] = fl_append_project_param( $atts['href'] );
}
return $atts;
}, 10, 1 );

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB