This repository has been archived by the owner on Oct 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
65 lines (65 loc) · 3.32 KB
/
index.php
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
<?php
$serverres = http_response_code();
require "misc/header.php";
$config = require('config.php');
?>
<title>GMX</title>
</head>
<body>
<?php
if($serverres !== 200) {
if($serverres == 400) {
$errorcode = '400';
$errordes = 'Bad request.';
}
if($serverres == 403) {
$errorcode = '403';
$errordes = 'The requested URL <b>'.parse_url($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], PHP_URL_PATH).'</b> is forbidden.';
}
if($serverres == 404) {
$errorcode = '404';
$errordes = 'The requested URL <b>'.parse_url($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], PHP_URL_PATH).'</b> was not found.';
}
if($serverres == 405) {
$errorcode = '405';
$errordes = 'Method not allowed.';
}
if($serverres == 500) {
$errorcode = '500';
$errordes = 'An unknown error occurred.';
}
if($serverres == 501) {
$errorcode = '501';
$errordes = 'Not implemented.';
}
if($serverres == 502) {
$errorcode = '502';
$errordes = 'Bad gateway.';
}
if($serverres == 504) {
$errorcode = '504';
$errordes = 'Gateway timeout.';
}
if($serverres == 505) {
$errorcode = '505';
$errordes = 'HTTP version not supported.';
}
?>
<div class="search-container">
<h1 class="mb-1">GM<span class="X">X</span></h1>
<p class="mb-4"><b><?php echo $errorcode; ?></b> That's an error.</p>
<p><?php echo $errordes; ?></p>
</div>
<?php } else { ?>
<div class="p-2"><a class="float-start" style="color: var(--footer-fg); text-decoration: none; transition: all .3s;" onmouseout="this.style.color='var(--footer-fg)';" onmouseover="this.style.color='var(--gmx-blue)';" href="https://github.com/gamemaster123356/GMX/releases/tag/<?php echo $config->gmx_version; ?>"><?php echo $config->gmx_version; ?></a><a class="float-end" href="./settings"><button class="settings-button"><i class="fa-solid fa-md fa-cog"></i></button></a></div>
<div class="clearfix"></div>
<form class="search-container" action="search" method="get" autocomplete="off">
<h1 class="mb-0">GM<span class="X">X</span></h1>
<input type="text" class="mt-3" name="q"/>
<input type="hidden" name="p" value="0"/>
<input type="submit" class="hide"/><br>
<button class="search-button mt-4" name="type" value="0" type="submit">GMX Search</button>
<button class="search-button mt-4" name="type" value="3" type="submit">Search Torrents</button>
</form>
<?php } ?>
<?php require "misc/footer.php"; ?>