2024-05-27 13:08:39 +02:00
|
|
|
<section class="list">
|
|
|
|
<?php
|
2024-05-27 14:04:46 +02:00
|
|
|
foreach($songs as $song){
|
|
|
|
echo "<div><article>";
|
2024-06-10 18:14:32 +02:00
|
|
|
echo "<header class='short-text'>";
|
2024-06-05 19:36:03 +02:00
|
|
|
echo "{$song->name} ";
|
2024-06-10 18:14:32 +02:00
|
|
|
|
|
|
|
if ($this->session->userdata('logged')):
|
|
|
|
echo "<form action='" . base_url("index.php/playlist/addSongToPlaylist") . "' method='post'>";
|
|
|
|
echo "<select name='playlist'>";
|
|
|
|
foreach ($playlists as $playlist) {
|
|
|
|
echo "<option value='{$playlist->id}'>{$playlist->name}</option>";
|
|
|
|
}
|
|
|
|
echo "</select>";
|
|
|
|
echo "<input type='hidden' name='song' value='{$song->name}' />";
|
|
|
|
echo "<button type='submit' class='add-to-playlist'>+</button>";
|
|
|
|
echo "</form>";
|
|
|
|
endif;
|
2024-05-27 14:04:46 +02:00
|
|
|
echo "<br>";
|
|
|
|
echo "</header>";
|
|
|
|
echo "</article></div>";
|
|
|
|
}
|
2024-05-27 13:08:39 +02:00
|
|
|
?>
|
2024-06-05 11:14:54 +02:00
|
|
|
</section>
|
2024-06-05 13:51:23 +02:00
|
|
|
|
2024-06-05 19:36:03 +02:00
|
|
|
|