stany.ferer пре 3 месеци
родитељ
комит
321fb48559
2 измењених фајлова са 7 додато и 15 уклоњено
  1. 0 4
      public-cms/404.php
  2. 7 11
      public-events/404.php

+ 0 - 4
public-cms/404.php

@@ -1,8 +1,4 @@
 <?php
-/*
-error_reporting(E_ALL);
-ini_set('display_errors', 'On');
-*/
 require_once "../core/class/blacklist.class.php";
 new blacklist;
 

+ 7 - 11
public-events/404.php

@@ -1,26 +1,22 @@
 <?php
-/*
-error_reporting(E_ALL);
-ini_set('display_errors', 'On');
-*/
 require_once "../core/class/blacklist.class.php";
 new blacklist;
 
 
-if(blacklist::isValidIPv4()){
-    $text = blacklist::execute();
+if(!blacklist::isValidIPv4()){
+    $result = blacklist::execute();
 } else {
-    $text = "La page que vous cherchez n'existe pas.";
+    $result = ["error" => 404, "text" => "La page que vous cherchez n'existe pas."];
 }
 
-http_response_code(404);
+http_response_code($result["error"]);
 ?>
 
 <!DOCTYPE html>
 <html lang="fr">
 <head>
     <meta charset="UTF-8">
-    <title>Page non trouvée - Erreur 404</title>
+    <title>CSE Invent :. Erreur <?= $result["error"] ?></title>
     <style>
         body {
             font-family: Arial, sans-serif;
@@ -56,7 +52,7 @@ http_response_code(404);
 <body>
     <div class="container">
         <img src="img/logo.png" id="icon" alt="CSE Invent" width="300px">
-        <h1>404</h1>
-        <p><?= $text ?></p>
+        <h1><?= $result["error"] ?></h1>
+        <p><?= $result["text"] ?></p>
 </body>
 </html>