subSysNo=$subSysNo"; $portNo = $pNum%8; if($DEBUG)echo "
portNo=$portNo"; $tgTypeArr=array( array('num' => '0', 'remark' => 'PSTN', 'color' => '#FF0000'), array('num' => '1', 'remark' => 'HPLMN', 'color' => '#0000FF'), array('num' => '2', 'remark' => 'VPLMN', 'color' => '#0000FF'), array('num' => '3', 'remark' => 'subscriber', 'color' => '#0000FF'), array('num' => '4', 'remark' => '--', 'color' => '#0000FF') ); $netTypeArr=array( array('num' => '0', 'remark' => 'International', 'color' => '#FF0000'), array('num' => '1', 'remark' => 'International spare', 'color' => '#0000FF'), array('num' => '2', 'remark' => 'National ', 'color' => '#0000FF'), array('num' => '3', 'remark' => 'National spare', 'color' => '#0000FF'), array('num' => '4', 'remark' => '--', 'color' => '#0000FF') ); $cirTypeArr=array( array('num' => '0', 'remark' => 'clockwise', 'color' => '#FF0000'), array('num' => '1', 'remark' => 'anti-clockwise', 'color' => '#0000FF'), array('num' => '2', 'remark' => 'odd', 'color' => '#0000FF'), array('num' => '3', 'remark' => 'even', 'color' => '#0000FF'), array('num' => '4', 'remark' => '--', 'color' => '#0000FF') ); $pageCellTypeArr=array( array('num' => '0', 'remark' => '--'), array('num' => '1', 'remark' => '--'), array('num' => '2', 'remark' => '--'), array('num' => '3', 'remark' => '--'), array('num' => '4', 'remark' => '--'), array('num' => '5', 'remark' => 'by LAC'), array('num' => '6', 'remark' => 'in All Cell') ); //Attributes of TG $oidTg = "2.2.6"; $pTg = explode(".",$oidTg); $i = 0; $wTg = ''; while(isset($pTg[$i])) { $lNum = $i+1; if($DEBUG) echo "
pTg[$i]=$pTg[$i]"; $wTg = $wTg." AND level_$lNum = $pTg[$i] "; $i++; } /************get default value**************/ $defSql = " SELECT initValue FROM paramConf WHERE keyId > 0 ".$wTg; $defRes = @mysqli_query($pubConn,$defSql); $defRow = @mysqli_fetch_array($defRes); $defaultValue = $defRow[initValue]; //echo "
defaultValue=$defaultValue"; if($set || $add) { $field_0 = omc_keep_length(DecHex(BinDec($cellFlag)),0,2); if($DEBUG)echo "
field_0=$field_0"; $field_1 = omc_keep_length(DecHex($tgNum),0,2); if($DEBUG)echo "
field_1=$field_1"; if($add){ $cellFlag = 1; } $field_2 = omc_keep_length(DecHex($lacNum),0,4); if($DEBUG)echo "
field_2=$field_2"; $field_3 = omc_keep_length(DecHex($cellType),0,2); if($DEBUG)echo "
field_3=$field_3"; $initValue = $field_0.$field_1.$field_2.$field_3; $initValue = strtoupper($initValue); if($DEBUG)echo "
initValue=$initValue"; $uTgSql = " UPDATE $tb_2 set initValue = '$initValue' WHERE subSysNo = '99' AND instanceNo = '$tNum' ".$wTg; if($DEBUG)echo "
uTgSql=$uTgSql"; $uTgRes = @mysqli_query($pubConn,$uTgSql); echo mysqli_error($pubConn); echo ""; } /************select value to see************/ //Attributes of TG $tgSql = " SELECT instanceNo,initValue,editValue,readValue FROM $tb_2 WHERE subSysNo = '99' AND instanceNo = '$tNum' ".$wTg." ORDER BY instanceNo "; if($DEBUG) echo "
tgSql=$tgSql"; $tgRes = @mysqli_query($pubConn,$tgSql); $tgRow = @mysqli_fetch_array($tgRes); echo mysqli_error($pubConn); $wDef = " AND ("; do { $instanceNo = $tgRow[instanceNo]; $initValue = $tgRow[initValue]; if($DEBUG) echo "
initValue=$initValue"; if($initValue == $defaultValue){ $tgShow[$instanceNo] = 0; }else{ $tgShow[$instanceNo] = 1; $wDef = $wDef." instanceNo = $instanceNo OR "; } //echo "
tgShow[$instanceNo]=$tgShow[$instanceNo]"; $hex_0 = substr($initValue,0,2); if($DEBUG)echo "
hex_0=$hex_0"; $bin_0 = omc_keep_length(DecBin(HexDec($hex_0)),0,8); if($DEBUG)echo "
bin_0=$bin_0"; $cellFlag = $cellArr[$instanceNo][0] = substr($bin_0,7,1); if($DEBUG)echo "
cellFlag=$cellFlag"; $tgNum = $cellArr[$instanceNo][1] = HexDec(substr($initValue,2,2)); if($DEBUG)echo "
tgNum=$tgNum"; $hLac = substr($initValue,4,2); $lLac = substr($initValue,6,2); $lacNum = $hLac.$lLac; $lacNum = $cellArr[$instanceNo][2] = HexDec($lacNum); if($DEBUG)echo "
lacNum=$lacNum"; $cellType = substr($initValue,8,2); $cellType = $cellArr[$instanceNo][3] = HexDec($cellType); if($DEBUG)echo "
cellType=$cellType"; }while($tgRow = @mysqli_fetch_array($tgRes)); echo "
"; echo ""; if($oType){ $tgFlagSql = " SELECT instanceNo,initValue,editValue,readValue FROM $tb_2 WHERE subSysNo = '99' ".$wTg." ORDER BY instanceNo "; if($DEBUG)echo "
tgFlagSql=$tgFlagSql"; $tgFlagRes = @mysqli_query($pubConn,$tgFlagSql); $tgFlagRow = @mysqli_fetch_array($tgFlagRes); echo mysqli_error($pubConn); do { $instanceNo = $tgFlagRow[instanceNo]; $initValue = $tgFlagRow[initValue]; if($DEBUG)echo "
initValue=$initValue"; //echo "
$initValue == $defaultValue"; if($initValue == $defaultValue){ $tgShow[$instanceNo] = 0; }else{ $tgShow[$instanceNo] = 1; $wDef = $wDef." instanceNo = $instanceNo OR "; } if($DEBUG)echo "
tgShow[$instanceNo]=$tgShow[$instanceNo]"; $hex_7 = substr($initValue,14,2); if($DEBUG)echo "
hex_7=$hex_7"; $bin_7 = omc_keep_length(DecBin(HexDec($hex_7)),0,8); if($DEBUG)echo "
bin_7=$bin_7"; $cellFlag = $cellArr[$instanceNo][0] = substr($bin_7,7,1); if($DEBUG)echo "
cellFlag=$cellFlag"; }while($tgFlagRow = @mysqli_fetch_array($tgFlagRes)); echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; }else{ echo ""; echo ""; echo ""; } echo ""; echo ""; if($cellFlag){ echo ""; }else{ echo ""; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
Add trunk group
Cell"; echo ""; echo "
Location $tNum
EnableYes"; echo "No Yes"; echo "No 
Trunk group
LAC
Page Cell ID Type"; echo ""; echo "
"; //echo "
Remark:"; echo "
"; if($oType){ echo ""; echo "  "; }else{ echo ""; echo "  "; echo ""; } echo ""; echo ""; echo ""; echo "
"; ?> Remarks:

Manage the MS location by correlating TG, LAC and cell ID. Totally 256 locations