25 lines
		
	
	
		
			590 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			590 B
		
	
	
	
		
			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(){
 | 
						|
		$albums = $this->model_music->getAlbums();
 | 
						|
		$is_logged_in = $this->session->userdata('logged_in');
 | 
						|
		$data = array(
 | 
						|
			'albums' => $albums,
 | 
						|
			'is_logged_in' => $is_logged_in
 | 
						|
		);
 | 
						|
		$this->load->view('layout/header',$is_logged_in);
 | 
						|
		$this->load->view('albums_list', $data);
 | 
						|
		$this->load->view('layout/footer');
 | 
						|
	}
 | 
						|
 | 
						|
}
 | 
						|
 |