37 lines
918 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
}
2024-06-04 15:45:15 +02:00
2024-05-29 10:29:40 +02:00
public function index(){
2024-06-03 16:51:37 +02:00
$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();
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,
2024-06-03 16:51:37 +02:00
'is_logged_in' => $is_logged_in,
2024-06-04 15:45:15 +02:00
'genres' => $genres,
'artistes' => $artists
2024-06-03 16:27:54 +02:00
);
2024-06-03 16:39:50 +02:00
$this->load->view('layout/header',$data);
2024-06-04 15:45:15 +02:00
$this->load->view('layout/getter',$data);
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');
}
}