2518 lines
78 KiB
PHP
Executable File
2518 lines
78 KiB
PHP
Executable File
<?php
|
||
require("../../inc/header.inc");
|
||
|
||
$selectedLanguage=$userInfo[language];
|
||
$DEBUG=0;
|
||
function outputInnerHtml($id,$innerHtml,$color=''){
|
||
echo "\nparent.bottom.document.getElementById('$id').innerHTML=\"$innerHtml\";";
|
||
if($color != '')
|
||
echo "\nparent.bottom.document.getElementById('$id').style.color=\"$color\";";
|
||
}
|
||
getSerial();
|
||
|
||
$db=$omc_db;
|
||
$sys_id = isset($sys_id)?$sys_id:'all';
|
||
$showRange = isset($showRange)?$showRange:'low';
|
||
if($DEBUG)echo "<br>sys_id=$sys_id";
|
||
$mod_type = isset($mod_type)?$mod_type:'0';
|
||
|
||
if($showRange == 'low'){
|
||
$helpId = "1.2.2";
|
||
}else{
|
||
$helpId = "6.12";
|
||
}
|
||
|
||
if($DEBUG)echo "<br>sys_id=$sys_id";
|
||
|
||
//echo "<br>mod_type=$mod_type";
|
||
|
||
$due_date = date("Y-m-d H:i:s",mktime(date("H"),date("i"),date("s")-$heatbeat_overtime,date("m"),date("d"),date("Y")));
|
||
|
||
$ove_date = date("Y-m-d H:i:s",mktime(date("H"),date("i"),date("s")+$heatbeat_overtime,date("m"),date("d"),date("Y")));
|
||
|
||
?>
|
||
<body topmargin="5" leftmargin="12">
|
||
<?php
|
||
echo "<table border=\"0\" width=\"100%\">";
|
||
echo "<tr>";
|
||
echo "<td width=\"50%\">";
|
||
echo "$strSysStatus > $strCentralOffice > $strServer";
|
||
echo "</td>";
|
||
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
|
||
showHelp($helpId);
|
||
echo "</td>";
|
||
echo "</tr>";
|
||
echo "</table>";
|
||
|
||
$definePlatExt=array(
|
||
array('num' => '0', 'remark' => 'IPTR', version => '3', state => '1', state => '4'),
|
||
array('num' => '1', 'remark' => 'MTP3', version => '3', state => '1', state => '32'),
|
||
array('num' => '2', 'remark' => 'SCCP', version => '3', state => '1', state => '4'),
|
||
array('num' => '3', 'remark' => 'TCAP', version => '3', state => '1', state => '4'),
|
||
array('num' => '4', 'remark' => 'AP-P', version => '3', state => '1', state => '4'),
|
||
array('num' => '5', 'remark' => 'SNMP', version => '3', state => '1', state => '4'),
|
||
array('num' => '6', 'remark' => 'Debug', version => '3', state => '1', state => '4'),
|
||
array('num' => '7', 'remark' => 'Data sync', version => '3', state => '1', state => '4')
|
||
);
|
||
|
||
$defineStatus=array(
|
||
array('num' => '0', 'remark' => 'N', 'color' => '#FF0000'),
|
||
array('num' => '1', 'remark' => 'Y', 'color' => '#0000FF')
|
||
);
|
||
|
||
$defineIptransStatus=array(
|
||
array('num' => '0', 'remark' => '--', 'color' => '#000000'),
|
||
array('num' => '1', 'remark' => 'Y', 'color' => '#0000FF')
|
||
);
|
||
|
||
$defineMtp3Status=array(
|
||
array('num' => '0', 'remark' => 'N', 'color' => '#FF0000'),
|
||
array('num' => '1', 'remark' => 'Y', 'color' => '#0000FF'),
|
||
array('num' => '2', 'remark' => '--', 'color' => '#000000'),
|
||
array('num' => '3', 'remark' => '--', 'color' => '#000000')
|
||
);
|
||
|
||
$defineSnmpStatus=array(
|
||
array('num' => '0', 'remark' => 'N', 'color' => '#FF0000'),
|
||
array('num' => '1', 'remark' => 'Y', 'color' => '#0000FF')
|
||
);
|
||
|
||
$defineSccpStatus=array(
|
||
array('num' => '0', 'remark' => 'Fail', 'color' => '#FF0000'),
|
||
array('num' => '1', 'remark' => 'Congest', 'color' => '#FF0000'),
|
||
array('num' => '2', 'remark' => 'Y', 'color' => '#0000FF')
|
||
);
|
||
|
||
$defineTcapStatus=array(
|
||
array('num' => '0', 'remark' => 'Not used', 'color' => '#0000FF'),
|
||
array('num' => '1', 'remark' => 'Y', 'color' => '#0000FF')
|
||
);
|
||
|
||
$defineDebugStatus=array(
|
||
array('num' => '0', 'remark' => 'N', 'color' => '#FF0000'),
|
||
array('num' => '1', 'remark' => 'Y', 'color' => '#0000FF')
|
||
);
|
||
|
||
$omcDebugModule=array(
|
||
array('num' => '0', 'remark' => 'IPTRANS', 'color' => '#000000'),
|
||
array('num' => '1', 'remark' => 'MTP3', 'color' => '#000000'),
|
||
array('num' => '2', 'remark' => 'SCCP', 'color' => '#000000'),
|
||
array('num' => '3', 'remark' => 'TCAP', 'color' => '#000000'),
|
||
array('num' => '4', 'remark' => 'XAP-P', 'color' => '#000000'),
|
||
array('num' => '5', 'remark' => 'MSC', 'color' => '#000000'),
|
||
array('num' => '6', 'remark' => 'VLR', 'color' => '#000000'),
|
||
array('num' => '7', 'remark' => '--', 'color' => '#000000'),
|
||
array('num' => '8', 'remark' => 'HLR', 'color' => '#000000'),
|
||
array('num' => '9', 'remark' => 'SMSC', 'color' => '#000000'),
|
||
array('num' => '10', 'remark' => 'PPS', 'color' => '#000000'),
|
||
array('num' => '11', 'remark' => 'SNMP', 'color' => '#000000'),
|
||
array('num' => '12', 'remark' => '--', 'color' => '#000000'),
|
||
array('num' => '13', 'remark' => 'DEBUG', 'color' => '#000000'),
|
||
array('num' => '14', 'remark' => 'CDR', 'color' => '#000000'),
|
||
array('num' => '15', 'remark' => 'SS7 Gate','color' => '#000000')
|
||
);
|
||
$aucDebugModule=array(
|
||
array('num' => '0', 'remark' => 'IPTRANS', 'color' => '#000000'),
|
||
array('num' => '1', 'remark' => 'MTP3', 'color' => '#000000'),
|
||
array('num' => '2', 'remark' => 'SCCP', 'color' => '#000000'),
|
||
array('num' => '3', 'remark' => 'TCAP', 'color' => '#000000'),
|
||
array('num' => '4', 'remark' => 'XAP-P', 'color' => '#000000'),
|
||
array('num' => '5', 'remark' => 'MSC', 'color' => '#000000'),
|
||
array('num' => '6', 'remark' => 'VLR', 'color' => '#000000'),
|
||
array('num' => '7', 'remark' => '--', 'color' => '#000000'),
|
||
array('num' => '8', 'remark' => 'HLR', 'color' => '#000000'),
|
||
array('num' => '9', 'remark' => 'SMSC', 'color' => '#000000'),
|
||
array('num' => '10', 'remark' => 'PPS', 'color' => '#000000'),
|
||
array('num' => '11', 'remark' => 'SNMP', 'color' => '#000000'),
|
||
array('num' => '12', 'remark' => '--', 'color' => '#000000'),
|
||
array('num' => '13', 'remark' => 'DEBUG', 'color' => '#000000'),
|
||
array('num' => '14', 'remark' => 'AUC', 'color' => '#000000'),
|
||
array('num' => '15', 'remark' => 'EIR', 'color' => '#000000')
|
||
);
|
||
$otherDebugModule=array(
|
||
array('num' => '0', 'remark' => 'IPTRANS', 'color' => '#000000'),
|
||
array('num' => '1', 'remark' => 'MTP3', 'color' => '#000000'),
|
||
array('num' => '2', 'remark' => 'SCCP', 'color' => '#000000'),
|
||
array('num' => '3', 'remark' => 'TCAP', 'color' => '#000000'),
|
||
array('num' => '4', 'remark' => 'XAP-P', 'color' => '#000000'),
|
||
array('num' => '5', 'remark' => 'MSC', 'color' => '#000000'),
|
||
array('num' => '6', 'remark' => 'VLR', 'color' => '#000000'),
|
||
array('num' => '7', 'remark' => '--', 'color' => '#000000'),
|
||
array('num' => '8', 'remark' => 'HLR', 'color' => '#000000'),
|
||
array('num' => '9', 'remark' => 'SMSC', 'color' => '#000000'),
|
||
array('num' => '10', 'remark' => 'PPS', 'color' => '#000000'),
|
||
array('num' => '11', 'remark' => 'SNMP', 'color' => '#000000'),
|
||
array('num' => '12', 'remark' => '--', 'color' => '#000000'),
|
||
array('num' => '13', 'remark' => 'DEBUG', 'color' => '#000000'),
|
||
array('num' => '14', 'remark' => 'AUC', 'color' => '#000000'),
|
||
array('num' => '15', 'remark' => 'EIR', 'color' => '#000000')
|
||
);
|
||
|
||
$defineModuleStatus=array(
|
||
array('num' => '0', 'remark' => '--', 'color' => '#000000'),
|
||
array('num' => '1', 'remark' => 'Y', 'color' => '#0000FF')
|
||
);
|
||
|
||
$defineSyncStatus=array(
|
||
array('num' => '0', 'remark' => 'Y', 'color' => '#0000FF'),
|
||
array('num' => '1', 'remark' => 'Restart', 'color' => '#0000FF'),
|
||
array('num' => '2', 'remark' => 'Init', 'color' => '#0000FF'),
|
||
array('num' => '3', 'remark' => 'suspend', 'color' => '#0000FF'),
|
||
array('num' => '4', 'remark' => 'Stop', 'color' => '#FF0000')
|
||
);
|
||
|
||
$defineSsnStatus=array(
|
||
array('num' => '0', 'remark' => '--', 'color' => '#0000FF'),
|
||
array('num' => '1', 'remark' => '--', 'color' => '#0000FF'),
|
||
array('num' => '2', 'remark' => '--', 'color' => '#0000FF'),
|
||
array('num' => '3', 'remark' => '--', 'color' => '#0000FF'),
|
||
array('num' => '4', 'remark' => 'OMC', 'color' => '#0000FF'),
|
||
array('num' => '5', 'remark' => '--', 'color' => '#0000FF'),
|
||
array('num' => '6', 'remark' => 'HLR', 'color' => '#0000FF'),
|
||
array('num' => '7', 'remark' => 'VLR', 'color' => '#0000FF'),
|
||
array('num' => '8', 'remark' => 'MSC', 'color' => '#0000FF'),
|
||
array('num' => '9', 'remark' => 'EIR', 'color' => '#0000FF'),
|
||
array('num' => '10', 'remark' => 'AUC', 'color' => '#0000FF'),
|
||
array('num' => '11', 'remark' => 'SMSC', 'color' => '#0000FF'),
|
||
array('num' => '12', 'remark' => 'CAP(CCF)', 'color' => '#0000FF'),
|
||
array('num' => '13', 'remark' => 'CAP(SCF)', 'color' => '#0000FF'),
|
||
array('num' => '14', 'remark' => 'AIF', 'color' => '#0000FF'),
|
||
array('num' => '15', 'remark' => '--', 'color' => '#0000FF'),
|
||
array('num' => '16', 'remark' => '--', 'color' => '#0000FF'),
|
||
array('num' => '17', 'remark' => '--', 'color' => '#0000FF'),
|
||
array('num' => '18', 'remark' => '--', 'color' => '#0000FF'),
|
||
array('num' => '19', 'remark' => 'ESME', 'color' => '#0000FF'),
|
||
array('num' => '20', 'remark' => 'SMPP', 'color' => '#0000FF')
|
||
);
|
||
|
||
|
||
$sysType = omc_sys_id_info($sys_id,sys_type);
|
||
$sysTypeNo = omc_sys_type2code($sysType);
|
||
$sysNo = omc_sys_id_info($sys_id,sys_num);
|
||
$subSysNo = omc_sys_id_info($sys_id,subsys_num);
|
||
if($DEBUG)echo "<br>sysType=$sysType";
|
||
if($DEBUG)echo "<br>sysNo=$sysNo";
|
||
if($DEBUG)echo "<br>subSysNo=$subSysNo";
|
||
|
||
$sysType=$PlatTypeDefArr[$sysNo][remark];
|
||
$TypeNo = omc_sys_type2code($sysType);
|
||
$selPlat="SELECT platHeart FROM sysConf WHERE sysTypeNo = '$TypeNo' ";
|
||
if($DEBUG)echo "<br>selPlat=$selPlat";
|
||
$resPlat=@mysqli_query($pubConn,$selPlat);
|
||
$rowPlat=@mysqli_fetch_array($resPlat);
|
||
$sysNo = $rowPlat[0];
|
||
|
||
if($DEBUG)echo "<br>sysType=$sysType";
|
||
if($DEBUG)echo "<br>sysNo=$sysNo";
|
||
if($DEBUG)echo "<br>subSysNo=$subSysNo";
|
||
|
||
|
||
$sel_mes_sql="SELECT detailStat,updateTime FROM $sysStat_table
|
||
WHERE
|
||
sysTypeNo='$sysTypeNo' AND sysNo='$sysNo' AND subSysNo='$subSysNo'
|
||
";
|
||
if($DEBUG)echo "<br>sel_mes_sql=$sel_mes_sql";
|
||
$sel_mes_res=mysqli_query($pubConn,$sel_mes_sql);
|
||
$sel_mes_row=@mysqli_fetch_array($sel_mes_res);
|
||
echo "<br>";
|
||
echo mysqli_error($pubConn);
|
||
|
||
if(!$sel_mes_row)
|
||
{
|
||
echo "<br><font size='2'>$strNotInstalled</font>";
|
||
exit();
|
||
}
|
||
|
||
$hex_mes=$sel_mes_row[detailStat];
|
||
if($DEBUG)echo "<br>hex_mes=$hex_mes";
|
||
$refresh_time=$sel_mes_row[updateTime];
|
||
if($refresh_time > $due_date && $refresh_time < $ove_date)
|
||
{
|
||
$color_refresh_time="#0000FF";
|
||
}
|
||
else
|
||
{
|
||
$no_sys_status=1;
|
||
$no_vlr_status=1;
|
||
$color_refresh_time="#FF0000";
|
||
}
|
||
|
||
$bin_mes='';
|
||
for($i=0;$i<strlen($hex_mes);$i++)
|
||
{
|
||
$sig_hex_mes=substr($hex_mes,$i,1);
|
||
$sig_dec_mes=HexDec($sig_hex_mes);
|
||
$sig_bin_mes=DecBin($sig_dec_mes);
|
||
$sig_bin_mes=omc_keep_length($sig_bin_mes,0,4);
|
||
$bin_mes.=$sig_bin_mes;
|
||
}
|
||
if($DEBUG)echo "<br>bin_mes=$bin_mes";
|
||
|
||
|
||
/************************************iptrans************************************/
|
||
$iptrans_bgn_byt=21;
|
||
$iptrans_len_bin=substr($bin_mes,$iptrans_bgn_byt*8,16);//iptrans<6E><73>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD>,19bytes
|
||
$iptrans_len_dec=BinDec($iptrans_len_bin);
|
||
if($iptrans_len_dec > 0){
|
||
$showIptrans = 1;
|
||
}
|
||
|
||
if($DEBUG)echo "<br>iptrans_len_dec=$iptrans_len_dec";
|
||
|
||
//<2F>汾<EFBFBD><E6B1BE>
|
||
$bin_version_0=substr($bin_mes,($iptrans_bgn_byt+2)*8,8);
|
||
$dec_version_0=BinDec($bin_version_0);
|
||
|
||
$bin_version_1=substr($bin_mes,($iptrans_bgn_byt+3)*8,8);
|
||
$dec_version_1=BinDec($bin_version_1);
|
||
$dec_version_1=omc_keep_length($dec_version_1,0,2);
|
||
|
||
$bin_version_2=substr($bin_mes,($iptrans_bgn_byt+4)*8,8);
|
||
$dec_version_2=BinDec($bin_version_2);
|
||
$dec_version_2=omc_keep_length($dec_version_2,0,2);
|
||
|
||
$version=$dec_version_0.".".$dec_version_1.".".$dec_version_2;
|
||
$color_version="#0000FF";
|
||
if($DEBUG)echo "<br>version=$version";
|
||
|
||
//״̬
|
||
$iptrans_state_bin=substr($bin_mes,($iptrans_bgn_byt+5)*8,8);
|
||
$iptrans_state_dec=BinDec($iptrans_state_bin);
|
||
if($DEBUG)echo "<br>iptrans_state_dec=$iptrans_state_dec";
|
||
|
||
//port״̬
|
||
for($i=0;$i<4;$i++){
|
||
for($j=0;$j<8;$j++){
|
||
$num=($i+1)*8-1-$j;
|
||
$port_bin="port_".$num."_bin";
|
||
$port_dec="port_".$num."_dec";
|
||
${$port_bin}=substr($bin_mes,($iptrans_bgn_byt+6)*8+$i*8+$j,1);
|
||
${$port_dec}=BinDec(${$port_bin});
|
||
if($DEBUG)echo "<br>$port_dec=${$port_dec}";
|
||
}
|
||
}
|
||
|
||
if($mod_type==1){
|
||
if(!$showIptrans){
|
||
echo "<br><font size='2'>$strNotInstalled</font>";
|
||
exit();
|
||
}
|
||
?>
|
||
<table border="0" width="100%" cellpadding="0" cellspacing="1">
|
||
<tr><td><p align="center"><font color="#0000FF" size="2">
|
||
<?php
|
||
echo "IPTRANS</font>";
|
||
echo "( $strVersion:";
|
||
echo "<font color=\"#0000FF\">$version</font>";
|
||
echo ", ";
|
||
echo " $strStatus:";
|
||
if($iptrans_state_dec<2)
|
||
{
|
||
echo "<font color={$defineStatus[$iptrans_state_dec][color]}>{$defineStatus[$iptrans_state_dec][remark]}</font>";
|
||
$input_iptrans_state_value=$defineStatus[$iptrans_state_dec][remark];
|
||
$input_iptrans_state_color=$defineStatus[$iptrans_state_dec][color];
|
||
}
|
||
else
|
||
{
|
||
echo "<font color=\"#0000FF\">--</font>";
|
||
$input_iptrans_state_value="--";
|
||
$input_iptrans_state_color="#0000FF";
|
||
}
|
||
echo ", ";
|
||
echo "$strRefreshTime:";
|
||
echo "<font color=\"$color_refresh_time\">$refresh_time</font>";
|
||
echo " )";
|
||
echo "<script LANGUAGE=\"JavaScript\">";
|
||
$id = 'input_iptrans_state';
|
||
outputInnerHtml($id,$input_iptrans_state_value,$input_iptrans_state_color);
|
||
$id = 'input_refresh_time';
|
||
outputInnerHtml($id,$refresh_time,$color_refresh_time);
|
||
echo "</script>";
|
||
?>
|
||
</p></td></tr>
|
||
</table>
|
||
<p></p>
|
||
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
|
||
<tr bgcolor="#E6E6E6">
|
||
<td width="12.5%">
|
||
<nobr><?php echo "$strPortNo"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "$strStatus"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "$strPortNo"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "$strStatus"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "$strPortNo"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "$strStatus"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "$strPortNo"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "$strStatus"; ?></nobr>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
for($i=0;$i<8;$i++)
|
||
{
|
||
echo "<tr>";
|
||
for($j=0;$j<8;$j++)
|
||
{
|
||
if($j%2==0)
|
||
{
|
||
$dis_no=4950+($j/2)*8+$i;
|
||
echo "<td>";
|
||
echo $dis_no;
|
||
echo "</td>";
|
||
}
|
||
else
|
||
{
|
||
$idArr[$i][$j]="input_port_status" . "_$i" . "_$j";
|
||
$dis_port=(($j-1)/2)*8+$i;
|
||
$port_name="port_".$dis_port."_dec";
|
||
$port_status=${$port_name};
|
||
echo "<td>";
|
||
echo "<font color={$defineIptransStatus[$port_status][color]}>{$defineIptransStatus[$port_status][remark]}</font>";
|
||
echo "</td>";
|
||
$input_port_status_value[$i][$j]=$defineIptransStatus[$port_status][remark];
|
||
$input_port_status_color[$i][$j]=$defineIptransStatus[$port_status][color];
|
||
}
|
||
}
|
||
echo "</tr>";
|
||
}
|
||
echo "<script LANGUAGE=\"JavaScript\">";
|
||
for($i=0;$i<8;$i++){
|
||
for($j=0; $j<8; $j++){
|
||
if($j%2!=0)
|
||
outputInnerHtml($idArr[$i][$j],$input_port_status_value[$i][$j],$input_port_status_color[$i][$j]);
|
||
}
|
||
}
|
||
echo "</script>";
|
||
?>
|
||
</table>
|
||
<?php
|
||
}//end if($mod_type==1)
|
||
|
||
/************************************mtp3************************************/
|
||
$mtp3_bgn_byt=$iptrans_bgn_byt+4+$iptrans_len_dec;
|
||
if($DEBUG)echo "<br>mtp3_bgn_byt=$mtp3_bgn_byt";
|
||
$mtp3_len_bin=substr($bin_mes,$mtp3_bgn_byt*8,16);//mtp3<70><33>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD>
|
||
$mtp3_len_dec=BinDec($mtp3_len_bin);
|
||
if($mtp3_len_dec){
|
||
$showMtp3=1;
|
||
}
|
||
if($DEBUG)echo "<br>mtp3_len_dec=$mtp3_len_dec";
|
||
|
||
//<2F>汾<EFBFBD><E6B1BE>
|
||
$bin_version_0=substr($bin_mes,($mtp3_bgn_byt+2)*8,8);
|
||
$dec_version_0=BinDec($bin_version_0);
|
||
|
||
$bin_version_1=substr($bin_mes,($mtp3_bgn_byt+3)*8,8);
|
||
$dec_version_1=BinDec($bin_version_1);
|
||
$dec_version_1=omc_keep_length($dec_version_1,0,2);
|
||
|
||
$bin_version_2=substr($bin_mes,($mtp3_bgn_byt+4)*8,8);
|
||
$dec_version_2=BinDec($bin_version_2);
|
||
$dec_version_2=omc_keep_length($dec_version_2,0,2);
|
||
|
||
$version=$dec_version_0.".".$dec_version_1.".".$dec_version_2;
|
||
$color_version="#0000FF";
|
||
if($DEBUG)echo "<br>version=$version";
|
||
|
||
//״̬
|
||
$mtp3_state_bin=substr($bin_mes,($mtp3_bgn_byt+5)*8,8);
|
||
$mtp3_state_dec=BinDec($mtp3_state_bin);
|
||
if($DEBUG)echo "<br>mtp3_state_dec=$mtp3_state_dec";
|
||
|
||
//link״̬
|
||
for($i=0;$i<64;$i++)
|
||
{
|
||
for($j=0;$j<4;$j++)
|
||
{
|
||
$num=($i+1)*4-1-$j;
|
||
if($DEBUG)echo "<br>num=$num";
|
||
$link_bin="link_".$num."_bin";
|
||
$link_dec="link_".$num."_dec";
|
||
${$link_bin}=substr($bin_mes,($mtp3_bgn_byt+6)*8+$i*8+$j*2,2);
|
||
${$link_dec}=BinDec(${$link_bin});
|
||
if($DEBUG)echo "<br>$link_dec=${$link_dec}";
|
||
}
|
||
}
|
||
|
||
//linkset״̬
|
||
for($i=0;$i<32;$i++)
|
||
{
|
||
for($j=0;$j<4;$j++)
|
||
{
|
||
$num=($i+1)*4-1-$j;
|
||
if($DEBUG)echo "<br>num=$num";
|
||
$linkset_bin="linkset_".$num."_bin";
|
||
$linkset_dec="linkset_".$num."_dec";
|
||
${$linkset_bin}=substr($bin_mes,($mtp3_bgn_byt+6+64)*8+$i*8+$j*2,2);
|
||
${$linkset_dec}=BinDec(${$linkset_bin});
|
||
if($DEBUG)echo "<br>$linkset_dec=${$linkset_dec}";
|
||
}
|
||
}
|
||
|
||
|
||
if($mod_type==2)
|
||
{
|
||
if(!$showMtp3)
|
||
{
|
||
echo "<br><font size='2'>$strNotInstalled</font>";
|
||
exit();
|
||
}
|
||
?>
|
||
<p></p>
|
||
<table border="0" width="100%" cellpadding="0" cellspacing="1">
|
||
<tr><td><p align="center"><font color="#0000FF" size="2">
|
||
<?php
|
||
echo "MTP3</font>";
|
||
echo "( $strVersion:";
|
||
echo "<font color=\"#0000FF\">$version</font>";
|
||
echo ", ";
|
||
echo " $strStatus:";
|
||
if($mtp3_state_dec<2){
|
||
echo "<font color={$defineStatus[$mtp3_state_dec][color]}>{$defineStatus[$mtp3_state_dec][remark]}</font>";
|
||
$input_mtp3_state_value=$defineStatus[$mtp3_state_dec][remark];
|
||
$input_mtp3_state_color=$defineStatus[$mtp3_state_dec][color];
|
||
}else{
|
||
echo "<font color=\"#0000FF\">--</font>";
|
||
$input_mtp3_state_value="--";
|
||
$input_mtp3_state_color="#0000FF";
|
||
}
|
||
echo ", ";
|
||
echo "$strRefreshTime:";
|
||
echo "<font color=\"$color_refresh_time\">$refresh_time</font>";
|
||
echo " )";
|
||
|
||
echo "<script LANGUAGE=\"JavaScript\">";
|
||
$id = 'input_mtp3_state';
|
||
outputInnerHtml($id,$input_mtp3_state_value,$input_mtp3_state_color);
|
||
$id = 'input_refresh_time';
|
||
outputInnerHtml($id,$refresh_time,$color_refresh_time);
|
||
echo "</script>";
|
||
?>
|
||
</p></td></tr>
|
||
</table>
|
||
<p></p>
|
||
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
|
||
<tr bgcolor="#E6E6E6" align="center">
|
||
<td colspan="8">
|
||
Link
|
||
</td>
|
||
<tr bgcolor="#E6E6E6">
|
||
<td width="12.5%">
|
||
<nobr><?php echo "No"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "$strStatus"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "No"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "$strStatus"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "No"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "$strStatus"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "No"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "$strStatus"; ?></nobr>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
for($i=0;$i<64;$i++)
|
||
{
|
||
echo "<tr>";
|
||
for($j=0;$j<8;$j++)
|
||
{
|
||
if($j%2==0)
|
||
{
|
||
$dis_no=($j/2)*64+$i;
|
||
echo "<td>";
|
||
echo $dis_no;
|
||
echo "</td>";
|
||
}
|
||
else
|
||
{
|
||
$lkIdArr[$i][$j] = "input_mtp3_link_status" . "_$i" . "_$j";
|
||
$dis_link=(($j-1)/2)*64+$i;
|
||
$link_name="link_".$dis_link."_dec";
|
||
$link_status=${$link_name};
|
||
echo "<td>";
|
||
if($link_status<2)
|
||
{
|
||
echo "<font color={$defineMtp3Status[$link_status][color]}> {$defineMtp3Status[$link_status][remark]} </font>";
|
||
$input_mtp3_link_status_value[$i][$j]=$defineMtp3Status[$link_status][remark];
|
||
$input_mtp3_link_status_color[$i][$j]=$defineMtp3Status[$link_status][color];
|
||
}
|
||
else
|
||
{
|
||
echo "--";
|
||
$input_mtp3_link_status_value[$i][$j]="--";
|
||
$input_mtp3_link_status_color[$i][$j]="#000000";
|
||
}
|
||
echo "</td>";
|
||
}
|
||
}
|
||
echo "</tr>";
|
||
}
|
||
|
||
echo "<script LANGUAGE=\"JavaScript\">";
|
||
for($i=0;$i<64;$i++)
|
||
{
|
||
for($j=0;$j<8;$j++){
|
||
if($j%2!=0)
|
||
outputInnerHtml($lkIdArr[$i][$j],$input_mtp3_link_status_value[$i][$j],$input_mtp3_link_status_color[$i][$j]);
|
||
}
|
||
}
|
||
echo "</script>";
|
||
?>
|
||
</table>
|
||
<p></p>
|
||
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
|
||
<tr bgcolor="#E6E6E6" align="center">
|
||
<td colspan="8">
|
||
Linkset
|
||
</td>
|
||
<tr bgcolor="#E6E6E6">
|
||
<td width="12.5%">
|
||
<nobr><?php echo "No"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "$strStatus"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "No"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "$strStatus"; ?></nobr>
|
||
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "No"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "$strStatus"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "No"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "$strStatus"; ?></nobr>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
for($i=0;$i<32;$i++)
|
||
{
|
||
echo "<tr>";
|
||
for($j=0;$j<8;$j++)
|
||
{
|
||
if($j%2==0)
|
||
{
|
||
$dis_no=($j/2)*32+$i;
|
||
echo "<td>";
|
||
echo $dis_no;
|
||
echo "</td>";
|
||
}
|
||
else
|
||
{
|
||
$lsIdArr[$i][$j] = "input_mtp3_linkset_status" . "_$i" . "_$j";
|
||
$dis_linkset=(($j-1)/2)*32+$i;
|
||
$linkset_name="linkset_".$dis_linkset."_dec";
|
||
$linkset_status=${$linkset_name};
|
||
echo "<td>";
|
||
if($linkset_status<2)
|
||
{
|
||
echo "<font color={$defineMtp3Status[$linkset_status][color]}> {$defineMtp3Status[$linkset_status][remark]} </font>";
|
||
$input_mtp3_linkset_status_value[$i][$j]=$defineMtp3Status[$linkset_status][remark];
|
||
$input_mtp3_linkset_status_color[$i][$j]=$defineMtp3Status[$linkset_status][color];
|
||
}
|
||
else
|
||
{
|
||
echo "--";
|
||
$input_mtp3_linkset_status_value[$i][$j]="--";
|
||
$input_mtp3_linkset_status_color[$i][$j]="#000000";
|
||
}
|
||
echo "</td>";
|
||
}
|
||
}
|
||
echo "</tr>";
|
||
}
|
||
for($i=0;$i<32;$i++){
|
||
for($j=0;$j<8;$j++){
|
||
if($j%2!=0)
|
||
outputInnerHtml($lsIdArr[$i][$j],$input_mtp3_linkset_status_value[$i][$j],$input_mtp3_linkset_status_color[$i][$j]);
|
||
}
|
||
}
|
||
?>
|
||
</table>
|
||
|
||
<?php
|
||
}//end if($mod_type==2)
|
||
|
||
/************************************sccp************************************/
|
||
$sccp_bgn_byt=$mtp3_bgn_byt+4+$mtp3_len_dec;
|
||
$sccp_len_bin=substr($bin_mes,$sccp_bgn_byt*8,16);//sccp<63><70>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD>
|
||
$sccp_len_dec=BinDec($sccp_len_bin);
|
||
if($DEBUG)echo "<br>sccp_len_dec=$sccp_len_dec";
|
||
$ssnNum=$sccp_len_dec-4;
|
||
if($sccp_len_dec > 0){
|
||
$showSccp = 1;
|
||
}
|
||
|
||
//<2F>汾<EFBFBD><E6B1BE>
|
||
$bin_version_0=substr($bin_mes,($sccp_bgn_byt+2)*8,8);
|
||
$dec_version_0=BinDec($bin_version_0);
|
||
|
||
$bin_version_1=substr($bin_mes,($sccp_bgn_byt+3)*8,8);
|
||
$dec_version_1=BinDec($bin_version_1);
|
||
$dec_version_1=omc_keep_length($dec_version_1,0,2);
|
||
|
||
$bin_version_2=substr($bin_mes,($sccp_bgn_byt+4)*8,8);
|
||
$dec_version_2=BinDec($bin_version_2);
|
||
$dec_version_2=omc_keep_length($dec_version_2,0,2);
|
||
|
||
$version=$dec_version_0.".".$dec_version_1.".".$dec_version_2;
|
||
$color_version="#0000FF";
|
||
if($DEBUG)echo "<br>version=$version";
|
||
|
||
//״̬
|
||
$sccp_state_bin=substr($bin_mes,($sccp_bgn_byt+5)*8,8);
|
||
$sccp_state_dec=BinDec($sccp_state_bin);
|
||
if($DEBUG)echo "<br>sccp_state_dec=$sccp_state_dec";
|
||
|
||
for($i=0;$i<$ssnNum;$i++)
|
||
{
|
||
$ssn_hex="ssn_".$i."_hex";
|
||
$ssn_dec="ssn_".$i."_dec";
|
||
${$ssn_hex}=substr($hex_mes,($sccp_bgn_byt+6+$i)*2,2);
|
||
${$ssn_dec}=HexDec(${$ssn_hex});
|
||
if($DEBUG) echo "<br>$ssn_dec=${$ssn_dec}";
|
||
}
|
||
|
||
if($mod_type==3)
|
||
{
|
||
if(!$showSccp)
|
||
{
|
||
echo "<br><font size='2'>$strNotInstalled</font>";
|
||
exit();
|
||
}
|
||
?>
|
||
|
||
<p></p>
|
||
<table border="0" width="100%" cellpadding="0" cellspacing="1">
|
||
<tr><td><p align="center"><font color="#0000FF" size="2">
|
||
<?php
|
||
echo "SCCP</font>";
|
||
echo "( $strVersion:";
|
||
echo "<font color=\"#0000FF\">$version</font>";
|
||
echo ", ";
|
||
echo " $strStatus:";
|
||
if($sccp_state_dec<3)
|
||
{
|
||
echo "<font color={$defineSccpStatus[$sccp_state_dec][color]}>{$defineSccpStatus[$sccp_state_dec][remark]}</font>";
|
||
$input_sccp_state_value=$defineSccpStatus[$sccp_state_dec][remark];
|
||
$input_sccp_state_color=$defineSccpStatus[$sccp_state_dec][color];
|
||
}
|
||
else
|
||
{
|
||
echo "<font color=\"#0000FF\">--</font>";
|
||
$input_sccp_state_value="--";
|
||
$input_sccp_state_color="#0000FF";
|
||
}
|
||
echo ", ";
|
||
echo "$strRefreshTime:";
|
||
echo "<font color=\"$color_refresh_time\">$refresh_time</font>";
|
||
echo " )";
|
||
|
||
echo "<script LANGUAGE=\"JavaScript\">";
|
||
$id = 'input_sccp_state';
|
||
outputInnerHtml($id,$input_sccp_state_value,$input_sccp_state_color);
|
||
$id = 'input_refresh_time';
|
||
outputInnerHtml($id,$refresh_time,$color_refresh_time);
|
||
echo "</script>";
|
||
?>
|
||
</p></td></tr>
|
||
</table>
|
||
<p></p>
|
||
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
|
||
<?php
|
||
if($ssnNum>0)
|
||
{
|
||
echo "<tr bgcolor=\"#E6E6E6\">";
|
||
echo "<td width=\"50%\">Registered ssn num</td>";
|
||
echo "<td width=\"50%\">Registered ssn name</td>";
|
||
echo "</tr>";
|
||
for($i=0;$i<$ssnNum;$i++)
|
||
{
|
||
$ssn_dec="ssn_".$i."_dec";
|
||
$showSsn=${$ssn_dec};
|
||
$showNum=omc_keep_length($showSsn,0,3);
|
||
echo "<tr>";
|
||
echo "<td width=\"50%\">$showNum</td>";
|
||
if($showSsn==146) {
|
||
$showSsn=12;
|
||
}
|
||
elseif($showSsn==147){
|
||
$showSsn=13;
|
||
}
|
||
elseif($showSsn==254){
|
||
$showSsn=14;
|
||
}
|
||
echo "<td width=\"50%\">";
|
||
echo "<font color=\"#0000FF\">{$defineSsnStatus[$showSsn][remark]}</font>";
|
||
echo "</td>";
|
||
echo "</tr>";
|
||
}
|
||
}
|
||
echo "</table>";
|
||
}//end if($mod_type==3)
|
||
|
||
/************************************tcap************************************/
|
||
$tcap_bgn_byt=$sccp_bgn_byt+4+$sccp_len_dec;
|
||
$tcap_len_bin=substr($bin_mes,$tcap_bgn_byt*8,16);//tcap<61><70>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD>
|
||
$tcap_len_dec=BinDec($tcap_len_bin);
|
||
if($DEBUG)echo "<br>tcap_len_dec=$tcap_len_dec";
|
||
if($tcap_len_dec > 0){
|
||
$showTcap = 1;
|
||
}
|
||
|
||
//<2F>汾<EFBFBD><E6B1BE>
|
||
$bin_version_0=substr($bin_mes,($tcap_bgn_byt+2)*8,8);
|
||
$dec_version_0=BinDec($bin_version_0);
|
||
|
||
$bin_version_1=substr($bin_mes,($tcap_bgn_byt+3)*8,8);
|
||
$dec_version_1=BinDec($bin_version_1);
|
||
$dec_version_1=omc_keep_length($dec_version_1,0,2);
|
||
|
||
$bin_version_2=substr($bin_mes,($tcap_bgn_byt+4)*8,8);
|
||
$dec_version_2=BinDec($bin_version_2);
|
||
$dec_version_2=omc_keep_length($dec_version_2,0,2);
|
||
|
||
$version=$dec_version_0.".".$dec_version_1.".".$dec_version_2;
|
||
$color_version="#0000FF";
|
||
if($DEBUG)echo "<br>version=$version";
|
||
|
||
//״̬
|
||
$tcap_state_bin=substr($bin_mes,($tcap_bgn_byt+5)*8,8);
|
||
$tcap_state_dec=BinDec($tcap_state_bin);
|
||
if($DEBUG)echo "<br>tcap_state_dec=$tcap_state_dec";
|
||
|
||
//Transaction ID
|
||
$tsid_state_bin=substr($bin_mes,($tcap_bgn_byt+6)*8,16);
|
||
$tsid_state_dec=BinDec($tsid_state_bin);
|
||
if($DEBUG)echo "<br>tsid_state_bin=$tsid_state_bin";
|
||
if($DEBUG)echo "<br>tsid_state_dec=$tsid_state_dec";
|
||
|
||
//Dialogue ID
|
||
$dlid_state_bin=substr($bin_mes,($tcap_bgn_byt+8)*8,16);
|
||
$dlid_state_dec=BinDec($dlid_state_bin);
|
||
if($DEBUG)echo "<br>dlid_state_bin=$dlid_state_bin";
|
||
if($DEBUG)echo "<br>dlid_state_dec=$dlid_state_dec";
|
||
|
||
if($mod_type==4){
|
||
if(!$showTcap){
|
||
echo "<br><font size='2'>$strNotInstalled</font>";
|
||
exit();
|
||
}
|
||
|
||
?>
|
||
<p></p>
|
||
<table border="0" width="100%" cellpadding="0" cellspacing="1">
|
||
<tr><td><p align="center"><font color="#0000FF" size="2">
|
||
<?php
|
||
echo "TCAP</font>";
|
||
echo "( $strVersion:";
|
||
echo "<font color=\"#0000FF\">$version</font>";
|
||
echo ", ";
|
||
echo " $strStatus:";
|
||
if($tcap_state_dec<2){
|
||
echo "<font color={$defineTcapStatus[$tcap_state_dec][color]}>{$defineTcapStatus[$tcap_state_dec][remark]}</font>";
|
||
$input_tcap_state_value=$defineTcapStatus[$tcap_state_dec][remark];
|
||
$input_tcap_state_color=$defineTcapStatus[$tcap_state_dec][color];
|
||
}
|
||
else{
|
||
echo "<font color=\"#0000FF\">--</font>";
|
||
$input_tcap_state_value="--";
|
||
$input_tcap_state_color="#0000FF";
|
||
}
|
||
echo ", ";
|
||
echo "$strRefreshTime:";
|
||
echo "<font color=\"$color_refresh_time\">$refresh_time</font>";
|
||
echo " )";
|
||
echo "<script LANGUAGE=\"JavaScript\">";
|
||
$id = 'input_tcap_state';
|
||
outputInnerHtml($id,$input_tcap_state_value,$input_tcap_state_color);
|
||
$id = 'input_refresh_time';
|
||
outputInnerHtml($id,$refresh_time,$color_refresh_time);
|
||
echo "</script>";
|
||
|
||
?>
|
||
</p></td></tr>
|
||
</table>
|
||
<p></p>
|
||
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
|
||
<tr bgcolor="#E6E6E6">
|
||
<td width="40%">
|
||
ID
|
||
</td>
|
||
<td width="60%">
|
||
Occupied
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="40%">
|
||
Current Used Dialogue ID
|
||
</td>
|
||
<td width="60%">
|
||
<?php
|
||
echo "<font color=\"#0000FF\">$tsid_state_dec</font>";
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="40%">
|
||
Max Used Dialogue ID
|
||
</td>
|
||
<td width="60%">
|
||
<?php
|
||
echo "<font color=\"#0000FF\">$dlid_state_dec</font>";
|
||
?>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<?php
|
||
echo "<script LANGUAGE=\"JavaScript\">";
|
||
outputInnerHtml('input_tsid_state_dec',$tsid_state_dec,'#0000ff');
|
||
outputInnerHtml('input_dlid_state_dec',$dlid_state_dec,'#0000ff');
|
||
echo "</script>";
|
||
}//end if($mod_type==4)
|
||
|
||
/************************************snmp************************************/
|
||
|
||
$snmp_bgn_byt=$tcap_bgn_byt+4+$tcap_len_dec;
|
||
$snmp_len_bin=substr($bin_mes,$snmp_bgn_byt*8,16);//snmp<6D><70>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD>
|
||
$snmp_len_dec=BinDec($snmp_len_bin);
|
||
if($DEBUG)echo "<br>snmp_len_dec=$snmp_len_dec";
|
||
if($snmp_len_dec > 0){
|
||
$showSnmp = 1;
|
||
}
|
||
|
||
//<2F>汾<EFBFBD><E6B1BE>
|
||
$bin_version_0=substr($bin_mes,($snmp_bgn_byt+2)*8,8);
|
||
$dec_version_0=BinDec($bin_version_0);
|
||
|
||
$bin_version_1=substr($bin_mes,($snmp_bgn_byt+3)*8,8);
|
||
$dec_version_1=BinDec($bin_version_1);
|
||
$dec_version_1=omc_keep_length($dec_version_1,0,2);
|
||
|
||
$bin_version_2=substr($bin_mes,($snmp_bgn_byt+4)*8,8);
|
||
$dec_version_2=BinDec($bin_version_2);
|
||
|
||
$dec_version_2=omc_keep_length($dec_version_2,0,2);
|
||
|
||
$version=$dec_version_0.".".$dec_version_1.".".$dec_version_2;
|
||
$color_version="#0000FF";
|
||
if($DEBUG)echo "<br>version=$version";
|
||
|
||
//״̬
|
||
|
||
$snmp_state_bin=substr($bin_mes,($snmp_bgn_byt+5)*8,8);
|
||
$snmp_state_dec=BinDec($snmp_state_bin);
|
||
if($DEBUG)echo "<br>snmp_state_dec=$snmp_state_dec";
|
||
|
||
//trap function
|
||
$trap_func_bin=substr($bin_mes,($snmp_bgn_byt+6)*8,8);
|
||
$trap_func_dec=BinDec($trap_func_bin);
|
||
if($DEBUG)echo "<br>trap_func_dec=$trap_func_dec";
|
||
|
||
//set function
|
||
$set_func_bin=substr($bin_mes,($snmp_bgn_byt+7)*8,8);
|
||
$set_func_dec=BinDec($set_func_bin);
|
||
if($DEBUG)echo "<br>set_func_dec=$set_func_dec";
|
||
|
||
//get function
|
||
$get_func_bin=substr($bin_mes,($snmp_bgn_byt+8)*8,8);
|
||
$get_func_dec=BinDec($get_func_bin);
|
||
if($DEBUG)echo "<br>get_func_dec=$get_func_dec";
|
||
|
||
//rsp function
|
||
$rsp_func_bin=substr($bin_mes,($snmp_bgn_byt+9)*8,8);
|
||
$rsp_func_dec=BinDec($rsp_func_bin);
|
||
if($DEBUG)echo "<br>rsp_func_dec=$rsp_func_dec";
|
||
if($mod_type==5){
|
||
if(!$showSnmp){
|
||
echo "<br><font size='2'>$strNotInstalled</font>";
|
||
exit();
|
||
}
|
||
|
||
?>
|
||
|
||
<p></p>
|
||
<table border="0" width="100%" cellpadding="0" cellspacing="1">
|
||
<tr><td><p align="center"><font color="#0000FF" size="2">
|
||
<?php
|
||
echo "SNMP</font>";
|
||
echo "( $strVersion:";
|
||
echo "<font color=\"#0000FF\">$version</font>";
|
||
echo ", ";
|
||
echo " $strStatus:";
|
||
if($snmp_state_dec<2){
|
||
echo "<font color={$defineStatus[$snmp_state_dec][color]}>{$defineStatus[$snmp_state_dec][remark]}</font>";
|
||
$input_snmp_state_value=$defineStatus[$snmp_state_dec][remark];
|
||
$input_snmp_state_color=$defineStatus[$snmp_state_dec][color];
|
||
}else{
|
||
echo "<font color=\"#0000FF\">--</font>";
|
||
$input_snmp_state_value="--";
|
||
$input_snmp_state_color="#0000FF";
|
||
}
|
||
echo ", ";
|
||
echo "$strRefreshTime:";
|
||
echo "<font color=\"$color_refresh_time\">$refresh_time</font>";
|
||
echo " )";
|
||
|
||
echo "<script LANGUAGE=\"JavaScript\">";
|
||
$id = 'input_snmp_state';
|
||
outputInnerHtml($id,$input_snmp_state_value,$input_snmp_state_color);
|
||
$id = 'input_refresh_time';
|
||
outputInnerHtml($id,$refresh_time,$color_refresh_time);
|
||
echo "</script>";
|
||
?>
|
||
|
||
</p></td></tr>
|
||
</table>
|
||
<p></p>
|
||
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
|
||
<tr bgcolor="#E6E6E6">
|
||
<td width="50%">
|
||
Function type
|
||
</td>
|
||
<td width="50%">
|
||
Registered number
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="50%">
|
||
TRAP
|
||
</td>
|
||
<td width="50%">
|
||
<?php
|
||
echo "<font color=\"#0000FF\">$trap_func_dec</font>";
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="50%">
|
||
SET
|
||
</td>
|
||
<td width="50%">
|
||
<?php
|
||
echo "<font color=\"#0000FF\">$set_func_dec</font>";
|
||
?>
|
||
</td></tr>
|
||
<tr>
|
||
<td width="50%">GET</td>
|
||
<td width="50%">
|
||
<?php
|
||
echo "<font color=\"#0000FF\">$get_func_dec</font>";
|
||
?>
|
||
</td></tr>
|
||
<tr>
|
||
<td width="50%">RSP</td>
|
||
<td width="50%">
|
||
<?php
|
||
echo "<font color=\"#0000FF\">$rsp_func_dec</font>";
|
||
?>
|
||
</td></tr>
|
||
</table>
|
||
<?php
|
||
|
||
echo "<script LANGUAGE=\"JavaScript\">";
|
||
outputInnerHtml('input_trap_func_dec',$trap_func_dec,'#0000ff');
|
||
outputInnerHtml('input_set_func_dec',$set_func_dec,'#0000ff');
|
||
outputInnerHtml('input_get_func_dec',$get_func_dec,'#0000ff');
|
||
outputInnerHtml('input_rsp_func_dec',$rsp_func_dec,'#0000ff');
|
||
echo "</script>";
|
||
|
||
}//end if($mod_type==5)
|
||
|
||
/************************************debug************************************/
|
||
$debug_bgn_byt=$snmp_bgn_byt+4+$snmp_len_dec;
|
||
$debug_len_bin=substr($bin_mes,$debug_bgn_byt*8,16);//debug<75><67>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD>
|
||
$debug_len_dec=BinDec($debug_len_bin);
|
||
if($DEBUG)echo "<br>debug_len_dec=$debug_len_dec";
|
||
if($debug_len_dec > 0){
|
||
$showDebug = 1;
|
||
}
|
||
|
||
//<2F>汾<EFBFBD><E6B1BE>
|
||
$bin_version_0=substr($bin_mes,($debug_bgn_byt+2)*8,8);
|
||
$dec_version_0=BinDec($bin_version_0);
|
||
|
||
$bin_version_1=substr($bin_mes,($debug_bgn_byt+3)*8,8);
|
||
$dec_version_1=BinDec($bin_version_1);
|
||
$dec_version_1=omc_keep_length($dec_version_1,0,2);
|
||
|
||
$bin_version_2=substr($bin_mes,($debug_bgn_byt+4)*8,8);
|
||
$dec_version_2=BinDec($bin_version_2);
|
||
$dec_version_2=omc_keep_length($dec_version_2,0,2);
|
||
|
||
$version=$dec_version_0.".".$dec_version_1.".".$dec_version_2;
|
||
$color_version="#0000FF";
|
||
if($DEBUG)echo "<br>version=$version";
|
||
|
||
//״̬
|
||
$debug_state_bin=substr($bin_mes,($debug_bgn_byt+5)*8,8);
|
||
$debug_state_dec=BinDec($debug_state_bin);
|
||
if($DEBUG)echo "<br>debug_state_dec=$debug_state_dec";
|
||
|
||
//use debug count
|
||
$count_bin=substr($bin_mes,($debug_bgn_byt+6)*8,8);
|
||
$count_dec=BinDec($count_bin);
|
||
if($DEBUG)echo "<br>count_dec=$count_dec";
|
||
|
||
//use debug module
|
||
for($i=0;$i<16;$i++)
|
||
{
|
||
$use_bin="use_".$i."_bin";
|
||
$use_dec="use_".$i."_dec";
|
||
${$use_bin}=substr($bin_mes,($debug_bgn_byt+7)*8+$i,1);
|
||
${$use_dec}=BinDec(${$use_bin});
|
||
if($DEBUG)echo "<br>$use_dec=${$use_dec}";
|
||
}
|
||
|
||
if($mod_type==6)
|
||
{
|
||
if(!$showDebug)
|
||
{
|
||
echo "<br><font size='2'>$strNotInstalled</font>";
|
||
exit();
|
||
}
|
||
|
||
?>
|
||
<p></p>
|
||
<table border="0" width="100%" cellpadding="0" cellspacing="1">
|
||
<tr><td><p align="center"><font color="#0000FF" size="2">
|
||
<?php
|
||
echo "DEBUG</font>";
|
||
echo "( $strVersion:";
|
||
echo "<font color=\"#0000FF\">$version</font>";
|
||
echo ", ";
|
||
echo " $strStatus:";
|
||
if($debug_state_dec<2){
|
||
echo "<font color={$defineDebugStatus[$debug_state_dec][color]}>{$defineDebugStatus[$debug_state_dec][remark]}</font>";
|
||
$input_debug_state_value=$defineDebugStatus[$debug_state_dec][remark];
|
||
$input_debug_state_color=$defineDebugStatus[$debug_state_dec][color];
|
||
}else{
|
||
$input_debug_state_value="--";
|
||
$input_debug_state_color="#0000FF";
|
||
echo "<font color=\"#0000FF\">--</font>";
|
||
}
|
||
echo ", ";
|
||
echo "$strRefreshTime:";
|
||
echo "<font color=\"$color_refresh_time\">$refresh_time</font>";
|
||
echo " )";
|
||
echo "<script LANGUAGE=\"JavaScript\">";
|
||
$id = 'input_debug_state';
|
||
outputInnerHtml($id,$input_debug_state_value,$input_debug_state_color);
|
||
$id = 'input_refresh_time';
|
||
outputInnerHtml($id,$refresh_time,$color_refresh_time);
|
||
echo "</script>";
|
||
?>
|
||
</p></td></tr>
|
||
</table>
|
||
<p></p>
|
||
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
|
||
<tr bgcolor="#E6E6E6">
|
||
<td width="12.5%">
|
||
<nobr><?php echo "Module"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "Used"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "Module"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "Used"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "Module"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "Used"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "Module"; ?></nobr>
|
||
</td>
|
||
<td width="12.5%">
|
||
<nobr><?php echo "Used"; ?></nobr>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
for($i=0;$i<4;$i++)
|
||
{
|
||
echo "<tr>";
|
||
for($j=0;$j<8;$j++)
|
||
{
|
||
$idArr[$i][$j] = "input_debug_items" . "_$i" . "_$j";
|
||
if($j%2==0)
|
||
{
|
||
$dis_no=($j/2)*4+$i;
|
||
echo "<td>";
|
||
if($PlatTypeDefArr[$sysNo][remark]=='EMS')
|
||
{
|
||
echo $omcDebugModule[$dis_no][remark];
|
||
}
|
||
elseif($sysType=='AUC' || $sysType=='EIR' || $sysType=='HLR')
|
||
{
|
||
echo $aucDebugModule[$dis_no][remark];
|
||
}
|
||
else
|
||
{
|
||
echo $otherDebugModule[$dis_no][remark];
|
||
}
|
||
echo "</td>";
|
||
}
|
||
else
|
||
{
|
||
$dis_port=(($j-1)/2)*4+$i;
|
||
$port_name="use_".$dis_port."_dec";
|
||
$port_status=${$port_name};
|
||
echo "<td>";
|
||
echo "<font color={$defineModuleStatus[$port_status][color]}>{$defineModuleStatus[$port_status][remark]}</font>";
|
||
echo "</td>";
|
||
$input_debug_items_value[$i][$j]=$defineModuleStatus[$port_status][remark];
|
||
$input_debug_items_color[$i][$j]=$defineModuleStatus[$port_status][color];
|
||
}
|
||
}
|
||
echo "</tr>";
|
||
}
|
||
echo "<script LANGUAGE=\"JavaScript\">";
|
||
for($i=0;$i<4;$i++){
|
||
for($j=0;$j<8;$j++){
|
||
if($j%2!=0)
|
||
outputInnerHtml($idArr[$i][$j],$input_debug_items_value[$i][$j],$input_port_status_color[$i][$j]);
|
||
}
|
||
}
|
||
echo "</script>";
|
||
?>
|
||
|
||
</table>
|
||
<?php
|
||
}//end if($mod_type==6)
|
||
|
||
/************************************data sync************************************/
|
||
$syn_bgn_byt=$debug_bgn_byt+4+$debug_len_dec;
|
||
$syn_len_bin=substr($bin_mes,$syn_bgn_byt*8,16);//syn<79><6E>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD>
|
||
$syn_len_dec=BinDec($syn_len_bin);
|
||
if($DEBUG)echo "<br>syn_len_dec=$syn_len_dec";
|
||
if($syn_len_dec > 0){
|
||
$showDatasync = 1;
|
||
}
|
||
|
||
//<2F>汾<EFBFBD><E6B1BE>
|
||
$bin_version_0=substr($bin_mes,($syn_bgn_byt+2)*8,8);
|
||
$dec_version_0=BinDec($bin_version_0);
|
||
|
||
$bin_version_1=substr($bin_mes,($syn_bgn_byt+3)*8,8);
|
||
$dec_version_1=BinDec($bin_version_1);
|
||
$dec_version_1=omc_keep_length($dec_version_1,0,2);
|
||
|
||
$bin_version_2=substr($bin_mes,($syn_bgn_byt+4)*8,8);
|
||
$dec_version_2=BinDec($bin_version_2);
|
||
$dec_version_2=omc_keep_length($dec_version_2,0,2);
|
||
|
||
$version=$dec_version_0.".".$dec_version_1.".".$dec_version_2;
|
||
$color_version="#0000FF";
|
||
if($DEBUG)echo "<br>version=$version";
|
||
|
||
//״̬
|
||
$syn_state_bin=substr($bin_mes,($syn_bgn_byt+5)*8,8);
|
||
$syn_state_dec=BinDec($syn_state_bin);
|
||
if($DEBUG)echo "<br>syn_state_dec=$syn_state_dec";
|
||
|
||
//shmnum
|
||
$shmnum_hex=substr($hex_mes,($syn_bgn_byt+6)*2,2);
|
||
$shmnum_dec=HexDec($shmnum_hex);
|
||
|
||
//shmid
|
||
$shmid_hex=substr($hex_mes,($syn_bgn_byt+7)*2,2);
|
||
$shmid_dec=HexDec($shmid_hex);
|
||
|
||
//Init progress
|
||
$init_hex=substr($hex_mes,($syn_bgn_byt+8)*2,2);
|
||
$init_dec=HexDec($init_hex);
|
||
$initPro=$init_dec."%";
|
||
|
||
//Init progress
|
||
$init_hex=substr($hex_mes,($syn_bgn_byt+8)*2,2);
|
||
$init_dec=HexDec($init_hex);
|
||
|
||
//time
|
||
$time_hex=substr($hex_mes,($syn_bgn_byt+9)*2,2);
|
||
$time_dec=HexDec($time_hex);
|
||
|
||
if($mod_type==7)
|
||
{
|
||
if(!$showDatasync)
|
||
{
|
||
echo "<br><font size='2'>$strNotInstalled</font>";
|
||
exit();
|
||
}
|
||
?>
|
||
<p></p>
|
||
<table border="0" width="100%" cellpadding="0" cellspacing="1">
|
||
<tr><td><p align="center"><font color="#0000FF" size="2">
|
||
<?php
|
||
echo "DATA SYNCHRONIZATION</font>";
|
||
echo "( $strVersion:";
|
||
echo "<font color=\"#0000FF\">$version</font>";
|
||
echo ", ";
|
||
echo " $strStatus:";
|
||
if($syn_state_dec<5){
|
||
echo "<font color={$defineSyncStatus[$syn_state_dec][color]}>{$defineSyncStatus[$syn_state_dec][remark]}</font>";
|
||
}else{
|
||
echo "<font color=\"#0000FF\">--</font>";
|
||
}
|
||
echo ", ";
|
||
echo "$strRefreshTime:";
|
||
echo "<font color=\"$color_refresh_time\">$refresh_time</font>";
|
||
echo " )";
|
||
?>
|
||
</p></td></tr>
|
||
</table>
|
||
<p></p>
|
||
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
|
||
<tr>
|
||
<td width="50%" bgcolor="#E6E6E6">SHM NUM</td>
|
||
<td width="50%"><?php echo "<font color=\"#0000FF\">$shmnum_dec</font>";?></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="50%" bgcolor="#E6E6E6">SHM ID</td>
|
||
<td width="50%">
|
||
<?php
|
||
echo "<font color=\"#0000FF\">$shmid_dec</font>";
|
||
?>
|
||
</td></tr>
|
||
<tr>
|
||
<td width="50%" bgcolor="#E6E6E6">Initialization progress</td>
|
||
<td width="50%">
|
||
<?php
|
||
if($sysType != 'MSC')
|
||
echo "<font color=\"#0000FF\">$initPro</font>";
|
||
else
|
||
echo "<font color=\"#000000\">--</font>";
|
||
?>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="50%" bgcolor="#E6E6E6">
|
||
Time(minutes)
|
||
</td>
|
||
<td width="50%">
|
||
<?php
|
||
if($sysType != 'MSC')
|
||
echo "<font color=\"#0000FF\">$time_dec</font>";
|
||
else
|
||
echo "<font color=\"#000000\">--</font>";
|
||
?>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<?php
|
||
}//end if($mod_type==7)
|
||
|
||
/************************************basic status************************************/
|
||
$res_bgn_byt=$syn_bgn_byt+4+$syn_len_dec;
|
||
$res_len_bin=substr($bin_mes,$res_bgn_byt*8,16);//basic status<75><73>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD>
|
||
$res_len_dec=BinDec($res_len_bin);
|
||
|
||
$basic_bgn_byt=$res_bgn_byt+4+$res_len_dec;
|
||
$basic_len_bin=substr($bin_mes,$basic_bgn_byt*8,16);//basic status<75><73>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD>
|
||
$basic_len_dec=BinDec($basic_len_bin);
|
||
if($DEBUG)echo "<br>basic_len_dec=$basic_len_dec";
|
||
if($basic_len_dec > 0){
|
||
$showbasic = 1;
|
||
}
|
||
|
||
//cpu loading
|
||
$bin_cpu_0=substr($bin_mes,($basic_bgn_byt+2)*8,16);
|
||
$dec_cpu_0=BinDec($bin_cpu_0);
|
||
$dec_cpu_0=1000-$dec_cpu_0;
|
||
if($dec_cpu_0<0){
|
||
$dec_cpu_0=0;
|
||
}elseif($dec_cpu_0>1000){
|
||
$dec_cpu_0=1000;
|
||
}
|
||
if($dec_cpu_0>900){
|
||
$color_cpu_loading="#FF0000";
|
||
$no_sys_status=1;
|
||
}else{
|
||
$color_cpu_loading="#0000FF";
|
||
}
|
||
$cpu_loading=($dec_cpu_0/10)."%";
|
||
if($DEBUG)echo "<br>cpu_loading=$cpu_loading";
|
||
|
||
//uptime
|
||
$uptime_hex=substr($hex_mes,($basic_bgn_byt+4)*2,8);
|
||
$uptime_dec=HexDec($uptime_hex);
|
||
$uptime=date("Y-m-d H:i:s",$uptime_dec);
|
||
|
||
//total memory
|
||
$total_memory_hex=substr($hex_mes,($basic_bgn_byt+8)*2,8);
|
||
$total_memory_dec=HexDec($total_memory_hex);
|
||
if($DEBUG)echo "<br>total_memory_dec=$total_memory_dec";
|
||
|
||
//free memory
|
||
$free_memory_hex=substr($hex_mes,($basic_bgn_byt+12)*2,8);
|
||
$free_memory_dec=HexDec($free_memory_hex);
|
||
if($DEBUG)echo "<br>free_memory_dec=$free_memory_dec";
|
||
|
||
$memoryRate=($free_memory_dec/$total_memory_dec)*100;
|
||
$memoryRate=number_format($memoryRate, 2, '.', '');
|
||
$memory=$free_memory_dec." / ".$total_memory_dec." ".$memoryRate."%";
|
||
if($free_memory_dec*10<$total_memory_dec){
|
||
$color_memory="#FF0000";
|
||
}else{
|
||
$color_memory="#0000FF";
|
||
}
|
||
if($DEBUG)echo "<br>memory=$memory";
|
||
|
||
//total disk space
|
||
$total_disk_hex=substr($hex_mes,($basic_bgn_byt+16)*2,8);
|
||
$total_disk_dec=HexDec($total_disk_hex);
|
||
if($DEBUG)echo "<br>total_disk_dec=$total_disk_dec";
|
||
|
||
//free disk space
|
||
$free_disk_hex=substr($hex_mes,($basic_bgn_byt+20)*2,8);
|
||
$free_disk_dec=HexDec($free_disk_hex);
|
||
if($DEBUG)echo "<br>free_disk_dec=$free_disk_dec";
|
||
|
||
$diskRate=($free_disk_dec/$total_disk_dec)*100;
|
||
$diskRate=number_format($diskRate, 2, '.', '');
|
||
$disk=$free_disk_dec." / ".$total_disk_dec." ".$diskRate."%";
|
||
if($free_disk_dec*10<$total_disk_dec){
|
||
$color_disk="#FF0000";
|
||
$no_sys_status=1;
|
||
}else{
|
||
$color_disk="#0000FF";
|
||
}
|
||
if($DEBUG)echo "<br>disk=$memory";
|
||
|
||
/*******************
|
||
server send heartbeat
|
||
********************/
|
||
if($DEBUG)echo "<br>sysType=$sysType";
|
||
$sysTypeNo=omc_sys_type2code($sysType);
|
||
$sysSubNum=get_subsys_total($sysType);
|
||
$sysNo=floor($subSysNo/$sysSubNum);
|
||
$subSysNo=$subSysNo%$sysSubNum;
|
||
|
||
$showId=$sysType."_".$sysNo."_".$subSysNo;
|
||
|
||
$sel_mes_sql="SELECT detailStat,updateTime FROM $sysStat_table
|
||
WHERE
|
||
sysTypeNo='$sysTypeNo' AND sysNo='$sysNo' AND subSysNo='$subSysNo'
|
||
";
|
||
if($DEBUG)echo "<br>sel_mes_sql=$sel_mes_sql";
|
||
$sel_mes_res=mysqli_query($pubConn,$sel_mes_sql);
|
||
$sel_mes_row=@mysqli_fetch_array($sel_mes_res);
|
||
echo "<br>";
|
||
echo mysqli_error($pubConn);
|
||
|
||
if(!$sel_mes_row)
|
||
{
|
||
echo "<br><font size='2'>$strNotInstalled</font>";
|
||
exit();
|
||
}
|
||
|
||
$refresh_time=$sel_mes_row[updateTime];
|
||
if($refresh_time > $due_date && $refresh_time < $ove_date)
|
||
{
|
||
$color_refresh_time="#0000FF";
|
||
}
|
||
else
|
||
{
|
||
$no_sys_status=1;
|
||
$color_refresh_time="#FF0000";
|
||
}
|
||
|
||
$hex_mes=$sel_mes_row[detailStat];
|
||
$bin_mes='';
|
||
for($i=0;$i<strlen($hex_mes);$i++)
|
||
{
|
||
$sig_hex_mes=substr($hex_mes,$i,1);
|
||
$sig_dec_mes=HexDec($sig_hex_mes);
|
||
$sig_bin_mes=DecBin($sig_dec_mes);
|
||
$sig_bin_mes=omc_keep_length($sig_bin_mes,0,4);
|
||
$bin_mes.=$sig_bin_mes;
|
||
}
|
||
if($DEBUG)echo "<br>bin_mes=$bin_mes";
|
||
|
||
|
||
if($sysType=='EMS')
|
||
{
|
||
//begin bit
|
||
$verBgn = 23;//version
|
||
$sta_bgn=26;
|
||
$sync_bgn=46;
|
||
$num_bgn=66;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ
|
||
$pro_bgn=67;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
|
||
|
||
|
||
//main server status
|
||
$hex_sta=substr($hex_mes,$sta_bgn*2,2);
|
||
$dec_sta=HexDec($hex_sta);
|
||
|
||
if($defineSyncStatus[$syn_state_dec][remark]=='Init')
|
||
{
|
||
$dec_sta=1;
|
||
}
|
||
$defineServerState=array(
|
||
array('num'=> '0', 'remark' => 'Offline', 'color' => '#0000FF'),
|
||
array('num'=> '1', 'remark' => 'Init', 'color' => '#0000FF'),
|
||
array('num'=> '2', 'remark' => 'Detect', 'color' => '#0000FF'),
|
||
array('num'=> '3', 'remark' => 'Slave', 'color' => '#0000FF'),
|
||
array('num'=> '4', 'remark' => 'Sync', 'color' => '#0000FF'),
|
||
array('num'=> '5', 'remark' => 'Master', 'color' => '#0000FF'),
|
||
array('num'=> '6', 'remark' => 'Degrade', 'color' => '#0000FF'),
|
||
array('num'=> '7', 'remark' => 'Single', 'color' => '#0000FF')
|
||
);
|
||
|
||
//sync information
|
||
$arrSyncInfor[0]="First master log_file number";
|
||
$arrSyncInfor[1]="Last master log_file number";
|
||
$arrSyncInfor[2]="Master log position";
|
||
$arrSyncInfor[3]="Slave log_file number";
|
||
$arrSyncInfor[4]="Slave log position";
|
||
for($i=0;$i<5;$i++)
|
||
{
|
||
$hex_sync=substr($hex_mes,$sync_bgn*2+$i*8,8);
|
||
$dec_sync[$i]=HexDec($hex_sync);
|
||
if($DEBUG)echo "<br>dec_sync[$i]=$dec_sync[$i]";
|
||
}
|
||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ
|
||
$hex_pro_num=substr($hex_mes,$num_bgn*2,2);
|
||
$pro_num=HexDec($hex_pro_num);
|
||
if($DEBUG) echo "<br>dec_pro_num=$pro_num";
|
||
|
||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC>ÿ<EFBFBD><C3BF>byte<74><65>ʾһ<CABE><D2BB><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD>״̬ <20><>0=δ<><CEB4><EFBFBD>У<EFBFBD>1=<3D><><EFBFBD><EFBFBD><EFBFBD>ӽ<EFBFBD><D3BD><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>У<EFBFBD>2=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,3=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϲ<EFBFBD><CFB2><EFBFBD><EFBFBD>иý<D0B8><C3BD>̣<EFBFBD>
|
||
$array_proc_status=array(
|
||
array('num'=> '0','remark' => 'stopped', 'color' => '#FF0000'),
|
||
array('num'=> '1','remark' => 'working', 'color' => '#0000FF'),
|
||
array('num'=> '2','remark' => 'suspended', 'color' => '#FF0000')
|
||
);
|
||
for($i=0;$i<$pro_num;$i++)
|
||
{
|
||
${hex_process_.$i}=substr($hex_mes,$pro_bgn*2+$i*2,2);
|
||
${dec_process_.$i}=HexDec(${hex_process_.$i});
|
||
if($DEBUG)echo "<br>dec_process_$i=${dec_process_.$i}";
|
||
if(${dec_process_.$i} < 1){
|
||
$no_sys_status=1;
|
||
}
|
||
}
|
||
|
||
//Version Information
|
||
$hex_version_0=substr($hex_mes,($verBgn)*2,2);
|
||
$dec_version_0=HexDec($hex_version_0);
|
||
|
||
$hex_version_1=substr($hex_mes,($verBgn)*2+2,2);
|
||
$dec_version_1=HexDec($hex_version_1);
|
||
$dec_version_1=omc_keep_length($dec_version_1,0,2);
|
||
|
||
$hex_version_2=substr($hex_mes,($verBgn)*2+4,2);
|
||
$dec_version_2=HexDec($hex_version_2);
|
||
$dec_version_2=omc_keep_length($dec_version_2,0,2);
|
||
|
||
$version=$dec_version_0.".".$dec_version_1.".".$dec_version_2;
|
||
$color_version="#0000FF";
|
||
if($DEBUG)echo "<br>version=$version";
|
||
|
||
|
||
$array_display_proc=array(
|
||
array('num'=>'0', 'remark'=>'mysqld', 'proc_status'=>$array_proc_status[$dec_process_0][remark], 'proc_color'=>$array_proc_status[$dec_process_0][color], 'run'=>'Y'),
|
||
array('num'=>'1', 'remark'=>'httpd', 'proc_status'=>$array_proc_status[$dec_process_1][remark], 'proc_color'=>$array_proc_status[$dec_process_1][color], 'run'=>'Y'),
|
||
array('num'=>'2', 'remark'=>'omcMain', 'proc_status'=>$array_proc_status[$dec_process_2][remark], 'proc_color'=>$array_proc_status[$dec_process_2][color], 'run'=>'Y'),
|
||
array('num'=>'3', 'remark'=>'iptrans', 'proc_status'=>$array_proc_status[$dec_process_3][remark], 'proc_color'=>$array_proc_status[$dec_process_3][color], 'run'=>'Y'),
|
||
array('num'=>'4', 'remark'=>'paraComm', 'proc_status'=>$array_proc_status[$dec_process_4][remark], 'proc_color'=>$array_proc_status[$dec_process_4][color], 'run'=>'Y'),
|
||
array('num'=>'5', 'remark'=>'subsComm', 'proc_status'=>$array_proc_status[$dec_process_5][remark], 'proc_color'=>$array_proc_status[$dec_process_5][color], 'run'=>'Y'),
|
||
array('num'=>'6', 'remark'=>'logCollector', 'proc_status'=>$array_proc_status[$dec_process_6][remark], 'proc_color'=>$array_proc_status[$dec_process_6][color], 'run'=>'Y'),
|
||
array('num'=>'7', 'remark'=>'omcCleaner', 'proc_status'=>$array_proc_status[$dec_process_7][remark], 'proc_color'=>$array_proc_status[$dec_process_7][color], 'run'=>'N'),
|
||
array('num'=>'8','remark'=>'smcli', 'proc_status'=>$array_proc_status[$dec_process_8][remark], 'proc_color'=>$array_proc_status[$dec_process_8][color], 'run'=>'Y'),
|
||
array('num'=>'9','remark'=>'cdrColletor', 'proc_status'=>$array_proc_status[$dec_process_9][remark], 'proc_color'=>$array_proc_status[$dec_process_9][color], 'run'=>'Y'),
|
||
array('num'=>'10','remark'=>'subsDataBackup', 'proc_status'=>$array_proc_status[$dec_process_10][remark], 'proc_color'=>$array_proc_status[$dec_process_10][color], 'run'=>'Y'),
|
||
array('num'=>'11','remark'=>'ftpSend', 'proc_status'=>$array_proc_status[$dec_process_11][remark], 'proc_color'=>$array_proc_status[$dec_process_11][color], 'run'=>'Y'),
|
||
array('num'=>'12','remark'=>'alarmAgent', 'proc_status'=>$array_proc_status[$dec_process_12][remark], 'proc_color'=>$array_proc_status[$dec_process_12][color], 'run'=>'Y'),
|
||
array('num'=>'13','remark'=>'nrtrde', 'proc_status'=>$array_proc_status[$dec_process_13][remark], 'proc_color'=>$array_proc_status[$dec_process_13][color], 'run'=>'Y'),
|
||
array('num'=>'14','remark'=>'sftpSend', 'proc_status'=>$array_proc_status[$dec_process_14][remark], 'proc_color'=>$array_proc_status[$dec_process_14][color], 'run'=>'Y'),
|
||
|
||
);
|
||
|
||
|
||
}
|
||
elseif($sysType=='HLR' || $sysType=='SMSC')
|
||
{
|
||
//echo "sysType=$sysType<br>";
|
||
//begin bit
|
||
|
||
$ver_bgn = 23; //version
|
||
$sta_bgn = 26; //hlr state
|
||
$lcn_bgn = 31; //license user
|
||
$real_bgn = 35; //real user
|
||
$snum_bgn = 39; //serial number
|
||
|
||
//version
|
||
$bin_ver_0=substr($bin_mes,$ver_bgn*8,8);
|
||
$dec_ver_0=BinDec($bin_ver_0);
|
||
|
||
$bin_ver_1=substr($bin_mes,($ver_bgn+1)*8,8);
|
||
$dec_ver_1=BinDec($bin_ver_1);
|
||
$dec_ver_1=omc_keep_length($dec_ver_1,0,2);
|
||
|
||
$bin_ver_2=substr($bin_mes,($ver_bgn+2)*8,8);
|
||
$dec_ver_2=BinDec($bin_ver_2);
|
||
$dec_ver_2=omc_keep_length($dec_ver_2,0,2);
|
||
|
||
$version=$dec_ver_0.".".$dec_ver_1.".".$dec_ver_2;
|
||
$color_version="#0000FF";
|
||
if($DEBUG)echo "<br>version=$version";
|
||
|
||
//main server status
|
||
$bin_sta=substr($bin_mes,$sta_bgn*8,8);
|
||
$dec_sta=BinDec($bin_sta);
|
||
if($defineSyncStatus[$syn_state_dec][remark]=='Init'){
|
||
$dec_sta=2;
|
||
}
|
||
if($dec_sta==4){
|
||
$color_stoped="#FF0000";
|
||
$no_sys_status=1;
|
||
}
|
||
else{
|
||
$color_stoped="#0000FF";
|
||
}
|
||
|
||
$defineServerState=array(
|
||
array('num'=> '0', 'remark' => $strNormal, 'color' => '#0000FF'),
|
||
array('num'=> '1', 'remark' => $strRestart, 'color' => '#ff8c00'),
|
||
array('num'=> '2', 'remark' => $strInitialize, 'color' => '#ff8c00'),
|
||
array('num'=> '3', 'remark' => $strSuspend, 'color' => '#ff8c00'),
|
||
array('num'=> '4', 'remark' => $strStop, 'color' => $color_stoped)
|
||
);
|
||
|
||
$hex_lcn=substr($hex_mes,$lcn_bgn*2,8);
|
||
$lcnNum=HexDec($hex_lcn);
|
||
|
||
$hex_real=substr($hex_mes,$real_bgn*2,8);
|
||
$realNum=HexDec($hex_real);
|
||
|
||
|
||
|
||
$serialNum = $srlArr[1][$sysNo][number];
|
||
}elseif($sysType=='AAS')
|
||
{
|
||
//echo "sysType=$sysType<br>";
|
||
//begin bit
|
||
|
||
$alarmComp_bgn = 14;// alarm component
|
||
$alarmCode_bgn = 16;// alarm code
|
||
$ver_bgn = 23; //version
|
||
$sta_bgn = 26; //hlr state
|
||
$lcn_bgn = 31; //license user
|
||
$real_bgn = 35; //real user
|
||
$snum_bgn = 39; //serial number
|
||
|
||
$bin_alarmComp=substr($bin_mes,$alarmComp_bgn*8,16);
|
||
$dec_alarmComp=BinDec($bin_alarmComp);
|
||
|
||
$bin_alarmCode=substr($bin_mes,$alarmCode_bgn*8,8);
|
||
$dec_alarmCode=BinDec($bin_alarmCode);
|
||
if($dec_alarmComp==1&&$dec_alarmCode==1)
|
||
$biccAlarm=1;
|
||
|
||
//version
|
||
$bin_ver_0=substr($bin_mes,$ver_bgn*8,8);
|
||
$dec_ver_0=BinDec($bin_ver_0);
|
||
|
||
$bin_ver_1=substr($bin_mes,($ver_bgn+1)*8,8);
|
||
$dec_ver_1=BinDec($bin_ver_1);
|
||
$dec_ver_1=omc_keep_length($dec_ver_1,0,2);
|
||
|
||
$bin_ver_2=substr($bin_mes,($ver_bgn+2)*8,8);
|
||
$dec_ver_2=BinDec($bin_ver_2);
|
||
$dec_ver_2=omc_keep_length($dec_ver_2,0,2);
|
||
|
||
$version=$dec_ver_0.".".$dec_ver_1.".".$dec_ver_2;
|
||
$color_version="#0000FF";
|
||
if($DEBUG)echo "<br>version=$version";
|
||
|
||
//main server status
|
||
$bin_sta=substr($bin_mes,$sta_bgn*8,8);
|
||
$dec_sta=BinDec($bin_sta);
|
||
if($defineSyncStatus[$syn_state_dec][remark]=='Init'){
|
||
$dec_sta=2;
|
||
}
|
||
if($dec_sta==4){
|
||
$color_stoped="#FF0000";
|
||
$no_sys_status=1;
|
||
}
|
||
else{
|
||
$color_stoped="#0000FF";
|
||
}
|
||
|
||
$defineServerState=array(
|
||
array('num'=> '0', 'remark' => $strNormal, 'color' => '#0000FF'),
|
||
array('num'=> '1', 'remark' => $strRestart, 'color' => '#ff8c00'),
|
||
array('num'=> '2', 'remark' => $strInitialize, 'color' => '#ff8c00'),
|
||
array('num'=> '3', 'remark' => $strSuspend, 'color' => '#ff8c00'),
|
||
array('num'=> '4', 'remark' => $strStop, 'color' => $color_stoped)
|
||
);
|
||
|
||
$hex_lcn=substr($hex_mes,$lcn_bgn*2,8);
|
||
$lcnNum=HexDec($hex_lcn);
|
||
|
||
$hex_real=substr($hex_mes,$real_bgn*2,8);
|
||
$realNum=HexDec($hex_real);
|
||
|
||
|
||
|
||
$serialNum = $srlArr[5][$sysNo][number];
|
||
}elseif($sysType=='AUC' || $sysType=='EIR'){
|
||
//begin bit
|
||
$mas_bgn = 26; //main master
|
||
$ver_bgn = 23; //version information
|
||
$snum = 39; //serial number
|
||
|
||
$lcn_bgn = 31; //license user
|
||
$real_bgn = 35; //real user
|
||
$hex_lcn=substr($hex_mes,$lcn_bgn*2,8);
|
||
$lcnNum=HexDec($hex_lcn);
|
||
$hex_real=substr($hex_mes,$real_bgn*2,8);
|
||
$realNum=HexDec($hex_real);
|
||
|
||
//whether master or not(0/1=Y/N)
|
||
$bin_if_master=substr($bin_mes,$mas_bgn*8,1);
|
||
$dec_if_master=BinDec($bin_if_master);
|
||
if($DEBUG)echo "<br>dec_if_master=$dec_if_master";
|
||
|
||
//bit5-3:main server status(0/1/2/3/4=restart/initialize/normal/suspend/stop)
|
||
$bin_main_server_status=substr($bin_mes,$mas_bgn*8+2,3);
|
||
$dec_sta=BinDec($bin_main_server_status);
|
||
if($DEBUG)echo "<br>dec_sta=$dec_sta";
|
||
if($defineSyncStatus[$syn_state_dec][remark]=='Init')
|
||
{
|
||
$dec_sta=1;
|
||
}
|
||
|
||
if($dec_if_master==0 && $dec_sta==4){
|
||
$color_stoped="#FF0000";
|
||
$no_sys_status=1;
|
||
}
|
||
else
|
||
{
|
||
$color_stoped="#0000FF";
|
||
}
|
||
|
||
$defineServerState=array(
|
||
array('num'=> '0','remark' => $strRestart, 'color' => '#ff8c00'),
|
||
array('num'=> '1','remark' => $strInitialize, 'color' => '#ff8c00'),
|
||
array('num'=> '2','remark' => $strNormal, 'color' => '#0000FF'),
|
||
array('num'=> '3','remark' => $strPause, 'color' => '#ff8c00'),
|
||
array('num'=> '4','remark' => $strStop, 'color' => $color_stoped)
|
||
);
|
||
|
||
//Version Information
|
||
$hex_version_0=substr($hex_mes,$ver_bgn*2,2);
|
||
$dec_version_0=HexDec($hex_version_0);
|
||
|
||
$hex_version_1=substr($hex_mes,$ver_bgn*2+2,2);
|
||
$dec_version_1=HexDec($hex_version_1);
|
||
$dec_version_1=omc_keep_length($dec_version_1,0,2);
|
||
|
||
$hex_version_2=substr($hex_mes,$ver_bgn*2+4,2);
|
||
$dec_version_2=HexDec($hex_version_2);
|
||
$dec_version_2=omc_keep_length($dec_version_2,0,2);
|
||
|
||
$version=$dec_version_0.".".$dec_version_1.".".$dec_version_2;
|
||
$color_version="#0000FF";
|
||
if($DEBUG)echo "<br>version=$version";
|
||
|
||
|
||
if($sysType == 'AUC')
|
||
$serialNum = $srlArr[2][$sysNo][number];
|
||
else
|
||
$serialNum = $srlArr[4][$sysNo][number];
|
||
|
||
}
|
||
elseif($sysType=='PPS')
|
||
{
|
||
//begin bit
|
||
$ver_bgn = 23; //version
|
||
$sta_bgn = 26; //pps state
|
||
$lcn_bgn = 31; //licensed users
|
||
$real_bgn = 35; //real users
|
||
$snum_bgn = 39; //serial number
|
||
|
||
//version
|
||
$hex_ver_0=substr($hex_mes,$ver_bgn*2,2);
|
||
$dec_ver_0=HexDec($hex_ver_0);
|
||
|
||
$hex_ver_1=substr($hex_mes,($ver_bgn+1)*2,2);
|
||
$dec_ver_1=HexDec($hex_ver_1);
|
||
$dec_ver_1=omc_keep_length($dec_ver_1,0,2);
|
||
|
||
$hex_ver_2=substr($hex_mes,($ver_bgn+2)*2,2);
|
||
$dec_ver_2=HexDec($hex_ver_2);
|
||
$dec_ver_2=omc_keep_length($dec_ver_2,0,2);
|
||
|
||
$version=$dec_ver_0.".".$dec_ver_1.".".$dec_ver_2;
|
||
$color_version="#0000FF";
|
||
if($DEBUG)echo "<br>version=$version";
|
||
|
||
//main server status
|
||
$hex_sta=substr($hex_mes,$sta_bgn*2,2);
|
||
$dec_sta=HexDec($hex_sta);
|
||
if($DEBUG)echo "<br>dec_sta=$dec_sta";
|
||
if($defineSyncStatus[$syn_state_dec][remark]=='Init')
|
||
{
|
||
$dec_sta=2;
|
||
}
|
||
if($dec_sta==4)
|
||
{
|
||
$no_sys_status=1;
|
||
}
|
||
|
||
$defineServerState=array(
|
||
array('num'=> '0', 'remark' => $strNormal, 'color' => '#0000FF'),
|
||
array('num'=> '1', 'remark' => $strRestart, 'color' => '#ff8c00'),
|
||
array('num'=> '2', 'remark' => $strInitialize, 'color' => '#ff8c00'),
|
||
array('num'=> '3', 'remark' => $strSuspend, 'color' => '#ff8c00'),
|
||
array('num'=> '4', 'remark' => $strStop, 'color' => '#FF0000')
|
||
);
|
||
|
||
$hex_lcn=substr($hex_mes,$lcn_bgn*2,8);
|
||
$lcnNum=HexDec($hex_lcn);
|
||
|
||
$hex_real=substr($hex_mes,$real_bgn*2,8);
|
||
$realNum=HexDec($hex_real);
|
||
|
||
|
||
$serialNum = $srlArr[3][$sysNo][number];
|
||
}elseif($sysType=='VSS'){
|
||
$useSttArr = array(
|
||
array(num => '0', remark => '--', color => '#000000'),
|
||
array(num => '1', remark => 'Y', color => '#0000FF')
|
||
);
|
||
|
||
$linkSttArr = array(
|
||
array(num => '0', remark => 'N', color => '#FF0000'),
|
||
array(num => '1', remark => 'Y', color => '#0000FF'),
|
||
array(num => '2', remark => '--', color => '#000000')
|
||
);
|
||
|
||
$linkTypeArr = array(
|
||
array(num => '0', remark => 'E1', color => '#000000'),
|
||
array(num => '1', remark => 'T1', color => '#000000'),
|
||
array(num => '2', remark => '--', color => '#000000')
|
||
);
|
||
|
||
$voiceRuleArr = array(
|
||
array(num => '0', remark => 'A LAW', color => '#000000'),
|
||
array(num => '1', remark => 'MU LAW', color => '#000000')
|
||
);
|
||
|
||
$chnSttArr = array(
|
||
array(num => '0', remark => '--', color => '#000000'),
|
||
array(num => '1', remark => 'Y', color => '#0000FF')
|
||
);
|
||
|
||
$VSS_funcFlagArr = array(
|
||
array(num => '0', remark => 'None'),
|
||
array(num => '1', remark => 'VMS'),
|
||
array(num => '2', remark => 'AAS'),
|
||
array(num => '3', remark => 'VMS&AAS')
|
||
);
|
||
|
||
//begin byte
|
||
$ver_bgn = 23; //version
|
||
$ttl_box = 43; //total mailboxs
|
||
$ena_box = 47; //registered mailboxs
|
||
$act_box = 51; //active mailboxs
|
||
$ttl_vce = 55; //total voicemails
|
||
$ttl_sec = 59; //total seconds of voicemails
|
||
$avr_sec = 63; //average seconds of voicemails
|
||
$stt_e0 = 67; //E1 #0 status (bit 0: 0/1 not in used / in used; bit 1: 0/1 link not ok / link ok
|
||
// link type bit 2: 0/1 in E1/T1;voice rule bit 3: 0/1 in A LAW/MU LAW)
|
||
$stt_e1 = 68; //E1 #1 status
|
||
$chn_u0 = 69; //E1 #0 used channel
|
||
$chn_u1 = 70; //E1 #1 used channel
|
||
$chn_s0 = 71; //E1 #0 channel status (use a bit to indetify one channel)
|
||
$chn_s1 = 75; //E1 #1 channel status
|
||
$smpp_stat = 79; //smpp status
|
||
$func_flag = 80; //VSS function flag
|
||
|
||
//Field01:Version Information
|
||
$version_0=substr($hex_mes,($ver_bgn+0)*2,2);
|
||
$version_0=hexdec($version_0);
|
||
|
||
$version_1=substr($hex_mes,($ver_bgn+1)*2,2);
|
||
$version_1=omc_keep_length($version_1,0,2);
|
||
$version_1=hexdec($version_1);
|
||
|
||
$version_2=substr($hex_mes,($ver_bgn+2)*2,2);
|
||
$version_2=omc_keep_length($version_2,0,2);
|
||
$version_2=hexdec($version_2);
|
||
|
||
$version=$version_0.".".$version_1.".".$version_2;
|
||
|
||
$color_version="#0000FF";
|
||
if($DEBUG) echo "<br>version=$version";
|
||
|
||
//Field02:total mailboxs
|
||
$hexTotBox=substr($hex_mes,$ttl_box*2,8);
|
||
$totBox=HexDec($hexTotBox);
|
||
if($DEBUG)echo "<br>totBox=$totBox";
|
||
|
||
//Field03:$ena_box
|
||
$hexEnaBox=substr($hex_mes,$ena_box*2,8);
|
||
$enaBox=HexDec($hexEnaBox);
|
||
if($DEBUG)echo "<br>enaBox=$enaBox";
|
||
|
||
//Field04:$act_box
|
||
$hexActBox=substr($hex_mes,$act_box*2,8);
|
||
$actBox=HexDec($hexActBox);
|
||
if($DEBUG)echo "<br>actBox=$actBox";
|
||
|
||
//Field05:total voicemails
|
||
$hexTotVoi=substr($hex_mes,$ttl_vce*2,8);
|
||
$totVoi=HexDec($hexTotVoi);
|
||
if($DEBUG)echo "<br>totVoi=$totVoi";
|
||
|
||
//Field06:
|
||
$hexTtlVoi=substr($hex_mes,$ttl_sec*2,8);
|
||
$ttlVoi=HexDec($hexTtlVoi);
|
||
if($DEBUG)echo "<br>ttlVoi=$ttlVoi";
|
||
|
||
//Field07:
|
||
$hexAvrVoi=substr($hex_mes,$avr_sec*2,8);
|
||
$avrVoi=HexDec($hexAvrVoi);
|
||
if($DEBUG)echo "<br>avrVoi=$avrVoi";
|
||
|
||
//Field08 E1#0 status (bit 0: 0/1 not in used / in used; bit 1: 0/1 link not ok / link ok
|
||
//link type bit 2: 0/1 in E1/T1;voice rule bit 3: 0/1 in A LAW/MU LAW)
|
||
for($i=0;$i<4;$i++){
|
||
$binSttE0=substr($bin_mes,$stt_e0*8+7-$i,1);
|
||
$sttE0[$i]=BinDec($binSttE0);
|
||
if($DEBUG)echo "<br>sttE0[$i]=$sttE0[$i]";
|
||
}
|
||
|
||
if(!$sttE0[0]){
|
||
$sttE0[1] = 2;
|
||
$sttE0[2] = 2;
|
||
$sttE0[3] = 2;
|
||
}
|
||
|
||
//Field09 E1#1 status
|
||
for($i=0;$i<4;$i++){
|
||
$binSttE1=substr($bin_mes,$stt_e1*8+7-$i,1);
|
||
$sttE1[$i]=BinDec($binSttE1);
|
||
if($DEBUG)echo "<br>sttE1[$i]=$sttE1[$i]";
|
||
}
|
||
|
||
if(!$sttE1[0]){
|
||
$sttE1[1] = 2;
|
||
$sttE1[2] = 2;
|
||
$sttE1[3] = 2;
|
||
}
|
||
|
||
if(($sttE0[0] && !$sttE0[1]) || ($sttE1[0] && !$sttE1[1])){
|
||
$no_sys_status = 1;
|
||
}
|
||
|
||
//Field10 E1 #0 used channel
|
||
$hexChnU0=substr($hex_mes,$chn_u0*2,2);
|
||
$chnU0=HexDec($hexChnU0);
|
||
if(!$sttE0[0]){
|
||
$chnU0 = "--";
|
||
}
|
||
|
||
//Field11 E1 #1 used channel
|
||
$hexChnU1=substr($hex_mes,$chn_u1*2,2);
|
||
$chnU1=HexDec($hexChnU1);
|
||
if(!$sttE1[0]){
|
||
$chnU1 = "--";
|
||
}
|
||
|
||
//Field12 E1 #0 channel status (use a bit to indetify one channel)
|
||
for($i=0;$i<4;$i++){
|
||
for($j=0;$j<8;$j++){
|
||
$dstNum = $i*8+$j;
|
||
$binChnS0=substr($bin_mes,($chn_s0+$i)*8+7-$j,1);
|
||
$chnS0[$dstNum]=BinDec($binChnS0);
|
||
if($DEBUG)echo "<br>chnS0[$dstNum]={$chnS0[$dstNum]}";
|
||
}
|
||
}
|
||
|
||
//Field13 E1 #1 channel status (use a bit to indetify one channel)
|
||
for($i=0;$i<4;$i++){
|
||
for($j=0;$j<8;$j++){
|
||
$dstNum = $i*8+$j;
|
||
$binChnS1=substr($bin_mes,($chn_s1+$i)*8+7-$j,1);
|
||
$chnS1[$dstNum]=BinDec($binChnS1);
|
||
if($DEBUG)echo "<br>chnS1[$dstNum]={$chnS1[$dstNum]}";
|
||
}
|
||
}
|
||
|
||
//Field14 SMPP status(1bytes,smpp_stat):
|
||
$smppStat=substr($hex_mes,$smpp_stat*2,2);
|
||
if($DEBUG)echo "<br>smppStat=$smppStat";
|
||
|
||
$funcFlag=hexdec(substr($hex_mes,$func_flag*2,2));
|
||
if($DEBUG)echo "<br>funcFlag=$funcFlag";
|
||
|
||
$serialNum = $srlArr[5][$sysNo][number];
|
||
// if($smppStat < 1){
|
||
// $no_sys_status = 1;
|
||
// }
|
||
}elseif($sysType=='MSC' || $sysType=='SN'){
|
||
|
||
//begin bit
|
||
$lcn_bgn = 31; //license user
|
||
$real_bgn = 35; //real user
|
||
$hex_lcn=substr($hex_mes,$lcn_bgn*2,8);
|
||
$lcnNum=HexDec($hex_lcn);
|
||
$hex_real=substr($hex_mes,$real_bgn*2,8);
|
||
$realNum=HexDec($hex_real);
|
||
$msc_bgn_byt=21;
|
||
$msc_len_hex=substr($hex_mes,$msc_bgn_byt*2,4);//msc length
|
||
$msc_len_dec=HexDec($msc_len_hex);
|
||
if($DEBUG)echo "<br>msc_len_dec=$msc_len_dec";
|
||
|
||
//Field01(3bytes,18-20):Version Information
|
||
$version_0=substr($hex_mes,($msc_bgn_byt+2)*2,2);
|
||
$version_0=hexdec($version_0);
|
||
|
||
$version_1=substr($hex_mes,($msc_bgn_byt+3)*2,2);
|
||
$version_1=omc_keep_length($version_1,0,2);
|
||
$version_1=hexdec($version_1);
|
||
|
||
$version_2=substr($hex_mes,($msc_bgn_byt+4)*2,2);
|
||
$version_2=omc_keep_length($version_2,0,2);
|
||
$version_2=hexdec($version_2);
|
||
|
||
$version=$version_0.".".$version_1.".".$version_2;
|
||
$color_version="#0000FF";
|
||
if($DEBUG) echo "<br>version=$version";
|
||
|
||
//main server status<75><73>0/1/2/3/4=normal/restart/initialize/suspend/stop<6F><70>
|
||
$hex_sta=substr($hex_mes,($msc_bgn_byt+5)*2,2);
|
||
$dec_sta=HexDec($hex_sta);
|
||
if($DEBUG)echo "<br>dec_sta=$dec_sta";
|
||
if($defineSyncStatus[$syn_state_dec][remark]=='Init'){
|
||
$dec_sta=2;
|
||
}
|
||
if($dec_sta==4){
|
||
$no_sys_status=1;
|
||
}
|
||
|
||
$defineServerState=array(
|
||
array('num'=> '0','remark' => $strNormal, 'color' => '#0000FF'),
|
||
array('num'=> '1','remark' => $strRestart, 'color' => '#ff8c00'),
|
||
array('num'=> '2','remark' => $strInitialize, 'color' => '#ff8c00'),
|
||
array('num'=> '3','remark' => $strSuspend, 'color' => '#ff8c00'),
|
||
array('num'=> '4','remark' => $strStop, 'color' => '#FF0000'),
|
||
array('num'=> '5','remark' => $strWait, 'color' => '#ff8c00'),
|
||
array('num'=> '6','remark' => $strSingle, 'color' => '#0000FF')
|
||
);
|
||
|
||
//E1 status
|
||
$arrayDefineStatus=array(
|
||
array('num'=> '0','remark' => 'TUP', 'color' => '#0000FF'),
|
||
array('num'=> '1','remark' => 'ISUP', 'color' => '#0000FF'),
|
||
array('num'=> '2','remark' => 'AIF', 'color' => '#0000FF'),
|
||
array('num'=> '3','remark' => 'ISDN NT', 'color' => '#0000FF'),
|
||
array('num'=> '4','remark' => 'ISDN LT', 'color' => '#0000FF'),
|
||
array('num'=> '5','remark' => 'Error', 'color' => '#FF0000'),
|
||
array('num'=> '6','remark' => 'Error', 'color' => '#FF0000'),
|
||
array('num'=> '7','remark' => '--', 'color' => '#000000')
|
||
);
|
||
|
||
if($no_sys_status)
|
||
{
|
||
$color_sys_status="#FF0000";
|
||
$sys_status="Error";
|
||
}
|
||
else
|
||
{
|
||
$color_sys_status="#0000FF";
|
||
$sys_status="Normal";
|
||
}
|
||
|
||
/****************VLR heartbeat***************/
|
||
$showVlrId="VLR_".$sysNo."_".$subSysNo;
|
||
$vlr_bgn_byt=$msc_bgn_byt+4+$msc_len_dec;
|
||
if($DEBUG)echo "<br>vlr_bgn_byt=$vlr_bgn_byt";
|
||
$vlr_len_hex=substr($hex_mes,$vlr_bgn_byt*2,4);//vlr length
|
||
$vlr_len_dec=HexDec($vlr_len_hex);
|
||
if($DEBUG)echo "<br>vlr_len_dec=$vlr_len_dec";
|
||
if($vlr_len_dec==0)
|
||
{
|
||
$noShowVlr=1;
|
||
}
|
||
//Field01:Version Information
|
||
$vlr_version_0=substr($hex_mes,($vlr_bgn_byt+2)*2,2);
|
||
$vlr_version_0=hexdec($vlr_version_0);
|
||
|
||
$vlr_version_1=substr($hex_mes,($vlr_bgn_byt+3)*2,2);
|
||
$vlr_version_1=hexdec($vlr_version_1);
|
||
$vlr_version_1=omc_keep_length($vlr_version_1,0,2);
|
||
|
||
$vlr_version_2=substr($hex_mes,($vlr_bgn_byt+4)*2,2);
|
||
$vlr_version_2=hexdec($vlr_version_2);
|
||
$vlr_version_2=omc_keep_length($vlr_version_2,0,2);
|
||
|
||
$vlr_version=$vlr_version_0.".".$vlr_version_1.".".$vlr_version_2;
|
||
$color_vlr_version="#0000FF";
|
||
if($DEBUG)echo "<br>vlr_version=$vlr_version";
|
||
|
||
//vlr status<75><73>/1/2/3/4=SearchVLR/Sync/Single/Dual/<2F><>
|
||
$hex_vlr_status=substr($hex_mes,($vlr_bgn_byt+5)*2,2);
|
||
$dec_vlr_status=HexDec($hex_vlr_status);
|
||
if($DEBUG)echo "<br>dec_vlr_status=$dec_vlr_status";
|
||
|
||
//VLR user number
|
||
$hex_vlr_num = substr($hex_mes,($vlr_bgn_byt+14)*2,8);
|
||
$dec_vlr_num = hexdec($hex_vlr_num);
|
||
if($DEBUG) echo "<br>dec_vlr_num = $dec_vlr_num";
|
||
|
||
$array_vlr_status=array(
|
||
array('num'=> '1','remark' => 'SearchVLR', 'color' => '#0000FF'),
|
||
array('num'=> '2','remark' => 'Sync', 'color' => '#0000FF'),
|
||
array('num'=> '3','remark' => 'Single', 'color' => '#0000FF'),
|
||
array('num'=> '4','remark' => 'Normal', 'color' => '#0000FF')
|
||
);
|
||
|
||
if($no_vlr_status){
|
||
$color_vlr_status="#FF0000";
|
||
$vlr_status="Error";
|
||
$no_sys_status = 1;
|
||
}
|
||
else{
|
||
$color_vlr_status="#0000FF";
|
||
$vlr_status="Normal";
|
||
}
|
||
$serialNum = $srlArr[4][$sysNo][number];
|
||
}
|
||
if($no_sys_status){
|
||
$color_sys_status="#FF0000";
|
||
$sys_status="Error";
|
||
}else{
|
||
$color_sys_status="#0000FF";
|
||
$sys_status="Normal";
|
||
}
|
||
|
||
if($mod_type==0){
|
||
if(!$showbasic){
|
||
echo "<br><font size='2'>$strNotInstalled</font>";
|
||
exit();
|
||
}
|
||
if($platStatus){
|
||
$showPlatRemark = "N";
|
||
$showPlatColor = "#FF0000";
|
||
}else{
|
||
$showPlatRemark = "Y";
|
||
$showPlatColor = "0000FF";
|
||
}
|
||
?>
|
||
|
||
<p></p>
|
||
<table border="0" width="100%" cellpadding="0" cellspacing="1">
|
||
<?php
|
||
echo "<tr>";
|
||
echo "<td>";
|
||
echo "<p align=\"right\"><a href=\"serverStatus.php?sys_id=all&showRange=$showRange&backpage=$backpage\" target=\"contents\"><img align=absBottom border=0 src=\"../../images/left.gif\" width=\"14\" height=\"14\">";
|
||
echo "$strBack</a></p>";
|
||
echo "</td>";
|
||
echo "</tr>";
|
||
?>
|
||
<tr><td><p align="center"><font color="#0000FF" size="2">
|
||
<?php
|
||
echo "$showId";
|
||
$sysAlias=omc_get_sysAlias($sysTypeNo,$sysNo,$subSysNo);
|
||
if($sysAlias!=-1)
|
||
{
|
||
echo " [$sysAlias]";
|
||
}
|
||
echo " $strStatusInformation</font>";
|
||
|
||
if($sysType=='HLR' || $sysType=='AUC' || $sysType=='EIR' || $sysType=='SMSC' || $sysType=='PPS' || $sysType=='VSS' || $sysType=='MSC' || $sysType=='EMS' || $sysType=='SN' || $sysType=='AAS')
|
||
{
|
||
echo "($strVersion:";
|
||
echo "<font color=\"#0000FF\">$version</font>";
|
||
echo ")";
|
||
}
|
||
?>
|
||
</p></td></tr>
|
||
</table>
|
||
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
|
||
<tr>
|
||
<td bgcolor="#E6E6E6" width="50%">
|
||
<nobr><font color="000000"><?php echo $strBasicStatus; ?></font></nobr>
|
||
</td>
|
||
<td bgcolor="#FFFFFF" width="50%"><nobr><font color="<?php echo $color_sys_status; ?>"><?php echo $sys_status; ?></font></nobr>
|
||
</td>
|
||
</tr>
|
||
<?php
|
||
if($sysType=='HLR' || $sysType=='AUC' || $sysType=='EIR' || $sysType=='PPS' || $sysType=='EMS' || $sysType=='MSC' || $sysType=='SN')
|
||
{
|
||
echo "<tr>";
|
||
echo "<td bgcolor=\"#E6E6E6\" width=\"50%\">
|
||
<nobr><font color=\"000000\">$strDualServerMode</font></nobr>";
|
||
echo "</td>";
|
||
echo "<td bgcolor=\"#FFFFFF\" width=\"50%\"><nobr><font color=\"{$defineServerState[$dec_sta][color]}\">{$defineServerState[$dec_sta][remark]} </font></nobr>";
|
||
echo "</td>";
|
||
echo "</tr>";
|
||
|
||
echo "<script LANGUAGE=\"JavaScript\">";
|
||
outputInnerHtml('input_serverState',$defineServerState[$dec_sta][remark],$defineServerState[$dec_sta][color]);
|
||
echo "\n</script>";
|
||
}
|
||
?>
|
||
<?php
|
||
echo "<script LANGUAGE=\"JavaScript\">";
|
||
outputInnerHtml('input_sys_status',$sys_status,$color_sys_status);
|
||
outputInnerHtml('input_refresh_time',$refresh_time,$color_refresh_time);
|
||
outputInnerHtml('input_memory',$memory,$color_memory);
|
||
outputInnerHtml('input_disk',$disk,$color_disk);
|
||
echo "\n</script>";
|
||
?>
|
||
<tr>
|
||
<td bgcolor="#E6E6E6" width="50%">
|
||
<nobr><font color="000000"><?php echo $strRefreshTime; ?></font></nobr>
|
||
</td>
|
||
<td bgcolor="#FFFFFF" width="50%">
|
||
<nobr><font color="<?php echo $color_refresh_time; ?>"><?php echo $refresh_time; ?></font></nobr>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td bgcolor="#E6E6E6" width="50%">
|
||
<nobr><font color="000000"><?php echo $strStartTime; ?></font></nobr>
|
||
</td>
|
||
<td bgcolor="#FFFFFF" width="50%">
|
||
<nobr><font color="#0000FF"><?php echo $uptime; ?></font></nobr>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td bgcolor="#E6E6E6" width="50%"><nobr><font color="000000"><?php echo "$strPhysicsMemory($strRemainAll)"; ?>(KB)</font></nobr></td>
|
||
<td bgcolor="#FFFFFF" width="50%"><nobr><font color="<?php echo $color_memory; ?>"><?php echo $memory; ?></font></nobr></td>
|
||
</tr>
|
||
<tr>
|
||
<td bgcolor="#E6E6E6" width="50%"><nobr><font color="000000"><?php echo "$strHardDiskSpace($strRemainAll)"; ?>(KB)</font></nobr></td>
|
||
<td bgcolor="#FFFFFF" width="50%"><nobr><font color="<?php echo $color_disk; ?>"><?php echo $disk; ?></font></nobr></td>
|
||
</tr>
|
||
<?php
|
||
if($sysType=='EMS')
|
||
{
|
||
for($i=0;$i<5;$i++)
|
||
{
|
||
echo "<tr>";
|
||
echo "<td bgcolor=\"#E6E6E6\" width=\"50%\">
|
||
<nobr><font color=\"000000\">$arrSyncInfor[$i]</font></nobr>";
|
||
echo "</td>";
|
||
echo "<td bgcolor=\"#FFFFFF\" width=\"50%\"><nobr><font color=\"#0000FF\">$dec_sync[$i]</font></nobr>";
|
||
echo "</td>";
|
||
echo "</tr>";
|
||
|
||
$ipArr[$i] = "input_dec_sync" . "_$i";
|
||
}
|
||
echo "<script LANGUAGE=\"JavaScript\">";
|
||
for($i=0;$i<5;$i++)
|
||
outputInnerHtml($ipArr[$i],$dec_sync[$i]);
|
||
echo "\n</script>";
|
||
}
|
||
if($sysType=='HLR' || $sysType=='PPS' || $sysType=='SMSC' || $sysType=='AUC' || $sysType=='MSC'){
|
||
echo "<tr>";
|
||
echo "<td bgcolor=\"#E6E6E6\" width=\"50%\">License</td>";
|
||
echo "<td width=\"50%\"><font color=\"#0000FF\">$lcnNum</font></td>";
|
||
echo "</tr>";
|
||
// if($sysType=='PPS'){
|
||
echo "<tr>";
|
||
echo "<td bgcolor=\"#E6E6E6\" width=\"50%\">Users</td>";
|
||
echo "<td width=\"50%\"><font color=\"#0000FF\">$realNum</font></td>";
|
||
echo "</tr>";
|
||
// }
|
||
echo "<script LANGUAGE=\"JavaScript\">";
|
||
outputInnerHtml('input_realNum',$realNum);
|
||
echo "</script>";
|
||
}
|
||
|
||
if($sysType=='HLR' || $sysType=='PPS' || $sysType=='AUC' || $sysType=='EIR'||$sysType=='VSS'|| $sysType=='MSC'||$sysType=='SMSC'){
|
||
echo "<tr>";
|
||
echo "<td bgcolor=\"#E6E6E6\" width=\"50%\">Serial number</td>";
|
||
echo "<td width=\"50%\"><font color=\"$ttlSrlClr\">$serialNum</font></td>";
|
||
echo "</tr>";
|
||
}
|
||
|
||
|
||
if($sysType=='VSS'){
|
||
echo "<tr>";
|
||
echo "<td bgcolor=\"#E6E6E6\" width=\"50%\">Total mailboxs</td>";
|
||
echo "<td width=\"50%\"><font color=\"#0000FF\">$totBox</font></td>";
|
||
echo "</tr>";
|
||
|
||
echo "<tr>";
|
||
echo "<td bgcolor=\"#E6E6E6\" width=\"50%\">Registered mailboxs</td>";
|
||
echo "<td width=\"50%\"><font color=\"#0000FF\">$enaBox</font></td>";
|
||
echo "</tr>";
|
||
|
||
echo "<tr>";
|
||
echo "<td bgcolor=\"#E6E6E6\" width=\"50%\">Active mailboxs</td>";
|
||
echo "<td width=\"50%\"><font color=\"#0000FF\">$actBox</font></td>";
|
||
echo "</tr>";
|
||
|
||
echo "<tr>";
|
||
echo "<td bgcolor=\"#E6E6E6\" width=\"50%\">Total voicemails</td>";
|
||
echo "<td width=\"50%\"><font color=\"#0000FF\">$totVoi</font></td>";
|
||
echo "</tr>";
|
||
|
||
echo "<tr>";
|
||
echo "<td bgcolor=\"#E6E6E6\" width=\"50%\">Total seconds of voicemails</td>";
|
||
echo "<td width=\"50%\"><font color=\"#0000FF\">$ttlVoi</font></td>";
|
||
echo "</tr>";
|
||
|
||
echo "<tr>";
|
||
echo "<td bgcolor=\"#E6E6E6\" width=\"50%\">Average seconds of voicemails</td>";
|
||
echo "<td width=\"50%\"><font color=\"#0000FF\">$avrVoi</font></td>";
|
||
echo "</tr>";
|
||
|
||
echo "<tr>";
|
||
echo "<td bgcolor=\"#E6E6E6\" width=\"50%\">SMPP state</td>";
|
||
if($smppStat > 0){
|
||
echo "<td width=\"50%\"><font color=\"#0000FF\">Established</font></td>";
|
||
}else{
|
||
echo "<td width=\"50%\"><font color=\"#0000FF\">Not established</font></td>";
|
||
}
|
||
echo "</tr>";
|
||
|
||
echo "<tr>";
|
||
echo "<td bgcolor=\"#E6E6E6\" width=\"50%\">VSS function flag</td>";
|
||
echo "<td width=\"50%\"><font color=\"#0000FF\">{$VSS_funcFlagArr[$funcFlag][remark]}</font></td>";
|
||
echo "</tr>";
|
||
|
||
echo "</table>";
|
||
|
||
echo "<p> </p>";
|
||
echo "<table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\" bgcolor=\"#FFFFFF\">";
|
||
echo "<tr bgcolor=\"#E6E6E6\" align=\"center\">";
|
||
echo "<td width=\"50%\" colspan=\"4\">{$linkTypeArr[$sttE0[2]][remark]} #0</td>";
|
||
echo "<td width=\"50%\" colspan=\"4\">{$linkTypeArr[$sttE1[2]][remark]} #1</td>";
|
||
echo "</tr>";
|
||
|
||
echo "<tr>";
|
||
echo "<td width=\"50%\" colspan=\"4\">Used flag: <font color=\"{$useSttArr[$sttE0[0]][color]}\">{$useSttArr[$sttE0[0]][remark]}</font>";
|
||
echo " Link status: <font color=\"{$linkSttArr[$sttE0[1]][color]}\">{$linkSttArr[$sttE0[1]][remark]}</font>";
|
||
echo " CH in used: <font color=\"0000FF\">$chnU0</font>";
|
||
echo " Voice rule: <font color=\"0000FF\">{$voiceRuleArr[$sttE0[3]][remark]}</font>";
|
||
|
||
echo "<td width=\"50%\" colspan=\"4\">Used flag: <font color=\"{$useSttArr[$sttE1[0]][color]}\">{$useSttArr[$sttE1[0]][remark]}</font>";
|
||
echo " Link status: <font color=\"{$linkSttArr[$sttE1[1]][color]}\">{$linkSttArr[$sttE1[1]][remark]}</font>";
|
||
echo " CH in used: <font color=\"0000FF\">$chnU1</font>";
|
||
echo " Voice rule: <font color=\"0000FF\">{$voiceRuleArr[$sttE1[3]][remark]}</font>";
|
||
echo "</tr>";
|
||
for($i=0;$i<16;$i++){
|
||
echo "<tr>";
|
||
for($j=0;$j<2;$j++){
|
||
$showNum = $j*16+$i;
|
||
echo "<td width=\"12.5\">";
|
||
echo omc_keep_length($showNum,0,2);
|
||
echo "</td>";
|
||
echo "<td width=\"12.5\">";
|
||
echo "<font color=\"{$chnSttArr[$chnS0[$showNum]][color]}\">{$chnSttArr[$chnS0[$showNum]][remark]}</font>";
|
||
echo "</td>";
|
||
}
|
||
for($j=0;$j<2;$j++){
|
||
$showNum = $j*16+$i;
|
||
echo "<td width=\"12.5\">";
|
||
echo omc_keep_length($showNum,0,2);
|
||
echo "</td>";
|
||
echo "<td width=\"12.5\">";
|
||
echo "<font color=\"{$chnSttArr[$chnS1[$showNum]][color]}\">{$chnSttArr[$chnS1[$showNum]][remark]}</font>";
|
||
echo "</td>";
|
||
}
|
||
echo "</tr>";
|
||
}
|
||
}
|
||
|
||
if($sysType=='AAS'){
|
||
echo "</TABLE>";
|
||
echo "<BR><BR>";
|
||
echo "<table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\" bgcolor=\"#FFFFFF\">";
|
||
if($biccAlarm==1){
|
||
echo "<tr bgcolor=\"#E6E6E6\" align=\"center\">";
|
||
echo "<td width=\"50%\" align=\"left\">Alarm</td>";
|
||
echo "<td width=\"50%\" align=\"left\"><FONT color=\"#FF0000\">BICC trunk not reachable</FONT></td>";
|
||
echo "</tr>";
|
||
}
|
||
|
||
/*
|
||
echo "<tr bgcolor=\"#E6E6E6\" align=\"center\">";
|
||
echo "<td width=\"50%\" colspan=\"4\">E1 #0</td>";
|
||
echo "<td width=\"50%\" colspan=\"4\">E1 #1</td>";
|
||
echo "</tr>";
|
||
|
||
echo "<tr>";
|
||
echo "<td width=\"50%\" colspan=\"4\">Used flag: <font color=\"{$useSttArr[$sttE0[0]][color]}\">{$useSttArr[$sttE0[0]][remark]}</font>";
|
||
echo " Link status: <font color=\"{$linkSttArr[$sttE0[1]][color]}\">{$linkSttArr[$sttE0[1]][remark]}</font>";
|
||
echo " CH in used: <font color=\"0000FF\">$chnU0</font>";
|
||
|
||
echo "<td width=\"50%\" colspan=\"4\">Used flag: <font color=\"{$useSttArr[$sttE1[0]][color]}\">{$useSttArr[$sttE1[0]][remark]}</font>";
|
||
echo " Link status: <font color=\"{$linkSttArr[$sttE1[1]][color]}\">{$linkSttArr[$sttE1[1]][remark]}</font>";
|
||
echo " CH in used: <font color=\"0000FF\">$chnU1</font>";
|
||
echo "</tr>";
|
||
for($i=0;$i<16;$i++){
|
||
echo "<tr>";
|
||
for($j=0;$j<2;$j++){
|
||
$showNum = $j*16+$i;
|
||
echo "<td width=\"12.5\">";
|
||
echo omc_keep_length($showNum,0,2);
|
||
echo "</td>";
|
||
echo "<td width=\"12.5\">";
|
||
echo "<font color=\"{$chnSttArr[$chnS0[$showNum]][color]}\">{$chnSttArr[$chnS0[$showNum]][remark]}</font>";
|
||
echo "</td>";
|
||
}
|
||
for($j=0;$j<2;$j++){
|
||
$showNum = $j*16+$i;
|
||
echo "<td width=\"12.5\">";
|
||
echo omc_keep_length($showNum,0,2);
|
||
echo "</td>";
|
||
echo "<td width=\"12.5\">";
|
||
echo "<font color=\"{$chnSttArr[$chnS1[$showNum]][color]}\">{$chnSttArr[$chnS1[$showNum]][remark]}</font>";
|
||
echo "</td>";
|
||
}
|
||
echo "</tr>";
|
||
}*/
|
||
}
|
||
|
||
echo "</table>";
|
||
if($sysType=='EMS')
|
||
{
|
||
echo "<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"1\">";
|
||
echo "<tr><td><p align=\"center\"><font color=\"#0000ff\" size=\"2\">$strProcessStatus</font></p></td></tr></table>";
|
||
echo "<table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\" bgcolor=\"#FFFFFF\">";
|
||
echo "<tr><td bgcolor=\"#E6E6E6\" width=\"25%\"><nobr><font color=\"000000\">$strProcessID</font></nobr></td><td bgcolor=\"#E6E6E6\" width=\"25%\"><nobr><font color=\"000000\">$strProcessName</font></nobr></td><td bgcolor=\"#E6E6E6\" width=\"25%\"><nobr><font color=\"000000\">$strProcessStatus</font></nobr></td></tr>";
|
||
|
||
for($i=0;$i<$pro_num;$i++)
|
||
{
|
||
$proc_num=${dec_process_.$i};
|
||
$show_num=omc_keep_length($i,0,2);
|
||
|
||
if($proc_num!=3)
|
||
{
|
||
$idArr[$i] = "input_proc_status" . "_$show_num";
|
||
|
||
echo "<tr><td bgcolor=\"#FFFFFF\" width=\"25%\"><nobr><font color=\"000000\">$show_num</font></nobr></td>";
|
||
echo "<td bgcolor=\"#FFFFFF\" width=\"25%\"><nobr><font color=\"000000\">{$array_display_proc[$i][remark]}</font></nobr></td>";
|
||
|
||
if(${dec_process_.$i}<3)
|
||
{
|
||
echo "<td bgcolor=\"#FFFFFF\" width=\"25%\"><nobr><font color=\"{$array_proc_status[$proc_num][color]}\">{$array_display_proc[$i][proc_status]}</font></nobr></td></tr>";
|
||
$input_proc_status_value[$proc_num] = $array_display_proc[$i][proc_status];
|
||
$input_proc_status_color[$proc_num] = $array_display_proc[$i][proc_color];
|
||
}
|
||
else
|
||
{
|
||
echo "<td>--</td></tr>";
|
||
$input_proc_status_value[$proc_num] = "--";
|
||
$input_proc_status_color[$proc_num]="#000000";
|
||
}
|
||
}
|
||
}
|
||
echo "</table>";
|
||
|
||
echo "<script LANGUAGE=\"JavaScript\">";
|
||
for($i=0;$i<$pro_num;$i++)
|
||
{
|
||
$proc_num=${dec_process_.$i};
|
||
if($proc_num!=3)
|
||
{
|
||
outputInnerHtml($idArr[$i],$input_proc_status_value[$proc_num],$input_proc_status_color[$proc_num]);
|
||
}
|
||
}
|
||
echo "\n</script>";
|
||
}//end if($PlatTypeDefArr[$sysNo][remark]=='EMS')
|
||
elseif(!$noShowVlr && $sysType == 'MSC')
|
||
{
|
||
echo "<p> </p>";
|
||
echo "<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"1\">";
|
||
echo "<tr><td><p align=\"center\"><font color=\"#0000FF\" size=\"2\">";
|
||
echo "$showVlrId";
|
||
$sysAlias=omc_get_sysAlias($sysTypeNo,$sysNo,$subSysNo);
|
||
if($sysAlias!=-1){
|
||
echo " [$sysAlias]";
|
||
}
|
||
echo " $strStatusInformation</font>";
|
||
echo "($strVersion:";
|
||
echo "<font color=\"#0000FF\">$vlr_version</font>";
|
||
echo ")</p></td></tr></table>";
|
||
echo "<table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\" bgcolor=\"#FFFFFF\">";
|
||
echo "<tr>";
|
||
echo "<td bgcolor=\"#E6E6E6\" width=\"50%\">";
|
||
echo "<nobr><font color=\"000000\">$strRefreshTime</font></nobr></td>";
|
||
echo "<td bgcolor=\"#FFFFFF\" width=\"50%\">";
|
||
echo "<nobr><font color=\"$color_refresh_time\">$refresh_time</font></nobr></td></tr>";
|
||
|
||
echo "<tr><td bgcolor=\"#E6E6E6\" width=\"50%\">";
|
||
echo "<nobr><font color=\"000000\">$strBasicStatus</font></nobr></td>";
|
||
echo "<td bgcolor=\"#FFFFFF\" width=\"50%\"><nobr><font color=\"$color_vlr_status\">$vlr_status</font></nobr></td>";
|
||
|
||
echo "<tr><td bgcolor=\"#E6E6E6\" width=\"50%\"><nobr><font color=\"000000\">$strDualServerMode</font></nobr></td>";
|
||
echo "<td bgcolor=\"#FFFFFF\" width=\"50%\"><nobr><font color=\"{$defineServerState[$dec_sta][color]}\">{$defineServerState[$dec_sta][remark]} </font></nobr>";
|
||
|
||
//echo "<td bgcolor=\"#FFFFFF\" width=\"50%\"><nobr><font color=\"{$array_vlr_status[$dec_vlr_status][color]}\">{$array_vlr_status[$dec_vlr_status][remark]}</font></nobr></td>";
|
||
echo "<tr><td bgcolor=\"#E6E6E6\" width=\"50%\"><nobr><font color=\"000000\">$strVlrNum</font></nobr></td>";
|
||
echo "<td bgcolor=\"#FFFFFF\" width=\"50%\"><nobr><font color=\"#0000FF\">$dec_vlr_num</font></nobr></td>";
|
||
echo "</tr></table>";
|
||
|
||
echo "<script LANGUAGE=\"JavaScript\">";
|
||
outputInnerHtml('input_refresh_time_vlr',$refresh_time,$color_refresh_time);
|
||
outputInnerHtml('input_vlr_status',$vlr_status,$color_vlr_status);
|
||
outputInnerHtml('input_servState_vlr',$defineServerState[$dec_sta][remark],$defineServerState[$dec_sta][color]);
|
||
outputInnerHtml('input_dec_vlr_num',$dec_vlr_num,'#0000FF');
|
||
|
||
echo "\n</script>";
|
||
|
||
}
|
||
}//end if($mod_type==0)
|
||
echo "<table border=\"0\" width=\"100%\">";
|
||
echo "<tr>";
|
||
echo "<td>";
|
||
echo "<p align=\"left\"><nobr>$strRemark: <font color=\"#0000FF\">Y</font> = $strNormal, <font color=#FF0000>N</font> = $strAbnormal, -- = $strNothing.</nobr></td>";
|
||
echo "<td>";
|
||
echo "<p align=\"right\"><a href=\"serverStatus.php?sys_id=all&showRange=$showRange&backpage=$backpage\" target=\"contents\"><img align=absBottom border=0 src=\"../../images/left.gif\" width=\"14\" height=\"14\">";
|
||
echo "$strBack</a></p>";
|
||
echo "</td>";
|
||
echo "</tr>";
|
||
echo "</table>";
|
||
?>
|
||
<script>
|
||
var url='<?php echo "$PHP_SELF?sys_id=$sys_id&mod_type=$mod_type&showRange=$showRange&backpage=$backpage";?>';
|
||
var timer=setTimeout("window.location.href=url",10000);
|
||
</script>
|
||
</body>
|
||
</html>
|