Amélioration de la prise en charge des images Git et edition de connexion_sql #2

Merged
christian.cunatbrule merged 3 commits from develop into main 2026-08-06 18:33:36 +00:00
66 changed files with 36 additions and 28 deletions

5
.gitattributes vendored
View File

@@ -15,4 +15,7 @@
*.svg text diff eol=lf
# 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
# ----------------------
*.png
*.jpg
*.jpeg
# *.png
# *.jpg
# *.jpeg
*.gif
# ----------------------

View File

@@ -1,44 +1,49 @@
<?php
// Connexion à la base de données
try
{
$bdd = new PDO('mysql:host=localhost:3306;dbname=caria', 'ccbuser', 'HO9A#x@qD6Wl',array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
$env = parse_ini_file(__DIR__ . '/../.env');
if ($env === false) { die('Impossible de charger le fichier .env');}
try {
$bdd = new PDO(
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());
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
# Constantes
define('VISITEUR',1);
define('INSCRIT',2);
define('MODO',3);
define('ADMIN',4);
define('ERR_IS_CO','Vous ne pouvez pas accéder à cette page si vous n\'êtes pas connecté');
session_start();
# Connexion et initialisation des variables
$lvl_session = isset($_SESSION['privilege_session']) ? (int)$_SESSION['privilege_session'] : 1;
$id_session = isset($_SESSION['id_session']) ? (int)$_SESSION['id_session'] : 0;
$pseudo_session = isset($_SESSION['pseudo_session']) ? $_SESSION['pseudo_session'] : '';
function verifierAcces($min_privilege_requis) {
// Vérifier si l'utilisateur est connecté
function verifierAcces($min_privilege_requis)
{
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.";
include 'erreur.php';
exit(); // Arrêter l'exécution du script après affichage de l'erreur
exit();
}
// Vérifier le privilège de l'utilisateur
$privilege_utilisateur = isset($_SESSION['privilege_session']) ? (int)$_SESSION['privilege_session'] : VISITEUR;
// Vérifier si le privilège de l'utilisateur est suffisant pour accéder à la page
$privilege_utilisateur = isset($_SESSION['privilege_session'])
? (int)$_SESSION['privilege_session']
: VISITEUR;
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.";
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 name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<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" href="./module/bootstrap@5.3.3/dist/css/bootstrap.min.css" />
<!--MAP-->
@@ -17,7 +17,7 @@
<body class="bg1">
<header>
<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">
<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>