duplication playlist

This commit is contained in:
2024-06-16 19:05:37 +02:00
parent 9597b8492f
commit 4efd73e0bf
16 changed files with 428 additions and 152 deletions

View File

@@ -6,6 +6,7 @@ class Artistes extends CI_Controller {
public function __construct(){
parent::__construct();
$this->load->model('model_music');
$this->load->library('form_validation');
}
public function index(){
$genre = $this->input->get('genre');
@@ -35,5 +36,21 @@ class Artistes extends CI_Controller {
$this->load->view('layout/footer');
}
public function addArtistestoPlaylist($id) {
$playlists = $this->model_music->getPlaylist();
$this->form_validation->set_rules('playlist_id', 'playlist_id', 'required');
if ($this->form_validation->run() == FALSE){
$this->load->view('layout/header');
$this->load->view('addArtistestoplaylist', ["playlists" => $playlists]);
$this->load->view('layout/footer');
}else{
$playlistId = $this->input->post('playlist_id');
$this->model_music->AddArtistestoPlaylist($playlistId,$id);
redirect('artistes');
}
}
}