正在调试中!!";
?>
";
$backurl = "./hlr.php";
$sysId = '330_99_99';
$nGetComm = 0;
$nSetComm = 3;
$pubDb = "OMC_PUB";
$sqltable_sccp = 'OBJ_223.param_99';
$sqlSccpConf = 'OBJ_223.paramConf';
$sqltable = 'OBJ_330.param_99';
$sqlConf = 'OBJ_330.paramConf';
$sqltable_spc = 'OBJ_222.param_99';
$mtp3_sqlTable = 'OBJ_222.param_99';
$sysStatTable='OMC_PUB.sysStat';
$sysinfo = 'OMC_PUB.sysInfo';
$sysTypeNo = '322';
$NI_arr=array('International','International spare','National','National spare');
$sysId_arr=array(
array('oid'=>'2.1.6', 'sysid'=> '223_99_99', 'selectsysid'=>'-1'),
array('oid'=>'2.2.0', 'sysid'=> '223_99_99', 'selectsysid'=>'-1'),
array('oid'=>'2.4.0', 'sysid'=> '223_99_99', 'selectsysid'=>'-1'),
array('oid'=>'2.1.11', 'sysid'=> '330_99_99', 'selectsysid'=>'-1'),
array('oid'=>'2.1.12', 'sysid'=> '330_99_99', 'selectsysid'=>'-1'),
array('oid'=>'2.1.13', 'sysid'=> '330_99_99', 'selectsysid'=>'-1'),
array('oid'=>'2.1.14', 'sysid'=> '330_99_99', 'selectsysid'=>'-1'),
array('oid'=>'2.1.15', 'sysid'=> '330_99_99', 'selectsysid'=>'-1'),
array('oid'=>'2.1.16', 'sysid'=> '330_99_99', 'selectsysid'=>'-1'),
array('oid'=>'2.1.17', 'sysid'=> '330_99_99', 'selectsysid'=>'-1'),
array('oid'=>'2.1.18', 'sysid'=> '330_99_99', 'selectsysid'=>'-1'),
array('oid'=>'2.1.20', 'sysid'=> '330_99_99', 'selectsysid'=>'-1'),
);
$SaveArr=array(
array('oidstr'=>'3.2', 'setvalue'=>'02' ,'sysid'=>'223_99_99')
);
$getsql = "SELECT sysNo FROM $sysinfo where sysTypeNo = 330";
if($DEBUG) echo "getsql = $getsql
";
$Result = @mysqli_query($pubConn,$getsql);
while($Rows = mysqli_fetch_array($Result))
{
$hlrSysId = "330_".$Rows[sysNo]."_0";
$SaveArr[] = array('oidstr'=>'2.2.2', 'setvalue'=>'01' ,'sysid'=> $hlrSysId);
}
$spcTree_array = array(
array('INT', '14-bit', 'spc_int_14', '2.3.1'),
array('INT-S', '14-bit', 'spc_int_sp_14', '2.3.2'),
array('NAT', '14-bit', 'spc_nat_14', '2.3.3'),
array('NAT-S', '14-bit', 'spc_nat_sp_14', '2.3.4'),
array('International', '24-bit', 'spc_int_24', '2.3.5'),
array('International spare', '24-bit', 'spc_int_sp_24', '2.3.6'),
array('National', '24-bit', 'spc_nat_24', '2.3.7'),
array('National spare', '24-bit', 'spc_nat_sp_24', '2.3.8')
);
$GTTtableConfArr=array(
array('Start number', '03.0-12.7'),
array('End number', '13.0-22.7'),
array('On/off', '00.0-00.7'),
array('Numbering plan', '01.0-01.7'),
array('Network indicator', '23.0-23.7'),
array('DPC', '24.0-26.7'),
array('SSN', '27.0-27.7'),
array('Route indicator', '28.0-28.7'),
array('Address indicator', '29.0-29.7'),
array('Replaced start digit', '30.0-30.7'),
array('Replaced end digit', '31.0-31.7'),
array('Outgoing number plan', '32.0-32.7'),
array('Replacing digits', '33.0-42.7'),
array('TT', '02.0-02.7')
);
$hplmn_loc = array(
'start' => '05.0-10.7',
'end' => '11.0-16.7'
);
//loading
if($load_flag == 1)
{
echo "
Loading";
GetParam($sysId_arr,1);//1 means return to overview if getting parameters fails.
echo "";
}
$querysql = "select initValue from $sqltable_spc where level_1 = '2' and level_2 = '2' and level_3 = '0'";
$result = mysqli_query($pubConn,$querysql);
$indicator = mysqli_fetch_array($result);
echo mysqli_error($pubConn);
if ($DEBUG )echo "
indicator = {$indicator[0]}
";
for($i = 0; $i < 4; $i++)
{
$flag = getBitValue($indicator[0],"0.$i");
if ($flag == 0)
$spc_index[$i] = $i;
else
$spc_index[$i] = $i+4;
}
for($i = 0; $i < 4; $i ++)
{
$levelWhere = getLevelWhere($spcTree_array[$spc_index[$i]][3]);
$getsql = "select initValue from $sqltable_spc where $levelWhere ";
$result = mysqli_query($pubConn,$getsql);
$dpcRow[$i] = mysqli_fetch_array($result);
$dpcRow[$i] = hexdec($dpcRow[$i][0]);
if ($DEBUG )
{
echo "
getsql = $getsql
";
echo "
spc_$i=$dpcRow[$i]";
}
}
$niTypeArr = getNiType();
echo "";
if(isset($doingOtherFlag))
{
{//set system ip
for($i=0; $i < 2; $i++)
{
$getsql = "SELECT ip FROM $sysinfo where sysTypeNo = $sysTypeNo and sysNo = '$i'";
if($DEBUG) echo "getsql = $getsql
";
$ip_init = @mysqli_query($pubConn,$getsql);
$ip_init = mysqli_fetch_array($ip_init);
$ip_init = $ip_init[0];
$ip_array = explode('.',$ip_init);
for($j = 0;$j < sizeof($ip_array);$j++)
{
$ip = $ip_array[$j];
$mss_ip[$i] .= omc_keep_length(dechex($ip),'0','2');
}
}
$mss_ip[0] = strtoupper(omc_keep_length($mss_ip[0],'0','8'));
$mss_ip[1] = strtoupper(omc_keep_length($mss_ip[1],'0','8'));
if($DEBUG)
{
echo "
mss0_ip = $mss_ip[0]
";
echo "mss1_ip = $mss_ip[1]
";
}
$sysId = "223_99_99";
//hlr
if($setHlrGtt==1)
{
$oidStr = "2.1.6";
setParamValue($mss_ip[0],$sysId,$oidStr,3);
setParamValue($mss_ip[1],$sysId,$oidStr,4);
}
}//end set system ip
exit;
}
if($_SERVER['REQUEST_METHOD'] == "POST")
{
if(isset($setSys) || isset($getSys))
{
if(isset($setSys))
{
echo "
Setting parameters
";
SetParam($sysId_arr);
session_register("hlrSetFlag");
$showType="Set";
echo "
Sending save command
";
SaveParam($SaveArr);
echo "";
//exit();
}
else
{
echo "
Getting parameters
";
session_register("GetFlag");
GetParam($sysId_arr);
$showType="Get";
}
}
echo "";
exit();
}
if ($DEBUG ) echo "delFlag = $delflag
";
if ($DEBUG ) echo "delNO = $delValue
";
if (isset($delflag))
{
$delNoStr = rtrim($delNoStr,'.');
$delNoArr = explode('.',$delNoStr);
$instNoWhereStr = '';
for($i=0; $i< sizeof($delNoArr); $i++)
{
if($i==0)
$instNoWhereStr = "(instanceNo='$delNoArr[$i]'";
else
$instNoWhereStr .= " or instanceNo='$delNoArr[$i]'" ;
}
$instNoWhereStr .= ')';
if($delflag=='Regional')
{
$getsql = "select initValue from $sqlConf where level_1 = '2' and level_2 = '1' and level_3 = '14'";
$rsl_org = @mysqli_query($pubConn,$getsql);
$rsl_org = @mysqli_fetch_array($rsl_org);
$rsl_org = $rsl_org[0];
echo mysqli_error($pubConn);
if ($DEBUG ) echo "rsl_org = $rsl_org
";
$setsql = "update $sqltable set initValue = '$rsl_org'
where level_1 = '2' and level_2 = '1' and level_3 = '14' and $instNoWhereStr ";
mysqli_query($pubConn,$setsql);
echo mysqli_error($pubConn);
}
elseif($delflag=='IMSIRange' || $delflag=='MSISDNRange')
{
$defSql = " SELECT initValue FROM $sqlSccpConf WHERE level_1 = '2' and level_2 = '2' and level_3 = '0'";
$defRes = @mysqli_query($pubConn,$defSql);
$defrow = @mysqli_fetch_array($defRes);
$setsql = "update $sqltable_sccp set initValue = '$defrow[initValue]'
where level_1 = '2' and level_2 = '2' and level_3 = '0' and $instNoWhereStr ";
mysqli_query($pubConn,$setsql);
echo mysqli_error($pubConn);
$defSql = " SELECT initValue FROM $sqlSccpConf WHERE level_1 = '2' and level_2 = '4' and level_3 = '0'";
$defRes = @mysqli_query($pubConn,$defSql);
$defrow = @mysqli_fetch_array($defRes);
$setsql = "update $sqltable_sccp set initValue = '$defrow[initValue]'
where level_1 = '2' and level_2 = '4' and level_3 = '0' and $instNoWhereStr ";
mysqli_query($pubConn,$setsql);
echo mysqli_error($pubConn);
}
elseif($delflag=='VPLMNs')
{
$defSql = " SELECT initValue FROM paramConf WHERE level_1 = '2' and level_2 = '1' and level_3 = '12'";
$defRes = @mysqli_query($pubConn,$defSql);
$defrow = @mysqli_fetch_array($defRes);
$setsql = "update $sqltable set initValue = '$defrow[initValue]'
where level_1 = '2' and level_2 = '1' and level_3 = '12' and $instNoWhereStr ";
mysqli_query($pubConn,$setsql);
echo mysqli_error($pubConn);
}
elseif($delflag=='USSDEAE')
{
$oidStr = "2.1.20.3";
$levelWhere = getLevelWhere($oidStr);
$defSql = " SELECT initValue FROM paramConf WHERE $levelWhere";
$defRes = @mysqli_query($pubConn,$defSql);
$defrow = @mysqli_fetch_array($defRes);
$setsql = "update $sqltable set initValue = '$defrow[initValue]'
where $levelWhere and $instNoWhereStr ";
mysqli_query($pubConn,$setsql);
echo mysqli_error($pubConn);
}
elseif($delflag=='faxGsmBcId')
{
$defSql = " SELECT initValue FROM paramConf WHERE level_1 = '2' and level_2 = '1' and level_3 = '17'";
$defRes = @mysqli_query($pubConn,$defSql);
$defrow = @mysqli_fetch_array($defRes);
$setsql = "update $sqltable set initValue = '$defrow[initValue]'
where level_1 = '2' and level_2 = '1' and level_3 = '17' and instanceNo = '$delValue' ";
mysqli_query($pubConn,$setsql);
echo mysqli_error($pubConn);
}
elseif($delflag=='dataGsmBcId')
{
$defSql = " SELECT initValue FROM paramConf WHERE level_1 = '2' and level_2 = '1' and level_3 = '18'";
$defRes = @mysqli_query($pubConn,$defSql);
$defrow = @mysqli_fetch_array($defRes);
$setsql = "update $sqltable set initValue = '$defrow[initValue]'
where level_1 = '2' and level_2 = '1' and level_3 = '18' and instanceNo = '$delValue' ";
mysqli_query($pubConn,$setsql);
echo mysqli_error($pubConn);
}
elseif($delflag=='RSA')
{
$getsql = "select initValue from $sqlConf where level_1 = '2' and level_2 = '1' and level_3 = '29'";
$rsl_org = @mysqli_query($pubConn,$getsql);
$rsl_org = @mysqli_fetch_array($rsl_org);
$rsl_org = $rsl_org[0];
echo mysqli_error($pubConn);
if ($DEBUG ) echo "rsl_org = $rsl_org
";
$setsql = "update $sqltable set initValue = '$rsl_org'
where level_1 = '2' and level_2 = '1' and level_3 = '29' and instanceNo = '$delValue' ";
mysqli_query($pubConn,$setsql);
echo mysqli_error($pubConn);
}
elseif($delflag=='ACS_DIGI')
{
if($DEBUG)echo "
Deleteing access digits instance $delValue of RA $delValue2";
//delete access_digits
$setsql = "update $sqltable set initValue = '$access_digit_default'
where level_1 = '2' and level_2 = '1' and level_3 = '30' and instanceNo = '$delValue'";
mysqli_query($pubConn,$setsql);
echo mysqli_error($pubConn);
//delete prefix
delete_prefix_of_RA($delValue2);
}
}
//==========================================================
//输出并显示数据
//==========================================================
echo "