2024-06-05 11:14:54 +02:00
|
|
|
|
2024-06-12 11:18:32 +02:00
|
|
|
<section class="albums">
|
2024-05-21 15:05:29 +02:00
|
|
|
<?php
|
|
|
|
foreach($albums as $album){
|
2024-05-30 10:05:37 +02:00
|
|
|
echo "<div class='album'><article>";
|
|
|
|
echo "<header class='album-title'>";
|
2024-06-10 18:14:32 +02:00
|
|
|
echo anchor("albums/view/{$album->id}", "{$album->name}");
|
2024-05-30 10:05:37 +02:00
|
|
|
echo "</header>";
|
|
|
|
echo '<img src="data:image/jpeg;base64,' . base64_encode($album->jpeg) . '" alt="' . $album->name . '" />';
|
|
|
|
echo "<footer class='short-text'>{$album->year} - {$album->artistName}</footer>";
|
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='{$album->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-05-30 10:05:37 +02:00
|
|
|
echo "</article></div>";
|
2024-05-21 15:05:29 +02:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</section>
|
2024-06-05 21:18:00 +02:00
|
|
|
|