crea BD playlist + liste des playlists
This commit is contained in:
@@ -18,9 +18,9 @@ class Albums extends CI_Controller {
|
||||
public function view($album_id){
|
||||
$songs = $this->model_music->getSongOfAlbum($album_id);
|
||||
if (empty($songs)) {
|
||||
$songs = []; // Assurez-vous que $songs est un tableau vide si aucune chanson n'est trouvée
|
||||
$songs = [];
|
||||
}
|
||||
// Debugging: Log the $songs variable to see its content
|
||||
|
||||
log_message('debug', 'Songs: ' . print_r($songs, true));
|
||||
|
||||
$this->load->view('layout/header_album');
|
||||
|
||||
@@ -18,7 +18,7 @@ class artistes extends CI_Controller {
|
||||
$AlbumsOfArtist = $this->model_music->getAlbumsOfArtist($AlbumsOfArtistId);
|
||||
$this->load->view('layout/header_artistes');
|
||||
$this->load->view('albums_artist_list',['AlbumsOfArtist'=>$AlbumsOfArtist]);
|
||||
$this->load->view('layout/footer');
|
||||
$this->load->view('layout/footer_artistes');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Playlist extends CI_Controller {
|
||||
|
||||
public function __construct(){
|
||||
parent::__construct();
|
||||
$this->load->model('model_music');
|
||||
}
|
||||
|
||||
public function index(){
|
||||
$playlists = $this->model_music->getPlaylist();
|
||||
//$this->load->view('layout/header_album');
|
||||
$this->load->view('playlist_list', ['playlists' => $playlists]);
|
||||
//$this->load->view('layout/footer_album');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user