Location: PHPKode > projects > WhoisUP > whoisup/index.php
<?php require("conf/config.php");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />

<script src="js/jquery-latest.js" type="text/javascript"></script>
<script src="js/modal.popup.js" type="text/javascript"></script>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<meta name="generator" content="WhoisUP 0.1" />
<link rel="shortcut icon" href="images/favicon.ico" />

<title>WhoisUP [Loading...]</title>

<style type="text/css"> 
span.host_up{
  width: <?php echo $host_up_width; ?>px;
}
span.host_down{
  width: <?php echo $host_down_width; ?>px;
}
</style>

<script type="text/javascript">
//<![CDATA[//><!--
var reload=false;

$(document).ready(function() {

	if (reload){
		var refresh_time=<?php echo ($refresh_time*1000)+1000; ?>;
	}
	else{
		var refresh_time=1000;
	}

	var view_popup=true;
	
	setInterval(function() {
		//Popup settings
		var align = 'center';
		var top = 200;
		var width = 500;
		var padding = 10;
		var backgroundColor = '#FFFFFF';
		var source = 'alert-popup.php';
		var borderColor = '#333333';
		var borderWeight = 2;
		var borderRadius = 5;
		var fadeOutTime = 300;
		var disableColor = '#666666';
		var disableOpacity = 40;
		var loadingImage = 'images/loading-popup.gif';
		
		$("#container").load('core.php');	

		if ($("#down").html()==0 || $("#down").html()==null){
			
			view_popup=true;
			
			if ($("#sound").html()!= ""){
				$("#sound").html("");
			}
			
			if ($("#blockModalPopupDiv").css('display')=='block'){
				closePopup(fadeOutTime);
			}
		}
		else{
		
			if ($("#sound_alert").html()=='true'){
				if ($("#sound").html()== "" || $("#sound_file").html()!=sound_tmp){
					$("#sound").html('<embed src="sound_alert/' + $("#sound_file").html() + '" hidden="true" autostart="true" loop="true" type="audio/mpeg" />');
					sound_tmp=$("#sound_file").html();
				}
			}
			else{
				if ($("#sound").html()!= ""){
					$("#sound").html('');
				}
			}
			
			if($("#popup_alert").html()=='true'){				
				if (view_popup==true){
					if (($("#blockModalPopupDiv").length==0 || $("#blockModalPopupDiv").css('display')=='none')){
						modalPopup(align, top, width, padding, disableColor, disableOpacity, backgroundColor, borderColor, borderWeight, borderRadius, fadeOutTime, source, loadingImage);
					}
					else{
						$("#innerModalPopupDiv").load('alert-popup.php');
					}
				}
				
				$(document).keyup(function(e) {
					if (e.keyCode == 27) {
						view_popup=false;
						closePopup(fadeOutTime);
					}
				});
				
				$("#innerModalPopupDiv").click(function(){
					view_popup=false;
					closePopup(fadeOutTime);
				});
			}
			else{
				if($("#blockModalPopupDiv").length!=0){
					closePopup(fadeOutTime);
					view_popup=true;
				}
			}
		}

		var reload=true;
		if (!($("#up").length==0 || $("#down").length==0)){
			document.title = 'WhoisUP | Host up: ' + $("#up").html() + ' / Host down: ' + $("#down").html() ;
		}

	},refresh_time);
	$.ajaxSetup({ cache: false });
});
//--><!]]>
</script>

</head>
<body>

<div id="container"><img src="images/ajax-loader.gif" alt="" />
</div>

<div id="sound"></div>

</body>
</html>
Return current item: WhoisUP