Compare commits

...

4 Commits

Author SHA1 Message Date
6020b304a6 Merge pull request 'Amélioration de la prise en charge des images Git et edition de connexion_sql' (#2) from develop into main
All checks were successful
Déploiement PROD / deploy (push) Successful in 9s
Reviewed-on: #2
2026-08-06 18:33:36 +00:00
Christian CUNAT-BRULE
4739a83d2c chore: applique les règles de .gitattributes
All checks were successful
Déploiement DEV / deploy (push) Successful in 9s
2026-08-06 20:27:25 +02:00
Christian CUNAT-BRULE
ae9b9d1efc Ajout des images PNG et JPG
All checks were successful
Déploiement DEV / deploy (push) Successful in 8s
2026-08-06 20:24:52 +02:00
Christian CUNAT-BRULE
ce01f19404 Edition conexion_sql
All checks were successful
Déploiement DEV / deploy (push) Successful in 8s
2026-08-06 20:12:07 +02:00
66 changed files with 36 additions and 28 deletions

3
.gitattributes vendored
View File

@@ -16,3 +16,6 @@
# Forcer WebP en fichier binaire # Forcer WebP en fichier binaire
*.webp binary *.webp binary
*.png binary
*.jpg binary
*.jpeg binary

6
.gitignore vendored
View File

@@ -99,9 +99,9 @@ $RECYCLE.BIN/
# ---------------------- # ----------------------
# Images # Images
# ---------------------- # ----------------------
*.png # *.png
*.jpg # *.jpg
*.jpeg # *.jpeg
*.gif *.gif
# ---------------------- # ----------------------

View File

@@ -1,43 +1,48 @@
<?php <?php
// Connexion à la base de données $env = parse_ini_file(__DIR__ . '/../.env');
try if ($env === false) { die('Impossible de charger le fichier .env');}
{
$bdd = new PDO('mysql:host=localhost:3306;dbname=caria', 'ccbuser', 'HO9A#x@qD6Wl',array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")); try {
} $bdd = new PDO(
catch(Exception $e) sprintf('mysql:host=%s;port=%s;dbname=%s;charset=%s', $env['DB_HOST'], $env['DB_PORT'], $env['DB_NAME'], $env['DB_CHARSET']),
{ $env['DB_USER'], $env['DB_PASS'],
[
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => false,
]
);
} catch (PDOException $e) {
die('Erreur : ' . $e->getMessage()); die('Erreur : ' . $e->getMessage());
} }
# Constantes
define('VISITEUR',1); define('VISITEUR',1);
define('INSCRIT',2); define('INSCRIT',2);
define('MODO',3); define('MODO',3);
define('ADMIN',4); define('ADMIN',4);
define('ERR_IS_CO','Vous ne pouvez pas accéder à cette page si vous n\'êtes pas connecté'); define('ERR_IS_CO','Vous ne pouvez pas accéder à cette page si vous n\'êtes pas connecté');
session_start(); session_start();
# Connexion et initialisation des variables
$lvl_session = isset($_SESSION['privilege_session']) ? (int)$_SESSION['privilege_session'] : 1; $lvl_session = isset($_SESSION['privilege_session']) ? (int)$_SESSION['privilege_session'] : 1;
$id_session = isset($_SESSION['id_session']) ? (int)$_SESSION['id_session'] : 0; $id_session = isset($_SESSION['id_session']) ? (int)$_SESSION['id_session'] : 0;
$pseudo_session = isset($_SESSION['pseudo_session']) ? $_SESSION['pseudo_session'] : ''; $pseudo_session = isset($_SESSION['pseudo_session']) ? $_SESSION['pseudo_session'] : '';
function verifierAcces($min_privilege_requis) { function verifierAcces($min_privilege_requis)
// Vérifier si l'utilisateur est connecté {
if (!isset($_SESSION['id_session'])) { if (!isset($_SESSION['id_session'])) {
// Afficher la page d'erreur en incluant le fichier de vue
$message = "Vous devez être connecté pour accéder à cette page."; $message = "Vous devez être connecté pour accéder à cette page.";
include 'erreur.php'; include 'erreur.php';
exit(); // Arrêter l'exécution du script après affichage de l'erreur exit();
} }
$privilege_utilisateur = isset($_SESSION['privilege_session'])
// Vérifier le privilège de l'utilisateur ? (int)$_SESSION['privilege_session']
$privilege_utilisateur = isset($_SESSION['privilege_session']) ? (int)$_SESSION['privilege_session'] : VISITEUR; : VISITEUR;
// Vérifier si le privilège de l'utilisateur est suffisant pour accéder à la page
if ($privilege_utilisateur < $min_privilege_requis) { if ($privilege_utilisateur < $min_privilege_requis) {
// Afficher la page d'erreur en incluant le fichier de vue
$message = "Vous n'avez pas les droits d'accès nécessaires pour accéder à cette page."; $message = "Vous n'avez pas les droits d'accès nécessaires pour accéder à cette page.";
include 'erreur.php'; include 'erreur.php';
exit(); // Arrêter l'exécution du script après affichage de l'erreur exit();
} }
} }

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 KiB

Binary file not shown.

Binary file not shown.

BIN
config/images/favicon.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

BIN
config/images/logo.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>CARIA Project</title> <title>CARIA Project</title>
<link rel="shortcut icon" type="image/png" href="./config/images/favicon.png" /> <link rel="shortcut icon" href="./config/images/favicon.webp" />
<link rel="stylesheet" type="text/css" media="screen" href="./css/style.css" /> <link rel="stylesheet" type="text/css" media="screen" href="./css/style.css" />
<link rel="stylesheet" type="text/css" href="./module/bootstrap@5.3.3/dist/css/bootstrap.min.css" /> <link rel="stylesheet" type="text/css" href="./module/bootstrap@5.3.3/dist/css/bootstrap.min.css" />
<!--MAP--> <!--MAP-->
@@ -17,7 +17,7 @@
<body class="bg1"> <body class="bg1">
<header> <header>
<div class="container"> <div class="container">
<div class="text-center"><a href="index.php"><img src="./config/images/logo.png"></a></div> <div class="text-center"><a href="index.php"><img src="./config/images/logo.webp"></a></div>
<nav class="navbar navbar-expand-lg navbar-dark bg-secondary"> <nav class="navbar navbar-expand-lg navbar-dark bg-secondary">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>