Sách Giáo Khoa Việt Nam - sachgiaokhoa.org
CodeIgniter 4 website:
- Catalog 999 SGK (lớp 1-12) từ API, lọc theo lớp/môn/NXB, tìm kiếm
- Trang chủ grouped browse (bậc học -> lớp -> môn, ưu tiên môn quan trọng)
- Chi tiết sách: metadata đầy đủ, cover nghệ thuật /thumb/{W}x{H}/
- Đọc online qua gate captcha + countdown, PDF viewer pdf.js
- Download: captcha + token một lần + auto cache-bust version
- Tự đồng bộ catalog/cover khi API thay đổi (refresh:catalog)
- Legal: DMCA, miễn trừ trách nhiệm, điều khoản, bảo mật, liên hệ
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="vi">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Xác nhận đọc online — <?= esc($book['title']) ?></title>
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link rel="icon" type="image/svg+xml" href="/assets/favicon.svg">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/assets/app.css">
|
||||
</head>
|
||||
<body class="reader-body">
|
||||
<main class="container">
|
||||
<div class="gate-card" id="tai-xuong">
|
||||
<div class="gate-book">
|
||||
<img src="/thumb/240x320/<?= esc($book['id']) ?>.jpg?v=<?= media_version() ?>" alt="Bìa <?= esc($book['title']) ?>" onerror="this.style.display='none'">
|
||||
<div>
|
||||
<h1><?= esc($book['title']) ?></h1>
|
||||
<p class="gate-sub">
|
||||
<?= $book['grade'] ? 'Lớp ' . esc($book['grade']) . ' · ' : '' ?><?= esc($book['subject']) ?> · <?= esc($book['publisher']) ?>
|
||||
<?php if (! empty($book['meta']['pages'])): ?> · <?= (int) $book['meta']['pages'] ?> trang<?php endif; ?>
|
||||
</p>
|
||||
<a href="/sach/<?= esc($book['id']) ?>">← Quay lại trang sách</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="countdown-note">
|
||||
⏳ Nhập mã captcha và chờ <b id="cd-seconds"><?= $countdown ?></b> giây để tiếp tục đọc online.
|
||||
Phiên đọc có hiệu lực 2 giờ, bao gồm cả tải xuống PDF.
|
||||
</div>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<div class="error-box"><?= esc($error) ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="post" action="/doc/<?= esc($book['id']) ?>" id="dl-form">
|
||||
<input type="hidden" name="download" value="1">
|
||||
<div class="captcha-row">
|
||||
<img src="/captcha" alt="Mã captcha" id="captcha-img">
|
||||
<button type="button" class="refresh-captcha" title="Đổi mã khác" onclick="document.getElementById('captcha-img').src='/captcha?'+Date.now()">🔄</button>
|
||||
<input type="text" name="captcha" required maxlength="5" autocomplete="off" placeholder="Nhập mã">
|
||||
</div>
|
||||
<button class="btn btn-primary btn-block" type="submit" id="dl-btn" disabled>
|
||||
Tiếp tục đọc online
|
||||
</button>
|
||||
<p class="gate-legal">⚖️ Tài liệu thuộc bản quyền Nhà xuất bản — chỉ phục vụ mục đích tra cứu, phi thương mại.</p>
|
||||
</form>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
var seconds = <?= $countdown ?>;
|
||||
var btn = document.getElementById('dl-btn');
|
||||
var s1 = document.getElementById('cd-seconds');
|
||||
|
||||
var t = setInterval(function () {
|
||||
seconds--;
|
||||
if (s1) s1.textContent = seconds;
|
||||
if (seconds <= 0) {
|
||||
clearInterval(t);
|
||||
btn.disabled = false;
|
||||
btn.textContent = '✓ Tiếp tục đọc online';
|
||||
}
|
||||
}, 1000);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user