查看文件: vip.bak.php
大小: 12.84 KB
类型: application/octet-stream
<html><head><base href="http://example.com/"> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>VIP會員中心</title> <style> body { font-family: Arial, sans-serif; margin: 0; padding: 0; background-color: #f0f0f0; display: flex; flex-direction: column; min-height: 100vh; padding-bottom: 60px; box-sizing: border-box; } .header { background-color: #000; color: #ffd700; padding: 10px 0; display: flex; justify-content: space-between; align-items: center; } .header-left { display: flex; align-items: center; } .menu-icon { font-size: 24px; margin: 0 15px; } .logo { font-size: 20px; font-weight: bold; } .search-bar { flex-grow: 1; margin: 0 20px; } .search-bar input { width: 100%; padding: 5px; border-radius: 5px; border: none; } .header-right { display: flex; align-items: center; } .header-icon { margin: 0 10px; font-size: 20px; } .login-btn { background-color: #ffd700; color: #000; padding: 5px 10px; border-radius: 5px; text-decoration: none; } .content { padding: 20px; background-color: #fff; margin: 20px; border-radius: 5px; } h1, h2 { color: #333; } .form-group { margin-bottom: 15px; } .form-group label { display: block; margin-bottom: 5px; } .form-group input { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; } .btn { background-color: #ffd700; color: #000; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; text-decoration: none; display: inline-block; margin-right: 10px; margin-bottom: 10px; } table { width: 100%; border-collapse: collapse; margin-top: 20px; } th, td { border: 1px solid #ddd; padding: 8px; text-align: left; } th { background-color: #f2f2f2; } .tab { overflow: hidden; border: 1px solid #ccc; background-color: #f1f1f1; margin-bottom: 20px; } .tab button { background-color: inherit; float: left; border: none; outline: none; cursor: pointer; padding: 14px 16px; transition: 0.3s; font-size: 17px; } .tab button:hover { background-color: #ddd; } .tab button.active { background-color: #ccc; } .tabcontent { display: none; padding: 6px 12px; border: 1px solid #ccc; border-top: none; } .vip-info { width: 95%; margin: 20px auto; background-color: #f9f9f9; border: 1px solid #ddd; border-radius: 5px; padding: 15px; margin-top: 20px; display: flex; justify-content: space-between; } .vip-section { flex: 1; padding: 10px; max-width: 100%; } .vip-section h3 { margin-top: 0; color: #333; border-bottom: 2px solid #ffd700; padding-bottom: 5px; } .vip-info p { margin: 10px 0; } .vip-info strong { display: inline-block; width: 150px; font-weight: bold; } footer { background-color: #000; color: #fff; text-align: center; padding: 10px; width: 100%; height: 60px; position: fixed; bottom: 0; } .status-badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 0.9em; margin-right: 5px; } .status-badge.active { color: white; } .status-badge.inactive { background-color: #e0e0e0; color: #666; display: inline-block; } #vip-status.active { background-color: #ffd700; color: black; } #collab-status.active { background-color: #4caf50; } #partner-status.active { background-color: #2196f3; } #feedback-status.active { background-color: #4caf50; color: white; } #feedback-status.paused { background-color: #ffa500; color: black; } #feedback-status.stopped { background-color: #ff0000; color: white; } .ml-6 { margin-left: 1.5rem; } .ml-4 { margin-left: 1rem; } .mt-2 { margin-top: 0.5rem; } .flex { display: flex; } .items-center { align-items: center; } .mr-2 { margin-right: 0.5rem; } .bg-gray-200 { background-color: #e5e7eb; } .px-2 { padding-left: 0.5rem; padding-right: 0.5rem; } .py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; } .rounded { border-radius: 0.25rem; } .p-4 { padding: 1rem; } .text-2xl { font-size: 1.5rem; line-height: 2rem; } .font-bold { font-weight: 700; } .mb-4 { margin-bottom: 1rem; } .daily-feedback { margin-bottom: 20px; } .daily-feedback h4 { margin-bottom: 10px; color: #333; } .daily-feedback table { width: 100%; border-collapse: collapse; } .daily-feedback th, .daily-feedback td { border: 1px solid #ddd; padding: 8px; text-align: left; } .daily-feedback th { background-color: #f2f2f2; } .relative-feedback-table { border-collapse: collapse; width: 100%; font-family: "微軟正黑體", Arial, sans-serif; } .relative-feedback-table th, .relative-feedback-table td { border: 1px solid #ddd; padding: 8px; text-align: center; } .relative-feedback-table th { background-color: #2c5d7c; color: white; } .relative-feedback-table tr:nth-child(even) { background-color: #f2f2f2; } .relative-feedback-table tr:hover { background-color: #ddd; } .relative-feedback-table th[title]:hover::after { content: attr(title); position: absolute; background-color: #333; color: #fff; padding: 5px; border-radius: 3px; font-size: 14px; white-space: nowrap; } .consumption-feedback-table { border-collapse: collapse; width: 100%; font-family: Arial, sans-serif; } .consumption-feedback-table th, .consumption-feedback-table td { border: 1px solid #ddd; padding: 8px; text-align: center; } .consumption-feedback-table th { background-color: #4a6572; color: white; } .consumption-feedback-table tr:nth-child(even) { background-color: #f2f2f2; } .consumption-feedback-table tr:hover { background-color: #ddd; } .main-content { min-height: calc(100vh - 60px); padding-bottom: 60px; box-sizing: border-box; } </style> <script src="https://unpkg.com/react@17/umd/react.development.js"></script> <script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script> <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script> </head> <body> <div class="main-content"> <div class="content"> <h1> </h1> <div id="friend-network" class="content-section" > <div id="react-root"></div> </div> </div> <script> function toggleSection(sectionId) { var section = document.getElementById(sectionId); if (section.style.display === "none" || section.style.display === "") { document.querySelectorAll('.content-section').forEach(function(el) { el.style.display = 'none'; }); section.style.display = "block"; // If the history-feedback section is being opened, trigger the default tab if (sectionId === 'history-feedback') { document.getElementById('defaultOpen').click(); } } else { section.style.display = "none"; } } function openTab(evt, tabName) { var i, tabcontent, tablinks; tabcontent = document.getElementsByClassName("tabcontent"); for (i = 0; i < tabcontent.length; i++) { tabcontent[i].style.display = "none"; } tablinks = document.getElementsByClassName("tablinks"); for (i = 0; i < tablinks.length; i++) { tablinks[i].className = tablinks[i].className.replace(" active", ""); } document.getElementById(tabName).style.display = "block"; evt.currentTarget.className += " active"; } document.addEventListener('DOMContentLoaded', function() { // Set VIP status document.getElementById('vip-status').classList.add('active'); document.getElementById('vip-status').classList.remove('inactive'); // Set Collaboration status (LV4) document.getElementById('collab-status').classList.add('active'); document.getElementById('collab-status').classList.remove('inactive'); document.getElementById('collab-status').textContent = '協銷LV4'; // Set Partner status (inactive) document.getElementById('partner-status').classList.add('inactive'); document.getElementById('partner-status').classList.remove('active'); // Set feedback status const feedbackStatus = 'active'; // This can be 'active', 'paused', or 'stopped' document.getElementById('feedback-status').className = `status-badge ${feedbackStatus}`; document.getElementById('feedback-status').textContent = feedbackStatus === 'active' ? '正常' : feedbackStatus === 'paused' ? '暫停' : '停止'; // Always display all feedback statuses, but set inactive ones to gray document.getElementById('feedback-status-paused').className = `status-badge ${feedbackStatus === 'paused' ? 'active' : 'inactive'}`; document.getElementById('feedback-status-stopped').className = `status-badge ${feedbackStatus === 'stopped' ? 'active' : 'inactive'}`; document.querySelector('#relative-feedback h3').textContent = '消費相對回饋歷史記錄'; }); </script> <script type="text/babel"> const Node = ({ name, children, level }) => { const [isExpanded, setIsExpanded] = React.useState(true); const hasChildren = children && children.length > 0; return ( <div className="ml-6"> <div className="flex items-center"> { level<3 && hasChildren && ( <button onClick={() => setIsExpanded(!isExpanded)} className="mr-2"> {isExpanded ? '▼' : '▶'} </button> ) } <span className="bg-gray-200 px-2 py-1 rounded"> {name} (第{level-1}層) </span> </div> { level<3 && isExpanded && children && ( <div className="ml-4 mt-2"> {children.map((child, index) => ( <Node key={index} {...child} level={level + 1} /> ))} </div> )} </div> ); }; const VIPMemberChart = () => { const data = <? include "showroot.php"; ?> return ( <div className="p-4"> <h2 className="text-2xl font-bold mb-4">VIP會員</h2> <Node {...data} level={1} /> </div> ); }; ReactDOM.render(<VIPMemberChart />, document.getElementById('react-root')); </script> <footer> <p>© 2024 版權所有</p> </footer> </div> </body></html>
保存
取消
返回文件列表