"; - echo "
"; + echo "
diff --git a/ci/application/config/config.php b/ci/application/config/config.php index fdddfcb..f248cde 100644 --- a/ci/application/config/config.php +++ b/ci/application/config/config.php @@ -23,7 +23,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | a PHP script and you can easily do that on your own. | */ -$config['base_url'] = '/~gallego/SAEWEB2.2/ci/'; +$config['base_url'] = '/~brigitte/SAEWEB2.2/ci/'; /* |-------------------------------------------------------------------------- diff --git a/ci/application/controllers/Artistes.php b/ci/application/controllers/Artistes.php index 9d5f1f5..0d99155 100644 --- a/ci/application/controllers/Artistes.php +++ b/ci/application/controllers/Artistes.php @@ -16,10 +16,11 @@ class artistes extends CI_Controller { } public function view($AlbumsOfArtistId){ + $artistes = $this->model_music->getArtists(); $AlbumsOfArtists = $this->model_music->getAlbumsOfArtist($AlbumsOfArtistId); $playlists = $this->model_music->getPlaylist(); $this->load->view('layout/header'); - $this->load->view('albums_artist_list', ['AlbumsOfArtists' => $AlbumsOfArtists, 'playlists' => $playlists, 'artist_id' => $AlbumsOfArtistId]); + $this->load->view('albums_artist_list', ['AlbumsOfArtists' => $AlbumsOfArtists, 'playlists' => $playlists, 'artist_id' => $AlbumsOfArtistId, 'artistes' => $artistes]); $this->load->view('layout/footer'); } diff --git a/ci/application/controllers/Connexion.php b/ci/application/controllers/Connexion.php index 3a2962e..3286127 100644 --- a/ci/application/controllers/Connexion.php +++ b/ci/application/controllers/Connexion.php @@ -1,17 +1,4 @@ load->model('model_music'); - } - public function index(){ - $this->load->view('layout/connexion.php'); - } - -}*/ defined('BASEPATH') OR exit('No direct script access allowed'); @@ -28,24 +15,24 @@ class Connexion extends CI_Controller{ } public function login() { - $login = ''; - $password = ''; - if ($_SERVER["REQUEST_METHOD"] == "POST") { - if(isset($_POST['login']) && isset($_POST['password'])){ - $login = $_POST['login']; - $password = $_POST['password']; - } - } - $result = $this->model_music->getLogin($login,$password); -if (count($result) > 0) { - $this->session->set_userdata('logged', true); - $this->load->view('layout/header'); - redirect('albums'); -} else { - $this->load->view('layout/header'); - $this->load->view('login'); - $this->load->view('layout/footer'); - echo "Invalid login or password"; -} + $login = ''; + $password = ''; + if ($_SERVER["REQUEST_METHOD"] == "POST") { + if(isset($_POST['login']) && isset($_POST['password'])){ + $login = $_POST['login']; + $password = $_POST['password']; + } + } + $result = $this->model_music->getLogin($login,$password); + if (count($result) > 0) { + $this->session->set_userdata('logged', true); + $this->load->view('layout/header'); + redirect('albums'); + } else { + //$this->load->view('layout/header'); + $this->load->view('login'); + $this->load->view('layout/footer'); + echo "Invalid login or password"; + } } } diff --git a/ci/application/views/Welcome.php b/ci/application/views/Welcome.php index a6903e0..5949a35 100644 --- a/ci/application/views/Welcome.php +++ b/ci/application/views/Welcome.php @@ -31,12 +31,18 @@ = anchor('https://dwarves.iut-fbleau.fr/~brigitte/SAEWEB2.2/ci/index.php/Song/view/62','Tool'); ?> -