<?php
require("../../inc/header.inc");
require("./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($sysTypeNo,$sysNo)
{
	global $global_id;
	
	$id="{$sysTypeNo}_{$sysNo}_{$global_id}";
	$global_id++;
	return $id;
}

?>
<?php
adjust_head();
$sysTypeNo=$_REQUEST['sysTypeNo'];
$sysNo=$_REQUEST['sysNo'];

$config=parse_ini_file("config.ini",true);
 //echo "sys=$sysTypeNo";

// echo "<pre>";
// print_r($config);
// echo "</pre>";
$config_count=sizeof($config);
$config_index=-1;
for($index=0;$index<$config_count;$index++)
{
	if($config[$index][SysTypeNo] == $sysTypeNo)
	{
		$config_index=$index;
		break;
	}
}
if($config_index == -1)
{
	exit("System=$sysTypeNo not found!");
}

adjust_title_head();
echo "<FORM NAME=\"downForm\">";
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
	echo "<tr>";
		echo "<td width=\"50%\">";
		echo "$strSysStatus > Subsystem > $strServer";
		echo "</td>";
		echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
		if($sysTypeNo == 0)
			$helpId="1.2.2.1";
		else
			$helpId="1.2.2.2";		
		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 href=\"server_status.php\"><img align=absBottom border=0 src=\"../../images/left.gif\" width=\"14\" height=\"14\">$strBack</a>";
		echo "</td>";
	echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();

//some module have no plat heartbeat
$test=$config[$index];
//print_r($test);
if($config[$index][PlatNo] == 999 || $config[$index][PlatNo] == 9)
//if($sysTypeNo == 384 || $sysTypeNo == 387 || $sysTypeNo == 389 || $sysTypeNo == 391 || $sysTypeNo == 392 || $sysTypeNo == 393)
	$plat=1;
else
echo GetPlatInfo($config[$config_index],$sysNo);

	$plat=GetPlatInfo($config[$config_index],$sysNo);
	$module=GetSingleModuleInfo($sysTypeNo,$sysNo);
if($plat == 0)
{
	exit("No plat heartbeat<br>");
}

$version_str=GetModuleVersion($sysTypeNo,$sysNo);
//if($sysTypeNo == 362)
//    echo "<br><center><font size=2 color=\"blue\">spgw status information</font>(Version:<font color=blue>$version_str</font>)</center>";
//else
    echo "<br><center><font size=2 color=\"blue\">{$config[$config_index][Module]}_{$sysNo} status information</font>(Version:<font color=blue>$version_str</font>)</center>";
echo "<table width=100% border=1 cellpadding=1 cellspacing=0  bordercolor=#666666 bordercolordark=#FFFFFF bgcolor=\"#ffffff\">";
if($DEBUG)
{
	echo "<tr>";
	echo "<td colspan=2>";
	echo "<pre>";
	print_r($plat);
	echo "</pre>";
	echo "</td>";
	echo "</tr>";
	
	echo "<tr>";
	echo "<td colspan=2>";
	echo "<pre>";
	print_r($module);
	echo "</pre>";
	echo "</td>";
	echo "</tr>";
}
echo "<tr>";
echo "<td align=left bgcolor=\"#E6E6E6\" width=50%>Status</td>";
echo "<td>";
	//Application Status
	$id=AssignID($sysTypeNo,$sysNo);
	echo "<span id=\"{$id}\" style=\"color:{$module[AppStatus][Color]};\">";
	echo "{$module[AppStatus][Value]}";
	echo "</span>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=left bgcolor=\"#E6E6E6\" width=50%>Refresh Time</td>";
echo "<td>";
	//Refresh Time
	$id=AssignID($sysTypeNo,$sysNo);
	echo "<span id=\"{$id}\" style=\"color:{$module[RefreshTime][Color]};\">";
	echo "{$module[RefreshTime][Value]}";
	echo "</span>";
echo "</td>";
echo "</tr>";
echo "<tr style=\"display:none;\">";
echo "<td align=left bgcolor=\"#E6E6E6\" width=50%>Start Time</td>";
echo "<td>";
	//Start Time
	$id=AssignID($sysTypeNo,$sysNo);
	echo "<span id=\"{$id}\" style=\"color:{$plat[StartTime][Color]};\">";
	echo "{$plat[StartTime][Value]}";
	echo "</span>";
echo "</td>";
echo "</tr>";


//Add into the first table
switch($sysTypeNo)
{
case 0:
	//Dual Server Status
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Dual Server Status";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[DualServerStatus][Color]};\">{$module[DualServerStatus][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//IOSyncInfo
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "BIN Log Transfer Information";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[IOSyncInfo][Color]};\">{$module[IOSyncInfo][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//SQLSyncInfo
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Relay Log Execute Information";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[SQLSyncInfo][Color]};\">{$module[SQLSyncInfo][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	break;
case 320:
	//Dual Server Status
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Dual Server Status";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[DualServerStatus][Color]};\">{$module[DualServerStatus][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	//E1 License
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "E1 License";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[E1License][Color]};\">{$module[E1License][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	//E1 Used
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "E1 Used";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[E1Used][Color]};\">{$module[E1Used][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//Serial Number
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Serial Number";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[SerialNumber][Color]};\">{$module[SerialNumber][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	break;
//HLR
case 330:
//AUC
case 340:
//PPS
case 360:
case 395:
//SMSC
case 350:
//EIR
case 380:
//MNP
case 370:
	//License
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "License";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[License][Color]};\">{$module[License][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//User
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "User";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[User][Color]};\">{$module[User][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//Serial Number
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Serial Number";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[SerialNumber][Color]};\">{$module[SerialNumber][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	break;
//AAS
case 311:
	//Serial Number
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Serial Number";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[SerialNumber][Color]};\">{$module[SerialNumber][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	break;
//SMEG
case 355:
	//License
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "License";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[License][Color]};\">{$module[License][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//User
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "User";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[User][Color]};\">{$module[User][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//SMPP TX Status
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "SMPP TX Status";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[SMPPTXStatus][Color]};\">{$module[SMPPTXStatus][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//SMPP RX Status
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "SMPP RX Status";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[SMPPRXStatus][Color]};\">{$module[SMPPRXStatus][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//SMTP TX Status
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "SMTP TX Status";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[SMTPTXStatus][Color]};\">{$module[SMTPTXStatus][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//SMTP RX Status
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "SMTP RX Status";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[SMTPRXStatus][Color]};\">{$module[SMTPRXStatus][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//Serial Number
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Serial Number";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[SerialNumber][Color]};\">{$module[SerialNumber][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	break;
//MME
case 361:
    //SystemID 00
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SystemID";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SystemID][Color]};\">{$module[SystemID][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //SubsystemID 00
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SubsystemID";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SubsystemID][Color]};\">{$module[SubsystemID][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //TimeStamp
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "TimeStamp";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[TimeStamp][Color]};\">{$module[TimeStamp][Value]}</span>";
    echo "</td>";
    echo "</tr>";

    //Software Version
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SoftwareVersion";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SoftwareVersion][Color]};\">{$module[SoftwareVersion][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //Status
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "Status";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[Status][Color]};\">{$module[Status][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //Checksum
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "Checksum";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[Checksum][Color]};\">{$module[Checksum][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //LicenseUser
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "LicenseUser";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[LicenseUser][Color]};\">{$module[LicenseUser][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //RegisterUES
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "RegisterUES";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[RegisterUES][Color]};\">{$module[RegisterUES][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //ConnectedUES
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "ConnectedUES";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[ConnectedUES][Color]};\">{$module[ConnectedUES][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //OnlineENBNum
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "OnlineENBNum";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[OnlineENBNum][Color]};\">{$module[OnlineENBNum][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //SequenceNum
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SequenceNum";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SequenceNum][Color]};\">{$module[SequenceNum][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //$LicenseDate
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "LicenseDate";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[LicenseDate][Color]};\">{$module[LicenseDate][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    break;
//SPGW
case 362:
    //SystemID               00
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SystemID";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SystemID][Color]};\">{$module[SystemID][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //SubsystemID 
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SubsystemID";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SubsystemID][Color]};\">{$module[SubsystemID][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //TimeStamp              2018
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "TimeStamp";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[TimeStamp][Color]};\">{$module[TimeStamp][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //Version                1.2.0
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "Version";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[Version][Color]};\">{$module[Version][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //S11ConnStatus          0->unconnected;1->connected
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "S11ConnStatus";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[S11ConnStatus][Color]};\">{$module[S11ConnStatus][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //s1UConnStatus          0->unconnected;1->connected
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "s1UConnStatus";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[s1UConnStatus][Color]};\">{$module[s1UConnStatus][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //SGIConnStatus          0->unconnected;1->connected
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SGIConnStatus";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SGIConnStatus][Color]};\">{$module[SGIConnStatus][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //GxConnStatus           0->unconnected;1->connected
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "GxConnStatus";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[GxConnStatus][Color]};\">{$module[GxConnStatus][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //GyConnStatus           0->unconnected;1->connected
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "GyConnStatus";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[GyConnStatus][Color]};\">{$module[GyConnStatus][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //SystemCapability       12345
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SystemCapability";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SystemCapability][Color]};\">{$module[SystemCapability][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //LicenseUser            12345
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "LicenseUser";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[LicenseUser][Color]};\">{$module[LicenseUser][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //SequenceNum
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SequenceNum";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SequenceNum][Color]};\">{$module[SequenceNum][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //$LicenseDate
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "LicenseDate";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[LicenseDate][Color]};\">{$module[LicenseDate][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    break;
// ims
case 363:
    //SystemID               00
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SystemID";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SystemID][Color]};\">{$module[SystemID][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //SubsystemID 
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SubsystemID";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SubsystemID][Color]};\">{$module[SubsystemID][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //TimeStamp              2018
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "TimeStamp";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[TimeStamp][Color]};\">{$module[TimeStamp][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //Version                1.2.0
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "Version";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[Version][Color]};\">{$module[Version][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //status
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "status";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[Status][Color]};\">{$module[Status][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //checksum
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "checksum";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[Checksum][Color]};\">{$module[Checksum][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //license user
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "licenseUser";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[LicenseUser][Color]};\">{$module[LicenseUser][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //volte pcscf status
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "voltePCSCFStatus";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[VoltePCSCFStatus][Color]};\">{$module[VoltePCSCFStatus][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //voip pcscf status
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "voipPCSCFStatus";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[VoipPCSCFStatus][Color]};\">{$module[VoipPCSCFStatus][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //icscf status
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "IcscfStatus";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[IcscfStatus][Color]};\">{$module[IcscfStatus][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //scscf status
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "ScscfStatus";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[ScscfStatus][Color]};\">{$module[ScscfStatus][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //mmtel status
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "MMETelStatus";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[MMETelStatus][Color]};\">{$module[MMETelStatus][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //sequence num
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SequenceNum";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SequenceNum][Color]};\">{$module[SequenceNum][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    break;
//OPPS
// rcs
case 364:
    //SystemID               00
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SystemID";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SystemID][Color]};\">{$module[SystemID][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //SubsystemID 
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SubsystemID";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SubsystemID][Color]};\">{$module[SubsystemID][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //TimeStamp              2018
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "TimeStamp";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[TimeStamp][Color]};\">{$module[TimeStamp][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //Version                1.2.0
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "Version";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[Version][Color]};\">{$module[Version][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //status
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "status";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[Status][Color]};\">{$module[Status][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //checksum
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "checksum";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[Checksum][Color]};\">{$module[Checksum][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //license user
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "licenseUser";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[LicenseUser][Color]};\">{$module[LicenseUser][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //registered user
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "registeredUES";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[registeredUES][Color]};\">{$module[registeredUES][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //online hnb num
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "onlineHNBNum";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[onlineHNBNum][Color]};\">{$module[onlineHNBNum][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //sequence num
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SequenceNum";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SequenceNum][Color]};\">{$module[SequenceNum][Value]}</span>";
    echo "</td>";
    echo "</tr>";

    //expire date
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "expireDate";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[expireDate][Color]};\">{$module[expireDate][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    break;
// UDM
case 365:
    //SystemID               00
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SystemID";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SystemID][Color]};\">{$module[SystemID][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //SubsystemID 
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SubsystemID";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SubsystemID][Color]};\">{$module[SubsystemID][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //TimeStamp              2018
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "TimeStamp";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[TimeStamp][Color]};\">{$module[TimeStamp][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //Version                1.2.0
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "Version";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[Version][Color]};\">{$module[Version][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //status
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "status";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[Status][Color]};\">{$module[Status][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //checksum
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "checksum";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[Checksum][Color]};\">{$module[Checksum][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //license user
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "licenseUser";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[LicenseUser][Color]};\">{$module[LicenseUser][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //sequence num
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SequenceNum";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SequenceNum][Color]};\">{$module[SequenceNum][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    break;    
// AUSF
case 366:
    //SystemID               00
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SystemID";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SystemID][Color]};\">{$module[SystemID][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //SubsystemID 
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SubsystemID";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SubsystemID][Color]};\">{$module[SubsystemID][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //TimeStamp              2018
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "TimeStamp";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[TimeStamp][Color]};\">{$module[TimeStamp][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //Version                1.2.0
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "Version";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[Version][Color]};\">{$module[Version][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //status
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "status";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[Status][Color]};\">{$module[Status][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //checksum
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "checksum";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[Checksum][Color]};\">{$module[Checksum][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //license user
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "licenseUser";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[LicenseUser][Color]};\">{$module[LicenseUser][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    
    //sequence num
    echo "<tr>";
    echo "<td bgcolor=\"#E6E6E6\">";
    echo "SequenceNum";
    echo "</td>";
    echo "<td>";
    $id=AssignID($sysTypeNo,$sysNo);
    echo "<span id=\"{$id}\" style=\"color:{$module[SequenceNum][Color]};\">{$module[SequenceNum][Value]}</span>";
    echo "</td>";
    echo "</tr>";
    break;
//OPPS
case 375:
	//License
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "License";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[License][Color]};\">{$module[License][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//User
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "User";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[User][Color]};\">{$module[User][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//OPR Status
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "OPR";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[OPRStatus][Color]};\">{$module[OPRStatus][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//IMDX Status
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "IMDX";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[IMDXStatus][Color]};\">{$module[IMDXStatus][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//Serial Number
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Serial Number";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[SerialNumber][Color]};\">{$module[SerialNumber][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	break;
//iRLS
case 379:
//iPALIM
case 378:
//MHC
case 386:
	//Serial Number
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Serial Number";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[SerialNumber][Color]};\">{$module[SerialNumber][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	break;
//TMG
case 391:
//AMRMG
case 392:
//GbC
case 393:
	//Max E1 Number
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Max E1 Number";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[MaxE1Number][Color]};\">{$module[MaxE1Number][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//Online User
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Online User";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[OnlineUser][Color]};\">{$module[OnlineUser][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//Serial Number
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Serial Number";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[SerialNumber][Color]};\">{$module[SerialNumber][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	break;
case 394:	
	//Serial Number
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Serial Number";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[SerialNumber][Color]};\">{$module[SerialNumber][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	break;
//VSS
case 390:
	//Total Mailbox
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Total Mailbox";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[TotalMailbox][Color]};\">{$module[TotalMailbox][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//Registered Mailbox
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Registered Mailbox";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[RegisteredMailbox][Color]};\">{$module[RegisteredMailbox][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//Active Mailbox
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Active Mailbox";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[ActiveMailbox][Color]};\">{$module[ActiveMailbox][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//Total Voicemail
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Total Voicemail";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[TotalVoicemail][Color]};\">{$module[TotalVoicemail][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//Total Seconds of Voicemail
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Total Seconds of Voicemail";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[TotalSecondVoicemail][Color]};\">{$module[TotalSecondVoicemail][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//Average Seconds of Voicemail
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Average Seconds of Voicemail";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[AverageSecondVoicemail][Color]};\">{$module[AverageSecondVoicemail][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//SMPP State
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "SMPP State";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[SMPPState][Color]};\">{$module[SMPPState][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//Serial Number
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Serial Number";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[SerialNumber][Color]};\">{$module[SerialNumber][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	break;
//IWF
case 384:
	//License
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Max Call License";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[License][Color]};\">{$module[License][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	
	//User
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Online Call";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[User][Color]};\">{$module[User][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	break;
//IUUGW
case 389:
	//Serial Number
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Serial Number";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[SerialNumber][Color]};\">{$module[SerialNumber][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	//Used Count
	echo "<tr>";
		echo "<td bgcolor=\"#E6E6E6\">";
		echo "Used Count";
		echo "</td>";
		echo "<td>";
		$id=AssignID($sysTypeNo,$sysNo);
		echo "<span id=\"{$id}\" style=\"color:{$module[UsedCount][Color]};\">{$module[UsedCount][Value]}</span>";
		echo "</td>";
	echo "</tr>";
	break;
default:
	break;
}
echo "</table>";

//Additional Table
switch($sysTypeNo)
{
case 0:
	echo "<center><font size=2 color=blue>Process Status</font></center>";
	echo "<table width=100% border=1 cellpadding=1 cellspacing=0  bordercolor=#666666 bordercolordark=#FFFFFF bgcolor=\"#ffffff\">";
	echo "<tr bgcolor=\"#E6E6E6\">";
	echo "<td>Process ID</td>";
	echo "<td>Process Name</td>";
	echo "<td>Process Status</td>";
	echo "</tr>";
	
	for($i=0;$i<$module[TotalProcessNum];$i++)
	{
		if($i < $module[CurrentProcessNum])
		{
			$id=AssignID($sysTypeNo,$sysNo);
			echo "<tr id=\"{$id}\">";
			echo "<td>$i</td>";
			echo "<td>{$module[Process][$i][Name]}</td>";
			$id=AssignID($sysTypeNo,$sysNo);
			echo "<td><span id=\"{$id}\" style=\"display:{$module[Process][$i][Display]};color:{$module[Process][$i][Color]};\">{$module[Process][$i][Value]}</span></td>";
			echo "</tr>";
		}
		else
		{
			$id=AssignID($sysTypeNo,$sysNo);
			echo "<tr id=\"{$id}\" style=\"display:none;\">";
			echo "<td>$i</td>";
			echo "<td>{$module[Process][$i][Name]}</td>";
			$id=AssignID($sysTypeNo,$sysNo);
			echo "<td><span id=\"{$id}\" style=\"display:{$module[Process][$i][Display]};color:{$module[Process][$i][Color]};\">{$module[Process][$i][Value]}</span></td>";
			echo "</tr>";
		}
	}
	
	echo "</table>";
	break;
case 320:
	echo "<center><font size=2 color=blue>VLR_{$sysNo} status information</font>(Version:<font color=blue>{$module[VLR][Version]}</font>)</center>";
	echo "<table width=100% border=1 cellpadding=1 cellspacing=0  bordercolor=#666666 bordercolordark=#FFFFFF bgcolor=\"#ffffff\">";
	//VLR Refresh Time
	echo "<tr>";
	echo "<td bgcolor=\"#E6E6E6\" width=\"50%\">Refresh Time</td>";
	echo "<td>";
	$id=AssignID($sysTypeNo,$sysNo);
	echo "<span id=\"{$id}\" style=\"display:{$module[VLR][RefreshTime][Display]};color:{$module[VLR][RefreshTime][Color]};\">{$module[VLR][RefreshTime][Value]}</span>";
	echo "</td>";
	echo "</tr>";
	
	//VLR AppStatus
	echo "<tr>";
	echo "<td bgcolor=\"#E6E6E6\">Status</td>";
	echo "<td>";
	$id=AssignID($sysTypeNo,$sysNo);
	echo "<span id=\"{$id}\" style=\"display:{$module[VLR][AppStatus][Display]};color:{$module[VLR][AppStatus][Color]};\">{$module[VLR][AppStatus][Value]}</span>";
	echo "</td>";
	echo "</tr>";
	
	//VLR Subscriber Number
	echo "<tr>";
	echo "<td bgcolor=\"#E6E6E6\">VLR Subscriber Number</td>";
	echo "<td>";
	$id=AssignID($sysTypeNo,$sysNo);
	echo "<span id=\"{$id}\" style=\"display:{$module[VLR][SubscriberNumber][Display]};color:{$module[VLR][SubscriberNumber][Color]};\">{$module[VLR][SubscriberNumber][Value]}</span>";
	echo "</td>";
	echo "</tr>";
	
	//VLR License
	echo "<tr>";
	echo "<td bgcolor=\"#E6E6E6\">License</td>";
	echo "<td>";
	$id=AssignID($sysTypeNo,$sysNo);
	echo "<span id=\"{$id}\" style=\"display:{$module[VLR][License][Display]};color:{$module[VLR][License][Color]};\">{$module[VLR][License][Value]}</span>";
	echo "</td>";
	echo "</tr>";
	
	echo "</table>";
	break;
//SMSC
case 350:
	echo "<center><font size=2 color=blue>SMPP Link Status</font></center>";
	echo "<table width=100% border=1 cellpadding=1 cellspacing=0  bordercolor=#666666 bordercolordark=#FFFFFF bgcolor=\"#ffffff\">";
	for($i=0;$i<4;$i++)
	{
		echo "<tr bgcolor=\"#E6E6E6\">";
		for($j=0;$j<8;$j++)
		{
			$no=$i*8+$j;
			$noshow=omc_keep_length($no,0,2);
			echo "<td>$noshow ";
			$id=AssignID($sysTypeNo,$sysNo);
			echo "<span id=\"{$id}\" style=\"color:#000000;\">{$module[SMPPLink][$no][Name][Value]}</span>";
			echo "</td>";
		}
		echo "</tr>";
		
		echo "<tr>";
		for($j=0;$j<8;$j++)
		{
			$no=$i*8+$j;
			echo "<td>";
			$id=AssignID($sysTypeNo,$sysNo);
			echo "<span id=\"{$id}\" style=\"color:{$module[SMPPLink][$no][Status][Color]};\">{$module[SMPPLink][$no][Status][Value]}</span>";
			echo "</td>";
		}
		echo "</tr>";
	}
	echo "</table>";
	break;
default:
	break;
}

//Alarm Table
echo "<br><div id=\"AlarmTable\">";
$sql="select * from sysAlarmLog where sysTypeNo=$sysTypeNo and sysNo=$sysNo and clearBy is null ";
$res=mysqli_query($pubConn,$sql);
$num=mysqli_num_rows($res);
if($num > 0)
{
	echo "<center><font size=2 color=blue>{$config[$config_index][Module]}_{$sysNo} Alarm List</font></center>";
	echo "<table width=100% border=1 cellpadding=1 cellspacing=0  bordercolor=#666666 bordercolordark=#FFFFFF bgcolor=\"#ffffff\">";
	echo "<tr bgcolor=\"#E6E6E6\">";
	echo "<td>Alarm Level</td>";
	echo "<td>Events</td>";
	echo "<td>Alarm Time</td>";
	echo "</tr>";
	
	for($i=0;$i<$num;$i++)
	{
		$row=mysqli_fetch_array($res);
		$alarmTime=$row[alarmTime];
		$tmpsql="select * from sysAlarmConf where sysTypeNo=$sysTypeNo and compCode='$row[compCode]' and alarmCode='$row[alarmCode]' ";
		$tmpres=@mysqli_query($pubConn,$tmpsql);
		echo mysqli_error($pubConn);
		$tmprow=@mysqli_fetch_array($tmpres);
		$alarmLevel=$tmprow[alarmLevel];
		if(trim($tmprow[alarmDesc_2]) == "")
			echo "<tr style=\"display:none\">";
		else
			echo "<tr>";
		echo "<td>{$alarmLevelDefArr[$alarmLevel][remark]}</td>";
		echo "<td>{$tmprow[alarmDesc_2]}</td>";
		echo "<td>$alarmTime</td>";
		echo "</tr>";
	}
	echo "</table>";
}
echo "</div>";

//Remark Table
echo "<table border=\"0\" width=\"100%\" cellpadding=1 cellspacing=0>";
	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=\"Clear\">";
		echo "<a href=\"server_status.php\"><img align=absBottom border=0 src=\"../../images/left.gif\" width=\"14\" height=\"14\">$strBack</a>";
		echo "</td>";
	echo "</tr>";
echo "</table>";

adjust_content_tail();
?>
<script language="JavaScript">

function updateStatus(sysTypeNo,sysNo)
{
	var fixurl="./server_status_detail_update.php?sysTypeNo="+sysTypeNo+"&sysNo="+sysNo;
	var browserr = navigator.appName;
	if(browserr == "Microsoft Internet Explorer")
	{
		request_oo = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else
	{
		request_oo = new XMLHttpRequest();
	}
	request_oo.open("GET",fixurl,"false");

	request_oo.onreadystatechange=function()
	{ 
		checUpdateState(); 
	}
	request_oo.send(null);
	setTimeout("updateStatus('"+sysTypeNo+"','"+sysNo+"')", 10000);
}

function checUpdateState()
{
	//not
	if(request_oo.readyState == 3)
	{
		//alert("not finish");
	}
	if(request_oo.readyState == 4)
	{
		var response = request_oo.responseText;
		response=response.replace(/(^\s*)|(\s*$)/g, "");
		if(response == "")
			return;
			
		//alert("+"+response+"+");
		
		var objects=response.split(';');
		//alert(objects.length);
		
		for(i=0;i<objects.length;i++)
		{
			if(i != (objects.length-1))
			{
				var items=objects[i].split(',');
				var item_id=items[0].replace(/(^\s*)|(\s*$)/g, "");
				var item_display=items[1].replace(/(^\s*)|(\s*$)/g, "");
				var item_value=items[2].replace(/(^\s*)|(\s*$)/g, "");
				var item_color=items[3].replace(/(^\s*)|(\s*$)/g, "");
			
				if(item_display == 'Rect')
				{
					document.getElementById(item_id).value=GetLabel(item_value);
				}
				else if(item_display == 'layerShow')
				{
					document.getElementById(item_id).style.display='';
				}
				else if(item_display == 'layerHide')
				{
					document.getElementById(item_id).style.display='none';
				}
				else
				{
					document.getElementById(item_id).style.color=item_color;
					document.getElementById(item_id).innerHTML=item_value;
					if(item_display == 'none')
						document.getElementById(item_id).style.display='none';
					else
						document.getElementById(item_id).style.display='';
				}
			}
			//Alarm
			else
			{
				var alarm=objects[i];//.replace(/(^\s*)|(\s*$)/g, "");
				//alert("+"+alarm+"+");
				if(alarm == 'none')
				{
					document.getElementById('AlarmTable').innerHTML='';
				}
				else
				{
					document.getElementById('AlarmTable').innerHTML=alarm;
				}
			}
			
		}
		
	}
}

function GetLabel(pn)
{
	switch(pn)
	{
		case '0':
		case 0:
			return '';
		case '1':
		case 1:
			return '??';
		case '2':
		case 2:
			return '????';
		case '3':
		case 3:
			return '??????';
		case '4':
		case 4:
			return '????????';
		case '5':
		case 5:
			return '??????????';
		case '6':
		case 6:
			return '????????????';
		case '7':
		case 7:
			return '??????????????';
		case '8':
		case 8:
			return '????????????????';
		case '9':
		case 9:
			return '??????????????????';
		case '10':
		case 10:
			return '????????????????????';
	}
	return '';
}

</script>
<?php
	echo "\n<script language=\"JavaScript\">\n";
	echo "updateStatus('$sysTypeNo','$sysNo');\n";
	echo "</script>\n";
?>
