From b28413726c0aa408eef72759673e01734822c097 Mon Sep 17 00:00:00 2001 From: stiti Date: Sat, 25 May 2024 15:58:09 +0200 Subject: [PATCH] Oublie d'un fichier de playlist --- .../application/controllers/Playlists.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/CodeIgniter-3.1.13/application/controllers/Playlists.php b/CodeIgniter-3.1.13/application/controllers/Playlists.php index 6d195e6..33c35ff 100644 --- a/CodeIgniter-3.1.13/application/controllers/Playlists.php +++ b/CodeIgniter-3.1.13/application/controllers/Playlists.php @@ -71,8 +71,6 @@ class Playlists extends CI_Controller { } } - - public function add_song($playlist_id) { if ($this->input->post()) { $data = array( @@ -175,6 +173,20 @@ class Playlists extends CI_Controller { } } + public function view($playlist_id) { + // Charger les détails de la playlist spécifique en fonction de son ID + $data['playlist'] = $this->Model_playlist->get_playlist_by_id($playlist_id); + + // Charger les chansons de la playlist spécifique + $data['songs'] = $this->Model_playlist->get_songs_by_playlist($playlist_id); + + // Charger la vue pour afficher les détails de la playlist + $this->load->view('layout/header_dark'); + $this->load->view('playlist_view', $data); + $this->load->view('layout/footer_dark'); + } + + } ?>