51 lines
1.4 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');
2024-06-04 23:26:09 +02:00
$this->load->library('session');
2024-06-04 21:08:14 +02:00
}
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 22:09:23 +02:00
$query = $this->input->get('query');
2024-06-04 21:29:47 +02:00
2024-06-04 23:26:09 +02:00
$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);
2024-06-04 22:09:23 +02:00
$this->load->view('artists_list', $data);
2024-06-04 21:08:14 +02:00
$this->load->view('layout/footer');
}
2024-06-04 22:55:02 +02:00
public function view($artistId) {
2024-06-05 00:59:23 +02:00
$artistData = $this->model_music->getArtistDetails($artistId);
$is_logged_in = $this->session->userdata('logged_in');
$data = array(
'artist' => $artistData['artist'],
'albums' => $artistData['albums'],
'is_logged_in' => $is_logged_in
);
$this->load->view('layout/header', $data);
$this->load->view('artist_details', $data);
$this->load->view('layout/footer');
}
2024-06-04 21:08:14 +02:00
}
2024-06-04 22:09:23 +02:00
2024-06-04 23:30:04 +02:00