Ajout search bar , genre...

This commit is contained in:
2024-06-03 16:51:37 +02:00
parent affc3760d3
commit edadb309a8
7 changed files with 222 additions and 13 deletions

View File

@@ -9,11 +9,21 @@ class Albums extends CI_Controller {
$this->load->library('session');
}
public function index(){
$albums = $this->model_music->getAlbums();
$genre = $this->input->get('genre');
$order = $this->input->get('order');
$artist = $this->input->get('artist');
$albums = $this->model_music->getAlbums($genre, $order, $artist);
$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
'is_logged_in' => $is_logged_in,
'genres' => $genre,
'artistes' => $artist
);
$this->load->view('layout/header',$data);
$this->load->view('albums_list', $data);

View File

@@ -0,0 +1,21 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Artist extends CI_Controller {
public function __construct(){
parent::__construct();
$this->load->model('model_music');
}
public function index(){
$genre = $this->input->get('genre');
$order = $this->input->get('order');
$artists = $this->model_music->getArtists($genre, $order);
$genres = $this->model_music->researchtype();
$this->load->view('layout/header',['genres'=>$genres]);
$this->load->view('artists_name',['artists'=>$artists]);
$this->load->view('layout/footer');
}
}

View File

@@ -0,0 +1,23 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Music extends CI_Controller {
public function __construct(){
parent::__construct();
$this->load->model('model_music');
}
public function index(){
$genre = $this->input->get('genre');
$order = $this->input->get('order');
$musics = $this->model_music->getMusics($genre, $order);
$genres = $this->model_music->researchtype();
$this->load->view('layout/header',['genres'=>$genres]);
$this->load->view('musiques_name',['musics'=>$musics]);
$this->load->view('layout/footer');
}
}