mirror of
https://grond.iut-fbleau.fr/stiti/SAE_2.02
synced 2024-11-12 22:01:41 +01:00
Tests v2
This commit is contained in:
parent
31abb723a9
commit
9dccb394e4
@ -6,10 +6,8 @@ class Albums extends CI_Controller {
|
||||
public function __construct(){
|
||||
parent::__construct();
|
||||
$this->load->model('model_music');
|
||||
$this->load->model('model_playlist');
|
||||
$this->load->helper('url');
|
||||
$this->load->helper('html');
|
||||
$this->load->library('session');
|
||||
}
|
||||
|
||||
public function index($page = 1){
|
||||
@ -46,23 +44,13 @@ class Albums extends CI_Controller {
|
||||
$album = $this->model_music->get_album_by_id($id);
|
||||
$data['album'] = $album;
|
||||
|
||||
// Récupérer les playlists de l'utilisateur connecté
|
||||
$data['playlist'] = $this->model_playlist->get_user_playlists($this->session->userdata('user_id'));
|
||||
|
||||
// Définir le playlist_id si la playlist est définie
|
||||
if(isset($data['playlist']) && !empty($data['playlist'])){
|
||||
$data['playlist_id'] = isset($data['playlist']->id) ? $data['playlist']->id : null;
|
||||
} else {
|
||||
$data['playlist_id'] = null; // Gérer le cas où aucune playlist n'est disponible
|
||||
}
|
||||
|
||||
$data['title'] = $album->name . " - Details";
|
||||
$data['css'] = 'assets/css/album_view';
|
||||
|
||||
$data['title'] = $album->name." - Details";
|
||||
$data['css']='assets/css/album_view';
|
||||
|
||||
$this->load->view('layout/header_dark', $data);
|
||||
$this->load->view('album_view', $data); // Transmettre les données à la vue
|
||||
$this->load->view('album_view');
|
||||
$this->load->view('layout/footer_dark');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user