2nd update
This commit is contained in:
18
index.php
18
index.php
@@ -16,9 +16,9 @@ session_start();
|
||||
// Includes
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
include './custom/settings/config.php';
|
||||
include './custom/settings/settings.php';
|
||||
include 'functions.php';
|
||||
|
||||
|
||||
//TRANSLATION FILE LOCATION
|
||||
if (isset($_GET['language']) && $_GET['language'] !=''){
|
||||
//INCLUDE LANGUAGE FILE
|
||||
@@ -81,6 +81,7 @@ if (isset($_POST['banner_move'])){
|
||||
// Define all the routes for all pages
|
||||
$url = routes([
|
||||
'/' => 'home.php',
|
||||
'test' => 'test.php',
|
||||
'/about' => 'custom/pages/about.php',
|
||||
'/about_morval' => 'custom/pages/about_morval.php',
|
||||
'/product/{id}' => 'product.php',
|
||||
@@ -118,20 +119,5 @@ if ($url) {
|
||||
include $page . '.php';
|
||||
}
|
||||
|
||||
//debuglog
|
||||
if (log_usage){
|
||||
//GET REMOTE ADRESS
|
||||
$user_1 = $_SERVER['REMOTE_ADDR'] ?? '<none>';
|
||||
$user_2 = $_SERVER['HTTP_X_FORWARDED_FOR'] ?? '<none>';
|
||||
|
||||
//GET PAGE DETAILS
|
||||
$page = $_SERVER['REQUEST_URI'] ?? '<none>';
|
||||
$date = date('Y-m-d H:i:s');
|
||||
|
||||
//CREATE LOG MESSAGE
|
||||
$message = $date.';'.$page.';'.$user_1.';'.$user_2;
|
||||
|
||||
//UPDATE LOGFILE
|
||||
debuglog($message);
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user