playlist aléatoire
This commit is contained in:
@@ -50,12 +50,6 @@ class Playlist extends CI_Controller {
|
||||
redirect("playlist/SongPlaylist/$id_playlist");
|
||||
}
|
||||
|
||||
public function MenuCreate() {
|
||||
$this->load->view('layout/header');
|
||||
$this->load->view('create_playlist');
|
||||
$this->load->view('layout/footer');
|
||||
|
||||
}
|
||||
|
||||
public function createPlaylistController() {
|
||||
$mail = $this->session->userdata('mail');
|
||||
@@ -64,6 +58,17 @@ class Playlist extends CI_Controller {
|
||||
redirect('playlist');
|
||||
}
|
||||
|
||||
public function createRandomPlaylist() {
|
||||
$mail = $this->session->userdata('mail');
|
||||
$name_playlist = $this->input->post('name_playlist_random');
|
||||
$num_songs = (int) $this->input->post('num_songs');
|
||||
if ($num_songs < 1 || $num_songs > 2000) {
|
||||
return;
|
||||
}
|
||||
$this->model_music->createPlaylistRandom($name_playlist, $num_songs, $mail);
|
||||
redirect('playlist');
|
||||
}
|
||||
|
||||
public function addSongToPlaylist(){
|
||||
$songName = $this->input->post('song');
|
||||
$playlistId = $this->input->post('playlist');
|
||||
|
||||
Reference in New Issue
Block a user