This commit is contained in:
2026-08-21 15:15:36 +08:00
parent d51f26e170
commit f9f068f517
7 changed files with 62 additions and 41 deletions
+2 -2
View File
@@ -168,7 +168,7 @@
<li data-site-guide-depth="3"><span class="sg-node sg-node--extra"><a href="../s20260612_04_jq_calculator.html">s20260612_04_jq_calculator.html(學校作業)</a></span></li>
<li data-site-guide-depth="3"><span class="sg-node sg-node--extra"><a href="../sechskies_brand_color_spec.html">sechskies_brand_color_spec.html(品牌色規範)</a></span></li>
<li data-site-guide-depth="3"><span class="sg-node sg-node--extra"><a href="../totoga2/readable_ebookcontent.html">totoga2/readable_ebookcontent.html(電子書內容草稿)</a></span></li>
<li data-site-guide-depth="3"><span class="sg-node sg-node--extra"><a href="../vedio/vedio-list.html">vedio/vedio-list.html深夜清單,追劇進度預覽頁)</a></span></li>
<li data-site-guide-depth="3"><span class="sg-node sg-node--extra"><a href="../vedio/vedio-list.html">vedio/vedio-list.html影片清單,追劇進度預覽頁)</a></span></li>
<li data-site-guide-depth="3"><span class="sg-node sg-node--extra" title="admin/api/back 等 PHP 後台,非靜態站主線">vedio/vedio-list/(追劇清單後台練習,非本站主線)</span></li>
</ul>
</li>
@@ -218,7 +218,7 @@
<tbody>
<tr>
<th scope="row">2026-07-30 分岔</th>
<td>本機原有 4 個未 push commit<code>variety/vedio-list.html</code> 深夜清單、<code>concert/captain-aura.html</code><code>yellow-note/practice-room.html</code> 等),同時遠端 origin/main 多了 1 個新 commit<code>calendar2026.html</code> 2026 行事曆頁+<code>admin/</code> 後台系統,改動 <code>assets/js/map.js</code><code>member/member.html</code></td>
<td>本機原有 4 個未 push commit<code>variety/vedio-list.html</code> 影片清單、<code>concert/captain-aura.html</code><code>yellow-note/practice-room.html</code> 等),同時遠端 origin/main 多了 1 個新 commit<code>calendar2026.html</code> 2026 行事曆頁+<code>admin/</code> 後台系統,改動 <code>assets/js/map.js</code><code>member/member.html</code></td>
</tr>
<tr>
<th scope="row">衝突檔案</th>
+3 -7
View File
@@ -351,15 +351,11 @@
<p>綜藝裡的失控笑聲、戲劇裡的心跳停拍,都值得被好好記下來:看到哪一季、哪一集、哪一句台詞剛把你釘在沙發上。
</p>
<p>
這裡先收兩部最近在追的:一部是把人丟進肯亞還能笑到缺氧的<span class="mark_y">韓綜</span>
一部是把 1997 年的青春寫得又甜又疼的<span class="mark_b">韓劇</span>
把人丟進肯亞還能笑到缺氧的<span class="mark_y">韓綜</span>把 1997 年的青春寫得又甜又疼的<span class="mark_b">韓劇</span>
點進去,進度與入口都在;先別急著一次追完,慢慢養也很好看。
</p>
<!-- <p>
此頁為線上靜態預覽。完整資料庫與後台 CRUD(乙級第三題骨架)請本機 XAMPP 匯入
<code>vedio/vedio-list/dramas.sql</code> 後,開啟
<a href="vedio-list/"><code>vedio/vedio-list/</code></a>。
</p> -->
<!--此頁為線上靜態預覽。完整資料庫與後台 CRUD(乙級第三題骨架)請本機 XAMPP 匯入
vedio/vedio-list/dramas.sql後,開啟vedio-list/。-->
</section>
<section class="list-section" aria-labelledby="vedio-list-heading">
+2 -2
View File
@@ -5,7 +5,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>深夜清單|管理後台</title>
<title>影片清單|管理後台</title>
<link rel="stylesheet" href="../../assets/css/style.css">
<link rel="stylesheet" href="css/vedio-list.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
@@ -14,7 +14,7 @@
<body class="vedio-admin-page">
<header class="inner-page-header">
<div class="header-inner site-header-inner">
<h1 class="main-title">深夜清單後台</h1>
<h1 class="main-title">影片清單後台</h1>
<div class="subtitle-wrap">
<span class="sub-title">ADMIN · CRUD</span>
</div>
+39 -27
View File
@@ -1,40 +1,51 @@
<?php
$error = '';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$maxRank = $Drama->q("SELECT MAX(`rank`) AS m FROM `dramas`");
$nextRank = ((int)($maxRank[0]['m'] ?? 0)) + 1;
$type = $_POST['type'] ?? '';
$data = [
'title' => trim($_POST['title'] ?? ''),
'type' => $_POST['type'] ?? 'drama',
'platform' => $_POST['platform'] ?? '其他',
'watch_url' => trim($_POST['watch_url'] ?? ''),
'current_season' => max(1, (int)($_POST['current_season'] ?? 1)),
'current_episode' => max(0, (int)($_POST['current_episode'] ?? 0)),
'current_position' => trim($_POST['current_position'] ?? ''),
'progress_note' => trim($_POST['progress_note'] ?? ''),
'status' => $_POST['status'] ?? 'want',
'rating' => $_POST['rating'] !== '' ? $_POST['rating'] : null,
'intro' => trim($_POST['intro'] ?? ''),
'note' => trim($_POST['note'] ?? ''),
'sh' => 1,
'rank' => $nextRank,
];
if (!in_array($type, ['variety', 'drama'], true)) {
$error = '請選擇正確的類型(綜藝或戲劇)。';
} else {
$maxRank = $Drama->q("SELECT MAX(`rank`) AS m FROM `dramas`");
$nextRank = ((int)($maxRank[0]['m'] ?? 0)) + 1;
// DB::save 用字串拼接;null 改空字串避免 SQL 破掉
if ($data['rating'] === null) {
$data['rating'] = '';
$data = [
'title' => trim($_POST['title'] ?? ''),
'type' => $type,
'platform' => $_POST['platform'] ?? '其他',
'watch_url' => trim($_POST['watch_url'] ?? ''),
'current_season' => max(1, (int)($_POST['current_season'] ?? 1)),
'current_episode' => max(0, (int)($_POST['current_episode'] ?? 0)),
'current_position' => trim($_POST['current_position'] ?? ''),
'progress_note' => trim($_POST['progress_note'] ?? ''),
'status' => $_POST['status'] ?? 'want',
'rating' => $_POST['rating'] !== '' ? $_POST['rating'] : null,
'intro' => trim($_POST['intro'] ?? ''),
'note' => trim($_POST['note'] ?? ''),
'sh' => 1,
'rank' => $nextRank,
];
// DB::save 用字串拼接;null 改空字串避免 SQL 破掉
if ($data['rating'] === null) {
$data['rating'] = '';
}
$Drama->save($data);
to("?do=drama");
exit;
}
$Drama->save($data);
to("?do=drama");
exit;
}
?>
<section>
<h2 class="section-title">新增作品</h2>
<form class="admin-form" method="post" action="?do=add">
<?php if ($error): ?>
<p class="empty-hint"><?= htmlspecialchars($error, ENT_QUOTES, 'UTF-8') ?></p>
<?php endif; ?>
<form class="admin-form" method="post" action="?do=add" enctype="multipart/form-data">
<label for="title">劇名/節目名</label>
<input type="text" id="title" name="title" required>
@@ -54,7 +65,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
<option value="YouTube">YouTube</option>
<option value="其他">其他</option>
</select>
<label for="poster">海報圖片</label>
<input type="file" id="poster" name="poster">
<label for="watch_url">直接觀看網址</label>
<input type="url" id="watch_url" name="watch_url" placeholder="https://...">
+13
View File
@@ -99,6 +99,19 @@
text-align: center;
padding: 0.75rem;
box-sizing: border-box;
overflow: hidden;
}
.vedio-list-page .drama-card__poster--image {
padding: 0;
background: var(--color-surface-soft);
}
.vedio-list-page .drama-card__poster--image img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.vedio-list-page .drama-card__meta {
+1 -1
View File
@@ -1,4 +1,4 @@
-- 深夜清單 / 追劇資料庫
-- 影片清單 / 追劇資料庫
-- 本機 XAMPPphpMyAdmin 匯入此檔即可
CREATE DATABASE IF NOT EXISTS `vedio_list` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+2 -2
View File
@@ -5,7 +5,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>水晶男孩|深夜清單</title>
<title>水晶男孩|影片清單</title>
<link rel="stylesheet" href="../../assets/css/style.css">
<link rel="stylesheet" href="../../assets/css/index.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
@@ -17,7 +17,7 @@
<body class="vedio-list-page">
<header class="inner-page-header">
<div class="header-inner site-header-inner">
<h1 class="main-title">深夜清單</h1>
<h1 class="main-title">影片清單</h1>
<div class="subtitle-wrap">
<span class="sub-title">DRAMA &amp; VARIETY WATCH LIST</span>
</div>