css + resolution de bug php

This commit is contained in:
2024-05-30 10:05:37 +02:00
parent a0af043f68
commit f7d8c15910
27 changed files with 747 additions and 105 deletions

View File

@@ -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'] = '/~brigitte/SAEWEB2.2/ci';
$config['base_url'] = 'https://dwarves.iut-fbleau.fr/~boutaric/test/ci/';
/*
|--------------------------------------------------------------------------

View File

@@ -49,6 +49,6 @@ defined('BASEPATH') OR exit('No direct script access allowed');
| Examples: my-controller/index -> my_controller/index
| my-controller/my-method -> my_controller/my_method
*/
$route['default_controller'] = 'albums';
$route['default_controller'] = 'welcome';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;

View File

@@ -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');
}
}
?>

View File

@@ -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');
}
}

View File

@@ -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');
}
}

View File

@@ -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');
}
}

View File

@@ -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');
}
}

View File

@@ -1,14 +1,14 @@
<h5>Albums list</h5>
<section class="list">
<h5>Liste des albums</h5>
<section class="container">
<?php
foreach($albums as $album){
echo "<div><article>";
echo "<header class='short-text'>";
echo anchor("Song/view/{$album->id}","{$album->name}");
echo "</header>";
echo '<img src="data:image/jpeg;base64,'.base64_encode($album->jpeg).'" />';
echo "<footer class='short-text'>{$album->year} - {$album->artistName}</footer>
</article></div>";
echo "<div class='album'><article>";
echo "<header class='album-title'>";
echo anchor("Song/view/{$album->id}", "{$album->name}");
echo "</header>";
echo '<img src="data:image/jpeg;base64,' . base64_encode($album->jpeg) . '" alt="' . $album->name . '" />';
echo "<footer class='short-text'>{$album->year} - {$album->artistName}</footer>";
echo "</article></div>";
}
?>
</section>

View File

@@ -11,4 +11,4 @@ foreach($artistes as $artistes){
//</article></div>";
}
?>
</section>
</section>

View File

@@ -1,3 +1,48 @@
</main>
</body>
<!doctype html>
<html lang="en" class="has-navbar-fixed-top">
<head>
<meta charset="UTF-8" />
<title>MUSIC APP</title>
<link rel="stylesheet" href="<?= base_url('assets/style.css') ?>">
</head>
<body>
<footer class="footer">
<div class="footer-content">
<div class="footer-section">
<h3>Mentions légales</h3>
<a href="html/mention_legal.html">Consulter nos mentions légales</a> <br>
<a href="Charte_graphique.pdf" target="_blank">Consulter notre chartre graphique</a>
</div>
<div class="footer-section">
<h3>Plan du site</h3>
<a href="html/plan.html">Consulter le plan du site</a>
</div>
<div class="footer-section">
<h3>Contact</h3>
<p>Email : <a href="mailto:contact.Spotifly@gmail.com">contact.SpotiFly@gmail.com</a></p>
<p>
</div>
<div class="footer-section-reseaux">
<h3>Réseaux sociaux</h3>
<div class="logo-reseaux">
<p>
<a href="https://www.instagram.com/" target="_blank" class="social-icon">
<img src="img/Instagram.png" alt="Logo Instagram">
</a>
</p>
<p>
<a href="https://www.X.com/" target="_blank" class="social-icon">
<img src="img/twitter.png" alt="Logo X">
</a>
</p>
</div>
</div>
</div>
<div class="footer-logo">
<img src="img/logo_blanc.png" alt="SpotiFly Logo">
<p>&copy; 2024 SpotiFly.</p>
</div>
</footer>
</body>
</html>

View File

@@ -0,0 +1,47 @@
<!doctype html>
<html lang="en" class="has-navbar-fixed-top">
<head>
<meta charset="UTF-8" />
<title>MUSIC APP</title>
<link rel="stylesheet" href="<?= base_url('assets/style.css') ?>">
</head>
<body>
<footer class="footer">
<div class="footer-content">
<div class="footer-section">
<h3>Mentions légales</h3>
<a href="html/mention_legal.html">Consulter nos mentions légales</a> <br>
<a href="Charte_graphique.pdf" target="_blank">Consulter notre chartre graphique</a>
</div>
<div class="footer-section">
<h3>Plan du site</h3>
<a href="html/plan.html">Consulter le plan du site</a>
</div>
<div class="footer-section">
<h3>Contact</h3>
<p>Email : <a href="mailto:contact.Spotifly@gmail.com">contact.SpotiFly@gmail.com</a></p>
<p>
</div>
<div class="footer-section-reseaux">
<h3>Réseaux sociaux</h3>
<div class="logo-reseaux">
<p>
<a href="https://www.instagram.com/" target="_blank" class="social-icon">
<img src="img/Instagram.png" alt="Logo Instagram">
</a>
</p>
<p>
<a href="https://www.X.com/" target="_blank" class="social-icon">
<img src="img/twitter.png" alt="Logo X">
</a>
</p>
</div>
</div>
</div>
<div class="footer-logo">
<img src="img/logo_blanc.png" alt="SpotiFly Logo">
<p>&copy; 2024 SpotiFly.</p>
</div>
</footer>
</body>
</html>

View File

@@ -0,0 +1,47 @@
<!doctype html>
<html lang="en" class="has-navbar-fixed-top">
<head>
<meta charset="UTF-8" />
<title>MUSIC APP</title>
<link rel="stylesheet" href="<?= base_url('assets/style.css') ?>">
</head>
<body>
<footer class="footer">
<div class="footer-content">
<div class="footer-section">
<h3>Mentions légales</h3>
<a href="html/mention_legal.html">Consulter nos mentions légales</a> <br>
<a href="Charte_graphique.pdf" target="_blank">Consulter notre chartre graphique</a>
</div>
<div class="footer-section">
<h3>Plan du site</h3>
<a href="html/plan.html">Consulter le plan du site</a>
</div>
<div class="footer-section">
<h3>Contact</h3>
<p>Email : <a href="mailto:contact.Spotifly@gmail.com">contact.SpotiFly@gmail.com</a></p>
<p>
</div>
<div class="footer-section-reseaux">
<h3>Réseaux sociaux</h3>
<div class="logo-reseaux">
<p>
<a href="https://www.instagram.com/" target="_blank" class="social-icon">
<img src="img/Instagram.png" alt="Logo Instagram">
</a>
</p>
<p>
<a href="https://www.X.com/" target="_blank" class="social-icon">
<img src="img/twitter.png" alt="Logo X">
</a>
</p>
</div>
</div>
</div>
<div class="footer-logo">
<img src="img/logo_blanc.png" alt="SpotiFly Logo">
<p>&copy; 2024 SpotiFly.</p>
</div>
</footer>
</body>
</html>

View File

@@ -0,0 +1,47 @@
<!doctype html>
<html lang="en" class="has-navbar-fixed-top">
<head>
<meta charset="UTF-8" />
<title>MUSIC APP</title>
<link rel="stylesheet" href="<?= base_url('assets/style.css') ?>">
</head>
<body>
<footer class="footer">
<div class="footer-content">
<div class="footer-section">
<h3>Mentions légales</h3>
<a href="html/mention_legal.html">Consulter nos mentions légales</a> <br>
<a href="Charte_graphique.pdf" target="_blank">Consulter notre chartre graphique</a>
</div>
<div class="footer-section">
<h3>Plan du site</h3>
<a href="html/plan.html">Consulter le plan du site</a>
</div>
<div class="footer-section">
<h3>Contact</h3>
<p>Email : <a href="mailto:contact.Spotifly@gmail.com">contact.SpotiFly@gmail.com</a></p>
<p>
</div>
<div class="footer-section-reseaux">
<h3>Réseaux sociaux</h3>
<div class="logo-reseaux">
<p>
<a href="https://www.instagram.com/" target="_blank" class="social-icon">
<img src="img/Instagram.png" alt="Logo Instagram">
</a>
</p>
<p>
<a href="https://www.X.com/" target="_blank" class="social-icon">
<img src="img/twitter.png" alt="Logo X">
</a>
</p>
</div>
</div>
</div>
<div class="footer-logo">
<img src="img/logo_blanc.png" alt="SpotiFly Logo">
<p>&copy; 2024 SpotiFly.</p>
</div>
</footer>
</body>
</html>

View File

@@ -1,28 +1,71 @@
<!doctype html>
<html lang="en" class="has-navbar-fixed-top">
<head>
<meta charset="UTF-8" />
<title>MUSIC APP</title>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"
/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<?php=link_tag('assets/style.css')?>
</head>
<body>
<main class='container'>
<nav>
<ul>
<li><strong>Music APP</strong></li>
</ul>
<input type="search" id="site-search" name="q"/>
<input type="submit" value="Rechercher" \>
<ul>
<li><?=anchor('albums','Albums');?></li>
<li><?=anchor('artistes','Artistes');?></li>
<li><?=anchor('playlist','Playlist');?></li>
</ul>
</nav>
<head>
<meta charset="UTF-8" />
<title>MUSIC APP</title>
<link rel="stylesheet" href="<?= base_url('assets/style.css') ?>">
</head>
<body>
<main class='container'>
<header class="navbar">
<div class="logo">
<img src="assets/img/SpotiFly.png" alt="SpotiFly">
</div>
<nav class="menu">
<ul>
<li><?= anchor('https://dwarves.iut-fbleau.fr/~boutaric/test/ci/','Home'); ?></li>
<li><?= anchor('albums','Albums'); ?></li>
<li><?= anchor('artistes','Artistes'); ?></li>
<li><?= anchor('playlist','Playlist'); ?></li>
</ul>
</nav>
<div class="user">
<a class="bouton" href="html/Connexion.html">Connexion</a>
<a class="bouton" href="html/Inscription.html">S'inscrire</a>
</div>
</header>
<div id="Page">
<div class="content">
<img src="assets/img/SpotiFly.png" alt="SpotiFly">
<div class="text-page">
<h2>SpotiFly : envole-toi au rythme de la musique !</h2>
</div>
</div>
</div>
<div id="header"> </div>
<div class="content">
<section id="about" class="box">
<div class="box-content">
<img src="assets/img/argent.png" alt="Description de l'image 2">
<div class="text-content">
<h2>1 mois gratuit?</h2>
<p>"Découvrez une expérience musicale sans limites avec notre offre exclusive : abonnez-vous dès aujourd'hui et bénéficiez d'un mois complet GRATUIT pour explorer notre vaste catalogue de musique. Plongez dans un univers de sonorités variées et profitez d'un accès illimité à vos artistes préférés, sans engagement ! Rejoignez-nous dès maintenant pour un mois d'exploration musicale sans pareil."</p>
</div>
</div>
</section>
<section id="product" class="box">
<div class="box-img">
<img src="assets/img/argent.png" alt="Description de l'image 3">
<div class="text-content">
<h2>La Cognition</h2>
<p>Découvrez notre nouveaux cube v3 qui peut avoir la voix de votre choix.</p>
<p>Plongez dans une réalité où la cognition rencontre la technologie. Notre cube connecté va au-delà de l'ordinaire, réagissant à votre pensée et intégrant la puissance de la cognition pour une expérience holographique incomparable.</p>
</div>
</div>
</section>
<section id="sale" class="box">
<div class="box-content">
<img src="assets/img/Statistique.png" alt="Description de l'image 4">
<div class="text-content">
<h2>Statistiques</h2>
<p>"Découvrez les statistiques de notre application de musique : des millions d'utilisateurs s'immergent dans une expérience audio immersive, créant des milliers de playlists et explorant une multitude de genres musicaux, tout en bénéficiant d'un mois gratuit dès l'abonnement !"</p>
</div>
</div>
</section>
</div>
<script src="assets/bouton.js"></script>
<button id="scrollTopBtn" onclick="scrollToTop()">
<span>&#8593;</span>
</button>
</body>
</html>

View File

@@ -0,0 +1,33 @@
<!doctype html>
<html lang="en" class="has-navbar-fixed-top">
<head>
<meta charset="UTF-8" />
<title>MUSIC APP</title>
<link rel="stylesheet" href="<?= base_url('assets/style.css') ?>">
<link rel="stylesheet" href="<?= base_url('assets/album.css') ?>">
</head>
<body>
<main class='container'>
<header class="navbar">
<div class="logo">
<img src="assets/img/SpotiFly.png" alt="SpotiFly">
</div>
<nav class="menu">
<ul>
<li><?= anchor('https://dwarves.iut-fbleau.fr/~boutaric/test/ci/','Home'); ?></li>
<li><?= anchor('albums','Albums'); ?></li>
<li><?= anchor('artistes','Artistes'); ?></li>
<li><?= anchor('playlist','Playlist'); ?></li>
</ul>
</nav>
<div class="user">
<a class="bouton" href="html/Connexion.html">Connexion</a>
<a class="bouton" href="html/Inscription.html">S'inscrire</a>
</div>
</header>
<script src="assets/bouton.js"></script>
<button id="scrollTopBtn" onclick="scrollToTop()">
<span>&#8593;</span>
</button>
</body>
</html>

View File

@@ -0,0 +1,32 @@
<!doctype html>
<html lang="en" class="has-navbar-fixed-top">
<head>
<meta charset="UTF-8" />
<title>MUSIC APP</title>
<link rel="stylesheet" href="<?= base_url('assets/style.css') ?>">
</head>
<body>
<main class='container'>
<header class="navbar">
<div class="logo">
<img src="assets/img/SpotiFly.png" alt="SpotiFly">
</div>
<nav class="menu">
<ul>
<li><?= anchor('https://dwarves.iut-fbleau.fr/~boutaric/test/ci/','Home'); ?></li>
<li><?= anchor('albums','Albums'); ?></li>
<li><?= anchor('artistes','Artistes'); ?></li>
<li><?= anchor('playlist','Playlist'); ?></li>
</ul>
</nav>
<div class="user">
<a class="bouton" href="html/Connexion.html">Connexion</a>
<a class="bouton" href="html/Inscription.html">S'inscrire</a>
</div>
</header>
<script src="assets/bouton.js"></script>
<button id="scrollTopBtn" onclick="scrollToTop()">
<span>&#8593;</span>
</button>
</body>
</html>

View File

@@ -0,0 +1,32 @@
<!doctype html>
<html lang="en" class="has-navbar-fixed-top">
<head>
<meta charset="UTF-8" />
<title>MUSIC APP</title>
<link rel="stylesheet" href="<?= base_url('assets/style.css') ?>">
</head>
<body>
<main class='container'>
<header class="navbar">
<div class="logo">
<img src="assets/img/SpotiFly.png" alt="SpotiFly">
</div>
<nav class="menu">
<ul>
<li><?= anchor('https://dwarves.iut-fbleau.fr/~boutaric/test/ci/','Home'); ?></li>
<li><?= anchor('albums','Albums'); ?></li>
<li><?= anchor('artistes','Artistes'); ?></li>
<li><?= anchor('playlist','Playlist'); ?></li>
</ul>
</nav>
<div class="user">
<a class="bouton" href="html/Connexion.html">Connexion</a>
<a class="bouton" href="html/Inscription.html">S'inscrire</a>
</div>
</header>
<script src="assets/bouton.js"></script>
<button id="scrollTopBtn" onclick="scrollToTop()">
<span>&#8593;</span>
</button>
</body>
</html>

View File

@@ -12,4 +12,4 @@ foreach($songs as $song){
echo "</article></div>";
}
?>
</section>
</section>