playlist caché si déconnecté
This commit is contained in:
parent
686aaaa8be
commit
04968758d1
@ -23,7 +23,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
| a PHP script and you can easily do that on your own.
|
||||
|
|
||||
*/
|
||||
$config['base_url'] = '/~gallego/SAEWEB2.2/ci/';
|
||||
$config['base_url'] = '/~brigitte/SAEWEB2.2/ci/';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -16,10 +16,11 @@ class artistes extends CI_Controller {
|
||||
}
|
||||
|
||||
public function view($AlbumsOfArtistId){
|
||||
$artistes = $this->model_music->getArtists();
|
||||
$AlbumsOfArtists = $this->model_music->getAlbumsOfArtist($AlbumsOfArtistId);
|
||||
$playlists = $this->model_music->getPlaylist();
|
||||
$this->load->view('layout/header');
|
||||
$this->load->view('albums_artist_list', ['AlbumsOfArtists' => $AlbumsOfArtists, 'playlists' => $playlists, 'artist_id' => $AlbumsOfArtistId]);
|
||||
$this->load->view('albums_artist_list', ['AlbumsOfArtists' => $AlbumsOfArtists, 'playlists' => $playlists, 'artist_id' => $AlbumsOfArtistId, 'artistes' => $artistes]);
|
||||
$this->load->view('layout/footer');
|
||||
}
|
||||
|
||||
|
@ -1,17 +1,4 @@
|
||||
<?php
|
||||
/*defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Connexion extends CI_Controller {
|
||||
|
||||
public function __construct(){
|
||||
parent::__construct();
|
||||
$this->load->model('model_music');
|
||||
}
|
||||
public function index(){
|
||||
$this->load->view('layout/connexion.php');
|
||||
}
|
||||
|
||||
}*/
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
@ -42,7 +29,7 @@ if (count($result) > 0) {
|
||||
$this->load->view('layout/header');
|
||||
redirect('albums');
|
||||
} else {
|
||||
$this->load->view('layout/header');
|
||||
//$this->load->view('layout/header');
|
||||
$this->load->view('login');
|
||||
$this->load->view('layout/footer');
|
||||
echo "Invalid login or password";
|
||||
|
@ -31,12 +31,18 @@
|
||||
<?= anchor('https://dwarves.iut-fbleau.fr/~brigitte/SAEWEB2.2/ci/index.php/Song/view/62','Tool'); ?>
|
||||
</div>
|
||||
</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,12 +1,11 @@
|
||||
<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>";
|
||||
|
||||
@ -20,8 +19,10 @@ foreach ($AlbumsOfArtists as $AlbumsOfArtist) {
|
||||
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>
|
||||
<?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>
|
||||
|
Loading…
Reference in New Issue
Block a user