duplication playlist

This commit is contained in:
2024-06-16 19:05:37 +02:00
parent 9597b8492f
commit 4efd73e0bf
16 changed files with 428 additions and 152 deletions

View File

@@ -15,21 +15,20 @@ class Chansons extends CI_Controller {
$album = $this->input->get('albums');
$sort = $this->input->get('sort');
$order = $this->input->get('order');
$recherche = $this->input->get('recherche', true);
if (empty($recherche)) {
$data['chansons'] = $this->model_music->get_filtered_chansons($genre, $artist, $year, $album, $sort, $order);
} else {
$data['chansons'] = $this->model_music->getSearchChansons($recherche);
}
if ($recherche=filter_input(INPUT_GET,'recherche') == false or $recherche=filter_input(INPUT_GET,'recherche') == null){
$chansons = $this->model_music->get_filtered_chansons($genre, $artist, $year, $album, $sort, $order);
$data['chansons'] = $chansons;
}else{
$recherche=filter_input(INPUT_GET,'recherche');
$chansons = $this->model_music->getSearchChansons($recherche);
$data['chansons'] = $chansons;
}
$this->load->view('layout/header');
if ($chansons == false){
if ($data['chansons'] == false){
$page = preg_split('/[\/]/',$_SERVER['REQUEST_URI']);
$this->load->view('error',['page'=>$page[count($page)-1]]);
$chansons = $this->model_music->get_filtered_chansons($genre, $artist, $year, $album, $sort, $order);
$data['chansons'] = $chansons;
$data['chansons'] = $this->model_music->get_filtered_chansons($genre, $artist, $year, $album, $sort, $order);
}
$data['genres'] = $this->model_music->get_all_genres_chansons();
$data['artists'] = $this->model_music->get_all_artists_chansons();