css + resolution de bug php
This commit is contained in:
@@ -3,22 +3,29 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Albums extends CI_Controller {
|
||||
|
||||
public function __construct(){
|
||||
parent::__construct();
|
||||
$this->load->model('model_music');
|
||||
}
|
||||
public function index(){
|
||||
$albums = $this->model_music->getAlbums();
|
||||
$this->load->view('layout/header');
|
||||
$this->load->view('albums_list',['albums'=>$albums]);
|
||||
$this->load->view('layout/footer');
|
||||
}
|
||||
public function __construct(){
|
||||
parent::__construct();
|
||||
$this->load->model('model_music');
|
||||
}
|
||||
|
||||
public function view($album_id){
|
||||
$songs = $this->model_music->getSongOfAlbum($album_id);
|
||||
$this->load->view('layout/header');
|
||||
$this->load->view('song_album_list',['songs'=>$songs]);
|
||||
$this->load->view('layout/footer');
|
||||
}
|
||||
public function index(){
|
||||
$albums = $this->model_music->getAlbums();
|
||||
$this->load->view('layout/header_album');
|
||||
$this->load->view('albums_list', ['albums' => $albums]);
|
||||
$this->load->view('layout/footer_album');
|
||||
}
|
||||
|
||||
public function view($album_id){
|
||||
$songs = $this->model_music->getSongsByAlbum($album_id);
|
||||
if (empty($songs)) {
|
||||
$songs = []; // Assurez-vous que $songs est un tableau vide si aucune chanson n'est trouvée
|
||||
}
|
||||
// Debugging: Log the $songs variable to see its content
|
||||
log_message('debug', 'Songs: ' . print_r($songs, true));
|
||||
|
||||
$this->load->view('layout/header_album');
|
||||
$this->load->view('song_album_list', ['songs' => $songs]);
|
||||
$this->load->view('layout/footer_album');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -9,15 +9,9 @@ class artistes extends CI_Controller {
|
||||
}
|
||||
public function index(){
|
||||
$artistes = $this->model_music->getArtists();
|
||||
$this->load->view('layout/header');
|
||||
$this->load->view('layout/header_artistes');
|
||||
$this->load->view('artistes_list',['artistes'=>$artistes]);
|
||||
$this->load->view('layout/footer');
|
||||
}
|
||||
public function view($AlbumsOfArtistId){
|
||||
$AlbumsOfArtist = $this->model_music->getAlbumsOfArtist($AlbumsOfArtistId);
|
||||
$this->load->view('layout/header');
|
||||
$this->load->view('albums_artist_list',['AlbumsOfArtist'=>$AlbumsOfArtist]);
|
||||
$this->load->view('layout/footer');
|
||||
$this->load->view('layout/footer_artistes');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,9 +9,9 @@ class Albums extends CI_Controller {
|
||||
}
|
||||
public function index(){
|
||||
$albums = $this->model_music->getAlbums();
|
||||
$this->load->view('layout/header');
|
||||
$this->load->view('layout/header_chanson');
|
||||
$this->load->view('albums_list',['albums'=>$albums]);
|
||||
$this->load->view('layout/footer');
|
||||
$this->load->view('layout/footer_chanson');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ class Song extends CI_Controller {
|
||||
|
||||
public function view($album_id){
|
||||
$songs = $this->model_music->getSongOfAlbum($album_id);
|
||||
$this->load->view('layout/header');
|
||||
$this->load->view('layout/header_song');
|
||||
$this->load->view('song_album_list',['songs'=>$songs]);
|
||||
$this->load->view('layout/footer');
|
||||
$this->load->view('layout/footer_song');
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,15 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Welcome extends CI_Controller {
|
||||
class welcome extends CI_Controller {
|
||||
|
||||
/**
|
||||
* Index Page for this controller.
|
||||
*
|
||||
* Maps to the following URL
|
||||
* http://example.com/index.php/welcome
|
||||
* - or -
|
||||
* http://example.com/index.php/welcome/index
|
||||
* - or -
|
||||
* Since this controller is set as the default controller in
|
||||
* config/routes.php, it's displayed at http://example.com/
|
||||
*
|
||||
* So any other public methods not prefixed with an underscore will
|
||||
* map to /index.php/welcome/<method_name>
|
||||
* @see https://codeigniter.com/userguide3/general/urls.html
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('welcome_message');
|
||||
public function __construct(){
|
||||
parent::__construct();
|
||||
$this->load->model('model_music');
|
||||
}
|
||||
public function index(){
|
||||
$this->load->view('layout/header');
|
||||
$this->load->view('layout/footer');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user