Commentaires

This commit is contained in:
2024-06-19 16:40:06 +02:00
parent 3c647bb426
commit 47cf47a918
5 changed files with 43 additions and 40 deletions

View File

@@ -3,7 +3,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
class Artistes extends CI_Controller {
private $sort = 'Tri';
private $sort = 'Tri'; // Variable pour définir l'ordre de tri par défaut
public function __construct(){
parent::__construct();
@@ -14,14 +14,14 @@ class Artistes extends CI_Controller {
}
public function index(){
$artistes = $this->model_music_artistes->getArtistes();
$artistes = $this->model_music_artistes->getArtistes(); // recuperer tout les artistes
$this->load->view('layout/header');
$this->load->view('artistes_list', ['artistes'=>$artistes]);
$this->load->view('layout/footer');
}
public function tri(){
$Ctri = $this->input->get('Ctri');
$Ctri = $this->input->get('Ctri'); // récupération du critère de trie depuis l'url
$trie = $this->model_music_artistes->get_tri_Artistes($Ctri);
$num_results = count($trie);
$this->load->view('layout/header');