From e372d8d642c89df39d25b9f9c8a02552dc2fa9c8 Mon Sep 17 00:00:00 2001 From: stiti Date: Thu, 6 Jun 2024 18:28:40 +0200 Subject: [PATCH] Commit de marco --- .../application/controllers/Home.php | 1 + .../application/controllers/Playlists.php | 6 ++++-- CodeIgniter-3.1.13/application/views/accueil.php | 8 +++----- .../application/views/confirmation.php | 4 ++-- CodeIgniter-3.1.13/assets/css/accueil.css | 15 ++++++++++++--- 5 files changed, 22 insertions(+), 12 deletions(-) diff --git a/CodeIgniter-3.1.13/application/controllers/Home.php b/CodeIgniter-3.1.13/application/controllers/Home.php index cc2853a..bab8c0e 100644 --- a/CodeIgniter-3.1.13/application/controllers/Home.php +++ b/CodeIgniter-3.1.13/application/controllers/Home.php @@ -6,6 +6,7 @@ class Home extends CI_Controller { public function __construct() { parent::__construct(); $this->load->library('session'); + $this->load->helper('html'); } public function index() { diff --git a/CodeIgniter-3.1.13/application/controllers/Playlists.php b/CodeIgniter-3.1.13/application/controllers/Playlists.php index 15752d8..0b874f3 100644 --- a/CodeIgniter-3.1.13/application/controllers/Playlists.php +++ b/CodeIgniter-3.1.13/application/controllers/Playlists.php @@ -182,6 +182,8 @@ class Playlists extends CI_Controller { } public function generate_random() { + date_default_timezone_set('Europe/Paris'); + if (!$this->session->userdata('user_id')) { redirect('utilisateur/connexion'); } @@ -194,8 +196,8 @@ class Playlists extends CI_Controller { $songs = $this->Model_music->get_random_songs($nbrMusiqueAleatoire, $genre, $artist); $new_playlist = array( - 'name' => 'Playlist aléatoire du ' . date('Y-m-d H:i:s'), - 'description' => 'Une playlist avec ' . $nbrMusiqueAleatoire . ' musiques aléatoires.', + 'name' => 'Playlist aléatoire', + 'description' => 'Une playlist avec ' . $nbrMusiqueAleatoire . ' musiques aléatoires du ' . date('Y-m-d H:i:s'), 'utilisateur_id' => $this->session->userdata('user_id') ); diff --git a/CodeIgniter-3.1.13/application/views/accueil.php b/CodeIgniter-3.1.13/application/views/accueil.php index 4c5cf78..9596f7a 100644 --- a/CodeIgniter-3.1.13/application/views/accueil.php +++ b/CodeIgniter-3.1.13/application/views/accueil.php @@ -1,14 +1,12 @@ - -

Bienvenue sur Onzeur !

-

Le service de création de playlist musical numéro 1 en France.

- +

Le service de création de playlist musical numéro 1 en France.

+ Accéder à la musique
-