playlist caché si déconnecté
This commit is contained in:
@@ -31,12 +31,18 @@
|
||||
<?= anchor('https://dwarves.iut-fbleau.fr/~brigitte/SAEWEB2.2/ci/index.php/Song/view/62','Tool'); ?>
|
||||
</div>
|
||||
</li>
|
||||
<li><?= anchor('playlist','Playlist'); ?></li>
|
||||
<?php if ($this->session->userdata('logged')): ?>
|
||||
<li><?= anchor('playlist','Playlist'); ?></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="user">
|
||||
<a class="bouton" href="connexion.php">Connexion</a>
|
||||
<a class="bouton" href="html/Inscription.html">S'inscrire</a>
|
||||
<?php if ($this->session->userdata('logged')): ?>
|
||||
<li class="bouton"><?=anchor('Deconnexion', 'Déconnexion');?></li>
|
||||
<?php else: ?>
|
||||
<li class="bouton"><?=anchor('Connexion','Connexion');?></li>
|
||||
<li class="bouton"><?=anchor('Enregistrer','Enregistrer');?></li>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</header>
|
||||
<div id="Page">
|
||||
|
||||
@@ -1,27 +1,28 @@
|
||||
<section class="container">
|
||||
<?php
|
||||
foreach ($AlbumsOfArtists as $AlbumsOfArtist) {
|
||||
echo "<div class='album'><article>";
|
||||
echo "<header class='album-title'>";
|
||||
echo anchor("albums/view/{$AlbumsOfArtist->id}", "{$AlbumsOfArtist->name}");
|
||||
echo "<br>";
|
||||
echo "</header>";
|
||||
|
||||
echo '<img src="data:image/jpeg;base64,' . base64_encode($AlbumsOfArtist->jpeg) . '" alt="' . $AlbumsOfArtist->name . '" />';
|
||||
echo "<footer class='short-text'>$AlbumsOfArtist->year</footer>";
|
||||
foreach ($AlbumsOfArtists as $AlbumsOfArtist) {
|
||||
echo "<div class='album'><article>";
|
||||
echo "<header class='album-title'>";
|
||||
echo "<br>";
|
||||
echo "</header>";
|
||||
echo '<img src="data:image/jpeg;base64,' . base64_encode($AlbumsOfArtist->jpeg) . '" alt="' . $AlbumsOfArtist->name . '" />';
|
||||
echo "<footer class='short-text'>$AlbumsOfArtist->year</footer>";
|
||||
|
||||
// Ajout du formulaire pour ajouter toutes les chansons de l'album à une playlist
|
||||
echo "<form action='" . base_url('index.php/albums/addAllSongsToPlaylist') . "' method='post'>";
|
||||
echo "<input type='hidden' name='album_id' value='{$AlbumsOfArtist->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>";
|
||||
|
||||
echo "</article></div>";
|
||||
// Ajout du formulaire pour ajouter toutes les chansons de l'album à une playlist
|
||||
echo "<form action='" . base_url('index.php/albums/addAllSongsToPlaylist') . "' method='post'>";
|
||||
echo "<input type='hidden' name='album_id' value='{$AlbumsOfArtist->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>";
|
||||
echo "</article></div>";
|
||||
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
foreach($albums as $album){
|
||||
echo "<div class='album'><article>";
|
||||
echo "<header class='album-title'>";
|
||||
echo anchor("albums/view/{$album->id}", "{$album->name}");
|
||||
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>";
|
||||
|
||||
@@ -17,29 +17,35 @@
|
||||
</div>
|
||||
<nav class="menu">
|
||||
<ul>
|
||||
<li><?= anchor('https://dwarves.iut-fbleau.fr/~gallego/SAEWEB2.2/ci/','Home'); ?></li>
|
||||
<li><?= anchor('https://dwarves.iut-fbleau.fr/~brigitte/SAEWEB2.2/ci/','Home'); ?></li>
|
||||
<li class="menu_déroulant"><?= anchor('albums','Albums'); ?>
|
||||
<div class="menu_déroulant_content">
|
||||
<?= anchor('https://dwarves.iut-fbleau.fr/~gallego/SAEWEB2.2/ci/index.php/Song/view/196','New Masters'); ?>
|
||||
<?= anchor('https://dwarves.iut-fbleau.fr/~gallego/SAEWEB2.2/ci/index.php/Song/view/88','Joe Cocker!'); ?>
|
||||
<?= anchor('https://dwarves.iut-fbleau.fr/~gallego/SAEWEB2.2/ci/index.php/Song/view/213','Dylan'); ?>
|
||||
<?= anchor('https://dwarves.iut-fbleau.fr/~gallego/SAEWEB2.2/ci/index.php/Song/view/142','Mothers Milk'); ?>
|
||||
<?= anchor('https://dwarves.iut-fbleau.fr/~brigitte/SAEWEB2.2/ci/index.php/Song/view/196','New Masters'); ?>
|
||||
<?= anchor('https://dwarves.iut-fbleau.fr/~brigitte/SAEWEB2.2/ci/index.php/Song/view/88','Joe Cocker!'); ?>
|
||||
<?= anchor('https://dwarves.iut-fbleau.fr/~brigitte/SAEWEB2.2/ci/index.php/Song/view/213','Dylan'); ?>
|
||||
<?= anchor('https://dwarves.iut-fbleau.fr/~brigitte/SAEWEB2.2/ci/index.php/Song/view/142','Mothers Milk'); ?>
|
||||
</div>
|
||||
</li>
|
||||
<li class="menu_déroulant"><?= anchor('artistes','Artistes'); ?>
|
||||
<div class="menu_déroulant_content">
|
||||
<?= anchor('https://dwarves.iut-fbleau.fr/~gallego/SAEWEB2.2/ci/index.php/artistes/view/34','Queen'); ?>
|
||||
<?= anchor('https://dwarves.iut-fbleau.fr/~gallego/SAEWEB2.2/ci/index.php/Song/view/21','Slayer'); ?>
|
||||
<?= anchor('https://dwarves.iut-fbleau.fr/~gallego/SAEWEB2.2/ci/index.php/Song/view/63','Muse'); ?>
|
||||
<?= anchor('https://dwarves.iut-fbleau.fr/~gallego/SAEWEB2.2/ci/index.php/Song/view/62','Tool'); ?>
|
||||
<?= anchor('https://dwarves.iut-fbleau.fr/~brigitte/SAEWEB2.2/ci/index.php/artistes/view/34','Queen'); ?>
|
||||
<?= anchor('https://dwarves.iut-fbleau.fr/~brigitte/SAEWEB2.2/ci/index.php/Song/view/21','Slayer'); ?>
|
||||
<?= anchor('https://dwarves.iut-fbleau.fr/~brigitte/SAEWEB2.2/ci/index.php/Song/view/63','Muse'); ?>
|
||||
<?= anchor('https://dwarves.iut-fbleau.fr/~brigitte/SAEWEB2.2/ci/index.php/Song/view/62','Tool'); ?>
|
||||
</div>
|
||||
</li>
|
||||
<li><?= anchor('playlist','Playlist'); ?></li>
|
||||
<?php if ($this->session->userdata('logged')): ?>
|
||||
<li><?= anchor('playlist','Playlist'); ?></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="user">
|
||||
<a class="bouton" <?= anchor('Connexion','Connexion'); ?>>Connexion</a>
|
||||
<a class="bouton" <?= anchor('Enregistrer','Enregistrer'); ?>>S'inscrire</a>
|
||||
<?php if ($this->session->userdata('logged')): ?>
|
||||
<li class="bouton"><?=anchor('Deconnexion', 'Déconnexion');?></li>
|
||||
<?php else: ?>
|
||||
<li class="bouton"><?=anchor('Connexion','Connexion');?></li>
|
||||
<li class="bouton"><?=anchor('Enregistrer','Enregistrer');?></li>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</header>
|
||||
</main>
|
||||
@@ -48,4 +54,4 @@
|
||||
<span>↑</span>
|
||||
</button>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
Reference in New Issue
Block a user