mirror of
https://github.com/TildeNIC/site.git
synced 2026-01-24 12:00:19 +00:00
updates
This commit is contained in:
@@ -52,17 +52,22 @@ function getDnsServersInfo() {
|
||||
|
||||
$dnsServers = getDnsServersInfo();
|
||||
|
||||
// Function to check server status
|
||||
// Modified checkServerStatus function
|
||||
function checkServerStatus($server) {
|
||||
$port = 53; // DNS port, change if necessary
|
||||
$timeout = 10; // Timeout in seconds
|
||||
$timeout = 30; // Timeout in seconds
|
||||
|
||||
// Debug: Output the server being checked
|
||||
# echo "Checking status of server: $server<br>";
|
||||
|
||||
$fp = @fsockopen($server, $port, $errno, $errstr, $timeout);
|
||||
|
||||
if ($fp) {
|
||||
fclose($fp);
|
||||
# echo "Server $server is Online<br>"; // Debug: Server is online
|
||||
return "Online";
|
||||
} else {
|
||||
# echo "Server $server is Offline - Error: $errstr ($errno)<br>"; // Debug: Server is offline
|
||||
return "Offline";
|
||||
}
|
||||
}
|
||||
@@ -79,12 +84,15 @@ function checkServerStatus($server) {
|
||||
<header>
|
||||
<nav>
|
||||
<?php if (!isset($_SESSION['username'])): ?>
|
||||
<a href="/?page=main">Home</a> |
|
||||
<a href="/?page=login">Login</a> |
|
||||
<a href="/?page=register">Register</a>
|
||||
<a href="/?page=register">Register</a> |
|
||||
<a href="/?page=whois">WHOIS</a>
|
||||
<?php else: ?>
|
||||
<a href="/?page=main">Home</a> |
|
||||
<a href="/?page=user_domains">My Account</a> |
|
||||
<a href="/?page=domain_register">Register Domain</a> |
|
||||
<a href="/?page=whois">WHOIS</a> |
|
||||
<a href="/?page=main&action=logout">Logout</a><br><br>
|
||||
<span>Welcome, <?php echo htmlspecialchars($_SESSION['username']); ?></span>
|
||||
<?php endif; ?>
|
||||
|
||||
Reference in New Issue
Block a user