Ajout search bar , genre...
This commit is contained in:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										21
									
								
								application/controllers/Artist.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								application/controllers/Artist.php
									
									
									
									
									
										Normal 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');	
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										23
									
								
								application/controllers/Music.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								application/controllers/Music.php
									
									
									
									
									
										Normal 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');	
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user