37 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
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 index(){
 | 
						|
        $order = $this->input->get('order');
 | 
						|
        $genre = $this->input->get('genre');
 | 
						|
        $artist = $this->input->get('artist');
 | 
						|
        $query = $this->input->get('query');
 | 
						|
 | 
						|
        $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,
 | 
						|
            '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');
 | 
						|
    }
 | 
						|
}
 |