'2.1', 'sysid'=> $sysId, 'selectsysid'=>'-1'), array('oid'=>'2.2', 'sysid'=> $sysId, 'selectsysid'=>'-1'), array('oid'=>'2.3.1', 'sysid'=> $sysId, 'selectsysid'=>'-1') ); $oidsysarr=array( array('oid'=>'2.2', 'sysid'=>'222_99_99', 'selectsysid'=>'-1'), array('oid'=>'2.4.1', 'sysid'=>'222_99_99', 'selectsysid'=>'-1'), array('oid'=>'2.3', 'sysid'=>'222_99_99', 'selectsysid'=>'-1'), //获得wxc2 dpc ); $SaveArr=array( array('oidstr'=>'3.1', 'setvalue'=>'A5' ,'sysid'=> $sysId, 'selectsysid'=>'-1') ); $clockSourceArr = array( array('value' => 0, 'name' => 'Lock E1-0'), array('value' => 1, 'name' => 'Lock E1-1'), array('value' => 2, 'name' => 'Lock E1-2'), array('value' => 3, 'name' => 'Lock E1-3'), array('value' => 4, 'name' => 'Lock E1-4'), array('value' => 5, 'name' => 'Lock E1-5'), array('value' => 6, 'name' => 'Lock E1-6'), array('value' => 7, 'name' => 'Lock E1-7'), array('value' => 8, 'name' => 'Internal Clock') ); $enableArr = array( array('value' => 0, 'name' => 'N'), array('value' => 1, 'name' => 'Y') ); $CRC4Arr = array( array('value' => 0, 'name' => 'OFF'), array('value' => 1, 'name' => 'ON') ); $NTLTArr = array( array('value' => 0, 'name' => 'LT'), array('value' => 1, 'name' => 'NT') ); $E1T1Arr = array( array('value' => 0, 'name' => 'E1'), array('value' => 1, 'name' => 'T1') ); $portTypeArr = array( array('value' => 0, 'name' => 'SS7'), array('value' => 1, 'name' => 'ANSI SS7'), array('value' => 2, 'name' => 'ISDN'), array('value' => 3, 'name' => 'China No.1'), array('value' => 4, 'name' => 'Sri Lanka R2'), array('value' => 5, 'name' => 'QSIG'), array('value' => 6, 'name' => 'ANSI ISDN') ); $backoffArr = array( array('value' => 0, 'name' => 'OFF'), array('value' => 1, 'name' => 'ON') ); $circuitSlcArr = array( 2 => 'Clockwise', 3 => 'Counterclockwise' ); $commandArr= array( 90 => 'Reset', 165 => 'Initialization', 238 => 'No operation' ); $groupArr = array( 0 => '0', 1 => '1', 2 => '2', 3 => '3' ); if($_SERVER['REQUEST_METHOD'] == "POST") { if(isset($clockSource_save)||isset($setSys)) { $tmp = $clockSource; $tmp = dechex($tmp); $tmp = omc_keep_length($tmp,'0',2); $oidstr = "2.2.2"; $objWhereStr = getLevelWhere($oidstr); $updSql = "update $paramTab set initValue='$tmp' where $objWhereStr and subSysNo='$this_subSysNo' "; mysqli_query($pubConn,$updSql); echo mysqli_error($pubConn); } if(isset($command_save)||isset($setSys)) { $tmp = $command; $tmp = dechex($tmp); $tmp = omc_keep_length($tmp,'0',2); $oidstr = "2.3.1"; $objWhereStr = getLevelWhere($oidstr); $updSql = "update $paramTab set initValue='$tmp' where $objWhereStr and subSysNo='$this_subSysNo' "; mysqli_query($pubConn,$updSql); echo mysqli_error($pubConn); } { for($i=0;$i<8;$i++) { $setname=${"enable_save_$i"}; if(isset($setname)) { for($j=7;$j>=0;$j--) { $bitValue=${"enable_$j"}; if($j==7) $setvalue = $bitValue; else $setValue .= $bitValue; } $setValue = bindec($setValue); $setValue = strtoupper(dechex($setValue)); $setValue = omc_keep_length($setValue,'0',2); $oidstr = "2.2.1"; $objWhereStr = getLevelWhere($oidstr); $updSql = "update $paramTab set initValue='$setValue' where $objWhereStr and subSysNo='$this_subSysNo' "; mysqli_query($pubConn,$updSql); echo mysqli_error($pubConn); } } for($i=4;$i<8;$i++) { $setname=${"CRC4_save_$i"}; if(isset($setname)) { for($j=7;$j>3;$j--) { $bitValue=${"CRC4_$j"}; $setValue .= $bitValue; } $setValue .= '0000'; $setValue = bindec($setValue); $setValue = strtoupper(dechex($setValue)); $setValue = omc_keep_length($setValue,'0',2); $oidstr = "2.2.3"; $objWhereStr = getLevelWhere($oidstr); $updSql = "update $paramTab set initValue='$setValue' where $objWhereStr and subSysNo='$this_subSysNo' "; mysqli_query($pubConn,$updSql); echo mysqli_error($pubConn); } } for($i=0;$i<8;$i++) { $setname=${"NTLT_save_$i"}; if(isset($setname)) { for($j=7;$j>=0;$j--) { $bitValue=${"NTLT_$j"}; if($j==7) $setvalue = $bitValue; else $setValue .= $bitValue; } $setValue = bindec($setValue); $setValue = strtoupper(dechex($setValue)); $setValue = omc_keep_length($setValue,'0',2); $oidstr = "2.1.1"; $objWhereStr = getLevelWhere($oidstr); $updSql = "update $paramTab set initValue='$setValue' where $objWhereStr and subSysNo='$this_subSysNo' "; mysqli_query($pubConn,$updSql); echo mysqli_error($pubConn); } } for($i=0;$i<8;$i++)//E1/T1 { $setname=${"E1T1_save_$i"}; if(isset($setname)) { for($j=7;$j>=0;$j--) { $bitValue=${"E1T1_$j"}; if($j==7) $setvalue = $bitValue; else $setValue .= $bitValue; } $setValue = bindec($setValue); $setValue = strtoupper(dechex($setValue)); $setValue = omc_keep_length($setValue,'0',2); $oidstr = "2.1.5"; $objWhereStr = getLevelWhere($oidstr); $updSql = "update $paramTab set initValue='$setValue' where $objWhereStr and subSysNo='$this_subSysNo' "; mysqli_query($pubConn,$updSql); echo mysqli_error($pubConn); } } for($i=0;$i<8;$i++) { $setname1=${"portType_save_$i"}; $setname2=${"backoff_save_$i"}; $setname3=${"circuitSlc_save_$i"}; $setname4=${"group_save_$i"}; if(isset($setname1)||isset($setname2)||isset($setname3)||isset($setname4)) { $oidstr = "2.1.2"; $objWhereStr = getLevelWhere($oidstr); $selSql = "select initValue from $paramTab where $objWhereStr and subSysNo='$this_subSysNo' and instanceNo='$i' "; $result = mysqli_query($pubConn,$selSql); $row = mysqli_fetch_array($result); $setValue = $row[initValue]; $tmp1 = ${"circuitSlc_$i"}; $tmp2 = ${"backoff_$i"}; $tmp3 = ${"portType_$i"}; $tmp4 = ${"group_$i"}; $tmp1 = omc_keep_length(decbin($tmp1),'0',2); $tmp2 = omc_keep_length(decbin($tmp2),'0',1); $tmp3 = omc_keep_length(decbin($tmp3),'0',3); $tmp4 = omc_keep_length(decbin($tmp4),'0',2); $setValue = $tmp4.$tmp3.$tmp2.$tmp1; $setValue = bindec($setValue); $setValue = strtoupper(dechex($setValue)); $setValue = omc_keep_length($setValue,'0',2); // $setValue = setBitValue($setBitValue,'00.0-00.1',$tmp1); // $setValue = setBitValue($setBitValue,'00.2-00.2',$tmp2); // $setValue = setBitValue($setBitValue,'00.3-00.5',$tmp3); // $setValue = setBitValue($setBitValue,'00.6-00.7',$tmp4); $updSql = "update $paramTab set initValue='$setValue' where $objWhereStr and subSysNo='$this_subSysNo' and instanceNo='$i' "; mysqli_query($pubConn,$updSql); echo mysqli_error($pubConn); } } } if(isset($setSys) || isset($getSys)) { if(isset($setSys)) { echo "
Setting parameters
"; SetParam($oidsysarr0); SetParam($oidsysarr); //SaveParam($SaveArr); } else { echo "
Getting parameters
"; GetParam($oidsysarr0); GetParam($oidsysarr); } } echo ""; exit(); } if($setSys || $getSys || $undoSet) { echo "

Finished!

"; if($DEBUG) exit(); echo ""; exit(); } { echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; //echo "$strConfiguration > $strNetwork > PCR"; echo "Configuration > Network > PCR"; echo ""; showHelp($helpId); echo "
"; echo "
"; echo ""; { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; echo "$Spname"; echo ""; echo ""; echo "   "; echo ""; echo ""; echo "

$strBack"; echo "

"; echo "
"; } } echo ""; {// Signaling/Traffic {//DPC $DPC_sysId = '222_99_99'; $DPC_sysIdArr = explode('_',$DPC_sysId); $DPC_sysTypeNo = $DPC_sysIdArr[0]; $DPC_sysNo = $DPC_sysIdArr[1]; $DPC_subSysNo = $DPC_sysIdArr[2]; $DPC_oidstr = '2.4.1'; $DPC_objWhereStr= ''; $DPC_objWhereStr =getLevelWhere($DPC_oidstr); $DPC_objDb = 'OBJ_'.$DPC_sysTypeNo; $DPC_paramTable = 'param_'.$DPC_sysNo; $DPC_paramSql = " SELECT initValue,readValue,instanceNo FROM $DPC_paramTable WHERE $DPC_objWhereStr AND instanceNo ='$linkset' "; if($DEBUG) echo "$DPC_paramSql
"; $DPC_Result = mysqli_query($pubConn,$DPC_paramSql); $DPC_Row = mysqli_fetch_array($DPC_Result); $linkset_DPC = hexdec(getBitValue($DPC_Row[initValue],'0.0-2.7')); $NetID = bindec(getBitValue($DPC_Row[initValue],'3.0-3.1')); } {//WXC2 OPC ************************ $oidstr = '2.2'; $aas_link_Db = 'OBJ_222'; $aas_link_Table = 'param_99'; $subSysNo = 99; $objWhereStr= ''; $objWhereStr =getLevelWhere($oidstr); $paramSql = " SELECT initValue,readValue,instanceNo FROM $aas_link_Table WHERE $objWhereStr AND subSysNo = '$subSysNo' "; if($DEBUG) echo "$paramSql
"; $aas_Result = mysqli_query($pubConn,$paramSql); $aas_Row = mysqli_fetch_array($aas_Result); $NIbit = getBitValue($aas_Row[initValue],"0.$NetID"); $tmp = $NetID+1+$NIbit*4; $oidstr = '2.3.'.$tmp; $objWhereStr= ''; $objWhereStr =getLevelWhere($oidstr); $updSql = "SELECT initValue FROM $aas_link_Table WHERE $objWhereStr AND instanceNo = '0' AND subSysNo = '$subSysNo' "; $Result = mysqli_query($pubConn,$updSql); $Row = mysqli_fetch_array($Result); $WXC2PC = hexdec($Row[initValue]); } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; /* echo ""; echo ""; echo ""; echo ""; */ } $otherWhereStr = "and subSysNo=$this_subSysNo"; {//clock source {//show clockSource echo ""; echo ""; echo ""; echo ""; } {//show COMMAND echo ""; echo ""; echo ""; echo ""; } } { $oidstr = "2.2.1"; $objWhereStr = getLevelWhere($oidstr); $selSql = "select initValue from $paramTab where $objWhereStr and subSysNo='$this_subSysNo' "; $result = mysqli_query($pubConn,$selSql); $row = mysqli_fetch_array($result); $enableValue = $row[initValue]; $oidstr = "2.2.3"; $objWhereStr = getLevelWhere($oidstr); $selSql = "select initValue from $paramTab where $objWhereStr and subSysNo='$this_subSysNo' "; $result = mysqli_query($pubConn,$selSql); $row = mysqli_fetch_array($result); $CRC4Value = $row[initValue]; $oidstr = "2.1.1"; $objWhereStr = getLevelWhere($oidstr); $selSql = "select initValue from $paramTab where $objWhereStr and subSysNo='$this_subSysNo' "; $result = mysqli_query($pubConn,$selSql); $row = mysqli_fetch_array($result); $NTLTValue = $row[initValue]; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; for($i=0; $i<8; $i++) { $oidstr = "2.1.2"; $objWhereStr = getLevelWhere($oidstr); $selSql = "select initValue from $paramTab where $objWhereStr and subSysNo='$this_subSysNo' and instanceNo='$i'"; $result = mysqli_query($pubConn,$selSql); $row = mysqli_fetch_array($result); $CircuitValue = $row[initValue]; $portType= bindec(getBitValue($CircuitValue,'00.3-00.5')); $backoff = bindec(getBitValue($CircuitValue,'00.2-00.2')); $circuitSlc = bindec(getBitValue($CircuitValue,'00.0-00.1')); $group = bindec(getBitValue($CircuitValue,'00.6-00.7')); echo ""; echo ""; {//Enable echo ""; } {//CRC4 echo ""; } {//port type echo ""; } {//back off echo ""; } {//circuit selection echo ""; } {//NT/LT echo ""; } {//Group echo ""; } echo ""; echo ""; } } echo "
Signaling point code$linkset_DPC 
NetWork indicator$NetIdConfArr[$NetID]"; echo ""; echo "
WXC2 Point Code$WXC2PC"; echo "
Clock source"; $oidStr = "2.2.2"; $instanceNo = 0; $doingOtherUlr=""; showParameter($sysId,$oidStr,1,1,$instanceNo,$doingOtherUlr,$otherWhereStr); echo"
Command"; $oidStr = "2.3.1"; $instanceNo = 0; $doingOtherUlr=""; showParameter($sysId,$oidStr,1,1,$instanceNo,$doingOtherUlr,$otherWhereStr); echo"
E1E1#EnableCRC4Port typeBack offCircuit selectNT/LTGroupChannel
$i"; $oidStr = "2.2.1"; $instanceNo = 0; $doingOtherUlr=""; $order = $i+1; showParameter($sysId,$oidStr,$order,1,$instanceNo,$doingOtherUlr,$otherWhereStr); echo ""; $bitStr = "{0.$i-0.$i}"; $CRC4[$i]=bindec(getBitValue($CRC4Value,$bitStr)); if($i < 4)//后四个可以设置,前四个与8ke1板对应(默认为off => 0) { if($CRC4[$i] == 1) { $CRC4Value = setBitValue($CRC4Value,$bitStr,'0'); $oidstr = "2.2.3"; $objWhereStr = getLevelWhere($oidstr); $updSql = "update $paramTab set initValue='$CRC4Value' where $objWhereStr and subSysNo='$this_subSysNo' "; mysqli_query($pubConn,$updSql); echo mysqli_error($pubConn); if(0)echo "
$updSql"; } echo "{$CRC4Arr[0][name]}"; } else { $oidStr = "2.2.3"; $instanceNo = 0; $doingOtherUlr=""; $order = $i+1; showParameter($sysId,$oidStr,$order,1,$instanceNo,$doingOtherUlr,$otherWhereStr); } echo "
"; if(isset(${"portType_edit_$i"})) { echo ""; echo ""; } else { echo ""; echo "{$portTypeArr[$portType][name]}"; } echo""; if($i < 4)//前四个与TG中的Backoff相反,设为on { echo ""; echo "{$backoffArr[1][name]}"; if($backoff!=1) { $oidstr = "2.1.2"; $objWhereStr = getLevelWhere($oidstr); $selSql = "select initValue from $paramTab where $objWhereStr and subSysNo='$this_subSysNo' and instanceNo='$i' "; $result = mysqli_query($pubConn,$selSql); $row = mysqli_fetch_array($result); $setValue = $row[initValue]; $setValue = setBitValue($setValue,'00.2-00.2','1'); $updSql = "update $paramTab set initValue='$setValue' where $objWhereStr and subSysNo='$this_subSysNo' and instanceNo='$i' "; mysqli_query($pubConn,$updSql); echo mysqli_error($pubConn); } } else { $oidStr = "2.1.2"; $instanceNo = $i; $doingOtherUlr=""; $order = 2; showParameter($sysId,$oidStr,$order,1,$instanceNo,$doingOtherUlr,$otherWhereStr); } echo""; if($i < 4)//前四个与TG中的circuit selection相反,设为3 { echo ""; echo "{$circuitSlcArr[3]}"; if($circuitSlc != 3) { $oidstr = "2.1.2"; $objWhereStr = getLevelWhere($oidstr); $selSql = "select initValue from $paramTab where $objWhereStr and subSysNo='$this_subSysNo' and instanceNo='$i' "; $result = mysqli_query($pubConn,$selSql); $row = mysqli_fetch_array($result); $setValue = $row[initValue]; $setValue = setBitValue($setValue,'00.0-00.1','11'); $updSql = "update $paramTab set initValue='$setValue' where $objWhereStr and subSysNo='$this_subSysNo' and instanceNo='$i' "; mysqli_query($pubConn,$updSql); echo mysqli_error($pubConn); } } else { $oidStr = "2.1.2"; $instanceNo = $i; $doingOtherUlr=""; $order = 1; showParameter($sysId,$oidStr,$order,1,$instanceNo,$doingOtherUlr,$otherWhereStr); } echo""; $bitStr = "{0.$i-0.$i}"; $NTLT[$i]=bindec(getBitValue($NTLTValue,$bitStr)); if($i < 4) { echo ""; echo "--"; } else { $oidStr = "2.1.1"; $instanceNo = 0; $doingOtherUlr=""; $order = $i+1; showParameter($sysId,$oidStr,$order,1,$instanceNo,$doingOtherUlr,$otherWhereStr); } echo ""; $oidStr = "2.1.2"; $instanceNo = $i; $doingOtherUlr=""; $order = 4; showParameter($sysId,$oidStr,$order,1,$instanceNo,$doingOtherUlr,$otherWhereStr); echo"Edit
"; echo "
"; echo "Link to PCR"; echo "
"; echo "
"; ?>