This repository was archived by the owner on Feb 16, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path567.php
More file actions
79 lines (68 loc) · 2.92 KB
/
567.php
File metadata and controls
79 lines (68 loc) · 2.92 KB
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
72
73
74
75
76
77
78
79
<?php
session_start();
header("HTTP/1.1 567 DuckStat (\"DDS\") Error");
$ini_location = "user/validation/app3.ini";
$ini = parse_ini_file($ini_location);
$meta = $_SESSION["error_meta"];
$error_code = $_SESSION["error"];
if($ini["debug"] == "true") {
switch($_SESSION["error"]) {
case "0":
$error = "<div style='background-color:lightgrey;'>The software encountered an unknown error and cannot work properly.<br>Please try the following:<br><br>1. Retry what you've wanted to do<br>2. Restart your Webserver<br>3. If everything above doesn't work, please visit our GitHub and create a Issue: <a href='https://github.com/OpenDucks/duckstat-oss/issues'>https://github.com/OpenDucks/duckstat-oss/issues</a></div>";
break;
case "1":
$error = "<div style='background-color:lightgrey;'>An major file is missing in the system, it is required, so DuckStat-OSS can work properly. Missing file: " . $meta["file"] . "</div>";
break;
case "2":
$error = "<div style='background-color:lightgrey;'> The LICENSE-File and/or LICENSE-NOTICE file is missing.<br>File missing: " . $meta["file"] . ".<br>Please redownload the file from GitHub, here is the link to our GitHub: <a href='https://github.com/TheDucky/duckstat-oss'>https://github.com/TheDucky/duckstat-oss</a></div>";
break;
default:
$error = "<div style='background-color:lightgrey;'>Nice try, there's no error, please leave the site.</div>";
$error_code = "Get outta here.";
break;
}
} else {
switch($_SESSION["error"]) {
case "0":
$error = "<div style='background-color:lightgrey;'>The software encountered an unknown error.</div>";
break;
case "1":
$error = "<div style='background-color:lightgrey;'>A file is missing.</div>";
break;
case "2":
$error = "<div style='background-color:lightgrey;'>LICENSE missing.</div>";
break;
default:
$error = "<div style='background-color:lightgrey;'>No Error.</div>";
$error_code = "Please leave :)";
break;
};
};
$content = file('VERSION');
?>
<html>
<h1>DDS Error</h1>
<p>The software encountered an error. Description below.</p>
<p><?php print_r($error) ?><br><br><?php echo "Errorcode: " . $error_code ?></p>
<?php
if($ini["debug"] == "true") {
echo "<b>Debug Mode is <u>enabled</u>.<br>";
};
if($ini["remove_session_error"] == "true") {
echo "<b>The current session error will be destroyed, reloading the page will result in showing no error.</b><br>";
}
if($ini["save_errors"] == "true") {
echo "<b>Your Errors will be saved in a log file.</b>";
};
?>
<hr>
<p>Version: <?php echo "<code><b>" . $content[0] . "</b></code>" ?></p>
</html>
<?php
if($ini["remove_session_error"] == "true") {
session_destroy();
};
// DO NOT DELETE COPYRIGHT NOTICE BELOW
/* DuckStat OSS by Duck Developing Studio and the OpenDuck Project */
# 2020
?>