ソースを参照

Fix error log

stany.ferer 3 ヶ月 前
コミット
770945651e
1 ファイル変更11 行追加11 行削除
  1. 11 11
      core/class/serverLog.class.php

+ 11 - 11
core/class/serverLog.class.php

@@ -116,8 +116,8 @@ class serverLog {
                 div { font-size: 0.8em; }
                 pre { background: #fff; padding: 10px; border: 1px solid #ccc; overflow-x: auto; }
             </style>
-            <link rel="stylesheet" href="' . cache::printFileWithTime("libs/bootstrap/assets/dist/css/bootstrap.min.css") . '">
-            <script src="' . cache::printFileWithTime("libs/bootstrap/js/bootstrap.min.js") . '"></script>
+            <link rel="stylesheet" href="' . cache::getFileWithTime("libs/bootstrap/assets/dist/css/bootstrap.min.css") . '">
+            <script src="' . cache::getFileWithTime("libs/bootstrap/js/bootstrap.min.js") . '"></script>
         </head>
         <body>';
         foreach (array_slice($lines, 0, $limit) as $line) {
@@ -127,13 +127,13 @@ class serverLog {
         </html>';
     }
 
-    public static function consoleAttempts(){ echo SERVER_LOGS_BLACKLIST . "/ip_attempts.log";
-        if (!is_readable(SERVER_LOGS_BLACKLIST . "/ip_attempts.log")) {
+    public static function consoleAttempts(){ 
+        if (!is_readable(SERVER_LOGS_BLACKLIST . "ip_attempts.log")) {
             echo "Le fichier n'est pas accessible en lecture.";
             exit();
         }
 
-        $lines = file(SERVER_LOGS_BLACKLIST . "/ip_attempts.log");
+        $lines = file(SERVER_LOGS_BLACKLIST . "ip_attempts.log");
         $search = strtolower($_GET['search'] ?? '');
         $limit = strtolower($_GET['limit'] ?? 50); // A défaut les 50 derniers logs
 
@@ -152,8 +152,8 @@ class serverLog {
                 div { font-size: 0.8em; }
                 pre { background: #fff; padding: 10px; border: 1px solid #ccc; overflow-x: auto; }
             </style>
-            <link rel="stylesheet" href="' . cache::printFileWithTime("libs/bootstrap/assets/dist/css/bootstrap.min.css") . '">
-            <script src="' . cache::printFileWithTime("libs/bootstrap/js/bootstrap.min.js") . '"></script>
+            <link rel="stylesheet" href="' . cache::getFileWithTime("libs/bootstrap/assets/dist/css/bootstrap.min.css") . '">
+            <script src="' . cache::getFileWithTime("libs/bootstrap/js/bootstrap.min.js") . '"></script>
         </head>
         <body>';
         foreach (array_slice($lines, 0, $limit) as $line) {
@@ -164,12 +164,12 @@ class serverLog {
     }
 
     public static function consoleIpBlacklist(){
-        if (!is_readable(SERVER_LOGS_BLACKLIST . "/ip.txt")) {
+        if (!is_readable(SERVER_LOGS_BLACKLIST . "ip.txt")) {
             echo "Le fichier n'est pas accessible en lecture.";
             exit();
         }
 
-        $lines = file(SERVER_LOGS_BLACKLIST . "/ip.txt");
+        $lines = file(SERVER_LOGS_BLACKLIST . "ip.txt");
         $search = strtolower($_GET['search'] ?? '');
         $limit = strtolower($_GET['limit'] ?? 50); // A défaut les 50 derniers logs
 
@@ -188,8 +188,8 @@ class serverLog {
                 div { font-size: 0.8em; }
                 pre { background: #fff; padding: 10px; border: 1px solid #ccc; overflow-x: auto; }
             </style>
-            <link rel="stylesheet" href="' . cache::printFileWithTime("libs/bootstrap/assets/dist/css/bootstrap.min.css") . '">
-            <script src="' . cache::printFileWithTime("libs/bootstrap/js/bootstrap.min.js") . '"></script>
+            <link rel="stylesheet" href="' . cache::getFileWithTime("libs/bootstrap/assets/dist/css/bootstrap.min.css") . '">
+            <script src="' . cache::getFileWithTime("libs/bootstrap/js/bootstrap.min.js") . '"></script>
         </head>
         <body>';
         foreach (array_slice($lines, 0, $limit) as $line) {