Skip to content
Snippets Groups Projects
Commit 7aead0bf authored by Alexander Jason's avatar Alexander Jason
Browse files

feat: add premium page

parent 8065837f
Branches
Tags
No related merge requests found
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="wiauthor_dth=device-width, initial-scale=1.0">
<link rel="icon" sizes="180x180" href="<?= BASE_URL ?>/icon/favicon-110.png">
<link rel="icon" type="image/png" sizes="32x32" href="<?= BASE_URL ?>/icon/favicon-32.png">
<!-- Global CSS -->
<link rel="stylesheet" type="text/css" href="<?= BASE_URL ?>/styles/template/globals.css">
<!-- Navbar CSS -->
<link rel="stylesheet" type="text/css" href="<?= BASE_URL ?>/styles/template/navbar.css">
<!-- Page-specific CSS -->
<link rel="stylesheet" type="text/css" href="<?= BASE_URL ?>/styles/admin/crud-page.css">
<link rel="stylesheet" type="text/css" href="<?= BASE_URL ?>/styles/admin/list.css">
<link rel="stylesheet" type="text/css" href="<?= BASE_URL ?>/styles/home/home.css">
<title>Curator's Collection</title>
</head>
<body>
<!-- Navigation bar -->
<?php include(dirname(__DIR__) . '../../components/Navbar.php') ?>
<div class="content">
<h1>Curator's Collection</h1>
<a href="/author/add">+ Subscribe</a>
<table border="1" class="styled-table">
<thead>
<tr>
<th>Id</th>
<th>Book Title</th>
<th>Author</th>
<th>Details</th>
</tr>
</thead>
<?php
$authors = $this->data['authors'];
foreach ($authors as $author) {
echo "<tr>";
echo "<td>" . $author['author_id'] . "</td>";
echo "<td>" . $author['full_name'] . "</td>";
echo "<td>" . $author['full_name'] . "</td>";
echo '<td><a href="/author/update/' . $author['author_id'] .'">Edit</a></td>';
echo "</tr>";
}
?>
</table>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" sizes="180x180" href="<?= BASE_URL ?>/icon/favicon-110.png">
<link rel="icon" type="image/png" sizes="32x32" href="<?= BASE_URL ?>/icon/favicon-32.png">
<!-- Global CSS -->
<link rel="stylesheet" type="text/css" href="<?= BASE_URL ?>/styles/template/globals.css">
<!-- Navbar CSS -->
<link rel="stylesheet" type="text/css" href="<?= BASE_URL ?>/styles/template/navbar.css">
<!-- Page-specific CSS -->
<link rel="stylesheet" type="text/css" href="<?= BASE_URL ?>/styles/book/book-detail.css">
<title>Premium: <?=$this->data['title']?></title>
</head>
<body>
<!-- Navigation bar -->
<?php include(dirname(__DIR__) . '../../components/Navbar.php') ?>
<div class="container">
<?php if(isset($this->data['book_id']) ):?>
<h2>PREMIUM DETAILS</h2>
<div class="details-container">
<!-- Book Title -->
<h3> <?=$this->data['title']?> </h3>
<!-- Author Genre Year-->
<h4> <?=$this->data['author']?></h4>
<h4> <?=$this->data['genre']?></h4>
<h4> <?=$this->data['year']?></h4>
<!-- Text -->
<p> <?=$this->data['summary']?></p>
<!-- todo: check ownership -->
<?php
if(isset($this->data['username'])):
if(isset($this->data['own'])):
$bookIdToCheck = $this->data['book_id'];
$found = false;
foreach ($this->data['own'] as $ownedBook) {
if (isset($ownedBook['book_id']) && $ownedBook['book_id'] == $bookIdToCheck) {
$found = true;
break;
}
}
if($found):
?>
<audio controls>
<source src="<?= BASE_URL ?>/<?= str_replace('/var/www/html/config/', '', $this->data['audio_path']) ?>" alt ="book-audio" type="audio/mp3">
Your browser does not support the audio element.
</audio>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
</div>
<?php else : ?>
<h2 class="info">Can't find the book you're looking for!</h2>
<?php endif; ?>
</div>
</body>
</html>.
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="wiauthor_dth=device-width, initial-scale=1.0">
<link rel="icon" sizes="180x180" href="<?= BASE_URL ?>/icon/favicon-110.png">
<link rel="icon" type="image/png" sizes="32x32" href="<?= BASE_URL ?>/icon/favicon-32.png">
<!-- Global CSS -->
<link rel="stylesheet" type="text/css" href="<?= BASE_URL ?>/styles/template/globals.css">
<!-- Navbar CSS -->
<link rel="stylesheet" type="text/css" href="<?= BASE_URL ?>/styles/template/navbar.css">
<!-- Page-specific CSS -->
<link rel="stylesheet" type="text/css" href="<?= BASE_URL ?>/styles/admin/crud-page.css">
<link rel="stylesheet" type="text/css" href="<?= BASE_URL ?>/styles/admin/list.css">
<link rel="stylesheet" type="text/css" href="<?= BASE_URL ?>/styles/home/home.css">
<title>Premium Collection</title>
</head>
<body>
<!-- Navigation bar -->
<?php include(dirname(__DIR__) . '../../components/Navbar.php') ?>
<div class="content">
<h1>Premium Book Collection</h1>
<table border="1" class="styled-table">
<thead>
<tr>
<th>Id</th>
<th>Book Title</th>
<th>Author</th>
</tr>
</thead>
<?php
$authors = $this->data['authors'];
foreach ($authors as $author) {
echo "<tr>";
echo "<td>" . $author['author_id'] . "</td>";
echo "<td>" . $author['full_name'] . "</td>";
echo "<td>" . $author['full_name'] . "</td>";
echo "</tr>";
}
?>
</table>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="wiauthor_dth=device-width, initial-scale=1.0">
<link rel="icon" sizes="180x180" href="<?= BASE_URL ?>/icon/favicon-110.png">
<link rel="icon" type="image/png" sizes="32x32" href="<?= BASE_URL ?>/icon/favicon-32.png">
<!-- Global CSS -->
<link rel="stylesheet" type="text/css" href="<?= BASE_URL ?>/styles/template/globals.css">
<!-- Navbar CSS -->
<link rel="stylesheet" type="text/css" href="<?= BASE_URL ?>/styles/template/navbar.css">
<!-- Page-specific CSS -->
<link rel="stylesheet" type="text/css" href="<?= BASE_URL ?>/styles/admin/crud-page.css">
<link rel="stylesheet" type="text/css" href="<?= BASE_URL ?>/styles/admin/list.css">
<link rel="stylesheet" type="text/css" href="<?= BASE_URL ?>/styles/home/home.css">
<title>My Subscription</title>
</head>
<body>
<!-- Navigation bar -->
<?php include(dirname(__DIR__) . '../../components/Navbar.php') ?>
<div class="content">
<h1><?php $this->data['username']?>'s Subscription</h1>
<!-- Todo Routing -->
<a href="/premium">++ Add Subscription</a>
<table border="1" class="styled-table">
<thead>
<tr>
<th>Id</th>
<th>Curator Name</th>
<th>Action</th>
</tr>
</thead>
<?php
$authors = $this->data['authors'];
foreach ($authors as $author) {
echo "<tr>";
echo "<td>" . $author['author_id'] . "</td>";
echo "<td>" . $author['full_name'] . "</td>";
echo '<td><a href="/author/update/' . $author['author_id'] .'">Pending/Details</a></td>';
echo "</tr>";
}
?>
</table>
</div>
</body>
</html>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment