$innerHtml";
}
getSerial();
//
//*****
//$url_temp=$_SERVER["REQUEST_URI"];
//echo "This page URL:$url_temp
";
$db=$omc_db;
$sys_id = isset($sys_id)?$sys_id:'all';
$showRange = isset($showRange)?$showRange:'low';
if($DEBUG)echo "
sys_id=$sys_id";
$mod_type = isset($mod_type)?$mod_type:'0';
$sysType = omc_sys_id_info($sys_id,sys_type);
$sysTypeNo = omc_sys_type2code($sysType);
$sysType=$PlatTypeDefArr[$sysNo][remark];
$TypeNo = omc_sys_type2code($sysType);
if($DEBUG)echo "
sys_id=$sys_id";
//echo "
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")));
?>
";
$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'),
array('num' => '21', 'remark' => 'MNP', 'color' => '#0000FF'),
array('num' => '22', 'remark' => 'USSD', '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 "
sysType=$sysType";
if($DEBUG)echo "
sysNo=$sysNo";
if($DEBUG)echo "
subSysNo=$subSysNo";
$sysType=$PlatTypeDefArr[$sysNo][remark];
$TypeNo = omc_sys_type2code($sysType);
$selPlat="SELECT platHeart FROM sysConf WHERE sysTypeNo = '$TypeNo' ";
if($DEBUG)echo "
selPlat=$selPlat";
$resPlat=@mysqli_query($pubConn,$selPlat);
$rowPlat=@mysqli_fetch_array($resPlat);
$sysNo = $rowPlat[0];
if($DEBUG)echo "
sysType=$sysType";
if($DEBUG)echo "
sysNo=$sysNo";
if($DEBUG)echo "
subSysNo=$subSysNo";
if($sysType == 'EMS')
$helpId="1.2.2.1";
else
$helpId="1.2.2.2";
adjust_title_head();
echo "";
echo "";
echo "| ";
echo "$strSysStatus > Subsystem > $strServer";
echo " | ";
echo "";
showHelp($helpId);
echo " | ";
echo "
";
echo "";
echo "| ";
echo " ";
echo " | ";
echo "";
echo " ";
echo "$strBack";
echo " | ";
echo "
";
echo "
";
adjust_title_tail();
adjust_content_head();
$sel_mes_sql="SELECT detailStat,updateTime,sysTypeNo FROM $sysStat_table
WHERE
sysTypeNo='$sysTypeNo' AND sysNo='$sysNo' AND subSysNo='$subSysNo'
";
if($DEBUG)
echo "
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 mysqli_error($pubConn);
//echo "
sel_mes_sql=$sel_mes_sql";
if(!$sel_mes_row)
{
echo "
$strNotInstalled";
exit();
}
$hex_mes=$sel_mes_row[detailStat];
if($DEBUG)
echo "
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='';
//============================
/*
$ty=$sel_mes_row[sysTypeNo];
$tt=$sel_mes_row[updateTime];
echo "sysType:$ty
";
echo "time:$tt
";
echo "hex_mes:$hex_mes
";
*/
//============================
for($i=0;$ibin_mes=$bin_mes";
/************************************iptrans************************************/
$iptrans_bgn_byt=21;
$iptrans_len_bin=substr($bin_mes,$iptrans_bgn_byt*8,16);//iptrans所占长度,19bytes
$iptrans_len_dec=BinDec($iptrans_len_bin);
if($iptrans_len_dec > 0){
$showIptrans = 1;
}
if($DEBUG)echo "
iptrans_len_dec=$iptrans_len_dec";
//版本号
$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 "
version=$version";
//状态
$iptrans_state_bin=substr($bin_mes,($iptrans_bgn_byt+5)*8,8);
$iptrans_state_dec=BinDec($iptrans_state_bin);
if($DEBUG)echo "
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 "
$port_dec=${$port_dec}";
}
}
if($mod_type==1){
if(!$showIptrans){
echo "
$strNotInstalled";
exit();
}
?>
";
echo "( $strVersion:";
echo "$version";
echo ", ";
echo " $strStatus:";
$id = "input_iptrans_state";
if($iptrans_state_dec<2){
$color = $defineStatus[$iptrans_state_dec][color];
$innerHtml = $defineStatus[$iptrans_state_dec][remark];
}else{
$color = "#0000FF";
$innerHtml = '--';
}
outSpanId($id,$innerHtml,$color);
echo ", ";
echo "$strRefreshTime:";
$id = "input_refresh_time";
outSpanId($id,$refresh_time,$color_refresh_time);
echo " )";
?>
|
|
|
|
|
|
|
|
|
|
";
for($j=0;$j<8;$j++)
{
if($j%2==0)
{
$dis_no=4950+($j/2)*8+$i;
echo "";
echo $dis_no;
echo " | ";
}
else
{
$id="input_port_status" . "_$i" . "_$j";
$dis_port=(($j-1)/2)*8+$i;
$port_name="port_".$dis_port."_dec";
$port_status=${$port_name};
echo "";
outSpanId($id,$defineIptransStatus[$port_status][remark],$defineIptransStatus[$port_status][color]);
echo " | ";
}
}
echo "";
}
?>
mtp3_bgn_byt=$mtp3_bgn_byt";
$mtp3_len_bin=substr($bin_mes,$mtp3_bgn_byt*8,16);//mtp3所占长度
$mtp3_len_dec=BinDec($mtp3_len_bin);
if($mtp3_len_dec){
$showMtp3=1;
}
if($DEBUG)echo "
mtp3_len_dec=$mtp3_len_dec";
//版本号
$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 "
version=$version";
//状态
$mtp3_state_bin=substr($bin_mes,($mtp3_bgn_byt+5)*8,8);
$mtp3_state_dec=BinDec($mtp3_state_bin);
if($DEBUG)echo "
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 "
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 "
$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 "
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 "
$linkset_dec=${$linkset_dec}";
}
}
if($mod_type==2)
{
if(!$showMtp3)
{
echo "
$strNotInstalled";
exit();
}
?>
";
echo "( $strVersion:";
echo "$version";
echo ", ";
echo " $strStatus:";
$id = 'input_mtp3_state';
if($mtp3_state_dec<2){
$innerHtml = $defineStatus[$mtp3_state_dec][remark];
$color = $defineStatus[$mtp3_state_dec][color];
}else{
$innerHtml = '--';
$color = '#0000FF';
}
outSpanId($id,$innerHtml,$color);
echo ", ";
echo "$strRefreshTime:";
$id = "input_refresh_time";
outSpanId($id,$refresh_time,$color_refresh_time);
echo " )";
?>
|
|
Link
|
|
|
|
|
|
|
|
|
|
";
for($j=0;$j<8;$j++)
{
if($j%2==0)
{
$dis_no=($j/2)*64+$i;
echo "";
echo $dis_no;
echo " | ";
}
else
{
$id = "input_mtp3_link_status" . "_$i" . "_$j";
$dis_link=(($j-1)/2)*64+$i;
$link_name="link_".$dis_link."_dec";
$link_status=${$link_name};
echo "";
if($link_status<2){
$innerHtml = $defineMtp3Status[$link_status][remark];
$color = $defineMtp3Status[$link_status][color];
}else{
$innerHtml = "--";
$color = '#000000';
}
outSpanId($id,$innerHtml,$color);
echo " | ";
}
}
echo "";
}
?>
|
Linkset
|
|
|
|
|
|
|
|
|
|
";
for($j=0;$j<8;$j++)
{
if($j%2==0)
{
$dis_no=($j/2)*32+$i;
echo "";
echo $dis_no;
echo " | ";
}
else
{
$id = "input_mtp3_linkset_status" . "_$i" . "_$j";
$dis_linkset=(($j-1)/2)*32+$i;
$linkset_name="linkset_".$dis_linkset."_dec";
$linkset_status=${$linkset_name};
echo "";
if($linkset_status<2){
$innerHtml = $defineMtp3Status[$linkset_status][remark];
$color = $defineMtp3Status[$linkset_status][color];
}else{
$innerHtml = "--";
$color = '#000000';
}
outSpanId($id,$innerHtml,$color);
echo " | ";
}
}
echo "";
}
?>
sccp_len_dec=$sccp_len_dec";
$ssnNum=$sccp_len_dec-4;
if($sccp_len_dec > 0){
$showSccp = 1;
}
//版本号
$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 "
version=$version";
//状态
$sccp_state_bin=substr($bin_mes,($sccp_bgn_byt+5)*8,8);
$sccp_state_dec=BinDec($sccp_state_bin);
if($DEBUG)echo "
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 "
$ssn_dec=${$ssn_dec}";
}
if($mod_type==3)
{
if(!$showSccp)
{
echo "
$strNotInstalled";
exit();
}
?>
";
echo "( $strVersion:";
echo "$version";
echo ", ";
echo " $strStatus:";
$id = 'input_sccp_state';
if($sccp_state_dec<3){
$innerHtml = $defineSccpStatus[$sccp_state_dec][remark];
$color = $defineSccpStatus[$sccp_state_dec][color];
}else{
$innerHtml = '--';
$color = '#000000';
}
outSpanId($id,$innerHtml,$color);
echo ", ";
echo "$strRefreshTime:";
$id = "input_refresh_time";
outSpanId($id,$refresh_time,$color_refresh_time);
echo " )";
?>
|
0)
{
echo "";
echo "| Registered ssn num | ";
echo "Registered ssn name | ";
echo "
";
for($i=0;$i<$ssnNum;$i++)
{
$ssn_dec="ssn_".$i."_dec";
$showSsn=${$ssn_dec};
$showNum=omc_keep_length($showSsn,0,3);
echo "";
echo "| $showNum | ";
if($showSsn==146) {
$showSsn=12;
}
elseif($showSsn==147){
$showSsn=13;
}
elseif($showSsn==254){
$showSsn=14;
}
elseif($showSsn==32){
$showSsn=21;
}
elseif($showSsn==153){
$showSsn=22;
}
echo "";
echo "{$defineSsnStatus[$showSsn][remark]}";
echo " | ";
echo "
";
}
}
echo "
";
}//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所占长度
$tcap_len_dec=BinDec($tcap_len_bin);
if($DEBUG)echo "
tcap_len_dec=$tcap_len_dec";
if($tcap_len_dec > 0){
$showTcap = 1;
}
//版本号
$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 "
version=$version";
//状态
$tcap_state_bin=substr($bin_mes,($tcap_bgn_byt+5)*8,8);
$tcap_state_dec=BinDec($tcap_state_bin);
if($DEBUG)echo "
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 "
tsid_state_bin=$tsid_state_bin";
if($DEBUG)echo "
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 "
dlid_state_bin=$dlid_state_bin";
if($DEBUG)echo "
dlid_state_dec=$dlid_state_dec";
if($mod_type==4){
if(!$showTcap){
echo "
$strNotInstalled";
exit();
}
?>
";
echo "( $strVersion:";
echo "$version";
echo ", ";
echo " $strStatus:";
$id = 'input_tcap_state';
if($tcap_state_dec<2){
$innerHtml = $defineTcapStatus[$tcap_state_dec][remark];
$color = $defineTcapStatus[$tcap_state_dec][color];
}else{
$innerHtml = '--';
$color = '#000000';
}
outSpanId($id,$innerHtml,$color);
echo ", ";
echo "$strRefreshTime:";
$id = "input_refresh_time";
outSpanId($id,$refresh_time,$color_refresh_time);
echo " )";
?>
|
|
ID
|
Occupied
|
|
Current Used Dialogue ID
|
|
|
Max Used Dialogue ID
|
|
snmp_len_dec=$snmp_len_dec";
if($snmp_len_dec > 0){
$showSnmp = 1;
}
//版本号
$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 "
version=$version";
//状态
$snmp_state_bin=substr($bin_mes,($snmp_bgn_byt+5)*8,8);
$snmp_state_dec=BinDec($snmp_state_bin);
if($DEBUG)echo "
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 "
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 "
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 "
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 "
rsp_func_dec=$rsp_func_dec";
if($mod_type==5){
if(!$showSnmp){
echo "
$strNotInstalled";
exit();
}
?>
";
echo "( $strVersion:";
echo "$version";
echo ", ";
echo " $strStatus:";
$id = 'input_snmp_state';
if($snmp_state_dec<2){
$innerHtml = $defineStatus[$snmp_state_dec][remark];
$color = $defineStatus[$snmp_state_dec][color];
}else{
$innerHtml = '--';
$color = '#000000';
}
outSpanId($id,$innerHtml,$color);
echo ", ";
echo "$strRefreshTime:";
$id = "input_refresh_time";
outSpanId($id,$refresh_time,$color_refresh_time);
echo " )";
?>
|
|
Function type
|
Registered number
|
|
TRAP
|
|
|
SET
|
|
| GET |
|
| RSP |
|
debug_len_dec=$debug_len_dec";
if($debug_len_dec > 0){
$showDebug = 1;
}
//版本号
$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 "
version=$version";
//状态
$debug_state_bin=substr($bin_mes,($debug_bgn_byt+5)*8,8);
$debug_state_dec=BinDec($debug_state_bin);
if($DEBUG)echo "
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 "
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 "
$use_dec=${$use_dec}";
}
if($mod_type==6)
{
if(!$showDebug)
{
echo "
$strNotInstalled";
exit();
}
?>
";
echo "( $strVersion:";
echo "$version";
echo ", ";
echo " $strStatus:";
$id = 'input_debug_state';
if($debug_state_dec<2){
$innerHtml = $defineDebugStatus[$debug_state_dec][remark];
$color = $defineDebugStatus[$debug_state_dec][color];
}else{
$innerHtml = '--';
$color = '#000000';
}
outSpanId($id,$innerHtml,$color);
echo ", ";
echo "$strRefreshTime:";
$id = "input_refresh_time";
outSpanId($id,$refresh_time,$color_refresh_time);
echo " )";
?>
|
|
|
|
|
|
|
|
|
|
";
for($j=0;$j<8;$j++)
{
$id = "input_debug_items" . "_$i" . "_$j";
if($j%2==0)
{
$dis_no=($j/2)*4+$i;
echo "";
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 " | ";
}
else
{
$dis_port=(($j-1)/2)*4+$i;
$port_name="use_".$dis_port."_dec";
$port_status=${$port_name};
echo "";
outSpanId($id,$defineModuleStatus[$port_status][remark],$defineModuleStatus[$port_status][color]);
echo " | ";
}
}
echo "";
}
?>
syn_len_dec=$syn_len_dec";
if($syn_len_dec > 0){
$showDatasync = 1;
}
//版本号
$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 "
version=$version";
//状态
$syn_state_bin=substr($bin_mes,($syn_bgn_byt+5)*8,8);
$syn_state_dec=BinDec($syn_state_bin);
if($DEBUG)echo "
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 "
$strNotInstalled";
exit();
}
?>
";
echo "( $strVersion:";
echo "$version";
echo ", ";
echo " $strStatus:";
if($syn_state_dec<5){
echo "{$defineSyncStatus[$syn_state_dec][remark]}";
}else{
echo "--";
}
echo ", ";
echo "$strRefreshTime:";
echo "$refresh_time";
echo " )";
?>
|
| SHM NUM |
$shmnum_dec";?> |
| SHM ID |
$shmid_dec";
?>
|
| Initialization progress |
$initPro";
else
echo "--";
?>
|
|
Time(minutes)
|
$time_dec";
else
echo "--";
?>
|
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 "
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 "
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 "
free_memory_dec=$free_memory_dec";
if(isset($total_memory_dec)&&$total_memory_dec!=0)
{
$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 "
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 "
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 "
free_disk_dec=$free_disk_dec";
if(isset($total_disk_dec)&&$total_disk_dec!=0)
{
$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 "
disk=$memory";
/*******************
server send heartbeat
********************/
if($DEBUG)echo "
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 "
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 "
";
echo mysqli_error($pubConn);
if(!$sel_mes_row)
{
echo "
$strNotInstalled";
exit();
}
$refresh_time=$sel_mes_row[updateTime];
if($DEBUG)
echo "refresh_time=$refresh_time
";
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];
if($DEBUG)
echo "
hex_mes=$hex_mes";
/*
$refresh_time=$sel_mes_row[updateTime];
if($refresh_time > $due_date && $refresh_time < $ove_date)
{
$color_refresh_time="#0000FF";
}
else
{
$color_refresh_time="#FF0000";
$no_sys_status=1;
}
if($DEBUG)echo "
refresh_time=$refresh_time";
*/
$bin_mes='';
for($i=0;$ibin_mes=$bin_mes";
if($sysType=='EMS')
{
//begin bit
$verBgn = 23;//version
$sta_bgn=26;
$sync_bgn=46;
$num_bgn=66;//进程数目
$pro_bgn=67;//服务器进程状态
//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 "
dec_sync[$i]=$dec_sync[$i]";
}
//进程数目
$hex_pro_num=substr($hex_mes,$num_bgn*2,2);
$pro_num=HexDec($hex_pro_num);
if($DEBUG) echo "
dec_pro_num=$pro_num";
//服务器进程状态,每个byte表示一个进程的状态 (0=未运行,1=部分子进程未运行,2=正常运行,3=服务器上不运行该进程)
$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 "
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 "
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'=>'cdrCollector', '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
";
//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 "
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
";
//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 "
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 "
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 "
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 "
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 "
version=$version";
//main server status
$hex_sta=substr($hex_mes,$sta_bgn*2,2);
$dec_sta=HexDec($hex_sta);
if($DEBUG)echo "
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 = 31; //total mailboxs
$ena_box = 35; //registered mailboxs
$act_box = 43; //active mailboxs
$ttl_vce = 47; //total voicemails
$ttl_sec = 51; //total seconds of voicemails
$avr_sec = 55; //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 = 59; //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 "
version=$version";
//Field02:total mailboxs
$hexTotBox=substr($hex_mes,$ttl_box*2,8);
$totBox=HexDec($hexTotBox);
if($DEBUG)echo "
totBox=$totBox";
//Field03:$ena_box
$hexEnaBox=substr($hex_mes,$ena_box*2,8);
$enaBox=HexDec($hexEnaBox);
if($DEBUG)echo "
enaBox=$enaBox";
//Field04:$act_box
$hexActBox=substr($hex_mes,$act_box*2,8);
$actBox=HexDec($hexActBox);
if($DEBUG)echo "
actBox=$actBox";
//Field05:total voicemails
$hexTotVoi=substr($hex_mes,$ttl_vce*2,8);
$totVoi=HexDec($hexTotVoi);
if($DEBUG)echo "
totVoi=$totVoi";
//Field06:
$hexTtlVoi=substr($hex_mes,$ttl_sec*2,8);
$ttlVoi=HexDec($hexTtlVoi);
if($DEBUG)echo "
ttlVoi=$ttlVoi";
//Field07:
$hexAvrVoi=substr($hex_mes,$avr_sec*2,8);
$avrVoi=HexDec($hexAvrVoi);
if($DEBUG)echo "
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 "
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 "
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 "
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 "
chnS1[$dstNum]={$chnS1[$dstNum]}";
}
}
//Field14 SMPP status(1bytes,smpp_stat):
$smppStat=substr($hex_mes,$smpp_stat*2,2);
if($DEBUG)echo "
smppStat=$smppStat";
$funcFlag=hexdec(substr($hex_mes,$func_flag*2,2));
if($DEBUG)echo "
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 "
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 "
version=$version";
//main server status(0/1/2/3/4=normal/restart/initialize/suspend/stop)
$hex_sta=substr($hex_mes,($msc_bgn_byt+5)*2,2);
$dec_sta=HexDec($hex_sta);
if($DEBUG)echo "
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 "
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 "
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 "
vlr_version=$vlr_version";
//vlr status(/1/2/3/4=SearchVLR/Sync/Single/Dual/)
$hex_vlr_status=substr($hex_mes,($vlr_bgn_byt+5)*2,2);
$dec_vlr_status=HexDec($hex_vlr_status);
if($DEBUG)echo "
dec_vlr_status=$dec_vlr_status";
{//add by arwean 2006-03-15
$hex_vlr_lcn=substr($hex_mes,($vlr_bgn_byt+10)*2,8);
$vlr_lcnNum=HexDec($hex_vlr_lcn);
}
//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 "
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[0][$sysNo][number];//add by arwean 2006-03-15
//system("echo sn srlArr[4][$sysNo][number] == {$srlArr[4][$sysNo][number]} status>>debug.txt");
}elseif($sysType=='SMEG')
{
if($DEBUG)echo "SMEG.bin=$hex_mes
";
$smeg_state_label=array(0=>"Normal",1=>"Restart",2=>"Init",3=>"Suspend",4=>"Stop",5=>"Disable");
$smeg_state_color=array(0=>"#0000FF",1=>"#0000FF",2=>"#0000FF",3=>"#0000FF",4=>"#FF0000",5=>"#FF0000");
$smpp_smtp_pos=43;
$smeg_smpp_tx=substr($hex_mes,$smpp_smtp_pos++*2,2)+0;
$smeg_smpp_rx=substr($hex_mes,$smpp_smtp_pos++*2,2)+0;
$smeg_smtp_tx=substr($hex_mes,$smpp_smtp_pos++*2,2)+0;
$smeg_smtp_rx=substr($hex_mes,$smpp_smtp_pos*2,2)+0;
if($DEBUG)echo "smeg_smpp_tx=$smeg_smpp_tx,smeg_smpp_rx=$smeg_smpp_rx,smeg_smtp_tx=$smeg_smtp_tx,smeg_smtp_rx=$smeg_smtp_rx
";
}elseif($sysType=='OPPS')
{
//$DEBUG=1;
if($DEBUG)echo "OPPS.bin=$hex_mes
";
$opr_state_pos=52;
$opr_license_pos=70;
$opr_realuser_pos=78;
$opr_serial_pos=86;
$opr_service_state_pos=94;
$opr_state_label=array(0=>"Normal",1=>"Restart",2=>"Init",3=>"Suspend",4=>"Shutdown");
$opr_state_color=array(0=>"#0000FF",1=>"#FF0000",2=>"#0000FF",3=>"#FF0000",4=>"#FF0000");
$opr_state=hexdec(substr($hex_mes,$opr_state_pos,2));
$opr_license=hexdec(substr($hex_mes,$opr_license_pos,8));
$opr_realuser=hexdec(substr($hex_mes,$opr_realuser_pos,8));
$opr_serial=substr($hex_mes,$opr_serial_pos,8);
$opr_service_state_label=array(0=>"Disabled",1=>"Normal");
$opr_service_state=substr($hex_mes,$opr_service_state_pos,2);
if($DEBUG)echo "state=$opr_state,license=$opr_license,realuser=$opr_realuser,serial=$opr_serial
";
//$DEBUG=0;
}
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 "
$strNotInstalled";
exit();
}
if($platStatus)
{
$showPlatRemark = "N";
$showPlatColor = "#FF0000";
}
else
{
$showPlatRemark = "Y";
$showPlatColor = "0000FF";
}
?>
|
|
|
";
echo "
$strDualServerMode";
echo " | ";
echo "";
echo "";
}
?>
|
|
|
|
|
|
|
| (KB) |
|
| (KB) |
|
SMPP TX | ";
echo "$smeg_state_label[$smeg_smpp_tx] | ";
echo "| SMPP RX | ";
echo "$smeg_state_label[$smeg_smpp_rx] |
";
echo "| SMTP TX | ";
echo "$smeg_state_label[$smeg_smtp_tx] |
";
echo "| SMTP RX | ";
echo "$smeg_state_label[$smeg_smtp_rx] |
";
}
if($sysType=="OPPS")
{
//echo "| State | ";
//echo "$opr_state_label[$opr_state] |
";
echo "| License | ";
echo "$opr_license |
";
echo "| Real user | ";
echo "$opr_realuser |
";
echo "| Serial number | ";
echo "$opr_serial |
";
$opr_service_state1=substr($opr_service_state,0,1)+0;
$opr_service_state2=substr($opr_service_state,1,1)+0;
echo "| OPR | ";
echo "{$opr_service_state_label[$opr_service_state1]} |
";
echo "| IMDX | ";
echo "{$opr_service_state_label[$opr_service_state2]} |
";
}
if($sysType=='EMS')
{
for($i=0;$i<5;$i++)
{
$id = "input_dec_sync" . "_$i";
echo "";
echo "|
$arrSyncInfor[$i]";
echo " | ";
echo "";
outSpanId($id,$dec_sync[$i],'#0000FF');
echo " | ";
echo "
";
}
}
if($sysType=='HLR' || $sysType=='PPS' || $sysType=='SMSC' || $sysType=='AUC' || $sysType=='MSC'){
$LicenseStr = ($sysType=='MSC') ? "E1 license" : "License";
$UserStr = ($sysType=='MSC') ? "E1 used" : "Users";
echo "";
echo "| $LicenseStr | ";
echo "$lcnNum | ";
echo "
";
// if($sysType=='PPS'){
if($sysType=='SMSC')
echo "";
else
echo "
";
echo "| $UserStr | ";
echo "";
outSpanId('input_realNum',$realNum,'#0000FF');
echo " | ";
echo "
";
// }
}
if($sysType=='HLR' || $sysType=='PPS' || $sysType=='AUC' || $sysType=='EIR' || $sysType=='VSS' || $sysType=='MSC' || $sysType=='SMSC'){
echo "";
echo "| Serial number | ";
echo "$serialNum | ";
echo "
";
}
if($sysType=='VSS'){
echo "";
echo "| Total mailboxs | ";
echo "$totBox | ";
echo "
";
echo "";
echo "| Registered mailboxs | ";
echo "$enaBox | ";
echo "
";
echo "";
echo "| Active mailboxs | ";
echo "$actBox | ";
echo "
";
echo "";
echo "| Total voicemails | ";
echo "$totVoi | ";
echo "
";
echo "";
echo "| Total seconds of voicemails | ";
echo "$ttlVoi | ";
echo "
";
echo "";
echo "| Average seconds of voicemails | ";
echo "$avrVoi | ";
echo "
";
echo "";
echo "| SMPP state | ";
if($smppStat > 0){
echo "Established | ";
}else{
echo "Not established | ";
}
echo "
";
/*
echo "";
echo "| VSS function flag | ";
echo "{$VSS_funcFlagArr[$funcFlag][remark]} | ";
echo "
";
*/
echo "
";
echo "
";
echo "";
echo "";
echo "| {$linkTypeArr[$sttE0[2]][remark]} #0 | ";
echo "{$linkTypeArr[$sttE1[2]][remark]} #1 | ";
echo "
";
echo "";
echo "| Used flag: {$useSttArr[$sttE0[0]][remark]}";
echo " Link status: {$linkSttArr[$sttE0[1]][remark]}";
echo " CH in used: $chnU0";
echo " Voice rule: {$voiceRuleArr[$sttE0[3]][remark]}";
echo " | Used flag: {$useSttArr[$sttE1[0]][remark]}";
echo " Link status: {$linkSttArr[$sttE1[1]][remark]}";
echo " CH in used: $chnU1";
echo " Voice rule: {$voiceRuleArr[$sttE1[3]][remark]}";
echo " |
";
for($i=0;$i<16;$i++){
echo "";
for($j=0;$j<2;$j++){
$showNum = $j*16+$i;
echo "| ";
echo omc_keep_length($showNum,0,2);
echo " | ";
echo "";
echo "{$chnSttArr[$chnS0[$showNum]][remark]}";
echo " | ";
}
for($j=0;$j<2;$j++){
$showNum = $j*16+$i;
echo "";
echo omc_keep_length($showNum,0,2);
echo " | ";
echo "";
echo "{$chnSttArr[$chnS1[$showNum]][remark]}";
echo " | ";
}
echo "
";
}
}
if($sysType=='AAS'){
echo "
";
echo "
";
echo "";
if($biccAlarm==1){
echo "";
echo "| Alarm | ";
echo "BICC trunk not reachable | ";
echo "
";
}
}
echo "
";
if($sysType=='EMS')
{
echo "";
echo "$strProcessStatus |
";
echo "";
echo "| $strProcessID | $strProcessName | $strProcessStatus |
";
for($i=0;$i< $pro_num;$i++)
{
$proc_num=${dec_process_.$i};
$show_num=omc_keep_length($i,0,2);
if($proc_num!=3)
{
$id = "input_proc_status" . "_$show_num";
echo "| $show_num | ";
echo "{$array_display_proc[$i][remark]} | ";
echo"";
outSpanId($id,$array_display_proc[$i][proc_status],$array_display_proc[$i][proc_color]);
echo " | ";
}
}
echo "
";
}//end if($PlatTypeDefArr[$sysNo][remark]=='EMS')
elseif(!$noShowVlr && $sysType == 'MSC')
{
echo "
";
echo "";
echo "";
echo "$showVlrId";
$sysAlias=omc_get_sysAlias($sysTypeNo,$sysNo,$subSysNo);
if($sysAlias!=-1){
echo " [$sysAlias]";
}
echo " $strStatusInformation";
echo "($strVersion:";
echo "$vlr_version";
echo ") |
";
echo "";
echo "";
echo "| ";
echo "$strRefreshTime | ";
echo "";
outSpanId('input_refresh_time_vlr',$refresh_time,$color_refresh_time);
echo " |
| ";
echo "$strBasicStatus | ";
echo "";
outSpanId('input_vlr_status',$vlr_status,$color_vlr_status);
echo " | ";
echo "
| $strDualServerMode | ";
echo "";
outSpanId('input_servState_vlr',$defineServerState[$dec_sta][remark],$defineServerState[$dec_sta][color]);
echo " | ";
echo "
| $strVlrNum | ";
echo "";
outSpanId('input_dec_vlr_num',$dec_vlr_num,'#0000FF');
echo " | ";
echo "
| License | ";
echo "";
echo "$vlr_lcnNum";
echo " |
";
}
if($sysType=='SMSC')
{
//show smpp link status, zhengjianhui 2008-12-3
$smpp_link_status_color=array(0=>"#aeaeae",1=>"#000000",2=>"#00ff00",3=>"#0000ff",4=>"#ff00ff");
$smpp_link_status_label=array(0=>"Not Init",1=>"Idle",2=>"Waiting",3=>"Established",4=>"Suspend");
//echo "sysNo=$sysNo
$hex_mes
";
$smpp_link_status_pos=47;
$smpp_link_status_len=32;
$smpp_link_status_hex=substr($hex_mes,$smpp_link_status_pos*2,$smpp_link_status_len*2);
echo "
SMPP Link Status";
echo "";
//smpp link alias
$smpp_link_alias_oid="2.2.1.1.2";
//oidwhere
$levelArr=explode('.',$smpp_link_alias_oid);
for($j=0;$j";
while($row=@mysqli_fetch_array($res))
{
$instanceNo=$row[instanceNo]+0;
$smpp_link_alias[$instanceNo]=$row[initValue];
//echo "$instanceNo-{$row[initValue]}
";
}
for($row=0;$row<4;$row++)
{
echo "";
for($col=0;$col<8;$col++)
{
$no=$row*8+$col;
$status=substr($smpp_link_status_hex,$no*2,2);
$istatus=hexdec($status)+0;
$noshow=omc_keep_length($no,0,2);
if($smpp_link_alias[$no] != "")
echo "| $noshow [ {$smpp_link_alias[$no]} ] | ";
else
echo "$no | ";
}
echo "
";
echo "";
for($col=0;$col<8;$col++)
{
$no=$row*8+$col;
$status=substr($smpp_link_status_hex,$no*2,2);
$istatus=hexdec($status)+0;
if($istatus>=0&&$istatus<5)
echo "| {$smpp_link_status_label[$istatus]} | ";
else
echo "-- | ";
}
echo "
";
}
echo "
";
/*
echo " SMPP Link Status: ";
echo "Not Init; ";
echo "Idle; ";
echo "Waiting; ";
echo "Established; ";
echo "Suspend; ";
*/
}
{//if there are some alarm, show it (add by arwean 2006-7-11 15:05)
$selSql = "select * from sysAlarmLog where sysTypeNo='$sysTypeNo' and sysNo='$sysNo' and clearBy is null";
if($DEBUG) echo "
db=$db;
selSql=$selSql";
$Result = mysqli_query($pubConn,$selSql);
if(mysqli_num_rows($Result))
{
echo "
";
echo "";
echo "";
echo "{$sysType}_{$sysNo}_{$subSysNo} alarm list";
echo " |
";
echo "";
echo "";
echo "| Alarm level | ";
echo "Events | ";
echo "Alarm time | ";
echo "
";
while($Rows=mysqli_fetch_array($Result))
{
$alarmTime = $Rows[alarmTime];
$tmpSql="SELECT * FROM sysAlarmConf
WHERE sysTypeNo='$sysTypeNo' AND compCode='$Rows[compCode]' AND alarmCode='$Rows[alarmCode]'";
if($DEBUG)echo "
tmpSql=$tmpSql";
$tmpResult=@mysqli_query($pubConn,$tmpSql);
echo mysqli_error($pubConn);
$tmpRows=@mysqli_fetch_array($tmpResult);
$alarmLevel= $tmpRows[alarmLevel];
if(trim($tmpRows[alarmDesc_2])=="")
echo "";
else
echo "
";
echo "| {$alarmLevelDefArr[$alarmLevel][remark]} | ";
echo "{$tmpRows[alarmDesc_2]} | ";
echo "$alarmTime | ";
echo "
";
}
echo "
";
}
}//end show alarm.
}//end if($mod_type==0)
echo "";
echo "";
echo "| ";
echo " $strRemark: Y = $strNormal, N = $strAbnormal, -- = $strNothing. | ";
echo "";
echo " ";
echo "$strBack ";
echo " | ";
echo "
";
echo "
";
adjust_content_tail();
?>