SAEWEB2.2/ci/application/views/playlist_list.php

50 lines
2.6 KiB
PHP

<div id="Page">
<div class="content">
<section id="about" class="box">
<div class="box-content">
<img src="<?= base_url('assets/img/alo.png') ?>" alt="Description de l'image 2">
<div class="text-content">
<h2>Créer une nouvelle Playlist Vide</h2>
<form action="<?= base_url('index.php/playlist/createPlaylistController') ?>" method="post" class="playlist-form">
<label for="name_playlist" class="playlist-label">Nom de la Playlist:</label>
<input type="text" name="name_playlist" id="name_playlist" class="playlist-input" required>
<button type="submit" name="submit" class="playlist-button">Créer</button>
</form>
</div>
</div>
</section>
<section id="product" class="box">
<div class="box-img">
<img src="<?= base_url('assets/img/musique2.png') ?>" alt="Description de l'image 2">
<div class="text-content">
<h2>Créer une Playlist Aléatoire</h2>
<form action="<?= base_url('index.php/playlist/createRandomPlaylist') ?>" method="post" class="playlist-form">
<label for="name_playlist_random" class="playlist-label">Nom de la Playlist:</label>
<input type="text" name="name_playlist_random" id="name_playlist_random" class="playlist-input" required>
<label for="num_songs" class="playlist-label">Nombre de Chansons:</label>
<input type="number" name="num_songs" id="num_songs" class="playlist-input" min="1" max="2000" required>
<button type="submit" name="submit" class="playlist-button">Créer</button>
</form>
</div>
</div>
</section>
</div>
</div>
<div id="header"></div>
<?php
foreach($playlists as $playlist){
echo "<div class='playlist-item'>";
echo "<header class='short-text'>";
echo anchor("playlist/SongPlaylist/{$playlist->id}","<h3>{$playlist->name}</h3>");
echo "<form action='" . base_url("index.php/playlist/delete/{$playlist->id}") . "' method='post'>";
echo "<button type='submit' class='delete-button'>supprimer</button>";
echo "</form>";
echo "<form action='" . base_url("index.php/playlist/duplicate/{$playlist->id}") . "' method='post'>";
echo "<button type='submit' class='delete-button'>dupliquer</button>";
echo "</form>";
echo "</header>";
echo "</div>";
}
?>