2024-06-05 21:18:00 +02:00
|
|
|
<section class="container">
|
|
|
|
<?php
|
2024-05-28 11:34:30 +02:00
|
|
|
|
2024-06-10 16:12:11 +02:00
|
|
|
foreach ($AlbumsOfArtists as $AlbumsOfArtist) {
|
|
|
|
echo "<div class='album'><article>";
|
|
|
|
echo "<header class='album-title'>";
|
2024-06-10 18:14:32 +02:00
|
|
|
echo anchor("albums/view/{$AlbumsOfArtist->id}", "{$AlbumsOfArtist->name}");
|
2024-06-10 16:12:11 +02:00
|
|
|
echo "<br>";
|
|
|
|
echo "</header>";
|
|
|
|
echo '<img src="data:image/jpeg;base64,' . base64_encode($AlbumsOfArtist->jpeg) . '" alt="' . $AlbumsOfArtist->name . '" />';
|
|
|
|
echo "<footer class='short-text'>$AlbumsOfArtist->year</footer>";
|
2024-06-05 11:14:54 +02:00
|
|
|
|
2024-06-10 16:12:11 +02:00
|
|
|
// Ajout du formulaire pour ajouter toutes les chansons de l'album à une playlist
|
2024-06-10 18:14:32 +02:00
|
|
|
if ($this->session->userdata('logged')):
|
|
|
|
echo "<form action='" . base_url('index.php/albums/addAllSongsToPlaylist') . "' method='post'>";
|
|
|
|
echo "<input type='hidden' name='album_id' value='{$AlbumsOfArtist->id}'>";
|
|
|
|
echo "<select name='playlist'>";
|
|
|
|
foreach($playlists as $playlist){
|
|
|
|
echo "<option value='{$playlist->id}'>{$playlist->name}</option>";
|
|
|
|
}
|
|
|
|
echo "</select>";
|
|
|
|
echo "<button type='submit'>Ajouter toutes les chansons</button>";
|
|
|
|
echo "</form>";
|
|
|
|
endif;
|
2024-06-10 16:12:11 +02:00
|
|
|
echo "</article></div>";
|
|
|
|
|
2024-06-05 21:18:00 +02:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</section>
|
2024-06-10 16:12:11 +02:00
|
|
|
|
|
|
|
|