37 lines
1.3 KiB
PHP
37 lines
1.3 KiB
PHP
<?php
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class Playlist extends CI_Controller {
|
|
|
|
public function __construct(){
|
|
parent::__construct();
|
|
$this->load->model('model_music');
|
|
}
|
|
|
|
public function index(){
|
|
$playlists = $this->model_music->getPlaylist();
|
|
//$this->load->view('layout/header_album');
|
|
$this->load->view('playlist_list', ['playlists' => $playlists]);
|
|
//$this->load->view('layout/footer_album');
|
|
}
|
|
|
|
public function view(){
|
|
$playlists = $this->model_music->deletePlaylist();
|
|
//$this->load->view('layout/header_album');
|
|
$this->load->view('playlist_list', ['playlists' => $playlists]);
|
|
//$this->load->view('layout/footer_album');
|
|
}
|
|
|
|
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');
|
|
}
|
|
|
|
public function deletePlaylist($playlist_id) {
|
|
$playlists = $this->model_music->deletePlaylist($playlist_id);
|
|
/*$this->load->view('playlist_list', ['playlists' => $playlists]);*/
|
|
redirect('playlist/index');
|
|
}
|
|
} |