-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
138 lines (115 loc) · 4.19 KB
/
test.html
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>I2P Proxy Check</title>
<link rel="stylesheet" href="/assets/css/style.css">
<link rel="icon" type="image/png" sizes="32x32" href="../assets/images/favicon.ico">
<style>
header, footer, img {
user-select: none;
}
header {
position: sticky;
top: 0;
z-index: 999;
padding: 10px 10px 4px;
background: #000; /* Adjust the background color as needed */
border-bottom: 2px solid #14476c; /* Adjust the border color as needed */
animation: down .5s ease .8s both;
}
header a {
font-weight: 700 !important;
color: white; /* Adjust the text color as needed */
text-decoration: none;
}
header ul {
display: flex;
justify-content: space-around;
justify-content: right;
flex-wrap: wrap;
list-style: none;
margin: 0;
padding: 0 0 8px;
}
header li {
line-height: 1.6;
margin: 0 10px;
}
</style>
</head>
<body>
<!-- Header -->
<header>
<span id="homelink"></span>
<nav>
<ul>
<li><a href="outproxy.html">I2P Outproxy</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="donate.html">Donate</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</header>
</head>
<body>
<div class="container">
<div class="header">
<img src="../assets/images/logo.svg" alt="Logo" class="logo">
</div>
<div class="content">
<div class="donate-banner">
Please consider donating:
<span onclick="copyToClipboard('45Gtj5tkhs4EsbnV7kkhMCRpbZUdqCQqR5qmLFVLAvbFCYaPL4pFbBkEBLJ7beHqkiJxdTBkPwFsT5EMu5jDrYBHPjQzPuv', 'xmr-confirmation')">XMR</span> | <span onclick="copyToClipboard('LULvg4mJc9Y37hU3sbVTMxJAPyNwyCJHw6', 'ltc-confirmation')">ETH</span> |
<span onclick="copyToClipboard('1NDRuQNyJZmYK4AJwve1aqa56ntuXpbyA7', 'btc-confirmation')">BTC</span>
<span id="xmr-confirmation" class="copy-confirmation">Copied!</span>
<span id="ltc-confirmation" class="copy-confirmation">Copied!</span>
<span id="btc-confirmation" class="copy-confirmation">Copied!</span>
</div> </div>
<div class="message">
<?php
include 'db.php'; // Ensure this path is correct for your db.php file
$result = $conn->query("SELECT * FROM server_status ORDER BY last_checked DESC");
$last_checked_global = "";
echo "<table class='status-table'>";
echo "<tr><th>Server Name</th><th>Status</th></tr>";
while($row = $result->fetch_assoc()) {
if (empty($last_checked_global)) {
$last_checked_global = $row["last_checked"];
}
echo "<tr>";
echo "<td>" . htmlspecialchars($row["server_name"]) . "</td>";
$status = $row["status"];
$status_message = htmlspecialchars($row["status_message"]);
$last_checked = new DateTime($row["last_checked"]);
$now = new DateTime();
$tooltip = $status === 'online' ? 'Online' : '';
if ($status === 'offline') {
$first_offline = isset($row["first_offline"]) ? new DateTime($row["first_offline"]) : $last_checked;
$interval = $first_offline->diff($now);
$tooltip = "Offline for " . $interval->format('%a days, %h hours, %i minutes');
} elseif ($status === 'warning') {
$tooltip = $status_message;
}
$status_class = $status === 'online' ? 'glowing-green' : ($status === 'offline' ? 'glowing-red' : 'glowing-yellow');
echo "<td style='text-align: center;'><span class='dot $status_class' title='$tooltip'></span></td>";
echo "</tr>";
}
echo "</table>";
if (!empty($last_checked_global)) {
echo "<p>Last Checked: " . htmlspecialchars($last_checked_global) . "</p>";
}
$conn->close();
?>
</div>
</div>
</div>
<footer class="reseed-footer">
Created by <a href="https://stormycloud.org/">stormycloud.org</a> |
<a href="https://github.com/WaxySteelWorm/checki2p.com" target="_blank">Github</a> |
<a href="https://twitter.com/StormyCloudInc" target="_blank">Twitter</a> |
<a href="https://www.instagram.com/stormycloudinc/" target="_blank">Instagram</a>
</footer>
</body>
</html>