33 lines
1.0 KiB
PHP
Raw Normal View History

2024-06-03 16:51:37 +02:00
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
2024-06-04 17:24:06 +02:00
class Artistes extends CI_Controller {
2024-06-03 16:51:37 +02:00
2024-06-04 21:08:14 +02:00
public function __construct(){
parent::__construct();
$this->load->model('model_music');
$this->load->library('session'); // La session est déjà chargée via autoload.php, mais par précaution.
}
2024-06-03 16:51:37 +02:00
2024-06-04 21:08:14 +02:00
public function index(){
$genre = $this->input->get('genre');
$order = $this->input->get('order');
2024-06-04 21:29:47 +02:00
$query = $this->input->get('query');
$artists = $this->model_music->getArtists($genre, $order, $query);
2024-06-04 21:08:14 +02:00
$genres = $this->model_music->researchtype();
$is_logged_in = $this->session->userdata('logged_in');
$data = array(
'artists' => $artists,
'genres' => $genres,
'is_logged_in' => $is_logged_in
);
$this->load->view('layout/header', $data);
$this->load->view('layout/getter', $data);
$this->load->view('artists_name', $data);
$this->load->view('layout/footer');
}
}