Fix Erreur getter
This commit is contained in:
		@@ -6,6 +6,7 @@ class Albums extends CI_Controller {
 | 
				
			|||||||
    public function __construct(){
 | 
					    public function __construct(){
 | 
				
			||||||
        parent::__construct();
 | 
					        parent::__construct();
 | 
				
			||||||
        $this->load->model('model_music');
 | 
					        $this->load->model('model_music');
 | 
				
			||||||
 | 
					        $this->load->library('session');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function index(){
 | 
					    public function index(){
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,20 +3,28 @@ defined('BASEPATH') OR exit('No direct script access allowed');
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
class Artistes extends CI_Controller {
 | 
					class Artistes extends CI_Controller {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	public function __construct(){
 | 
					    public function __construct(){
 | 
				
			||||||
			parent::__construct();
 | 
					        parent::__construct();
 | 
				
			||||||
			$this->load->model('model_music');
 | 
					        $this->load->model('model_music');
 | 
				
			||||||
			$this->load->library('session');
 | 
					        $this->load->library('session'); // La session est déjà chargée via autoload.php, mais par précaution.
 | 
				
			||||||
	}
 | 
					    }
 | 
				
			||||||
	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('layout/getter', $this->session->userdata('logged_in'));
 | 
					 | 
				
			||||||
			$this->load->view('artists_name',['artists'=>$artists]);
 | 
					 | 
				
			||||||
			$this->load->view('layout/footer');
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					    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();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        $is_logged_in = $this->session->userdata('logged_in');
 | 
				
			||||||
 | 
					        $data = array(
 | 
				
			||||||
 | 
					            'artists' => $artists,
 | 
				
			||||||
 | 
					            'genres' => $genres,
 | 
				
			||||||
 | 
					            'is_logged_in' => $is_logged_in
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        $this->load->view('layout/header', $data);
 | 
				
			||||||
 | 
					        $this->load->view('layout/getter', $data);
 | 
				
			||||||
 | 
					        $this->load->view('artists_name', $data);
 | 
				
			||||||
 | 
					        $this->load->view('layout/footer');
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,23 +3,31 @@ defined('BASEPATH') OR exit('No direct script access allowed');
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
class Music extends CI_Controller {
 | 
					class Music extends CI_Controller {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	public function __construct(){
 | 
					    public function __construct(){
 | 
				
			||||||
		parent::__construct();
 | 
					        parent::__construct();
 | 
				
			||||||
		$this->load->model('model_music');
 | 
					        $this->load->model('model_music');
 | 
				
			||||||
		$this->load->library('session');
 | 
					        $this->load->library('session'); // La session est déjà chargée via autoload.php, mais par précaution.
 | 
				
			||||||
	}
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    
 | 
					    public function index(){
 | 
				
			||||||
	public function index(){
 | 
					        $genre = $this->input->get('genre');
 | 
				
			||||||
		$genre = $this->input->get('genre');
 | 
					        $order = $this->input->get('order');
 | 
				
			||||||
		$order = $this->input->get('order');
 | 
					        $artist = $this->input->get('artist');
 | 
				
			||||||
		$musics = $this->model_music->getMusics($genre, $order);
 | 
					        $musics = $this->model_music->getMusics($genre, $order, $artist);
 | 
				
			||||||
		$genres = $this->model_music->researchtype();
 | 
					        $genres = $this->model_music->researchtype();
 | 
				
			||||||
		$this->load->view('layout/header',['genres'=>$genres]);
 | 
					        $artists = $this->model_music->nameArtist();
 | 
				
			||||||
		$this->load->view('layout/getter', $this->session->userdata('logged_in'));
 | 
					 | 
				
			||||||
		$this->load->view('musiques_name',['musics'=>$musics]);
 | 
					 | 
				
			||||||
		$this->load->view('layout/footer');
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        $is_logged_in = $this->session->userdata('logged_in');
 | 
				
			||||||
 | 
					        $data = array(
 | 
				
			||||||
 | 
					            'musics' => $musics,
 | 
				
			||||||
 | 
					            'genres' => $genres,
 | 
				
			||||||
 | 
					            'artists' => $artists,
 | 
				
			||||||
 | 
					            'is_logged_in' => $is_logged_in
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        $this->load->view('layout/header', $data);
 | 
				
			||||||
 | 
					        $this->load->view('layout/getter', $data);
 | 
				
			||||||
 | 
					        $this->load->view('musiques_name', $data);
 | 
				
			||||||
 | 
					        $this->load->view('layout/footer');
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user