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 "
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"))); ?> "; echo ""; echo ""; echo "$strSysStatus > $strCentralOffice > $strServer"; echo ""; echo ""; showHelp($helpId); echo ""; echo ""; echo ""; $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 "
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"; $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(); } $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=''; 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:"; if($iptrans_state_dec<2) { echo "{$defineStatus[$iptrans_state_dec][remark]}"; $input_iptrans_state_value=$defineStatus[$iptrans_state_dec][remark]; $input_iptrans_state_color=$defineStatus[$iptrans_state_dec][color]; } else { echo "--"; $input_iptrans_state_value="--"; $input_iptrans_state_color="#0000FF"; } echo ", "; echo "$strRefreshTime:"; echo "$refresh_time"; echo " )"; echo ""; ?>

"; for($j=0;$j<8;$j++) { if($j%2==0) { $dis_no=4950+($j/2)*8+$i; echo ""; } 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 ""; $input_port_status_value[$i][$j]=$defineIptransStatus[$port_status][remark]; $input_port_status_color[$i][$j]=$defineIptransStatus[$port_status][color]; } } echo ""; } echo ""; ?>
"; echo $dis_no; echo ""; echo "{$defineIptransStatus[$port_status][remark]}"; 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:"; if($mtp3_state_dec<2){ echo "{$defineStatus[$mtp3_state_dec][remark]}"; $input_mtp3_state_value=$defineStatus[$mtp3_state_dec][remark]; $input_mtp3_state_color=$defineStatus[$mtp3_state_dec][color]; }else{ echo "--"; $input_mtp3_state_value="--"; $input_mtp3_state_color="#0000FF"; } echo ", "; echo "$strRefreshTime:"; echo "$refresh_time"; echo " )"; echo ""; ?>

"; for($j=0;$j<8;$j++) { if($j%2==0) { $dis_no=($j/2)*64+$i; echo ""; } 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 ""; } } echo ""; } echo ""; ?>
Link
"; echo $dis_no; echo ""; if($link_status<2) { echo " {$defineMtp3Status[$link_status][remark]} "; $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 "

"; for($j=0;$j<8;$j++) { if($j%2==0) { $dis_no=($j/2)*32+$i; echo ""; } 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 ""; } } echo ""; } 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]); } } ?>
Linkset
"; echo $dis_no; echo ""; if($linkset_status<2) { echo " {$defineMtp3Status[$linkset_status][remark]} "; $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 "
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:"; if($sccp_state_dec<3) { echo "{$defineSccpStatus[$sccp_state_dec][remark]}"; $input_sccp_state_value=$defineSccpStatus[$sccp_state_dec][remark]; $input_sccp_state_color=$defineSccpStatus[$sccp_state_dec][color]; } else { echo "--"; $input_sccp_state_value="--"; $input_sccp_state_color="#0000FF"; } echo ", "; echo "$strRefreshTime:"; echo "$refresh_time"; echo " )"; echo ""; ?>

0) { echo ""; echo ""; echo ""; echo ""; for($i=0;$i<$ssnNum;$i++) { $ssn_dec="ssn_".$i."_dec"; $showSsn=${$ssn_dec}; $showNum=omc_keep_length($showSsn,0,3); echo ""; echo ""; if($showSsn==146) { $showSsn=12; } elseif($showSsn==147){ $showSsn=13; } elseif($showSsn==254){ $showSsn=14; } echo ""; echo ""; } } echo "
Registered ssn numRegistered ssn name
$showNum"; echo "{$defineSsnStatus[$showSsn][remark]}"; 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:"; if($tcap_state_dec<2){ echo "{$defineTcapStatus[$tcap_state_dec][remark]}"; $input_tcap_state_value=$defineTcapStatus[$tcap_state_dec][remark]; $input_tcap_state_color=$defineTcapStatus[$tcap_state_dec][color]; } else{ echo "--"; $input_tcap_state_value="--"; $input_tcap_state_color="#0000FF"; } echo ", "; echo "$strRefreshTime:"; echo "$refresh_time"; echo " )"; echo ""; ?>

ID Occupied
Current Used Dialogue ID $tsid_state_dec"; ?>
Max Used Dialogue ID $dlid_state_dec"; ?>
"; outputInnerHtml('input_tsid_state_dec',$tsid_state_dec,'#0000ff'); outputInnerHtml('input_dlid_state_dec',$dlid_state_dec,'#0000ff'); echo ""; }//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所占长度 $snmp_len_dec=BinDec($snmp_len_bin); if($DEBUG)echo "
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:"; if($snmp_state_dec<2){ echo "{$defineStatus[$snmp_state_dec][remark]}"; $input_snmp_state_value=$defineStatus[$snmp_state_dec][remark]; $input_snmp_state_color=$defineStatus[$snmp_state_dec][color]; }else{ echo "--"; $input_snmp_state_value="--"; $input_snmp_state_color="#0000FF"; } echo ", "; echo "$strRefreshTime:"; echo "$refresh_time"; echo " )"; echo ""; ?>

Function type Registered number
TRAP $trap_func_dec"; ?>
SET $set_func_dec"; ?>
GET $get_func_dec"; ?>
RSP $rsp_func_dec"; ?>
"; 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 ""; }//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所占长度 $debug_len_dec=BinDec($debug_len_bin); if($DEBUG)echo "
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:"; if($debug_state_dec<2){ echo "{$defineDebugStatus[$debug_state_dec][remark]}"; $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 "--"; } echo ", "; echo "$strRefreshTime:"; echo "$refresh_time"; echo " )"; echo ""; ?>

"; 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 ""; } else { $dis_port=(($j-1)/2)*4+$i; $port_name="use_".$dis_port."_dec"; $port_status=${$port_name}; echo ""; $input_debug_items_value[$i][$j]=$defineModuleStatus[$port_status][remark]; $input_debug_items_color[$i][$j]=$defineModuleStatus[$port_status][color]; } } echo ""; } 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 ""; echo "{$defineModuleStatus[$port_status][remark]}"; 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"; $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"; $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($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;$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'=>'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
"; //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 = 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 "
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"; //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[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 "
$strNotInstalled"; exit(); } if($platStatus){ $showPlatRemark = "N"; $showPlatColor = "#FF0000"; }else{ $showPlatRemark = "Y"; $showPlatColor = "0000FF"; } ?>

"; echo ""; echo ""; ?>
"; echo "

"; echo "$strBack

"; echo "

"; if($sysType=='HLR' || $sysType=='AUC' || $sysType=='EIR' || $sysType=='SMSC' || $sysType=='PPS' || $sysType=='VSS' || $sysType=='MSC' || $sysType=='EMS' || $sysType=='SN' || $sysType=='AAS') { echo "($strVersion:"; echo "$version"; echo ")"; } ?>

"; echo ""; echo ""; echo ""; echo ""; } ?> "; 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"; ?> "; echo ""; echo ""; echo ""; $ipArr[$i] = "input_dec_sync" . "_$i"; } echo ""; } if($sysType=='HLR' || $sysType=='PPS' || $sysType=='SMSC' || $sysType=='AUC' || $sysType=='MSC'){ echo ""; echo ""; echo ""; echo ""; // if($sysType=='PPS'){ echo ""; echo ""; echo ""; echo ""; // } echo ""; } if($sysType=='HLR' || $sysType=='PPS' || $sysType=='AUC' || $sysType=='EIR'||$sysType=='VSS'|| $sysType=='MSC'||$sysType=='SMSC'){ echo ""; echo ""; echo ""; echo ""; } if($sysType=='VSS'){ echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; if($smppStat > 0){ echo ""; }else{ echo ""; } echo ""; echo ""; echo ""; echo ""; echo ""; echo "
$strDualServerMode"; echo "{$defineServerState[$dec_sta][remark]} "; echo "
(KB)
(KB)
$arrSyncInfor[$i]"; echo "$dec_sync[$i]"; echo "
License$lcnNum
Users$realNum
Serial number$serialNum
Total mailboxs$totBox
Registered mailboxs$enaBox
Active mailboxs$actBox
Total voicemails$totVoi
Total seconds of voicemails$ttlVoi
Average seconds of voicemails$avrVoi
SMPP stateEstablishedNot established
VSS function flag{$VSS_funcFlagArr[$funcFlag][remark]}
"; echo "

"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; for($i=0;$i<16;$i++){ echo ""; for($j=0;$j<2;$j++){ $showNum = $j*16+$i; echo ""; echo ""; } for($j=0;$j<2;$j++){ $showNum = $j*16+$i; echo ""; echo ""; } echo ""; } } if($sysType=='AAS'){ echo "
{$linkTypeArr[$sttE0[2]][remark]} #0{$linkTypeArr[$sttE1[2]][remark]} #1
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 "
"; echo omc_keep_length($showNum,0,2); echo ""; echo "{$chnSttArr[$chnS0[$showNum]][remark]}"; echo ""; echo omc_keep_length($showNum,0,2); echo ""; echo "{$chnSttArr[$chnS1[$showNum]][remark]}"; echo "
"; echo "

"; echo ""; if($biccAlarm==1){ echo ""; echo ""; echo ""; echo ""; } /* echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; for($i=0;$i<16;$i++){ echo ""; for($j=0;$j<2;$j++){ $showNum = $j*16+$i; echo ""; echo ""; } for($j=0;$j<2;$j++){ $showNum = $j*16+$i; echo ""; echo ""; } echo ""; }*/ } echo "
AlarmBICC trunk not reachable
E1 #0E1 #1
Used flag: {$useSttArr[$sttE0[0]][remark]}"; echo "      Link status: {$linkSttArr[$sttE0[1]][remark]}"; echo "      CH in used: $chnU0"; echo "Used flag: {$useSttArr[$sttE1[0]][remark]}"; echo "      Link status: {$linkSttArr[$sttE1[1]][remark]}"; echo "      CH in used: $chnU1"; echo "
"; echo omc_keep_length($showNum,0,2); echo ""; echo "{$chnSttArr[$chnS0[$showNum]][remark]}"; echo ""; echo omc_keep_length($showNum,0,2); echo ""; echo "{$chnSttArr[$chnS1[$showNum]][remark]}"; echo "
"; if($sysType=='EMS') { echo ""; echo "

$strProcessStatus

"; echo ""; echo ""; 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 ""; echo ""; if(${dec_process_.$i}<3) { echo ""; $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 ""; $input_proc_status_value[$proc_num] = "--"; $input_proc_status_color[$proc_num]="#000000"; } } } echo "
$strProcessID$strProcessName$strProcessStatus
$show_num{$array_display_proc[$i][remark]}{$array_display_proc[$i][proc_status]}
--
"; 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 ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; echo "$strRefreshTime"; echo "$refresh_time
"; echo "$strBasicStatus$vlr_status
$strDualServerMode{$defineServerState[$dec_sta][remark]} "; //echo "{$array_vlr_status[$dec_vlr_status][remark]}
$strVlrNum$dec_vlr_num
"; echo ""; } }//end if($mod_type==0) echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; echo "

$strRemark:  Y = $strNormal,    N = $strAbnormal,   -- = $strNothing.

"; echo "

"; echo "$strBack

"; echo "
"; ?>