
<?php
require("../../inc/header.inc");
require("../serverStatusImprove/function.inc");
?>


<body onload="javascript:adjust();" onresize="javascript:adjust();" leftmargin="15" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
$global_id=0;
function AssignID()
{
	global $global_id;
	
	$id="ID_{$global_id}";
	$global_id++;
	return $id;
}
?>





<?php
adjust_head();
adjust_title_head();

echo "<FORM NAME=\"downForm\" action=\"./server_status.php\" method=\"post\">";
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
	echo "<tr>";
		echo "<td width=\"50%\">";
		echo "Advanced > MTP3 Status";
		echo "</td>";
		echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
		showHelp($helpId);
		echo "</td>";
	echo "</tr>";
	
	
	echo "<tr>";
		echo "<td width=\"50%\">";
		echo "&nbsp;";
		echo "</td>";
		echo "<td width=\"50%\" align=\"right\" title=\"Clear\">";
		echo "<a target=\"Back\" href=\"./plat_test_status.php?\"><img src=\"../../images/left.gif\" border=0></img>back</a>";
		echo "</td>";
	echo "</tr>";
echo "</table>";


adjust_title_tail();
adjust_content_head();



$config=parse_ini_file("../platStatus/config.ini",true);
$config_count=sizeof($config);


if(0)
{
	echo "config_count=$config_count<br>";
	echo "<pre>";
	print_r($config);
	echo "</pre>";
}

echo "<br><center><font color=\"blue\">Platform summary information</font></center>";
echo "<table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\" bgcolor=\"#ffffff\">";
echo "<tr bgcolor=\"#E6E6E6\">";
echo "<td>Item</td>";
echo "<td>Application status</td>";
echo "<td>IPTRANS</td>";
echo "<td>MTP3</td>";
echo "<td>SCCP</td>";
echo "<td>TCAP</td>";
echo "<td>SNMP</td>";
echo "<td>DEBUG</td>";
echo "<td>SMPP</td>";
echo "<td>Refresh Time</td>";
echo "<td>IP Address</td>";
echo "</tr>";


echo "<tr id=\"blank_line\">";
echo "<td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td><td>--</td>";
echo "</tr>";



foreach($config as $key => $val)
{
	if(strcmp($key,"PlatSysTypeNo")==0)
	{
		continue;
	}
	
	
	for($j=0;$j<$config[$key][PlatformNo];$j++)
	{
		
		//Rowline
		$id=AssignID();
		echo "<tr id=\"$id\" style=\"display:none;\">";
		
		//Item Name	
		echo "<td>{$config[$key][PlatformName]}_{$j}</td>";
		
		//Application status
		$id=AssignID();
		echo "<td>";		
		echo "<span id=\"{$id}\" style=\"color:#000000;\">$id</span>";
		echo "</a>";
		echo "</td>";
		
		
		//IPTRANS
		$id=AssignID();
		echo "<td>";
		//echo "<a href=\"./plat_status_detail.php?subSysNo=$j&platID={$config[$key][PlatformID]}\">";
		echo "<span id=\"{$id}\" style=\"color:#000000;\">$id</span>";
		echo "</a>";
		echo "</td>";
		
		
		//MTP3
		$id=AssignID();
		echo "<td>";
		echo "<span id=\"{$id}\" style=\"color:#000000;\">$id</span>";
		echo "</td>";
		
		//SCCP
		$id=AssignID();
		echo "<td>";
		echo "<span id=\"{$id}\" style=\"color:#000000;\">$id</span>";
		echo "</td>";
		
		//TCAP
		$id=AssignID();
		echo "<td>";
		echo "<span id=\"{$id}\" style=\"color:#000000;\">$id</span>";
		echo "</td>";
		
		//SNMP
		$id=AssignID();
		echo "<td>";
		echo "<span id=\"{$id}\" style=\"color:#000000;\">$id</span>";
		echo "</td>";
		
		//DEBUG
		$id=AssignID();
		echo "<td>";
		echo "<span id=\"{$id}\" style=\"color:#000000;\">$id</span>";
		echo "</td>";
		
		//SMPP
		$id=AssignID();
		echo "<td>";
		echo "<span id=\"{$id}\" style=\"color:#000000;\">$id</span>";
		echo "</td>";
		
		//Refresh Time
		$id=AssignID();
		echo "<td>";
		echo "<span id=\"{$id}\" style=\"color:#000000;\">$id</span>";
		echo "</td>";
		
		
		//IP Address
		$id=AssignID();
		echo "<td>";
		echo "<span id=\"{$id}\" style=\"color:#000000;\">$id</span>";
		echo "</td>";
		
		echo "</tr>";
	}
}
echo "<table>";



echo "<table border=\"0\" width=\"100%\">";
	echo "<tr>";
		echo "<td width=\"50%\" align=\"left\">";
		echo "Remarks:  <font color=\"blue\">Y</font> = Normal,    <font color=\"red\">N</font> = Abnormal,   -- = None.";
		echo "</td>";
		echo "<td width=\"50%\" align=\"right\" title=\"back\">";
    echo "<a target=\"Back\" href=\"./plat_test_status.php?\"><img src=\"../../images/left.gif\" border=0></img>back</a>";
		echo "</td>";
	echo "</tr>";
echo "</table>";
if($clearAll)
{
	echo "<script language=\"JavaScript\">\n";
	echo "document.getElementById('blank_line').style.display='';\n";
	echo "</script>\n";
}

echo "</form>";
adjust_content_tail();

?>

