delete song
This commit is contained in:
@@ -24,9 +24,15 @@ class Playlist extends CI_Controller {
|
||||
|
||||
public function SongPlaylist($playlist_id){
|
||||
$songPlaylists = $this->model_music->getSongOfPlaylist($playlist_id);
|
||||
//$this->load->view('layout/header_album');
|
||||
$this->load->view('song_playlist', ['songPlaylists' => $songPlaylists]);
|
||||
//$this->load->view('layout/footer_album');
|
||||
$playlists = $this->model_music->getPlaylist(); // Récupère toutes les playlists
|
||||
$id_playlist = null; // Initialise $id_playlist à null
|
||||
foreach ($playlists as $playlist_item) {
|
||||
if ($playlist_item->id == $playlist_id) {
|
||||
$id_playlist = $playlist_item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$this->load->view('song_playlist', ['songPlaylists' => $songPlaylists, 'id_playlist' => $id_playlist]);
|
||||
}
|
||||
|
||||
public function delete($playlist_id) {
|
||||
@@ -34,6 +40,11 @@ class Playlist extends CI_Controller {
|
||||
redirect('playlist');
|
||||
}
|
||||
|
||||
public function deleteSong($id_playlist, $Song_name){
|
||||
$deleteSong = $this->model_music->delete_Song($id_playlist, $Song_name);
|
||||
redirect("playlist/SongPlaylist/$id_playlist");
|
||||
}
|
||||
|
||||
public function MenuCreate() {
|
||||
$this->load->view('layout/header');
|
||||
$this->load->view('create_playlist');
|
||||
|
||||
Reference in New Issue
Block a user