test filtre 2/?

This commit is contained in:
2024-06-04 16:18:03 +02:00
parent ea2e857196
commit 4b5b72f2c0
3 changed files with 84 additions and 69 deletions

View File

@@ -3,34 +3,34 @@ defined('BASEPATH') OR exit('No direct script access allowed');
class Albums extends CI_Controller {
public function __construct(){
parent::__construct();
$this->load->model('model_music');
$this->load->library('session');
}
public function __construct(){
parent::__construct();
$this->load->model('model_music');
$this->load->library('session');
}
public function index(){
$order = $this->input->get('order');
$genre = $this->input->get('genre');
$artist = $this->input->get('artist');
$query = $this->input->get('query');
public function index(){
$genre = $this->input->get('genre');
$order = $this->input->get('order');
$artist = $this->input->get('artist');
$albums = $this->model_music->getAlbums($genre, $order, $artist);
$albums = $this->model_music->getAlbums($genre, $order, $artist);
$genres = $this->model_music->researchtype();
$artists = $this->model_music->nameArtist();
$genres = $this->model_music->researchtype();
$artists = $this->model_music->nameArtist();
$is_logged_in = $this->session->userdata('logged_in');
$data = array(
'albums' => $albums,
'is_logged_in' => $is_logged_in,
'genres' => $genres,
'artistes' => $artists
);
$this->load->view('layout/header',$data);
$this->load->view('layout/getter',$data);
$this->load->view('albums_list', $data);
$this->load->view('layout/footer');
}
$is_logged_in = $this->session->userdata('logged_in');
$data = array(
'albums' => $albums,
'is_logged_in' => $is_logged_in,
'genres' => $genres,
'artistes' => $artists
);
$this->load->view('layout/header', $data);
$this->load->view('layout/getter', $data);
$this->load->view('albums_list', $data);
$this->load->view('layout/footer');
}
}