正在调试中!!"; //========================================================== //变量定义 //========================================================== $pubDb = 'OMC_PUB'; $numberPerPage = 100; //每页纪录数 $paramTable = 'OBJ_222.param_99'; $sysId ='222_99_99'; $initValue ='initValue'; $listPageUrl="./ss7LinkList.php?setObjIdStr=$objIdStr&setInstanceNo=$instanceNo"; $objIdStr='2.5.1'; $linkAttConfArr=array( array('Flag','06.0-06.0'), array('Linkset ID', '00.0-00.7'), array('SLC No.', '01.0-01.7'), array('Host IP', '02.0-05.7'), array('Signaling Type', '06.1-06.3'), array('MTP3-Lite Application Mode','06.4-06.4'), array('MTP3-Lite Remote IP','09.0-12.7'), array('MTP3-Lite Inactivity Timeout','13.0-13.7'), array('MTP3-Lite Allowed Timeout Times','14.0-14.7'), array('SG ID', '07.0-07.7'), array('M2UA Interface ID','08.0-08.7'), array('Alternative Host IP','15.0-18.7') ); $linkTypeArr=array( 0=>'8ECP', 1=>'M2UA', 2=>'MTP3-Lite', 3=>'IUA', 4=>'M3UA' ); //========================================================== //输入变量 //========================================================== if($DEBUG) echo "
sysId =$sysId"; if($DEBUG) echo "
instanceNo =$instanceNo"; if($DEBUG) echo "
objIdStr =$objIdStr"; //========================================================== //数据处理 //========================================================== //========================================================== //输出并显示数据 //========================================================== $levelWhere = getLevelWhere($objIdStr); if($DEBUG) echo "
levelWhere=$levelWhere"; $getSql="SELECT $initValue,instanceNo FROM $paramTable WHERE $levelWhere "; if($DEBUG) echo "
getSql=$getSql"; $result =mysqli_query($pubConn,$getSql); echo mysqli_error($pubConn); $defSql = "select initValue from OBJ_222.paramConf where $levelWhere and paramType='2'";//paramType=2,local $defResult = mysqli_query($pubConn,$defSql); $defRow = mysqli_fetch_array($defResult); $defValue = $defRow[initValue]; if($DEBUG)echo "
defValue=$defValue"; if($DEBUG) echo "
"; ?>
"; if($instanceNo == 'new') { $orgValue = $defValue; } else { $selSql = "SELECT initValue FROM $paramTable WHERE level_1='2' AND level_2='5' AND level_3='1' AND instanceNo='$instanceNo' "; if($DEBUG) echo "
selSql=$selSql"; $result=mysqli_query($pubConn,$selSql); echo mysqli_error($pubConn); $rows =mysqli_fetch_array($result); $orgValue=$rows[0]; if($DEBUG) echo "
orgvalue=$orgValue"; echo mysqli_error($pubConn); //$orgValue = getSysParamValue($sysId,$objIdStr,$instanceNo,$initValue); } if($_SERVER['REQUEST_METHOD'] == "POST"){ //保存改动 $newValue=$orgValue; $flag=dechex($flag); $newValue=setBitValue($newValue,$linkAttConfArr[0][1],$flag); $linksetNo =dechex($linksetNo); $linksetNo= strlen($linksetNo) < 2?'0'.$linksetNo:$linksetNo; if($DEBUG) echo "
linksetNo=$linksetNo"; $newValue=setBitValue($newValue,$linkAttConfArr[1][1],$linksetNo); if($DEBUG) echo "
newValue=$newValue"; $slcNo =dechex($slcNo); $slcNo= strlen($slcNo) < 2?'0'.$slcNo:$slcNo; if($DEBUG) echo "
slcNo=$slcNo"; $newValue=setBitValue($newValue,$linkAttConfArr[2][1],$slcNo); if($DEBUG) echo "
newValue=$newValue"; if($cpcIp=='') $cpcIp="FFFFFFFF"; else $cpcIp=ip2byte($cpcIp); if($DEBUG) echo "
cpcIp=$cpcIp"; $newValue=setBitValue($newValue,$linkAttConfArr[3][1],$cpcIp); if($DEBUG) echo "
newValue=$newValue"; if($DEBUG) echo "
linkType=$linkType"; $linkType=decbin($linkType); //get the bit length of link type modfiy JianHuiZheng 2007-11-30 $pos=explode("-",$linkAttConfArr[4][1]); $len=$pos[0]*10-$pos[1]*10; $len=abs($len)+1; $linkType=omc_keep_length($linkType,"0",$len); $newValue=setBitValue($newValue,$linkAttConfArr[4][1],$linkType); if($DEBUG) echo "
newValue=$newValue"; //MTP3-Lite Application Mode $mtp3_lite_app_mode=dechex($mtp3_lite_app_mode); $newValue=setBitValue($newValue,$linkAttConfArr[5][1],$mtp3_lite_app_mode); //MTP3-Lite Remote IP if($mtp3_lite_remote_ip == '') $mtp3_lite_remote_ip="FFFFFFFF"; else $mtp3_lite_remote_ip=ip2byte($mtp3_lite_remote_ip); $newValue=setBitValue($newValue,$linkAttConfArr[6][1],$mtp3_lite_remote_ip); //MTP3-Lite Inactivity Timeout $mtp3_lite_inact_timeout=dechex($mtp3_lite_inact_timeout); $newValue=setBitValue($newValue,$linkAttConfArr[7][1],$mtp3_lite_inact_timeout); //MTP3-Lite Allowed Timeout times $mtp3_lite_allow_timeout_time=dechex($mtp3_lite_allow_timeout_time); $newValue=setBitValue($newValue,$linkAttConfArr[8][1],$mtp3_lite_allow_timeout_time); $sgNo =dechex($sgNo); $sgNo = strlen($sgNo) < 2?'0'.$sgNo:$sgNo; if($DEBUG) echo "
sgNo=$sgNo"; $newValue=setBitValue($newValue,$linkAttConfArr[9][1],$sgNo); if($DEBUG) echo "
newValue=$newValue"; $m2uaInterfaceID =dechex($m2uaInterfaceID); $m2uaInterfaceID= strlen($m2uaInterfaceID) < 2?'0'.$m2uaInterfaceID:$m2uaInterfaceID; if($DEBUG) echo "
m2uaInterfaceID=$m2uaInterfaceID"; $newValue=setBitValue($newValue,$linkAttConfArr[10][1],$m2uaInterfaceID); if($DEBUG) echo "
newValue=$newValue"; if($alternativeMTP3=='') $alternativeMTP3="FFFFFFFF"; else $alternativeMTP3=ip2byte($alternativeMTP3); if($DEBUG) echo "
alternativeMTP3=$alternativeMTP3"; $newValue=setBitValue($newValue,$linkAttConfArr[11][1],$alternativeMTP3); if($DEBUG) echo "
newValue=$newValue"; $updSql = "UPDATE $paramTable SET initValue = '$newValue' WHERE level_1='2' AND level_2='5' AND level_3='1' AND instanceNo='$instanceNo' "; if($DEBUG) echo "
updSql=$updSql"; mysqli_query($pubConn,$updSql); echo mysqli_error($pubConn); //setSysParamValue($sysId,$objIdStr,$instanceNo,$newValue); echo ""; exit(); }else{ //显示 $tableHeader =""; //echo "
orgValue=$orgValue"; echo "$tableHeader"; echo ""; $flag =getBitValue($orgValue,$linkAttConfArr[0][1]); $flag =hexdec($flag); $linksetNo =getBitValue($orgValue,$linkAttConfArr[1][1]); $linksetNo =hexdec($linksetNo); $slcNo =getBitValue($orgValue,$linkAttConfArr[2][1]); $slcNo =hexdec($slcNo); $cpcIp =getBitValue($orgValue,$linkAttConfArr[3][1]); $cpcIp =byte2ip($cpcIp); $linkType =getBitValue($orgValue,$linkAttConfArr[4][1]); $linkType =bindec($linkType); $mtp3_lite_app_mode=getBitValue($orgValue,$linkAttConfArr[5][1]); $mtp3_lite_app_mode=hexdec($mtp3_lite_app_mode); $mtp3_lite_remote_ip=getBitValue($orgValue,$linkAttConfArr[6][1]); $mtp3_lite_remote_ip=byte2ip($mtp3_lite_remote_ip); $mtp3_lite_inact_timeout=getBitValue($orgValue,$linkAttConfArr[7][1]); $mtp3_lite_inact_timeout=hexdec($mtp3_lite_inact_timeout); $mtp3_lite_allow_timeout_time=getBitValue($orgValue,$linkAttConfArr[8][1]); $mtp3_lite_allow_timeout_time=hexdec($mtp3_lite_allow_timeout_time); $sgNo =getBitValue($orgValue,$linkAttConfArr[9][1]); $sgNo =hexdec($sgNo); $m2uaInterfaceID=getBitValue($orgValue,$linkAttConfArr[10][1]); $m2uaInterfaceID=hexdec($m2uaInterfaceID); $alternativeMTP3=getBitValue($orgValue,$linkAttConfArr[11][1]); $alternativeMTP3=byte2ip($alternativeMTP3); if($instanceNo == 'new'){ $levelArr=explode('.',$objIdStr); for($j=0;$jlevelArr[$j]={$levelArr[$j]}"; } $getInstanceSql="SELECT instanceNo FROM $paramTable WHERE level_1='2' AND level_2='5' AND level_3='1'AND initValue = '$defValue'"; $result=mysqli_query($pubConn,$getInstanceSql); echo mysqli_error($pubConn); echo ""; } echo ""; echo ""; echo ""; echo ""; echo ""; //MTP3-Lite Application Mode $appModeArr=array(0=>"Server",1=>"Client"); echo ""; echo ""; //MTP3-Lite Remote IP echo ""; //MTP3-Lite Inactivity Timeout echo ""; //MTP3-Lite Allowed Timeout times echo ""; echo ""; echo ""; echo ""; echo "
NameValue
No."; if($DEBUG) echo "
$getInstanceSql"; echo ""; echo"
Flag"; $flagArr=array(0=>'Disable',1=>'Enable'); echo "
Linkset ID "; echo ""; echo "
SLC "; echo ""; echo "
Host IP "; echo ""; echo "
Signaling Type "; echo ""; echo "
MTP3-Lite Application Mode"; echo ""; echo "
MTP3-Lite Remote IP"; echo ""; echo "
MTP3-Lite Inactivity Timeout"; echo ""; echo "
MTP3-Lite Allowed Timeout times"; echo ""; echo "
SG ID"; echo ""; echo "
M2UA Interface ID"; echo ""; echo "
Alternative Host IP "; echo ""; echo "
"; echo "\n "; if($instanceNo != 'new'){ echo "\n "; } echo "\n   "; echo "\n "; } ?> Remarks:

Linkset: The number of the linkset assigned to this link, range from 0 to 127

SLC: Signaling link code, rang from 0 to 15, identify the E1 links within a same linkset

IP: For the link 0 to 127, input 98. For the link 128 to 255, input 99