This commit is contained in:
2026-06-24 17:45:24 +08:00
commit bc0223bf07
16 changed files with 1553 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
require_once 'auth.php';
require_once '../includes/db.php';
$id = $_GET['id'] ?? 0;
if ($id > 0) {
// 获取应用信息
$stmt = $db->prepare("SELECT * FROM apps WHERE id = ?");
$stmt->execute([$id]);
$app = $stmt->fetch(PDO::FETCH_ASSOC);
if ($app) {
// 删除物理文件
$file_path = '../data/apps/' . $app['filename'];
if (file_exists($file_path)) {
unlink($file_path);
}
// 从数据库删除
$stmt = $db->prepare("DELETE FROM apps WHERE id = ?");
$stmt->execute([$id]);
}
}
header('Location: dashboard.php');
exit;