Site hosted by Angelfire.com: Build your free website today!

My Home Page

My Favorite things about Angelfire.

My Favorite Web Sites

Angelfire - Free Home Pages
Free Web Building Help
Angelfire HTML Library
HTML Gear - free polls, guestbooks, and more!

Server Status Page

Server Status
logo

You can only add online servers to this list.

Server Name:

Server IP:

Port:



Click here to go to the main page.

"; } else if($_GET['id'] == "submit") { $Server_Name = $_POST['name']; $Server_IP = $_POST['ip']; $Server_Port = $_POST['port']; if (($Server_Name != NULL) && ($Server_IP != NULL) && ($Server_Port != NULL)) { $checkReg = @fsockopen("$Server_IP", "$Server_Port", $errno, $errstr, 1); if($checkReg) { connectDB(); mysql_query("SELECT * FROM `serverstatus` WHERE `Name`='$Server_Name' OR `IP`='$Server_IP'"); if(mysql_affected_rows() == 1){ mysql_close($con); echo "That server is already on the list!"; } else{ mysql_query("INSERT INTO `serverstatus` (`Name`, `IP`, `Port`, `Uptime`, `Total`) VALUES ('$Server_Name', '$Server_IP', '$Server_Port', '1', '1')"); mysql_close($con); echo "
Your Server has been successfully added to the list!"; } } else { echo "Invalid information or the server is down.
"; } } else { echo "You did not fill in all of the required information!"; } } else if($_GET['id'] == "login") { echo "
~Username

~Password

"; } else if($_GET['id'] == "admin") { if ($_SESSION['admin'] == 1) { echo ""; while ($Row = mysql_fetch_array ($Result)) { $checkCurr = @fsockopen("$Row[IP]", "$Row[Port]", $errno, $errstr, 1); echo ""; } else { echo ""; } } echo "
Server NameServer Status
$Row[Name]"; if($checkCurr) { echo "
"; mysql_close($con); } else { $Username = $_POST['user']; $Password = $_POST['pass']; if ((isset($Username)) && (isset($Password)) && ($Username != NULL) && ($Password != NULL) && ($Username == $User) && ($Password == $Pass)) { $_SESSION['admin'] = 1; echo "Login successful!
Reload this page to continue."; } else { echo "Incorrect login information, please try again."; } } } else { $IDVAR = $_GET['id']; if (isset($IDVAR)) { if ($_SESSION['admin'] == 1) { $remove = "delete_"; $ServName = str_replace($remove, "", $IDVAR); connectDB(); mysql_query("DELETE FROM `serverstatus` WHERE `Name`='$ServName'") or die(mysql_error()); echo "Deleted successfully"; mysql_close($con); } } else { echo ""; if ($Result) { while ($Row = mysql_fetch_array ($Result)) { connectDB(); $checkCurr = @fsockopen("$Row[IP]", "$Row[Port]", $errno, $errstr, 1); $total = $Row[Total] + 1; echo ""; mysql_close($con); } } else { $create = 'CREATE TABLE `serverstatus` ( `Name` VARCHAR (20) NOT NULL, `IP` VARCHAR (50) NOT NULL, `Port` VARCHAR (6) NOT NULL, `Uptime` VARCHAR (999999) NOT NULL, `Total` VARCHAR (999999) NOT NULL, PRIMARY KEY (`Name`) )'; mysql_query($create); mysql_close($con); } echo "
Server NameServer StatusIP AddressPortUptime
$Row[Name]"; if($checkCurr) { $uptime = $Row[Uptime] + 1; echo "\"online\""; $UpdateDB = mysql_query("UPDATE `serverstatus` SET `Uptime` = $uptime WHERE `Uptime` = $Row[Uptime]"); } else { echo "\"offline\""; } $UpdateDB2 = mysql_query("UPDATE `serverstatus` SET `Total` = $total WHERE `Total` = $Row[Total]"); echo "$Row[IP]$Row[Port]"; $accuracy = $uptime/$total; if ($accuracy == 1) { $accuracy = $accuracy * 100; } else { $accuracy = 100 - $uptime/$total; } echo "$accuracy%
"; } } ?>

Navigation
Server List
Register Server
Administrator Panel
"; } else { echo "Administrator Login
"; } ?>
Valid XHTML 1.0 Transitional