aboutsummaryrefslogtreecommitdiff
path: root/Neutron-trunk/cms-special/error/index.php
blob: 3983bc7777b27bdf498115b425920f36897da834 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php require_once "../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?>
<?php ob_start();echo("<!--\n\n" . str_replace('%year%', date('Y'), file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/resources/private/license")) . "\n\n-->") ?>
<?php

function rlgps() {}

if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent")) {
    $ready = true;
} else {
    $ready = false;
    header("Location: /cms-special/setup");
    require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit();
}

if ($ready) {
    require_once $_SERVER['DOCUMENT_ROOT'] . "/lang/processor.php";
    if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/system.log")) {
        if (isset($_GET['id'])) {
            file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/system.log", file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/system.log") . date("d/m/Y H:i:s") . " - INTERFACE/HTTP-ERROR - " . $_GET['id'] . "\n\n");
        } else {
            file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/system.log", file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/system.log") . date("d/m/Y H:i:s") . " - INTERFACE/HTTP-ERROR - Unknown \n\n");
        }
    } else {
        if (isset($_GET['id'])) {
            file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/system.log", date("d/m/Y H:i:s") . " - INTERFACE/HTTP-ERROR - " . $_GET['id'] . "\n\n");
        } else {
            file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/system.log", date("d/m/Y H:i:s") . " - INTERFACE/HTTP-ERROR - Unknown \n\n");
        }
    }
}

?>

<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="/resources/css/error.css">
    <link rel="stylesheet" href="/resources/css/fonts-import.css">
    <link rel="stylesheet" href="/resources/css/ui.css">
    <title><?php
    
    if ($ready) {
        echo(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/sitename"));
    } else {
        echo("Neutron");
    }

    ?></title>
    <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/header.php" ?>
</head>
<body neutron-error-body>
    <div class="centered discover">
        <h2><?= $lang["error"]["title"] ?></h2>
        <p><?= $lang["error"]["message"][0] ?></p>
        <p><?= $lang["error"]["message"][1] ?></p>
        <p><b><?php
        
        if (isset($_GET['id'])) {
            echo($lang["error"]["code"] . " " . $_GET['id']);
        } else {
            echo($lang["error"]["other"]);
        }

        ?></b></p>
        <a class="button" href="/"><?= $lang["error"]["direction"] ?></a>
    </div>
</body>
</html>