From 3b3cd76d90627c51dee2436d576a45116d48e20d Mon Sep 17 00:00:00 2001
From: Sofiane Lasri <alasri250@gmail.com>
Date: Mon, 15 May 2023 16:44:57 +0200
Subject: [PATCH] Reformattage du code

---
 index.php | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/index.php b/index.php
index 1622627..1b43c94 100644
--- a/index.php
+++ b/index.php
@@ -5,7 +5,7 @@ require_once('core/_inc.php');
 /* require_once('config/bddConnect.php'); */
 
 // Vérifie le type de connexion
-if(isset($_SERVER['HTTPS'])) $http = "https"; else $http = "http";
+if (isset($_SERVER['HTTPS'])) $http = "https"; else $http = "http";
 
 // Variables permettant la gestion des pages à afficher
 $url = parse_url("$http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]");
@@ -14,14 +14,14 @@ $urlPath = explode("/", $url["path"]);
 array_shift($urlPath);
 
 // Si l'url commence par /Cristo -> Dev de Mathieu
-if(substr($_SERVER["REQUEST_URI"], 0, 7) == "/Cristo"){
-    $websiteBaseUrl = $http."://".$_SERVER["HTTP_HOST"]."/Cristo";
+if (substr($_SERVER["REQUEST_URI"], 0, 7) == "/Cristo") {
+    $websiteBaseUrl = $http . "://" . $_SERVER["HTTP_HOST"] . "/Cristo";
     array_shift($urlPath);
 } else {
-    $websiteBaseUrl = $http."://".$_SERVER["HTTP_HOST"];
+    $websiteBaseUrl = $http . "://" . $_SERVER["HTTP_HOST"];
 }
 
-if(!empty($urlPath[0])){
+if (!empty($urlPath[0])) {
     match ($urlPath[0]) {
         "rechercher" => require_once('pages/rechercher.php'),
         "recette" => require_once('pages/recette.php'),
-- 
GitLab