找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 7|回复: 0

MJJLB网站原代码

[复制链接]

59

主题

15

回帖

313

积分

管理员

积分
313
发表于 7 天前 | 显示全部楼层 |阅读模式
主站首页:

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport">
  6.     <title>中国迈迷网 - 迈克尔·杰克逊中国歌迷网站 - 迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上平台</title>
  7.     <meta name="Keywords" content="迈克尔, 杰克逊, 中国迈迷网站, 中文歌迷网站, 迈克尔杰克逊, 迈克尔·杰克逊, 麥可傑克森, 傑克森, 麥可, Michael, Jackson, King of Pop, Michael Jackson, Chinese fanclub, fanclub, 歌迷, 中国迈迷网, MJJLB, MJ, 爱MJJ的烙饼, 偶像, 音乐, 流行音乐之王, 流行之王, 米高積遜, 積遜, 米高, 娱乐, 欧美音乐">
  8.     <meta name="Description" content="中国迈迷网成立于2025年1月12日,是迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上平台,也是一个集MJ资讯共享与MJ文化传播为一体的迈迷庇护所。">
  9.     <link rel="shortcut icon" href="http://mjjcfpw.mjjlb.com/mjjlb.jpg">
  10.     <link rel="shortcut icon" href="http://mjjcfpw.mjjlb.com/mjjlb.jpg">
  11.     <style>
  12.         :root{
  13.             --primary:#cc0000;
  14.             --dark:#a90000;
  15.             --light:#fff;
  16.             --max-width:925px;
  17.         }
  18.         *{margin:0;padding:0;box-sizing:border-box;}
  19.         body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;background:#000;color:var(--light);}
  20.         header{background:var(--primary);padding:20px 0;text-align:center;}
  21.         header img{max-width:100%;height:auto;}
  22.         .banner{position:relative;max-width:var(--max-width);margin:0 auto;}
  23.         .banner img{width:100%;display:block;}
  24.         nav{background:var(--dark);padding:30px 0;}
  25.         .nav-inner{max-width:var(--max-width);margin:0 auto;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;}
  26.         .nav-inner a{flex:1 1 100px;text-align:center;}
  27.         .nav-inner img{max-width:100%;height:auto;border:0;transition:all 0.3s cubic-bezier(0.68,-0.55,0.2650.265,1.55);}
  28.         .nav-inner a:hover img{transform:scale(1.1);filter:drop-shadow(0 0 15px rgba(255,215,0,0.8)) brightness(1.2);}
  29.         .nav-inner a:active img{transform:scale(0.95);transition:all 0.1s;}
  30.         @keyframes shine{0%{background-position:-200% center;}100%{background-position:200% center;}}
  31.         .nav-inner a{position:relative;overflow:hidden;}
  32.         .nav-inner a::before{content:'';position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,0.4),transparent);transition:left 0.5s;z-index:1;pointer-events:none;}
  33.         .nav-inner a:hover::before{left:100%;transition:left 0.6s ease-in-out;}
  34.         #bgAudio{display:none;}
  35.         #musicBtn{
  36.             position:fixed;top:20px;right:20px;
  37.             width:50px;height:50px;background:#cc0000;color:#fff;
  38.             border:none;border-radius:50%;cursor:pointer;z-index:999;
  39.             display:flex;align-items:center;justify-content:center;
  40.             font-size:14px;font-weight:bold;user-select:none;
  41.         }
  42.         @media(max-width:600px){
  43.             .nav-inner{flex-direction:column;}
  44.         }

  45.         @keyframes fadeInUp{
  46.             from{
  47.                 opacity:0;
  48.                 transform:translateY(30px);
  49.             }
  50.             to{
  51.                 opacity:1;
  52.                 transform:translateY(0);
  53.             }
  54.         }
  55.         
  56.         img{
  57.             animation:fadeInUp 1s ease-out forwards;
  58.         }
  59.         
  60.         header img{animation-delay:0.1s;}
  61.         .nav-inner a:nth-child(1) img{animation-delay:1.0s;}
  62.         .nav-inner a:nth-child(1) img{animation-delay:1.0s;}
  63.     </style>
  64. </head>
  65. <body>
  66.     <audio id="bgAudio" loop>
  67.         <source src="http://mjjcfpw.mjjlb.com/mjjcfpw.mp3" type="audio/mpeg">
  68.         您的浏览器不支持 audio 标签。
  69.     </audio>
  70.     <button id="musicBtn">播放</button>

  71.     <header>
  72.             <a href="http://mjjcfpw.mjjlb.com" target="_blank">
  73.                 <img src="http://mjjcfpw.mjjlb.com/mjjchina.png" alt="MJJLB">
  74.             </a>
  75.     </header>

  76.     <section>

  77.         <div class="nav-inner">
  78.             <p>中国迈迷网 - 迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上平台</p>
  79.             <a href="http://news.mjjlb.com/mjjstation.php" target="_blank">
  80.                 <img src="http://bbs.mjjlb.com/site.png" alt="进入主页">
  81.             </a>
  82.             <a href="http://forum.mjjlb.com/mjjcfpw/index.php" target="_blank">
  83.                 <img src="http://bbs.mjjlb.com/forum.png" alt="进入论坛">
  84.             </a>
  85.         </div>
  86.     </section>
  87.     <nav>
  88. <p style="text-align:center;color:white;margin:0 auto;max-width:925;">
  89.   © 迈克尔·杰克逊中国歌迷网站(MICHAEL JOSEPH JACKSON CHINESE FANS' PORTAL WEBSITE)</p>
  90.     </nav>
  91.     <script>
  92.         (function(){
  93.             const audio = document.getElementById('bgAudio');
  94.             const btn   = document.getElementById('musicBtn');
  95.             let playing = false;

  96.             btn.addEventListener('click', () => {
  97.                 if (playing) {
  98.                     audio.pause();
  99.                     btn.textContent = '播放';
  100.                 } else {
  101.                     audio.play().catch(e=>console.log('需用户交互才能自动播放',e));
  102.                     btn.textContent = '暂停';
  103.                 }
  104.                 playing = !playing;
  105.             });
  106.         })();
  107.     </script>
  108. </body>
  109. </html>
复制代码


网站主页:

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport">
  6.     <title>中国迈迷网 - 迈克尔·杰克逊中国歌迷网站 - 迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上平台</title>
  7.     <meta name="Keywords" content="迈克尔, 杰克逊, 中国迈迷网站, 中文歌迷网站, 迈克尔杰克逊, 迈克尔·杰克逊, 麥可傑克森, 傑克森, 麥可, Michael, Jackson, King of Pop, Michael Jackson, Chinese fanclub, fanclub, 歌迷, 中国迈迷网, MJJLB, MJ, 爱MJJ的烙饼, 偶像, 音乐, 流行音乐之王, 流行之王, 米高積遜, 積遜, 米高, 娱乐, 欧美音乐">
  8.     <meta name="Description" content="中国迈迷网成立于2025年1月12日,是迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上平台,也是一个集MJ资讯共享与MJ文化传播为一体的迈迷庇护所。">
  9.     <link rel="shortcut icon" href="http://mjjcfpw.mjjlb.com/mjjcfpw.png">
  10.     <style type="text/css">
  11.         body {
  12.             margin-left: 0px;
  13.             margin-top: 0px;
  14.             margin-right: 0px;
  15.             margin-bottom: 0px;
  16.             background-color: #131416;
  17.         }
  18.         
  19.         #backgroundAudio {
  20.             display: none;
  21.         }
  22.         
  23.         .play-button {
  24.             position: fixed;
  25.             top: 20px;
  26.             right: 20px;
  27.             width: 50px;
  28.             height: 50px;
  29.             background-color: purple;
  30.             color: white;
  31.             border: none;
  32.             border-radius: 50%;
  33.             cursor: pointer;
  34.             z-index: 100;
  35.             display: flex;
  36.             align-items: center;
  37.             justify-content: center;
  38.         }
  39.         .play-button i {
  40.             font-size: 20px;
  41.         }

  42.         .top-left-gif {
  43.             position: fixed;
  44.             top: 10px;
  45.             left: 10px;
  46.             z-index: 101;
  47.             width: 150px;
  48.             height: auto;
  49.         }
  50.     </style>
  51. </head>

  52. <body>
  53.     <audio id="backgroundAudio">
  54.         <source src="http://mjjcfpw.mjjlb.com/mjjlb.mp3" type="audio/mpeg">
  55.     </audio>
  56.     <button class="play-button" id="playButton">
  57.         <p>播放</p>
  58.     </button>

  59.     <a href="http://mjjcfpw.mjjlb.com" target="_blank">
  60.         <img class="top-left-gif" src="http://mjjcfpw.mjjlb.com/mj.gif" alt="中国迈迷网站">
  61.     </a>

  62.     <table width="100%" border="0" cellpadding="0" cellspacing="0" background="http://mjjcfpw.mjjlb.com/michaeljackson.jpg" style="background-repeat: no-repeat;background-position: center top;">
  63.       <tbody>
  64.         <tr>
  65.             <td height="100">&nbsp;</td>
  66.         </tr>
  67.         <tr>
  68.             <td>
  69.                 <table width="1083" border="0" align="center">
  70.                   <tbody>
  71.                     <tr>
  72.                         <td><img src="http://mjjcfpw.mjjlb.com/map.png" width="1083" height="478" border="0" usemap="#Map"></td>
  73.                     </tr>
  74.                   </tbody>
  75.                 </table>
  76.             </td>
  77.         </tr>
  78.         <tr>
  79.             <td height="180" valign="middle">
  80.                 &nbsp;
  81.             </td>
  82.         </tr>
  83.       </tbody>
  84.     </table>

  85.     <map name="Map" id="Map">
  86.         <area shape="rect" coords="147,252,298,322" href="http://blog.mjjlb.com" target="_blank">
  87.         <area shape="rect" coords="617,92,771,169" href="http://pc.mjjlb.com" target="_blank">
  88.         <area shape="rect" coords="775,172,929,246" href="http://news.mjjlb.com" target="_blank">
  89.         <area shape="rect" coords="298,175,449,245" href="http://bbs.mjjlb.com" target="_blank">
  90.         <area shape="rect" coords="298,95,449,164" href="http://www.mjjlb.com" target="_self">
  91.         <area shape="rect" coords="619,174,773,248" href="http://m.mjjlb.com" target="_blank">
  92.     </map>

  93.     <script>
  94.         document.addEventListener('DOMContentLoaded', function() {
  95.             var audio = document.getElementById('backgroundAudio');
  96.             var playButton = document.getElementById('playButton');
  97.             var isPlaying = false;
  98.             
  99.             playButton.addEventListener('click', function() {
  100.                 if (isPlaying) {
  101.                     audio.pause();
  102.                     playButton.innerHTML = '<p>播放</p>';
  103.                 } else {
  104.                     audio.play().catch(function(error) {
  105.                         console.log('音频播放失败,可能需要用户交互才能播放音频。', error);
  106.                     });
  107.                     playButton.innerHTML = '<p>暂停</p>';
  108.                 }
  109.                 isPlaying = !isPlaying;
  110.             });
  111.         });
  112.     </script>
  113. <style>
  114. body{margin:0}
  115. #mjjlb-share{
  116.   position: fixed;
  117.   top: 150px;
  118.   right: 0;
  119.   z-index: 9999;
  120. }
  121. .share-tab{
  122.   width: 4px;
  123.   height: 50px;
  124.   background: linear-gradient(180deg,#9c7bff 0%,#7e3dff 100%);
  125.   border-radius: 2px 0 0 2px;
  126.   cursor: pointer;
  127.   transition: width .25s ease;
  128.   box-shadow: -2px 0 8px rgba(126,61,255,.35);
  129. }
  130. .share-panel{
  131.   position: absolute;
  132.   top: 0;
  133.   right: 4px;
  134.   width: 48px;
  135.   padding: 12px 6px 8px;
  136.   background: rgba(126,61,255,.85);
  137.   backdrop-filter: blur(6px);
  138.   border-radius: 8px 0 0 8px;
  139.   box-shadow: 0 2px 16px rgba(126,61,255,.35);
  140.   display: flex;
  141.   flex-direction: column;
  142.   align-items: center;
  143.   gap: 10px;
  144.   transform: translateX(100%);
  145.   opacity: 0;
  146.   transition: transform .35s ease, opacity .35s ease;
  147. }
  148. #mjjlb-share:hover .share-tab{width:8px}
  149. #mjjlb-share:hover .share-panel{transform:translateX(0);opacity:1}
  150. .share-panel img{width:28px;height:28px;border-radius:50%}
  151. </style>

  152. <div id="mjjlb-share">
  153.   <div class="share-tab"></div>
  154.   <div class="share-panel">
  155.     <img src="https://img.icons8.com/color/48/ffffff/weibo.png"   onclick="shareTo('weibo')" title="微博">
  156.     <img src="https://img.icons8.com/color/48/ffffff/qq.png"      onclick="shareTo('qzone')" title="QQ空间">
  157.     <img src="https://img.icons8.com/ios-filled/50/ffffff/link.png" onclick="copyLink()" title="复制链接">
  158.   </div>
  159. </div>

  160. <script>
  161.   const openQr   = ()=>window.open('https://api.qrserver.com/v1/create-qr-code/?size=300x300&data='+encodeURIComponent(location.href),'qrcode','width=320,height=320');
  162.   const shareTo  = t=>{
  163.     const [title,url]=[document.title,location.href];
  164.     t==='weibo'&&window.open(`https://service.weibo.com/share/share.php?title=${encodeURIComponent(title)}&url=${encodeURIComponent(url)}`);
  165.     t==='qzone'&&window.open(`https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=${encodeURIComponent(url)}&title=${encodeURIComponent(title)}`);
  166.   };
  167.   const copyLink = ()=>navigator.clipboard.writeText(location.href).then(()=>alert('中国迈迷网的网址链接已经复制到剪贴板,快快分享给其他人。更多关于迈克尔·杰克逊的精彩内容,尽在MJJLB.com!'));
  168. </script>
  169. <footer style="text-align: center;">
  170.     <p style="color: white; margin-top: 10px;">
  171.         ©中国迈迷网 - 迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上平台
  172.     </p>
  173. </footer>
  174. </body>
  175. </html>
复制代码


新闻主站:

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport">
  6.     <title>中国迈迷网 - MJJLB新闻主站</title>

  7.     <meta name="Keywords" content="迈克尔, 杰克逊, 中国迈迷网, 中文歌迷网站, 迈克尔杰克逊, 迈克尔·杰克逊, 麥可傑克森, 傑克森, 麥可, Michael, Jackson, King of Pop, Michael Jackson, Chinese fanclub, fanclub, 歌迷, 火线新闻, MJJLB新闻主站, MJ, 爱MJJ的烙饼, 偶像, 音乐, 流行音乐之王, 流行之王, 米高積遜, 積遜, 米高, 娱乐, 欧美音乐">
  8.     <meta name="Description" content="中国迈迷网 - MJJLB新闻主站(原迈克尔杰克逊讯息站)成立于2024年10月30日,是迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上新闻资讯平台,也是一个集MJ资讯共享与MJ文化传播为一体的迈迷庇护所。">
  9.     <link rel="shortcut icon" href="http://news.mjjlb.com/mjjlb.png">
  10.     <style type="text/css">
  11.         body {
  12.             margin-left: 0px;
  13.             margin-top: 0px;
  14.             margin-right: 0px;
  15.             margin-bottom: 0px;
  16.             background-color: #131416;
  17.         }
  18.         
  19.         #backgroundAudio {
  20.             display: none;
  21.         }
  22.         
  23.         .play-button {
  24.             position: fixed;
  25.             top: 10px;
  26.             left: 10px;
  27.             width: 50px;
  28.             height: 50px;
  29.             background-color: red;
  30.             color: white;
  31.             border: none;
  32.             border-radius: 50%;
  33.             cursor: pointer;
  34.             z-index: 100;
  35.             display: flex;
  36.             align-items: center;
  37.             justify-content: center;
  38.         }
  39.         .play-button i {
  40.             font-size: 20px;
  41.         }

  42.         .bookmark-gif {
  43.             position: fixed;
  44.             top: 20px;
  45.             right: 20px;
  46.             z-index: 101;
  47.             width: 150px;
  48.             height: auto;
  49.             cursor: pointer;
  50.             border-radius: 4px;
  51.         }
  52.     </style>
  53. </head>

  54. <body>
  55.     <audio id="backgroundAudio">
  56.         <source src="http://news.mjjlb.com/mjjlb.mp3" type="audio/mpeg">
  57.     </audio>
  58.     <button class="play-button" id="playButton">
  59.         <p>播放</p>
  60.     </button>

  61.     <img class="bookmark-gif" src="http://news.mjjlb.com/add.gif" alt="收藏本页" id="bookmarkGif">

  62.     <table width="100%" border="0" cellpadding="0" cellspacing="0" background="http://news.mjjlb.com/michaeljackson.png" style="background-repeat: no-repeat;background-position: center top;">
  63.       <tbody>
  64.         <tr>
  65.             <td height="100">&nbsp;</td>
  66.         </tr>
  67.         <tr>
  68.             <td>
  69.                 <table width="1083" border="0" align="center">
  70.                   <tbody>
  71.                     <tr>
  72.                         <td><img src="http://news.mjjlb.com/map.png" width="1083" height="478" border="0" usemap="#Map"></td>
  73.                     </tr>
  74.                   </tbody>
  75.                 </table>
  76.             </td>
  77.         </tr>
  78.         <tr>
  79.             <td height="180" valign="middle">
  80.                 &nbsp;
  81.             </td>
  82.         </tr>
  83.       </tbody>
  84.     </table>

  85.     <map name="Map" id="Map">
  86.         <area shape="rect" coords="147,252,298,322" href="https://space.bilibili.com/470056028" target="_blank">
  87.         <area shape="rect" coords="617,92,771,169" href="https://www.weibo.com/mjjlb" target="_blank">
  88.         <area shape="rect" coords="775,172,929,246" href="https://tieba.baidu.com/mjj" target="_blank">
  89.         <area shape="rect" coords="298,175,449,245" href="http://forum.mjjlb.com/mjjcfpw/portal.php?mod=list&catid=1" target="_blank">
  90.         <area shape="rect" coords="298,95,449,164" href="http://news.mjjlb.com/mjjstation.php" target="_self">
  91.         <area shape="rect" coords="619,174,773,248" href="https://www.xiaohongshu.com/user/profile/671d0662000000001d021b3f">
  92.     </map>

  93.     <script>
  94.         document.addEventListener('DOMContentLoaded', function() {
  95.             var audio = document.getElementById('backgroundAudio');
  96.             var playButton = document.getElementById('playButton');
  97.             var isPlaying = false;
  98.             
  99.             playButton.addEventListener('click', function() {
  100.                 if (isPlaying) {
  101.                     audio.pause();
  102.                     playButton.innerHTML = '<p>播放</p>';
  103.                 } else {
  104.                     audio.play().catch(function(error) {
  105.                         console.log('音频播放失败,可能需要用户交互才能播放音频。', error);
  106.                     });
  107.                     playButton.innerHTML = '<p>暂停</p>';
  108.                 }
  109.                 isPlaying = !isPlaying;
  110.             });
  111.             document.getElementById('bookmarkGif').addEventListener('click', function() {
  112.                 const url = location.href;
  113.                 const title = document.title;
  114.                 if (navigator.clipboard && window.isSecureContext) {
  115.                     navigator.clipboard.writeText(url).then(() => {
  116.                         alert('已复制MJJLB新闻主站的网址链接,请您手动添加到浏览器收藏夹。更多迈克尔·杰克逊的精彩新闻资讯,尽在中国迈迷网!');
  117.                     }).catch(() => fallback());
  118.                 } else {
  119.                     fallback();
  120.                 }
  121.                 function fallback() {
  122.                     if (window.sidebar && window.sidebar.addPanel) {
  123.                         window.sidebar.addPanel(title, url, '');
  124.                     } else if (window.external && ('AddFavorite' in window.external)) {
  125.                         window.external.AddFavorite(url, title);
  126.                     } else {
  127.                         prompt('请手动复制MJJLB新闻的网址链接并加入收藏:', url);
  128.                     }
  129.                 }
  130.             });
  131.         });
  132.     </script>

  133. <footer style="text-align: center;">
  134.     <p style="color: white; margin-top: 10px;">
  135.         ©MJJLB新闻主站 - 迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上新闻资讯平台
  136.     </p>
  137. </footer>
  138. </body>
  139. </html>
复制代码

  1. <?php
  2. if (function_exists('error_reporting')) {
  3.     @error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT);
  4. }

  5. if (function_exists('date_default_timezone_set')) {
  6.     @date_default_timezone_set('Asia/Shanghai');
  7. }

  8. if (function_exists('session_start')) {
  9.     if (function_exists('session_id') && !session_id()) {
  10.         @session_start();
  11.     } elseif (!isset($_SESSION)) {
  12.         @session_start();
  13.     }
  14. }

  15. define('DATA_FILE', 'messages.json');
  16. define('REPLY_FILE', 'reply.json');
  17. define('CATEGORY_FILE', 'categories.json');
  18. define('USER_FILE', 'users.json');
  19. define('HITS_FILE', 'hits.json');
  20. define('POLL_FILE', 'poll.json');
  21. define('PAGE_SIZE', 15);
  22. define('ADMIN_PASS', 'Leoben');
  23. define('MAX_CONTENT', 50000);
  24. define('MAX_IMAGE', 10485760);
  25. define('UPLOAD_DIR', 'uploads/');
  26. define('SITE_NAME', '中国迈迷网');
  27. define('SITE_URL', 'http://news.mjjlb.com/mjjstation.php');

  28. if (!function_exists('json_encode')) {
  29.     function json_encode_compat($data) {
  30.         if (is_null($data)) return 'null';
  31.         if ($data === false) return 'false';
  32.         if ($data === true) return 'true';
  33.         if (is_scalar($data)) {
  34.             if (is_float($data)) {
  35.                 return floatval(str_replace(",", ".", strval($data)));
  36.             }
  37.             if (is_string($data)) {
  38.                 static $jsonReplaces = array(array("\", "/", "\n", "\t", "\r", "\b", "\f", '"'), array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '"'));
  39.                 return '"' . str_replace($jsonReplaces[0], $jsonReplaces[1], $data) . '"';
  40.             } else {
  41.                 return $data;
  42.             }
  43.         }
  44.         $isList = true;
  45.         for ($i = 0, reset($data); $i < count($data); $i++, next($data)) {
  46.             if (key($data) !== $i) {
  47.                 $isList = false;
  48.                 break;
  49.             }
  50.         }
  51.         $result = array();
  52.         if ($isList) {
  53.             foreach ($data as $v) $result[] = json_encode_compat($v);
  54.             return '[' . join(',', $result) . ']';
  55.         } else {
  56.             foreach ($data as $k => $v) $result[] = json_encode_compat($k).':'.json_encode_compat($v);
  57.             return '{' . join(',', $result) . '}';
  58.         }
  59.     }
  60.    
  61.     function json_decode_compat($json, $assoc = false) {
  62.         if (trim($json) === '') return null;
  63.         $json = str_replace(array("\n","\r"), "", $json);
  64.         $json = preg_replace('/([{,]+)(\s*)([^"]+?)\s*:/','$1"$3":', $json);
  65.         $json = preg_replace('/(,)\s*}$/', '}', $json);
  66.         
  67.         if (function_exists('json_decode')) {
  68.             return json_decode($json, $assoc);
  69.         }
  70.         
  71.         if ($json[0] === '{') {
  72.             $json = substr($json, 1, -1);
  73.             $parts = explode(',', $json);
  74.             $result = $assoc ? array() : new stdClass();
  75.             foreach ($parts as $part) {
  76.                 if (strpos($part, ':') !== false) {
  77.                     list($key, $value) = explode(':', $part, 2);
  78.                     $key = trim($key, '"\'');
  79.                     $value = trim($value);
  80.                     
  81.                     if ($value[0] === '"') $value = substr($value, 1, -1);
  82.                     elseif ($value === 'true') $value = true;
  83.                     elseif ($value === 'false') $value = false;
  84.                     elseif ($value === 'null') $value = null;
  85.                     elseif (is_numeric($value)) $value = floatval($value);
  86.                     
  87.                     if ($assoc) {
  88.                         $result[$key] = $value;
  89.                     } else {
  90.                         $result->$key = $value;
  91.                     }
  92.                 }
  93.             }
  94.             return $result;
  95.         }
  96.         return null;
  97.     }
  98. }

  99. function read_json($filename, $default = array()) {
  100.     if (!file_exists($filename)) return $default;
  101.     if (!is_readable($filename)) return $default;
  102.     $content = @file_get_contents($filename);
  103.     if ($content === false || trim($content) === '') return $default;
  104.    
  105.     if (function_exists('json_decode')) {
  106.         $data = @json_decode($content, true);
  107.     } else {
  108.         $data = @json_decode_compat($content, true);
  109.     }
  110.    
  111.     return is_array($data) ? $data : $default;
  112. }

  113. function write_json($filename, $data) {
  114.     $dir = dirname($filename);
  115.     if ($dir !== '.' && $dir !== '' && !is_dir($dir)) {
  116.         @mkdir($dir, 0755, true);
  117.     }
  118.    
  119.     if (function_exists('json_encode')) {
  120.         $content = @json_encode($data, JSON_UNESCAPED_UNICODE);
  121.     } else {
  122.         $content = @json_encode_compat($data);
  123.     }
  124.    
  125.     if ($content === false) {
  126.         return false;
  127.     }
  128.    
  129.     $temp_file = $filename . '.tmp.' . uniqid('', true);
  130.     $result = @file_put_contents($temp_file, $content, LOCK_EX);
  131.     if ($result === false) {
  132.         @unlink($temp_file);
  133.         return false;
  134.     }
  135.    
  136.     if (function_exists('json_decode')) {
  137.         $verify = @json_decode(@file_get_contents($temp_file), true);
  138.         if (!is_array($verify)) {
  139.             @unlink($temp_file);
  140.             return false;
  141.         }
  142.     }
  143.    
  144.     $renamed = @rename($temp_file, $filename);
  145.     if (!$renamed) {
  146.         @copy($temp_file, $filename);
  147.         @unlink($temp_file);
  148.     }
  149.    
  150.     return true;
  151. }

  152. function safe_input($str) {
  153.     if (!is_string($str)) return '';
  154.     $str = trim($str);
  155.     if (function_exists('mb_convert_encoding')) {
  156.         $str = @mb_convert_encoding($str, 'UTF-8', 'UTF-8');
  157.     }
  158.     $str = htmlspecialchars($str, ENT_QUOTES, 'UTF-8');
  159.     return $str;
  160. }

  161. function safe_substr($str, $start, $length) {
  162.     if (!is_string($str)) return '';
  163.     if (function_exists('mb_substr')) {
  164.         return mb_substr($str, $start, $length, 'UTF-8');
  165.     }
  166.     return substr($str, $start, $length);
  167. }

  168. function safe_output($str) {
  169.     if (!is_string($str)) return '';
  170.     $str = htmlspecialchars($str, ENT_QUOTES, 'UTF-8');
  171.     $str = nl2br($str);
  172.     $str = preg_replace('/\[b\](.*?)\[\/b\]/i', '<strong>$1</strong>', $str);
  173.     $str = preg_replace('/\[i\](.*?)\[\/i\]/i', '<em>$1</em>', $str);
  174.     $str = preg_replace('/\[u\](.*?)\[\/u\]/i', '<u>$1</u>', $str);
  175.     $str = preg_replace('/\[url\](.*?)\[\/url\]/i', '<a href="$1" target="_blank" rel="nofollow">$1</a>', $str);
  176.     $str = preg_replace('/\[url=(.*?)\](.*?)\[\/url\]/i', '<a href="$1" target="_blank" rel="nofollow">$2</a>', $str);
  177.     $str = preg_replace('/\[img\](.*?)\[\/img\]/i', '<img src="$1" style="max-width:100%;" onclick="showImage(\'$1\')" alt="图片">', $str);
  178.     $str = preg_replace('/\[color=(.*?)\](.*?)\[\/color\]/i', '<span style="color:$1">$2</span>', $str);
  179.     return $str;
  180. }

  181. function generate_captcha() {
  182.     $chars = '23456789ABCDEFGHJKLMNPQRSTUVWXYZ';
  183.     $captcha = '';
  184.     $char_length = strlen($chars);
  185.     for ($i = 0; $i < 4; $i++) {
  186.         $captcha .= $chars[mt_rand(0, $char_length - 1)];
  187.     }
  188.     $_SESSION['captcha'] = $captcha;
  189.     $_SESSION['captcha_time'] = time();
  190.     return $captcha;
  191. }

  192. function validate_image_url($url) {
  193.     $url = trim($url);
  194.     if (empty($url)) return '';
  195.    
  196.     if (!preg_match('#^https?://#i', $url)) return '';
  197.    
  198.     $path = parse_url($url, PHP_URL_PATH);
  199.     if ($path === false || $path === null) return '';
  200.    
  201.     $ext = strtolower(pathinfo($path, PATHINFO_EXTENSION));
  202.     $allowed = array('jpg', 'jpeg', 'png', 'gif', 'webp', 'bmp');
  203.    
  204.     if (in_array($ext, $allowed)) {
  205.         return htmlspecialchars($url, ENT_QUOTES, 'UTF-8');
  206.     }
  207.    
  208.     return '';
  209. }

  210. function is_admin() {
  211.     if (!isset($_SESSION['admin_logged_in']) || $_SESSION['admin_logged_in'] !== true) {
  212.         return false;
  213.     }
  214.     if (isset($_SESSION['admin_login_time']) && (time() - $_SESSION['admin_login_time'] > 86400)) {
  215.         unset($_SESSION['admin_logged_in']);
  216.         unset($_SESSION['admin_login_time']);
  217.         unset($_SESSION['admin_ip']);
  218.         return false;
  219.     }
  220.     return true;
  221. }

  222. function csrf_token() {
  223.     if (!isset($_SESSION['csrf_token']) || !isset($_SESSION['csrf_token_time']) || (time() - $_SESSION['csrf_token_time'] > 3600)) {
  224.         $token_data = uniqid(mt_rand(), true);
  225.         if (isset($_SERVER['REMOTE_ADDR'])) {
  226.             $token_data .= $_SERVER['REMOTE_ADDR'];
  227.         }
  228.         if (isset($_SERVER['HTTP_USER_AGENT'])) {
  229.             $token_data .= $_SERVER['HTTP_USER_AGENT'];
  230.         }
  231.         $_SESSION['csrf_token'] = md5($token_data);
  232.         $_SESSION['csrf_token_time'] = time();
  233.     }
  234.     return $_SESSION['csrf_token'];
  235. }

  236. function verify_csrf($token) {
  237.     if (!isset($_SESSION['csrf_token']) || !isset($_SESSION['csrf_token_time'])) {
  238.         return false;
  239.     }
  240.    
  241.     if ((time() - $_SESSION['csrf_token_time'] > 3600)) {
  242.         unset($_SESSION['csrf_token']);
  243.         unset($_SESSION['csrf_token_time']);
  244.         return false;
  245.     }
  246.    
  247.     return hash_equals($_SESSION['csrf_token'], (string)$token);
  248. }

  249. function get_category_name($id) {
  250.     $categories = array(
  251.         1 => array('id' => 1, 'name' => '综合新闻', 'color' => '#3366CC'),
  252.         2 => array('id' => 2, 'name' => '活动公告', 'color' => '#CC3300'),
  253.         3 => array('id' => 3, 'name' => '迈迷动态', 'color' => '#339933'),
  254.         4 => array('id' => 4, 'name' => '音乐作品', 'color' => '#9966CC'),
  255.         5 => array('id' => 5, 'name' => '慈善事业', 'color' => '#FF9900'),
  256.         6 => array('id' => 6, 'name' => '历史回顾', 'color' => '#663300')
  257.     );
  258.    
  259.     return isset($categories[$id]) ? $categories[$id]['name'] : '未分类';
  260. }

  261. function get_category_color($id) {
  262.     $categories = array(
  263.         1 => array('id' => 1, 'name' => '综合新闻', 'color' => '#3366CC'),
  264.         2 => array('id' => 2, 'name' => '活动公告', 'color' => '#CC3300'),
  265.         3 => array('id' => 3, 'name' => '迈迷动态', 'color' => '#339933'),
  266.         4 => array('id' => 4, 'name' => '音乐作品', 'color' => '#9966CC'),
  267.         5 => array('id' => 5, 'name' => '慈善事业', 'color' => '#FF9900'),
  268.         6 => array('id' => 6, 'name' => '历史回顾', 'color' => '#663300')
  269.     );
  270.    
  271.     return isset($categories[$id]) ? $categories[$id]['color'] : '#666666';
  272. }

  273. function format_time($time) {
  274.     if (empty($time)) return '未知时间';
  275.     $timestamp = strtotime($time);
  276.     if ($timestamp === false) return '未知时间';
  277.    
  278.     $diff = time() - $timestamp;
  279.     if ($diff < 60) return '刚刚';
  280.     if ($diff < 3600) return floor($diff / 60) . '分钟前';
  281.     if ($diff < 86400) return floor($diff / 3600) . '小时前';
  282.     if ($diff < 604800) return floor($diff / 86400) . '天前';
  283.     return date('Y-m-d H:i', $timestamp);
  284. }

  285. function generate_page_links($current_page, $total_pages, $url = '') {
  286.     if ($total_pages <= 1) return '';
  287.    
  288.     $current_page = max(1, min($current_page, $total_pages));
  289.     $links = '<div class="pagination">';
  290.    
  291.     if ($current_page > 1) {
  292.         $links .= '<a href="?page=1'.$url.'" class="page-first">首页</a>';
  293.         $links .= '<a href="?page='.($current_page - 1).$url.'" class="page-prev">上一页</a>';
  294.     }
  295.    
  296.     $start = max(1, $current_page - 3);
  297.     $end = min($total_pages, $start + 6);
  298.    
  299.     if ($end - $start < 6) {
  300.         $start = max(1, $end - 6);
  301.     }
  302.    
  303.     if ($start > 1) {
  304.         $links .= '<span class="page-ellipsis">...</span>';
  305.     }
  306.    
  307.     for ($i = $start; $i <= $end; $i++) {
  308.         if ($i == $current_page) {
  309.             $links .= '<span class="page-current">'.$i.'</span>';
  310.         } else {
  311.             $links .= '<a href="?page='.$i.$url.'" class="page-link">'.$i.'</a>';
  312.         }
  313.     }
  314.    
  315.     if ($end < $total_pages) {
  316.         $links .= '<span class="page-ellipsis">...</span>';
  317.     }
  318.    
  319.     if ($current_page < $total_pages) {
  320.         $links .= '<a href="?page='.($current_page + 1).$url.'" class="page-next">下一页</a>';
  321.         $links .= '<a href="?page='.$total_pages.$url.'" class="page-last">尾页</a>';
  322.     }
  323.    
  324.     $links .= '</div>';
  325.     return $links;
  326. }

  327. function get_client_ip() {
  328.     $ip = '0.0.0.0';
  329.     if (isset($_SERVER['HTTP_CLIENT_IP'])) {
  330.         $ip = $_SERVER['HTTP_CLIENT_IP'];
  331.     } elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
  332.         $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
  333.     } elseif (isset($_SERVER['REMOTE_ADDR'])) {
  334.         $ip = $_SERVER['REMOTE_ADDR'];
  335.     }
  336.     $ip = filter_var($ip, FILTER_VALIDATE_IP) ? $ip : '0.0.0.0';
  337.     return preg_replace('/[^0-9a-fA-F.:]/', '', $ip);
  338. }

  339. if (!isset($_SESSION['captcha']) || !isset($_SESSION['captcha_time']) || (time() - $_SESSION['captcha_time'] > 300)) {
  340.     generate_captcha();
  341. }

  342. $hits = read_json(HITS_FILE, array('total' => 0, 'today' => 0, 'date' => date('Y-m-d')));
  343. $hits['total']++;
  344. if ($hits['date'] !== date('Y-m-d')) {
  345.     $hits['today'] = 1;
  346.     $hits['date'] = date('Y-m-d');
  347. } else {
  348.     $hits['today']++;
  349. }
  350. write_json(HITS_FILE, $hits);

  351. $view_detail = isset($_GET['view']) ? intval($_GET['view']) : 0;
  352. $detail_news = null;

  353. $messages = read_json(DATA_FILE);

  354. if ($view_detail > 0) {
  355.     if (isset($messages[$view_detail])) {
  356.         $detail_news = $messages[$view_detail];
  357.         $detail_news['id'] = $view_detail;
  358.         
  359.         $detail_news['views'] = isset($detail_news['views']) ? intval($detail_news['views']) + 1 : 1;
  360.         $messages[$view_detail]['views'] = $detail_news['views'];
  361.         write_json(DATA_FILE, $messages);
  362.     }
  363. }

  364. $poll = read_json(POLL_FILE, array(
  365.     'question' => '杰克逊对你来说意味着什么?',
  366.     'options' => array(
  367.         1 => '偶像',
  368.         2 => '亲人',
  369.         3 => '伟人',
  370.         4 => '导师',
  371.         5 => '神'
  372.     ),
  373.     'votes' => array(1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0),
  374.     'total' => 0,
  375.     'voters' => array()
  376. ));

  377. $poll_message = '';
  378. $poll_show_result = false;

  379. if ($_SERVER['REQUEST_METHOD'] === 'POST') {
  380.     $action = isset($_POST['action']) ? $_POST['action'] : '';
  381.    
  382.     if ($action === 'poll_vote') {
  383.         $option = isset($_POST['poll_option']) ? intval($_POST['poll_option']) : 0;
  384.         $ip = get_client_ip();
  385.         
  386.         if ($option < 1 || $option > 5) {
  387.             $poll_message = '请选择有效的选项';
  388.         } elseif (isset($poll['voters'][$ip]) && (time() - $poll['voters'][$ip]) < 86400) {
  389.             $poll_message = '您今天已经投过票了,请明天再来';
  390.             $poll_show_result = true;
  391.         } else {
  392.             $poll['votes'][$option]++;
  393.             $poll['total']++;
  394.             $poll['voters'][$ip] = time();
  395.             write_json(POLL_FILE, $poll);
  396.             $poll_message = '投票成功,感谢您的参与!';
  397.             $poll_show_result = true;
  398.         }
  399.     }
  400.    
  401.     elseif ($action === 'poll_view') {
  402.         $poll_show_result = true;
  403.     }
  404.    
  405.     elseif ($action === 'post_message') {
  406.         if (!isset($_POST['csrf_token']) || !verify_csrf($_POST['csrf_token'])) {
  407.             die('<script>alert("安全验证失败,请刷新页面重试");location.href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '";</script>');
  408.         }

  409.         $name = isset($_POST['name']) ? safe_input(safe_substr($_POST['name'], 0, 50)) : '';
  410.         $content = isset($_POST['content']) ? safe_input(safe_substr($_POST['content'], 0, MAX_CONTENT)) : '';
  411.         $image = isset($_POST['image']) ? validate_image_url($_POST['image']) : '';
  412.         $cat_id = isset($_POST['cat_id']) ? intval($_POST['cat_id']) : 1;
  413.         $cat_id = max(1, min(6, $cat_id));
  414.         $captcha = isset($_POST['captcha']) ? strtoupper(trim($_POST['captcha'])) : '';
  415.         $session_captcha = isset($_SESSION['captcha']) ? strtoupper($_SESSION['captcha']) : '';
  416.         
  417.         if (empty($captcha) || $captcha !== $session_captcha || !isset($_SESSION['captcha_time']) || (time() - $_SESSION['captcha_time'] > 300)) {
  418.             generate_captcha();
  419.             die('<script>alert("验证码错误或已过期");history.back();</script>');
  420.         }
  421.         
  422.         if (empty($name) || empty($content)) {
  423.             die('<script>alert("标题和内容不能为空");history.back();</script>');
  424.         }
  425.         
  426.         $id = 1;
  427.         if (!empty($messages)) {
  428.             $ids = array_keys($messages);
  429.             $id = max($ids) + 1;
  430.         }
  431.         
  432.         $messages[$id] = array(
  433.             'id' => $id,
  434.             'name' => $name,
  435.             'content' => $content,
  436.             'image' => $image,
  437.             'cat_id' => $cat_id,
  438.             'time' => date('Y-m-d H:i:s'),
  439.             'like' => 0,
  440.             'dislike' => 0,
  441.             'views' => 0,
  442.             'replies' => 0,
  443.             'ip' => get_client_ip(),
  444.             'top' => 0
  445.         );
  446.         
  447.         if (write_json(DATA_FILE, $messages)) {
  448.             generate_captcha();
  449.             header('Location: ' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?success=1');
  450.             exit;
  451.         } else {
  452.             die('<script>alert("保存失败,请重试");history.back();</script>');
  453.         }
  454.     }
  455.    
  456.     elseif ($action === 'vote') {
  457.         if (!isset($_POST['csrf_token']) || !verify_csrf($_POST['csrf_token'])) {
  458.             die('安全验证失败');
  459.         }
  460.         
  461.         $id = isset($_POST['id']) ? intval($_POST['id']) : 0;
  462.         $type = (isset($_POST['type']) && $_POST['type'] === 'like') ? 'like' : 'dislike';
  463.         
  464.         $vote_key = 'vote_' . $id;
  465.         if (isset($_SESSION[$vote_key])) {
  466.             $redirect_url = isset($_POST['redirect']) ? $_POST['redirect'] : '?page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1);
  467.             header('Location: ' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . $redirect_url . '#msg-' . $id);
  468.             exit;
  469.         }
  470.         
  471.         $messages = read_json(DATA_FILE);
  472.         if (isset($messages[$id])) {
  473.             $messages[$id][$type] = isset($messages[$id][$type]) ? intval($messages[$id][$type]) + 1 : 1;
  474.             if (write_json(DATA_FILE, $messages)) {
  475.                 $_SESSION[$vote_key] = true;
  476.             }
  477.         }
  478.         
  479.         $redirect_url = isset($_POST['redirect']) ? $_POST['redirect'] : '?page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1);
  480.         header('Location: ' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . $redirect_url . '#msg-' . $id);
  481.         exit;
  482.     }
  483.    
  484.     elseif ($action === 'post_reply') {
  485.         if (!isset($_POST['csrf_token']) || !verify_csrf($_POST['csrf_token'])) {
  486.             die('安全验证失败');
  487.         }
  488.         
  489.         $pid = isset($_POST['pid']) ? intval($_POST['pid']) : 0;
  490.         $rname = isset($_POST['rname']) ? safe_input(safe_substr($_POST['rname'], 0, 20)) : '';
  491.         $rcontent = isset($_POST['rcontent']) ? safe_input(safe_substr($_POST['rcontent'], 0, 1000)) : '';
  492.         
  493.         if (empty($rname) || empty($rcontent)) {
  494.             die('<script>alert("昵称和回复内容不能为空");history.back();</script>');
  495.         }
  496.         
  497.         if (!isset($messages[$pid])) {
  498.             die('<script>alert("留言不存在");history.back();</script>');
  499.         }
  500.         
  501.         $messages[$pid]['replies'] = isset($messages[$pid]['replies']) ? intval($messages[$pid]['replies']) + 1 : 1;
  502.         write_json(DATA_FILE, $messages);
  503.         
  504.         $reply = read_json(REPLY_FILE);
  505.         $rid = 1;
  506.         if (!empty($reply)) {
  507.             $ids = array_keys($reply);
  508.             $rid = max($ids) + 1;
  509.         }
  510.         
  511.         $reply[$rid] = array(
  512.             'id' => $rid,
  513.             'pid' => $pid,
  514.             'name' => $rname,
  515.             'content' => $rcontent,
  516.             'time' => date('Y-m-d H:i:s'),
  517.             'ip' => get_client_ip()
  518.         );
  519.         
  520.         if (write_json(REPLY_FILE, $reply)) {
  521.             $redirect_url = isset($_POST['redirect']) ? $_POST['redirect'] : '?page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1);
  522.             header('Location: ' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . $redirect_url . '#msg-' . $pid);
  523.             exit;
  524.         } else {
  525.             die('<script>alert("回复失败,请重试");history.back();</script>');
  526.         }
  527.     }
  528.    
  529.     elseif ($action === 'admin_login') {
  530.         $password = isset($_POST['password']) ? $_POST['password'] : '';
  531.         if (hash_equals(ADMIN_PASS, $password)) {
  532.             $_SESSION['admin_logged_in'] = true;
  533.             $_SESSION['admin_login_time'] = time();
  534.             $_SESSION['admin_ip'] = get_client_ip();
  535.             header('Location: ' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'));
  536.             exit;
  537.         } else {
  538.             die('<script>alert("密码错误");history.back();</script>');
  539.         }
  540.     }
  541.    
  542.     elseif ($action === 'admin_logout') {
  543.         unset($_SESSION['admin_logged_in']);
  544.         unset($_SESSION['admin_login_time']);
  545.         unset($_SESSION['admin_ip']);
  546.         header('Location: ' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'));
  547.         exit;
  548.     }
  549.    
  550.     elseif ($action === 'delete_message' && is_admin()) {
  551.         if (!isset($_POST['csrf_token']) || !verify_csrf($_POST['csrf_token'])) {
  552.             die('安全验证失败');
  553.         }
  554.         
  555.         $id = isset($_POST['id']) ? intval($_POST['id']) : 0;
  556.         $messages = read_json(DATA_FILE);
  557.         
  558.         if (isset($messages[$id])) {
  559.             unset($messages[$id]);
  560.             if (write_json(DATA_FILE, $messages)) {
  561.                 $reply = read_json(REPLY_FILE);
  562.                 foreach ($reply as $rid => $r) {
  563.                     if (isset($r['pid']) && $r['pid'] == $id) {
  564.                         unset($reply[$rid]);
  565.                     }
  566.                 }
  567.                 write_json(REPLY_FILE, $reply);
  568.             }
  569.         }
  570.         
  571.         header('Location: ' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'));
  572.         exit;
  573.     }
  574.    
  575.     elseif ($action === 'delete_reply' && is_admin()) {
  576.         if (!isset($_POST['csrf_token']) || !verify_csrf($_POST['csrf_token'])) {
  577.             die('安全验证失败');
  578.         }
  579.         
  580.         $rid = isset($_POST['rid']) ? intval($_POST['rid']) : 0;
  581.         $reply = read_json(REPLY_FILE);
  582.         
  583.         if (isset($reply[$rid])) {
  584.             $pid = $reply[$rid]['pid'];
  585.             unset($reply[$rid]);
  586.             if (write_json(REPLY_FILE, $reply)) {
  587.                 $messages = read_json(DATA_FILE);
  588.                 if (isset($messages[$pid])) {
  589.                     $reply_count = 0;
  590.                     foreach ($reply as $r) {
  591.                         if (isset($r['pid']) && $r['pid'] == $pid) {
  592.                             $reply_count++;
  593.                         }
  594.                     }
  595.                     $messages[$pid]['replies'] = $reply_count;
  596.                     write_json(DATA_FILE, $messages);
  597.                 }
  598.             }
  599.         }
  600.         
  601.         $redirect_url = isset($_POST['redirect']) ? $_POST['redirect'] : '';
  602.         header('Location: ' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . $redirect_url);
  603.         exit;
  604.     }
  605.    
  606.     elseif ($action === 'set_top' && is_admin()) {
  607.         if (!isset($_POST['csrf_token']) || !verify_csrf($_POST['csrf_token'])) {
  608.             die('安全验证失败');
  609.         }
  610.         
  611.         $id = isset($_POST['id']) ? intval($_POST['id']) : 0;
  612.         $top = isset($_POST['top']) ? intval($_POST['top']) : 0;
  613.         $top = $top == 1 ? 1 : 0;
  614.         
  615.         $messages = read_json(DATA_FILE);
  616.         if (isset($messages[$id])) {
  617.             $messages[$id]['top'] = $top;
  618.             if (write_json(DATA_FILE, $messages)) {
  619.                 $redirect_url = isset($_POST['redirect']) ? $_POST['redirect'] : '?page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1);
  620.                 header('Location: ' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . $redirect_url);
  621.                 exit;
  622.             }
  623.         }
  624.         
  625.         header('Location: ' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'));
  626.         exit;
  627.     }
  628. }

  629. $messages = read_json(DATA_FILE);

  630. $top_messages = array();
  631. $normal_messages = array();

  632. foreach ($messages as $id => $msg) {
  633.     $msg['id'] = $id;
  634.     if (isset($msg['top']) && $msg['top'] == 1) {
  635.         $top_messages[$id] = $msg;
  636.     } else {
  637.         $normal_messages[$id] = $msg;
  638.     }
  639. }

  640. function sort_by_time($a, $b) {
  641.     $time_a = isset($a['time']) ? strtotime($a['time']) : 0;
  642.     $time_b = isset($b['time']) ? strtotime($b['time']) : 0;
  643.     return $time_b - $time_a;
  644. }

  645. uasort($top_messages, 'sort_by_time');
  646. uasort($normal_messages, 'sort_by_time');

  647. $all_messages = $top_messages + $normal_messages;
  648. $total = count($all_messages);

  649. $page = isset($_GET['page']) ? intval($_GET['page']) : 1;
  650. $page = max(1, $page);
  651. $total_pages = max(1, ceil($total / PAGE_SIZE));
  652. $page = min($page, $total_pages);
  653. $offset = ($page - 1) * PAGE_SIZE;
  654. $list = array_slice($all_messages, $offset, PAGE_SIZE, true);

  655. $reply = read_json(REPLY_FILE);

  656. $cat_filter = 0;
  657. if (isset($_GET['cat']) && is_numeric($_GET['cat']) && !$view_detail) {
  658.     $cat_filter = intval($_GET['cat']);
  659.     $cat_filter = max(1, min(6, $cat_filter));
  660.    
  661.     $filtered_messages = array();
  662.     foreach ($all_messages as $id => $msg) {
  663.         if (isset($msg['cat_id']) && $msg['cat_id'] == $cat_filter) {
  664.             $filtered_messages[$id] = $msg;
  665.         }
  666.     }
  667.     $all_messages = $filtered_messages;
  668.     $total = count($all_messages);
  669.     $total_pages = max(1, ceil($total / PAGE_SIZE));
  670.     $page = min($page, $total_pages);
  671.     $offset = ($page - 1) * PAGE_SIZE;
  672.     $list = array_slice($all_messages, $offset, PAGE_SIZE, true);
  673. }

  674. if (isset($_GET['refresh_captcha'])) {
  675.     echo generate_captcha();
  676.     exit;
  677. }

  678. $hot_messages = read_json(DATA_FILE);
  679. $hot_list = array();
  680. if (!empty($hot_messages)) {
  681.     foreach ($hot_messages as $mid => $m) {
  682.         $m['id'] = $mid;
  683.         $hot_list[] = $m;
  684.     }
  685.     usort($hot_list, function($a, $b) {
  686.         $a_views = isset($a['views']) ? intval($a['views']) : 0;
  687.         $b_views = isset($b['views']) ? intval($b['views']) : 0;
  688.         return $b_views - $a_views;
  689.     });
  690. }

  691. $new_replies = read_json(REPLY_FILE);
  692. $reply_list = array();
  693. if (!empty($new_replies)) {
  694.     foreach ($new_replies as $rid => $r) {
  695.         $reply_list[] = $r;
  696.     }
  697.     $reply_list = array_reverse($reply_list);
  698. }
  699. ?>
  700. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  701. <html xmlns="http://www.w3.org/1999/xhtml">
  702. <head>
  703. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  704. <title><?php echo $view_detail && $detail_news ? safe_output($detail_news['name']) . ' - ' . SITE_NAME : SITE_NAME; ?> - MJJLB新闻主站</title>
  705. <meta name="Keywords" content="迈克尔, 杰克逊, 中国迈迷网站, 中文歌迷网站, 迈克尔杰克逊, 迈克尔·杰克逊, 麥可傑克森, 傑克森, 麥可, Michael, Jackson, King of Pop, Michael Jackson, Chinese fanclub, fanclub, 歌迷, 中国迈迷网, MJJLB, MJ, 爱MJJ的烙饼, 偶像, 音乐, 流行音乐之王, 流行之王, 米高積遜, 積遜, 米高, 娱乐, 欧美音乐" />
  706. <meta name="Description" content="中国迈迷网成立于2025年1月12日,是迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上平台,也是一个集MJ资讯共享与MJ文化传播为一体的迈迷庇护所。" />
  707. <link rel="shortcut icon" href="http://news.mjjlb.com/mjjlb.png" />
  708. <style type="text/css">
  709. * { margin:0; padding:0; }
  710. body { font:12px/1.6 "Microsoft YaHei","宋体",Arial; background:#E8F0F8; color:#333; }
  711. a { color:#3366CC; text-decoration:none; }
  712. a:hover { color:#FF6600; text-decoration:underline; }
  713. img { border:0; }
  714. .clear { clear:both; height:0; overflow:hidden; }

  715. .container { width:980px; margin:0 auto; background:#FFF; }

  716. .topbar { height:28px; line-height:28px; background:#F0F4F8; border-bottom:1px solid #D0D8E0; font-size:11px; color:#666; }
  717. .topbar-left { float:left; padding-left:10px; }
  718. .topbar-right { float:right; padding-right:10px; }
  719. .topbar-right a { color:#3366CC; margin-left:10px; }

  720. .header { height:80px; background:#FFF; position:relative; }
  721. .logo { position:absolute; left:10px; top:10px; }
  722. .logo img { height:60px; }
  723. .site-title { position:absolute; left:180px; top:15px; font-size:24px; font-weight:bold; color:#3366CC; }
  724. .site-desc { position:absolute; left:180px; top:45px; font-size:12px; color:#666; }

  725. .main-nav { height:36px; background:#3366CC; border-bottom:2px solid #2244AA; }
  726. .main-nav ul { list-style:none; height:36px; }
  727. .main-nav li { float:left; height:36px; line-height:36px; border-right:1px solid #4477DD; }
  728. .main-nav a { display:block; padding:0 20px; color:#FFF; font-size:14px; font-weight:bold; }
  729. .main-nav a:hover, .main-nav .current { background:#2255BB; text-decoration:none; }

  730. .sub-nav { height:30px; line-height:30px; background:#F5F8FC; border-bottom:1px solid #E0E8F0; padding:0 10px; }
  731. .sub-nav a { color:#3366CC; margin-right:15px; font-size:12px; }
  732. .sub-nav .current { color:#FF6600; font-weight:bold; }

  733. .main { padding:10px; overflow:hidden; }

  734. .left-sidebar { float:left; width:220px; }
  735. .main-content { float:left; width:520px; margin:0 10px; }
  736. .right-sidebar { float:right; width:200px; }

  737. .box { border:1px solid #B8D0E8; margin-bottom:10px; background:#FFF; }
  738. .box-title { height:28px; line-height:28px; background:#E8F0F8; border-bottom:1px solid #B8D0E8; padding:0 10px; font-weight:bold; color:#3366CC; font-size:13px; position:relative; }
  739. .box-title .more { position:absolute; right:10px; top:0; font-weight:normal; font-size:11px; }
  740. .box-content { padding:8px; }

  741. .news-list { list-style:none; }
  742. .news-list li { padding:6px 0; border-bottom:1px dotted #E0E8F0; line-height:1.5; }
  743. .news-list li:last-child { border-bottom:none; }
  744. .news-list .title { color:#333; display:block; margin-bottom:2px; }
  745. .news-list .meta { color:#999; font-size:11px; }
  746. .news-list .hot { color:#FF6600; font-weight:bold; }

  747. .focus-news { margin-bottom:10px; }
  748. .focus-image { width:100%; height:200px; overflow:hidden; margin-bottom:8px; text-align:center; background:#F5F8FC; }
  749. .focus-image img { max-width:100%; max-height:200px; }
  750. .focus-title { font-size:14px; font-weight:bold; color:#3366CC; margin-bottom:5px; text-align:center; }
  751. .focus-summary { color:#666; font-size:12px; line-height:1.6; }

  752. .section-title { height:26px; line-height:26px; background:#F0F4F8; border-left:4px solid #3366CC; padding-left:10px; font-weight:bold; color:#3366CC; margin-bottom:8px; font-size:13px; position:relative; }
  753. .section-title .more { position:absolute; right:0; top:0; font-weight:normal; font-size:11px; }

  754. .news-item { padding:8px 0; border-bottom:1px dotted #E0E8E8; }
  755. .news-item:last-child { border-bottom:none; }
  756. .news-item .title { font-size:13px; font-weight:bold; color:#3366CC; margin-bottom:4px; }
  757. .news-item .title a { color:#3366CC; }
  758. .news-item .title a:hover { color:#FF6600; }
  759. .news-item .summary { color:#666; font-size:12px; line-height:1.6; margin-bottom:4px; }
  760. .news-item .meta { color:#999; font-size:11px; }
  761. .news-item .meta span { margin-right:10px; }
  762. .news-item .thumb { float:left; width:80px; height:60px; margin-right:10px; overflow:hidden; }
  763. .news-item .thumb img { width:80px; height:60px; object-fit:cover; }
  764. .news-item .content { overflow:hidden; }

  765. .category-tag { display:inline-block; padding:1px 5px; background:#3366CC; color:#FFF; font-size:10px; margin-right:5px; border-radius:2px; }

  766. .top-news { background:#FFF8E1; border:1px solid #FFE4B5; padding:8px; margin-bottom:10px; }
  767. .top-news .label { color:#FF6600; font-weight:bold; margin-right:5px; }

  768. .admin-panel { background:#FFF3E0; border:1px solid #FFB74D; padding:8px; margin-bottom:10px; }
  769. .admin-panel a { color:#E65100; margin-right:10px; }

  770. .pagination { text-align:center; margin:15px 0; padding:10px; background:#F5F8FC; border:1px solid #E0E8F0; }
  771. .pagination-info { color:#666; margin-bottom:8px; font-size:11px; }
  772. .pagination a, .pagination span { display:inline-block; padding:4px 10px; margin:0 2px; border:1px solid #B8D0E8; background:#FFF; color:#3366CC; font-size:12px; }
  773. .pagination a:hover { background:#3366CC; color:#FFF; border-color:#3366CC; text-decoration:none; }
  774. .pagination .current { background:#3366CC; color:#FFF; border-color:#3366CC; }
  775. .pagination .disabled { color:#999; background:#F5F5F5; cursor:not-allowed; }

  776. .post-form { background:#F8FAFC; border:1px solid #D0D8E0; padding:15px; margin-bottom:10px; }
  777. .form-row { margin-bottom:10px; overflow:hidden; }
  778. .form-label { float:left; width:70px; text-align:right; padding-right:10px; line-height:26px; color:#666; }
  779. .form-field { margin-left:80px; }
  780. .form-input { width:300px; padding:4px; border:1px solid #B8D0E8; }
  781. .form-textarea { width:400px; height:100px; padding:4px; border:1px solid #B8D0E8; font-family:"Microsoft YaHei","宋体",Arial; }
  782. .form-select { padding:3px; border:1px solid #B8D0E8; }
  783. .captcha-box { background:#3366CC; color:#FFF; font-size:16px; font-weight:bold; padding:3px 8px; display:inline-block; letter-spacing:2px; margin-right:10px; }
  784. .form-btn { background:#3366CC; color:#FFF; border:none; padding:5px 15px; cursor:pointer; }
  785. .form-btn:hover { background:#2255BB; }

  786. .reply-box { background:#F5F8FC; border:1px solid #E0E8F0; padding:10px; margin-top:8px; display:none; }
  787. .reply-list { margin-top:8px; }
  788. .reply-item { background:#FAFBFC; border:1px solid #E8EDF2; padding:8px; margin-bottom:5px; }
  789. .reply-header { color:#666; font-size:11px; margin-bottom:3px; }
  790. .reply-content { color:#333; line-height:1.5; }

  791. .detail-container { background:#FFF; }
  792. .detail-header { border-bottom:2px solid #3366CC; padding-bottom:10px; margin-bottom:15px; }
  793. .detail-title { font-size:18px; font-weight:bold; color:#333; margin-bottom:10px; }
  794. .detail-meta { color:#666; font-size:12px; padding:8px; background:#F5F8FC; }
  795. .detail-content { padding:15px; line-height:1.8; font-size:14px; color:#333; }
  796. .detail-content img { max-width:100%; margin:10px 0; }
  797. .detail-footer { margin-top:20px; padding-top:15px; border-top:1px dashed #D0D8E0; text-align:center; }

  798. .footer { background:#F0F4F8; border-top:2px solid #3366CC; padding:20px; margin-top:10px; text-align:center; color:#666; font-size:12px; line-height:2; }
  799. .footer-links { margin-bottom:10px; }
  800. .footer-links a { color:#3366CC; margin:0 10px; }
  801. .footer-copyright { color:#999; }

  802. .modal { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); z-index:9999; }
  803. .modal img { max-width:90%; max-height:90%; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); }

  804. .login-box { background:#FFF8E1; border:1px solid #FFE4B5; padding:10px; margin-bottom:10px; display:none; }

  805. .poll-message { background:#E3F2FD; border:1px solid #90CAF9; color:#1565C0; padding:8px; margin-bottom:10px; text-align:center; }
  806. .poll-result { margin:10px 0; }
  807. .poll-bar { height:20px; background:#E8F0F8; margin:5px 0; position:relative; }
  808. .poll-fill { height:20px; background:#3366CC; }
  809. .poll-text { position:absolute; left:5px; top:0; line-height:20px; color:#333; font-size:11px; }
  810. .poll-count { position:absolute; right:5px; top:0; line-height:20px; color:#666; font-size:11px; }
  811. .poll-total { text-align:center; color:#666; margin-top:10px; font-size:11px; }

  812. .bottom-bar { background:#F5F8FC; border:1px solid #E0E8F0; padding:10px; margin:15px 0; text-align:center; color:#666; font-size:11px; }
  813. .bottom-bar a { color:#3366CC; margin:0 5px; }
  814. </style>
  815. <script type="text/javascript">
  816. function toggleReplyBox(id) {
  817.     var box = document.getElementById('replybox-' + id);
  818.     if (box.style.display == 'block') {
  819.         box.style.display = 'none';
  820.     } else {
  821.         var allBoxes = document.querySelectorAll('.reply-box');
  822.         for (var i = 0; i < allBoxes.length; i++) {
  823.             allBoxes[i].style.display = 'none';
  824.         }
  825.         box.style.display = 'block';
  826.     }
  827.     return false;
  828. }

  829. function refreshCaptcha() {
  830.     var xhr = new XMLHttpRequest();
  831.     xhr.open('GET', '?refresh_captcha=1&t=' + new Date().getTime(), true);
  832.     xhr.onreadystatechange = function() {
  833.         if (xhr.readyState == 4 && xhr.status == 200) {
  834.             document.getElementById('captcha').innerHTML = xhr.responseText;
  835.         }
  836.     };
  837.     xhr.send();
  838.     return false;
  839. }

  840. function showImage(src) {
  841.     document.getElementById('modalImage').src = src;
  842.     document.getElementById('imageModal').style.display = 'block';
  843. }

  844. function closeModal() {
  845.     document.getElementById('imageModal').style.display = 'none';
  846. }

  847. function submitVote(form) {
  848.     var xhr = new XMLHttpRequest();
  849.     xhr.open('POST', '', true);
  850.     xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
  851.     xhr.onreadystatechange = function() {
  852.         if (xhr.readyState == 4 && xhr.status == 200) {
  853.             window.location.reload();
  854.         }
  855.     };
  856.     var params = [];
  857.     for (var i = 0; i < form.elements.length; i++) {
  858.         var e = form.elements[i];
  859.         if (e.name) params.push(encodeURIComponent(e.name) + '=' + encodeURIComponent(e.value));
  860.     }
  861.     xhr.send(params.join('&'));
  862.     return false;
  863. }

  864. function toggleLogin() {
  865.     var box = document.getElementById('loginBox');
  866.     box.style.display = box.style.display == 'block' ? 'none' : 'block';
  867. }

  868. window.onload = function() {
  869.     var captchaInput = document.querySelector('input[name="captcha"]');
  870.     if (captchaInput) {
  871.         captchaInput.oninput = function() {
  872.             this.value = this.value.toUpperCase().replace(/[^A-Z0-9]/g, '');
  873.         };
  874.     }
  875.    
  876.     document.getElementById('imageModal').onclick = function(e) {
  877.         if (e.target == this) closeModal();
  878.     };
  879.    
  880.     document.onkeydown = function(e) {
  881.         e = e || window.event;
  882.         if (e.keyCode == 27) closeModal();
  883.     };
  884.    
  885.     if (window.location.hash) {
  886.         var el = document.getElementById(window.location.hash.substring(1));
  887.         if (el) setTimeout(function() { el.scrollIntoView(); }, 100);
  888.     }
  889.    
  890.     var successMsg = document.querySelector('.success-msg');
  891.     if (successMsg) {
  892.         setTimeout(function() {
  893.             successMsg.style.display = 'none';
  894.         }, 5000);
  895.     }
  896. };

  897. function validateForm(form) {
  898.     var name = form.querySelector('input[name="name"], input[name="rname"]');
  899.     if (name && name.value.trim().length < 2) {
  900.         alert('名称至少需要2个字符');
  901.         name.focus();
  902.         return false;
  903.     }
  904.     var content = form.querySelector('textarea[name="content"], textarea[name="rcontent"]');
  905.     if (content && content.value.trim().length < 5) {
  906.         alert('内容至少需要5个字符');
  907.         content.focus();
  908.         return false;
  909.     }
  910.     var captcha = form.querySelector('input[name="captcha"]');
  911.     if (captcha && captcha.value.length != 4) {
  912.         alert('请输入4位验证码');
  913.         captcha.focus();
  914.         return false;
  915.     }
  916.     return true;
  917. }

  918. function pollVote() {
  919.     var options = document.getElementsByName('poll_option');
  920.     var selected = false;
  921.     for (var i = 0; i < options.length; i++) {
  922.         if (options[i].checked) {
  923.             selected = true;
  924.             break;
  925.         }
  926.     }
  927.     if (!selected) {
  928.         alert('请选择一个选项');
  929.         return false;
  930.     }
  931.     return true;
  932. }
  933. </script>
  934. </head>
  935. <body>
  936. <div class="modal" id="imageModal"><img id="modalImage" src="" alt="" /></div>

  937. <div class="container">
  938.     <div class="topbar">
  939.         <div class="topbar-left">北京时间:<?php echo date('Y年n月j日 l'); ?></div>
  940.         <div class="topbar-right">
  941.             <?php if (is_admin()): ?>
  942.                 欢迎,管理员 | <a href="javascript:void(0)" onclick="document.getElementById('logoutForm').submit()">退出</a>
  943.                 <form id="logoutForm" method="post" style="display:none;">
  944.                     <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  945.                     <input type="hidden" name="action" value="admin_logout">
  946.                 </form>
  947.             <?php else: ?>
  948.                 <a href="javascript:void(0)" onclick="toggleLogin()">管理员登录</a>
  949.             <?php endif; ?>
  950.             | <a href="http://forum.mjjlb.com/mjjcfpw/member.php?mod=register">会员注册</a>
  951.             | <a href="http://mjjcfpw.mjjlb.com">网站地图</a>
  952.             | <a href="http://blog.mjjlb.com/wechat.html">联系方式</a>
  953.         </div>
  954.         <div class="clear"></div>
  955.     </div>
  956.    
  957.     <div class="header">
  958.         <div class="logo"><img src="http://news.mjjlb.com/Logo.png" alt="<?php echo SITE_NAME; ?>" onerror="this.style.display='none'" /></div>
  959.         <div class="site-title"><?php echo SITE_NAME; ?></div>
  960.         <div class="site-desc">迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上平台</div>
  961.     </div>
  962.    
  963.     <div class="main-nav">
  964.         <ul>
  965.             <li><a href="?" <?php echo !$view_detail && $cat_filter == 0 ? 'class="current"' : ''; ?>>网站首页</a></li>
  966.             <li><a href="?cat=1" <?php echo $cat_filter == 1 ? 'class="current"' : ''; ?>>综合新闻</a></li>
  967.             <li><a href="?cat=2" <?php echo $cat_filter == 2 ? 'class="current"' : ''; ?>>活动公告</a></li>
  968.             <li><a href="?cat=3" <?php echo $cat_filter == 3 ? 'class="current"' : ''; ?>>迈迷动态</a></li>
  969.             <li><a href="?cat=4" <?php echo $cat_filter == 4 ? 'class="current"' : ''; ?>>音乐作品</a></li>
  970.             <li><a href="?cat=5" <?php echo $cat_filter == 5 ? 'class="current"' : ''; ?>>慈善事业</a></li>
  971.             <li><a href="?cat=6" <?php echo $cat_filter == 6 ? 'class="current"' : ''; ?>>历史回顾</a></li>            
  972.             <li><a href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=forumdisplay&fid=8" target="_blank">魅力图库</a></li>
  973.             <li><a href="http://michael.mjjlb.com" target="_blank">巨星之路</a></li>
  974.             <li><a href="http://forum.mjjlb.com/mjjcfpw" target="_blank">歌迷论坛</a></li>
  975.         </ul>
  976.         <div class="clear"></div>
  977.     </div>
  978.    
  979.     <?php if (!is_admin()): ?>
  980.     <div class="login-box" id="loginBox">
  981.         <form method="post" style="margin:0;">
  982.             <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  983.             <input type="hidden" name="action" value="admin_login">
  984.             管理员密码:<input type="password" name="password" style="padding:3px;border:1px solid #B8D0E8;width:150px;">
  985.             <input type="submit" value="登录" style="padding:3px 15px;background:#3366CC;color:#FFF;border:none;cursor:pointer;">
  986.             <a href="javascript:void(0)" onclick="toggleLogin()" style="margin-left:10px;">取消</a>
  987.         </form>
  988.     </div>
  989.     <?php endif; ?>
  990.    
  991.     <?php if (is_admin()): ?>
  992.     <div class="admin-panel">
  993.         <strong>管理控制台</strong> |
  994.         <a href="#postnews">发表新闻</a> |
  995.         <span style="color:#666;">今日访问:<?php echo $hits['today']; ?> | 总访问:<?php echo $hits['total']; ?></span>
  996.     </div>
  997.     <?php endif; ?>
  998.    
  999.     <?php if (isset($_GET['success'])): ?>
  1000.     <div class="success-msg" style="background:#E8F5E9;border:1px solid #81C784;color:#2E7D32;padding:10px;margin:10px;text-align:center;">
  1001.         <strong>新闻发表成功!</strong>
  1002.     </div>
  1003.     <?php endif; ?>
  1004.    
  1005.     <div class="main">
  1006.         <?php if (!$view_detail): ?>
  1007.         
  1008.         <div class="left-sidebar">
  1009.             <div class="box">
  1010.                 <div class="box-title">火线新闻 <span class="more"><a href="?cat=1">更多&gt;&gt;</a></span></div>
  1011.                 <div class="box-content">
  1012.                     <ul class="news-list">
  1013.                         <?php
  1014.                         $fire_news = array_slice($all_messages, 0, 10, true);
  1015.                         foreach ($fire_news as $id => $news):
  1016.                         ?>
  1017.                         <li>
  1018.                             <a href="?view=<?php echo intval($id); ?>" class="title"><?php echo safe_substr(safe_output($news['name']), 0, 32); ?></a>
  1019.                             <div class="meta"><?php echo format_time($news['time']); ?> | 浏览<?php echo isset($news['views']) ? intval($news['views']) : 0; ?></div>
  1020.                         </li>
  1021.                         <?php endforeach; ?>
  1022.                         <?php if (empty($fire_news)): ?>
  1023.                         <li style="color:#999;text-align:center;padding:20px 0;">暂无新闻</li>
  1024.                         <?php endif; ?>
  1025.                     </ul>
  1026.                 </div>
  1027.             </div>
  1028.             
  1029.             <div class="box">
  1030.                 <div class="box-title">热门新闻 <span class="more"><a href="http://forum.mjjlb.com/mjjcfpw/forum.php?gid=1">更多&gt;&gt;</a></span></div>
  1031.                 <div class="box-content">
  1032.                     <ul class="news-list">
  1033.                         <?php
  1034.                         $count = 0;
  1035.                         foreach ($hot_list as $news):
  1036.                             if ($count >= 8) break;
  1037.                             if (empty($news['name'])) continue;
  1038.                         ?>
  1039.                         <li>
  1040.                             <span class="hot"><?php echo ($count+1); ?>.</span>
  1041.                             <a href="?view=<?php echo intval($news['id']); ?>"><?php echo safe_substr(safe_output($news['name']), 0, 28); ?></a>
  1042.                         </li>
  1043.                         <?php $count++; endforeach; ?>
  1044.                         <?php if ($count == 0): ?>
  1045.                         <li style="color:#999;text-align:center;">暂无数据</li>
  1046.                         <?php endif; ?>
  1047.                     </ul>
  1048.                 </div>
  1049.             </div>
  1050.             
  1051.             <div class="box">
  1052.                 <div class="box-title">网站调查</div>
  1053.                 <div class="box-content">
  1054.                     <?php if ($poll_message): ?>
  1055.                     <div class="poll-message"><?php echo $poll_message; ?></div>
  1056.                     <?php endif; ?>
  1057.                     
  1058.                     <?php if ($poll_show_result): ?>
  1059.                     <div class="poll-result">
  1060.                         <?php foreach ($poll['options'] as $key => $option):
  1061.                             $count = isset($poll['votes'][$key]) ? $poll['votes'][$key] : 0;
  1062.                             $percent = $poll['total'] > 0 ? round($count / $poll['total'] * 100, 1) : 0;
  1063.                         ?>
  1064.                         <div class="poll-bar">
  1065.                             <div class="poll-fill" style="width:<?php echo $percent; ?>%;"></div>
  1066.                             <span class="poll-text"><?php echo safe_output($option); ?> (<?php echo $percent; ?>%)</span>
  1067.                             <span class="poll-count"><?php echo $count; ?>票</span>
  1068.                         </div>
  1069.                         <?php endforeach; ?>
  1070.                         <div class="poll-total">总投票数:<?php echo $poll['total']; ?>票</div>
  1071.                     </div>
  1072.                     <form method="post" style="text-align:center;margin-top:10px;">
  1073.                         <input type="hidden" name="action" value="poll_vote">
  1074.                         <button type="submit" style="padding:3px 15px;background:#999;color:#FFF;border:none;cursor:pointer;">重新投票</button>
  1075.                     </form>
  1076.                     <?php else: ?>
  1077.                     <form method="post" onsubmit="return pollVote();">
  1078.                         <input type="hidden" name="action" value="poll_vote">
  1079.                         <p style="margin-bottom:10px;color:#666;font-weight:bold;"><?php echo safe_output($poll['question']); ?></p>
  1080.                         <?php foreach ($poll['options'] as $key => $option): ?>
  1081.                         <label style="display:block;margin:8px 0;cursor:pointer;">
  1082.                             <input type="radio" name="poll_option" value="<?php echo $key; ?>" style="margin-right:5px;">
  1083.                             <?php echo safe_output($option); ?>
  1084.                         </label>
  1085.                         <?php endforeach; ?>
  1086.                         <div style="margin-top:15px;text-align:center;">
  1087.                             <button type="submit" style="padding:5px 20px;background:#3366CC;color:#FFF;border:none;cursor:pointer;margin-right:5px;">投票</button>
  1088.                             <button type="submit" name="action" value="poll_view" style="padding:5px 20px;background:#999;color:#FFF;border:none;cursor:pointer;">查看</button>
  1089.                         </div>
  1090.                     </form>
  1091.                     <?php endif; ?>
  1092.                 </div>
  1093.             </div>
  1094.         </div>
  1095.         
  1096.         <div class="main-content">
  1097.             <?php
  1098.             $first_news = reset($all_messages);
  1099.             if ($first_news):
  1100.                 $first_id = key($all_messages);
  1101.             ?>
  1102.             <div class="focus-news">
  1103.                 <?php if (!empty($first_news['image'])): ?>
  1104.                 <div class="focus-image">
  1105.                     <img src="<?php echo safe_output($first_news['image']); ?>" onclick="showImage('<?php echo safe_output($first_news['image']); ?>')" alt="" />
  1106.                 </div>
  1107.                 <?php endif; ?>
  1108.                 <div class="focus-title"><a href="?view=<?php echo intval($first_id); ?>"><?php echo safe_output($first_news['name']); ?></a></div>
  1109.                 <div class="focus-summary">
  1110.                     <?php
  1111.                     $summary = strip_tags(safe_output($first_news['content']));
  1112.                     echo safe_substr($summary, 0, 120) . '...';
  1113.                     ?>
  1114.                     <a href="?view=<?php echo intval($first_id); ?>" style="color:#FF6600;">[查看全文]</a>
  1115.                 </div>
  1116.             </div>
  1117.             <?php endif; ?>
  1118.             
  1119.             <div class="section-title">
  1120.                 <?php
  1121.                 if ($cat_filter > 0) {
  1122.                     echo get_category_name($cat_filter);
  1123.                 } else {
  1124.                     echo '深度报道';
  1125.                 }
  1126.                 ?>
  1127.                 <span class="more"><a href="http://forum.mjjlb.com/mjjcfpw/forum.php?gid=1">更多&gt;&gt;</a></span>
  1128.             </div>
  1129.             
  1130.             <?php foreach ($list as $id => $news): ?>
  1131.             <div class="news-item" id="msg-<?php echo intval($id); ?>">
  1132.                 <?php if (!empty($news['image'])): ?>
  1133.                 <div class="thumb">
  1134.                     <img src="<?php echo safe_output($news['image']); ?>" onclick="showImage('<?php echo safe_output($news['image']); ?>')" alt="" />
  1135.                 </div>
  1136.                 <?php endif; ?>
  1137.                 <div class="content">
  1138.                     <div class="title">
  1139.                         <?php if (isset($news['top']) && $news['top'] == 1): ?><span style="color:#FF6600;">[置顶]</span><?php endif; ?>
  1140.                         <span class="category-tag" style="background:<?php echo get_category_color($news['cat_id']); ?>;"><?php echo get_category_name($news['cat_id']); ?></span>
  1141.                         <a href="?view=<?php echo intval($id); ?>"><?php echo safe_output($news['name']); ?></a>
  1142.                     </div>
  1143.                     <div class="summary">
  1144.                         <?php
  1145.                         $content = strip_tags(safe_output($news['content']));
  1146.                         echo safe_substr($content, 0, 100) . '...';
  1147.                         ?>
  1148.                     </div>
  1149.                     <div class="meta">
  1150.                         <span><?php echo format_time($news['time']); ?></span>
  1151.                         <span>浏览:<?php echo isset($news['views']) ? intval($news['views']) : 0; ?></span>
  1152.                         <span>回复:<?php echo isset($news['replies']) ? intval($news['replies']) : 0; ?></span>
  1153.                         <span>支持:<?php echo isset($news['like']) ? intval($news['like']) : 0; ?></span>
  1154.                         <?php if (is_admin()): ?>
  1155.                         <span>IP:<?php echo isset($news['ip']) ? safe_output($news['ip']) : '未知'; ?></span>
  1156.                         <?php endif; ?>
  1157.                         <span style="float:right;">
  1158.                             <a href="javascript:void(0)" onclick="return toggleReplyBox(<?php echo intval($id); ?>);">回复</a>
  1159.                             <?php if (is_admin()): ?>
  1160.                             | <a href="javascript:void(0)" onclick="if(confirm('删除?')){document.getElementById('del-<?php echo intval($id); ?>').submit();}">删除</a>
  1161.                             | <a href="javascript:void(0)" onclick="document.getElementById('top-<?php echo intval($id); ?>').submit();">
  1162.                                 <?php echo isset($news['top']) && $news['top'] == 1 ? '取消置顶' : '置顶'; ?>
  1163.                             </a>
  1164.                             <form id="del-<?php echo intval($id); ?>" method="post" style="display:none;">
  1165.                                 <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  1166.                                 <input type="hidden" name="action" value="delete_message">
  1167.                                 <input type="hidden" name="id" value="<?php echo intval($id); ?>">
  1168.                             </form>
  1169.                             <form id="top-<?php echo intval($id); ?>" method="post" style="display:none;">
  1170.                                 <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  1171.                                 <input type="hidden" name="action" value="set_top">
  1172.                                 <input type="hidden" name="id" value="<?php echo intval($id); ?>">
  1173.                                 <input type="hidden" name="top" value="<?php echo isset($news['top']) && $news['top'] == 1 ? '0' : '1'; ?>">
  1174.                             </form>
  1175.                             <?php endif; ?>
  1176.                         </span>
  1177.                     </div>
  1178.                 </div>
  1179.                 <div class="clear"></div>
  1180.                
  1181.                 <div class="reply-box" id="replybox-<?php echo intval($id); ?>">
  1182.                     <form method="post" onsubmit="return validateForm(this);">
  1183.                         <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  1184.                         <input type="hidden" name="action" value="post_reply">
  1185.                         <input type="hidden" name="pid" value="<?php echo intval($id); ?>">
  1186.                         <div class="form-row">
  1187.                             <input type="text" name="rname" placeholder="昵称" style="width:80px;padding:3px;border:1px solid #B8D0E8;" required>
  1188.                             <input type="submit" value="发表回复" style="padding:3px 10px;background:#3366CC;color:#FFF;border:none;cursor:pointer;float:right;">
  1189.                         </div>
  1190.                         <div class="form-row" style="margin-top:5px;">
  1191.                             <textarea name="rcontent" placeholder="请输入回复内容..." style="width:100%;height:50px;padding:3px;border:1px solid #B8D0E8;box-sizing:border-box;" required></textarea>
  1192.                         </div>
  1193.                     </form>
  1194.                 </div>
  1195.                
  1196.                 <?php
  1197.                 $related_replies = array();
  1198.                 foreach ($reply as $rid => $r) {
  1199.                     if (isset($r['pid']) && $r['pid'] == $id) {
  1200.                         $related_replies[$rid] = $r;
  1201.                     }
  1202.                 }
  1203.                 if (!empty($related_replies)):
  1204.                 ?>
  1205.                 <div class="reply-list">
  1206.                     <?php foreach (array_slice($related_replies, 0, 3, true) as $rid => $reply_data): ?>
  1207.                     <div class="reply-item">
  1208.                         <div class="reply-header">
  1209.                             <strong><?php echo safe_output($reply_data['name']); ?></strong>
  1210.                             <?php echo format_time($reply_data['time']); ?>
  1211.                             <?php if (is_admin()): ?>
  1212.                             <span style="float:right;">
  1213.                                 <a href="javascript:void(0)" onclick="if(confirm('删除回复?')){document.getElementById('del-reply-<?php echo intval($rid); ?>').submit();}" style="color:#C00;font-size:11px;">删除</a>
  1214.                                 <form id="del-reply-<?php echo intval($rid); ?>" method="post" style="display:none;">
  1215.                                     <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  1216.                                     <input type="hidden" name="action" value="delete_reply">
  1217.                                     <input type="hidden" name="rid" value="<?php echo intval($rid); ?>">
  1218.                                 </form>
  1219.                             </span>
  1220.                             <?php endif; ?>
  1221.                         </div>
  1222.                         <div class="reply-content"><?php echo safe_output($reply_data['content']); ?></div>
  1223.                     </div>
  1224.                     <?php endforeach; ?>
  1225.                     <?php if (count($related_replies) > 3): ?>
  1226.                     <div style="text-align:center;padding:5px;">
  1227.                         <a href="?view=<?php echo intval($id); ?>" style="color:#3366CC;font-size:11px;">查看全部<?php echo count($related_replies); ?>条回复 &gt;&gt;</a>
  1228.                     </div>
  1229.                     <?php endif; ?>
  1230.                 </div>
  1231.                 <?php endif; ?>
  1232.             </div>
  1233.             <?php endforeach; ?>
  1234.             
  1235.             <?php if ($total_pages > 1): ?>
  1236.             <div class="pagination">
  1237.                 <div class="pagination-info">
  1238.                     共 <?php echo $total; ?> 条新闻,第 <?php echo $page; ?>/<?php echo $total_pages; ?> 页
  1239.                 </div>
  1240.                 <?php
  1241.                 $url_param = $cat_filter > 0 ? '&cat=' . $cat_filter : '';
  1242.                 echo generate_page_links($page, $total_pages, $url_param);
  1243.                 ?>
  1244.             </div>
  1245.             <?php endif; ?>
  1246.             
  1247.             <div class="post-form" id="postnews">
  1248.                 <div class="section-title">发表新闻</div>
  1249.                 <form method="post" onsubmit="return validateForm(this);">
  1250.                     <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  1251.                     <input type="hidden" name="action" value="post_message">
  1252.                     
  1253.                     <div class="form-row">
  1254.                         <div class="form-label">标题:</div>
  1255.                         <div class="form-field">
  1256.                             <input type="text" name="name" class="form-input" placeholder="请输入新闻标题(最多50字)" maxlength="50" required>
  1257.                         </div>
  1258.                         <div class="clear"></div>
  1259.                     </div>
  1260.                     
  1261.                     <div class="form-row">
  1262.                         <div class="form-label">分类:</div>
  1263.                         <div class="form-field">
  1264.                             <select name="cat_id" class="form-select">
  1265.                                 <?php for ($i = 1; $i <= 6; $i++): ?>
  1266.                                 <option value="<?php echo $i; ?>" <?php echo $cat_filter == $i ? 'selected' : ''; ?>><?php echo get_category_name($i); ?></option>
  1267.                                 <?php endfor; ?>
  1268.                             </select>
  1269.                         </div>
  1270.                         <div class="clear"></div>
  1271.                     </div>
  1272.                     
  1273.                     <div class="form-row">
  1274.                         <div class="form-label">内容:</div>
  1275.                         <div class="form-field">
  1276.                             <textarea name="content" class="form-textarea" placeholder="支持Discuz!代码:[b]加粗[/b]、[i]斜体[/i]、[u]下划线[/u]、[url]链接[/url]、[img]图片[/img]、[color=red]彩色[/color]" required></textarea>
  1277.                         </div>
  1278.                         <div class="clear"></div>
  1279.                     </div>
  1280.                     
  1281.                     <div class="form-row">
  1282.                         <div class="form-label">图片:</div>
  1283.                         <div class="form-field">
  1284.                             <input type="text" name="image" class="form-input" placeholder="图片URL(支持jpg、png、gif、webp格式)">
  1285.                         </div>
  1286.                         <div class="clear"></div>
  1287.                     </div>
  1288.                     
  1289.                     <div class="form-row">
  1290.                         <div class="form-label">验证码:</div>
  1291.                         <div class="form-field">
  1292.                             <span class="captcha-box" id="captcha"><?php echo isset($_SESSION['captcha']) ? $_SESSION['captcha'] : generate_captcha(); ?></span>
  1293.                             <input type="text" name="captcha" style="width:80px;padding:4px;border:1px solid #B8D0E8;" placeholder="验证码" maxlength="4" autocomplete="off" required>
  1294.                             <a href="javascript:void(0)" onclick="return refreshCaptcha();" style="font-size:11px;">换一张</a>
  1295.                         </div>
  1296.                         <div class="clear"></div>
  1297.                     </div>
  1298.                     
  1299.                     <div class="form-row">
  1300.                         <div class="form-label"></div>
  1301.                         <div class="form-field">
  1302.                             <input type="submit" value="发表新闻" class="form-btn">
  1303.                             <input type="reset" value="重置" style="padding:5px 15px;background:#999;color:#FFF;border:none;cursor:pointer;margin-left:10px;">
  1304.                         </div>
  1305.                         <div class="clear"></div>
  1306.                     </div>
  1307.                 </form>
  1308.             </div>
  1309.         </div>
  1310.         
  1311. <div class="right-sidebar">
  1312.     <div class="box">
  1313.         <div class="box-title">微信公众号</div>
  1314.         <div class="box-content" style="text-align:center;padding:15px;">
  1315.             <div style="font-weight:bold;color:#3366CC;margin-bottom:10px;font-size:14px;">中国迈迷网</div>
  1316.             <img src="https://33026137.s21i.faiusr.com/2/11/ABUIABACGAAg5q2IzAYovLuplAQwrgM4rgM.jpg" alt="微信公众号二维码" style="width:150px;height:150px;border:1px solid #E0E8F0;padding:5px;background:#FFF;" onerror="this.src='data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUwIiBoZWlnaHQ9IjE1MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTUwIiBoZWlnaHQ9IjE1MCIgZmlsbD0iI2Y1ZjVmNSIvPjx0ZXh0IHg9Ijc1IiB5PSI3NSIgZm9udC1mYW1pbHk9IkFyaWFsIiBmb250LXNpemU9IjEyIiBmaWxsPSIjOTk5IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBkeT0iLjNlbSI+微<br/>信<br/>二<br/>维<br/>码</text></svg>'" />
  1317.             <div style="margin-top:8px;color:#666;font-size:11px;">扫码关注获取最新MJ资讯</div>
  1318.             <div style="margin-top:5px;color:#FF6600;font-weight:bold;font-size:12px;">微信号:MJJLB200776</div>
  1319.         </div>
  1320.     </div>
  1321.             
  1322.             <div class="box">
  1323.                 <div class="box-title">最新发行 <span class="more"><a href="http://forum.mjjlb.com/mjjcfpw/forum.php?gid=1">更多&gt;&gt;</a></span></div>
  1324.                 <div class="box-content">
  1325.                     <ul class="news-list">
  1326.                         <?php
  1327.                         $recent = array_slice($all_messages, 0, 6, true);
  1328.                         foreach ($recent as $id => $news):
  1329.                         ?>
  1330.                         <li>
  1331.                             <a href="?view=<?php echo intval($id); ?>"><?php echo safe_substr(safe_output($news['name']), 0, 24); ?></a>
  1332.                         </li>
  1333.                         <?php endforeach; ?>
  1334.                     </ul>
  1335.                 </div>
  1336.             </div>
  1337.             
  1338.             <div class="box">
  1339.                 <div class="box-title">历史回顾 <span class="more"><a href="http://news.mjjlb.com/mjjstation.php?cat=6">更多&gt;&gt;</a></span></div>
  1340.                 <div class="box-content">
  1341.                     <ul class="news-list">
  1342.                         <?php
  1343.                         $life_news = array();
  1344.                         foreach ($all_messages as $id => $m) {
  1345.                             if (isset($m['cat_id']) && $m['cat_id'] == 6) {
  1346.                                 $m['id'] = $id;
  1347.                                 $life_news[] = $m;
  1348.                             }
  1349.                         }
  1350.                         $life_news = array_slice($life_news, 0, 5);
  1351.                         foreach ($life_news as $news):
  1352.                         ?>
  1353.                         <li>
  1354.                             <a href="?view=<?php echo intval($news['id']); ?>"><?php echo safe_substr(safe_output($news['name']), 0, 24); ?></a>
  1355.                         </li>
  1356.                         <?php endforeach; ?>
  1357.                         <?php if (empty($life_news)): ?>
  1358.                         <li style="color:#999;">暂无内容</li>
  1359.                         <?php endif; ?>
  1360.                     </ul>
  1361.                 </div>
  1362.             </div>
  1363.             
  1364.             <div class="box">
  1365.                 <div class="box-title">慈善事业 <span class="more"><a href="http://news.mjjlb.com/mjjstation.php?cat=5">更多&gt;&gt;</a></span></div>
  1366.                 <div class="box-content">
  1367.                     <ul class="news-list">
  1368.                         <?php
  1369.                         $treasure_news = array();
  1370.                         foreach ($all_messages as $id => $m) {
  1371.                             if (isset($m['cat_id']) && $m['cat_id'] == 5) {
  1372.                                 $m['id'] = $id;
  1373.                                 $treasure_news[] = $m;
  1374.                             }
  1375.                         }
  1376.                         $treasure_news = array_slice($treasure_news, 0, 5);
  1377.                         foreach ($treasure_news as $news):
  1378.                         ?>
  1379.                         <li>
  1380.                             <a href="?view=<?php echo intval($news['id']); ?>"><?php echo safe_substr(safe_output($news['name']), 0, 24); ?></a>
  1381.                         </li>
  1382.                         <?php endforeach; ?>
  1383.                         <?php if (empty($treasure_news)): ?>
  1384.                         <li style="color:#999;">暂无内容</li>
  1385.                         <?php endif; ?>
  1386.                     </ul>
  1387.                 </div>
  1388.             </div>
  1389.             
  1390.             <div class="box">
  1391.                 <div class="box-title">活动公告 <span class="more"><a href="http://news.mjjlb.com/mjjstation.php?cat=2">更多&gt;&gt;</a></span></div>
  1392.                 <div class="box-content">
  1393.                     <ul class="news-list">
  1394.                         <?php
  1395.                         $honor_news = array();
  1396.                         foreach ($all_messages as $id => $m) {
  1397.                             if (isset($m['cat_id']) && $m['cat_id'] == 2) {
  1398.                                 $m['id'] = $id;
  1399.                                 $honor_news[] = $m;
  1400.                             }
  1401.                         }
  1402.                         $honor_news = array_slice($honor_news, 0, 5);
  1403.                         foreach ($honor_news as $news):
  1404.                         ?>
  1405.                         <li>
  1406.                             <a href="?view=<?php echo intval($news['id']); ?>"><?php echo safe_substr(safe_output($news['name']), 0, 24); ?></a>
  1407.                         </li>
  1408.                         <?php endforeach; ?>
  1409.                         <?php if (empty($honor_news)): ?>
  1410.                         <li style="color:#999;">暂无内容</li>
  1411.                         <?php endif; ?>
  1412.                     </ul>
  1413.                 </div>
  1414.             </div>
  1415.             
  1416.             <div class="box">
  1417.                 <div class="box-title">最新回复</div>
  1418.                 <div class="box-content">
  1419.                     <ul class="news-list">
  1420.                         <?php
  1421.                         $count = 0;
  1422.                         foreach ($reply_list as $r):
  1423.                             if ($count >= 5) break;
  1424.                             if (empty($r['name']) || empty($r['content'])) continue;
  1425.                         ?>
  1426.                         <li>
  1427.                             <strong style="color:#3366CC;"><?php echo safe_substr(safe_output($r['name']), 0, 8); ?></strong>:
  1428.                             <?php echo safe_substr(safe_output(strip_tags($r['content'])), 0, 16); ?>...
  1429.                         </li>
  1430.                         <?php $count++; endforeach; ?>
  1431.                         <?php if ($count == 0): ?>
  1432.                         <li style="color:#999;">暂无回复</li>
  1433.                         <?php endif; ?>
  1434.                     </ul>
  1435.                 </div>
  1436.             </div>
  1437.             
  1438.             <div class="box">
  1439.                 <div class="box-title">网站统计</div>
  1440.                 <div class="box-content" style="line-height:2;color:#666;">
  1441.                     新闻总数:<?php echo count(read_json(DATA_FILE)); ?><br>
  1442.                     回复总数:<?php echo count(read_json(REPLY_FILE)); ?><br>
  1443.                     今日浏览:<?php echo $hits['today']; ?><br>
  1444.                     总访问量:<?php echo $hits['total']; ?><br>
  1445.                     运行天数:<?php echo floor((time() - strtotime('2024-10-23')) / 86400) + 1; ?>天
  1446.                 </div>
  1447.             </div>
  1448. <div class="box">
  1449.     <div class="box-title">友情链接 <span class="more"><a href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=viewthread&tid=39&extra=page%3D1">申请要求&gt;&gt;</a></span></div>
  1450.     <div class="box-content">
  1451.         <ul class="news-list">
  1452.             <li><a href="http://www.michaeljackson.com" target="_blank" rel="nofollow">迈克尔·杰克逊官方网站</a></li>
  1453.             <li><a href="https://www.shopmichaeljackson.com" target="_blank" rel="nofollow">迈克尔·杰克逊官方商城网站</a></li>
  1454.             <li><a href="https://michael.movie" target="_blank" rel="nofollow">传记电影《迈克尔·杰克逊:巨星之路》官方网站</a></li>
  1455.             <li><a href="https://tour.mjthemusical.com/" target="_blank" rel="nofollow">百老汇《MJ音乐剧》巡演官方网站</a></li>
  1456.             <li><a href="http://www.mjjcn.com" target="_blank" rel="nofollow">迈克尔·杰克逊中文网</a></li>
  1457.             <li><a href="http://www.mjjcollection.net" target="_blank" rel="nofollow">迈克尔·杰克逊中国收藏网</a></li>
  1458.             <li><a href="http://cn.mjjlb.com" target="_blank">米津玄师中国网(米津俱乐部)</a></li>
  1459.             <li><a href="https://tieba.baidu.com/mjj" target="_blank">百度MJJ贴吧</a></li>
  1460.             <li><a href="http://blog.mjjlb.com" target="_blank">Leoben Polaris</a></li>
  1461.         </ul>
  1462.     </div>
  1463. </div>
  1464.         </div>
  1465.         
  1466.         <?php else: ?>
  1467.         
  1468.         <div style="width:960px;margin:0 auto;">
  1469.             <div class="detail-container">
  1470.                 <div class="detail-header">
  1471.                     <div class="detail-title">
  1472.                         <?php if (isset($detail_news['top']) && $detail_news['top'] == 1): ?><span style="color:#FF6600;">[置顶]</span><?php endif; ?>
  1473.                         <?php echo safe_output($detail_news['name']); ?>
  1474.                     </div>
  1475.                     <div class="detail-meta">
  1476.                         <span class="category-tag" style="background:<?php echo get_category_color($detail_news['cat_id']); ?>;"><?php echo get_category_name($detail_news['cat_id']); ?></span>
  1477.                         <span>发布时间:<?php echo format_time($detail_news['time']); ?></span>
  1478.                         <span>浏览:<?php echo isset($detail_news['views']) ? intval($detail_news['views']) : 0; ?>次</span>
  1479.                         <span>回复:<?php echo isset($detail_news['replies']) ? intval($detail_news['replies']) : 0; ?>条</span>
  1480.                         <span>支持:<?php echo isset($detail_news['like']) ? intval($detail_news['like']) : 0; ?></span>
  1481.                         <span>反对:<?php echo isset($detail_news['dislike']) ? intval($detail_news['dislike']) : 0; ?></span>
  1482.                         <?php if (is_admin()): ?>
  1483.                         <span>IP:<?php echo isset($detail_news['ip']) ? safe_output($detail_news['ip']) : '未知'; ?></span>
  1484.                         <?php endif; ?>
  1485.                         
  1486.                         <span style="float:right;">
  1487.                             <form method="post" style="display:inline;" onsubmit="return submitVote(this);">
  1488.                                 <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  1489.                                 <input type="hidden" name="action" value="vote">
  1490.                                 <input type="hidden" name="id" value="<?php echo intval($detail_news['id']); ?>">
  1491.                                 <input type="hidden" name="type" value="like">
  1492.                                 <button type="submit" style="background:#E8F5E9;border:1px solid #81C784;color:#2E7D32;padding:3px 10px;cursor:pointer;">👍 支持</button>
  1493.                             </form>
  1494.                             <form method="post" style="display:inline;" onsubmit="return submitVote(this);">
  1495.                                 <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  1496.                                 <input type="hidden" name="action" value="vote">
  1497.                                 <input type="hidden" name="id" value="<?php echo intval($detail_news['id']); ?>">
  1498.                                 <input type="hidden" name="type" value="dislike">
  1499.                                 <button type="submit" style="background:#FFEBEE;border:1px solid #EF9A9A;color:#C62828;padding:3px 10px;cursor:pointer;margin-left:5px;">👎 反对</button>
  1500.                             </form>
  1501.                         </span>
  1502.                     </div>
  1503.                 </div>
  1504.                
  1505.                 <div class="detail-content">
  1506.                     <?php if (!empty($detail_news['image'])): ?>
  1507.                     <div style="text-align:center;margin-bottom:20px;">
  1508.                         <img src="<?php echo safe_output($detail_news['image']); ?>" style="max-width:100%;max-height:400px;border:1px solid #E0E8F0;padding:5px;background:#F5F8FC;cursor:pointer;" onclick="showImage('<?php echo safe_output($detail_news['image']); ?>')" alt="" />
  1509.                     </div>
  1510.                     <?php endif; ?>
  1511.                     
  1512.                     <?php echo safe_output($detail_news['content']); ?>
  1513.                 </div>
  1514.                
  1515.                 <div style="margin:20px;padding:15px;background:#F5F8FC;border:1px solid #E0E8F0;">
  1516.                     <h3 style="color:#3366CC;margin-bottom:15px;font-size:14px;">发表回复</h3>
  1517.                     <form method="post" onsubmit="return validateForm(this);">
  1518.                         <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  1519.                         <input type="hidden" name="action" value="post_reply">
  1520.                         <input type="hidden" name="pid" value="<?php echo intval($detail_news['id']); ?>">
  1521.                         <input type="hidden" name="redirect" value="?view=<?php echo intval($detail_news['id']); ?>">
  1522.                         <div style="margin-bottom:10px;">
  1523.                             <input type="text" name="rname" placeholder="您的昵称" style="width:150px;padding:5px;border:1px solid #B8D0E8;margin-right:10px;" required>
  1524.                             <input type="submit" value="发表回复" style="padding:5px 20px;background:#3366CC;color:#FFF;border:none;cursor:pointer;">
  1525.                         </div>
  1526.                         <textarea name="rcontent" placeholder="请输入回复内容..." style="width:100%;height:80px;padding:5px;border:1px solid #B8D0E8;box-sizing:border-box;" required></textarea>
  1527.                     </form>
  1528.                 </div>
  1529.                
  1530.                 <?php
  1531.                 $related_replies = array();
  1532.                 foreach ($reply as $rid => $r) {
  1533.                     if (isset($r['pid']) && $r['pid'] == $detail_news['id']) {
  1534.                         $related_replies[$rid] = $r;
  1535.                     }
  1536.                 }
  1537.                 if (!empty($related_replies)):
  1538.                 ?>
  1539.                 <div style="margin:20px;">
  1540.                     <h3 style="color:#3366CC;margin-bottom:15px;font-size:14px;">全部回复 (<?php echo count($related_replies); ?>)</h3>
  1541.                     <?php foreach ($related_replies as $rid => $reply_data): ?>
  1542.                     <div class="reply-item" style="margin-bottom:10px;">
  1543.                         <div class="reply-header" style="background:#E8F0F8;padding:5px 10px;">
  1544.                             <strong style="color:#3366CC;"><?php echo safe_output($reply_data['name']); ?></strong>
  1545.                             <span style="color:#999;margin-left:10px;"><?php echo format_time($reply_data['time']); ?></span>
  1546.                             <?php if (is_admin()): ?>
  1547.                             <span style="float:right;">
  1548.                                 <form method="post" style="display:inline;">
  1549.                                     <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  1550.                                     <input type="hidden" name="action" value="delete_reply">
  1551.                                     <input type="hidden" name="rid" value="<?php echo intval($rid); ?>">
  1552.                                     <input type="hidden" name="redirect" value="?view=<?php echo intval($detail_news['id']); ?>">
  1553.                                     <a href="javascript:void(0)" onclick="if(confirm('删除这条回复?')){this.parentNode.submit();}" style="color:#C00;font-size:11px;">删除</a>
  1554.                                 </form>
  1555.                             </span>
  1556.                             <?php endif; ?>
  1557.                         </div>
  1558.                         <div class="reply-content" style="padding:10px;background:#FAFBFC;border:1px solid #E8EDF2;border-top:none;">
  1559.                             <?php echo safe_output($reply_data['content']); ?>
  1560.                         </div>
  1561.                     </div>
  1562.                     <?php endforeach; ?>
  1563.                 </div>
  1564.                 <?php endif; ?>
  1565.                
  1566.                 <div class="detail-footer">
  1567.                     <a href="<?php echo SITE_URL; ?>" style="display:inline-block;padding:8px 20px;background:#3366CC;color:#FFF;text-decoration:none;">← 返回首页</a>
  1568.                 </div>
  1569.             </div>
  1570.         </div>
  1571.         
  1572.         <?php endif; ?>
  1573.         
  1574.         <div class="clear"></div>
  1575.     </div>
  1576.    
  1577.     <div class="footer">
  1578.         <div class="footer-links">
  1579.             <a href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=viewthread&tid=39&extra=page%3D1" target="_blank">申请友链</a>
  1580.             <a href="http://m.mjjlb.com" target="_blank">手机浏览</a>
  1581.             <a href="http://mjjcfpw.mjjlb.com">网站地图</a>
  1582.             <a href="http://forum.mjjlb.com/mjjcfpw/misc.php?mod=faq" target="_blank">常见问题</a>
  1583.             <a href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=forumdisplay&fid=26" target="_blank">公告反馈</a>
  1584.             <a href="http://blog.mjjlb.com/wechat.html">联系我们</a>
  1585.             <a href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=viewthread&tid=4">关于我们</a>
  1586.             <a href="http://forum.mjjlb.com/mjjcfpw/member.php?mod=register">会员注册</a>
  1587.             <a href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=viewthread&tid=30" target="_blank">招纳贤士</a>
  1588.             <a href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=viewthread&tid=63" target="_blank">汇款方式</a>
  1589.             <a href="http://forum.mjjlb.com/mjjcfpw/search.php" target="_blank">网站搜索</a>
  1590.         </div>
  1591.         <div class="footer-copyright">
  1592.             <p>今日访问:<?php echo $hits['today']; ?> | 总访问:<?php echo $hits['total']; ?></p>
  1593.             <p><?php echo SITE_NAME; ?> - MJJLB新闻主站</p>
  1594.             <p>迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上新闻资讯平台</p>
  1595.             <p>© 2024-<?php echo date('Y'); ?> 迈克尔·杰克逊中国歌迷网站(MICHAEL JOSEPH JACKSON CHINESE FANS' PORTAL WEBSITE)版权所有</p>
  1596.         </div>
  1597.     </div>
  1598. </div>
  1599. </body>
  1600. </html>
复制代码


网站论坛:

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4.     <meta charset="utf-8">
  5.     <meta name="viewport">
  6.     <title>中国迈迷网 - 歌迷论坛 - Powered by Discuz!</title>
  7.     <meta name="Keywords" content="迈克尔, 杰克逊, 中国迈迷网站, 中文歌迷网站, 迈克尔杰克逊, 迈克尔·杰克逊, 麥可傑克森, 傑克森, 麥可, Michael, Jackson, King of Pop, Michael Jackson, Chinese fanclub, fanclub, 歌迷, 中国迈迷网, MJJLB, MJ, 爱MJJ的烙饼, 偶像, 音乐, 流行音乐之王, 流行之王, 米高積遜, 積遜, 米高, 娱乐, 欧美音乐">
  8.     <meta name="description" content="中国迈迷网 - 歌迷论坛正式成立于2025年3月30日,是迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上交流平台,也是一个集MJ资讯共享与MJ文化传播为一体的迈迷庇护所。">
  9.     <link rel="icon" href="http://bbs.mjjlb.com/logo.png">
  10.     <style>
  11.         :root{
  12.             --primary:#cc0000;
  13.             --dark:#a90000;
  14.             --light:#fff;
  15.             --max:925px;
  16.             --radius:50%;
  17.             --gap:12px;
  18.         }
  19.         *{margin:0;padding:0;box-sizing:border-box}
  20.         body{
  21.             font:16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
  22.             background:#000;color:var(--light);
  23.             -webkit-font-smoothing:antialiased;
  24.         }
  25.         a img{border:none}
  26.         header{text-align:center;padding:20px 0;background:var(--primary);position:relative}
  27.         header img{max-width:100%;height:auto}
  28.         .banner{max-width:var(--max);margin:0 auto}
  29.         .banner img{width:100%;display:block}
  30.         nav{background:var(--dark);padding:30px 0}
  31.         .nav-inner{
  32.             max-width:var(--max);margin:0 auto;
  33.             display:flex;flex-wrap:wrap;gap:var(--gap);
  34.             justify-content:center;align-items:center;
  35.         }
  36.         .nav-inner a{flex:0 1 160px;text-align:center}
  37.         .nav-inner img{width:100%;height:auto;transition:transform .25s}
  38.         .nav-inner img:hover{transform:scale(1.05)}
  39.         footer{
  40.             text-align:center;padding:20px 10px;
  41.             font-size:14px;color:#aaa;
  42.         }
  43.         .music-btn {
  44.             position: absolute;
  45.             top: 20px;
  46.             right: 20px;
  47.             background: rgba(255,255,255,0.2);
  48.             border: 2px solid var(--light);
  49.             border-radius: 50%;
  50.             width: 50px;
  51.             height: 50px;
  52.             cursor: pointer;
  53.             display: flex;
  54.             align-items: center;
  55.             justify-content: center;
  56.             transition: all 0.3s ease;
  57.             z-index: 100;
  58.         }
  59.         .music-btn:hover {
  60.             background: rgba(255,255,255,0.3);
  61.             transform: scale(1.1);
  62.         }
  63.         .music-btn.playing {
  64.             background: var(--primary);
  65.             border-color: var(--primary);
  66.         }
  67.         .music-btn svg {
  68.             width: 24px;
  69.             height: 24px;
  70.             fill: var(--light);
  71.         }
  72.         @media(max-width:600px){
  73.             .nav-inner{flex-direction:column}
  74.             .music-btn {
  75.                 top: 10px;
  76.                 right: 10px;
  77.                 width: 40px;
  78.                 height: 40px;
  79.             }
  80.             .music-btn svg {
  81.                 width: 20px;
  82.                 height: 20px;
  83.             }
  84.         }
  85.     </style>
  86. </head>
  87. <body>
  88.     <header>
  89.         <img src="http://bbs.mjjlb.com/michael-logo.png" alt="Logo">
  90.         <div class="music-btn" id="musicBtn" title="播放/暂停音乐">
  91.             <svg class="play-icon" viewBox="0 0 24 24">
  92.                 <path d="M8 5v14l11-7z"/>
  93.             </svg>
  94.             <svg class="pause-icon" viewBox="0 0 24 24" style="display:none;">
  95.                 <path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/>
  96.             </svg>
  97.         </div>
  98.     </header>

  99.     <section class="banner">
  100.         <img src="http://bbs.mjjlb.com/mjjlb.png" alt="MJ Banner">
  101.     </section>

  102.     <nav>
  103.         <div class="nav-inner">
  104.             <a target="_blank" href="http://mjjcfpw.mjjlb.com"><img src="https://bbs.mjjlb.com/mj.png" alt="MJJLB"></a>
  105.             <a target="_blank" href="http://forum.mjjlb.com/mjjcfpw"><img src="http://bbs.mjjlb.com/forum.png" alt="网站论坛"></a>
  106.             <a target="_blank" href="https://tieba.baidu.com/mjj"><img src="http://bbs.mjjlb.com/tieba.png" alt="百度贴吧"></a>
  107.             <a target="_blank" href="https://weibo.com/p/100808bba1cd4faf496dac266c28a4f694a15e/super_index"><img src="https://bbs.mjjlb.com/wbch.png" alt="微博超话"></a>
  108.             <a target="_blank" href="https://pd.qq.com/s/5xgn9w0wy?b=9"><img src="http://bbs.mjjlb.com/channel.png" alt="腾讯频道"></a>
  109.         </div>
  110.     </nav>

  111.     <footer>
  112.         ©MJJLB网站论坛 – 迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上交流平台
  113.     </footer>

  114.     <audio id="bgMusic" loop>
  115.         <source src="http://bbs.mjjlb.com/mjjlb.mp3" type="audio/mpeg">
  116.         您的浏览器不支持音频播放。
  117.     </audio>

  118.     <script>
  119.         const musicBtn = document.getElementById('musicBtn');
  120.         const bgMusic = document.getElementById('bgMusic');
  121.         const playIcon = musicBtn.querySelector('.play-icon');
  122.         const pauseIcon = musicBtn.querySelector('.pause-icon');
  123.         let isPlaying = false;

  124.         musicBtn.addEventListener('click', function() {
  125.             if (isPlaying) {
  126.                 bgMusic.pause();
  127.                 playIcon.style.display = 'block';
  128.                 pauseIcon.style.display = 'none';
  129.                 musicBtn.classList.remove('playing');
  130.                 isPlaying = false;
  131.             } else {
  132.                 bgMusic.play().catch(function(error) {
  133.                     console.log('音乐播放失败:', error);
  134.                     alert('音乐播放失败,请检查网络连接或浏览器设置');
  135.                 });
  136.                 playIcon.style.display = 'none';
  137.                 pauseIcon.style.display = 'block';
  138.                 musicBtn.classList.add('playing');
  139.                 isPlaying = true;
  140.             }
  141.         });

  142.         bgMusic.addEventListener('error', function() {
  143.             console.log('音乐文件加载失败');
  144.             musicBtn.style.display = 'none';
  145.         });

  146.         document.addEventListener('DOMContentLoaded', function() {
  147.             setTimeout(function() {
  148.                 bgMusic.play().then(function() {
  149.                     playIcon.style.display = 'none';
  150.                     pauseIcon.style.display = 'block';
  151.                     musicBtn.classList.add('playing');
  152.                     isPlaying = true;
  153.                 }).catch(function(error) {
  154.                     console.log('自动播放被阻止,等待用户交互:', error);
  155.                 });
  156.             }, 1000);
  157.         });
  158.     </script>
  159. </body>
  160. </html>
复制代码


电脑网站:

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport">
  6.     <title>中国迈迷网 - 迈克尔·杰克逊中国歌迷网站 - 迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上平台</title>
  7.     <meta name="Keywords" content="迈克尔, 杰克逊, 迈克尔·杰克逊中国歌迷网站, 中文歌迷网站, 迈克尔杰克逊, 迈克尔·杰克逊, 麥可傑克森, 傑克森, 麥可, Michael, Jackson, King of Pop, Michael Jackson, Chinese fanwebsite, fanclub, 歌迷, 中国迈迷网, MJJLB, MJ, 爱MJJ的烙饼, 偶像, 音乐, 流行音乐之王, 流行之王, 米高積遜, 積遜, 米高, 娱乐, 欧美音乐">
  8.     <meta name="description" content="中国迈迷网成立于2025年1月12日,是迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上平台,也是一个集MJ资讯共享与MJ文化传播为一体的迈迷庇护所。">
  9.     <link rel="shortcut icon" href="http://mjjcfpw.mjjlb.com/mjjcfpw.png">
  10.     <style>
  11.         .music-control {
  12.             position: fixed;
  13.             bottom: 20px;
  14.             right: 20px;
  15.             z-index: 9999;
  16.             background: #bc0605;
  17.             color: #fff;
  18.             border: none;
  19.             border-radius: 50%;
  20.             width: 50px;
  21.             height: 50px;
  22.             font-size: 20px;
  23.             cursor: pointer;
  24.             box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  25.             transition: all 0.3s ease;
  26.         }
  27.         
  28.         .music-control:hover {
  29.             background: #a00504;
  30.             transform: scale(1.1);
  31.         }
  32.         
  33.         .music-control.playing {
  34.             animation: pulse 1.5s infinite;
  35.         }
  36.         
  37.         @keyframes pulse {
  38.             0% { box-shadow: 0 0 0 0 rgba(188, 6, 5, 0.7); }
  39.             70% { box-shadow: 0 0 0 10px rgba(188, 6, 5, 0); }
  40.             100% { box-shadow: 0 0 0 0 rgba(188, 6, 5, 0); }
  41.         }
  42.         
  43.         .flt-link{
  44.           position:fixed;
  45.           z-index:9999;
  46.           pointer-events:auto;
  47.           animation:flt 25s infinite linear;
  48.         }
  49.         .flt-link img{
  50.           display:block;
  51.           height:auto;
  52.           width:100px;
  53.           border:none;
  54.         }
  55.         @keyframes flt{
  56.           0%   {top:10%; left:-100px;}
  57.           25%  {top:50%; left:calc(100vw - 100px);}
  58.           50%  {top:80%; left:50vw;}
  59.           75%  {top:20%; left:80vw;}
  60.           100% {top:10%; left:calc(100vw + 100px);}
  61.         }
  62.         
  63.         body {
  64.             margin: 0 auto;
  65.             font-size: 14px;
  66.             font-family: "微软雅黑";
  67.             line-height: 22px;
  68.             background: #dcdbdb;
  69.         }
  70.         
  71.         div,p,ul,li,h1 {
  72.             height: auto;
  73.             margin: 0;
  74.             padding: 0;
  75.             vertical-align: middle;
  76.         }
  77.         
  78.         li {
  79.             list-style: none;
  80.         }
  81.         
  82.         img {
  83.             border: 0;
  84.             margin: 0;
  85.             padding: 0;
  86.         }
  87.         
  88.         .web {
  89.             width: 970px;
  90.             height: auto;
  91.             overflow: hidden;
  92.             padding: 20px 15px;
  93.             margin: 0 auto;
  94.             background: #ffffff;
  95.         }
  96.         
  97.         .logo {
  98.             height: 63px;
  99.         }
  100.         
  101.         .nav {
  102.             width: 100%;
  103.             height: 37px;
  104.             background: #bc0605;
  105.         }
  106.         
  107.         .nav ul {
  108.             width: 500px;
  109.             margin: 0 auto;
  110.         }
  111.         
  112.         .nav ul li {
  113.             height: 37px;
  114.             line-height: 37px;
  115.             margin: 0px 20px;
  116.             float: left;
  117.         }
  118.         
  119.         .nav ul li a {
  120.             font-size: 16px;
  121.             color: #FFF;
  122.             text-decoration: none;
  123.         }
  124.         
  125.         .nav ul li a:hover {
  126.             color: #f8b637;
  127.             text-decoration: underline;
  128.         }
  129.         
  130.         .banner {
  131.             height: 281px;
  132.         }
  133.         
  134.         h1 {
  135.             height: 60px;
  136.             line-height: 60px;
  137.             text-align: center;
  138.             font-size: 20px;
  139.             margin-bottom: 35px;
  140.         }
  141.         
  142.         .box1 {
  143.             height: 250px;
  144.         }
  145.         
  146.         .box1 ul {
  147.             padding: 0px;
  148.         }
  149.         
  150.         .box1 ul li {
  151.             width: 218px;
  152.             float: left;
  153.             margin: 0px 10px;
  154.             text-align: center;
  155.         }
  156.         
  157.         .box1 ul li h2 {
  158.             height: 45px;
  159.             line-height: 45px;
  160.             font-size: 18px;
  161.         }
  162.         
  163.         .box1 ul li p {
  164.             font-size: 14px;
  165.         }
  166.         
  167.         .news-section {
  168.             margin-bottom: 50px;
  169.             overflow: hidden;
  170.         }
  171.         
  172.         .news-container {
  173.             display: flex;
  174.             gap: 20px;
  175.         }
  176.         
  177.         .news-left {
  178.             flex: 1;
  179.             background: #f8f8f8;
  180.             padding: 20px;
  181.             border-radius: 8px;
  182.         }
  183.         
  184.         .news-right {
  185.             width: 300px;
  186.             background: #f0f0f0;
  187.             padding: 20px;
  188.             border-radius: 8px;
  189.         }
  190.         
  191.         .news-item {
  192.             border-bottom: 1px solid #ddd;
  193.             padding: 15px 0;
  194.         }
  195.         
  196.         .news-item:last-child {
  197.             border-bottom: none;
  198.         }
  199.         
  200.         .news-item h3 {
  201.             font-size: 16px;
  202.             color: #bc0605;
  203.             margin-bottom: 8px;
  204.         }
  205.         
  206.         .news-item p {
  207.             font-size: 14px;
  208.             color: #666;
  209.             line-height: 1.6;
  210.         }
  211.         
  212.         .news-meta {
  213.             font-size: 12px;
  214.             color: #999;
  215.             margin-top: 5px;
  216.         }
  217.         
  218.         .news-right h3 {
  219.             font-size: 18px;
  220.             color: #333;
  221.             margin-bottom: 15px;
  222.             border-left: 4px solid #bc0605;
  223.             padding-left: 10px;
  224.         }
  225.         
  226.         .hot-news-item {
  227.             padding: 10px 0;
  228.             border-bottom: 1px dashed #ccc;
  229.         }
  230.         
  231.         .hot-news-item:last-child {
  232.             border-bottom: none;
  233.         }
  234.         
  235.         .hot-news-item a {
  236.             color: #333;
  237.             text-decoration: none;
  238.             font-size: 14px;
  239.         }
  240.         
  241.         .hot-news-item a:hover {
  242.             color: #bc0605;
  243.         }
  244.         
  245.         .box2 {
  246.             height: 562px;
  247.             margin-bottom: 20px;
  248.         }
  249.         
  250.         .box2-left {
  251.             width: 660px;
  252.             float: left;
  253.         }
  254.         
  255.         .box2-left-shang {
  256.             height: 264px;
  257.             margin-bottom: 32px;
  258.         }
  259.         
  260.         .box2sbx1 {
  261.             width: 388px;
  262.             height: 264px;
  263.             float: left;
  264.         }
  265.         
  266.         .box2sbx2 {
  267.             width: 258px;
  268.             height: 264px;
  269.             float: right;
  270.         }
  271.         
  272.         .box2-left-xia {
  273.             height: 266px;
  274.         }
  275.         
  276.         .box2xbx1 {
  277.             width: 253px;
  278.             height: 266px;
  279.             float: left;
  280.         }
  281.         
  282.         .box2xbx2 {
  283.             width: 393px;
  284.             height: 266px;
  285.             float: right;
  286.         }
  287.         
  288.         .box2-right {
  289.             width: 278px;
  290.             float: right;
  291.         }
  292.         
  293.         .foot {
  294.             height: 100px;
  295.             line-height: 100px;
  296.             background: #000;
  297.             text-align: center;
  298.             font-size: 14px;
  299.             color: #FFF;
  300.         }
  301.         
  302.         .tit {
  303.             width: 300px;
  304.             height: 30px;
  305.             line-height: 30px;
  306.             text-align: center;
  307.             color: #FFF;
  308.             background: #bc0605;
  309.             margin: 0 auto;
  310.             margin-top: 30px;
  311.             margin-bottom: 30px;
  312.         }
  313.         
  314.         .erweb {
  315.             height: auto;
  316.             overflow: hidden;
  317.             line-height: 25px;
  318.             font-size: 14px;
  319.             margin-bottom: 50px;
  320.         }
  321.         
  322.         .donghua {
  323.             width: 447px;
  324.             height: 253px;
  325.             float: left;
  326.             margin-right: 20px;
  327.             margin-bottom: 10px;
  328.         }
  329.         
  330.         .erweb p {
  331.             text-indent: 2em;
  332.         }
  333.         
  334.         .sanweb {
  335.             height: auto;
  336.             overflow: hidden;
  337.             margin-bottom: 50px;
  338.         }
  339.         
  340.         .sanweb ul {
  341.             padding: 0px;
  342.         }
  343.         
  344.         .sanweb ul li {
  345.             width: 460px;
  346.             float: left;
  347.             padding: 10px;
  348.         }
  349.         
  350.         .sanweb ul li img {
  351.             width: 460px;
  352.             height: 300px;
  353.             display: block;
  354.         }
  355.         
  356.         .xiangq {
  357.             width: 420px;
  358.             height: 200px;
  359.             padding: 20px;
  360.         }
  361.         
  362.         .xiangq h1 {
  363.             height: 40px;
  364.             font-size: 16px;
  365.             line-height: 40px;
  366.             margin-bottom: 10px;
  367.             border-bottom: #D8D7D7 1px solid;
  368.         }
  369.         
  370.         .xiangq p {
  371.             font-size: 14px;
  372.             text-indent: 2em;
  373.         }
  374.         
  375.         .box {
  376.             width: 840px;
  377.             height: 333px;
  378.             margin: 0 auto;
  379.             margin-top: 30px;
  380.             margin-bottom: 20px;
  381.         }
  382.         
  383.         .box img {
  384.             width: 428px;
  385.             height: 333px;
  386.             float: left;
  387.         }
  388.         
  389.         .box .right {
  390.             width: 375px;
  391.             height: 291px;
  392.             padding-left: 35px;
  393.             padding-top: 40px;
  394.             float: left;
  395.             border: #333333 1px solid;
  396.         }
  397.         
  398.         .box .right h2 {
  399.             font-size: 16px;
  400.         }
  401.         
  402.         .box .right p {
  403.             color: #787676;
  404.             font-size: 14px;
  405.             line-height: 30px;
  406.             margin-right: 20px;
  407.         }
  408.         
  409.         .inpt {
  410.             height: 35px;
  411.             line-height: 35px;
  412.             background: #eef1f6;
  413.             border: #b7c4cd 1px solid;
  414.             padding-left: 10px;
  415.             color: #b7c4cd;
  416.             font-size: 14px;
  417.             width: 350px;
  418.         }
  419.         
  420.         .wenb {
  421.             height: 150px;
  422.             line-height: 35px;
  423.             background: #eef1f6;
  424.             border: #b7c4cd 1px solid;
  425.             padding-left: 10px;
  426.             color: #b7c4cd;
  427.             font-size: 14px;
  428.             width: 350px;
  429.         }
  430.         
  431.         .btn {
  432.             display: block;
  433.             width: 220px;
  434.             height: 40px;
  435.             background: #1eb0fc;
  436.             line-height: 40px;
  437.             text-align: center;
  438.             font-size: 14px;
  439.             color: #FFF;
  440.             padding: 0px;
  441.             border: none;
  442.             margin-bottom: 50px;
  443.             margin-top: 10px;
  444.         }
  445.         
  446.         img {
  447.             max-width: 100%;
  448.             height: auto;
  449.             display: block;
  450.         }
  451.         
  452.         .banner {
  453.             width: 100%;
  454.             aspect-ratio: 970 / 281;
  455.         }
  456.         
  457.         .banner img {
  458.             width: 100%;
  459.             height: 100%;
  460.             object-fit: cover;
  461.         }
  462.         
  463.         .box1 ul li img {
  464.             width: 100%;
  465.             aspect-ratio: 218 / 150;
  466.             object-fit: cover;
  467.         }
  468.         
  469.         .box2sbx1 img,
  470.         .box2sbx2 img,
  471.         .box2xbx1 img,
  472.         .box2xbx2 img {
  473.             width: 100%;
  474.             aspect-ratio: 388 / 264;
  475.             object-fit: cover;
  476.         }
  477.         
  478.         .box2-right img {
  479.             width: 100%;
  480.             aspect-ratio: 278 / 562;
  481.             object-fit: cover;
  482.         }
  483.         
  484.         @supports not (aspect-ratio: 1 / 1) {
  485.             .banner,
  486.             .box1 ul li img,
  487.             .box2sbx1 img,
  488.             .box2sbx2 img,
  489.             .box2xbx1 img,
  490.             .box2xbx2 img,
  491.             .box2-right img {
  492.                 height: 0;
  493.                 padding-bottom: 56.25%;
  494.                 overflow: hidden;
  495.                 position: relative;
  496.             }
  497.             
  498.             .banner img,
  499.             .box1 ul li img,
  500.             .box2sbx1 img,
  501.             .box2sbx2 img,
  502.             .box2xbx1 img,
  503.             .box2xbx2 img,
  504.             .box2-right img {
  505.                 position: absolute;
  506.                 top: 0;
  507.                 left: 0;
  508.                 width: 100%;
  509.                 height: 100%;
  510.                 object-fit: cover;
  511.             }
  512.         }
  513.         
  514.         .slider-wrap {
  515.           position: relative;
  516.           width: 100%;
  517.           max-width: 970px;
  518.           margin: 20px auto 0;
  519.           overflow: hidden;
  520.           border-radius: 8px;
  521.           box-shadow: 0 4px 12px rgba(0,0,0,.15);
  522.         }
  523.         .slider-track {
  524.           display: flex;
  525.           width: 500%;
  526.           animation: slide 15s steps(5,end) infinite;
  527.         }
  528.         .slider-track a {
  529.           width: 20%;
  530.           flex-shrink: 0;
  531.         }
  532.         .slider-track img {
  533.           width: 100%;
  534.           aspect-ratio: 970 / 350;
  535.           object-fit: cover;
  536.           display: block;
  537.         }
  538.         @keyframes slide {
  539.           0%   { transform: translateX(0); }
  540.           20%  { transform: translateX(-20%); }
  541.           40%  { transform: translateX(-40%); }
  542.           60%  { transform: translateX(-60%); }
  543.           80%  { transform: translateX(-80%); }
  544.           100% { transform: translateX(0); }
  545.         }
  546.         .slider-dots {
  547.           position: absolute;
  548.           bottom: 12px;
  549.           left: 50%;
  550.           transform: translateX(-50%);
  551.           display: flex;
  552.           gap: 8px;
  553.         }
  554.         .slider-dots li {
  555.           width: 10px;
  556.           height: 10px;
  557.           border-radius: 50%;
  558.           background: rgba(255,255,255,.6);
  559.           cursor: pointer;
  560.           list-style: none;
  561.         }
  562.         .slider-dots li.active {
  563.           background: #bc0605;
  564.         }
  565.         
  566.         .friendlink-section {
  567.           width: 100%;
  568.           max-width: 970px;
  569.           margin: 40px auto 0;
  570.           padding: 20px 0;
  571.           background: #f8f8f8;
  572.           border-radius: 8px;
  573.           box-shadow: 0 2px 8px rgba(0,0,0,.08);
  574.         }
  575.         .friendlink-title {
  576.           text-align: center;
  577.           font-size: 18px;
  578.           color: #bc0605;
  579.           margin-bottom: 20px;
  580.           font-weight: bold;
  581.         }
  582.         .friendlink-list {
  583.           display: flex;
  584.           flex-wrap: wrap;
  585.           justify-content: center;
  586.           gap: 15px 30px;
  587.           padding: 0 20px;
  588.         }
  589.         .friendlink-list a {
  590.           display: inline-block;
  591.           padding: 6px 12px;
  592.           background: #ffffff;
  593.           border: 1px solid #ddd;
  594.           border-radius: 4px;
  595.           font-size: 14px;
  596.           color: #333;
  597.           text-decoration: none;
  598.           transition: all .3s;
  599.         }
  600.         .friendlink-list a:hover {
  601.           background: #bc0605;
  602.           color: #fff;
  603.           border-color: #bc0605;
  604.           transform: translateY(-2px);
  605.         }
  606.     </style>
  607. </head>
  608. <body>
  609. <button class="music-control" id="musicBtn" title="点击播放/暂停音乐">播</button>
  610. <audio id="bgMusic" loop>
  611.     <source src="http://pc.mjjlb.com/mjjlb.mp3" type="audio/mpeg">
  612.     您的浏览器不支持音频播放。
  613. </audio>

  614. <a class="flt-link" href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=viewthread&tid=50" target="_blank" rel="noopener">
  615.   <img src="https://33026137.s21i.faiusr.com/4/17/ABUIABAEGAAggsjfxgYowNiL5gIwgAg4lAM.png" alt="MJJLB网站调查">
  616. </a>
  617. <div class="web">
  618. <a href="http://forum.mjjlb.com/mjjcfpw/forum.php?gid=3" target="_blank">
  619.     <img src="https://33026137.s21i.faiusr.com/2/ABUIABACGAAgm-fJxgYopvSyvwEwtgc4Wg.jpg" style="width:100%;display:block;margin-bottom:20px;">
  620.     <div class="logo"><a href="http://pc.mjjlb.com" target="_blank"><img src="https://33026137.s21i.faiusr.com/4/1/ABUIABAEGAAg_6PlxgYo4KOs4AMwjQI4QA.png"></div>
  621.     <div class="nav">
  622.         <ul>
  623.             <li><a href="http://mjjcfpw.mjjlb.com">首页</a></li>
  624.             <li><a href="http://news.mjjlb.com/mjjstation.php">新闻追踪</a></li>
  625.             <li><a href="https://baike.baidu.com/item/%E8%BF%88%E5%85%8B%E5%B0%94%C2%B7%E6%9D%B0%E5%85%8B%E9%80%8A/170984">精彩人生</a></li>
  626.             <li><a href="https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzkwODg4MjI2OQ==&hide_subscribe_btn=1#wechat_redirect">珍品文库</a></li>
  627.             <li><a href="http://forum.mjjlb.com/mjjcfpw">歌迷论坛</a></li>
  628.         </ul>
  629.     </div>
  630.     <div class="banner">
  631.         <img src="https://33026137.s21i.faiusr.com/2/1/ABUIABACGAAgzq6hugYooJzOPDDSBjjeAw.jpg" />
  632.     </div>
  633. <a href="http://forum.mjjlb.com/mjjcfpw/member.php?mod=register" target="_blank">
  634.     <img src="https://33026137.s21i.faiusr.com/4/17/ABUIABAEGAAglejKxgYowLvf-gcwgAg4YQ.png?v=1758641200" style="width:100%;display:block;margin-bottom:20px;">
  635. </a>
  636.     <div class="box1">
  637.         <ul>
  638.             <li>
  639.                 <a href="http://www.mjjlb.com" target="_blank"><img src="http://pc.mjjlb.com/mjjlb.png" /></a>
  640.                 <p>MJJLB主站首页</p>
  641.             </li>
  642.             <li>
  643.                 <a href="http://mjjcfpw.mjjlb.com" target="_blank"><img src="http://pc.mjjlb.com/mjjcfpw.png" /></a>
  644.                 <p>MJJLB网站主页</p>
  645.             </li>
  646.             <li>
  647.                 <a href="http://news.mjjlb.com" target="_blank"><img src="http://pc.mjjlb.com/mjjstation.png" /></a>
  648.                 <p>MJJLB新闻主站</p>
  649.             </li>
  650.             <li>
  651.                 <a href="http://bbs.mjjlb.com" target="_blank"><img src="http://pc.mjjlb.com/mjjlbforum.png" /></a>
  652.                 <p>MJJLB网站论坛</p>
  653.             </li>
  654.         </ul>
  655.     </div>
  656.     <img src="https://33026137.s21i.faiusr.com/4/2/ABUIABAEGAAglfSDygYo7r3QcTCACDhu.png" style="width:100%;display:block;margin-bottom:20px;">
  657.     <h1>网站公告&新闻资讯(<a href="http://forum.mjjlb.com/mjjcfpw/forum.php?gid=13">更多</a>)</h1>
  658.     <div class="news-section">
  659.         <div class="news-container">
  660.             <div class="news-left">
  661.                 <div class="news-item">
  662.                 <div class="news-item">
  663.                     <h3>【更名公告】网站新名称:中国迈迷网</h3>
  664.                     <p>本站在全平台统一更名为“中国迈迷网”,原名为“胡萝卜烙饼网”。此次更名旨在统一各平台名称,使账号标识更加简洁、清晰且易于辨识。</p>
  665.                     <div class="news-meta">2025年12月14日 | 来源:MJJLB.com</div>
  666.                 </div>
  667.                     <h3>MJJLB.com发布迈克尔·杰克逊官方传记电影《迈克尔》专题宣传网页</h3>
  668.                     <p>2026年4月24日,迈克尔·杰克逊的官方传记电影《迈克尔·杰克逊:巨星之路》将在全球震撼上映,为了让大家能尽情交流这部备受期待的作品,我们在中国迈迷网特别建立了这个专题宣传网页(michael.mjjlb.com)。无论你是从哪里来的迈迷朋友,都欢迎在此分享关于电影的爆料、最新消息,尽情讨论、吐槽、交流!</p>
  669.                     <div class="news-meta">2025年10月10日 | 来源:MJJLB.com</div>
  670.                 </div>
  671.                 <div class="news-item">
  672.                     <h3>迈克尔·杰克逊的官方传记电影《迈克尔》开通tiktok账号,关于电影首支预告片的猜测很有可能成真!</h3>
  673.                     <p>近日,迈克尔·杰克逊的官方传记电影《迈克尔》开通tiktok账号!之前就有第三方媒体预测,迈克尔·杰克逊的官方传记电影《迈克尔》的首支预告片,将在同为环球影业全球发行的电影《魔法坏女巫2》上映(2025年11月19日)前后发布。</p>
  674.                     <div class="news-meta">2025年10月8日 | 来源:MJJLB.com</div>
  675.                 </div>
  676.                 <div class="news-item">
  677.                     <h3>MJJLB.com迎来重大更新,但网站论坛的大部分数据丢失了!!</h3>
  678.                     <p>MJJLB网站论坛因攻击重建后数据全丢,已换新服务器升级系统并启新域名,盼用户重新注册回归。</p>
  679.                     <div class="news-meta">2025年1月10日 | 来源:MJJLB.com</div>
  680.                 </div>
  681.             </div>
  682.             <div class="news-right">
  683.                 <h3>新闻资讯(<a href="http://forum.mjjlb.com/mjjcfpw/forum.php?gid=1">更多最新新闻资讯</a>)</h3>
  684.                 <div class="hot-news-item">
  685.                     <a href="https://mp.weixin.qq.com/s/_wal4zcbmORpyj2viEujYw">电影《迈克尔·杰克逊:巨星之路》的预告片引爆全球!粉丝该抱持怎样的期待?</a>
  686.                 </div>
  687.                 <div class="hot-news-item">
  688.                     <a href="https://mp.weixin.qq.com/s/8YgwwskyvAoHVWaxicBN4g">天啊,要哭了!迈克尔·杰克逊官方传记电影《迈克尔·杰克逊:巨星之路》首曝预告!!</a>
  689.                 </div>
  690.                 <div class="hot-news-item">
  691.                     <a href="https://mp.weixin.qq.com/s/8aMRGPyUe9bK6iJExy9Zew">迈克尔·杰克逊的官方传记电影《迈克尔》开通tiktok账号,关于电影首支预告片的猜测很有可能成真!</a>
  692.                 </div>
  693.                 <div class="hot-news-item">
  694.                     <a href="https://mp.weixin.qq.com/s/q17qakUxanh0lZfhz3n3WQ">摩城公司宣布限定发行《来啦,圣诞老人》七寸红胶单曲唱片!</a>
  695.                 </div>
  696.                 <div class="hot-news-item">
  697.                     <a href="https://mp.weixin.qq.com/s/MH6QRJOZBFJD9453U_HSyw">迈克尔·杰克逊的官方频道将《黑或白》的音乐短片升级为4K版本!竟然还加了新镜头</a>
  698.                 </div>
  699.                 <div class="hot-news-item">
  700.                     <a href="https://mp.weixin.qq.com/s/asQT8kqNorQc7FIxU-G0bg">确定了,迈克尔·杰克逊的传记电影《迈克尔》又一次改档</a>
  701.                 </div>
  702.                 <div class="hot-news-item">
  703.                     <a href="https://mp.weixin.qq.com/s/sDddJ1ksq47YgtsivGyi2Q">昔日"挚友"变勒索者:弗兰克·卡西欧被控敲诈迈克尔·杰克逊的遗产并深陷赌债丑闻!</a>
  704.                 </div>
  705.                 <div class="hot-news-item">
  706.                     <a href="https://mp.weixin.qq.com/s/IvCb4Esv-M_jOq11i_Vcdg">迈克尔·杰克逊遗产委员会发布声明邮件:《危险》《历史》纪录片项目将于传记电影上映后重启!</a>
  707.                 </div>
  708.                 <div class="hot-news-item">
  709.                 </div>
  710.             </div>
  711.         </div>
  712.     </div>
  713.     <h1>MJ魅力图库(更多MJ美图,<a href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=forumdisplay&fid=8">请点击这里</a>)</h1>
  714.     <div class="slider-wrap">
  715.       <div class="slider-track" id="sliderTrack">
  716.         <a href="https://33026137.s21i.faiusr.com/2/1/ABUIABACGAAgs5iEuwYo_ZO80QMw_wU4gAQ.jpg" target="_blank"><img src="https://33026137.s21i.faiusr.com/2/1/ABUIABACGAAgs5iEuwYo_ZO80QMw_wU4gAQ.jpg" alt="MJ"></a>
  717.         <a href="https://33026137.s21i.faiusr.com/2/1/ABUIABACGAAgu5uEuwYoo-O7owQw-A44twg.jpg" target="_blank"><img src="https://33026137.s21i.faiusr.com/2/1/ABUIABACGAAgu5uEuwYoo-O7owQw-A44twg.jpg" alt="MJ"></a>
  718.         <a href="https://33026137.s21i.faiusr.com/2/1/ABUIABACGAAgl7ChugYozIbroAIwgAw4gAg.jpg" target="_blank"><img src="https://33026137.s21i.faiusr.com/2/1/ABUIABACGAAgl7ChugYozIbroAIwgAw4gAg.jpg" alt="MJ"></a>
  719.         <a href="https://33026137.s21i.faiusr.com/2/1/ABUIABACGAAg29ihugYo9M-AlwYwgB445BQ.jpg" target="_blank"><img src="https://33026137.s21i.faiusr.com/2/1/ABUIABACGAAg29ihugYo9M-AlwYwgB445BQ.jpg" alt="MJ"></a>
  720.         <a href="https://33026137.s21i.faiusr.com/2/1/ABUIABACGAAg29KhugYo3Lvv1gUwzRE4gAo.jpg" target="_blank"><img src="https://33026137.s21i.faiusr.com/2/1/ABUIABACGAAg29KhugYo3Lvv1gUwzRE4gAo.jpg" alt="MJ"></a>
  721.       </div>
  722.       <ul class="slider-dots" id="sliderDots"></ul>
  723.     </div>
  724.     <div class="friendlink-section">
  725.       <div class="friendlink-title">友情链接</div>
  726.       <div class="friendlink-list">
  727.         <a href="http://www.michaeljackson.com" target="_blank">迈克尔·杰克逊官方网站</a>
  728.         <a href="http://www.mjjlb.com" target="_blank">MJJLB主站首页</a>
  729.         <a href="http://mjjcfpw.mjjlb.com" target="_blank">MJJLB网站首页</a>
  730.         <a href="http://news.mjjlb.com" target="_blank">MJJLB新闻主站</a>
  731.         <a href="http://bbs.mjjlb.com" target="_blank">MJJLB网站论坛</a>
  732.         <a href="http://pc.mjjlb.com" target="_blank">MJJLB电脑网站</a>
  733.         <a href="http://m.mjjlb.com" target="_blank">MJJLB手机网站</a>
  734.         <a href="https://tieba.baidu.com/mjj" target="_blank">百度MJJ贴吧</a>
  735.         <a href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=viewthread&tid=3" target="_blank">MJJLB官方微信公众号</a>
  736.       </div>
  737.     </div>
  738.     <a href="http://m.mjjlb.com" style="text-decoration: none; color: inherit;">
  739.         <div class="foot">点击此处将网站切换至移动端界面</div>
  740.     </a>
  741. </div>

  742. <script>
  743. const musicBtn = document.getElementById('musicBtn');
  744. const bgMusic = document.getElementById('bgMusic');
  745. let isPlaying = false;

  746. musicBtn.addEventListener('click', function() {
  747.     if (isPlaying) {
  748.         bgMusic.pause();
  749.         musicBtn.classList.remove('playing');
  750.         musicBtn.textContent = '播';
  751.     } else {
  752.         bgMusic.play().catch(function(error) {
  753.             console.log('音乐播放失败:', error);
  754.             alert('音乐播放失败,请检查网络连接或浏览器设置。');
  755.         });
  756.         musicBtn.classList.add('playing');
  757.         musicBtn.textContent = '停';
  758.     }
  759.     isPlaying = !isPlaying;
  760. });

  761. const track = document.getElementById('sliderTrack');
  762. const dots  = document.getElementById('sliderDots');
  763. const imgN  = track.children.length;

  764. for (let i = 0; i < imgN; i++) {
  765.   const li = document.createElement('li');
  766.   if (i === 0) li.classList.add('active');
  767.   dots.appendChild(li);
  768. }

  769. let step = 0;
  770. setInterval(() => {
  771.   step = (step + 1) % imgN;
  772.   [...dots.children].forEach((dot, idx) => {
  773.     dot.classList.toggle('active', idx === step);
  774.   });
  775. }, 3000);
  776. </script>
  777. </body>
  778. </html>
复制代码


手机网站:

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  6.     <title>中国迈迷网 - 手机版 - 迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上平台</title>
  7.     <meta name="Keywords" content="迈克尔, 杰克逊, 中国迈迷网站, 中文歌迷网站, 迈克尔杰克逊, 迈克尔·杰克逊, 麥可傑克森, 傑克森, 麥可, Michael, Jackson, King of Pop, Michael Jackson, Chinese fanclub, fanclub, 歌迷, 中国迈迷网, MJJLB, MJ, 爱MJJ的烙饼, 偶像, 音乐, 流行音乐之王, 流行之王, 米高積遜, 積遜, 米高, 娱乐, 欧美音乐">
  8.     <meta name="Description" content="中国迈迷网成立于2025年1月12日,是迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上平台,也是一个集MJ资讯共享与MJ文化传播为一体的迈迷庇护所。">
  9.     <link rel="shortcut icon" href="http://mjjcfpw.mjjlb.com/mjjlb.jpg">
  10.     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
  11.     <style>
  12.         * {
  13.             margin: 0;
  14.             padding: 0;
  15.             box-sizing: border-box;
  16.             -webkit-tap-highlight-color: transparent;
  17.         }
  18.         
  19.         :root {
  20.             --primary: #fb7299;
  21.             --bg: #f4f4f5;
  22.             --card: #ffffff;
  23.             --text: #18181b;
  24.             --text-secondary: #71717a;
  25.             --border: #e4e4e7;
  26.         }
  27.         
  28.         body {
  29.             font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  30.             background: var(--bg);
  31.             color: var(--text);
  32.             line-height: 1.5;
  33.         }
  34.         
  35.         .container {
  36.             max-width: 430px;
  37.             margin: 0 auto;
  38.             background: var(--bg);
  39.             min-height: 100vh;
  40.         }
  41.         
  42.         .header {
  43.             background: var(--card);
  44.             padding: 10px 16px;
  45.             display: flex;
  46.             align-items: center;
  47.             justify-content: space-between;
  48.             position: sticky;
  49.             top: 0;
  50.             z-index: 100;
  51.             border-bottom: 1px solid var(--border);
  52.         }
  53.         
  54.         .header-left {
  55.             display: flex;
  56.             align-items: center;
  57.             gap: 12px;
  58.         }
  59.         
  60.         .menu-btn {
  61.             width: 36px;
  62.             height: 36px;
  63.             display: flex;
  64.             flex-direction: column;
  65.             justify-content: center;
  66.             align-items: center;
  67.             gap: 5px;
  68.             cursor: pointer;
  69.             border-radius: 8px;
  70.         }
  71.         
  72.         .menu-btn:active {
  73.             background: #f4f4f5;
  74.         }
  75.         
  76.         .menu-btn span {
  77.             display: block;
  78.             width: 20px;
  79.             height: 2px;
  80.             background: var(--text);
  81.             border-radius: 1px;
  82.         }
  83.         
  84.         .logo-text {
  85.             font-size: 17px;
  86.             font-weight: 600;
  87.         }
  88.         
  89.         .search-btn {
  90.             width: 36px;
  91.             height: 36px;
  92.             display: flex;
  93.             align-items: center;
  94.             justify-content: center;
  95.             border-radius: 8px;
  96.             color: var(--text-secondary);
  97.             font-size: 18px;
  98.             background: none;
  99.             border: none;
  100.             cursor: pointer;
  101.         }
  102.         
  103.         .search-btn:active {
  104.             background: #f4f4f5;
  105.         }
  106.         
  107.         .nav-tabs {
  108.             background: var(--card);
  109.             display: flex;
  110.             padding: 0 12px;
  111.             border-bottom: 1px solid var(--border);
  112.             overflow-x: auto;
  113.             scrollbar-width: none;
  114.         }
  115.         
  116.         .nav-tabs::-webkit-scrollbar {
  117.             display: none;
  118.         }
  119.         
  120.         .nav-tab {
  121.             padding: 12px 14px;
  122.             font-size: 14px;
  123.             color: var(--text-secondary);
  124.             white-space: nowrap;
  125.             text-decoration: none;
  126.             position: relative;
  127.             font-weight: 500;
  128.         }
  129.         
  130.         .nav-tab.active {
  131.             color: var(--primary);
  132.             font-weight: 600;
  133.         }
  134.         
  135.         .nav-tab.active::after {
  136.             content: '';
  137.             position: absolute;
  138.             bottom: 0;
  139.             left: 14px;
  140.             right: 14px;
  141.             height: 2px;
  142.             background: var(--primary);
  143.             border-radius: 2px 2px 0 0;
  144.         }
  145.         
  146.         .main-content {
  147.             padding: 12px;
  148.         }
  149.         
  150.         .banner-card {
  151.             background: var(--card);
  152.             border-radius: 12px;
  153.             overflow: hidden;
  154.             margin-bottom: 12px;
  155.             box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  156.         }
  157.         
  158.         .banner-slider {
  159.             position: relative;
  160.             height: 160px;
  161.         }
  162.         
  163.         .banner-slides {
  164.             display: flex;
  165.             transition: transform 0.3s ease;
  166.             height: 100%;
  167.         }
  168.         
  169.         .banner-slide {
  170.             flex: 0 0 100%;
  171.             height: 100%;
  172.         }
  173.         
  174.         .banner-slide img {
  175.             width: 100%;
  176.             height: 100%;
  177.             object-fit: cover;
  178.         }
  179.         
  180.         .banner-dots {
  181.             position: absolute;
  182.             bottom: 10px;
  183.             left: 0;
  184.             right: 0;
  185.             display: flex;
  186.             justify-content: center;
  187.             gap: 6px;
  188.         }
  189.         
  190.         .banner-dot {
  191.             width: 6px;
  192.             height: 6px;
  193.             border-radius: 50%;
  194.             background: rgba(255,255,255,0.4);
  195.         }
  196.         
  197.         .banner-dot.active {
  198.             background: white;
  199.             width: 14px;
  200.             border-radius: 3px;
  201.         }
  202.         
  203.         .section-card {
  204.             background: var(--card);
  205.             border-radius: 12px;
  206.             margin-bottom: 12px;
  207.             box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  208.         }
  209.         
  210.         .section-header {
  211.             padding: 14px 16px;
  212.             display: flex;
  213.             align-items: center;
  214.             justify-content: space-between;
  215.             border-bottom: 1px solid var(--border);
  216.         }
  217.         
  218.         .section-title {
  219.             font-size: 15px;
  220.             font-weight: 600;
  221.             display: flex;
  222.             align-items: center;
  223.             gap: 6px;
  224.         }
  225.         
  226.         .section-title i {
  227.             color: var(--primary);
  228.             font-size: 16px;
  229.         }
  230.         
  231.         .section-more {
  232.             font-size: 13px;
  233.             color: var(--text-secondary);
  234.             text-decoration: none;
  235.             display: flex;
  236.             align-items: center;
  237.             gap: 2px;
  238.         }
  239.         
  240.         .forum-list {
  241.             padding: 4px 0;
  242.         }
  243.         
  244.         .forum-item {
  245.             display: flex;
  246.             padding: 14px 16px;
  247.             gap: 12px;
  248.             text-decoration: none;
  249.             color: inherit;
  250.         }
  251.         
  252.         .forum-item:not(:last-child) {
  253.             border-bottom: 1px solid var(--border);
  254.         }
  255.         
  256.         .forum-icon {
  257.             width: 44px;
  258.             height: 44px;
  259.             border-radius: 10px;
  260.             display: flex;
  261.             align-items: center;
  262.             justify-content: center;
  263.             font-size: 20px;
  264.             color: white;
  265.             flex-shrink: 0;
  266.         }
  267.         
  268.         .forum-icon.purple {
  269.             background: linear-gradient(135deg, #c084fc 0%, #a855f7 100%);
  270.         }
  271.         
  272.         .forum-icon.pink {
  273.             background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
  274.         }
  275.         
  276.         .forum-icon.blue {
  277.             background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  278.         }
  279.         
  280.         .forum-body {
  281.             flex: 1;
  282.             min-width: 0;
  283.         }
  284.         
  285.         .forum-title-wrap {
  286.             display: flex;
  287.             align-items: center;
  288.             gap: 8px;
  289.             margin-bottom: 6px;
  290.         }
  291.         
  292.         .forum-title-text {
  293.             font-size: 15px;
  294.             font-weight: 600;
  295.             color: var(--text);
  296.         }
  297.         
  298.         .forum-tag {
  299.             font-size: 11px;
  300.             padding: 2px 6px;
  301.             background: var(--primary);
  302.             color: white;
  303.             border-radius: 4px;
  304.             font-weight: 500;
  305.         }
  306.         
  307.         .forum-desc {
  308.             font-size: 13px;
  309.             color: var(--text-secondary);
  310.             line-height: 1.6;
  311.             display: -webkit-box;
  312.             -webkit-line-clamp: 2;
  313.             -webkit-box-orient: vertical;
  314.             overflow: hidden;
  315.         }
  316.         
  317.         .qrcode-block {
  318.             padding: 16px;
  319.         }
  320.         
  321.         .qrcode-title {
  322.             font-size: 15px;
  323.             font-weight: 600;
  324.             margin-bottom: 14px;
  325.             display: flex;
  326.             align-items: center;
  327.             gap: 6px;
  328.         }
  329.         
  330.         .qrcode-title i {
  331.             color: var(--primary);
  332.         }
  333.         
  334.         .qrcode-content {
  335.             display: flex;
  336.             gap: 14px;
  337.         }
  338.         
  339.         .qrcode-img {
  340.             width: 90px;
  341.             height: 90px;
  342.             border-radius: 8px;
  343.             overflow: hidden;
  344.             border: 1px solid var(--border);
  345.             flex-shrink: 0;
  346.         }
  347.         
  348.         .qrcode-img img {
  349.             width: 100%;
  350.             height: 100%;
  351.             object-fit: cover;
  352.         }
  353.         
  354.         .qrcode-desc {
  355.             flex: 1;
  356.             font-size: 13px;
  357.             color: var(--text-secondary);
  358.             line-height: 1.7;
  359.             display: flex;
  360.             align-items: center;
  361.         }
  362.         
  363.         .links-block {
  364.             padding: 16px;
  365.         }
  366.         
  367.         .links-title {
  368.             font-size: 15px;
  369.             font-weight: 600;
  370.             margin-bottom: 16px;
  371.             display: flex;
  372.             align-items: center;
  373.             gap: 6px;
  374.         }
  375.         
  376.         .links-title i {
  377.             color: var(--primary);
  378.         }
  379.         
  380.         .links-grid {
  381.             display: grid;
  382.             grid-template-columns: repeat(4, 1fr);
  383.             gap: 16px;
  384.         }
  385.         
  386.         .link-item {
  387.             display: flex;
  388.             flex-direction: column;
  389.             align-items: center;
  390.             gap: 8px;
  391.             text-decoration: none;
  392.             color: inherit;
  393.         }
  394.         
  395.         .link-icon-box {
  396.             width: 48px;
  397.             height: 48px;
  398.             border-radius: 12px;
  399.             background: #f4f4f5;
  400.             display: flex;
  401.             align-items: center;
  402.             justify-content: center;
  403.             font-size: 20px;
  404.             color: var(--primary);
  405.         }
  406.         
  407.         .link-item:active .link-icon-box {
  408.             transform: scale(0.95);
  409.         }
  410.         
  411.         .link-label {
  412.             font-size: 12px;
  413.             color: var(--text-secondary);
  414.         }
  415.         
  416.         .music-player {
  417.             background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  418.             border-radius: 12px;
  419.             padding: 16px;
  420.             margin: 0 0 12px 0;
  421.             color: white;
  422.         }
  423.         
  424.         .music-header {
  425.             display: flex;
  426.             align-items: center;
  427.             gap: 12px;
  428.             margin-bottom: 14px;
  429.         }
  430.         
  431.         .music-cover {
  432.             width: 52px;
  433.             height: 52px;
  434.             border-radius: 8px;
  435.             background: rgba(255,255,255,0.2);
  436.             display: flex;
  437.             align-items: center;
  438.             justify-content: center;
  439.             font-size: 22px;
  440.         }
  441.         
  442.         .music-info {
  443.             flex: 1;
  444.         }
  445.         
  446.         .music-name {
  447.             font-size: 15px;
  448.             font-weight: 600;
  449.             margin-bottom: 4px;
  450.         }
  451.         
  452.         .music-artist {
  453.             font-size: 12px;
  454.             opacity: 0.9;
  455.         }
  456.         
  457.         .music-controls {
  458.             display: flex;
  459.             align-items: center;
  460.             gap: 12px;
  461.         }
  462.         
  463.         .music-play-btn {
  464.             width: 40px;
  465.             height: 40px;
  466.             border-radius: 50%;
  467.             background: rgba(255,255,255,0.2);
  468.             border: none;
  469.             display: flex;
  470.             align-items: center;
  471.             justify-content: center;
  472.             cursor: pointer;
  473.             color: white;
  474.             font-size: 16px;
  475.         }
  476.         
  477.         .music-play-btn:active {
  478.             transform: scale(0.95);
  479.             background: rgba(255,255,255,0.3);
  480.         }
  481.         
  482.         .music-progress-wrap {
  483.             flex: 1;
  484.         }
  485.         
  486.         .music-progress-bar {
  487.             height: 3px;
  488.             background: rgba(255,255,255,0.3);
  489.             border-radius: 2px;
  490.             margin-bottom: 6px;
  491.             position: relative;
  492.             cursor: pointer;
  493.         }
  494.         
  495.         .music-progress-fill {
  496.             height: 100%;
  497.             width: 0%;
  498.             background: white;
  499.             border-radius: 2px;
  500.             position: relative;
  501.         }
  502.         
  503.         .music-progress-dot {
  504.             position: absolute;
  505.             right: -4px;
  506.             top: 50%;
  507.             transform: translateY(-50%);
  508.             width: 8px;
  509.             height: 8px;
  510.             background: white;
  511.             border-radius: 50%;
  512.             opacity: 0;
  513.         }
  514.         
  515.         .music-progress-bar:active .music-progress-dot {
  516.             opacity: 1;
  517.         }
  518.         
  519.         .music-time {
  520.             display: flex;
  521.             justify-content: space-between;
  522.             font-size: 11px;
  523.             opacity: 0.8;
  524.         }
  525.         
  526.         .footer {
  527.             text-align: center;
  528.             padding: 20px 16px;
  529.             font-size: 12px;
  530.             color: var(--text-secondary);
  531.         }
  532.         
  533.         .footer p {
  534.             margin: 4px 0;
  535.         }
  536.         
  537.         .sidebar-overlay {
  538.             position: fixed;
  539.             top: 0;
  540.             left: 0;
  541.             width: 100%;
  542.             height: 100%;
  543.             background: rgba(0,0,0,0.5);
  544.             z-index: 200;
  545.             opacity: 0;
  546.             visibility: hidden;
  547.             transition: all 0.3s;
  548.         }
  549.         
  550.         .sidebar-overlay.active {
  551.             opacity: 1;
  552.             visibility: visible;
  553.         }
  554.         
  555.         .sidebar {
  556.             position: fixed;
  557.             top: 0;
  558.             left: -280px;
  559.             width: 280px;
  560.             height: 100%;
  561.             background: var(--card);
  562.             z-index: 201;
  563.             transition: left 0.3s ease;
  564.             overflow-y: auto;
  565.         }
  566.         
  567.         .sidebar.active {
  568.             left: 0;
  569.         }
  570.         
  571.         .sidebar-header {
  572.             padding: 50px 20px 24px;
  573.             background: var(--primary);
  574.             color: white;
  575.         }
  576.         
  577.         .sidebar-user {
  578.             display: flex;
  579.             align-items: center;
  580.             gap: 14px;
  581.         }
  582.         
  583.         .sidebar-avatar {
  584.             width: 56px;
  585.             height: 56px;
  586.             border-radius: 50%;
  587.             overflow: hidden;
  588.             border: 2px solid rgba(255,255,255,0.3);
  589.         }
  590.         
  591.         .sidebar-avatar img {
  592.             width: 100%;
  593.             height: 100%;
  594.             object-fit: cover;
  595.         }
  596.         
  597.         .sidebar-info {
  598.             flex: 1;
  599.         }
  600.         
  601.         .sidebar-name {
  602.             font-size: 17px;
  603.             font-weight: 600;
  604.             margin-bottom: 4px;
  605.         }
  606.         
  607.         .sidebar-desc {
  608.             font-size: 12px;
  609.             opacity: 0.9;
  610.         }
  611.         
  612.         .sidebar-menu {
  613.             padding: 8px 0;
  614.         }
  615.         
  616.         .sidebar-item {
  617.             display: flex;
  618.             align-items: center;
  619.             gap: 14px;
  620.             padding: 14px 20px;
  621.             color: var(--text);
  622.             text-decoration: none;
  623.             font-size: 15px;
  624.         }
  625.         
  626.         .sidebar-item:active {
  627.             background: #f4f4f5;
  628.         }
  629.         
  630.         .sidebar-item i {
  631.             width: 22px;
  632.             text-align: center;
  633.             color: var(--text-secondary);
  634.             font-size: 18px;
  635.         }
  636.         
  637.         .sidebar-divider {
  638.             height: 1px;
  639.             background: var(--border);
  640.             margin: 8px 20px;
  641.         }
  642.     </style>
  643. </head>
  644. <body>
  645.     <div class="container">
  646.         <div class="header">
  647.             <div class="header-left">
  648.                 <div class="menu-btn" id="menuBtn">
  649.                     <span></span>
  650.                     <span></span>
  651.                     <span></span>
  652.                 </div>
  653.                 <span class="logo-text">中国迈迷网</span>
  654.             </div>
  655.             <button class="search-btn" onclick="window.location.href='http://forum.mjjlb.com/mjjcfpw/search.php'">
  656.                 <i class="fas fa-search"></i>
  657.             </button>
  658.         </div>
  659.         
  660.         <div class="nav-tabs">
  661.             <a href="http://m.mjjlb.com" class="nav-tab active">首页</a>
  662.             <a href="http://news.mjjlb.com/mjjstation.php" class="nav-tab">资讯</a>
  663.             <a href="http://forum.mjjlb.com/mjjcfpw/index.php" class="nav-tab">论坛</a>
  664.             <a href="https://pd.qq.com/s/5xgn9w0wy?b=9" class="nav-tab">频道</a>
  665.             <a href="http://blog.mjjlb.com/forum.php" class="nav-tab">博客</a>
  666.             <a href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=forumdisplay&fid=8" class="nav-tab">图片</a>
  667.             <a href="https://space.bilibili.com/470056028" class="nav-tab">视频</a>
  668.             <a href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=forumdisplay&fid=15" class="nav-tab">商城</a>
  669.         </div>
  670.         
  671.         <div class="main-content">
  672.             <div class="banner-card">
  673.                 <div class="banner-slider">
  674.                     <div class="banner-slides" id="bannerSlides">
  675.                         <div class="banner-slide">
  676.                             <img src="https://33026137.s21i.faiusr.com/2/ABUIABACGAAgxruGxgYo1JuCwQMw0gY43gM!1000x1000.jpg.webp" alt="MJJLB">
  677.                         </div>
  678.                         <div class="banner-slide">
  679.                             <img src="https://33026137.s21i.faiusr.com/2/ABUIABACGAAgzL6GxgYo-PaJ-gIwuAg4zwU!1000x1000.jpg.webp" alt="APP">
  680.                         </div>
  681.                         <div class="banner-slide">
  682.                             <img src="https://33026137.s21i.faiusr.com/4/2/ABUIABAEGAAgsKvAygYomt_Mlwcw0Ak44gU.png" alt="MICHAEL">
  683.                         </div>
  684.                     </div>
  685.                     <div class="banner-dots" id="bannerDots">
  686.                         <div class="banner-dot active"></div>
  687.                         <div class="banner-dot"></div>
  688.                         <div class="banner-dot"></div>
  689.                     </div>
  690.                 </div>
  691.             </div>
  692.             
  693.             <div class="section-card">
  694.                 <div class="section-header">
  695.                     <div class="section-title">
  696.                         <i class="fas fa-fire"></i>
  697.                         推荐版块
  698.                     </div>
  699.                     <a href="http://forum.mjjlb.com/mjjcfpw/forum.php" class="section-more">
  700.                         全部 <i class="fas fa-chevron-right" style="font-size: 10px;"></i>
  701.                     </a>
  702.                 </div>
  703.                 <div class="forum-list">
  704.                     <a href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=forumdisplay&fid=2" class="forum-item">
  705.                         <div class="forum-icon purple">
  706.                             <i class="fas fa-comments"></i>
  707.                         </div>
  708.                         <div class="forum-body">
  709.                             <div class="forum-title-wrap">
  710.                                 <span class="forum-title-text">王的影响</span>
  711.                                 <span class="forum-tag">综合讨论</span>
  712.                             </div>
  713.                             <div class="forum-desc">我们在这里追踪新闻、发表想法、分享故事。永远的流行音乐之王迈克尔·杰克逊给世间留下了太多传奇,当天使离开了地球,我们依然能分享他的音乐、舞蹈、影像和爱……</div>
  714.                         </div>
  715.                     </a>
  716.                     
  717.                     <a href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=forumdisplay&fid=6" class="forum-item">
  718.                         <div class="forum-icon pink">
  719.                             <i class="fas fa-heart"></i>
  720.                         </div>
  721.                         <div class="forum-body">
  722.                             <div class="forum-title-wrap">
  723.                                 <span class="forum-title-text">追忆我们的MJ</span>
  724.                                 <span class="forum-tag">怀念致敬</span>
  725.                             </div>
  726.                             <div class="forum-desc">回忆、致敬——伟大的流行音乐之王。迈克尔,你走了,我们再也见不到你了,时光转瞬,但我们依然想你,全世界也从不曾遗忘。我们又将举行各种歌迷活动纪念你!</div>
  727.                         </div>
  728.                     </a>
  729.                     
  730.                     <a href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=forumdisplay&fid=17" class="forum-item">
  731.                         <div class="forum-icon blue">
  732.                             <i class="fas fa-shield-alt"></i>
  733.                         </div>
  734.                         <div class="forum-body">
  735.                             <div class="forum-title-wrap">
  736.                                 <span class="forum-title-text">MJ的磨难</span>
  737.                                 <span class="forum-tag">捍卫清白</span>
  738.                             </div>
  739.                             <div class="forum-desc">这是MJ人生中我们最厌恶的部分,但又不得不关注。MJ逝世后,我们以为他终于可以远离喧嚣和痛苦、人们可以更多欣赏他的音乐和遗产的时候,嗜血的勒索者和小报媒体依然在玷污他的名誉。我们,MJ的爱之军团,要为他而战!</div>
  740.                         </div>
  741.                     </a>
  742.                 </div>
  743.             </div>
  744.             
  745.             <div class="section-card">
  746.                 <div class="qrcode-block">
  747.                     <div class="qrcode-title">
  748.                         <i class="fas fa-qrcode"></i>
  749.                         官方微信公众平台
  750.                     </div>
  751.                     <div class="qrcode-content">
  752.                         <div class="qrcode-img">
  753.                             <img src="https://33026137.s21i.faiusr.com/2/11/ABUIABACGAAg5q2IzAYovLuplAQwrgM4rgM.jpg" alt="官方微信公众平台">
  754.                         </div>
  755.                         <div class="qrcode-desc">
  756.                             中国迈迷网成立于2025年1月12日,是迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上平台,也是一个集MJ资讯共享与MJ文化传播为一体的迈迷庇护所。
  757.                         </div>
  758.                     </div>
  759.                 </div>
  760.             </div>
  761.             
  762.             <div class="section-card">
  763.                 <div class="links-block">
  764.                     <div class="links-title">
  765.                         <i class="fas fa-link"></i>
  766.                         友情链接
  767.                     </div>
  768.                     <div class="links-grid">
  769.                         <a href="http://www.mjjlb.com" class="link-item">
  770.                             <div class="link-icon-box">
  771.                                 <i class="fas fa-home"></i>
  772.                             </div>
  773.                             <span class="link-label">网站首页</span>
  774.                         </a>
  775.                         <a href="http://forum.mjjlb.com/mjjcfpw" class="link-item">
  776.                             <div class="link-icon-box">
  777.                                 <i class="fas fa-users"></i>
  778.                             </div>
  779.                             <span class="link-label">歌迷论坛</span>
  780.                         </a>
  781.                         <a href="http://news.mjjlb.com" class="link-item">
  782.                             <div class="link-icon-box">
  783.                                 <i class="fas fa-newspaper"></i>
  784.                             </div>
  785.                             <span class="link-label">新闻主站</span>
  786.                         </a>
  787.                         <a href="http://blog.mjjlb.com" class="link-item">
  788.                             <div class="link-icon-box">
  789.                                 <i class="fas fa-blog"></i>
  790.                             </div>
  791.                             <span class="link-label">站长博客</span>
  792.                         </a>
  793.                     </div>
  794.                 </div>
  795.             </div>
  796.             
  797.             <div class="music-player">
  798.                 <div class="music-header">
  799.                     <div class="music-cover">
  800.                         <i class="fas fa-music"></i>
  801.                     </div>
  802.                     <div class="music-info">
  803.                         <div class="music-name">Speechless</div>
  804.                         <div class="music-artist">Michael Jackson</div>
  805.                     </div>
  806.                 </div>
  807.                 <div class="music-controls">
  808.                     <button class="music-play-btn" id="playBtn">
  809.                         <i class="fas fa-play" id="playIcon"></i>
  810.                     </button>
  811.                     <div class="music-progress-wrap">
  812.                         <div class="music-progress-bar" id="progressBar">
  813.                             <div class="music-progress-fill" id="progressFill">
  814.                                 <div class="music-progress-dot"></div>
  815.                             </div>
  816.                         </div>
  817.                         <div class="music-time">
  818.                             <span id="currentTime">0:00</span>
  819.                             <span id="musicStatus">点击播放</span>
  820.                             <span id="duration">4:54</span>
  821.                         </div>
  822.                     </div>
  823.                 </div>
  824.                 <audio id="audioPlayer" preload="none">
  825.                     <source src="http://love.mjjlb.com/Speechless.mp3" type="audio/ogg">
  826.                 </audio>
  827.             </div>
  828.             
  829.             <div class="footer">
  830.                 <p>© 中国迈迷网 - 迈克尔·杰克逊中国歌迷网站</p>
  831.                 <p>迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上平台</p>
  832.             </div>
  833.         </div>
  834.     </div>
  835.    
  836.     <div class="sidebar-overlay" id="sidebarOverlay"></div>
  837.     <div class="sidebar" id="sidebar">
  838.         <div class="sidebar-header">
  839.             <div class="sidebar-user">
  840.                 <div class="sidebar-avatar">
  841.                     <img src="http://mjjcfpw.mjjlb.com/mjjcfpw.png" alt="LOGO">
  842.                 </div>
  843.                 <div class="sidebar-info">
  844.                     <div class="sidebar-name">中国迈迷网</div>
  845.                     <div class="sidebar-desc">迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上平台</div>
  846.                 </div>
  847.             </div>
  848.         </div>
  849.         <div class="sidebar-menu">
  850.             <a href="http://forum.mjjlb.com/mjjcfpw/home.php" class="sidebar-item">
  851.                 <i class="fas fa-home"></i>
  852.                 <span>我的页面</span>
  853.             </a>
  854.             <a href="http://forum.mjjlb.com/mjjcfpw/home.php?mod=space&do=favorite&view=me" class="sidebar-item">
  855.                 <i class="fas fa-star"></i>
  856.                 <span>我的收藏</span>
  857.             </a>
  858.             <a href="http://forum.mjjlb.com/mjjcfpw/home.php?mod=spacecp" class="sidebar-item">
  859.                 <i class="fas fa-cog"></i>
  860.                 <span>设置</span>
  861.             </a>
  862.             <div class="sidebar-divider"></div>
  863.             <a href="http://forum.mjjlb.com/mjjcfpw/search.php" class="sidebar-item">
  864.                 <i class="fas fa-compass"></i>
  865.                 <span>发现</span>
  866.             </a>
  867.             <a href="http://forum.mjjlb.com/mjjcfpw/home.php?mod=space&do=friend" class="sidebar-item">
  868.                 <i class="fas fa-user-friends"></i>
  869.                 <span>好友</span>
  870.             </a>
  871.             <a href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=forumdisplay&fid=15" class="sidebar-item">
  872.                 <i class="fas fa-shopping-bag"></i>
  873.                 <span>购物</span>
  874.             </a>
  875.             <div class="sidebar-divider"></div>
  876.             <a href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=forumdisplay&fid=26" class="sidebar-item">
  877.                 <i class="fas fa-question-circle"></i>
  878.                 <span>帮助与反馈</span>
  879.             </a>
  880.             <a href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=viewthread&tid=4" class="sidebar-item">
  881.                 <i class="fas fa-info-circle"></i>
  882.                 <span>关于我们</span>
  883.             </a>
  884.         </div>
  885.     </div>

  886.     <script>
  887.         const menuBtn = document.getElementById('menuBtn');
  888.         const sidebar = document.getElementById('sidebar');
  889.         const sidebarOverlay = document.getElementById('sidebarOverlay');
  890.         
  891.         menuBtn.addEventListener('click', () => {
  892.             sidebar.classList.add('active');
  893.             sidebarOverlay.classList.add('active');
  894.         });
  895.         
  896.         sidebarOverlay.addEventListener('click', () => {
  897.             sidebar.classList.remove('active');
  898.             sidebarOverlay.classList.remove('active');
  899.         });
  900.         
  901.         const bannerSlides = document.getElementById('bannerSlides');
  902.         const bannerDots = document.getElementById('bannerDots').children;
  903.         let currentSlide = 0;
  904.         const slideCount = bannerSlides.children.length;
  905.         
  906.         function showSlide(index) {
  907.             if (index >= slideCount) index = 0;
  908.             if (index < 0) index = slideCount - 1;
  909.             bannerSlides.style.transform = `translateX(-${index * 100}%)`;
  910.             for (let i = 0; i < bannerDots.length; i++) {
  911.                 bannerDots[i].classList.toggle('active', i === index);
  912.             }
  913.             currentSlide = index;
  914.         }
  915.         
  916.         setInterval(() => showSlide(currentSlide + 1), 4000);
  917.         
  918.         let startX = 0;
  919.         bannerSlides.addEventListener('touchstart', e => startX = e.touches[0].clientX);
  920.         bannerSlides.addEventListener('touchend', e => {
  921.             const diff = startX - e.changedTouches[0].clientX;
  922.             if (Math.abs(diff) > 50) {
  923.                 diff > 0 ? showSlide(currentSlide + 1) : showSlide(currentSlide - 1);
  924.             }
  925.         });
  926.         
  927.         const audioPlayer = document.getElementById('audioPlayer');
  928.         const playBtn = document.getElementById('playBtn');
  929.         const playIcon = document.getElementById('playIcon');
  930.         const progressFill = document.getElementById('progressFill');
  931.         const progressBar = document.getElementById('progressBar');
  932.         const currentTimeEl = document.getElementById('currentTime');
  933.         const musicStatus = document.getElementById('musicStatus');
  934.         
  935.         let isPlaying = false;
  936.         
  937.         function formatTime(s) {
  938.             if (isNaN(s)) return '0:00';
  939.             const m = Math.floor(s / 60);
  940.             const sec = Math.floor(s % 60);
  941.             return `${m}:${sec < 10 ? '0' : ''}${sec}`;
  942.         }
  943.         
  944.         function updateProgress() {
  945.             if (audioPlayer.duration) {
  946.                 progressFill.style.width = `${(audioPlayer.currentTime / audioPlayer.duration) * 100}%`;
  947.                 currentTimeEl.textContent = formatTime(audioPlayer.currentTime);
  948.             }
  949.         }
  950.         
  951.         playBtn.addEventListener('click', () => {
  952.             if (isPlaying) {
  953.                 audioPlayer.pause();
  954.                 playIcon.className = 'fas fa-play';
  955.                 musicStatus.textContent = '已暂停';
  956.                 isPlaying = false;
  957.             } else {
  958.                 musicStatus.textContent = '加载中,请稍等片刻……';
  959.                 audioPlayer.play().then(() => {
  960.                     playIcon.className = 'fas fa-pause';
  961.                     musicStatus.textContent = '播放中';
  962.                     isPlaying = true;
  963.                 }).catch(() => {
  964.                     musicStatus.textContent = '点击重试';
  965.                 });
  966.             }
  967.         });
  968.         
  969.         audioPlayer.addEventListener('timeupdate', updateProgress);
  970.         audioPlayer.addEventListener('ended', () => {
  971.             playIcon.className = 'fas fa-play';
  972.             musicStatus.textContent = '播放结束';
  973.             isPlaying = false;
  974.             progressFill.style.width = '0%';
  975.         });
  976.         
  977.         progressBar.addEventListener('click', e => {
  978.             if (!audioPlayer.duration) return;
  979.             const rect = progressBar.getBoundingClientRect();
  980.             audioPlayer.currentTime = ((e.clientX - rect.left) / rect.width) * audioPlayer.duration;
  981.         });
  982.         
  983.         document.addEventListener('visibilitychange', () => {
  984.             if (document.hidden && isPlaying) {
  985.                 audioPlayer.pause();
  986.                 playIcon.className = 'fas fa-play';
  987.                 musicStatus.textContent = '已暂停';
  988.                 isPlaying = false;
  989.             }
  990.         });
  991.     </script>
  992. </body>
  993. </html>
复制代码


传记电影《迈克尔·杰克逊:巨星之路》宣传网页:

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport">
  6.     <title>迈克尔·杰克逊官方传记电影《迈克尔·杰克逊:巨星之路》专题宣传网页</title>

  7.     <meta name="keywords" content="迈克尔传记电影, 杰克逊传记电影, 中国迈迷网站, 中文歌迷网站, 迈克尔·杰克逊:巨星之路, 迈克尔·杰克逊传记电影, 麥可傑克森, 傑克森, 麥可, Michael, Jackson, King of Pop, Michael Jackson, Chinese fanclub, fanclub, 歌迷, 胡萝卜烙饼网, MJJLB, MJ, 爱MJJ的烙饼, 偶像, 音乐, 流行音乐之王, 流行之王, 米高積遜, 積遜, 米高, 娱乐, 欧美音乐">
  8.     <meta name="description" content="2026年4月24日,迈克尔·杰克逊官方传记电影《迈克尔·杰克逊:巨星之路》将在全球震撼上映,为了让大家能尽情交流这部备受期待的作品,我们在中国迈迷网特别建立了这个专题宣传网页。无论你是从哪里来的迈迷朋友,都欢迎在此分享关于电影的爆料、最新消息,尽情讨论、吐槽、交流!">
  9.     <link rel="shortcut icon" href="http://michael.mjjlb.com/album.png">
  10.    
  11.     <style>
  12.         .play-button {
  13.             position: fixed;
  14.             top: 20px;
  15.             right: 20px;
  16.             width: 50px;
  17.             height: 50px;
  18.             background-color: #0066cc;
  19.             color: white;
  20.             border: none;
  21.             border-radius: 50%;
  22.             cursor: pointer;
  23.             z-index: 100;
  24.             display: flex;
  25.             align-items: center;
  26.             justify-content: center;
  27.             font-size: 14px;
  28.         }
  29.         .play-button:hover {
  30.             background-color: #0052a3;
  31.         }
  32.     </style>
  33. </head>
  34. <body style="background-color:#000000;">

  35.     <audio id="backgroundAudio">
  36.         <source src="http://michael.mjjlb.com/mjjlb.mp3" type="audio/mpeg">
  37.     </audio>
  38.     <button class="play-button" id="playButton">
  39.         播放
  40.     </button>
  41.    
  42.     <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
  43.         <tr>
  44.             <td> </td>
  45.         </tr>
  46.         <tr>
  47.             <td height="600" style="background-image:url(http://michael.mjjlb.com/bac.jpg);background-position:center;background-repeat: no-repeat;background-attachment: fixed;"><div align="center"><img src="http://michael.mjjlb.com/album.png" width="590" height="587" alt=""></div></td>
  48.         </tr>
  49.         <tr>
  50.             <td><div align="center"><img src="http://michael.mjjlb.com/botton.jpg" width="464" height="97" border="0" usemap="#Map" alt=""></div></td>
  51.         </tr>
  52.     </table>
  53.     <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
  54.         <tr>
  55.             <td><div align="center" style="color:#FFFFFF;">中国迈迷网 - 迈克尔·杰克逊中国歌迷自发创建的非营利性歌迷网上平台</div></td>
  56.         </tr>
  57.     </table>
  58.     <map name="Map">
  59.         <area shape="rect" coords="6,34,98,68" href="http://pc.mjjlb.com" target="_blank" alt="">
  60.         <area shape="rect" coords="361,32,462,66" href="http://forum.mjjlb.com/mjjcfpw/forum.php?mod=forumdisplay&fid=5" target="_blank" alt="">
  61.         <area shape="rect" coords="111,34,349,65" href="http://michael.mjjlb.com/movie.php" target="_blank" alt="">
  62.     </map>
  63.    
  64.     <script>
  65.         document.addEventListener('DOMContentLoaded', function() {
  66.             var audio = document.getElementById('backgroundAudio');
  67.             var playButton = document.getElementById('playButton');
  68.             var isPlaying = false;
  69.             
  70.             playButton.addEventListener('click', function() {
  71.                 if (isPlaying) {
  72.                     audio.pause();
  73.                     playButton.innerHTML = '播放';
  74.                 } else {
  75.                     audio.play().catch(function(error) {
  76.                         console.log('音频播放失败,可能需要用户交互才能播放音频。', error);
  77.                     });
  78.                     playButton.innerHTML = '暂停';
  79.                 }
  80.                 isPlaying = !isPlaying;
  81.             });
  82.         });
  83.     </script>
  84. </body>
  85. </html>
复制代码

  1. <?php

  2. if (function_exists('error_reporting')) {
  3.     @error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT);
  4. }

  5. if (function_exists('date_default_timezone_set')) {
  6.     @date_default_timezone_set('Asia/Shanghai');
  7. }

  8. if (function_exists('session_start') && !session_id()) {
  9.     @session_start();
  10. }

  11. define('DATA_FILE', 'messages.json');
  12. define('REPLY_FILE', 'reply.json');
  13. define('HITS_FILE', 'hits.json');
  14. define('PAGE_SIZE', 15);
  15. define('ADMIN_PASS', 'Leoben');
  16. define('MAX_CONTENT_LENGTH', 50000);
  17. define('MAX_IMAGE_SIZE', 10485760);
  18. define('UPLOAD_DIR', 'uploads/');

  19. if (!function_exists('json_encode')) {

  20.     function json_encode_compat($data) {
  21.         if (is_null($data)) return 'null';
  22.         if ($data === false) return 'false';
  23.         if ($data === true) return 'true';
  24.         if (is_scalar($data)) {
  25.             if (is_float($data)) {
  26.                 return floatval(str_replace(",", ".", strval($data)));
  27.             }
  28.             if (is_string($data)) {
  29.                 static $jsonReplaces = array(array("\", "/", "\n", "\t", "\r", "\b", "\f", '"'), array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '"'));
  30.                 return '"' . str_replace($jsonReplaces[0], $jsonReplaces[1], $data) . '"';
  31.             } else {
  32.                 return $data;
  33.             }
  34.         }
  35.         $isList = true;
  36.         for ($i = 0, reset($data); $i < count($data); $i++, next($data)) {
  37.             if (key($data) !== $i) {
  38.                 $isList = false;
  39.                 break;
  40.             }
  41.         }
  42.         $result = array();
  43.         if ($isList) {
  44.             foreach ($data as $v) $result[] = json_encode_compat($v);
  45.             return '[' . join(',', $result) . ']';
  46.         } else {
  47.             foreach ($data as $k => $v) $result[] = json_encode_compat($k).':'.json_encode_compat($v);
  48.             return '{' . join(',', $result) . '}';
  49.         }
  50.     }
  51.    
  52.     function json_decode_compat($json, $assoc = false) {
  53.         if (trim($json) === '') return null;
  54.         $json = str_replace(array("\n","\r"), "", $json);
  55.         $json = preg_replace('/([{,]+)(\s*)([^"]+?)\s*:/','$1"$3":', $json);
  56.         $json = preg_replace('/(,)\s*}$/', '}', $json);
  57.         
  58.         if (function_exists('json_decode')) {
  59.             return json_decode($json, $assoc);
  60.         }
  61.         
  62.         if ($json[0] === '{') {
  63.             $json = substr($json, 1, -1);
  64.             $parts = explode(',', $json);
  65.             $result = $assoc ? array() : new stdClass();
  66.             foreach ($parts as $part) {
  67.                 if (strpos($part, ':') !== false) {
  68.                     list($key, $value) = explode(':', $part, 2);
  69.                     $key = trim($key, '"\'');
  70.                     $value = trim($value);
  71.                     
  72.                     if ($value[0] === '"') $value = substr($value, 1, -1);
  73.                     elseif ($value === 'true') $value = true;
  74.                     elseif ($value === 'false') $value = false;
  75.                     elseif ($value === 'null') $value = null;
  76.                     elseif (is_numeric($value)) $value = floatval($value);
  77.                     
  78.                     if ($assoc) {
  79.                         $result[$key] = $value;
  80.                     } else {
  81.                         $result->$key = $value;
  82.                     }
  83.                 }
  84.             }
  85.             return $result;
  86.         }
  87.         return null;
  88.     }
  89. }

  90. function read_json($filename, $default = array()) {
  91.     if (!file_exists($filename)) return $default;
  92.     $content = @file_get_contents($filename);
  93.     if (empty($content)) return $default;
  94.    
  95.     if (function_exists('json_decode')) {
  96.         $data = @json_decode($content, true);
  97.     } else {
  98.         $data = @json_decode_compat($content, true);
  99.     }
  100.    
  101.     return is_array($data) ? $data : $default;
  102. }

  103. function write_json($filename, $data) {
  104.     $dir = dirname($filename);
  105.     if (!is_dir($dir)) {
  106.         @mkdir($dir, 0755, true);
  107.     }
  108.    
  109.     if (function_exists('json_encode')) {
  110.         $content = @json_encode($data, JSON_UNESCAPED_UNICODE);
  111.     } else {
  112.         $content = @json_encode_compat($data);
  113.     }
  114.    
  115.     return @file_put_contents($filename, $content) !== false;
  116. }

  117. function generate_captcha() {
  118.     $chars = 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789';
  119.     $captcha = '';
  120.     for ($i = 0; $i < 4; $i++) {
  121.         $captcha .= $chars[mt_rand(0, strlen($chars) - 1)];
  122.     }
  123.     $_SESSION['captcha'] = $captcha;
  124.     return $captcha;
  125. }

  126. function safe_input($str) {
  127.     if (!function_exists('mb_convert_encoding')) {
  128.         $str = preg_replace('/[^\x00-\x7F]/', '', $str);
  129.     }
  130.     $str = trim($str);
  131.     $str = htmlspecialchars($str, ENT_QUOTES, 'UTF-8');
  132.     return $str;
  133. }

  134. function safe_output($str) {
  135.     $str = htmlspecialchars($str, ENT_QUOTES, 'UTF-8');
  136.     $str = nl2br($str);
  137.     return $str;
  138. }

  139. function validate_image_url($url) {
  140.     $url = trim($url);
  141.     if (empty($url)) return '';
  142.    
  143.     if (!preg_match('#^https?://#i', $url)) return '';
  144.    
  145.     $path = parse_url($url, PHP_URL_PATH);
  146.     $ext = strtolower(pathinfo($path, PATHINFO_EXTENSION));
  147.     $allowed = array('jpg', 'jpeg', 'png', 'gif', 'webp', 'bmp');
  148.    
  149.     if (in_array($ext, $allowed)) {
  150.         return $url;
  151.     }
  152.    
  153.     return '';
  154. }

  155. function is_admin() {
  156.     return isset($_SESSION['admin_logged_in']) && $_SESSION['admin_logged_in'] === true;
  157. }

  158. function csrf_token() {
  159.     if (!isset($_SESSION['csrf_token'])) {
  160.         $_SESSION['csrf_token'] = md5(uniqid(mt_rand(), true));
  161.     }
  162.     return $_SESSION['csrf_token'];
  163. }

  164. function verify_csrf($token) {
  165.     return isset($_SESSION['csrf_token']) && $_SESSION['csrf_token'] === $token;
  166. }

  167. if (!isset($_SESSION['captcha'])) {
  168.     generate_captcha();
  169. }

  170. $hits = read_json(HITS_FILE, array('total' => 0, 'today' => 0, 'date' => date('Y-m-d')));
  171. $hits['total']++;
  172. if ($hits['date'] !== date('Y-m-d')) {
  173.     $hits['today'] = 1;
  174.     $hits['date'] = date('Y-m-d');
  175. } else {
  176.     $hits['today']++;
  177. }
  178. write_json(HITS_FILE, $hits);

  179. if ($_SERVER['REQUEST_METHOD'] === 'POST') {
  180.     $action = isset($_POST['action']) ? $_POST['action'] : '';
  181.    
  182.     if ($action === 'post_message') {
  183.         if (!verify_csrf($_POST['csrf_token'])) {
  184.             die('<script>alert("安全验证失败,请刷新页面重试");location.href="' . $_SERVER['PHP_SELF'] . '";</script>');
  185.         }
  186.         
  187.         $name = isset($_POST['name']) ? safe_input($_POST['name']) : '';
  188.         $content = isset($_POST['content']) ? safe_input($_POST['content']) : '';
  189.         $image = isset($_POST['image']) ? validate_image_url($_POST['image']) : '';
  190.         $captcha = isset($_POST['captcha']) ? strtoupper($_POST['captcha']) : '';
  191.         $session_captcha = isset($_SESSION['captcha']) ? strtoupper($_SESSION['captcha']) : '';
  192.         
  193.         if (empty($captcha) || $captcha !== $session_captcha) {
  194.             die('<script>alert("验证码错误");history.back();</script>');
  195.         }
  196.         
  197.         if (empty($name) || empty($content)) {
  198.             die('<script>alert("标题和内容不能为空");history.back();</script>');
  199.         }
  200.         
  201.         $messages = read_json(DATA_FILE);
  202.         $id = 1;
  203.         if (!empty($messages)) {
  204.             $keys = array_keys($messages);
  205.             $id = max($keys) + 1;
  206.         }
  207.         
  208.         $messages[$id] = array(
  209.             'name' => $name,
  210.             'content' => $content,
  211.             'image' => $image,
  212.             'time' => date('Y-m-d H:i:s'),
  213.             'like' => 0,
  214.             'dislike' => 0,
  215.             'ip' => isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '0.0.0.0'
  216.         );
  217.         
  218.         if (write_json(DATA_FILE, $messages)) {
  219.             generate_captcha();
  220.             header('Location: ' . $_SERVER['PHP_SELF'] . '?success=1');
  221.             exit;
  222.         } else {
  223.             die('<script>alert("保存失败,请重试");history.back();</script>');
  224.         }
  225.     }
  226.    
  227.     if ($action === 'vote') {
  228.         if (!verify_csrf($_POST['csrf_token'])) {
  229.             die('安全验证失败');
  230.         }
  231.         
  232.         $id = intval($_POST['id']);
  233.         $type = $_POST['type'] === 'like' ? 'like' : 'dislike';
  234.         
  235.         $vote_key = 'vote_' . $id;
  236.         if (isset($_SESSION[$vote_key])) {
  237.             header('Location: ' . $_SERVER['PHP_SELF'] . '?page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1) . '#msg-' . $id);
  238.             exit;
  239.         }
  240.         
  241.         $messages = read_json(DATA_FILE);
  242.         if (isset($messages[$id])) {
  243.             $messages[$id][$type]++;
  244.             write_json(DATA_FILE, $messages);
  245.             $_SESSION[$vote_key] = true;
  246.         }
  247.         
  248.         header('Location: ' . $_SERVER['PHP_SELF'] . '?page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1) . '#msg-' . $id);
  249.         exit;
  250.     }
  251.    
  252.     if ($action === 'post_reply') {
  253.         if (!verify_csrf($_POST['csrf_token'])) {
  254.             die('安全验证失败');
  255.         }
  256.         
  257.         $pid = intval($_POST['pid']);
  258.         $rname = isset($_POST['rname']) ? safe_input($_POST['rname']) : '';
  259.         $rcontent = isset($_POST['rcontent']) ? safe_input($_POST['rcontent']) : '';
  260.         
  261.         if (empty($rname) || empty($rcontent)) {
  262.             die('<script>alert("昵称和回复内容不能为空");history.back();</script>');
  263.         }
  264.         
  265.         $messages = read_json(DATA_FILE);
  266.         if (!isset($messages[$pid])) {
  267.             die('<script>alert("留言不存在");history.back();</script>');
  268.         }
  269.         
  270.         $reply = read_json(REPLY_FILE);
  271.         $rid = 1;
  272.         if (!empty($reply)) {
  273.             $keys = array_keys($reply);
  274.             $rid = max($keys) + 1;
  275.         }
  276.         
  277.         $reply[$rid] = array(
  278.             'pid' => $pid,
  279.             'name' => $rname,
  280.             'content' => $rcontent,
  281.             'time' => date('Y-m-d H:i:s'),
  282.             'ip' => isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '0.0.0.0'
  283.         );
  284.         
  285.         write_json(REPLY_FILE, $reply);
  286.         header('Location: ' . $_SERVER['PHP_SELF'] . '?page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1) . '#msg-' . $pid);
  287.         exit;
  288.     }
  289.    
  290.     if ($action === 'admin_login') {
  291.         $password = isset($_POST['password']) ? $_POST['password'] : '';
  292.         if ($password === ADMIN_PASS) {
  293.             $_SESSION['admin_logged_in'] = true;
  294.             header('Location: ' . $_SERVER['PHP_SELF']);
  295.             exit;
  296.         } else {
  297.             die('<script>alert("密码错误");history.back();</script>');
  298.         }
  299.     }
  300.    
  301.     if ($action === 'admin_logout') {
  302.         unset($_SESSION['admin_logged_in']);
  303.         header('Location: ' . $_SERVER['PHP_SELF']);
  304.         exit;
  305.     }
  306.    
  307.     if ($action === 'delete_message' && is_admin()) {
  308.         if (!verify_csrf($_POST['csrf_token'])) {
  309.             die('安全验证失败');
  310.         }
  311.         
  312.         $id = intval($_POST['id']);
  313.         $messages = read_json(DATA_FILE);
  314.         
  315.         if (isset($messages[$id])) {
  316.             unset($messages[$id]);
  317.             write_json(DATA_FILE, $messages);
  318.             
  319.             $reply = read_json(REPLY_FILE);
  320.             foreach ($reply as $rid => $r) {
  321.                 if ($r['pid'] == $id) {
  322.                     unset($reply[$rid]);
  323.                 }
  324.             }
  325.             write_json(REPLY_FILE, $reply);
  326.         }
  327.         
  328.         header('Location: ' . $_SERVER['PHP_SELF'] . '?page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1));
  329.         exit;
  330.     }
  331.    
  332.     if ($action === 'delete_reply' && is_admin()) {
  333.         if (!verify_csrf($_POST['csrf_token'])) {
  334.             die('安全验证失败');
  335.         }
  336.         
  337.         $rid = intval($_POST['rid']);
  338.         $reply = read_json(REPLY_FILE);
  339.         
  340.         if (isset($reply[$rid])) {
  341.             unset($reply[$rid]);
  342.             write_json(REPLY_FILE, $reply);
  343.         }
  344.         
  345.         header('Location: ' . $_SERVER['PHP_SELF'] . '?page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1));
  346.         exit;
  347.     }
  348. }

  349. $messages = read_json(DATA_FILE);
  350. $total = count($messages);
  351. $messages = array_reverse($messages, true);

  352. $page = isset($_GET['page']) ? intval($_GET['page']) : 1;
  353. $page = max(1, $page);
  354. $total_pages = max(1, ceil($total / PAGE_SIZE));
  355. $page = min($page, $total_pages);
  356. $offset = ($page - 1) * PAGE_SIZE;
  357. $list = array_slice($messages, $offset, PAGE_SIZE, true);

  358. $reply = read_json(REPLY_FILE);

  359. if (isset($_GET['refresh_captcha'])) {
  360.     echo generate_captcha();
  361.     exit;
  362. }
  363. ?>
  364. <!DOCTYPE html>
  365. <html lang="zh-CN">
  366. <head>
  367.     <meta charset="UTF-8">
  368.     <title>迈克尔·杰克逊官方传记电影《迈克尔·杰克逊:巨星之路》专题宣传网页</title>
  369.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  370.     <meta name="keywords" content="迈克尔传记电影, 杰克逊传记电影, 中国迈迷网站, 中文歌迷网站, 迈克尔·杰克逊:巨星之路, 迈克尔·杰克逊传记电影, 麥可傑克森, 傑克森, 麥可, Michael, Jackson, King of Pop, Michael Jackson, Chinese fanclub, fanclub, 歌迷, 巨星之路, MJJLB, MJ, 爱MJJ的烙饼, 偶像, 音乐, 流行音乐之王, 流行之王, 米高積遜, 積遜, 米高, 娱乐, 欧美音乐">
  371.     <meta name="description" content="2026年4月24日,迈克尔·杰克逊官方传记电影《迈克尔·杰克逊:巨星之路》将在全球震撼上映,为了让大家能尽情交流这部备受期待的作品,我们在中国迈迷网特别建立了这个专题宣传网页。无论你是从哪里来的迈迷朋友,都欢迎在此分享关于电影的爆料、最新消息,尽情讨论、吐槽、交流!">
  372.     <style>
  373.         * {
  374.             margin: 0;
  375.             padding: 0;
  376.             box-sizing: border-box;
  377.         }
  378.         
  379.         body {
  380.             font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
  381.             background: #f5f5f5;
  382.             color: #333;
  383.             line-height: 1.6;
  384.         }
  385.         
  386.         .container {
  387.             max-width: 1200px;
  388.             margin: 0 auto;
  389.             padding: 20px;
  390.         }
  391.         
  392.         .site-header {
  393.             background: linear-gradient(135deg, #000 0%, #222 100%);
  394.             color: white;
  395.             padding: 20px 0;
  396.             margin-bottom: 30px;
  397.             border-bottom: 3px solid #c00;
  398.         }
  399.         
  400.         .header-content {
  401.             max-width: 1200px;
  402.             margin: 0 auto;
  403.             padding: 0 20px;
  404.             display: flex;
  405.             justify-content: space-between;
  406.             align-items: center;
  407.             flex-wrap: wrap;
  408.         }
  409.         
  410.         .logo-area {
  411.             display: flex;
  412.             align-items: center;
  413.             gap: 15px;
  414.         }
  415.         
  416.         .logo {
  417.             font-size: 28px;
  418.             font-weight: bold;
  419.             color: white;
  420.             text-decoration: none;
  421.         }
  422.         
  423.         .logo span {
  424.             color: #c00;
  425.         }
  426.         
  427.         .site-nav ul {
  428.             display: flex;
  429.             list-style: none;
  430.             gap: 20px;
  431.         }
  432.         
  433.         .site-nav a {
  434.             color: white;
  435.             text-decoration: none;
  436.             padding: 5px 10px;
  437.             border-radius: 3px;
  438.             transition: background-color 0.3s;
  439.         }
  440.         
  441.         .site-nav a:hover {
  442.             background-color: rgba(255, 255, 255, 0.1);
  443.         }
  444.         
  445.         .admin-panel {
  446.             position: fixed;
  447.             top: 20px;
  448.             right: 20px;
  449.             z-index: 1000;
  450.         }
  451.         
  452.         .admin-login-form {
  453.             background: white;
  454.             padding: 15px;
  455.             border-radius: 5px;
  456.             box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  457.             display: none;
  458.             position: absolute;
  459.             top: 100%;
  460.             right: 0;
  461.             min-width: 200px;
  462.         }
  463.         
  464.         .main-content {
  465.             background: white;
  466.             border-radius: 8px;
  467.             padding: 30px;
  468.             box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  469.         }
  470.         
  471.         .page-title {
  472.             color: #333;
  473.             margin-bottom: 30px;
  474.             padding-bottom: 15px;
  475.             border-bottom: 2px solid #c00;
  476.             font-size: 24px;
  477.         }
  478.         
  479.         .success-message {
  480.             background: #d4edda;
  481.             color: #155724;
  482.             padding: 15px;
  483.             border-radius: 5px;
  484.             margin-bottom: 20px;
  485.             text-align: center;
  486.         }
  487.         
  488.         .post-form {
  489.             background: #f9f9f9;
  490.             padding: 20px;
  491.             border-radius: 8px;
  492.             margin-bottom: 30px;
  493.             border: 1px solid #eee;
  494.         }
  495.         
  496.         .form-group {
  497.             margin-bottom: 15px;
  498.         }
  499.         
  500.         .form-label {
  501.             display: block;
  502.             margin-bottom: 5px;
  503.             font-weight: bold;
  504.             color: #555;
  505.         }
  506.         
  507.         .form-input,
  508.         .form-textarea {
  509.             width: 100%;
  510.             padding: 10px;
  511.             border: 1px solid #ddd;
  512.             border-radius: 4px;
  513.             font-size: 14px;
  514.             font-family: inherit;
  515.         }
  516.         
  517.         .form-textarea {
  518.             min-height: 100px;
  519.             resize: vertical;
  520.         }
  521.         
  522.         .captcha-area {
  523.             display: flex;
  524.             align-items: center;
  525.             gap: 10px;
  526.             margin-bottom: 15px;
  527.         }
  528.         
  529.         .captcha-code {
  530.             background: #333;
  531.             color: white;
  532.             font-size: 20px;
  533.             font-weight: bold;
  534.             padding: 8px 15px;
  535.             border-radius: 4px;
  536.             letter-spacing: 3px;
  537.             user-select: none;
  538.             min-width: 120px;
  539.             text-align: center;
  540.         }
  541.         
  542.         .captcha-refresh {
  543.             color: #c00;
  544.             text-decoration: none;
  545.             font-size: 13px;
  546.         }
  547.         
  548.         .captcha-refresh:hover {
  549.             text-decoration: underline;
  550.         }
  551.         
  552.         .submit-btn {
  553.             background: #c00;
  554.             color: white;
  555.             border: none;
  556.             padding: 10px 25px;
  557.             border-radius: 4px;
  558.             font-size: 16px;
  559.             cursor: pointer;
  560.             transition: background-color 0.3s;
  561.         }
  562.         
  563.         .submit-btn:hover {
  564.             background: #a00;
  565.         }
  566.         
  567.         .message-list {
  568.             margin-bottom: 30px;
  569.         }
  570.         
  571.         .message-item {
  572.             background: white;
  573.             border: 1px solid #eee;
  574.             border-radius: 6px;
  575.             padding: 20px;
  576.             margin-bottom: 20px;
  577.             transition: box-shadow 0.3s;
  578.         }
  579.         
  580.         .message-item:hover {
  581.             box-shadow: 0 3px 15px rgba(0,0,0,0.1);
  582.         }
  583.         
  584.         .message-header {
  585.             display: flex;
  586.             justify-content: space-between;
  587.             align-items: center;
  588.             margin-bottom: 15px;
  589.             flex-wrap: wrap;
  590.             gap: 10px;
  591.         }
  592.         
  593.         .message-title {
  594.             color: #333;
  595.             font-size: 18px;
  596.             font-weight: bold;
  597.             margin: 0;
  598.         }
  599.         
  600.         .message-time {
  601.             color: #999;
  602.             font-size: 13px;
  603.             background: #f5f5f5;
  604.             padding: 3px 8px;
  605.             border-radius: 3px;
  606.         }
  607.         
  608.         .message-content {
  609.             color: #444;
  610.             line-height: 1.8;
  611.             margin-bottom: 15px;
  612.         }
  613.         
  614.         .message-image {
  615.             max-width: 100%;
  616.             height: auto;
  617.             border-radius: 4px;
  618.             margin: 10px 0;
  619.             cursor: pointer;
  620.         }
  621.         
  622.         .message-footer {
  623.             display: flex;
  624.             justify-content: space-between;
  625.             align-items: center;
  626.             flex-wrap: wrap;
  627.             gap: 10px;
  628.             padding-top: 15px;
  629.             border-top: 1px solid #eee;
  630.         }
  631.         
  632.         .vote-buttons {
  633.             display: flex;
  634.             gap: 10px;
  635.         }
  636.         
  637.         .vote-btn {
  638.             background: #f5f5f5;
  639.             border: 1px solid #ddd;
  640.             padding: 5px 12px;
  641.             border-radius: 20px;
  642.             cursor: pointer;
  643.             display: flex;
  644.             align-items: center;
  645.             gap: 5px;
  646.             transition: all 0.3s;
  647.         }
  648.         
  649.         .vote-btn:hover {
  650.             transform: translateY(-2px);
  651.         }
  652.         
  653.         .like-btn:hover {
  654.             background: #e8f5e9;
  655.             border-color: #4caf50;
  656.         }
  657.         
  658.         .dislike-btn:hover {
  659.             background: #ffebee;
  660.             border-color: #f44336;
  661.         }
  662.         
  663.         .action-buttons {
  664.             display: flex;
  665.             gap: 10px;
  666.         }
  667.         
  668.         .action-btn {
  669.             background: #333;
  670.             color: white;
  671.             border: none;
  672.             padding: 6px 12px;
  673.             border-radius: 4px;
  674.             cursor: pointer;
  675.             font-size: 13px;
  676.             text-decoration: none;
  677.         }
  678.         
  679.         .action-btn:hover {
  680.             background: #555;
  681.         }
  682.         
  683.         .btn-danger {
  684.             background: #d32f2f;
  685.         }
  686.         
  687.         .btn-danger:hover {
  688.             background: #b71c1c;
  689.         }
  690.         
  691.         .reply-form {
  692.             background: #f9f9f9;
  693.             padding: 15px;
  694.             border-radius: 6px;
  695.             margin-top: 15px;
  696.             display: none;
  697.         }
  698.         
  699.         .reply-list {
  700.             margin-top: 15px;
  701.         }
  702.         
  703.         .reply-item {
  704.             background: #f9f9f9;
  705.             padding: 12px;
  706.             border-radius: 6px;
  707.             margin-top: 10px;
  708.             border-left: 3px solid #c00;
  709.         }
  710.         
  711.         .reply-header {
  712.             display: flex;
  713.             justify-content: space-between;
  714.             align-items: center;
  715.             margin-bottom: 8px;
  716.             flex-wrap: wrap;
  717.             gap: 5px;
  718.         }
  719.         
  720.         .reply-author {
  721.             color: #333;
  722.             font-weight: bold;
  723.         }
  724.         
  725.         .reply-time {
  726.             color: #999;
  727.             font-size: 12px;
  728.         }
  729.         
  730.         .reply-content {
  731.             color: #555;
  732.         }
  733.         
  734.         /* 分页样式 */
  735.         .pagination {
  736.             display: flex;
  737.             justify-content: center;
  738.             gap: 5px;
  739.             margin: 30px 0;
  740.             flex-wrap: wrap;
  741.         }
  742.         
  743.         .page-link {
  744.             padding: 8px 12px;
  745.             background: white;
  746.             border: 1px solid #ddd;
  747.             border-radius: 4px;
  748.             text-decoration: none;
  749.             color: #333;
  750.             transition: all 0.3s;
  751.         }
  752.         
  753.         .page-link:hover {
  754.             background: #f5f5f5;
  755.         }
  756.         
  757.         .page-active {
  758.             background: #c00;
  759.             color: white;
  760.             border-color: #c00;
  761.         }

  762.         .site-stats {
  763.             text-align: center;
  764.             color: #666;
  765.             font-size: 14px;
  766.             padding: 15px;
  767.             background: #f9f9f9;
  768.             border-radius: 6px;
  769.             margin-top: 30px;
  770.         }

  771.         .site-footer {
  772.             background: #333;
  773.             color: #aaa;
  774.             padding: 30px 0;
  775.             margin-top: 50px;
  776.         }
  777.         
  778.         .footer-content {
  779.             max-width: 1200px;
  780.             margin: 0 auto;
  781.             padding: 0 20px;
  782.             text-align: center;
  783.         }
  784.         
  785.         .copyright {
  786.             font-size: 13px;
  787.             color: #888;
  788.             margin-top: 20px;
  789.         }

  790.         .image-modal {
  791.             display: none;
  792.             position: fixed;
  793.             top: 0;
  794.             left: 0;
  795.             width: 100%;
  796.             height: 100%;
  797.             background: rgba(0,0,0,0.9);
  798.             z-index: 2000;
  799.             align-items: center;
  800.             justify-content: center;
  801.         }
  802.         
  803.         .modal-image {
  804.             max-width: 90%;
  805.             max-height: 90%;
  806.             border-radius: 8px;
  807.         }
  808.         
  809.         .close-modal {
  810.             position: absolute;
  811.             top: 20px;
  812.             right: 20px;
  813.             color: white;
  814.             font-size: 40px;
  815.             cursor: pointer;
  816.             background: none;
  817.             border: none;
  818.         }

  819.         @media (max-width: 768px) {
  820.             .header-content {
  821.                 flex-direction: column;
  822.                 gap: 15px;
  823.             }
  824.             
  825.             .site-nav ul {
  826.                 justify-content: center;
  827.                 flex-wrap: wrap;
  828.             }
  829.             
  830.             .admin-panel {
  831.                 position: static;
  832.                 margin-top: 15px;
  833.             }
  834.             
  835.             .main-content {
  836.                 padding: 15px;
  837.             }
  838.             
  839.             .message-header {
  840.                 flex-direction: column;
  841.                 align-items: flex-start;
  842.             }
  843.             
  844.             .message-footer {
  845.                 flex-direction: column;
  846.                 align-items: flex-start;
  847.             }
  848.             
  849.             .vote-buttons {
  850.                 width: 100%;
  851.                 justify-content: flex-start;
  852.             }
  853.             
  854.             .action-buttons {
  855.                 width: 100%;
  856.                 justify-content: flex-start;
  857.             }
  858.             
  859.             .captcha-area {
  860.                 flex-direction: column;
  861.                 align-items: flex-start;
  862.             }
  863.         }
  864.     </style>
  865. </head>
  866. <body>
  867.     <div class="image-modal" id="imageModal">
  868.         <button class="close-modal" onclick="closeModal()">&times;</button>
  869.         <img class="modal-image" id="modalImage" src="" alt="预览图片">
  870.     </div>

  871.     <header class="site-header">
  872.         <div class="header-content">
  873.             <div class="logo-area">
  874.                 <a href="http://michael.mjjlb.com" class="logo"><span>michael</span>.mjjlb.com</a>
  875.             </div>
  876.             <nav class="site-nav">
  877.                 <ul>
  878.                     <li><a href="http://michael.mjjlb.com">网站首页</a></li>
  879.                     <li><a href="#post">发表留言</a></li>
  880.                     <li><a href="#messages">留言列表</a></li>
  881.                 </ul>
  882.             </nav>
  883.         </div>
  884.     </header>

  885.     <div class="admin-panel">
  886.         <?php if (is_admin()): ?>
  887.             <div style="background: white; padding: 8px 15px; border-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.1);">
  888.                 <span style="color: #c00; font-weight: bold;">管理员已登录</span>
  889.                 <form method="post" style="display: inline; margin-left: 10px;">
  890.                     <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  891.                     <input type="hidden" name="action" value="admin_logout">
  892.                     <button type="submit" class="action-btn btn-danger" style="padding: 3px 8px;">退出</button>
  893.                 </form>
  894.             </div>
  895.         <?php else: ?>
  896.             <button class="action-btn" onclick="toggleLoginForm()" style="background: #333; color: white; padding: 8px 15px;">管理员登录</button>
  897.             <div class="admin-login-form" id="loginForm">
  898.                 <form method="post">
  899.                     <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  900.                     <input type="hidden" name="action" value="admin_login">
  901.                     <div class="form-group">
  902.                         <label class="form-label">管理员密码:</label>
  903.                         <input type="password" name="password" class="form-input" required>
  904.                     </div>
  905.                     <button type="submit" class="submit-btn" style="width: 100%;">登录</button>
  906.                 </form>
  907.             </div>
  908.         <?php endif; ?>
  909.     </div>

  910.     <div class="container">
  911.         <main class="main-content">
  912.             <h1 class="page-title">迈克尔·杰克逊官方传记电影《迈克尔·杰克逊:巨星之路》专题宣传网页</h1>

  913.             <?php if (isset($_GET['success'])): ?>
  914.                 <div class="success-message">
  915.                     <strong>留言发表成功!</strong> 您的留言已成功提交。
  916.                 </div>
  917.             <?php endif; ?>

  918.             <div class="post-form" id="post">
  919.                 <form method="post" id="messageForm">
  920.                     <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  921.                     <input type="hidden" name="action" value="post_message">
  922.                     
  923.                     <div class="form-group">
  924.                         <label class="form-label">留言标题:</label>
  925.                         <input type="text" name="name" class="form-input" required placeholder="请输入留言标题" maxlength="50">
  926.                     </div>
  927.                     
  928.                     <div class="form-group">
  929.                         <label class="form-label">留言内容:</label>
  930.                         <textarea name="content" class="form-textarea" required placeholder="在这里写下您的留言内容..."></textarea>
  931.                     </div>
  932.                     
  933.                     <div class="form-group">
  934.                         <label class="form-label">图片链接(可选):</label>
  935.                         <input type="text" name="image" class="form-input" placeholder="支持jpg、png、gif、webp、bmp格式的图片">
  936.                     </div>
  937.                     
  938.                     <div class="form-group">
  939.                         <label class="form-label">验证码:</label>
  940.                         <div class="captcha-area">
  941.                             <div class="captcha-code" id="captchaDisplay"><?php echo $_SESSION['captcha']; ?></div>
  942.                             <input type="text" name="captcha" class="form-input" style="flex: 1;" required placeholder="请输入验证码" maxlength="4">
  943.                             <a href="javascript:void(0)" class="captcha-refresh" onclick="refreshCaptcha()">刷新验证码</a>
  944.                         </div>
  945.                     </div>
  946.                     
  947.                     <button type="submit" class="submit-btn">发表留言</button>
  948.                 </form>
  949.             </div>
  950.             
  951.             <div class="message-list" id="messages">
  952.                 <?php if (empty($list)): ?>
  953.                     <div style="text-align: center; padding: 40px; color: #999;">
  954.                         <h3>暂无留言</h3>
  955.                         <p>快来发表第一条留言吧!</p>
  956.                     </div>
  957.                 <?php else: ?>
  958.                     <?php foreach ($list as $id => $msg): ?>
  959.                         <div class="message-item" id="msg-<?php echo $id; ?>">
  960.                             <div class="message-header">
  961.                                 <h3 class="message-title"><?php echo safe_output($msg['name']); ?></h3>
  962.                                 <span class="message-time"><?php echo $msg['time']; ?></span>
  963.                             </div>
  964.                            
  965.                             <div class="message-content">
  966.                                 <?php echo safe_output($msg['content']); ?>
  967.                             </div>
  968.                            
  969.                             <?php if (!empty($msg['image'])): ?>
  970.                                 <img src="<?php echo safe_output($msg['image']); ?>"
  971.                                      alt="留言图片"
  972.                                      class="message-image"
  973.                                      onclick="showImage('<?php echo safe_output($msg['image']); ?>')">
  974.                             <?php endif; ?>
  975.                            
  976.                             <div class="message-footer">
  977.                                 <div class="vote-buttons">
  978.                                     <form method="post" class="vote-form">
  979.                                         <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  980.                                         <input type="hidden" name="action" value="vote">
  981.                                         <input type="hidden" name="id" value="<?php echo $id; ?>">
  982.                                         <input type="hidden" name="type" value="like">
  983.                                         <button type="submit" class="vote-btn like-btn">
  984.                                             <span>👍</span>
  985.                                             <span><?php echo isset($msg['like']) ? $msg['like'] : 0; ?></span>
  986.                                         </button>
  987.                                     </form>
  988.                                     
  989.                                     <form method="post" class="vote-form">
  990.                                         <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  991.                                         <input type="hidden" name="action" value="vote">
  992.                                         <input type="hidden" name="id" value="<?php echo $id; ?>">
  993.                                         <input type="hidden" name="type" value="dislike">
  994.                                         <button type="submit" class="vote-btn dislike-btn">
  995.                                             <span>👎</span>
  996.                                             <span><?php echo isset($msg['dislike']) ? $msg['dislike'] : 0; ?></span>
  997.                                         </button>
  998.                                     </form>
  999.                                 </div>
  1000.                                 
  1001.                                 <div class="action-buttons">
  1002.                                     <button class="action-btn" onclick="showReplyBox(<?php echo $id; ?>)">回复</button>
  1003.                                     
  1004.                                     <?php if (is_admin()): ?>
  1005.                                         <form method="post" style="display: inline;" onsubmit="return confirm('确定要删除这条留言吗?');">
  1006.                                             <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  1007.                                             <input type="hidden" name="action" value="delete_message">
  1008.                                             <input type="hidden" name="id" value="<?php echo $id; ?>">
  1009.                                             <button type="submit" class="action-btn btn-danger">删除</button>
  1010.                                         </form>
  1011.                                     <?php endif; ?>
  1012.                                 </div>
  1013.                             </div>
  1014.                                 
  1015.                             <div class="reply-form" id="replyBox-<?php echo $id; ?>">
  1016.                                 <form method="post">
  1017.                                     <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  1018.                                     <input type="hidden" name="action" value="post_reply">
  1019.                                     <input type="hidden" name="pid" value="<?php echo $id; ?>">
  1020.                                     
  1021.                                     <div style="display: flex; gap: 10px; flex-wrap: wrap;">
  1022.                                         <input type="text" name="rname" class="form-input" style="flex: 1; min-width: 150px;" required placeholder="您的昵称">
  1023.                                         <input type="text" name="rcontent" class="form-input" style="flex: 2; min-width: 200px;" required placeholder="回复内容">
  1024.                                         <button type="submit" class="submit-btn" style="padding: 10px 15px;">发表回复</button>
  1025.                                     </div>
  1026.                                 </form>
  1027.                             </div>

  1028.                             <?php
  1029.                             $related_replies = array();
  1030.                             foreach ($reply as $rid => $r) {
  1031.                                 if ($r['pid'] == $id) {
  1032.                                     $related_replies[$rid] = $r;
  1033.                                 }
  1034.                             }
  1035.                             if (!empty($related_replies)):
  1036.                             ?>
  1037.                                 <div class="reply-list">
  1038.                                     <?php foreach ($related_replies as $rid => $reply_data): ?>
  1039.                                         <div class="reply-item">
  1040.                                             <div class="reply-header">
  1041.                                                 <span class="reply-author"><?php echo safe_output($reply_data['name']); ?></span>
  1042.                                                 <span class="reply-time"><?php echo $reply_data['time']; ?></span>
  1043.                                             </div>
  1044.                                             <div class="reply-content">
  1045.                                                 <?php echo safe_output($reply_data['content']); ?>
  1046.                                             </div>
  1047.                                             <?php if (is_admin()): ?>
  1048.                                                 <div style="text-align: right; margin-top: 10px;">
  1049.                                                     <form method="post" style="display: inline;" onsubmit="return confirm('确定要删除这条回复吗?');">
  1050.                                                         <input type="hidden" name="csrf_token" value="<?php echo csrf_token(); ?>">
  1051.                                                         <input type="hidden" name="action" value="delete_reply">
  1052.                                                         <input type="hidden" name="rid" value="<?php echo $rid; ?>">
  1053.                                                         <button type="submit" class="action-btn btn-danger" style="padding: 3px 8px; font-size: 12px;">删除</button>
  1054.                                                     </form>
  1055.                                                 </div>
  1056.                                             <?php endif; ?>
  1057.                                         </div>
  1058.                                     <?php endforeach; ?>
  1059.                                 </div>
  1060.                             <?php endif; ?>
  1061.                         </div>
  1062.                     <?php endforeach; ?>
  1063.                 <?php endif; ?>
  1064.             </div>
  1065.             
  1066.             <?php if ($total_pages > 1): ?>
  1067.                 <div class="pagination">
  1068.                     <?php if ($page > 1): ?>
  1069.                         <a href="?page=1" class="page-link">首页</a>
  1070.                         <a href="?page=<?php echo $page - 1; ?>" class="page-link">上一页</a>
  1071.                     <?php endif; ?>
  1072.                     
  1073.                     <?php
  1074.                     $start = max(1, $page - 2);
  1075.                     $end = min($total_pages, $start + 4);
  1076.                     if ($end - $start < 4) $start = max(1, $end - 4);
  1077.                     
  1078.                     for ($i = $start; $i <= $end; $i++):
  1079.                     ?>
  1080.                         <a href="?page=<?php echo $i; ?>" class="page-link <?php echo $i == $page ? 'page-active' : ''; ?>">
  1081.                             <?php echo $i; ?>
  1082.                         </a>
  1083.                     <?php endfor; ?>
  1084.                     
  1085.                     <?php if ($page < $total_pages): ?>
  1086.                         <a href="?page=<?php echo $page + 1; ?>" class="page-link">下一页</a>
  1087.                         <a href="?page=<?php echo $total_pages; ?>" class="page-link">尾页</a>
  1088.                     <?php endif; ?>
  1089.                 </div>
  1090.             <?php endif; ?>

  1091.             <div class="site-stats">
  1092.                 <p>
  1093.                     总留言:<?php echo $total; ?> 条 ·
  1094.                     今日浏览:<?php echo $hits['today']; ?> 次 ·
  1095.                     总浏览:<?php echo $hits['total']; ?> 次 ·
  1096.                     当前第 <?php echo $page; ?> 页/共 <?php echo $total_pages; ?> 页
  1097.                 </p>
  1098.             </div>
  1099.         </main>
  1100.     </div>

  1101.     <footer class="site-footer">
  1102.         <div class="footer-content">
  1103.             <p>《迈克尔·杰克逊:巨星之路》</p>
  1104.             <p>2026年4月24日,全球震撼上映!</p>
  1105.             <div class="copyright">
  1106.                 &copy; <?php echo date('Y'); ?> 中国迈迷网 - 迈克尔·杰克逊官方传记电影《迈克尔·杰克逊:巨星之路》专题宣传网页</div>
  1107.         </div>
  1108.     </footer>

  1109.     <script>
  1110.         function showReplyBox(id) {
  1111.             var replyBox = document.getElementById('replyBox-' + id);
  1112.             if (replyBox.style.display === 'block') {
  1113.                 replyBox.style.display = 'none';
  1114.             } else {
  1115.                 var allReplyBoxes = document.querySelectorAll('.reply-form');
  1116.                 allReplyBoxes.forEach(function(box) {
  1117.                     box.style.display = 'none';
  1118.                 });
  1119.                 replyBox.style.display = 'block';
  1120.                 replyBox.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
  1121.             }
  1122.         }
  1123.         
  1124.         function refreshCaptcha() {
  1125.             var xhr = new XMLHttpRequest();
  1126.             xhr.open('GET', '?refresh_captcha=1&t=' + new Date().getTime(), true);
  1127.             xhr.onreadystatechange = function() {
  1128.                 if (xhr.readyState === 4 && xhr.status === 200) {
  1129.                     document.getElementById('captchaDisplay').innerHTML = xhr.responseText;
  1130.                 }
  1131.             };
  1132.             xhr.send();
  1133.         }
  1134.         
  1135.         function showImage(src) {
  1136.             document.getElementById('modalImage').src = src;
  1137.             document.getElementById('imageModal').style.display = 'flex';
  1138.         }
  1139.         
  1140.         function closeModal() {
  1141.             document.getElementById('imageModal').style.display = 'none';
  1142.         }
  1143.         
  1144.         document.getElementById('imageModal').addEventListener('click', function(e) {
  1145.             if (e.target === this) closeModal();
  1146.         });
  1147.         
  1148.         function toggleLoginForm() {
  1149.             var form = document.getElementById('loginForm');
  1150.             form.style.display = form.style.display === 'block' ? 'none' : 'block';
  1151.         }
  1152.         
  1153.         window.addEventListener('load', function() {
  1154.             if (window.location.hash) {
  1155.                 var element = document.getElementById(window.location.hash.substring(1));
  1156.                 if (element) {
  1157.                     setTimeout(function() {
  1158.                         element.scrollIntoView({ behavior: 'smooth' });
  1159.                     }, 100);
  1160.                 }
  1161.             }
  1162.         });
  1163.         
  1164.         setTimeout(function() {
  1165.             var successMsg = document.querySelector('.success-message');
  1166.             if (successMsg) {
  1167.                 successMsg.style.opacity = '0';
  1168.                 successMsg.style.transition = 'opacity 0.5s';
  1169.                 setTimeout(function() {
  1170.                     successMsg.style.display = 'none';
  1171.                 }, 500);
  1172.             }
  1173.         }, 5000);
  1174.         
  1175.         document.getElementById('messageForm').addEventListener('submit', function(e) {
  1176.             var captchaInput = this.querySelector('input[name="captcha"]');
  1177.             if (captchaInput) {
  1178.                 captchaInput.value = captchaInput.value.toUpperCase();
  1179.             }
  1180.         });
  1181.         
  1182.         document.querySelectorAll('.vote-form').forEach(function(form) {
  1183.             form.addEventListener('submit', function(e) {
  1184.                 e.preventDefault();
  1185.                 var formData = new FormData(this);
  1186.                 var xhr = new XMLHttpRequest();
  1187.                 xhr.open('POST', '', true);
  1188.                 xhr.onreadystatechange = function() {
  1189.                     if (xhr.readyState === 4) {
  1190.                         if (xhr.status === 200) {
  1191.                             window.location.reload();
  1192.                         }
  1193.                     }
  1194.                 };
  1195.                 xhr.send(formData);
  1196.             });
  1197.         });
  1198.     </script>
  1199. </body>
  1200. </html>
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|迈克尔·杰克逊中国歌迷网站

GMT+8, 2026-2-21 21:43 , Processed in 0.131957 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表