diff --git a/assets/images/logo/magnific_img24-img1_2995847324.pdf b/assets/images/logo/magnific_img24-img1_2995847324.pdf new file mode 100644 index 0000000..838b63e Binary files /dev/null and b/assets/images/logo/magnific_img24-img1_2995847324.pdf differ diff --git a/vedio/vedio-list/back/add.php b/vedio/vedio-list/back/add.php index 7978465..8756ecc 100644 --- a/vedio/vedio-list/back/add.php +++ b/vedio/vedio-list/back/add.php @@ -9,9 +9,17 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $maxRank = $Drama->q("SELECT MAX(`rank`) AS m FROM `dramas`"); $nextRank = ((int)($maxRank[0]['m'] ?? 0)) + 1; + $posterName = ''; + if (!empty($_FILES['poster']['name']) && $_FILES['poster']['error'] === UPLOAD_ERR_OK) { + $ext = strtolower(pathinfo($_FILES['poster']['name'], PATHINFO_EXTENSION)); + $posterName = uniqid('poster_') . '.' . $ext; + move_uploaded_file($_FILES['poster']['tmp_name'], __DIR__ . '/../uploads/' . $posterName); + } + $data = [ 'title' => trim($_POST['title'] ?? ''), 'type' => $type, + 'poster' => $posterName, 'platform' => $_POST['platform'] ?? '其他', 'watch_url' => trim($_POST['watch_url'] ?? ''), 'current_season' => max(1, (int)($_POST['current_season'] ?? 1)), diff --git a/vedio/vedio-list/back/edit.php b/vedio/vedio-list/back/edit.php index 0efd9bd..8e4f965 100644 --- a/vedio/vedio-list/back/edit.php +++ b/vedio/vedio-list/back/edit.php @@ -11,6 +11,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $row['title'] = trim($_POST['title'] ?? $row['title']); $row['type'] = $_POST['type'] ?? $row['type']; $row['platform'] = $_POST['platform'] ?? $row['platform']; + + if (!empty($_FILES['poster']['name']) && $_FILES['poster']['error'] === UPLOAD_ERR_OK) { + $ext = strtolower(pathinfo($_FILES['poster']['name'], PATHINFO_EXTENSION)); + $row['poster'] = uniqid('poster_') . '.' . $ext; + move_uploaded_file($_FILES['poster']['tmp_name'], __DIR__ . '/../uploads/' . $row['poster']); + } $row['watch_url'] = trim($_POST['watch_url'] ?? ''); $row['current_season'] = max(1, (int)($_POST['current_season'] ?? 1)); $row['current_episode'] = max(0, (int)($_POST['current_episode'] ?? 0)); @@ -29,7 +35,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {

編輯作品

-
+ @@ -52,6 +58,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { + + + + + + all($where, " ORDER BY `rank` ASC, `id` ASC"); $posterLabel = htmlspecialchars(strtoupper($row['platform']) . ' · ' . $typeText, ENT_QUOTES, 'UTF-8'); ?>
- +
diff --git a/vedio/vedio-list/uploads/poster_6a87fd0b9b371.jpg b/vedio/vedio-list/uploads/poster_6a87fd0b9b371.jpg new file mode 100644 index 0000000..db448a4 Binary files /dev/null and b/vedio/vedio-list/uploads/poster_6a87fd0b9b371.jpg differ