init
This commit is contained in:
@@ -0,0 +1,215 @@
|
||||
<?php
|
||||
require_once 'includes/db.php';
|
||||
require_once 'includes/functions.php';
|
||||
|
||||
// 获取网站配置
|
||||
$site_title = getConfig('site_title', 'OPS 运营管理系统');
|
||||
$site_description = getConfig('site_description', '点击下方按钮下载移动端 APP');
|
||||
$logo_path = getConfig('logo_path', 'logo.png');
|
||||
|
||||
// 获取所有应用版本
|
||||
$stmt = $db->query("SELECT * FROM apps ORDER BY upload_time DESC");
|
||||
$apps = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?php echo e($site_title); ?></title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
padding: 40px 20px;
|
||||
}
|
||||
.container {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.header {
|
||||
background: #fff;
|
||||
border-radius: 20px;
|
||||
padding: 40px;
|
||||
text-align: center;
|
||||
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.logo {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
margin-bottom: 20px;
|
||||
object-fit: contain;
|
||||
}
|
||||
.title {
|
||||
font-size: 28px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.description {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.versions {
|
||||
display: grid;
|
||||
gap: 20px;
|
||||
}
|
||||
.version-card {
|
||||
background: #fff;
|
||||
border-radius: 16px;
|
||||
padding: 24px;
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
|
||||
transition: transform 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
.version-card:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.version-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.version-info h3 {
|
||||
font-size: 18px;
|
||||
color: #333;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.version-number {
|
||||
display: inline-block;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: #fff;
|
||||
padding: 4px 12px;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.version-meta {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.version-description {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.download-btn {
|
||||
display: inline-block;
|
||||
padding: 12px 32px;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: #fff;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
border-radius: 50px;
|
||||
text-decoration: none;
|
||||
transition: transform 0.2s, box-shadow 0.2s;
|
||||
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
|
||||
}
|
||||
.download-btn:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
|
||||
}
|
||||
.download-btn:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
.empty-state {
|
||||
background: #fff;
|
||||
border-radius: 16px;
|
||||
padding: 60px 40px;
|
||||
text-align: center;
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
|
||||
color: #999;
|
||||
}
|
||||
.admin-link {
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
color: #667eea;
|
||||
padding: 10px 20px;
|
||||
border-radius: 20px;
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
.admin-link:hover {
|
||||
transform: translateY(-2px);
|
||||
background: #fff;
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
body {
|
||||
padding: 20px 10px;
|
||||
}
|
||||
.header {
|
||||
padding: 30px 20px;
|
||||
}
|
||||
.title {
|
||||
font-size: 22px;
|
||||
}
|
||||
.version-card {
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<img src="<?php echo e($logo_path); ?>" alt="Logo" class="logo">
|
||||
<h1 class="title"><?php echo e($site_title); ?></h1>
|
||||
<p class="description"><?php echo nl2br(e($site_description)); ?></p>
|
||||
</div>
|
||||
|
||||
<div class="versions">
|
||||
<?php if (empty($apps)): ?>
|
||||
<div class="empty-state">
|
||||
<p>暂无可用版本</p>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php foreach ($apps as $app): ?>
|
||||
<div class="version-card">
|
||||
<div class="version-header">
|
||||
<div class="version-info">
|
||||
<h3><?php echo e($app['original_name']); ?></h3>
|
||||
<?php if ($app['version']): ?>
|
||||
<span class="version-number">v<?php echo e($app['version']); ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="version-meta">
|
||||
<span>📅 <?php echo date('Y-m-d H:i', strtotime($app['upload_time'])); ?></span>
|
||||
<span>📦 <?php echo formatFileSize($app['file_size']); ?></span>
|
||||
</div>
|
||||
|
||||
<?php if ($app['description']): ?>
|
||||
<div class="version-description">
|
||||
<?php echo nl2br(e($app['description'])); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<a href="download.php?id=<?php echo $app['id']; ?>" class="download-btn">立即下载</a>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="admin/" class="admin-link">管理后台</a>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user