37 lines
1.1 KiB
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 {
2024-06-04 16:18:03 +02:00
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');
2024-06-04 16:39:51 +02:00
$albums = $this->model_music->getAlbums($genre, $order, $artist, $query);
2024-06-04 16:18:03 +02:00
$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');
}
2024-05-29 10:29:40 +02:00
}