2024-05-20 18:18:00 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="fr">
|
2024-05-19 15:27:13 +02:00
|
|
|
<head>
|
2024-05-20 18:18:00 +02:00
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2024-05-20 16:31:29 +02:00
|
|
|
<link rel="stylesheet" href="<?php echo base_url('assets/css/style.css'); ?>">
|
|
|
|
<link rel="icon" type="image/x-icon" href="<?php echo base_url('assets/img/Logo_ONZEUR.png'); ?>">
|
2024-05-19 15:27:13 +02:00
|
|
|
<title>Page d'accueil</title>
|
|
|
|
</head>
|
2024-05-20 18:18:00 +02:00
|
|
|
<body>
|
|
|
|
<h1 class="title">Listes des albums</h1>
|
|
|
|
<section class="list">
|
|
|
|
<?php foreach($albums as $album): ?>
|
|
|
|
<div>
|
|
|
|
<article>
|
|
|
|
<header class="short-text">
|
|
|
|
<?php echo anchor("albums/view/{$album->id}", $album->name); ?>
|
|
|
|
</header>
|
|
|
|
<img src="data:image/jpeg;base64,<?php echo base64_encode($album->jpeg); ?>" alt="<?php echo $album->name; ?>">
|
|
|
|
<footer class="short-text"><?php echo $album->year; ?> - <?php echo $album->artistName; ?></footer>
|
|
|
|
</article>
|
|
|
|
</div>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</section>
|
2024-05-19 15:27:13 +02:00
|
|
|
|
2024-05-20 18:18:00 +02:00
|
|
|
<div class="pagination">
|
2024-05-20 20:26:00 +02:00
|
|
|
<?php if ($current_page > 1): ?>
|
|
|
|
<a class="fleche" href="<?php echo base_url('index.php/albums/index/'.($current_page-1)); ?>"><</a>
|
|
|
|
<?php endif; ?>
|
2024-05-19 15:27:13 +02:00
|
|
|
|
2024-05-20 18:18:00 +02:00
|
|
|
|
2024-05-20 20:26:00 +02:00
|
|
|
<?php for ($i = max(1, $current_page - 2); $i <= min($total_pages, $current_page + 2); $i++): ?>
|
|
|
|
<a href="<?php echo base_url('index.php/albums/index/'.$i); ?>" <?php echo ($i == $current_page) ? 'class="active"' : ''; ?>><?php echo $i; ?></a>
|
|
|
|
<?php endfor; ?>
|
|
|
|
|
|
|
|
<?php if ($current_page < $total_pages): ?>
|
|
|
|
<a class="fleche" href="<?php echo base_url('index.php/albums/index/'.($current_page+1)); ?>">></a>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
2024-05-20 18:18:00 +02:00
|
|
|
</body>
|
|
|
|
</html>
|