31 lines
760 B
PHP
31 lines
760 B
PHP
|
|
<section class="list">
|
|
<?php
|
|
$i = 0;
|
|
foreach($songs as $song){
|
|
echo "<div><article>";
|
|
echo "<header class='short-text'>";
|
|
$i = $i+1;
|
|
$minutes = floor($song->duration/60);
|
|
$secondes = $song->duration %60;
|
|
echo "{$i} - {$song->name} : {$minutes} min {$secondes} sec";
|
|
foreach($songPlaylists as $songPlaylist){
|
|
echo "<div><article>";
|
|
echo "<header class='short-text'>";
|
|
echo "<form action='" . base_url("index.php/Playlist/deleteSong/{$id_playlist -> id}/{$songPlaylist-> name}") . "' method='post'>";
|
|
echo "{$songPlaylist->name}";
|
|
echo "<button type='submit' class='delete-button'>Delete</button>";
|
|
echo "</form>";
|
|
echo "<br>";
|
|
echo "</header>";
|
|
echo "</article></div>";
|
|
}
|
|
}
|
|
?>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|