zibll折扣函数 把以下代码新建任意名称的php,放进网站根目录,访问即可。
[hidecontent type="reply"]
<?php
/**
* Zibll VIP 折扣与配置键值探测脚本
* 专属定制,用完即删!
*/
// 1. 加载 WordPress 核心环境 (假设此文件放在网站根目录)
require_once('./wp-load.php');
// 2. 核心安全校验:必须是超级管理员才能查看,防止配置泄露
if (!is_user_logged_in() || !current_user_can('manage_options')) {
wp_die('⚠️ 拒绝访问:请先在同一浏览器中登录 WordPress 管理员账号!');
}
echo '<div style="font-family: -apple-system, sans-serif; max-width: 900px; margin: 40px auto; padding: 20px; background: #fff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1);">';
echo '<h2 style="border-bottom: 2px solid #007aff; padding-bottom: 10px;">Zibll VIP 折扣键值探测雷达 📡</h2>';
// 3. 获取子比核心配置项
$options = get_option('zibll_options');
if (!$options || !is_array($options)) {
echo '<p style="color: red;">❌ 未找到 zibll_options,请确认子比主题是否已激活。</p>';
} else {
echo '<h3>第一部分:疑似折扣相关的一维配置项</h3>';
echo '<table border="1" cellpadding="10" style="width: 100%; border-collapse: collapse; text-align: left; font-size: 14px;">';
echo '<tr style="background: #f5f5f7;"><th>配置键名 (Key)</th><th>当前配置值 (Value)</th></tr>';
// 关键词探测雷达:涵盖英文和拼音缩写
$keywords = ['discount', 'renew', 'up', 'sj', 'xf', 'zhe', 'rate', 'price', 'vip'];
foreach ($options as $key => $value) {
$matched = false;
foreach ($keywords as $kw) {
if (stripos($key, $kw) !== false) {
$matched = true;
break;
}
}
// 过滤掉长篇大论的代码和多维数组,只看简短的值(通常折扣率就是 0.8、80 这样的数字)
if ($matched && !is_array($value) && !is_object($value) && strlen((string)$value) < 50) {
// 高亮疑似折扣的字段
$style = '';
if (stripos($key, 'renew') !== false || stripos($key, 'xf') !== false || stripos($key, 'up') !== false || stripos($key, 'sj') !== false) {
$style = 'background-color: #e8f2ff; font-weight: 600; color: #007aff;';
}
echo "<tr style='{$style}'><td><code>{$key}</code></td><td>" . htmlspecialchars((string)$value) . "</td></tr>";
}
}
echo '</table>';
echo '<h3 style="margin-top: 40px;">第二部分:VIP 核心参数组 (vip_opt)</h3>';
echo '<p>这里面通常包含了具体的套餐和折扣结构,请仔细查看其中的层级:</p>';
echo '<pre style="background: #1d1d1f; color: #a1efe4; padding: 15px; border-radius: 8px; overflow-x: auto; font-size: 13px;">';
if (isset($options['vip_opt'])) {
print_r($options['vip_opt']);
} else {
echo '未找到 vip_opt 数组,可能是子比版本较老或设置未保存。';
}
echo '</pre>';
}
echo '<p style="margin-top: 30px; color: #ff3b30; font-weight: bold; text-align: center;">⚠️ 警告:为了您的网站安全,请在复制完需要的信息后,立刻从服务器删除此文件!</p>';
echo '</div>';
?>
[/hidecontent]

zibll vip函数(打折/续费/VIP信息等)


[hidecontent type="reply"]
<?php
/**
* Zibll VIP 开发者终极中控台 (数据透视 + 键值代码 + API 函数 + Hooks 钩子)
* 专属定制商业级开发工具,用完即删!
*/
// 1. 加载 WordPress 核心环境
require_once('./wp-load.php');
// 2. 核心安全校验:必须是超级管理员
if (!is_user_logged_in() || !current_user_can('manage_options')) {
wp_die('<div style="padding:20px;color:red;font-weight:bold;font-family:sans-serif;">⚠️ 拒绝访问:请先在同一浏览器中登录 WordPress 管理员账号!</div>');
}
// ==========================================
// 模块 A:提取 VIP 核心配置、当前值与调用代码
// ==========================================
$options = get_option('zibll_options');
if (!$options || !is_array($options)) {
wp_die('<h2 style="color:red;text-align:center;margin-top:50px;">❌ 未找到 zibll_options,请确认子比主题是否已激活。</h2>');
}
$vip_opt = isset($options['vip_opt']) && is_array($options['vip_opt']) ? $options['vip_opt'] : [];
// 1. 基础配置 (带有代码映射)
$basics = [];
for ($i = 1; $i <= 2; $i++) {
$basics["VIP{$i}"] = [
['label' => "VIP{$i} 名称", 'value' => $options['pay_user_vip_'.$i.'_name'] ?? "VIP {$i}", 'code' => "_pz('pay_user_vip_{$i}_name')"],
['label' => "VIP{$i} 开启状态", 'value' => !empty($options['pay_user_vip_'.$i.'_s']) ? '开启' : '关闭', 'code' => "_pz('pay_user_vip_{$i}_s')"],
['label' => "VIP{$i} 原生图标 (options)", 'value' => $options['pay_user_vip_'.$i.'_img'] ?? '未设置', 'code' => "_pz('pay_user_vip_{$i}_img')"],
['label' => "VIP{$i} 扩展图标 (vip_opt)", 'value' => $vip_opt['vip_'.$i.'img_icon'] ?? '未设置', 'code' => "_pz('vip_opt')['vip_{$i}img_icon']"]
];
}
// 2. 套餐与价格
$packages = [];
for ($i = 1; $i <= 2; $i++) {
$product_key = 'vip_' . $i . '_product';
if (!empty($vip_opt[$product_key]) && is_array($vip_opt[$product_key])) {
foreach ($vip_opt[$product_key] as $idx => $pkg) {
$time = $pkg['time'] ?? 0;
$unit = $pkg['unit'] ?? 'month';
$time_str = ($time == 0) ? '永久' : $time . ($unit == 'month' ? '个月' : ($unit == 'day' ? '天' : '年'));
$base_code = "_pz('vip_opt')['vip_{$i}_product'][{$idx}]";
$packages["VIP{$i}"][] = [
'时长' => $time_str,
'结算价' => $pkg['price'] ?? '0',
'划线价' => $pkg['show_price'] ?? '0',
'标签' => $pkg['tag'] ?? '无',
'code_time' => $base_code . "['time']",
'code_price' => $base_code . "['price']",
'code_show_price' => $base_code . "['show_price']",
'code_tag' => $base_code . "['tag']"
];
}
}
}
// 3. 续费与升级机制
$renew_upgrade = [
'续费规则' => [
['label' => '全局续费开关', 'value' => !empty($vip_opt['vip_renew']) ? '开启' : '关闭', 'code' => "_pz('vip_opt')['vip_renew']"],
['label' => '续费优惠类型', 'value' => $vip_opt['vip_renew_price_type'] ?? '未知', 'code' => "_pz('vip_opt')['vip_renew_price_type']"],
['label' => '续费折扣率', 'value' => ($vip_opt['vip_renew_discount'] ?? '无') . ' 折', 'code' => "_pz('vip_opt')['vip_renew_discount']"],
['label' => '续费直减金额', 'value' => ($vip_opt['vip_renew_reduce'] ?? '0') . ' 元', 'code' => "_pz('vip_opt')['vip_renew_reduce']"]
],
'升级规则' => [
['label' => '全局升级开关', 'value' => !empty($vip_opt['vip_upgrade']) ? '开启' : '关闭', 'code' => "_pz('vip_opt')['vip_upgrade']"],
['label' => '升级包月基础价', 'value' => $vip_opt['vip_upgrade_product']['unit_price'] ?? '未知', 'code' => "_pz('vip_opt')['vip_upgrade_product']['unit_price']"],
['label' => '升级永久一口价', 'value' => $vip_opt['vip_upgrade_product']['permanent_price'] ?? '未设置', 'code' => "_pz('vip_opt')['vip_upgrade_product']['permanent_price']"],
['label' => '升级永久划线价', 'value' => $vip_opt['vip_upgrade_product']['permanent_show_price'] ?? '未设置', 'code' => "_pz('vip_opt')['vip_upgrade_product']['permanent_show_price']"]
]
];
// 4. 特权与折扣
$privileges = [];
for ($i = 1; $i <= 2; $i++) {
$privileges["VIP{$i}"] = [
'desc' => ['value' => $vip_opt['pay_user_vip_'.$i.'_equity'] ?? '未设置', 'code' => "_pz('vip_opt')['pay_user_vip_{$i}_equity']"],
'items' => [
['label' => "VIP{$i} 文章付费折扣", 'value' => ($options['post_article_pay_vip_'.$i.'_discount'] ?? 100) . '%', 'code' => "_pz('post_article_pay_vip_{$i}_discount')"],
['label' => "VIP{$i} 论坛发帖付费折扣", 'value' => ($options['bbs_post_pay_vip_'.$i.'_discount'] ?? 100) . '%', 'code' => "_pz('bbs_post_pay_vip_{$i}_discount')"]
]
];
}
// 5. 底层零散键值
$raw_keys = [];
$keywords = ['vip', 'pay', 'price', 'discount', 'renew', 'upgrade'];
foreach ($options as $key => $value) {
if (is_array($value) || is_object($value) || strlen((string)$value) > 100) continue;
$matched = false;
foreach ($keywords as $kw) {
if (stripos($key, $kw) !== false) { $matched = true; break; }
}
// 排除已经在前四个模块中明确写出的 option 键值,防止重复显示
$is_used = false;
for ($i = 1; $i <= 2; $i++) {
if ($key === 'pay_user_vip_'.$i.'_name' || $key === 'pay_user_vip_'.$i.'_s' || $key === 'pay_user_vip_'.$i.'_img' || $key === 'post_article_pay_vip_'.$i.'_discount' || $key === 'bbs_post_pay_vip_'.$i.'_discount') {
$is_used = true;
}
}
if ($matched && !$is_used) {
$raw_keys[$key] = $value;
}
}
ksort($raw_keys);
// ==========================================
// 模块 B:利用反射与正则提取 VIP 专属函数与钩子
// ==========================================
$vip_functions = [];
$vip_hooks = [];
$scanned_files = [];
$all_functions = get_defined_functions()['user'];
foreach ($all_functions as $func_name) {
if (stripos($func_name, 'vip') !== false) {
try {
$ref = new ReflectionFunction($func_name);
$file_path = $ref->getFileName();
if ($file_path && stripos(str_replace('\\', '/', $file_path), '/themes/zibll/') !== false) {
$params = [];
foreach ($ref->getParameters() as $param) {
$type = $param->hasType() ? '<span class="type-hint">' . $param->getType()->getName() . '</span> ' : '';
$param_str = $type . '<span class="param-name">$' . $param->getName() . '</span>';
if ($param->isOptional() && $param->isDefaultValueAvailable()) {
$def = $param->getDefaultValue();
$def_str = is_array($def) ? '[]' : (is_string($def) ? "'$def'" : (is_bool($def) ? ($def ? 'true' : 'false') : (is_null($def) ? 'null' : $def)));
$param_str .= ' <span class="param-default">= ' . $def_str . '</span>';
}
$params[] = $param_str;
}
$ret_type = $ref->hasReturnType() ? ': ' . $ref->getReturnType()->getName() : '';
$rel_file = substr($file_path, stripos(str_replace('\\', '/', $file_path), '/themes/zibll/') + 14);
$doc = $ref->getDocComment();
$short_desc = '暂无注释说明';
if ($doc) {
$lines = explode("\n", $doc);
foreach ($lines as $line) {
$clean = trim($line, " \t/*\r\n");
if (!empty($clean) && !str_starts_with($clean, '@')) { $short_desc = $clean; break; }
}
}
$vip_functions[] = [
'name' => $func_name,
'signature' => implode(', ', $params) . $ret_type,
'file' => $rel_file,
'line' => $ref->getStartLine(),
'desc' => $short_desc
];
if (!isset($scanned_files[$file_path]) && file_exists($file_path)) {
$content = file_get_contents($file_path);
preg_match_all('/(?:apply_filters|do_action)\s*\(\s*[\'"]([^\'"]*vip[^\'"]*)[\'"]/i', $content, $matches);
if (!empty($matches[1])) {
foreach ($matches[1] as $hook) {
$is_filter = (stripos($content, "apply_filters('".$hook."'") !== false || stripos($content, 'apply_filters("'.$hook.'"') !== false);
$vip_hooks[$hook] = [
'name' => $hook,
'type' => $is_filter ? 'Filter (过滤器)' : 'Action (动作)',
'file' => $rel_file
];
}
}
$scanned_files[$file_path] = true;
}
}
} catch (Exception $e) {}
}
}
usort($vip_functions, function($a, $b) { return strcmp($a['name'], $b['name']); });
ksort($vip_hooks);
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Zibll VIP 开发者中控台</title>
<style>
:root { --bg: #f0f2f5; --card-bg: #ffffff; --primary: #007aff; --text: #1d1d1f; --text-muted: #86868b; --border: #e5e5e5; }
* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); margin: 0; padding: 20px; }
.container { max-width: 1200px; margin: 0 auto; }
.header { background: var(--card-bg); padding: 30px; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.04); margin-bottom: 30px; display: flex; justify-content: space-between; align-items: center; }
.header h1 { margin: 0; font-size: 24px; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.warning { background: #fff0f0; color: #d70015; padding: 8px 16px; font-size: 13px; font-weight: bold; border-radius: 8px; border: 1px solid #ffcdd2; }
.nav-tabs { display: flex; gap: 10px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 5px; }
.nav-tabs::-webkit-scrollbar { height: 6px; }
.nav-tabs::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.tab-btn { background: var(--card-bg); border: 1px solid var(--border); padding: 12px 24px; border-radius: 10px; font-size: 15px; font-weight: 600; color: #555; cursor: pointer; transition: .2s; white-space: nowrap; flex-shrink: 0; }
.tab-btn:hover { background: #f9f9f9; }
.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 4px 12px rgba(0,122,255,0.3); }
.tab-content { display: none; animation: fadeIn .3s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
/* 核心卡片网格布局重构:适配【同框】展示 */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 20px; }
.info-card { background: var(--card-bg); border-radius: 16px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid var(--border); transition: .2s; }
.info-card:hover { box-shadow: 0 8px 25px rgba(0,0,0,0.06); transform: translateY(-2px); }
.info-card h3 { margin: 0 0 15px; font-size: 16px; color: var(--text); border-bottom: 1px dashed var(--border); padding-bottom: 10px; }
.kv-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #f5f5f5; font-size: 14px; gap: 15px; }
.kv-row:last-child { border-bottom: none; }
.kv-info { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.kv-key { color: var(--text-muted); font-weight: 600; }
/* 核心调用代码样式 */
.kv-code { font-size: 11.5px; color: #d73a49; background: #f5f5f5; padding: 4px 8px; border-radius: 6px; cursor: pointer; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; width: fit-content; transition: .2s; border: 1px solid #eee; word-break: break-all; }
.kv-code:hover { background: #e8f2ff; color: #007aff; border-color: #bce0fd; }
.kv-code::before { content: '📋 '; opacity: 0.5; }
.kv-val { font-weight: 600; color: var(--text); max-width: 40%; word-break: break-all; text-align: right; }
.icon-preview { display: inline-block; width: 24px; height: 24px; vertical-align: middle; margin-left: 8px; border-radius: 4px; background: #f0f0f0; }
.data-table { width: 100%; border-collapse: collapse; background: var(--card-bg); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid var(--border); }
.data-table th, .data-table td { padding: 15px 20px; text-align: left; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.data-table th { background: #fbfbfd; color: var(--text-muted); font-weight: 600; }
.data-table tr:hover { background: #f9f9f9; }
.tb-code-inline { display: block; font-size: 11px; color: #888; margin-top: 6px; cursor: pointer; font-family: monospace; background: #f5f5f5; padding: 2px 6px; border-radius: 4px; border: 1px solid #eee; width: fit-content; }
.tb-code-inline:hover { background: #e8f2ff; color: #007aff; border-color: #bce0fd; }
.data-table code { background: #f5f5f5; padding: 3px 6px; border-radius: 4px; color: #d73a49; font-family: monospace; }
.tag { background: #ffe0b2; color: #ff9f00; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: bold; }
.raw-text-wrap { position: relative; margin-top: 10px; }
pre.raw-text { background: #282c34; color: #abb2bf; padding: 15px; border-radius: 8px; font-family: monospace; font-size: 13px; white-space: pre-wrap; line-height: 1.6; max-height: 200px; overflow-y: auto; margin: 0; border: 1px solid #e5e5e5; }
/* API 函数卡片特有样式 */
.func-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(550px, 1fr)); gap: 20px; }
.func-card { background: var(--card-bg); border-radius: 12px; border: 1px solid var(--border); padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); display: flex; flex-direction: column; }
.fc-name { font-size: 16px; font-weight: 800; color: var(--primary); font-family: monospace; display: flex; align-items: center; gap: 10px; }
.fc-copy { background: #e8f2ff; border: none; padding: 4px 8px; border-radius: 4px; font-size: 12px; cursor: pointer; color: var(--primary); font-weight: 600; transition: .2s; }
.fc-copy:hover { background: var(--primary); color: #fff; }
.fc-desc { font-size: 13px; color: var(--text-muted); margin: 8px 0; }
.fc-code { background: #282c34; padding: 15px; border-radius: 8px; font-family: monospace; font-size: 13px; overflow-x: auto; white-space: nowrap; color: #abb2bf; margin-bottom: 15px; line-height: 1.5; }
.fc-code .type-hint { color: #c678dd; }
.fc-code .param-name { color: #e06c75; }
.fc-code .param-default { color: #d19a66; }
.fc-file { font-size: 12px; color: #999; border-top: 1px dashed var(--border); padding-top: 12px; margin-top: auto; }
.hook-filter { background: #e6f9e9; color: #28c840; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: bold; }
.hook-action { background: #e8f2ff; color: #007aff; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: bold; }
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>Zibll VIP 开发者终极中控台 📡</h1>
<div class="warning">⚠️ 高权限开发机密,用后请立即删除此文件!</div>
</div>
<div class="nav-tabs">
<button class="tab-btn active" data-target="tab-basics">📊 基础配置与图标</button>
<button class="tab-btn" data-target="tab-packages">💳 套餐与价格体系</button>
<button class="tab-btn" data-target="tab-renew">🔄 续费与升级规则</button>
<button class="tab-btn" data-target="tab-privileges">🛡️ 特权与全局折扣</button>
<button class="tab-btn" data-target="tab-functions" style="border-color:#007aff; color:#007aff; background:#f0f8ff;">💻 VIP 核心函数 API (<?=count($vip_functions)?>)</button>
<button class="tab-btn" data-target="tab-hooks" style="border-color:#007aff; color:#007aff; background:#f0f8ff;">🪝 VIP 扩展钩子 Hooks (<?=count($vip_hooks)?>)</button>
<button class="tab-btn" data-target="tab-raw">⚙️ 底层零散键值抓取</button>
</div>
<div id="tab-basics" class="tab-content active">
<div class="grid-cards">
<?php foreach($basics as $vip_name => $items): ?>
<div class="info-card">
<h3><?=$vip_name?> 核心信息调用</h3>
<?php foreach($items as $item): ?>
<div class="kv-row">
<div class="kv-info">
<span class="kv-key"><?=esc_html($item['label'])?></span>
<code class="kv-code" onclick="copyText('<?=esc_js($item['code'])?>', this)" title="点击复制调用代码"><?=esc_html($item['code'])?></code>
</div>
<span class="kv-val">
<?php
if(strpos($item['value'], 'http') !== false || strpos($item['value'], '/') === 0) {
echo esc_html(basename($item['value'])) . "<img src='".esc_url($item['value'])."' class='icon-preview'>";
} else {
echo esc_html($item['value']);
}
?>
</span>
</div>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
</div>
</div>
<div id="tab-packages" class="tab-content">
<div class="grid-cards">
<?php foreach($packages as $vip_name => $pkgs): ?>
<div class="info-card" style="grid-column: 1 / -1;">
<h3><?=$vip_name?> 售卖套餐包 (智能解析 Array)</h3>
<table class="data-table">
<thead>
<tr>
<th>套餐时长 (time/unit)</th>
<th>实际结算价 (price)</th>
<th>前端划线价 (show_price)</th>
<th>促销标签 (tag)</th>
</tr>
</thead>
<tbody>
<?php foreach($pkgs as $p): ?>
<tr>
<td>
<strong><?=esc_html($p['时长'])?></strong>
<span class="tb-code-inline" onclick="copyText('<?=esc_js($p['code_time'])?>', this)"><?=esc_html($p['code_time'])?></span>
</td>
<td>
<span style="color:#ff3b30;font-weight:bold;font-size:16px;">¥ <?=esc_html($p['结算价'])?></span>
<span class="tb-code-inline" onclick="copyText('<?=esc_js($p['code_price'])?>', this)"><?=esc_html($p['code_price'])?></span>
</td>
<td>
<span style="text-decoration:line-through;color:#999;font-weight:bold;">¥ <?=esc_html($p['划线价'])?></span>
<span class="tb-code-inline" onclick="copyText('<?=esc_js($p['code_show_price'])?>', this)"><?=esc_html($p['code_show_price'])?></span>
</td>
<td>
<span class="tag"><?=esc_html($p['标签']?:'无')?></span>
<span class="tb-code-inline" onclick="copyText('<?=esc_js($p['code_tag'])?>', this)"><?=esc_html($p['code_tag'])?></span>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endforeach; ?>
</div>
</div>
<div id="tab-renew" class="tab-content">
<div class="grid-cards">
<?php foreach($renew_upgrade as $title => $items): ?>
<div class="info-card">
<h3><?=$title?></h3>
<?php foreach($items as $item): ?>
<div class="kv-row">
<div class="kv-info">
<span class="kv-key"><?=esc_html($item['label'])?></span>
<code class="kv-code" onclick="copyText('<?=esc_js($item['code'])?>', this)" title="点击复制调用代码"><?=esc_html($item['code'])?></code>
</div>
<span class="kv-val" style="color: <?=strpos($title, '升级') !== false ? '#ff9f00' : '#007aff'?>;">
<?=esc_html($item['value'])?>
</span>
</div>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
</div>
</div>
<div id="tab-privileges" class="tab-content">
<div class="grid-cards">
<?php foreach($privileges as $vip_name => $data): ?>
<div class="info-card">
<h3><?=$vip_name?> 特权与全局折扣</h3>
<?php foreach($data['items'] as $item): ?>
<div class="kv-row">
<div class="kv-info">
<span class="kv-key"><?=str_replace("{$vip_name} ", "", $item['label'])?></span>
<code class="kv-code" onclick="copyText('<?=esc_js($item['code'])?>', this)" title="点击复制调用代码"><?=esc_html($item['code'])?></code>
</div>
<span class="kv-val"><?=esc_html($item['value'])?></span>
</div>
<?php endforeach; ?>
<h4 style="margin-top:20px;font-size:14px;color:var(--text-muted);display:flex;justify-content:space-between;align-items:center;">
特权富文本介绍 (Raw Text):
</h4>
<div class="raw-text-wrap">
<code class="kv-code" style="margin-bottom:8px; display:block;" onclick="copyText('<?=esc_js($data['desc']['code'])?>', this)" title="点击复制调用代码"><?=esc_html($data['desc']['code'])?></code>
<pre class="raw-text"><?=esc_html($data['desc']['value'])?></pre>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<div id="tab-functions" class="tab-content">
<div class="func-grid">
<?php foreach($vip_functions as $f): ?>
<div class="func-card">
<div class="fc-name">
<?=esc_html($f['name'])?>
<button class="fc-copy" onclick="copyText('<?=esc_js($f['name'])?>', this)">复制</button>
</div>
<div class="fc-desc"><?=esc_html($f['desc'])?></div>
<div class="fc-code">
<span style="color:#c678dd;">function</span> <span style="color:#61afef;"><?=esc_html($f['name'])?></span>(<?=$f['signature']?>)
</div>
<div class="fc-file">📁 <?=esc_html($f['file'])?> : <strong><?=esc_html($f['line'])?></strong></div>
</div>
<?php endforeach; ?>
<?php if(empty($vip_functions)): ?>
<div style="grid-column: 1/-1; text-align:center; padding: 40px; color:#999;">未扫描到相关的 VIP 函数,请检查子比主题版本。</div>
<?php endif; ?>
</div>
</div>
<div id="tab-hooks" class="tab-content">
<div class="info-card" style="padding: 0; border: none;">
<table class="data-table">
<thead>
<tr>
<th width="45%">Hook 钩子名称 (复制使用)</th>
<th width="20%">类型</th>
<th width="35%">定义所在文件</th>
</tr>
</thead>
<tbody>
<?php foreach($vip_hooks as $hook): ?>
<tr>
<td>
<code style="font-size: 15px; color:#1d1d1f; background:transparent; padding:0;"><?=esc_html($hook['name'])?></code>
<button class="fc-copy" style="margin-left:10px; background:#f0f0f0; color:#555;" onclick="copyText('<?=esc_js($hook['name'])?>', this)">Copy</button>
</td>
<td>
<span class="<?= strpos($hook['type'], 'Filter') !== false ? 'hook-filter' : 'hook-action' ?>">
<?=esc_html($hook['type'])?>
</span>
</td>
<td style="color:#888; font-size:13px;">📁 <?=esc_html($hook['file'])?></td>
</tr>
<?php endforeach; ?>
<?php if(empty($vip_hooks)): ?>
<tr><td colspan="3" style="text-align:center; padding:40px; color:#999;">未扫描到包含 vip 字段的 Hook。</td></tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
<div id="tab-raw" class="tab-content">
<div class="info-card">
<h3>⚙️ 其他相关底层键值雷达扫描结果</h3>
<p style="font-size:13px;color:#888;">这里抓取了所有包含 `vip`, `price`, `pay` 等关键词但未被上方分类收录的零散配置:</p>
<table class="data-table">
<thead><tr><th>数据库键名 (Key)</th><th>当前配置值 (Value)</th></tr></thead>
<tbody>
<?php foreach($raw_keys as $k => $v): ?>
<tr>
<td width="40%"><code><?=esc_html($k)?></code></td>
<td><?=esc_html($v)?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
<script>
// Tab 切换逻辑
document.querySelectorAll('.tab-btn').forEach(btn => {
btn.addEventListener('click', function() {
document.querySelectorAll('.tab-btn').forEach(b => {
b.classList.remove('active');
b.style.background = '';
b.style.color = '';
});
document.querySelectorAll('.tab-content').forEach(c => c.classList.remove('active'));
this.classList.add('active');
if(this.getAttribute('data-target') === 'tab-functions' || this.getAttribute('data-target') === 'tab-hooks') {
this.style.background = '#007aff';
this.style.color = '#fff';
}
document.getElementById(this.getAttribute('data-target')).classList.add('active');
});
});
// 通用极速一键复制逻辑
function copyText(text, btn) {
const el = document.createElement('textarea');
el.value = text;
document.body.appendChild(el);
el.select();
document.execCommand('copy');
document.body.removeChild(el);
const originalText = btn.innerText;
btn.innerText = '复制成功!';
btn.style.background = '#28c840';
btn.style.color = '#fff';
btn.style.borderColor = '#28c840';
setTimeout(() => {
btn.innerText = originalText;
btn.style.background = '';
btn.style.color = '';
btn.style.borderColor = '';
}, 1500);
}
</script>
</body>
</html>
[/hidecontent]zibll所有函数 然后就是进阶版的代码,可以探测到子比的所有函数名,这个也仅供参考。
[hidecontent type="reply"]
<?php
/**
* Zibll 主题函数全局超级探测雷达
* 专属定制商业级开发工具,用完即删!
*/
// 1. 加载 WordPress 核心环境
require_once('./wp-load.php');
// 2. 核心安全校验:必须是超级管理员
if (!is_user_logged_in() || !current_user_can('manage_options')) {
wp_die('<div style="padding:20px;color:red;font-weight:bold;font-family:sans-serif;">⚠️ 拒绝访问:请先在同一浏览器中登录 WordPress 管理员账号!</div>');
}
// 3. 获取所有已定义的用户级(非 PHP 内置)函数
$all_functions = get_defined_functions()['user'];
$zibll_functions = [];
// 4. 使用高阶反射机制精准过滤并深度解析
foreach ($all_functions as $func_name) {
try {
$ref = new ReflectionFunction($func_name);
$file_path = $ref->getFileName();
// 判断是否属于子比主题目录
if ($file_path && stripos(str_replace('\\', '/', $file_path), '/themes/zibll/') !== false) {
// 解析参数与类型
$params = [];
foreach ($ref->getParameters() as $param) {
$type = $param->hasType() ? '<span class="type-hint">' . $param->getType()->getName() . '</span> ' : '';
$param_str = $type . '<span class="param-name">$' . $param->getName() . '</span>';
if ($param->isOptional()) {
try {
if ($param->isDefaultValueAvailable()) {
$default = $param->getDefaultValue();
if (is_array($default)) {
$default_val = '[]';
} elseif (is_string($default)) {
$default_val = "'" . $default . "'";
} elseif (is_bool($default)) {
$default_val = $default ? 'true' : 'false';
} elseif (is_null($default)) {
$default_val = 'null';
} else {
$default_val = $default;
}
$param_str .= ' <span class="param-default">= ' . $default_val . '</span>';
}
} catch (Exception $e) {
$param_str .= ' = ?';
}
}
$params[] = $param_str;
}
// 解析返回值类型
$return_type = $ref->hasReturnType() ? ': ' . $ref->getReturnType()->getName() : '';
// 解析原生注释 (PHPDoc)
$doc = $ref->getDocComment();
$short_desc = '暂无注释说明';
$full_doc = '';
if ($doc) {
$full_doc = esc_html($doc);
$lines = explode("\n", $doc);
foreach ($lines as $line) {
$clean = trim($line, " \t/*\r\n");
if (!empty($clean) && !str_starts_with($clean, '@')) {
$short_desc = $clean;
break;
}
}
}
// 智能提取相对路径
$relative_file = substr($file_path, stripos(str_replace('\\', '/', $file_path), '/themes/zibll/') + 14);
// 🤖 智能精细分类逻辑
$category = 'other';
$fn = strtolower($func_name);
if ($fn === '_pz' || str_starts_with($fn, 'zib_get_theme_mod') || str_starts_with($fn, 'zib_get_option')) {
$category = 'option';
} elseif (strpos($fn, 'vip') !== false) {
$category = 'vip';
} elseif (strpos($fn, 'pay') !== false || strpos($fn, 'order') !== false || strpos($fn, 'price') !== false) {
$category = 'pay';
} elseif (strpos($fn, 'bbs') !== false || strpos($fn, 'forum') !== false || strpos($fn, 'reply') !== false) {
$category = 'bbs';
} elseif (strpos($fn, 'user') !== false || strpos($fn, 'avatar') !== false || strpos($fn, 'author') !== false) {
$category = 'user';
} elseif (strpos($fn, 'post') !== false || strpos($fn, 'article') !== false || strpos($fn, 'category') !== false) {
$category = 'post';
} elseif (str_starts_with($fn, 'zib_is_') || str_starts_with($fn, 'is_')) {
$category = 'condition';
} elseif (str_starts_with($fn, 'zib_get_')) {
$category = 'get';
}
$zibll_functions[] = [
'name' => $func_name,
'signature' => implode(', ', $params) . $return_type,
'file' => $relative_file,
'line' => $ref->getStartLine(),
'desc' => $short_desc,
'doc' => $full_doc,
'cat' => $category
];
}
} catch (ReflectionException $e) {
continue;
}
}
// 按函数名排序
usort($zibll_functions, function($a, $b) {
return strcmp($a['name'], $b['name']);
});
$stats = array_count_values(array_column($zibll_functions, 'cat'));
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Zibll Pro Developer API Dashboard</title>
<style>
:root { --bg: #f5f5f7; --sidebar-bg: #ffffff; --card-bg: #ffffff; --primary: #007aff; --text: #1d1d1f; --text-muted: #86868b; --border: #e5e5e5; --code-bg: #f8f9fa; --keyword: #d73a49; --string: #032f62; }
* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); margin: 0; padding: 0; height: 100vh; overflow: hidden; display: flex; }
/* 侧边栏 */
.sidebar { width: 260px; background: var(--sidebar-bg); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 20px 0; z-index: 10; }
.logo { padding: 0 20px 20px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.logo h1 { margin: 0; font-size: 20px; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.logo span { font-size: 12px; background: #e8f2ff; color: var(--primary); padding: 2px 6px; border-radius: 4px; font-weight: bold; }
.nav-menu { flex: 1; overflow-y: auto; padding: 0 10px; }
.nav-item { padding: 12px 15px; margin-bottom: 4px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 500; color: #555; transition: .2s; border: 1px solid transparent; }
.nav-item:hover { background: #f0f0f0; }
.nav-item.active { background: #e8f2ff; color: var(--primary); border-color: #bce0fd; font-weight: 600; }
.badge { background: #eee; color: #666; font-size: 12px; padding: 2px 8px; border-radius: 12px; font-weight: 600; }
.nav-item.active .badge { background: var(--primary); color: #fff; }
/* 主体内容区 */
.main-content { flex: 1; display: flex; flex-direction: column; background: var(--bg); }
.header { padding: 20px 40px; background: var(--sidebar-bg); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.02); z-index: 5; }
.search-wrap { flex: 1; position: relative; }
.search-wrap input { width: 100%; padding: 14px 20px 14px 45px; font-size: 16px; border: 2px solid var(--border); border-radius: 12px; outline: none; transition: .3s; background: #f9f9fb; }
.search-wrap input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(0,122,255,0.1); }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 18px; color: #aaa; pointer-events: none; }
.warning-banner { background: #fff0f0; color: #d70015; padding: 10px 20px; font-size: 13px; font-weight: bold; border-radius: 8px; border: 1px solid #ffcdd2; display: flex; align-items: center; gap: 8px; }
/* 函数卡片区 */
.cards-container { flex: 1; overflow-y: auto; padding: 30px 40px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(600px, 1fr)); gap: 20px; }
.func-card { background: var(--card-bg); border-radius: 12px; border: 1px solid var(--border); padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); transition: .3s; position: relative; display: flex; flex-direction: column; }
.func-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.06); border-color: #cce0ff; }
.fc-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; }
.fc-title-wrap { flex: 1; }
.fc-name { font-size: 18px; font-weight: 800; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; letter-spacing: -0.5px; }
.fc-copy { background: #f0f0f0; border: none; padding: 4px 8px; border-radius: 6px; font-size: 12px; cursor: pointer; color: #555; font-weight: 600; margin-left: 10px; transition: .2s; }
.fc-copy:hover { background: var(--primary); color: #fff; }
.fc-desc { margin: 8px 0 0; font-size: 14px; color: var(--text-muted); font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fc-code { background: var(--code-bg); padding: 15px; border-radius: 8px; border: 1px solid #eef0f2; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; overflow-x: auto; white-space: nowrap; line-height: 1.5; color: #24292e; margin-bottom: 15px; }
.fc-code .type-hint { color: #6f42c1; }
.fc-code .param-name { color: #e36209; }
.fc-code .param-default { color: #005cc5; }
.fc-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 15px; border-top: 1px dashed var(--border); font-size: 12px; color: #999; }
.fc-file { background: #f5f5f5; padding: 3px 8px; border-radius: 4px; font-family: monospace; }
.details-btn { font-size: 12px; color: var(--primary); background: none; border: none; cursor: pointer; padding: 0; font-weight: 600; }
.details-btn:hover { text-decoration: underline; }
.doc-block { display: none; background: #282c34; color: #abb2bf; padding: 15px; border-radius: 8px; font-family: monospace; font-size: 12px; margin-top: 10px; white-space: pre-wrap; line-height: 1.6; }
.no-results { text-align: center; padding: 50px; color: #999; font-size: 16px; width: 100%; grid-column: 1 / -1; }
/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #999; }
@media (max-width: 900px) {
.card-grid { grid-template-columns: 1fr; }
.header { padding: 15px 20px; flex-direction: column; align-items: stretch; }
.sidebar { width: 200px; }
.cards-container { padding: 20px; }
}
</style>
</head>
<body>
<div class="sidebar">
<div class="logo">
<h1>Zibll Radar <span>API</span></h1>
<div style="font-size:12px; color:#888; margin-top:5px;">深度反射探测器</div>
</div>
<div class="nav-menu" id="nav-menu">
<div class="nav-item active" data-cat="all">
<span>🌐 全部函数</span>
<span class="badge"><?=count($zibll_functions)?></span>
</div>
<div class="nav-item" data-cat="option">
<span>⚙️ 主题配置 (_pz)</span>
<span class="badge"><?=$stats['option'] ?? 0?></span>
</div>
<div class="nav-item" data-cat="user">
<span>👤 用户数据 (user)</span>
<span class="badge"><?=$stats['user'] ?? 0?></span>
</div>
<div class="nav-item" data-cat="vip">
<span>💎 VIP模块 (vip)</span>
<span class="badge"><?=$stats['vip'] ?? 0?></span>
</div>
<div class="nav-item" data-cat="pay">
<span>💰 支付商城 (pay)</span>
<span class="badge"><?=$stats['pay'] ?? 0?></span>
</div>
<div class="nav-item" data-cat="bbs">
<span>💬 论坛社区 (bbs)</span>
<span class="badge"><?=$stats['bbs'] ?? 0?></span>
</div>
<div class="nav-item" data-cat="post">
<span>📝 文章分类 (post)</span>
<span class="badge"><?=$stats['post'] ?? 0?></span>
</div>
<div class="nav-item" data-cat="condition">
<span>⚖️ 条件判断 (is_)</span>
<span class="badge"><?=$stats['condition'] ?? 0?></span>
</div>
<div class="nav-item" data-cat="get">
<span>📦 综合获取 (get)</span>
<span class="badge"><?=$stats['get'] ?? 0?></span>
</div>
<div class="nav-item" data-cat="other">
<span>🧩 其他组件</span>
<span class="badge"><?=$stats['other'] ?? 0?></span>
</div>
</div>
</div>
<div class="main-content">
<div class="header">
<div class="search-wrap">
<span class="search-icon">🔍</span>
<input type="text" id="searchInput" placeholder="搜索函数名、参数、文件路径或中文说明...">
</div>
<div class="warning-banner">
⚠️ 涉密数据提取完毕,用后请立即删除此文件!
</div>
</div>
<div class="cards-container" id="cards-container">
<div class="card-grid" id="card-grid">
<?php foreach($zibll_functions as $f): ?>
<div class="func-card" data-cat="<?=esc_attr($f['cat'])?>">
<div class="fc-head">
<div class="fc-title-wrap">
<span class="fc-name"><?=esc_html($f['name'])?></span>
<button class="fc-copy" onclick="copyText('<?=esc_js($f['name'])?>', this)">复制</button>
<p class="fc-desc"><?=esc_html($f['desc'])?></p>
</div>
</div>
<div class="fc-code">
<span style="color:#d73a49;">function</span> <?=esc_html($f['name'])?>(<?=$f['signature']?>)
</div>
<div class="fc-footer">
<span class="fc-file">📁 <?=esc_html($f['file'])?> : <?=esc_html($f['line'])?></span>
<?php if(!empty($f['doc'])): ?>
<button class="details-btn" onclick="toggleDoc(this)">查看完整源码注释</button>
<?php else: ?>
<span>无注释</span>
<?php endif; ?>
</div>
<?php if(!empty($f['doc'])): ?>
<div class="doc-block"><?=esc_html($f['doc'])?></div>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>
<div id="no-results" class="no-results" style="display: none;">
🕵️ 未找到匹配的函数,请尝试换个关键词
</div>
</div>
</div>
<script>
const searchInput = document.getElementById('searchInput');
const cards = document.querySelectorAll('.func-card');
const noResults = document.getElementById('no-results');
const navItems = document.querySelectorAll('.nav-item');
let currentCat = 'all';
// 核心过滤引擎
function filterCards() {
const query = searchInput.value.toLowerCase();
let visibleCount = 0;
cards.forEach(card => {
const text = card.textContent.toLowerCase();
const cat = card.getAttribute('data-cat');
const matchesSearch = text.includes(query);
const matchesCat = (currentCat === 'all' || cat === currentCat);
if (matchesSearch && matchesCat) {
card.style.display = 'flex';
visibleCount++;
} else {
card.style.display = 'none';
}
});
noResults.style.display = visibleCount === 0 ? 'block' : 'none';
}
// 绑定搜索事件
searchInput.addEventListener('input', filterCards);
// 绑定分类点击事件
navItems.forEach(item => {
item.addEventListener('click', function() {
navItems.forEach(n => n.classList.remove('active'));
this.classList.add('active');
currentCat = this.getAttribute('data-cat');
filterCards();
document.getElementById('cards-container').scrollTo({top: 0, behavior: 'smooth'});
});
});
// 展开完整注释
function toggleDoc(btn) {
const docBlock = btn.parentElement.nextElementSibling;
if (docBlock.style.display === 'block') {
docBlock.style.display = 'none';
btn.innerText = '查看完整源码注释';
} else {
docBlock.style.display = 'block';
btn.innerText = '收起注释';
}
}
// 一键复制函数名
function copyText(text, btn) {
const el = document.createElement('textarea');
el.value = text;
document.body.appendChild(el);
el.select();
document.execCommand('copy');
document.body.removeChild(el);
const originalText = btn.innerText;
btn.innerText = '已复制!';
btn.style.background = '#28c840';
btn.style.color = '#fff';
setTimeout(() => {
btn.innerText = originalText;
btn.style.background = '';
btn.style.color = '';
}, 1500);
}
</script>
</body>
</html>
[/hidecontent]

