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

50 lines
2.6 KiB
PHP
Raw Normal View History

2024-06-12 14:57:59 +02:00
<div id="Page">
2024-06-12 19:08:54 +02:00
<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>
2024-06-12 11:18:32 +02:00
</div>
</div>
2024-06-12 19:08:54 +02:00
<div id="header"></div>
2024-06-12 11:18:32 +02:00
<?php
2024-05-30 16:14:38 +02:00
foreach($playlists as $playlist){
2024-06-05 13:51:23 +02:00
echo "<div class='playlist-item'>";
2024-05-30 16:14:38 +02:00
echo "<header class='short-text'>";
2024-06-05 13:51:23 +02:00
echo anchor("playlist/SongPlaylist/{$playlist->id}","<h3>{$playlist->name}</h3>");
2024-06-03 17:52:42 +02:00
echo "<form action='" . base_url("index.php/playlist/delete/{$playlist->id}") . "' method='post'>";
2024-06-06 10:59:12 +02:00
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>";
2024-06-03 15:02:52 +02:00
echo "</form>";
2024-05-30 16:14:38 +02:00
echo "</header>";
2024-06-05 13:51:23 +02:00
echo "</div>";
2024-05-30 16:14:38 +02:00
}
2024-06-12 19:08:54 +02:00
?>