25 lines
590 B
PHP
Raw Normal View History

2024-05-29 10:29:40 +02:00
<?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');
2024-06-03 09:53:37 +02:00
$this->load->library('session');
2024-05-29 10:29:40 +02:00
}
public function index(){
2024-06-03 16:27:54 +02:00
$albums = $this->model_music->getAlbums();
2024-06-03 10:16:09 +02:00
$is_logged_in = $this->session->userdata('logged_in');
$data = array(
2024-06-03 16:27:54 +02:00
'albums' => $albums,
'is_logged_in' => $is_logged_in
);
2024-06-03 16:33:46 +02:00
$this->load->view('layout/header',$is_logged_in);
2024-06-03 10:16:09 +02:00
$this->load->view('albums_list', $data);
2024-05-29 10:29:40 +02:00
$this->load->view('layout/footer');
}
}