149 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			149 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| {include file="public/header" /}
 | |
| <style>
 | |
|     .dashboard-container {
 | |
|         padding: 20px;
 | |
|         font-family: 'Helvetica Neue', Arial, sans-serif;
 | |
|     }
 | |
|     .welcome-header {
 | |
|         text-align: center;
 | |
|         margin-bottom: 30px;
 | |
|     }
 | |
|     .welcome-header h1 {
 | |
|         color: #3881fd;
 | |
|         font-weight: 300;
 | |
|         font-size: 28px;
 | |
|         margin-bottom: 10px;
 | |
|     }
 | |
|     .stats-container {
 | |
|         display: flex;
 | |
|         flex-wrap: wrap;
 | |
|         gap: 20px;
 | |
|         justify-content: center;
 | |
|         margin-bottom: 30px;
 | |
|     }
 | |
|     .stat-card {
 | |
|         background-color: #fff;
 | |
|         border-radius: 8px;
 | |
|         box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
 | |
|         padding: 20px;
 | |
|         min-width: 200px;
 | |
|         flex: 1;
 | |
|         transition: all 0.3s ease;
 | |
|     }
 | |
|     .stat-card:hover {
 | |
|         transform: translateY(-5px);
 | |
|         box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
 | |
|     }
 | |
|     .stat-card .stat-value {
 | |
|         font-size: 24px;
 | |
|         font-weight: bold;
 | |
|         color: #3881fd;
 | |
|         margin: 10px 0;
 | |
|     }
 | |
|     .stat-card .stat-title {
 | |
|         color: #7f8c8d;
 | |
|         font-size: 14px;
 | |
|     }
 | |
|     .quick-actions {
 | |
|         background-color: #fff;
 | |
|         border-radius: 8px;
 | |
|         box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
 | |
|         padding: 20px;
 | |
|         margin-bottom: 20px;
 | |
|     }
 | |
|     .quick-actions h2 {
 | |
|         color: #2c3e50;
 | |
|         font-size: 18px;
 | |
|         margin-bottom: 15px;
 | |
|         font-weight: 500;
 | |
|     }
 | |
|     .action-buttons {
 | |
|         display: flex;
 | |
|         flex-wrap: wrap;
 | |
|         gap: 10px;
 | |
|     }
 | |
|     .action-button {
 | |
|         background-color: #f8f9fa;
 | |
|         border: none;
 | |
|         border-radius: 4px;
 | |
|         padding: 10px 15px;
 | |
|         color: #3881fd;
 | |
|         cursor: pointer;
 | |
|         transition: background-color 0.3s;
 | |
|     }
 | |
|     .action-button:hover {
 | |
|         background-color: #e9ecef;
 | |
|     }
 | |
| </style>
 | |
| 
 | |
| <div class="dashboard-container">
 | |
|     <div class="welcome-header">
 | |
|         <h1>欢迎使用{$config['admin_name']}</h1>
 | |
|         <p>今天是 <span id="current-time"></span>,祝您工作愉快</p>
 | |
|     </div>
 | |
|     
 | |
|     <div class="stats-container">
 | |
|         <div class="stat-card">
 | |
|             <div class="stat-title">用户总数</div>
 | |
|             <div class="stat-value">1,234</div>
 | |
|         </div>
 | |
|         <div class="stat-card">
 | |
|             <div class="stat-title">今日访问</div>
 | |
|             <div class="stat-value">256</div>
 | |
|         </div>
 | |
|         <div class="stat-card">
 | |
|             <div class="stat-title">数据总量</div>
 | |
|             <div class="stat-value">8,642</div>
 | |
|         </div>
 | |
|         <div class="stat-card">
 | |
|             <div class="stat-title">系统消息</div>
 | |
|             <div class="stat-value">12</div>
 | |
|         </div>
 | |
|     </div>
 | |
|     
 | |
|     <div class="quick-actions">
 | |
|         <h2>快捷操作</h2>
 | |
|         <div class="action-buttons">
 | |
|             <button class="action-button">用户管理</button>
 | |
|             <button class="action-button">内容发布</button>
 | |
|             <button class="action-button">数据统计</button>
 | |
|             <button class="action-button">系统设置</button>
 | |
|             <button class="action-button">清除缓存</button>
 | |
|         </div>
 | |
|     </div>
 | |
| </div>
 | |
| 
 | |
| <script>
 | |
| function updateTime() {
 | |
|     var now = new Date();
 | |
|     var year = now.getFullYear();
 | |
|     var month = now.getMonth() + 1;
 | |
|     var date = now.getDate();
 | |
|     var hours = now.getHours();
 | |
|     var minutes = now.getMinutes();
 | |
|     var seconds = now.getSeconds();
 | |
| 
 | |
|     // 补零函数
 | |
|     var padZero = function(num) {
 | |
|         return num < 10 ? '0' + num : num;
 | |
|     };
 | |
| 
 | |
|     // 格式化时间
 | |
|     var timeString = year + '年' + 
 | |
|                      padZero(month) + '月' + 
 | |
|                      padZero(date) + '日 ' + 
 | |
|                      padZero(hours) + ':' + 
 | |
|                      padZero(minutes) + ':' + 
 | |
|                      padZero(seconds);
 | |
| 
 | |
|     document.getElementById('current-time').innerHTML = timeString;
 | |
| }
 | |
| 
 | |
| // 页面加载完立即执行一次
 | |
| updateTime();
 | |
| 
 | |
| // 每秒更新一次时间
 | |
| setInterval(updateTime, 1000);
 | |
| </script>
 | |
| 
 | |
| {include file="public/tail" /} |