init web ems all
This commit is contained in:
311
wxc2_omc/configuration/confSs7/gttLocalConf.php
Executable file
311
wxc2_omc/configuration/confSs7/gttLocalConf.php
Executable file
@@ -0,0 +1,311 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߺ<EFBFBD><DFBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD> Local node
|
||||
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: header.inc
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
|
||||
<20><><EFBFBD>ߣ<EFBFBD>
|
||||
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Cui Ticun
|
||||
ʱ<EFBFBD>䣺2004-4-21
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Suport OMC7.0,<2C><>advanced<65>Ƶ<EFBFBD>configuration<6F>У<EFBFBD><D0A3><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><CFB7>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>ť
|
||||
*********************************************************/
|
||||
require("../../inc/header.inc");
|
||||
$DEBUG = 0;
|
||||
|
||||
if($DEBUG) echo "<br><3E><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD>";
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
$pubDb = 'OMC_PUB';
|
||||
$paramTable ='OBJ_223.param_99';
|
||||
|
||||
$sysId ='223_99_99';
|
||||
//$instanceNo ='0';
|
||||
$listPageUrl = "gttLocalList.php?setObjIdStr=$objIdStr&setInstanceNo=$instanceNo";
|
||||
|
||||
$valueName ='initValue';
|
||||
$totalLen=19;
|
||||
|
||||
$localNodeConfArr=array(
|
||||
array('NetID', '00.0-00.7'),
|
||||
array('MSISDN', '01.0-10.7'),
|
||||
array('IP0', '11.0-14.7'),
|
||||
array('IP1', '15.0-18.7')
|
||||
);
|
||||
|
||||
$localNodeArr=array(
|
||||
array('2.1.4', 'OMC'),
|
||||
array('2.1.6', 'HLR'),
|
||||
array('2.1.7', 'VLR'),
|
||||
array('2.1.8', 'MSC'),
|
||||
array('2.1.9', 'EIR'),
|
||||
array('2.1.10', 'AUC'),
|
||||
array('2.1.11', 'SMSC'),
|
||||
array('2.1.19', 'SMPP-PPS'),
|
||||
array('2.1.20', 'SMPP-SMSC'),
|
||||
array('2.1.21', 'SMPP-OMC'),
|
||||
|
||||
array('2.1.22', 'SRF0'),
|
||||
array('2.1.23', 'SRF1'),
|
||||
array('2.1.24', 'SRF2'),
|
||||
array('2.1.25', 'SRF3'),
|
||||
|
||||
array('2.1.32', 'MNP'),
|
||||
array('2.1.33', 'OPPS'),
|
||||
array('2.1.146','SSF'),
|
||||
array('2.1.147','SCF-CAP'),
|
||||
array('2.1.153','SCF-MAP'),
|
||||
array('2.1.254','AIF')
|
||||
);
|
||||
|
||||
if(isset($setSys)){
|
||||
if($DEBUG){
|
||||
echo "<br>nServerName=$nServerName";
|
||||
echo "<br>nMsisdn=$nMsisdn";
|
||||
echo "<br>nNetIDName=$nNetIDName";
|
||||
echo "<br>nIpStr_0=$nIpStr_0";
|
||||
echo "<br>nIpStr_1=$nIpStr_1";
|
||||
}
|
||||
|
||||
for($i=0;$i<$totalLen;$i++){
|
||||
$totalValue=$totalValue."00";
|
||||
}
|
||||
if($DEBUG) echo "<br>totalValue=$totalValue<br>";
|
||||
|
||||
if($nIpStr_0=='')
|
||||
$nIpStr_0="FFFFFFFF";
|
||||
else
|
||||
$nIpStr_0=ip2byte($nIpStr_0);
|
||||
|
||||
if($nIpStr_1=='')
|
||||
$nIpStr_1="FFFFFFFF";
|
||||
else{
|
||||
$ip1Des = explode('.',$nIpStr_1);
|
||||
$nIpStr_1=ip2byte($nIpStr_1);
|
||||
}
|
||||
|
||||
if($DEBUG) echo "<br>nIpStr_0=$nIpStr_0";
|
||||
if($DEBUG) echo "<br>nIpStr_1=$nIpStr_1";
|
||||
|
||||
|
||||
$nMsisdn =str_replace('-','F',$nMsisdn);
|
||||
//<2F><><EFBFBD><EFBFBD>msisdn
|
||||
$nMsisdn = omc_keep_length($nMsisdn,"F","22","0");
|
||||
if($DEBUG) echo "<br>nMsisdn=$nMsisdn";
|
||||
|
||||
$totalValue=setBitValue($totalValue,$localNodeConfArr[0][1],$nNetIDName);
|
||||
$totalValue=setBitValue($totalValue,$localNodeConfArr[1][1],$nMsisdn);
|
||||
$totalValue=setBitValue($totalValue,$localNodeConfArr[2][1],$nIpStr_0);
|
||||
$totalValue=setBitValue($totalValue,$localNodeConfArr[3][1],$nIpStr_1);
|
||||
|
||||
if($DEBUG) echo "<br><br>sysId=$sysId";
|
||||
if($DEBUG) echo "<br>objIdStr=$objIdStr";
|
||||
if($DEBUG) echo "<br>instanceNo=$instanceNo";
|
||||
if($DEBUG) echo "<br>totalValue=$totalValue<br>";
|
||||
$levelArr=explode('.',$objIdStr);
|
||||
for($j=0;$j<sizeof($levelArr);$j++){
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG) echo "<BR>levelArr[$j]={$levelArr[$j]}";
|
||||
}
|
||||
|
||||
$updSql = "UPDATE $paramTable SET initValue = '$totalValue'
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND level_3='$level_3' AND instanceNo='$instanceNo'
|
||||
";
|
||||
if($DEBUG) echo "<BR>updSql=$updSql";
|
||||
mysqli_query($pubConn,$updSql);
|
||||
echo mysqli_error($pubConn);
|
||||
//setSysParamValue($sysId,$objIdStr,$instanceNo,$totalValue);
|
||||
echo "<script LANGUAGE=\"JavaScript\">";
|
||||
echo "\n window.opener.location.href=\"$listPageUrl\";";
|
||||
if(!$DEBUG){
|
||||
echo "\n window.close();";
|
||||
}
|
||||
echo "\n </script>";
|
||||
exit();
|
||||
}
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<BR>sysId =$sysId";
|
||||
if($DEBUG) echo "<BR>instanceNo =$instanceNo";
|
||||
if($DEBUG) echo "<BR>objIdStr =$objIdStr";
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>
|
||||
//==========================================================
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<BR>";
|
||||
?>
|
||||
<br>
|
||||
<body topmargin="0" leftmargin="12">
|
||||
<form name="selectform">
|
||||
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
|
||||
<?php
|
||||
echo "<tr bgcolor=\"#E6E6E6\"><td>Name</td><td>Value</td></tr>";
|
||||
for($i=0;$i<sizeof($localNodeArr);$i++){
|
||||
if($objIdStr == $localNodeArr[$i][0]){
|
||||
$serverName =$localNodeArr[$i][1];
|
||||
|
||||
$levelArr=explode('.',$objIdStr);
|
||||
for($j=0;$j<sizeof($levelArr);$j++){
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG) echo "<BR>levelArr[$j]={$levelArr[$j]}";
|
||||
}
|
||||
$getSql="SELECT $valueName
|
||||
FROM $paramTable
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND level_3='$level_3' AND instanceNo='$instanceNo'
|
||||
";
|
||||
if($DEBUG) echo "<BR>getSql=$getSql";
|
||||
$result =mysqli_query($pubConn,$getSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$rows =mysqli_fetch_array($result);
|
||||
echo mysqli_error($pubConn);
|
||||
$value=$rows[0];
|
||||
//$value =getSysParamValue($sysId,$objIdStr,$instanceNo,$valueName);
|
||||
|
||||
$netId =getBitValue($value,$localNodeConfArr[0][1]);
|
||||
/*
|
||||
for($j=0;$j<sizeof($NetIdConfArr);$j++){
|
||||
if($netId == $NetIdConfArr[$j][0]){
|
||||
$NetID= $NetIdConfArr[$j][1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
$msisdn =getBitValue($value,$localNodeConfArr[1][1]);
|
||||
$msisdn =str_replace('F','',$msisdn);
|
||||
|
||||
$ip_0 =getBitValue($value,$localNodeConfArr[2][1]);
|
||||
if($ip_0=='FFFFFFFF')
|
||||
$ipStr_0='';
|
||||
else
|
||||
$ipStr_0=byte2ip($ip_0);
|
||||
|
||||
$ip_1 =getBitValue($value,$localNodeConfArr[3][1]);
|
||||
if($ip_1=='FFFFFFFF')
|
||||
$ipStr_1='';
|
||||
else
|
||||
$ipStr_1=byte2ip($ip_1);
|
||||
if($DEBUG) echo "<BR>value=$value";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td>Server name</td>";
|
||||
echo "<td>$serverName</td>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td>MSISDN</td>";
|
||||
echo "<td><input type=\"text\" maxlength=\"22\" value='$msisdn' class=\"text\" name=\"nMsisdn\"></td>";
|
||||
echo "</tr>";
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td>Network indicator</td>
|
||||
<td>
|
||||
<select name="nNetIDName">
|
||||
<?php
|
||||
if($netId==0){
|
||||
echo "<option value=\"00\" selected>$strInternationalNetwork";
|
||||
echo "<option value=\"01\">$strInternationalNetworkSpare";
|
||||
echo "<option value=\"02\">$strNationalNetwork";
|
||||
echo "<option value=\"03\">$strNationalNetworkSpare";
|
||||
}elseif($netId==1){
|
||||
echo "<option value=\"00\">$strInternationalNetwork";
|
||||
echo "<option value=\"01\" selected>$strInternationalNetworkSpare";
|
||||
echo "<option value=\"02\">$strNationalNetwork";
|
||||
echo "<option value=\"03\">$strNationalNetworkSpare";
|
||||
}elseif($netId==2){
|
||||
echo "<option value=\"00\">$strInternationalNetwork";
|
||||
echo "<option value=\"01\">$strInternationalNetworkSpare";
|
||||
echo "<option value=\"02\" selected>$strNationalNetwork";
|
||||
echo "<option value=\"03\">$strNationalNetworkSpare";
|
||||
}elseif($netId==3){
|
||||
echo "<option value=\"00\">$strInternationalNetwork";
|
||||
echo "<option value=\"01\">$strInternationalNetworkSpare";
|
||||
echo "<option value=\"02\">$strNationalNetwork";
|
||||
echo "<option value=\"03\" selected>$strNationalNetworkSpare";
|
||||
}
|
||||
else{
|
||||
echo "<option value=\"00\" selected>$strInternationalNetwork";
|
||||
echo "<option value=\"01\">$strInternationalNetworkSpare";
|
||||
echo "<option value=\"02\">$strNationalNetwork";
|
||||
echo "<option value=\"03\">$strNationalNetworkSpare";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
echo "<tr>";
|
||||
echo "<td>Plane 0's IP</td>";
|
||||
echo "<td><input type=\"text\" maxlength=\"15\" value='$ipStr_0' class=\"text\" name=\"nIpStr_0\"></td>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td>Plane 1's IP</td>";
|
||||
echo "<td><input type=\"text\" maxlength=\"15\" value='$ipStr_1' class=\"text\" name=\"nIpStr_1\"></td>";
|
||||
echo "</tr>";
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<input type="submit" value=<?php echo "$strSet"; ?> class="button" name="setSys">
|
||||
<input type="reset" name="Reset" value ="Reset" class="button">
|
||||
<input type="hidden" name="sysId" value="<?php echo "$sysId"; ?>">
|
||||
<input type="hidden" name="instanceNo" value="<?php echo "$instanceNo"; ?>">
|
||||
<input type="hidden" name="objIdStr" value="<?php echo "$objIdStr"; ?>">
|
||||
|
||||
</form>
|
||||
<b>Remark:</b><br>
|
||||
<br>
|
||||
The local node table contains overall SCCP (MAP and CAP) addressing setup for all entities of the WXC2 System. The local table is used for SCCP addressing. The IP 0 and 1 are IP addresses of the dual server 0 and 1 respectively. Generally the SSN, IP 0 and IP1 are fixed in the local node table, and only MSISDN field needs filling. For All-in-one server (MSS), the IP addresses of MSC, VLR HLR, PPS, SSF, AUC and EIR are same, MSS 0 IP is 172.18.98.1, MSS 1 IP is 172.18.99.1. To modify the local node of a server, click on the name of the server to open the local node set window.<br><br>
|
||||
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
|
||||
<tr bgcolor="#E6E6E6"><td>Entity</td><td> SSN</td><td> MSISDN</td><td> IP 0</td><td> IP 1</td></tr>
|
||||
<tr><td>MSC</td><td> 0x08</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>VLR</td><td> 0x07</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>HLR</td><td> 0x06</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>PPS</td><td> 0x93</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>SMSC</td><td>0x0B</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>SSF</td><td> 0x93</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>AIF</td><td> 0xFE</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>AUC</td><td> 0x0A</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>EIR</td><td> 0x09</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>VMS</td><td> 0x0C</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>OMC</td><td> 0x04</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>EIR</td><td> 0x09</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>SMPP-EMSE</td><td> 0x13</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>SMPP-SMSC</td><td> 0x14</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>SMPP-OMC</td><td> 0x15</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>SRF0</td><td> 0x16</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>SRF1</td><td> 0x17</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>SRF2</td><td> 0x18</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>SRF3</td><td> 0x19</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>MNP</td><td> 0x20</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>OPPS</td><td> 0x21</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>SSF</td><td> 0x92</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>SCF-CAP</td><td> 0x93</td><td> </td><td>--</td><td>--</td></tr>
|
||||
<tr><td>SCF-MAP</td><td> 0x99</td><td> </td><td>--</td><td>--</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
433
wxc2_omc/configuration/confSs7/gttLocalList.php
Executable file
433
wxc2_omc/configuration/confSs7/gttLocalList.php
Executable file
@@ -0,0 +1,433 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߺ<EFBFBD><DFBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD> Local node
|
||||
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: header.inc
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
|
||||
<20><><EFBFBD>ߣ<EFBFBD>
|
||||
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Cui Ticun
|
||||
ʱ<EFBFBD>䣺2004-4-21
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Support OMC7.0,<2C><>advanced<65>Ƶ<EFBFBD>configuration<6F>У<EFBFBD><D0A3><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><CFB7>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>ť
|
||||
*********************************************************/
|
||||
require("../../inc/header.inc");
|
||||
$helpId = "2.1.0";
|
||||
$DEBUG = 0;
|
||||
?>
|
||||
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
|
||||
<?php
|
||||
adjust_head();
|
||||
adjust_title_head();
|
||||
if($DEBUG) echo "<br><3E><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD>";
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
$pubDb = 'OMC_PUB';
|
||||
$paramTable ='OBJ_223.param_99';
|
||||
$maxNum = 30;
|
||||
|
||||
$sysId ='223_99_99';
|
||||
$instanceNo ='0';
|
||||
$initValue ='initValue';
|
||||
$editValue ='editValue';
|
||||
$readValue ='readValue';
|
||||
|
||||
$nGetComm = 0;
|
||||
$nSetComm = 3;
|
||||
|
||||
$nProcFail = 0;//failure
|
||||
$nWaitProc = 1;//wait
|
||||
$nInProc = 2;
|
||||
$nOutProc = 3;
|
||||
|
||||
if($DEBUG) echo "<br>setObjIdStr = $setObjIdStr";
|
||||
if($DEBUG) echo "<br>setInstanceNo = $setInstanceNo";
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>
|
||||
//==========================================================
|
||||
$localNodeObjId='2.1';
|
||||
$localNodeArr=array(
|
||||
array('2.1.4', 'OMC'),
|
||||
array('2.1.6', 'HLR'),
|
||||
array('2.1.7', 'VLR'),
|
||||
array('2.1.8', 'MSC'),
|
||||
array('2.1.9', 'EIR'),
|
||||
array('2.1.10', 'AUC'),
|
||||
array('2.1.11', 'SMSC'),
|
||||
array('2.1.19', 'SMPP-PPS'),
|
||||
array('2.1.20', 'SMPP-SMSC'),
|
||||
array('2.1.21', 'SMPP-OMC'),
|
||||
|
||||
array('2.1.22', 'SRF0'),
|
||||
array('2.1.23', 'SRF1'),
|
||||
array('2.1.24', 'SRF2'),
|
||||
array('2.1.25', 'SRF3'),
|
||||
|
||||
array('2.1.32', 'MNP'),
|
||||
array('2.1.33', 'OPPS'),
|
||||
array('2.1.146','SSF'),
|
||||
array('2.1.147','SCF-CAP'),
|
||||
array('2.1.153','SCF-MAP'),
|
||||
array('2.1.254','AIF')
|
||||
);
|
||||
|
||||
$localNodeConfArr=array(
|
||||
array('NetID', '00.0-00.7'),
|
||||
array('MSISDN', '01.0-10.7'),
|
||||
array('IP0', '11.0-14.7'),
|
||||
array('IP1', '15.0-18.7')
|
||||
);
|
||||
|
||||
$NetIdConfArr=array(
|
||||
array('0','international'),
|
||||
array('1','international spare'),
|
||||
array('2','national'),
|
||||
array('3','national spare')
|
||||
);
|
||||
|
||||
if(isset($setSys) || isset($getSys)){
|
||||
echo "<br><br><br><br><br>";
|
||||
if($DEBUG) echo "<br>sysId=$sysId";
|
||||
$objIdStr=$localNodeObjId;
|
||||
if($DEBUG) echo "<br>objIdStr=$objIdStr";
|
||||
if(isset($setSys)){
|
||||
$moveSql = "UPDATE $paramTable SET readValue = initValue
|
||||
WHERE level_1='2' AND level_2='1'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$commIdStr = sysCommSend($sysId,$nSetComm,$objIdStr);
|
||||
|
||||
if($DEBUG) echo "<br>nSetComm";
|
||||
$showType="Set";
|
||||
}else{
|
||||
$commIdStr = sysCommSend($sysId,$nGetComm,$objIdStr);
|
||||
$showType="Get";
|
||||
}
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>$showType Local node";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "223_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
$needCopyReadBuf=1;
|
||||
$moveSql = "UPDATE $paramTable SET initValue = readValue
|
||||
WHERE level_1='2' AND level_2='1'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
}elseif(isset($saveSys)){
|
||||
$objIdStr=$localNodeObjId;
|
||||
$updSql = " UPDATE $paramTable SET initValue = '02'
|
||||
WHERE level_1 = '3' AND level_2 = '2'
|
||||
";
|
||||
$updRes = @mysqli_query($pubConn,$updSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$commIdStr=sysCommSend($sysId,$nSetComm,'3.2');
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Save parameter to system";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "223_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
}elseif(isset($resetSys)){
|
||||
$objIdStr=$localNodeObjId;
|
||||
$updSql = " UPDATE $paramTable SET initValue = '00'
|
||||
WHERE level_1 = '3' AND level_2 = '2'
|
||||
";
|
||||
$updRes = @mysqli_query($pubConn,$updSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$commIdStr=sysCommSend($sysId,$nSetComm,'3.2');
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Reset system";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "223_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($setSys || $getSys || $saveSys || $undoSet||$resetSys){
|
||||
echo "<br>";
|
||||
echo "<p align=\"left\"><a href=\"$PHP_SELF?setFlag=$setFlag\" target=\"contents\"><img align=absBottom border=0 src=\"../../images/left.gif\" width=\"14\" height=\"14\">$strBack</a>";
|
||||
exit();
|
||||
}
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<BR>";
|
||||
?>
|
||||
|
||||
<script LANGUAGE="JavaScript">
|
||||
function openSet(objIdStr,instanceNo){
|
||||
URL="./gttLocalConf.php?instanceNo="+instanceNo+"&objIdStr="+objIdStr;
|
||||
var setWindow = open(URL, 'newWin', 'toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,status=yes,width=400,height=350');
|
||||
setWindow.focus();
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
function ChComm($sysId,$chkType)
|
||||
{
|
||||
global $omc_db;
|
||||
global $remark,$nProcFail,$nWaitProc,$nInProc,$nOutProc;
|
||||
|
||||
$commTable = "parameterComm";
|
||||
|
||||
$sysIdArr = explode('_',$sysId);
|
||||
$sysTypeNo = $sysIdArr[0];
|
||||
$sysNo = $sysIdArr[1];
|
||||
$subSysNo = $sysIdArr[2];
|
||||
|
||||
if($chkType==0)
|
||||
$selComm = " SELECT commState,remark FROM $commTable WHERE sysTypeNo = '$sysTypeNo' ";
|
||||
else
|
||||
$selComm = " SELECT commState,remark FROM $commTable WHERE sysTypeNo = '$sysTypeNo' AND sysNo = '$sysNo' ";
|
||||
|
||||
$selRes = @mysqli_query($pubConn,$selComm);
|
||||
$selRow = @mysqli_fetch_array($selRes);
|
||||
echo mysqli_error($pubConn);
|
||||
$outProcCount=0;
|
||||
do
|
||||
{
|
||||
$temCommState = $selRow[commState];
|
||||
if(isset($selRow[remark])){
|
||||
$remark = $selRow[remark];
|
||||
if($DEBUG)echo "<br>remark=$remark";
|
||||
}
|
||||
if($DEBUG)echo "<br>temCommState=$temCommState";
|
||||
if($temCommState == $nWaitProc){
|
||||
return($nWaitProc);
|
||||
}elseif($temCommState == $nInProc){
|
||||
return($nInProc);
|
||||
}elseif($temCommState == $nOutProc){
|
||||
$commState = $nOutProc;
|
||||
$outProcCount++;
|
||||
}else{
|
||||
$commState = $nProcFail;
|
||||
}
|
||||
}while($selRow = @mysqli_fetch_array($selRes));
|
||||
if($outProcCount > 0){
|
||||
return($nOutProc);
|
||||
}else{
|
||||
return($nProcFail);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<form name="selectform">
|
||||
<?php
|
||||
|
||||
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
|
||||
echo "<tr>";
|
||||
echo "<td width=\"50%\">";
|
||||
echo "$strConfiguration > $strNetwork > SS7 > $strLocalNode";
|
||||
echo "</td>";
|
||||
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
|
||||
showHelp($helpId);
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td align=\"left\">";
|
||||
|
||||
|
||||
echo "<b>System:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getSys\" value=\"$strGet\" class=\"button\">";
|
||||
echo "<input type=\"submit\" name=\"setSys\" value=\"$strSet\" class=\"button\">";
|
||||
/*
|
||||
if ( TRUE == session_is_registered("gttLSetFlag") ) {
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}else{
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" DISABLED class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}
|
||||
*/
|
||||
echo " ";
|
||||
echo "<b>Command:</b> ";
|
||||
echo "<input type=\"submit\" name=\"saveSys\" value=\"$strSave\" class=\"button\">";
|
||||
echo "<input type=\"submit\" name=\"resetSys\" value=\"$strReset\" class=\"button\">";
|
||||
echo "<input type=\"hidden\" name=\"objIdStr\" value=\"2.1\">";
|
||||
|
||||
echo "</td>";
|
||||
echo "<td> </td>";
|
||||
echo "</table>";
|
||||
|
||||
adjust_title_tail();
|
||||
adjust_content_head();
|
||||
/*
|
||||
echo "<br>";
|
||||
echo "<b>System:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getSys\" value=\"$strGet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"setSys\" value=\"$strSet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"saveSys\" value=\"$strSave\" class=\"button\"style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
if ( TRUE == session_is_registered("gttLSetFlag") ) {
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}else{
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" DISABLED class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}
|
||||
echo "<b>OMC:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getOmc\" value=\"$strGet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"saveOmc\" value=\"$strSave\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
echo "<input type=\"hidden\" name=\"objIdStr\" value=\"2.1\">";
|
||||
echo "<br>";
|
||||
echo "<br>";
|
||||
*/
|
||||
|
||||
|
||||
?>
|
||||
<br>
|
||||
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
|
||||
<?php
|
||||
echo "<tr bgcolor=\"#E6E6E6\">";
|
||||
echo "<td>Entity</td>";
|
||||
echo "<td>MSISDN</td>";
|
||||
echo "<td>Network indicator</td>";
|
||||
echo "<td>IP0 (Server 0)</td>";
|
||||
echo "<td>IP1 (Server 1)</td>";
|
||||
echo "</tr>";
|
||||
for($i=0;$i<sizeof($localNodeArr);$i++){
|
||||
$objIdStr=$localNodeArr[$i][0];
|
||||
$serverName =$localNodeArr[$i][1];
|
||||
$levelArr=explode('.',$objIdStr);
|
||||
for($j=0;$j<sizeof($levelArr);$j++){
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG) echo "<BR>levelArr[$j]={$levelArr[$j]}";
|
||||
}
|
||||
$getSql="SELECT $initValue
|
||||
FROM $paramTable
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND level_3='$level_3' AND instanceNo='$instanceNo'
|
||||
";
|
||||
if($DEBUG) echo "<BR>getSql=$getSql";
|
||||
$result =mysqli_query($pubConn,$getSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$rows =mysqli_fetch_array($result);
|
||||
echo mysqli_error($pubConn);
|
||||
$value=$rows[0];
|
||||
//$value =getSysParamValue($sysId,$objIdStr,$instanceNo,$valueName);
|
||||
$netId =getBitValue($value,$localNodeConfArr[0][1]);
|
||||
for($j=0;$j<sizeof($NetIdConfArr);$j++){
|
||||
if($netId == $NetIdConfArr[$j][0]){
|
||||
$netIdName= $NetIdConfArr[$j][1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$msisdn =getBitValue($value,$localNodeConfArr[1][1]);
|
||||
$msisdn =str_replace('F','',$msisdn);
|
||||
if($msisdn == ''){
|
||||
$msisdn='--';
|
||||
}
|
||||
|
||||
$ip_0 =getBitValue($value,$localNodeConfArr[2][1]);
|
||||
if($ip_0 == 'FFFFFFFF')
|
||||
$ipStr_0='--';
|
||||
else
|
||||
$ipStr_0=byte2ip($ip_0);
|
||||
$ip_1 =getBitValue($value,$localNodeConfArr[3][1]);
|
||||
if($ip_1 == 'FFFFFFFF')
|
||||
$ipStr_1='--';
|
||||
else
|
||||
$ipStr_1=byte2ip($ip_1);
|
||||
// $ipStr_1=byte2ip($ip_1);
|
||||
if($DEBUG) echo "<BR>value=$value";
|
||||
if($instanceNo == $setInstanceNo && $objIdStr==$setObjIdStr)
|
||||
echo "<tr bgcolor=#CCFFCC>";
|
||||
else
|
||||
echo "<tr>";
|
||||
echo "<td><a href=\"javascript:openSet('$objIdStr','$instanceNo')\">";
|
||||
echo "$serverName</a></td>";
|
||||
echo "<td>$msisdn</td>";
|
||||
echo "<td>$netIdName</td>";
|
||||
echo "<td>$ipStr_0</td>";
|
||||
echo "<td>$ipStr_1</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
adjust_content_tail();
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
531
wxc2_omc/configuration/confSs7/gttRemoteConf.php
Executable file
531
wxc2_omc/configuration/confSs7/gttRemoteConf.php
Executable file
@@ -0,0 +1,531 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߺ<EFBFBD><DFBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD> GTT
|
||||
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: header.inc
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
|
||||
<20><><EFBFBD>ߣ<EFBFBD>
|
||||
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Cui Ticun
|
||||
ʱ<EFBFBD>䣺2004-4-21
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Support OMC7.0,<2C><>advanced<65>Ƶ<EFBFBD>configuration<6F>У<EFBFBD><D0A3><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><CFB7>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>ť
|
||||
*********************************************************/
|
||||
require("../../inc/header.inc");
|
||||
$DEBUG = 0;
|
||||
|
||||
if($DEBUG) echo "<br><3E><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD>";
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
$pubDb = 'OMC_PUB';
|
||||
$numberPerPage = 100; //ÿҳ<C3BF><D2B3>¼<EFBFBD><C2BC>
|
||||
$paramTable ='OBJ_223.param_99';
|
||||
$db_1='OBJ_223';
|
||||
$sysId ='223_99_99';
|
||||
//$instanceNo ='0';
|
||||
$valueName ='initValue';
|
||||
$totalLen = 45;
|
||||
|
||||
$nProcFailStat = 0;
|
||||
$nWaitProcStat = 1;
|
||||
$nInProcStat = 2;
|
||||
$nProcDoneStat = 3;
|
||||
|
||||
$objIdStr='2.2';
|
||||
$listPageUrl = "gttRemoteList.php?setObjIdStr=$objIdStr&setInstanceNo=$instanceNo";
|
||||
|
||||
/************get default value**************/
|
||||
$defSql = " SELECT initValue FROM paramConf WHERE keyId > 0 AND level_1 = 2 AND level_2 = 2 AND paramType=2 ";
|
||||
$defRes = @mysqli_query($pubConn,$defSql);
|
||||
$defRow = @mysqli_fetch_array($defRes);
|
||||
do
|
||||
{
|
||||
$defaultValue = $defRow[initValue];
|
||||
//echo "<br>defaultValue[$leve_3]=$defaultValue[$leve_3]";
|
||||
}while($defRow = @mysqli_fetch_array($defRes));
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<BR>sysId =$sysId";
|
||||
if($DEBUG) echo "<BR>instanceNo =$instanceNo";
|
||||
if($DEBUG) echo "<BR>objIdStr =$objIdStr";
|
||||
|
||||
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>״̬
|
||||
function getSysCommStat($commId)
|
||||
{
|
||||
$DEBUG = 0;
|
||||
$pubDb = 'OMC_PUB';
|
||||
$commTable = 'parameterComm';
|
||||
|
||||
$getSql = "SELECT commState FROM $commTable WHERE commId ='$commId'";
|
||||
$result=mysqli_query($pubConn,$getSql);
|
||||
echo mysqli_error($pubConn);
|
||||
if($result){
|
||||
$row=mysqli_fetch_array($result);
|
||||
$commState=$row[commState];
|
||||
return($commState);
|
||||
}else{
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$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('TT', '02.0-02.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('Replacing number plan', '32.0-32.7'),
|
||||
array('Replacing digits', '33.0-42.7')
|
||||
);
|
||||
|
||||
$NetIdConfArr=array(
|
||||
array('0','international'),
|
||||
array('1','international spare'),
|
||||
array('2','national'),
|
||||
array('3','national spare')
|
||||
);
|
||||
|
||||
$numPlanConfArr=array(
|
||||
array('00','--'),
|
||||
array('01','MSISDN'),
|
||||
array('06','IMSI'),
|
||||
array('07','E.214 GT')
|
||||
);
|
||||
|
||||
$addressIdConfArr=array(
|
||||
array('00','NULL'),
|
||||
array('01','DPC'),
|
||||
array('02','SSN'),
|
||||
array('03','DPC+SSN'),
|
||||
array('04','GT'),
|
||||
array('05','GT+DPC'),
|
||||
array('06','GT+SSN'),
|
||||
array('07','GT+DPC+SSN')
|
||||
);
|
||||
|
||||
function showNumber($number){
|
||||
$newNumber =str_replace('F','',$number);
|
||||
/*
|
||||
if($newNumber == ''){
|
||||
$newNumber='--';
|
||||
}
|
||||
*/
|
||||
return($newNumber);
|
||||
}
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD>
|
||||
if($_SERVER['REQUEST_METHOD'] == "POST"){
|
||||
if($DEBUG){
|
||||
echo "<br>nStartDigit=$nStartDigit";
|
||||
echo "<br>nEndDigit=$nEndDigit";
|
||||
echo "<br>nEnable=$nEnable";
|
||||
echo "<br>nNumPlan=$nNumPlan";
|
||||
echo "<br>nNetIDName=$nNetIDName";
|
||||
echo "<br>nDPC=$nDPC";
|
||||
echo "<br>nSSN=$nSSN";
|
||||
echo "<br>nRouterID=$nRouterID";
|
||||
echo "<br>nAddressID=$nAddressID";
|
||||
echo "<br>nRep_start=$nRep_start";
|
||||
echo "<br>nRep_end=$nRep_end";
|
||||
echo "<br>nOutNumPlan=$nOutNumPlan";
|
||||
echo "<br>nRep_digit=$nRep_digit";
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>
|
||||
$nStartDigit = omc_keep_length($nStartDigit,"F","20","0");
|
||||
$nEndDigit = omc_keep_length($nEndDigit,"F","20","0");
|
||||
$nTt = omc_keep_length($nTt,"0","2","1");
|
||||
$nDPC = omc_keep_length($nDPC,"0","6","1");
|
||||
$nRep_digit = omc_keep_length($nRep_digit,"F","20","0");
|
||||
$nRep_start = omc_keep_length($nRep_start,"0","2","1");
|
||||
$nRep_end = omc_keep_length($nRep_end,"0","2","1");
|
||||
$nSSN = omc_keep_length($nSSN,"0","2","1");
|
||||
|
||||
|
||||
if($DEBUG) echo "<br>nStartDigit=$nStartDigit";
|
||||
for($i=0;$i<$totalLen;$i++){
|
||||
$totalValue=$totalValue."00";
|
||||
}
|
||||
if($DEBUG) echo "<br>totalValue=$totalValue";
|
||||
$totalValue=setBitValue($totalValue,$GTTtableConfArr[0][1],$nStartDigit);
|
||||
$totalValue=setBitValue($totalValue,$GTTtableConfArr[1][1],$nEndDigit);
|
||||
$totalValue=setBitValue($totalValue,$GTTtableConfArr[2][1],$nEnable);
|
||||
$totalValue=setBitValue($totalValue,$GTTtableConfArr[3][1],$nNumPlan);
|
||||
$totalValue=setBitValue($totalValue,$GTTtableConfArr[4][1],$nTt);
|
||||
$totalValue=setBitValue($totalValue,$GTTtableConfArr[5][1],$nNetIDName);
|
||||
$totalValue=setBitValue($totalValue,$GTTtableConfArr[6][1],$nDPC);
|
||||
$totalValue=setBitValue($totalValue,$GTTtableConfArr[7][1],$nSSN);
|
||||
$totalValue=setBitValue($totalValue,$GTTtableConfArr[8][1],$nRouterID);
|
||||
$totalValue=setBitValue($totalValue,$GTTtableConfArr[9][1],$nAddressID);
|
||||
$totalValue=setBitValue($totalValue,$GTTtableConfArr[10][1],$nRep_start);
|
||||
$totalValue=setBitValue($totalValue,$GTTtableConfArr[11][1],$nRep_end);
|
||||
$totalValue=setBitValue($totalValue,$GTTtableConfArr[12][1],$nOutNumPlan);
|
||||
$totalValue=setBitValue($totalValue,$GTTtableConfArr[13][1],$nRep_digit);
|
||||
|
||||
echo "<br><br>sysId=$sysId";
|
||||
echo "<br>objIdStr=$objIdStr";
|
||||
echo "<br>instanceNo=$instanceNo";
|
||||
echo "<br>totalValue=$totalValue<br>";
|
||||
|
||||
$levelArr=explode('.',$objIdStr);
|
||||
for($j=0;$j<sizeof($levelArr);$j++){
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG) echo "<BR>levelArr[$j]={$levelArr[$j]}";
|
||||
}
|
||||
|
||||
$updSql = "UPDATE $paramTable SET initValue = '$totalValue'
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND instanceNo='$instanceNo'
|
||||
";
|
||||
if($DEBUG) echo "<BR>updSql=$updSql";
|
||||
mysqli_query($pubConn,$updSql);
|
||||
echo mysqli_error($pubConn);
|
||||
//setSysParamValue($sysId,$objIdStr,$instanceNo,$totalValue);
|
||||
echo "<script LANGUAGE=\"JavaScript\">";
|
||||
echo "\n window.opener.location.href=\"$listPageUrl\";";
|
||||
if(!$DEBUG){
|
||||
echo "\n window.close();";
|
||||
}
|
||||
echo "\n </script>";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<BR>";
|
||||
?>
|
||||
<br>
|
||||
<body topmargin="0" leftmargin="12">
|
||||
<form method="POST" name="selectform" action="<?php echo "$PHP_SELF"; ?>">
|
||||
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
|
||||
<?php
|
||||
echo "<tr bgcolor=\"#E6E6E6\"><td>Name</td><td>Value</td></tr>";
|
||||
|
||||
if($instanceNo == 'new'){
|
||||
$value =$defaultValue;
|
||||
}else{
|
||||
$levelArr=explode('.',$objIdStr);
|
||||
for($j=0;$j<sizeof($levelArr);$j++){
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG) echo "<BR>levelArr[$j]={$levelArr[$j]}";
|
||||
}
|
||||
$getSql="SELECT $valueName
|
||||
FROM $paramTable
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND instanceNo='$instanceNo'
|
||||
";
|
||||
if($DEBUG) echo "<BR>getSql=$getSql";
|
||||
$result =mysqli_query($pubConn,$getSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$rows =mysqli_fetch_array($result);
|
||||
echo mysqli_error($pubConn);
|
||||
$value=$rows[0];
|
||||
//$value =getSysParamValue($sysId,$objIdStr,$instanceNo,$valueName);
|
||||
}
|
||||
if($DEBUG) echo "<BR>value=$value";
|
||||
|
||||
if($instanceNo == 'new'){
|
||||
$levelArr=explode('.',$objIdStr);
|
||||
for($j=0;$j<sizeof($levelArr);$j++){
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG) echo "<BR>levelArr[$j]={$levelArr[$j]}";
|
||||
}
|
||||
|
||||
$getInstanceSql="SELECT instanceNo FROM $paramTable
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND $valueName ='$defaultValue'";
|
||||
$result=mysqli_query($pubConn,$getInstanceSql);
|
||||
echo mysqli_error($pubConn);
|
||||
echo "<tr><td>No.</td><td>";
|
||||
if($DEBUG) echo "<br>$getInstanceSql";
|
||||
echo "<select name=\"instanceNo\" size=\"1\">";
|
||||
while($row=mysqli_fetch_array($result)){
|
||||
echo "<option value=$row[instanceNo]>$row[instanceNo]</option>";
|
||||
}
|
||||
echo"</select>";
|
||||
echo"</td></tr>";
|
||||
}
|
||||
|
||||
$startDigit =getBitValue($value,$GTTtableConfArr[0][1]);
|
||||
//if($startDigit == 'FFFFFFFFFFFFFFFFFFFF') continue;
|
||||
$startDigit =showNumber($startDigit);
|
||||
$endDigit =getBitValue($value,$GTTtableConfArr[1][1]);
|
||||
$endDigit =showNumber($endDigit);
|
||||
$enableFlag =getBitValue($value,$GTTtableConfArr[2][1]);
|
||||
/*
|
||||
if($enableFlag > 0){
|
||||
$enableFlag ='Y';
|
||||
}else{
|
||||
$enableFlag ='N';
|
||||
}
|
||||
*/
|
||||
|
||||
$numPlan =getBitValue($value,$GTTtableConfArr[3][1]);
|
||||
/*
|
||||
for($j=0;$j<sizeof($numPlanConfArr);$j++){
|
||||
if($numPlan == $numPlanConfArr[$j][0]){
|
||||
$numPlanName = $numPlanConfArr[$j][1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
$tt =getBitValue($value,$GTTtableConfArr[4][1]);
|
||||
$NetID =getBitValue($value,$GTTtableConfArr[5][1]);
|
||||
if($DEBUG) echo "<br>NetID=$NetID";
|
||||
for($j=0;$j<sizeof($NetIdConfArr);$j++){
|
||||
if($NetID == $NetIdConfArr[$j][0]){
|
||||
$NetIDName = $NetIdConfArr[$j][1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
$DPC =getBitValue($value,$GTTtableConfArr[6][1]);
|
||||
$SSN =getBitValue($value,$GTTtableConfArr[7][1]);
|
||||
$RouterID =getBitValue($value,$GTTtableConfArr[8][1]);
|
||||
$addressID =getBitValue($value,$GTTtableConfArr[9][1]);
|
||||
if($DEBUG) echo "<br>NetID=$NetID";
|
||||
for($j=0;$j<sizeof($addressIdConfArr);$j++){
|
||||
if($addressID == $addressIdConfArr[$j][0]){
|
||||
$addressIDName = $addressIdConfArr[$j][1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
$Rep_start =getBitValue($value,$GTTtableConfArr[10][1]);
|
||||
$Rep_end =getBitValue($value,$GTTtableConfArr[11][1]);
|
||||
$outNumPlan =getBitValue($value,$GTTtableConfArr[12][1]);
|
||||
if($DEBUG) echo "<br>outNumPlan=$outNumPlan";
|
||||
/*
|
||||
for($j=0;$j<sizeof($numPlanConfArr);$j++){
|
||||
if($OutNumPlan == $numPlanConfArr[$j][0]){
|
||||
$OutNumPlanName = $numPlanConfArr[$j][1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
$Rep_digit =getBitValue($value,$GTTtableConfArr[13][1]);
|
||||
$Rep_digit =showNumber($Rep_digit);
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td>Start GT number</td>";
|
||||
echo "<td><input type=\"text\" maxlength=\"20\" value=\"$startDigit\" class=\"text\" name=\"nStartDigit\"></td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td>End GT number</td>";
|
||||
echo "<td><input type=\"text\" maxlength=\"20\" value=\"$endDigit\" class=\"text\" name=\"nEndDigit\"></td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td>Enable</td>";
|
||||
echo "<td>";
|
||||
echo "<select name=\"nEnable\">";
|
||||
if($enableFlag==0){
|
||||
echo "<option value=\"00\" selected>N";
|
||||
echo "<option value=\"01\">Y";
|
||||
}elseif($enableFlag>0){
|
||||
echo "<option value=\"00\">N";
|
||||
echo "<option value=\"01\" selected>Y";
|
||||
}else{
|
||||
echo "<option value=\"00\">N";
|
||||
echo "<option value=\"01\" selected>Y";
|
||||
}
|
||||
echo "</select>";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td>Numbering Plan</td>";
|
||||
echo "<td>";
|
||||
echo "<select name=\"nNumPlan\">";
|
||||
for($j=0;$j<sizeof($numPlanConfArr);$j++){
|
||||
if($numPlan == $numPlanConfArr[$j][0]){
|
||||
echo "<option value=\"{$numPlanConfArr[$j][0]}\" selected>{$numPlanConfArr[$j][1]}";
|
||||
}else{
|
||||
echo "<option value=\"{$numPlanConfArr[$j][0]}\" >{$numPlanConfArr[$j][1]}";
|
||||
}
|
||||
}
|
||||
echo "</select>";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td>TT(hex)</td>";
|
||||
echo "<td><input type=\"text\" maxlength=\"2\" value=\"$tt\" class=\"text\" name=\"nTt\"></td>";
|
||||
echo "</tr>";
|
||||
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td>Network indicator</td>";
|
||||
echo "<td>";
|
||||
echo "<select name=\"nNetIDName\">";
|
||||
|
||||
if($NetID==0){
|
||||
echo "<option value=\"00\" selected>$strInternationalNetwork";
|
||||
echo "<option value=\"01\">$strInternationalNetworkSpare";
|
||||
echo "<option value=\"02\">$strNationalNetwork";
|
||||
echo "<option value=\"03\">$strNationalNetworkSpare";
|
||||
}elseif($NetID==1){
|
||||
echo "<option value=\"00\">$strInternationalNetwork";
|
||||
echo "<option value=\"01\" selected>$strInternationalNetworkSpare";
|
||||
echo "<option value=\"02\">$strNationalNetwork";
|
||||
echo "<option value=\"03\">$strNationalNetworkSpare";
|
||||
}elseif($NetID==2){
|
||||
echo "<option value=\"00\">$strInternationalNetwork";
|
||||
echo "<option value=\"01\">$strInternationalNetworkSpare";
|
||||
echo "<option value=\"02\" selected>$strNationalNetwork";
|
||||
echo "<option value=\"03\">$strNationalNetworkSpare";
|
||||
}elseif($NetID==3){
|
||||
echo "<option value=\"00\">$strInternationalNetwork";
|
||||
echo "<option value=\"01\">$strInternationalNetworkSpare";
|
||||
echo "<option value=\"02\">$strNationalNetwork";
|
||||
echo "<option value=\"03\" selected>$strNationalNetworkSpare";
|
||||
}
|
||||
else{
|
||||
echo "<option value=\"00\" selected>$strInternationalNetwork";
|
||||
echo "<option value=\"01\">$strInternationalNetworkSpare";
|
||||
echo "<option value=\"02\">$strNationalNetwork";
|
||||
echo "<option value=\"03\">$strNationalNetworkSpare";
|
||||
}
|
||||
echo "</select>";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td>Destination point code(hex)</td>";
|
||||
echo "<td><input type=\"text\" maxlength=\"6\" value=\"$DPC\" class=\"text\" name=\"nDPC\"></td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td>SSN(hex)</td>";
|
||||
echo "<td><input type=\"text\" maxlength=\"2\" value=\"$SSN\" class=\"text\" name=\"nSSN\"></td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td>Route indicator</td>";
|
||||
echo "<td>";
|
||||
echo "<select name=\"nRouterID\">";
|
||||
if($RouterID==0){
|
||||
echo "<option value=\"00\" selected>$RouteByGT";
|
||||
echo "<option value=\"01\">$RouteByDPCAndSSN";
|
||||
}elseif($RouterID==1){
|
||||
echo "<option value=\"00\">$RouteByGT";
|
||||
echo "<option value=\"01\" selected>$RouteByDPCAndSSN";
|
||||
}
|
||||
else{
|
||||
echo "<option value=\"00\" selected>$RouteByGT";
|
||||
echo "<option value=\"01\">$RouteByDPCAndSSN";
|
||||
}
|
||||
|
||||
echo "</select>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td>Address indicator</td>";
|
||||
echo "<td>";
|
||||
echo "<select name=\"nAddressID\">";
|
||||
if($addressID==0){
|
||||
echo "<option value=\"00\" selected>{$addressIdConfArr[0][1]}";
|
||||
echo "<option value=\"03\">{$addressIdConfArr[3][1]}";
|
||||
echo "<option value=\"06\">{$addressIdConfArr[6][1]}";
|
||||
echo "<option value=\"07\">{$addressIdConfArr[7][1]}";
|
||||
}elseif($addressID==3){
|
||||
echo "<option value=\"00\">{$addressIdConfArr[0][1]}";
|
||||
echo "<option value=\"03\" selected>{$addressIdConfArr[3][1]}";
|
||||
echo "<option value=\"06\">{$addressIdConfArr[6][1]}";
|
||||
echo "<option value=\"07\">{$addressIdConfArr[7][1]}";
|
||||
}elseif($addressID==6){
|
||||
echo "<option value=\"00\">{$addressIdConfArr[0][1]}";
|
||||
echo "<option value=\"03\">{$addressIdConfArr[3][1]}";
|
||||
echo "<option value=\"06\" selected>{$addressIdConfArr[6][1]}";
|
||||
echo "<option value=\"07\">{$addressIdConfArr[7][1]}";
|
||||
}else{
|
||||
echo "<option value=\"00\">{$addressIdConfArr[0][1]}";
|
||||
echo "<option value=\"03\">{$addressIdConfArr[3][1]}";
|
||||
echo "<option value=\"06\">{$addressIdConfArr[6][1]}";
|
||||
echo "<option value=\"07\" selected>{$addressIdConfArr[7][1]}";
|
||||
}
|
||||
/* for($j=0;$j<sizeof($addressIdConfArr);$j++){
|
||||
if($addressID == $addressIdConfArr[$j][0]){
|
||||
echo "<option value=\"{$addressIdConfArr[$j][0]}\" selected>{$addressIdConfArr[$j][1]}";
|
||||
}else{
|
||||
echo "<option value=\"{$addressIdConfArr[$j][0]}\" >{$addressIdConfArr[$j][1]}";
|
||||
}
|
||||
}*/
|
||||
echo "</select>";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td>Replaced start digit(hex)</td>";
|
||||
echo "<td><input type=\"text\" maxlength=2 value=\"$Rep_start\" class=\"text\" name=\"nRep_start\"></td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td>Replaced end digit(hex)</td>";
|
||||
echo "<td><input type=\"text\" maxlength=2 value=\"$Rep_end\" class=\"text\" name=\"nRep_end\"></td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td>Replacing number plan</td>";
|
||||
echo "<td><select name=\"nOutNumPlan\">";
|
||||
for($j=0;$j<sizeof($numPlanConfArr);$j++){
|
||||
if($outNumPlan == $numPlanConfArr[$j][0]){
|
||||
echo "<option value=\"{$numPlanConfArr[$j][0]}\" selected>{$numPlanConfArr[$j][1]}";
|
||||
}else{
|
||||
echo "<option value=\"{$numPlanConfArr[$j][0]}\" >{$numPlanConfArr[$j][1]}";
|
||||
}
|
||||
}
|
||||
echo "</select>";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td>Replacing digits</td>";
|
||||
echo "<td><input type=\"text\" name=\"nRep_digit\" value=\"$Rep_digit\" maxlength=\"20\" class=\"text\" ></td>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "</table>";
|
||||
echo "<br>";
|
||||
echo "\n <input type=\"hidden\" name=\"sysId\" value=\"$sysId\">";
|
||||
echo "\n <input type=\"hidden\" name=\"objIdStr\" value=\"$objIdStr\">";
|
||||
if($instanceNo != 'new'){
|
||||
echo "\n <input type=\"hidden\" name=\"instanceNo\" value=\"$instanceNo\">";
|
||||
}
|
||||
echo "\n <input type=\"submit\" name=\"set\" value=\"Set\"> ";
|
||||
echo "\n <input type=\"reset\" name=\"reset\" value=\"Reset\">";
|
||||
|
||||
echo "</form>";
|
||||
?>
|
||||
<b>Remarks:</b><br>
|
||||
<br>
|
||||
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
|
||||
<tr bgcolor="#E6E6E6"><td>GTT setup</td><td>Explanation</td></tr>
|
||||
<tr><td>Start GT number</td><td>
|
||||
Specify the beginning number of a group of consecutive numbers routed by GTT, for single-number GTT route, the start number is same as the end number
|
||||
</td></tr>
|
||||
<tr><td>End GT number</td><td>Specify the end number of a group of consecutive number routed by GTT. If there are some inconsecutive numbers for a same destination, a different GTT record should be used. </td></tr>
|
||||
<tr><td>Enable</td><td>Record enable or disable</td></tr>
|
||||
<tr><td>Numbering plan</td><td>Numbering planning, include MSISDN (E.164), IMSI (E.212) and GT (E.214) </td></tr>
|
||||
<tr><td>Network indicator</td><td> Network type, include international, international spare, national and national spare </td></tr>
|
||||
<tr><td>Destination point code</td><td> Point code of the destination device </td></tr>
|
||||
<tr><td>SSN</td><td> SSN of the destination device, 3=ISDN user part, 4=OMC, 5=MAP, 6=HLR, 7=VLR, 8=MSC, 9=EIR, 10=AUC, 11=SMSC, 254=A interface, 147=PPS </td></tr>
|
||||
<tr><td>Route indicator</td><td> For IMSI and MSISDN, select "Route on SSN"
|
||||
<tr><td>Address indicator</td><td>select the contribution of SCCP Address.</td></tr>
|
||||
<br>For the record of the connected network, select "Route on GT"</td></tr>
|
||||
<tr><td>Replaced start digit</td><td>Specify the beginning digit of a segment of digits to be replaced within a GT number, the replacement is for changing number and numbering plan </td></tr>
|
||||
<tr><td>Replaced end digit</td><td> Specify the end digit of a segment of digits to be replaced within a GT number, the replacement is for changing number and numbering plan </td></tr>
|
||||
<tr><td>Replacing digit</td><td> Replacing digits, the length of replacing digits and replaced digits may be different </td></tr>
|
||||
<tr><td>Replacing number plan</td><td> Replacing number plan, include MSISDN, IMSI and GT </td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
584
wxc2_omc/configuration/confSs7/gttRemoteList.php
Executable file
584
wxc2_omc/configuration/confSs7/gttRemoteList.php
Executable file
@@ -0,0 +1,584 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߺ<EFBFBD><DFBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD> GTT
|
||||
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: header.inc
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
|
||||
<20><><EFBFBD>ߣ<EFBFBD>
|
||||
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Cui Ticun
|
||||
ʱ<EFBFBD>䣺2004-4-21
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Support OMC7.0,<2C><>advanced<65>Ƶ<EFBFBD>configuration<6F>У<EFBFBD><D0A3><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><CFB7>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>ť
|
||||
*********************************************************/
|
||||
require("../../inc/header.inc");
|
||||
$helpId = "2.1.0";
|
||||
$DEBUG = 0;
|
||||
?>
|
||||
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
|
||||
<?php
|
||||
adjust_head();
|
||||
adjust_title_head();
|
||||
|
||||
if($DEBUG) echo "<br><3E><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD>";
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
$pubDb = 'OMC_PUB';
|
||||
$paramTable ='OBJ_223.param_99';
|
||||
$maxNum = 30;
|
||||
|
||||
$db_1='OBJ_223';
|
||||
|
||||
$sysId ='223_99_99';
|
||||
$instanceNo ='0';
|
||||
$initValue ='initValue';
|
||||
$editValue ='editValue';
|
||||
$readValue ='readValue';
|
||||
|
||||
$nProcFail = 0;//failure
|
||||
$nWaitProc = 1;//wait
|
||||
$nInProc = 2;
|
||||
$nOutProc = 3;
|
||||
|
||||
$nGetComm = 0;
|
||||
$nSetComm = 3;
|
||||
|
||||
if($DEBUG) echo "<br>setObjIdStr = $setObjIdStr";
|
||||
if($DEBUG) echo "<br>setInstanceNo = $setInstanceNo";
|
||||
|
||||
|
||||
/************get default value**************/
|
||||
$defSql = " SELECT initValue FROM paramConf WHERE keyId > 0 AND level_1 = 2 AND level_2 = 2 AND paramType=2";
|
||||
$defRes = @mysqli_query($pubConn,$defSql);
|
||||
$defRow = @mysqli_fetch_array($defRes);
|
||||
do
|
||||
{
|
||||
$defaultValue = $defRow[initValue];
|
||||
//echo "<br>defaultValue[$leve_3]=$defaultValue[$leve_3]";
|
||||
}while($defRow = @mysqli_fetch_array($defRes));
|
||||
|
||||
|
||||
if(isset($setSys) || isset($getSys)){
|
||||
echo "<br><br><br><br><br>";
|
||||
if($DEBUG) echo "<br>sysId=$sysId";
|
||||
if($DEBUG) echo "<br>objIdStr=$objIdStr";
|
||||
if(isset($setSys)){
|
||||
$moveSql = "UPDATE $paramTable SET readValue = initValue
|
||||
WHERE level_1='2' AND level_2='2'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$commIdStr = sysCommSend($sysId,$nSetComm,$objIdStr);
|
||||
|
||||
if($DEBUG) echo "<br>nSetComm";
|
||||
$showType="Set";
|
||||
}else{
|
||||
$commIdStr = sysCommSend($sysId,$nGetComm,$objIdStr);
|
||||
$showType="Get";
|
||||
}
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>$showType GTT";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "223_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
$needCopyReadBuf=1;
|
||||
$moveSql = "UPDATE $paramTable SET initValue = readValue
|
||||
WHERE level_1='2' AND level_2='2'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
}elseif(isset($saveSys)){
|
||||
$updSql = " UPDATE $paramTable SET initValue = '02'
|
||||
WHERE level_1 = '3' AND level_2 = '2'
|
||||
";
|
||||
$updRes = @mysqli_query($pubConn,$updSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$commIdStr=sysCommSend($sysId,$nSetComm,'3.2');
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Save parameter to system";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "223_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
}elseif(isset($resetSys)){
|
||||
$updSql = " UPDATE $paramTable SET initValue = '00'
|
||||
WHERE level_1 = '3' AND level_2 = '2'
|
||||
";
|
||||
$updRes = @mysqli_query($pubConn,$updSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$commIdStr=sysCommSend($sysId,$nSetComm,'3.2');
|
||||
if($DEBUG) echo "<BR>commIdStr =$commIdStr";
|
||||
if($DEBUG) echo "<BR>commIdStr =$commIdStr";
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Reset system";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "223_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
if(1==$delete)
|
||||
{
|
||||
$delSql = "UPDATE $paramTable SET initValue = '$defaultValue'
|
||||
WHERE level_1='2' AND level_2='2' AND instanceNo='$delValue'";
|
||||
//echo "<br>delSql=$delSql";
|
||||
$delRes = @mysqli_query($pubConn,$delSql);
|
||||
echo mysqli_error($pubConn);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($setSys || $getSys || $saveSys || $undoSet||$resetSys){
|
||||
echo "<br>";
|
||||
echo "<p align=\"left\"><a href=\"$PHP_SELF?setFlag=$setFlag\" target=\"contents\"><img align=absBottom border=0 src=\"../../images/left.gif\" width=\"14\" height=\"14\">$strBack</a>";
|
||||
exit();
|
||||
}
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
|
||||
/*
|
||||
GTT table
|
||||
[unit]On/off[u]00.0-00.7[u]select
|
||||
[v]1[opt]on
|
||||
[v]0[opt]off
|
||||
[unit]Numbering plan[u]01.0-01.7[u]select
|
||||
[v]1[opt]MSISDN
|
||||
[v]6[opt]IMSI
|
||||
[v]7[opt]E.214 GT
|
||||
[unit]Start GT number[u]02.0-11.7[u]input
|
||||
[v]keepHex-low-E
|
||||
[unit]End GT number[u]12.0-21.7[u]input
|
||||
[v]keepHex-low-E
|
||||
[unit]Network indicator[u]22.0-22.7[u]select
|
||||
[v]0[opt]0
|
||||
[v]1[opt]1
|
||||
[v]2[opt]2
|
||||
[v]3[opt]3
|
||||
[unit]Destination point code[u]23.0-25.7[u]input
|
||||
[v]toDec-high-0
|
||||
[unit]SSN[u]26.0-26.7[u]input
|
||||
[v]toDec-high-0
|
||||
[unit]Route indicator[u]27.0-27.7[u]select
|
||||
[v]0[opt]route on GT
|
||||
[v]1[opt]route on SSN
|
||||
[unit]Replaced start digit[u]28.0-28.7[u]input
|
||||
[v]keepHex-high-0
|
||||
[unit]Replaced end digit[u]29.0-29.7[u]input
|
||||
[v]keepHex-high-0
|
||||
[unit]Outgoing number plan[u]30.0-30.7[u]select
|
||||
[v]1[opt]MSISDN
|
||||
[v]6[opt]IMSI
|
||||
[v]7[opt]E.214 GT
|
||||
[unit]Replacing digits[u]31.0-40.7[u]input
|
||||
[v]keepHex-low-E
|
||||
*/
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>
|
||||
//==========================================================
|
||||
$objIdStr='2.2';
|
||||
|
||||
$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('TT', '02.0-02.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')
|
||||
);
|
||||
|
||||
$NetIdConfArr=array(
|
||||
array('0','International'),
|
||||
array('1','Inter-S'),
|
||||
array('2','National'),
|
||||
array('3','National-S')
|
||||
);
|
||||
|
||||
$numPlanConfArr=array(
|
||||
array('0','--'),
|
||||
array('1','MSISDN'),
|
||||
array('6','IMSI'),
|
||||
array('7','E.214 GT')
|
||||
);
|
||||
|
||||
$addressIdConfArr=array(
|
||||
array('00','NULL'),
|
||||
array('01','DPC'),
|
||||
array('02','SSN'),
|
||||
array('03','DPC+SSN'),
|
||||
array('04','GT'),
|
||||
array('05','GT+DPC'),
|
||||
array('06','GT+SSN'),
|
||||
array('07','GT+DPC+SSN')
|
||||
);
|
||||
|
||||
function showNumber($number){
|
||||
$newNumber =str_replace('F','',$number);
|
||||
if($newNumber == ''){
|
||||
$newNumber='--';
|
||||
}
|
||||
return($newNumber);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<BR>";
|
||||
?>
|
||||
|
||||
<script LANGUAGE="JavaScript">
|
||||
function openSet(objIdStr,instanceNo){
|
||||
URL="./gttRemoteConf.php?instanceNo="+instanceNo+"&objIdStr="+objIdStr;
|
||||
var setWindow = open(URL, 'newWin', 'toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,status=yes,width=400,height=350');
|
||||
setWindow.focus();
|
||||
}
|
||||
|
||||
function delFirm(instanceNo)
|
||||
{
|
||||
var delValue,x,y;
|
||||
x = document.body.scrollLeft;
|
||||
y = document.body.scrollTop;
|
||||
|
||||
if(confirm('Do you want to delete the selected?')!=true){
|
||||
window.location.href='<?php echo $PHP_SELF;?>'+"?scroll_x="+x+"&scroll_y="+y;
|
||||
}else{
|
||||
window.location.href='<?php echo $PHP_SELF;?>?&delete=1&delValue='+instanceNo+"&scroll_x="+x+"&scroll_y="+y;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
function ChComm($sysId,$chkType)
|
||||
{
|
||||
global $omc_db;
|
||||
global $remark,$nProcFail,$nWaitProc,$nInProc,$nOutProc;
|
||||
|
||||
$commTable = "parameterComm";
|
||||
|
||||
$sysIdArr = explode('_',$sysId);
|
||||
$sysTypeNo = $sysIdArr[0];
|
||||
$sysNo = $sysIdArr[1];
|
||||
$subSysNo = $sysIdArr[2];
|
||||
|
||||
if($chkType==0)
|
||||
$selComm = " SELECT commState,remark FROM $commTable WHERE sysTypeNo = '$sysTypeNo' ";
|
||||
else
|
||||
$selComm = " SELECT commState,remark FROM $commTable WHERE sysTypeNo = '$sysTypeNo' AND sysNo = '$sysNo' ";
|
||||
|
||||
$selRes = @mysqli_query($pubConn,$selComm);
|
||||
$selRow = @mysqli_fetch_array($selRes);
|
||||
echo mysqli_error($pubConn);
|
||||
$outProcCount=0;
|
||||
do
|
||||
{
|
||||
$temCommState = $selRow[commState];
|
||||
if(isset($selRow[remark])){
|
||||
$remark = $selRow[remark];
|
||||
if($DEBUG)echo "<br>remark=$remark";
|
||||
}
|
||||
if($DEBUG)echo "<br>temCommState=$temCommState";
|
||||
if($temCommState == $nWaitProc){
|
||||
return($nWaitProc);
|
||||
}elseif($temCommState == $nInProc){
|
||||
return($nInProc);
|
||||
}elseif($temCommState == $nOutProc){
|
||||
$commState = $nOutProc;
|
||||
$outProcCount++;
|
||||
}else{
|
||||
$commState = $nProcFail;
|
||||
}
|
||||
}while($selRow = @mysqli_fetch_array($selRes));
|
||||
if($outProcCount > 0){
|
||||
return($nOutProc);
|
||||
}else{
|
||||
return($nProcFail);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<form name="selectform">
|
||||
<?php
|
||||
|
||||
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
|
||||
echo "<tr>";
|
||||
echo "<td width=\"50%\">";
|
||||
echo "$strConfiguration > $strNetwork > SS7 > GTT";
|
||||
echo "</td>";
|
||||
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
|
||||
showHelp($helpId);
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td align=\"left\">";
|
||||
|
||||
echo "<b>System:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getSys\" value=\"$strGet\" class=\"button\">";
|
||||
echo "<input type=\"submit\" name=\"setSys\" value=\"$strSet\" class=\"button\">";
|
||||
/*
|
||||
if ( TRUE == session_is_registered("gttRSetFlag") ) {
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}else{
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" DISABLED class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}
|
||||
*/
|
||||
echo " ";
|
||||
echo "<b>Command:</b> ";
|
||||
echo "<input type=\"submit\" name=\"saveSys\" value=\"$strSave\" class=\"button\">";
|
||||
echo "<input type=\"submit\" name=\"resetSys\" value=\"$strReset\" class=\"button\">";
|
||||
echo "<input type=\"hidden\" name=\"objIdStr\" value=\"2.2\">";
|
||||
|
||||
echo "</td>";
|
||||
echo "<td> </td>";
|
||||
echo "</table>";
|
||||
adjust_title_tail();
|
||||
adjust_content_head();
|
||||
/*
|
||||
echo "<b>System:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getSys\" value=\"$strGet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"setSys\" value=\"$strSet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"saveSys\" value=\"$strSave\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
if ( TRUE == session_is_registered("gttRSetFlag") ) {
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}else{
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" DISABLED class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}
|
||||
echo "<b>OMC:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getOmc\" value=\"$strGet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"saveOmc\" value=\"$strSave\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
echo "<input type=\"hidden\" name=\"objIdStr\" value=\"2.2\">";
|
||||
echo "<br>";
|
||||
echo "<br>";
|
||||
*/
|
||||
|
||||
?>
|
||||
<br>
|
||||
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
|
||||
<?php
|
||||
echo "<tr bgcolor=\"#E6E6E6\">";
|
||||
echo "<td>No.</td>";
|
||||
echo "<td>Start number</td>";
|
||||
echo "<td>End number</td>";
|
||||
echo "<td>Enable</td>";
|
||||
echo "<td>NP</td>";
|
||||
echo "<td>TT</td>";
|
||||
echo "<td>NI</td>";
|
||||
echo "<td>DPC</td>";
|
||||
echo "<td>SSN</td>";
|
||||
echo "<td>Router ID</td>";
|
||||
echo "<td>Address ID</td>";
|
||||
echo "<td>Rep-start</td>";
|
||||
echo "<td>Rep-End</td>";
|
||||
echo "<td>ONP</td>";
|
||||
echo "<td>Rep-number</td>";
|
||||
echo "<td>Delete</td>";
|
||||
echo "</tr>";
|
||||
|
||||
$levelArr=explode('.',$objIdStr);
|
||||
for($j=0;$j<sizeof($levelArr);$j++){
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG) echo "<BR>levelArr[$j]={$levelArr[$j]}";
|
||||
}
|
||||
|
||||
$getSql="SELECT $initValue,instanceNo FROM $paramTable
|
||||
WHERE level_1='$level_1' AND level_2='$level_2'
|
||||
";
|
||||
if($DEBUG) echo "<BR>getSql=$getSql";
|
||||
$result =mysqli_query($pubConn,$getSql);
|
||||
echo mysqli_error($pubConn);
|
||||
|
||||
while($rows =mysqli_fetch_array($result)){
|
||||
$instanceNo=$rows[instanceNo];
|
||||
$value=$rows[0];
|
||||
if(strcasecmp($value,$defaultValue)==0)
|
||||
continue;
|
||||
if($DEBUG) echo "<BR>value=$value";
|
||||
$startDigit =getBitValue($value,$GTTtableConfArr[0][1]);
|
||||
//if($startDigit == 'FFFFFFFFFFFFFFFFFFFF') continue;
|
||||
$startDigit =showNumber($startDigit);
|
||||
$endDigit =getBitValue($value,$GTTtableConfArr[1][1]);
|
||||
$endDigit =showNumber($endDigit);
|
||||
$enableFlag =getBitValue($value,$GTTtableConfArr[2][1]);
|
||||
if($enableFlag > 0){
|
||||
$enableFlag ='Y';
|
||||
}else{
|
||||
$enableFlag ='N';
|
||||
}
|
||||
|
||||
|
||||
$numPlan =getBitValue($value,$GTTtableConfArr[3][1]);
|
||||
for($j=0;$j<sizeof($numPlanConfArr);$j++){
|
||||
if($numPlan == $numPlanConfArr[$j][0]){
|
||||
$numPlanName = $numPlanConfArr[$j][1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$tt =hexdec(getBitValue($value,$GTTtableConfArr[4][1]));
|
||||
|
||||
$NetID =getBitValue($value,$GTTtableConfArr[5][1]);
|
||||
for($j=0;$j<sizeof($NetIdConfArr);$j++){
|
||||
if($NetID == $NetIdConfArr[$j][0]){
|
||||
$NetIDName = $NetIdConfArr[$j][1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
$SPC =getBitValue($value,$GTTtableConfArr[6][1]);
|
||||
$SSN =getBitValue($value,$GTTtableConfArr[7][1]);
|
||||
$RouterID =getBitValue($value,$GTTtableConfArr[8][1]);
|
||||
$adressID =getBitValue($value,$GTTtableConfArr[9][1]);
|
||||
for($j=0;$j<sizeof($addressIdConfArr);$j++){
|
||||
if($adressID == $addressIdConfArr[$j][0]){
|
||||
$adressIDName = $addressIdConfArr[$j][1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
$Rep_start =getBitValue($value,$GTTtableConfArr[10][1]);
|
||||
$Rep_end =getBitValue($value,$GTTtableConfArr[11][1]);
|
||||
$OutNumPlan =getBitValue($value,$GTTtableConfArr[12][1]);
|
||||
for($j=0;$j<sizeof($numPlanConfArr);$j++){
|
||||
if($OutNumPlan == $numPlanConfArr[$j][0]){
|
||||
$OutNumPlanName = $numPlanConfArr[$j][1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
$Rep_digit =getBitValue($value,$GTTtableConfArr[13][1]);
|
||||
$Rep_digit =showNumber($Rep_digit);
|
||||
if($instanceNo == $setInstanceNo &&$objIdStr==$setObjIdStr)
|
||||
echo "<tr bgcolor=#CCFFCC>";
|
||||
else
|
||||
echo "<tr>";
|
||||
echo "<td><a href=\"javascript:openSet('$objIdStr','$instanceNo')\">";
|
||||
echo "$instanceNo</a> </td>";
|
||||
echo "<td>$startDigit </td>";
|
||||
echo "<td>$endDigit </td>";
|
||||
echo "<td>$enableFlag </td>";
|
||||
echo "<td>$numPlanName </td>";
|
||||
echo "<td>$tt </td>";
|
||||
echo "<td>$NetIDName </td>";
|
||||
echo "<td>$SPC </td>";
|
||||
echo "<td>$SSN </td>";
|
||||
echo "<td>$RouterID </td>";
|
||||
echo "<td>$adressIDName </td>";
|
||||
echo "<td>$Rep_start </td>";
|
||||
echo "<td>$Rep_end </td>";
|
||||
echo "<td>$OutNumPlanName </td>";
|
||||
echo "<td>$Rep_digit </td>";
|
||||
echo "<td><input type=\"checkbox\" name=\"C$instanceNo\" value=\"ON\" onClick=\"javascript:delFirm($instanceNo)\" ></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "<tr>";
|
||||
echo "<td><a href=\"javascript:openSet('$objIdStr','new')\">";
|
||||
echo "New</a></td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "</tr>";
|
||||
?>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
adjust_content_tail();
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
299
wxc2_omc/configuration/confSs7/networkCodeConf.php
Executable file
299
wxc2_omc/configuration/confSs7/networkCodeConf.php
Executable file
@@ -0,0 +1,299 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߺ<EFBFBD><DFBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD> Network code
|
||||
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: header.inc
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
|
||||
<20><><EFBFBD>ߣ<EFBFBD>
|
||||
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Cui Ticun
|
||||
ʱ<EFBFBD>䣺2004-4-21
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Support OMC7.0,<2C><>advanced<65>Ƶ<EFBFBD>configuration<6F>У<EFBFBD><D0A3><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><CFB7>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>ť
|
||||
*********************************************************/
|
||||
require("../../inc/header.inc");
|
||||
$helpId = "2.1.0";
|
||||
$DEBUG = 0;
|
||||
|
||||
if($DEBUG) echo "<br><3E><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD>";
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
$nGetComm = 0;
|
||||
$nSetComm = 3;
|
||||
$maxNum = 30;
|
||||
|
||||
$pubDb = 'OMC_PUB';
|
||||
$paramTable ='OBJ_225.param_99';
|
||||
$sysId ='225_99_99';
|
||||
$instanceNo ='0';
|
||||
$initValue ='initValue';
|
||||
$editValue ='editValue';
|
||||
$readValue ='readValue';
|
||||
|
||||
$nProcFail = 0;//failure
|
||||
$nWaitProc = 1;//wait
|
||||
$nInProc = 2;
|
||||
$nOutProc = 3;
|
||||
|
||||
$NetworkCodeArr=array(
|
||||
//array('oid', 'inputName', 'showName','inputLen'),
|
||||
array('2.1', 'MCC' ,'Mobile country code (MCC)' ,'4'),
|
||||
array('2.2', 'MNC' ,'Mobile network code (MNC)' ,'4'),
|
||||
array('2.3', 'CC' ,'Country code (CC)' ,'4'),
|
||||
array('2.4', 'NDC' ,'National destination code (NDC)' ,'6'),
|
||||
array('2.5', 'IP' ,'International prefix' ,'4'),
|
||||
array('2.6', 'NP' ,'National prefix' ,'4')
|
||||
);
|
||||
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<BR>sysId =$sysId";
|
||||
if($DEBUG) echo "<BR>instanceNo =$instanceNo";
|
||||
if($DEBUG) echo "<BR>objIdStr =$objIdStr";
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>
|
||||
//==========================================================
|
||||
if($_SERVER['REQUEST_METHOD'] == "POST"){
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if(isset($setSys) || isset($getSys)){
|
||||
if(isset($setSys)){
|
||||
for($i=0;$i<sizeof($NetworkCodeArr);$i++){
|
||||
$unitObjIdStr=$NetworkCodeArr[$i][0];
|
||||
$unitInputName=$NetworkCodeArr[$i][1];
|
||||
$unitValue=getSysParamValue($sysId,$unitObjIdStr,$instanceNo,$initValue);
|
||||
$unitLen=$NetworkCodeArr[$i][3];
|
||||
$unitSetValue = ${$unitInputName};
|
||||
for($j=strlen($unitSetValue);$j<$unitLen;$j++){
|
||||
$unitSetValue .='E';
|
||||
}
|
||||
setSysParamValue($sysId,$unitObjIdStr,$instanceNo,$unitSetValue);
|
||||
if($DEBUG) echo "<BR>setSysParamValue($sysId,$unitObjIdStr,$instanceNo,$unitSetValue)";
|
||||
}
|
||||
|
||||
$commIdStr = sysCommSend($sysId,$nSetComm,$objIdStr);
|
||||
$showType="Set";
|
||||
}else{
|
||||
$commIdStr = sysCommSend($sysId,$nGetComm,$objIdStr);
|
||||
$showType="Get";
|
||||
}
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>$showType network code";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "225_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
$moveSql = "UPDATE $paramTable SET initValue = readValue
|
||||
WHERE level_1='2'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
}elseif(isset($saveSys)){
|
||||
$updSql = " UPDATE $paramTable SET initValue = '01'
|
||||
WHERE level_1 = '3' AND level_2 = '2'
|
||||
";
|
||||
$updRes = @mysqli_query($pubConn,$updSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$commIdStr=sysCommSend($sysId,$nSetComm,'3.2');
|
||||
if($DEBUG) echo "<BR>commIdStr =$commIdStr";
|
||||
if($DEBUG) echo "<BR>commIdStr =$commIdStr";
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Save parameter to system";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "225_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($setSys || $getSys || $saveSys || $undoSet||$resetSys){
|
||||
echo "<br>";
|
||||
echo "<p align=\"left\"><a href=\"$PHP_SELF?setFlag=$setFlag\" target=\"contents\"><img align=absBottom border=0 src=\"../../images/left.gif\" width=\"14\" height=\"14\">$strBack</a>";
|
||||
exit();
|
||||
}
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<BR>";
|
||||
?>
|
||||
|
||||
<?php
|
||||
function ChComm($sysId,$chkType)
|
||||
{
|
||||
global $omc_db;
|
||||
global $remark,$nProcFail,$nWaitProc,$nInProc,$nOutProc;
|
||||
|
||||
$commTable = "parameterComm";
|
||||
|
||||
$sysIdArr = explode('_',$sysId);
|
||||
$sysTypeNo = $sysIdArr[0];
|
||||
$sysNo = $sysIdArr[1];
|
||||
$subSysNo = $sysIdArr[2];
|
||||
|
||||
if($chkType==0)
|
||||
$selComm = " SELECT commState,remark FROM $commTable WHERE sysTypeNo = '$sysTypeNo' ";
|
||||
else
|
||||
$selComm = " SELECT commState,remark FROM $commTable WHERE sysTypeNo = '$sysTypeNo' AND sysNo = '$sysNo' ";
|
||||
|
||||
$selRes = @mysqli_query($pubConn,$selComm);
|
||||
$selRow = @mysqli_fetch_array($selRes);
|
||||
echo mysqli_error($pubConn);
|
||||
$outProcCount=0;
|
||||
do
|
||||
{
|
||||
$temCommState = $selRow[commState];
|
||||
if(isset($selRow[remark])){
|
||||
$remark = $selRow[remark];
|
||||
if($DEBUG)echo "<br>remark=$remark";
|
||||
}
|
||||
if($DEBUG)echo "<br>temCommState=$temCommState";
|
||||
if($temCommState == $nWaitProc){
|
||||
return($nWaitProc);
|
||||
}elseif($temCommState == $nInProc){
|
||||
return($nInProc);
|
||||
}elseif($temCommState == $nOutProc){
|
||||
$commState = $nOutProc;
|
||||
$outProcCount++;
|
||||
}else{
|
||||
$commState = $nProcFail;
|
||||
}
|
||||
}while($selRow = @mysqli_fetch_array($selRes));
|
||||
if($outProcCount > 0){
|
||||
return($nOutProc);
|
||||
}else{
|
||||
return($nProcFail);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<body topmargin="0" leftmargin="12">
|
||||
<?php
|
||||
echo "<form method=\"POST\" name=\"setForm\" action=\"$PHP_SELF\">";
|
||||
echo "<table border=\"0\" width=\"100%\">";
|
||||
echo "<tr>";
|
||||
echo "<td width=\"50%\">";
|
||||
echo "$strConfiguration > $strNetwork > SS7 > $strNetworkCode";
|
||||
echo "</td>";
|
||||
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
|
||||
showHelp($helpId);
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
echo "<BR>";
|
||||
/*
|
||||
echo "<b>System:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getSys\" value=\"$strGet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"setSys\" value=\"$strSet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"saveSys\" value=\"$strSave\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
if ( TRUE == session_is_registered("networkSetFlag") ) {
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}else{
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" DISABLED class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}
|
||||
echo "<b>OMC:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getOmc\" value=\"$strGet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"saveOmc\" value=\"$strSave\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
echo "<input type=\"hidden\" name=\"objIdStr\" value=\"2\">";
|
||||
echo "<BR><BR>";
|
||||
*/
|
||||
echo "<b>System:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getSys\" value=\"$strGet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"setSys\" value=\"$strSet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
/*
|
||||
if ( TRUE == session_is_registered("networkSetFlag") ) {
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}else{
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" DISABLED class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}
|
||||
*/
|
||||
echo " ";
|
||||
echo "<b>Command:</b> ";
|
||||
echo "<input type=\"submit\" name=\"saveSys\" value=\"$strSave\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
//echo "<input type=\"submit\" name=\"resetSys\" value=\"$strReset\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"hidden\" name=\"objIdStr\" value=\"2\">";
|
||||
echo "<BR><BR>";
|
||||
|
||||
$tableHeader ="<table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" ";
|
||||
$tableHeader .="bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
|
||||
|
||||
echo "\n $tableHeader";
|
||||
echo "\n <tr bgcolor=\"#E6E6E6\">";
|
||||
echo "<td>Name</td><td>Value</td>";
|
||||
echo "</tr>";
|
||||
|
||||
for($i=0;$i<sizeof($NetworkCodeArr);$i++){
|
||||
$unitObjIdStr=$NetworkCodeArr[$i][0];
|
||||
$unitValue=getSysParamValue($sysId,$unitObjIdStr,$instanceNo,$initValue);
|
||||
$unitLen=$NetworkCodeArr[$i][3];
|
||||
$unitValue=str_replace('E','',$unitValue);
|
||||
$unitInputName=$NetworkCodeArr[$i][1];
|
||||
$unitShowName=$NetworkCodeArr[$i][2];
|
||||
echo "\n <tr>";
|
||||
echo "<td>$unitShowName</td>";
|
||||
echo "<td><input type=text name=\"$unitInputName\" maxlength=\"$unitLen\" value=\"$unitValue\" class=\"text\"></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
echo "\n </table>";
|
||||
?>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
267
wxc2_omc/configuration/confSs7/sgConf.php
Executable file
267
wxc2_omc/configuration/confSs7/sgConf.php
Executable file
@@ -0,0 +1,267 @@
|
||||
<?php
|
||||
/***************************************************************
|
||||
File Name: sgConf.php
|
||||
File Relation: sgList.php
|
||||
File Include: wxc2_omc/inc/header.inc
|
||||
Function: Configure the sigling gateway parameter
|
||||
Global Variable:
|
||||
Global function:
|
||||
Author: JianHui Zheng
|
||||
Date: 2008-06-16
|
||||
|
||||
----- Modify -----
|
||||
Description:
|
||||
***************************************************************/
|
||||
require("../../inc/header.inc");
|
||||
?>
|
||||
|
||||
<?php
|
||||
//Global
|
||||
$sysId="222_99_99";
|
||||
$listPageUrl = "sgList.php?setObjIdStr=$objIdStr&setInstanceNo=$instanceNo";
|
||||
if(0) echo "instanceNo=$instanceNo,objIdStr=$objIdStr<br>";
|
||||
|
||||
$sgTableConfArr=array(
|
||||
array('SG Flag','00.0-00.7'),
|
||||
array('Application Mode','01.0-01.7'),
|
||||
array('Ack Option','02.0-02.0'),
|
||||
array('Signaling Type','02.1-02.7'),
|
||||
array('Remote IP','03.0-06.7')
|
||||
);
|
||||
|
||||
$statusLabel=array(0=>"Disable",1=>"Enable");
|
||||
$serverLabel=array(0=>"Client",1=>"Server");
|
||||
$ackLabel=array(0=>"Allow",1=>"Forbid");
|
||||
$typeLabel=array(0=>"M2UA",1=>"IUA",2=>"M3UA");
|
||||
|
||||
//Get the default value
|
||||
$OBJ_222="OBJ_222";
|
||||
$defSql = " SELECT initValue FROM paramConf WHERE keyId > 0 AND level_1 = 2 AND level_2 = 9 AND paramType=2";
|
||||
$defRes = @mysqli_query($pubConn,$defSql);
|
||||
$defRow = @mysqli_fetch_array($defRes);
|
||||
$defaultValue = $defRow[initValue];
|
||||
//echo "<br>defaultValue=$defaultValue<br>";
|
||||
|
||||
if($_SERVER['REQUEST_METHOD'] == "POST")
|
||||
{
|
||||
//echo "instanceNo=$instanceNo,status=$status,server=$server,ack=$ack,typr=$type,ip=$ip<br>";
|
||||
$status=omc_keep_length($status,"0","2","1");
|
||||
$server=omc_keep_length($server,"0","2","1");
|
||||
$ip=omc_keep_length($ip,"0","8","1");
|
||||
$ip=ipDec2Hex($ip);
|
||||
//echo "instanceNo=$instanceNo,status=$status,server=$server,ack=$ack,typr=$type,ip=$ip<br>";
|
||||
$totalValue=$status.$server.$ack.$type.$ip;
|
||||
$totalValue="00000000000000";
|
||||
$totalValue=setBitValue($totalValue,$sgTableConfArr[0][1],$status);
|
||||
$totalValue=setBitValue($totalValue,$sgTableConfArr[1][1],$server);
|
||||
$totalValue=setBitValue($totalValue,$sgTableConfArr[2][1],$ack);
|
||||
//echo "type=$type,{$sgTableConfArr[3][1]},totalValue=$totalValue<br>";
|
||||
$totalValue=setBitValue($totalValue,$sgTableConfArr[3][1],decbin($type));
|
||||
$totalValue=setBitValue($totalValue,$sgTableConfArr[4][1],$ip);
|
||||
//echo "type=$type,{$sgTableConfArr[3][1]},totalValue=$totalValue<br>";
|
||||
//exit;
|
||||
$levelArr=explode('.',$objIdStr);
|
||||
for($j=0;$j<sizeof($levelArr);$j++)
|
||||
{
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG) echo "<BR>levelArr[$j]={$levelArr[$j]}";
|
||||
}
|
||||
|
||||
$updSql="UPDATE OBJ_222.param_99 SET initValue = '$totalValue' WHERE level_1='$level_1' AND level_2='$level_2' AND instanceNo='$instanceNo' ";
|
||||
if($DEBUG) echo "<BR>updSql=$updSql";
|
||||
mysqli_query($pubConn,$updSql);
|
||||
echo mysqli_error($pubConn);
|
||||
|
||||
echo "<script LANGUAGE=\"JavaScript\">";
|
||||
echo "\n window.opener.location.href=\"$listPageUrl\";";
|
||||
if(!$DEBUG){
|
||||
echo "\n window.close();";
|
||||
}
|
||||
echo "\n </script>";
|
||||
exit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
//Get the parameter
|
||||
//$value,$instanceNoList,instanceNoCount
|
||||
$levelArr=explode('.',$objIdStr);
|
||||
for($j=0;$j<sizeof($levelArr);$j++)
|
||||
{
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG) echo "<BR>levelArr[$j]={$levelArr[$j]}";
|
||||
}
|
||||
if($instanceNo == 'new')
|
||||
{
|
||||
$value=$defaultValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
$getSql="SELECT initValue FROM OBJ_222.param_99 WHERE level_1='$level_1' AND level_2='$level_2' AND instanceNo='$instanceNo' ";
|
||||
if($DEBUG) echo "<BR>getSql=$getSql";
|
||||
$result =mysqli_query($pubConn,$getSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$rows =mysqli_fetch_array($result);
|
||||
echo mysqli_error($pubConn);
|
||||
$value=$rows[0];
|
||||
}
|
||||
|
||||
if($instanceNo == 'new')
|
||||
{
|
||||
$getInstanceSql="SELECT instanceNo FROM OBJ_222.param_99 WHERE level_1='$level_1' AND level_2='$level_2' AND initValue ='$defaultValue'";
|
||||
if($DEBUG) echo "<br>$getInstanceSql";
|
||||
$result=mysqli_query($pubConn,$getInstanceSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$instanceNoCount=0;
|
||||
while($row=mysqli_fetch_array($result))
|
||||
{
|
||||
$instanceNoList[$instanceNoCount++]=$row[instanceNo];
|
||||
//echo "<option value=$row[instanceNo]>$row[instanceNo]</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$sgStatus=getBitValue($value,$sgTableConfArr[0][1])+0;
|
||||
$sgServer=getBitValue($value,$sgTableConfArr[1][1])+0;
|
||||
$sgACK=getBitValue($value,$sgTableConfArr[2][1])+0;
|
||||
$sgType=bindec(getBitValue($value,$sgTableConfArr[3][1]))+0;
|
||||
$sgIP=getBitValue($value,$sgTableConfArr[4][1]);
|
||||
$sgIP=ipHex2Dec($sgIP);
|
||||
if($DEBUG) echo "instanceNo=$instanceNo,status=$sgStatus,server=$sgServer,ack=$sgACK,type=$sgType,ip=$sgIP<br>";
|
||||
|
||||
|
||||
|
||||
//show the page
|
||||
echo "<br><body topmargin=\"0\" leftmargin=\"12\">";
|
||||
echo "<form method=\"POST\" name=\"selectform\" action=\"$PHP_SELF\">";
|
||||
echo "<table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
|
||||
echo "<tr bgcolor=\"#E6E6E6\"><td>Name</td><td>Value</td></tr>";
|
||||
|
||||
//instanceNo
|
||||
echo "<tr>";
|
||||
if($instanceNo == 'new')
|
||||
{
|
||||
echo "<td>No.</td>";
|
||||
echo "<td><select name=\"instanceNo\">";
|
||||
for($i=0;$i<$instanceNoCount;$i++)
|
||||
{
|
||||
echo "<option value={$instanceNoList[$i]}>{$instanceNoList[$i]}</option>";
|
||||
}
|
||||
echo "</select></td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<td>No.</td>";
|
||||
echo "<td>$instanceNo</td>";
|
||||
echo "<input type=\"hidden\" name=\"instanceNo\" value=$instanceNo>";
|
||||
}
|
||||
echo "</tr>";
|
||||
|
||||
//SG Flag
|
||||
echo "<tr>";
|
||||
echo "<td>SG Flag</td>";
|
||||
echo "<td>";
|
||||
echo "<select name=\"status\">";
|
||||
for($i=0;$i<sizeof($statusLabel);$i++)
|
||||
{
|
||||
if($sgStatus == $i)
|
||||
echo "<option value=$i selected>{$statusLabel[$i]}</option>";
|
||||
else
|
||||
echo "<option value=$i>{$statusLabel[$i]}</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
|
||||
//server
|
||||
echo "<tr>";
|
||||
echo "<td>Application Mode</td>";
|
||||
echo "<td>";
|
||||
echo "<select name=\"server\">";
|
||||
for($i=0;$i<sizeof($serverLabel);$i++)
|
||||
{
|
||||
if($sgServer == $i)
|
||||
echo "<option value=$i selected>{$serverLabel[$i]}</option>";
|
||||
else
|
||||
echo "<option value=$i>{$serverLabel[$i]}</option>";
|
||||
}
|
||||
|
||||
//ACK
|
||||
echo "<tr>";
|
||||
echo "<td>Ack Option</td>";
|
||||
echo "<td>";
|
||||
echo "<select name=\"ack\">";
|
||||
for($i=0;$i<sizeof($ackLabel);$i++)
|
||||
{
|
||||
if($sgACK == $i)
|
||||
echo "<option value=$i selected>{$ackLabel[$i]}</option>";
|
||||
else
|
||||
echo "<option value=$i>{$ackLabel[$i]}</option>";
|
||||
}
|
||||
|
||||
//Signaling Type
|
||||
echo "<tr>";
|
||||
echo "<td>Signaling Type</td>";
|
||||
echo "<td>";
|
||||
echo "<select name=\"type\">";
|
||||
for($i=0;$i<sizeof($typeLabel);$i++)
|
||||
{
|
||||
if($sgType == $i)
|
||||
echo "<option value=$i selected>{$typeLabel[$i]}</option>";
|
||||
else
|
||||
echo "<option value=$i>{$typeLabel[$i]}</option>";
|
||||
}
|
||||
echo "</tr>";
|
||||
|
||||
//ip
|
||||
echo "<tr>";
|
||||
echo "<td>Remote IP</td>";
|
||||
echo "<td>";
|
||||
echo "<input type=\"text\" name=\"ip\" value=$sgIP maxLength=16 length=12 class=\"text\">";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
|
||||
echo "<br>";
|
||||
echo "\n <input type=\"hidden\" name=\"sysId\" value=\"$sysId\">";
|
||||
echo "\n <input type=\"hidden\" name=\"objIdStr\" value=\"$objIdStr\">";
|
||||
if($instanceNo != 'new')
|
||||
{
|
||||
echo "\n <input type=\"hidden\" name=\"instanceNo\" value=\"$instanceNo\">";
|
||||
}
|
||||
echo "\n <input type=\"submit\" name=\"set\" value=\"Set\"> ";
|
||||
echo "\n <input type=\"reset\" name=\"reset\" value=\"Reset\">";
|
||||
|
||||
echo "</form>";
|
||||
echo "</body>";
|
||||
|
||||
//function define
|
||||
function ipHex2Dec($ipHex)
|
||||
{
|
||||
$ipDec="";
|
||||
for($i=0;$i<4;$i++)
|
||||
{
|
||||
$temp=substr($ipHex,$i*2,2);
|
||||
$temp=hexdec($temp);
|
||||
$ipDec.=$temp.".";
|
||||
}
|
||||
$ipDec=substr($ipDec,0,strlen($ipDec)-1);
|
||||
return $ipDec;
|
||||
}
|
||||
|
||||
|
||||
function ipDec2Hex($ipDec)
|
||||
{
|
||||
$ipHex="";
|
||||
$unit=explode(".",$ipDec);
|
||||
for($i=0;$i<4;$i++)
|
||||
{
|
||||
$temp=dechex($unit[$i]);
|
||||
$temp=omc_keep_length($temp,"0","2","1");
|
||||
$ipHex.=$temp;
|
||||
}
|
||||
return strtoupper($ipHex);
|
||||
}
|
||||
|
||||
?>
|
||||
413
wxc2_omc/configuration/confSs7/sgList.php
Executable file
413
wxc2_omc/configuration/confSs7/sgList.php
Executable file
@@ -0,0 +1,413 @@
|
||||
<?php
|
||||
/***************************************************************
|
||||
File Name: sgList.php
|
||||
File Relation: sgConf.php
|
||||
File Include: wxc2_omc/inc/header.inc
|
||||
Function: Configure the sigling gateway parameter
|
||||
Global Variable:
|
||||
Global function:
|
||||
Author: JianHui Zheng
|
||||
Date: 2008-06-16
|
||||
|
||||
----- Modify -----
|
||||
Description:
|
||||
***************************************************************/
|
||||
require("../../inc/header.inc");
|
||||
?>
|
||||
|
||||
<script LANGUAGE="JavaScript">
|
||||
function openSet(objIdStr,instanceNo){
|
||||
URL="./sgConf.php?instanceNo="+instanceNo+"&objIdStr="+objIdStr;
|
||||
var setWindow = open(URL, 'newWin', 'toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,status=yes,width=400,height=350');
|
||||
setWindow.focus();
|
||||
}
|
||||
|
||||
function delFirm(instanceNo)
|
||||
{
|
||||
var delValue,x,y;
|
||||
x = document.body.scrollLeft;
|
||||
y = document.body.scrollTop;
|
||||
|
||||
if(confirm('Do you want to delete the selected?')!=true){
|
||||
window.location.href='<?php echo $PHP_SELF;?>'+"?scroll_x="+x+"&scroll_y="+y;
|
||||
}else{
|
||||
window.location.href='<?php echo $PHP_SELF;?>?&delete=1&delValue='+instanceNo+"&scroll_x="+x+"&scroll_y="+y;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
|
||||
|
||||
<?php
|
||||
adjust_head();
|
||||
adjust_title_head();
|
||||
|
||||
//Global variable
|
||||
$sysId='222_99_99';
|
||||
$objIdStr="2.9";
|
||||
$nGetComm = 0;
|
||||
$nSetComm = 3;
|
||||
$maxTimeOut = 30;
|
||||
$nProcFail = 0;//failure
|
||||
$nWaitProc = 1;//wait
|
||||
$nInProc = 2;
|
||||
$nOutProc = 3;
|
||||
/*
|
||||
SG attributes
|
||||
[unit]Enable[u]00.0-00.7[u]select
|
||||
[v]0[opt]Disable
|
||||
[v]1[opt]Enable
|
||||
[unit]Server[u]01.0-01.7[u]select
|
||||
[v]0[opt]Client
|
||||
[v]1[opt]Server
|
||||
[unit]ACK[u]02.0-02.0[u]select
|
||||
[v]0[opt]no ACK
|
||||
[v]1[opt]ACK
|
||||
[unit]SG Type[u]02.1-02.7[u]select
|
||||
[v]0[opt]M2UA
|
||||
[v]1[opt]IUA
|
||||
[v]2[opt]M3UA
|
||||
[unit]IP[u]03.0-06.7[u]input
|
||||
[v]keepHex-high-0
|
||||
*/
|
||||
$sgTableConfArr=array(
|
||||
array('SG Flag','00.0-00.7'),
|
||||
array('Application Mode','01.0-01.7'),
|
||||
array('Ack Option','02.0-02.0'),
|
||||
array('Signaling Type','02.1-02.7'),
|
||||
array('Remote IP','03.0-06.7')
|
||||
);
|
||||
|
||||
$statusLabel=array(0=>"Disable",1=>"Enable");
|
||||
$serverLabel=array(0=>"Client",1=>"Server");
|
||||
$ackLabel=array(0=>"Allow",1=>"Forbid");
|
||||
$typeLabel=array(0=>"M2UA",1=>"IUA",2=>"M3UA");
|
||||
|
||||
//Get the default value
|
||||
$OBJ_222="OBJ_222";
|
||||
$defSql = " SELECT initValue FROM paramConf WHERE keyId > 0 AND level_1 = 2 AND level_2 = 9 AND paramType=2";
|
||||
$defRes = @mysqli_query($pubConn,$defSql);
|
||||
$defRow = @mysqli_fetch_array($defRes);
|
||||
$defaultValue = $defRow[initValue];
|
||||
//echo "<br>defaultValue=$defaultValue<br>";
|
||||
|
||||
//set and get parameter
|
||||
if(isset($setSys) || isset($getSys))
|
||||
{
|
||||
echo "<br><br><br><br><br>";
|
||||
if(isset($setSys))
|
||||
{
|
||||
$moveSql="UPDATE OBJ_222.param_99 SET readValue = initValue WHERE level_1='2' AND level_2='9' ";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$commIdStr=sysCommSend($sysId,$nSetComm,$objIdStr);
|
||||
$showType="Set";
|
||||
}
|
||||
else
|
||||
{
|
||||
$commIdStr=sysCommSend($sysId,$nGetComm,$objIdStr);
|
||||
$showType="Get";
|
||||
}
|
||||
$time = 0;
|
||||
while(1)
|
||||
{
|
||||
if($time == 0)
|
||||
echo "<br>$showType signaling gateway";
|
||||
if($time > $maxTimeOut)
|
||||
{
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "222_99_99";
|
||||
$chRes=ChComm($sysId,"0");
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail)
|
||||
{
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else if($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
sleep(1);
|
||||
$time++;
|
||||
}
|
||||
$moveSql = "UPDATE OBJ_222.param_99 SET initValue = readValue WHERE level_1='2' AND level_2='9' ";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
}
|
||||
//save parameter
|
||||
else if(isset($saveSys))
|
||||
{
|
||||
$updSql="UPDATE OBJ_222.param_99 SET initValue='02' WHERE level_1='3' AND level_2='7' ";
|
||||
$updRes = @mysqli_query($pubConn,$updSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$commIdStr=sysCommSend($sysId,$nSetComm,'3.7');
|
||||
$time=0;
|
||||
while(1)
|
||||
{
|
||||
if($time == 0)
|
||||
echo "<br>Save parameter to system";
|
||||
if($time > $maxTimeOut)
|
||||
{
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "222_99_99";
|
||||
$chRes=ChComm($sysId,"0");
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$time++;
|
||||
}
|
||||
}
|
||||
//reset parameter
|
||||
else if(isset($resetSys))
|
||||
{
|
||||
$updSql="UPDATE OBJ_222.param_99 SET initValue = '01' WHERE level_1 = '3' AND level_2 = '7' ";
|
||||
$updRes = @mysqli_query($pubConn,$updSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$commIdStr=sysCommSend($sysId,$nSetComm,'3.7');
|
||||
if($DEBUG) echo "<BR>commIdStr=$commIdStr";
|
||||
if($DEBUG) echo "<BR>commIdStr=$commIdStr";
|
||||
$time=0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($time == 0)
|
||||
echo "<br>Reset system";
|
||||
if($time > $maxTimeOut){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "222_99_99";
|
||||
$chRes=ChComm($sysId,"0");
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
sleep(1);
|
||||
$time++;
|
||||
}
|
||||
}
|
||||
|
||||
//delete
|
||||
if(1==$delete)
|
||||
{
|
||||
$delSql = "UPDATE OBJ_222.param_99 SET initValue = '$defaultValue'
|
||||
WHERE level_1='2' AND level_2='9' AND instanceNo='$delValue'";
|
||||
//echo "<br>delSql=$delSql";
|
||||
$delRes = @mysqli_query($pubConn,$delSql);
|
||||
echo mysqli_error($pubConn);
|
||||
}
|
||||
|
||||
if($setSys || $getSys || $saveSys ||$resetSys){
|
||||
echo "<br>";
|
||||
echo "<p align=\"left\"><a href=\"$PHP_SELF?setFlag=$setFlag\" target=\"contents\"><img align=absBottom border=0 src=\"../../images/left.gif\" width=\"14\" height=\"14\">$strBack</a>";
|
||||
exit();
|
||||
}
|
||||
|
||||
//Get the parameter
|
||||
$getSql="SELECT initValue,instanceNo FROM param_99 WHERE level_1=2 AND level_2=9 ";
|
||||
$result =mysqli_query($pubConn,$getSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$sgCount=0;
|
||||
|
||||
while($rows = mysqli_fetch_array($result)){
|
||||
$instanceNo=$rows[instanceNo];
|
||||
$value=$rows[0];
|
||||
if(strcasecmp($value,$defaultValue)==0)
|
||||
continue;
|
||||
|
||||
$sgInstance[$sgCount]=$instanceNo+0;
|
||||
$sgStatus[$sgCount]=getBitValue($value,$sgTableConfArr[0][1])+0;
|
||||
$sgServer[$sgCount]=getBitValue($value,$sgTableConfArr[1][1])+0;
|
||||
$sgACK[$sgCount]=getBitValue($value,$sgTableConfArr[2][1])+0;
|
||||
$sgType[$sgCount]=bindec(getBitValue($value,$sgTableConfArr[3][1]))+0;
|
||||
$sgIP[$sgCount]=ipHex2Dec(getBitValue($value,$sgTableConfArr[4][1]));
|
||||
|
||||
//echo "value=$value,status:{$sgStatus[$sgCount]},server:{$sgServer[$sgCount]},ack:{$sgACK[$sgCount]},type:{$sgType[$sgCount]},IP:{$sgIP[$sgCount]}<br>";
|
||||
$sgCount++;
|
||||
}
|
||||
|
||||
//show the page
|
||||
?>
|
||||
<?php
|
||||
$helpId="2.1.0";
|
||||
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
|
||||
echo "<tr>";
|
||||
echo "<td width=\"50%\">";
|
||||
echo "$strConfiguration > $strNetwork > SS7 > Signaling Gateway";
|
||||
echo "</td>";
|
||||
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
|
||||
showHelp($helpId);
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td align=\"left\">";
|
||||
|
||||
echo "<form>";
|
||||
echo "<b>System:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getSys\" value=\"$strGet\" class=\"button\">";
|
||||
echo "<input type=\"submit\" name=\"setSys\" value=\"$strSet\" class=\"button\">";
|
||||
|
||||
echo " ";
|
||||
echo "<b>Command:</b> ";
|
||||
// style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"
|
||||
echo "<input type=\"submit\" name=\"saveSys\" value=\"$strSave\" class=\"button\">";
|
||||
echo "<input type=\"submit\" name=\"resetSys\" value=\"$strReset\" class=\"button\">";
|
||||
echo "<input type=\"hidden\" name=\"objIdStr\" value=\"2.9\">";
|
||||
|
||||
echo "</td>";
|
||||
echo "<td> ";
|
||||
echo "</td>";
|
||||
echo "</table>";
|
||||
|
||||
|
||||
|
||||
adjust_title_tail();
|
||||
adjust_content_head();
|
||||
echo "<br><table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
|
||||
echo "<tr bgcolor=\"#E6E6E6\">";
|
||||
echo "<td>No.</td>";
|
||||
echo "<td>SG Flag</td>";
|
||||
echo "<td>Application Mode</td>";
|
||||
echo "<td>Ack Option</td>";
|
||||
echo "<td>Signaling Type</td>";
|
||||
echo "<td>Remote IP</td>";
|
||||
echo "<td>Delete</td>";
|
||||
echo "</tr>";
|
||||
|
||||
for($index=0;$index<$sgCount;$index++)
|
||||
{
|
||||
if($sgInstance[$index] == $setInstanceNo && $objIdStr==$setObjIdStr)
|
||||
echo "<tr bgcolor=#CCFFCC>";
|
||||
else
|
||||
echo "<tr>";
|
||||
echo "<td><a href=\"javascript:openSet('2.9','{$sgInstance[$index]}')\">";
|
||||
echo "{$sgInstance[$index]}</a> </td>";
|
||||
echo "<td>{$statusLabel[$sgStatus[$index]]} </td>";
|
||||
echo "<td>{$serverLabel[$sgServer[$index]]} </td>";
|
||||
echo "<td>{$ackLabel[$sgACK[$index]]} </td>";
|
||||
echo "<td>{$typeLabel[$sgType[$index]]} </td>";
|
||||
echo "<td>{$sgIP[$index]} </td>";
|
||||
echo "<td><input type=\"checkbox\" name=\"C$instanceNo\" value=\"ON\" onClick=\"javascript:delFirm({$sgInstance[$index]})\" ></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "<tr>";
|
||||
echo "<td><a href=\"javascript:openSet('$objIdStr','new')\">";
|
||||
echo "New</a></td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
|
||||
//function define
|
||||
function ChComm($sysId,$chkType)
|
||||
{
|
||||
global $omc_db;
|
||||
global $remark,$nProcFail,$nWaitProc,$nInProc,$nOutProc;
|
||||
|
||||
$commTable = "parameterComm";
|
||||
|
||||
$sysIdArr = explode('_',$sysId);
|
||||
$sysTypeNo = $sysIdArr[0];
|
||||
$sysNo = $sysIdArr[1];
|
||||
$subSysNo = $sysIdArr[2];
|
||||
|
||||
if($chkType==0)
|
||||
$selComm = " SELECT commState,remark FROM $commTable WHERE sysTypeNo = '$sysTypeNo' ";
|
||||
else
|
||||
$selComm = " SELECT commState,remark FROM $commTable WHERE sysTypeNo = '$sysTypeNo' AND sysNo = '$sysNo' ";
|
||||
|
||||
$selRes = @mysqli_query($pubConn,$selComm);
|
||||
$selRow = @mysqli_fetch_array($selRes);
|
||||
echo mysqli_error($pubConn);
|
||||
$outProcCount=0;
|
||||
do
|
||||
{
|
||||
$temCommState = $selRow[commState];
|
||||
if(isset($selRow[remark])){
|
||||
$remark = $selRow[remark];
|
||||
if($DEBUG)echo "<br>remark=$remark";
|
||||
}
|
||||
if($DEBUG)echo "<br>temCommState=$temCommState";
|
||||
if($temCommState == $nWaitProc){
|
||||
return($nWaitProc);
|
||||
}elseif($temCommState == $nInProc){
|
||||
return($nInProc);
|
||||
}elseif($temCommState == $nOutProc){
|
||||
$commState = $nOutProc;
|
||||
$outProcCount++;
|
||||
}else{
|
||||
$commState = $nProcFail;
|
||||
}
|
||||
}while($selRow = @mysqli_fetch_array($selRes));
|
||||
if($outProcCount > 0){
|
||||
return($nOutProc);
|
||||
}else{
|
||||
return($nProcFail);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function ipHex2Dec($ipHex)
|
||||
{
|
||||
$ipDec="";
|
||||
for($i=0;$i<4;$i++)
|
||||
{
|
||||
$temp=substr($ipHex,$i*2,2);
|
||||
$temp=hexdec($temp);
|
||||
$ipDec.=$temp.".";
|
||||
}
|
||||
$ipDec=substr($ipDec,0,strlen($ipDec)-1);
|
||||
return $ipDec;
|
||||
}
|
||||
|
||||
|
||||
function ipDec2Hex($ipDec)
|
||||
{
|
||||
$ipHex="";
|
||||
$unit=explode(".",$ipDec);
|
||||
for($i=0;$i<4;$i++)
|
||||
{
|
||||
$temp=dechex($unit[$i]);
|
||||
$temp=omc_keep_length($temp,"0","2","1");
|
||||
$ipHex.=$temp;
|
||||
}
|
||||
return strtoupper($ipHex);
|
||||
}
|
||||
adjust_content_tail();
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
372
wxc2_omc/configuration/confSs7/ss7LinkConf.php
Executable file
372
wxc2_omc/configuration/confSs7/ss7LinkConf.php
Executable file
@@ -0,0 +1,372 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߺ<EFBFBD><DFBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD> Link
|
||||
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: header.inc
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
|
||||
<20><><EFBFBD>ߣ<EFBFBD>
|
||||
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Cui Ticun
|
||||
ʱ<EFBFBD>䣺2004-4-21
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Support OMC7.0,<2C><>advanced<65>Ƶ<EFBFBD>configuration<6F>У<EFBFBD><D0A3><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><CFB7>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>ť
|
||||
*********************************************************/
|
||||
require("../../inc/header.inc");
|
||||
$DEBUG =0;
|
||||
|
||||
if($DEBUG) echo "<br><3E><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD>";
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
$pubDb = 'OMC_PUB';
|
||||
$numberPerPage = 100; //ÿҳ<C3BF><D2B3>¼<EFBFBD><C2BC>
|
||||
$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'
|
||||
);
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<BR>sysId =$sysId";
|
||||
if($DEBUG) echo "<BR>instanceNo =$instanceNo";
|
||||
if($DEBUG) echo "<BR>objIdStr =$objIdStr";
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>
|
||||
//==========================================================
|
||||
|
||||
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
|
||||
|
||||
$levelWhere = getLevelWhere($objIdStr);
|
||||
if($DEBUG) echo "<BR>levelWhere=$levelWhere";
|
||||
|
||||
$getSql="SELECT $initValue,instanceNo FROM $paramTable
|
||||
WHERE $levelWhere
|
||||
";
|
||||
if($DEBUG) echo "<BR>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 "<br>defValue=$defValue";
|
||||
if($DEBUG) echo "<BR>";
|
||||
?>
|
||||
<br>
|
||||
<body topmargin="0" leftmargin="12">
|
||||
<?php
|
||||
echo "<form method=\"POST\" name=\"setForm\" action=\"$PHP_SELF\">";
|
||||
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 "<BR>selSql=$selSql";
|
||||
$result=mysqli_query($pubConn,$selSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$rows =mysqli_fetch_array($result);
|
||||
$orgValue=$rows[0];
|
||||
if($DEBUG) echo "<br>orgvalue=$orgValue";
|
||||
echo mysqli_error($pubConn);
|
||||
//$orgValue = getSysParamValue($sysId,$objIdStr,$instanceNo,$initValue);
|
||||
}
|
||||
if($_SERVER['REQUEST_METHOD'] == "POST"){
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD>
|
||||
$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 "<BR>linksetNo=$linksetNo";
|
||||
$newValue=setBitValue($newValue,$linkAttConfArr[1][1],$linksetNo);
|
||||
if($DEBUG) echo "<BR>newValue=$newValue";
|
||||
|
||||
$slcNo =dechex($slcNo);
|
||||
$slcNo= strlen($slcNo) < 2?'0'.$slcNo:$slcNo;
|
||||
if($DEBUG) echo "<BR>slcNo=$slcNo";
|
||||
$newValue=setBitValue($newValue,$linkAttConfArr[2][1],$slcNo);
|
||||
if($DEBUG) echo "<BR>newValue=$newValue";
|
||||
|
||||
|
||||
if($cpcIp=='')
|
||||
$cpcIp="FFFFFFFF";
|
||||
else
|
||||
$cpcIp=ip2byte($cpcIp);
|
||||
if($DEBUG) echo "<BR>cpcIp=$cpcIp";
|
||||
$newValue=setBitValue($newValue,$linkAttConfArr[3][1],$cpcIp);
|
||||
if($DEBUG) echo "<BR>newValue=$newValue";
|
||||
|
||||
|
||||
if($DEBUG) echo "<BR>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 "<BR>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 "<BR>sgNo=$sgNo";
|
||||
$newValue=setBitValue($newValue,$linkAttConfArr[9][1],$sgNo);
|
||||
if($DEBUG) echo "<BR>newValue=$newValue";
|
||||
|
||||
$m2uaInterfaceID =dechex($m2uaInterfaceID);
|
||||
$m2uaInterfaceID= strlen($m2uaInterfaceID) < 2?'0'.$m2uaInterfaceID:$m2uaInterfaceID;
|
||||
if($DEBUG) echo "<BR>m2uaInterfaceID=$m2uaInterfaceID";
|
||||
$newValue=setBitValue($newValue,$linkAttConfArr[10][1],$m2uaInterfaceID);
|
||||
if($DEBUG) echo "<BR>newValue=$newValue";
|
||||
|
||||
|
||||
if($alternativeMTP3=='')
|
||||
$alternativeMTP3="FFFFFFFF";
|
||||
else
|
||||
$alternativeMTP3=ip2byte($alternativeMTP3);
|
||||
if($DEBUG) echo "<BR>alternativeMTP3=$alternativeMTP3";
|
||||
$newValue=setBitValue($newValue,$linkAttConfArr[11][1],$alternativeMTP3);
|
||||
if($DEBUG) echo "<BR>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 "<BR>updSql=$updSql";
|
||||
mysqli_query($pubConn,$updSql);
|
||||
echo mysqli_error($pubConn);
|
||||
//setSysParamValue($sysId,$objIdStr,$instanceNo,$newValue);
|
||||
echo "<script LANGUAGE=\"JavaScript\">";
|
||||
echo "\n window.opener.location.href=\"$listPageUrl\";";
|
||||
echo "\n window.opener.document.setForm.focus();";
|
||||
if(!$DEBUG){
|
||||
echo "\n window.close();";
|
||||
}
|
||||
echo "\n </script>";
|
||||
exit();
|
||||
}else{
|
||||
//<2F><>ʾ
|
||||
$tableHeader ="<table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" ";
|
||||
$tableHeader .="bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
|
||||
|
||||
//echo "<br>orgValue=$orgValue";
|
||||
echo "$tableHeader";
|
||||
echo "<tr bgcolor=\"#E6E6E6\"><td>Name</td><td>Value</td></tr>";
|
||||
$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;$j<sizeof($levelArr);$j++){
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG) echo "<BR>levelArr[$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 "<tr><td>No.</td><td>";
|
||||
if($DEBUG) echo "<br>$getInstanceSql";
|
||||
echo "<select name=\"instanceNo\" size=\"1\">";
|
||||
while($row=mysqli_fetch_array($result)){
|
||||
echo "<option value=$row[instanceNo]>$row[instanceNo]</option>";
|
||||
}
|
||||
echo"</select>";
|
||||
echo"</td></tr>";
|
||||
}
|
||||
echo "<tr><td>Flag</td><td>";
|
||||
$flagArr=array(0=>'Disable',1=>'Enable');
|
||||
echo "<select name=\"flag\">";
|
||||
for($i=0;$i<sizeof($flagArr);$i++)
|
||||
{
|
||||
echo "<option value=\"$i\" ";
|
||||
if($i == $flag)
|
||||
echo "selected";
|
||||
echo ">$flagArr[$i]</option>";
|
||||
}
|
||||
echo "</td></tr>";
|
||||
|
||||
echo "<tr><td>Linkset ID</td> <td>";
|
||||
echo "<input type=\"text\" size=\"3\" maxlength=\"3\" name=\"linksetNo\" value=\"$linksetNo\" class=\"text\">";
|
||||
echo "</td></tr>";
|
||||
echo "<tr><td>SLC</td> <td>";
|
||||
echo "<input type=\"text\" size=\"3\" maxlength=\"3\" name=\"slcNo\" value=\"$slcNo\" class=\"text\">";
|
||||
echo "</td></tr>";
|
||||
echo "<tr><td>Host IP</td> <td>";
|
||||
echo "<input type=\"text\" size=\"15\" maxlength=\"15\" name=\"cpcIp\" value=\"$cpcIp\" class=\"text\">";
|
||||
echo "</td></tr>";
|
||||
echo "<tr><td>Signaling Type</td> <td>";
|
||||
|
||||
echo "<select name=\"linkType\">";
|
||||
for ($i=0;$i<sizeof($linkTypeArr);$i++)
|
||||
{
|
||||
echo "<option value=\"$i\" ";
|
||||
if ($i == $linkType)
|
||||
{
|
||||
echo "selected";
|
||||
}
|
||||
echo ">$linkTypeArr[$i]</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
echo "</td></tr>";
|
||||
|
||||
//MTP3-Lite Application Mode
|
||||
$appModeArr=array(0=>"Server",1=>"Client");
|
||||
echo "<tr><td>MTP3-Lite Application Mode</td>";
|
||||
echo "<td>";
|
||||
echo "<select name=\"mtp3_lite_app_mode\">";
|
||||
for($i=0;$i<sizeof($appModeArr);$i++)
|
||||
{
|
||||
echo "<option value=\"$i\" ";
|
||||
if($i == $mtp3_lite_app_mode)
|
||||
echo "selected";
|
||||
echo ">{$appModeArr[$i]}</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
echo "</td></tr>";
|
||||
|
||||
//MTP3-Lite Remote IP
|
||||
echo "<tr><td>MTP3-Lite Remote IP</td><td>";
|
||||
echo "<input type=\"text\" name=\"mtp3_lite_remote_ip\" value=\"$mtp3_lite_remote_ip\" class=\"text\">";
|
||||
echo "</td></tr>";
|
||||
|
||||
//MTP3-Lite Inactivity Timeout
|
||||
echo "<tr><td>MTP3-Lite Inactivity Timeout</td><td>";
|
||||
echo "<input type=\"text\" name=\"mtp3_lite_inact_timeout\" value=\"$mtp3_lite_inact_timeout\" class=\"text\">";
|
||||
echo "</td></tr>";
|
||||
|
||||
//MTP3-Lite Allowed Timeout times
|
||||
echo "<tr><td>MTP3-Lite Allowed Timeout times</td><td>";
|
||||
echo "<input type=\"text\" name=\"mtp3_lite_allow_timeout_time\" value=\"$mtp3_lite_allow_timeout_time\" class=\"text\">";
|
||||
echo "</td></tr>";
|
||||
|
||||
echo "<tr><td>SG ID</td><td>";
|
||||
echo "<input type=\"text\" size=\"3\" maxlength=\"3\" name=\"sgNo\" value=\"$sgNo\" class=\"text\">";
|
||||
echo "</td></tr>";
|
||||
echo "<tr><td>M2UA Interface ID</td><td>";
|
||||
echo "<input type=\"text\" size=\"3\" maxlength=\"3\" name=\"m2uaInterfaceID\" value=\"$m2uaInterfaceID\" class=\"text\">";
|
||||
echo "</td></tr>";
|
||||
echo "<tr><td>Alternative Host IP</td> <td>";
|
||||
echo "<input type=\"text\" size=\"15\" maxlength=\"15\" name=\"alternativeMTP3\" value=\"$alternativeMTP3\" class=\"text\">";
|
||||
echo "</td></tr>";
|
||||
|
||||
echo "</table>";
|
||||
|
||||
echo "\n <input type=\"hidden\" name=\"objIdStr\" value=\"$objIdStr\">";
|
||||
if($instanceNo != 'new'){
|
||||
echo "\n <input type=\"hidden\" name=\"instanceNo\" value=\"$instanceNo\">";
|
||||
}
|
||||
echo "\n <input type=\"submit\" name=\"set\" value=\"Set\"> ";
|
||||
echo "\n <input type=\"reset\" name=\"reset\" value=\"Reset\">";
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
</form>
|
||||
<b>Remarks:</b><br><br>
|
||||
Linkset: The number of the linkset assigned to this link, range from 0 to 127<br><br>
|
||||
SLC: Signaling link code, rang from 0 to 15, identify the E1 links within a same linkset<br><br>
|
||||
IP: For the link 0 to 127, input 98. For the link 128 to 255, input 99
|
||||
|
||||
</body>
|
||||
</html>
|
||||
508
wxc2_omc/configuration/confSs7/ss7LinkList.php
Executable file
508
wxc2_omc/configuration/confSs7/ss7LinkList.php
Executable file
@@ -0,0 +1,508 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߺ<EFBFBD><DFBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD> Link
|
||||
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: header.inc
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
|
||||
<20><><EFBFBD>ߣ<EFBFBD>
|
||||
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Cui Ticun
|
||||
ʱ<EFBFBD>䣺2004-4-21
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Support OMC7.0,<2C><>advanced<65>Ƶ<EFBFBD>configuration<6F>У<EFBFBD><D0A3><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><CFB7>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>ť
|
||||
*********************************************************/
|
||||
require("../../inc/header.inc");
|
||||
$helpId = "2.1.0";
|
||||
$DEBUG = 0;
|
||||
?>
|
||||
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
|
||||
<?php
|
||||
adjust_head();
|
||||
adjust_title_head();
|
||||
if($DEBUG) echo "<br><3E><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD>";
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
$pubDb = 'OMC_PUB';
|
||||
$paramTable ='OBJ_222.param_99';
|
||||
$objIdStr ='2.5.1';
|
||||
$maxNum = 30;
|
||||
|
||||
$nGetComm = 0;
|
||||
$nSetComm = 3;
|
||||
|
||||
$sysId ='222_99_99';
|
||||
$initValue ='initValue';
|
||||
$editValue ='editValue';
|
||||
$readValue ='readValue';
|
||||
|
||||
$nProcFail = 0;//failure
|
||||
$nWaitProc = 1;//wait
|
||||
$nInProc = 2;
|
||||
$nOutProc = 3;
|
||||
|
||||
$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('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'
|
||||
);
|
||||
$levelWhere = getLevelWhere($objIdStr);
|
||||
if($DEBUG) echo "<BR>levelWhere=$levelWhere";
|
||||
|
||||
$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 "<br>defValue=$defValue";
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<br>setInstanceNo=$setInstanceNo";
|
||||
if($DEBUG) echo "<BR>setObjIdStr =$setObjIdStr";
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD>get/set<65><74><EFBFBD><EFBFBD>
|
||||
if($_SERVER['REQUEST_METHOD'] == "POST"){
|
||||
echo "<br><br><br><br><br>";
|
||||
if(isset($setSys) || isset($getSys)){
|
||||
if(isset($setSys)){
|
||||
$moveSql = "UPDATE $paramTable SET readValue = initValue
|
||||
WHERE level_1='2' AND level_2='5' AND level_3='1'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
|
||||
$commIdStr = sysCommSend($sysId,$nSetComm,$objIdStr);
|
||||
|
||||
$showType="Set";
|
||||
}else{
|
||||
$commIdStr = sysCommSend($sysId,$nGetComm,$objIdStr);
|
||||
$showType="Get";
|
||||
}
|
||||
if($DEBUG) echo "<BR>commIdStr =$commIdStr";
|
||||
if($DEBUG) echo "<BR>commIdStr =$commIdStr";
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>$showType Link";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "222_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
$needCopyReadBuf = 1;
|
||||
|
||||
//Get link status
|
||||
$commIdStr = sysCommSend($sysId,$nGetComm,"3.1");
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Get Link Status";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "222_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
$moveSql = "UPDATE $paramTable SET initValue = readValue
|
||||
WHERE level_1='2' AND level_2='5' AND level_3='1'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
|
||||
$moveSql = "UPDATE $paramTable SET initValue = readValue
|
||||
WHERE level_1='3' AND level_2='1'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
}elseif(isset($saveSys)){
|
||||
$updSql = " UPDATE $paramTable SET initValue = '02'
|
||||
WHERE level_1 = '3' AND level_2 = '7'
|
||||
";
|
||||
$updRes = @mysqli_query($pubConn,$updSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$commIdStr=sysCommSend($sysId,$nSetComm,'3.7');
|
||||
if($DEBUG) echo "<BR>commIdStr =$commIdStr";
|
||||
if($DEBUG) echo "<BR>commIdStr =$commIdStr";
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Save parameter to system";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "222_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
}elseif(isset($resetSys)){
|
||||
$updSql = " UPDATE $paramTable SET initValue = '01'
|
||||
WHERE level_1 = '3' AND level_2 = '7'
|
||||
";
|
||||
$updRes = @mysqli_query($pubConn,$updSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$commIdStr=sysCommSend($sysId,$nSetComm,'3.7');
|
||||
if($DEBUG) echo "<BR>commIdStr =$commIdStr";
|
||||
if($DEBUG) echo "<BR>commIdStr =$commIdStr";
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Reset system";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "222_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(1==$delete)
|
||||
{
|
||||
$delSql = "UPDATE $paramTable SET initValue = '$defValue'
|
||||
WHERE level_1='2' AND level_2='5' AND level_3='1' AND instanceNo='$delValue'";
|
||||
//echo "<br>delSql=$delSql";
|
||||
$delRes = @mysqli_query($pubConn,$delSql);
|
||||
echo mysqli_error($pubConn);
|
||||
}
|
||||
|
||||
if($setSys || $getSys || $saveSys || $undoSet||$resetSys){
|
||||
echo "<br>";
|
||||
echo "<p align=\"left\"><a href=\"$PHP_SELF?setFlag=$setFlag\" target=\"contents\"><img align=absBottom border=0 src=\"../../images/left.gif\" width=\"14\" height=\"14\">$strBack</a>";
|
||||
exit();
|
||||
}
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<BR>";
|
||||
?>
|
||||
|
||||
<script LANGUAGE="JavaScript">
|
||||
function openSet(objIdStr,instanceNo){
|
||||
URL="./ss7LinkConf.php?instanceNo="+instanceNo+"&objIdStr="+objIdStr;
|
||||
var setWindow = open(URL, 'newWin', 'toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,status=yes,width=400,height=350');
|
||||
setWindow.focus();
|
||||
}
|
||||
|
||||
function delFirm(instanceNo)
|
||||
{
|
||||
var delValue,x,y;
|
||||
x = document.body.scrollLeft;
|
||||
y = document.body.scrollTop;
|
||||
|
||||
if(confirm('Do you want to delete the selected?')!=true){
|
||||
window.location.href='<?php echo $PHP_SELF;?>'+"?scroll_x="+x+"&scroll_y="+y;
|
||||
}else{
|
||||
window.location.href='<?php echo $PHP_SELF;?>?&delete=1&delValue='+instanceNo+"&scroll_x="+x+"&scroll_y="+y;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
function ChComm($sysId,$chkType)
|
||||
{
|
||||
global $omc_db;
|
||||
global $remark,$nProcFail,$nWaitProc,$nInProc,$nOutProc;
|
||||
|
||||
$commTable = "parameterComm";
|
||||
|
||||
$sysIdArr = explode('_',$sysId);
|
||||
$sysTypeNo = $sysIdArr[0];
|
||||
$sysNo = $sysIdArr[1];
|
||||
$subSysNo = $sysIdArr[2];
|
||||
|
||||
if($chkType==0)
|
||||
$selComm = " SELECT commState,remark FROM $commTable WHERE sysTypeNo = '$sysTypeNo' ";
|
||||
else
|
||||
$selComm = " SELECT commState,remark FROM $commTable WHERE sysTypeNo = '$sysTypeNo' AND sysNo = '$sysNo' ";
|
||||
|
||||
$selRes = @mysqli_query($pubConn,$selComm);
|
||||
$selRow = @mysqli_fetch_array($selRes);
|
||||
echo mysqli_error($pubConn);
|
||||
$outProcCount=0;
|
||||
do
|
||||
{
|
||||
$temCommState = $selRow[commState];
|
||||
if(isset($selRow[remark])){
|
||||
$remark = $selRow[remark];
|
||||
if($DEBUG)echo "<br>remark=$remark";
|
||||
}
|
||||
if($DEBUG)echo "<br>temCommState=$temCommState";
|
||||
if($temCommState == $nWaitProc){
|
||||
return($nWaitProc);
|
||||
}elseif($temCommState == $nInProc){
|
||||
return($nInProc);
|
||||
}elseif($temCommState == $nOutProc){
|
||||
$commState = $nOutProc;
|
||||
$outProcCount++;
|
||||
}else{
|
||||
$commState = $nProcFail;
|
||||
}
|
||||
}while($selRow = @mysqli_fetch_array($selRes));
|
||||
if($outProcCount > 0){
|
||||
return($nOutProc);
|
||||
}else{
|
||||
return($nProcFail);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
echo "<form method=\"POST\" name=\"setForm\" action=\"$PHP_SELF\">";
|
||||
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
|
||||
echo "<tr>";
|
||||
echo "<td width=\"50%\">";
|
||||
echo "$strConfiguration > $strNetwork > SS7 > $strLink";
|
||||
echo "</td>";
|
||||
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
|
||||
showHelp($helpId);
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td align=\"left\">";
|
||||
|
||||
echo "<b>System:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getSys\" value=\"$strGet\" class=\"button\">";
|
||||
echo "<input type=\"submit\" name=\"setSys\" value=\"$strSet\" class=\"button\">";
|
||||
/*
|
||||
if ( TRUE == session_is_registered("linkSetFlag") ) {
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}else{
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" DISABLED class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}
|
||||
*/
|
||||
echo " ";
|
||||
echo "<b>Command:</b> ";
|
||||
echo "<input type=\"submit\" name=\"saveSys\" value=\"$strSave\" class=\"button\">";
|
||||
echo "<input type=\"submit\" name=\"resetSys\" value=\"$strReset\" class=\"button\">";
|
||||
echo "<input type=\"hidden\" name=\"objIdStr\" value=\"2.5.1\">";
|
||||
echo "</form>";
|
||||
|
||||
echo "</td>";
|
||||
echo "<td> </td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
adjust_title_tail();
|
||||
adjust_content_head();
|
||||
/*
|
||||
echo "<br>";
|
||||
echo "<b>System:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getSys\" value=\"$strGet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"setSys\" value=\"$strSet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"saveSys\" value=\"$strSave\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
if ( TRUE == session_is_registered("linkSetFlag") ) {
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}else{
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" DISABLED class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}
|
||||
echo "<b>Omc:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getOmc\" value=\"$strGet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"saveOmc\" value=\"$strSave\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
echo "<input type=\"hidden\" name=\"objIdStr\" value=\"2.5.1\">";
|
||||
echo "</form>";
|
||||
*/
|
||||
|
||||
?>
|
||||
<br>
|
||||
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
|
||||
<?php
|
||||
echo "<tr bgcolor=\"#E6E6E6\">";
|
||||
echo "<td width=\"5%\">No.</td>";
|
||||
echo "<td width=\"10%\">Flag</td>";
|
||||
echo "<td width=\"10%\">Linkset ID</td>";
|
||||
echo "<td width=\"8%\">SLC</td>";
|
||||
echo "<td width=\"12%\">Host IP</td>";
|
||||
echo "<td width=\"12%\">Signaling Type</td>";
|
||||
echo "<td width=\"10%\">SG ID</td>";
|
||||
echo "<td width=\"15%\">M2UA Interface ID</td>";
|
||||
echo "<td width=\"12%\">Alternative Host IP</td>";
|
||||
echo "<td width=\"10%\">Status</td>";
|
||||
echo "<td width=\"5%\">Delete</td>";
|
||||
echo "</tr>";
|
||||
|
||||
$levelWhere = getLevelWhere($objIdStr);
|
||||
if($DEBUG) echo "<BR>levelWhere=$levelWhere";
|
||||
|
||||
$getSql="SELECT $initValue,instanceNo FROM $paramTable
|
||||
WHERE $levelWhere
|
||||
";
|
||||
if($DEBUG) echo "<BR>getSql=$getSql";
|
||||
$result =mysqli_query($pubConn,$getSql);
|
||||
echo mysqli_error($pubConn);
|
||||
|
||||
while($rows=mysqli_fetch_array($result)){
|
||||
$instanceNo=$rows[1];
|
||||
$value=$rows[0];
|
||||
if(strcasecmp($rows[0],$defValue)==0){
|
||||
continue;
|
||||
}
|
||||
$flag =getBitValue($value,$linkAttConfArr[0][1]);
|
||||
$flag =hexdec($flag);
|
||||
$linksetNo =getBitValue($value,$linkAttConfArr[1][1]);
|
||||
$linksetNo =hexdec($linksetNo);
|
||||
$slcNo =getBitValue($value,$linkAttConfArr[2][1]);
|
||||
$slcNo =hexdec($slcNo);
|
||||
$cpcIp =getBitValue($value,$linkAttConfArr[3][1]);
|
||||
$cpcIp =byte2ip($cpcIp);
|
||||
$linkType =getBitValue($value,$linkAttConfArr[4][1]);
|
||||
$linkType =bindec($linkType);
|
||||
$sgNo =getBitValue($value,$linkAttConfArr[5][1]);
|
||||
$sgNo =hexdec($sgNo);
|
||||
$m2uaInterfaceId=getBitValue($value,$linkAttConfArr[6][1]);
|
||||
$m2uaInterfaceId=hexdec($m2uaInterfaceId);
|
||||
$alternativeMTP3=getBitValue($value,$linkAttConfArr[7][1]);
|
||||
$alternativeMTP3=byte2ip($alternativeMTP3);
|
||||
|
||||
|
||||
if($objIdStr == $setObjIdStr && $instanceNo == $setInstanceNo){
|
||||
echo "<tr bgcolor=\"#CCFFCC\">";
|
||||
}else{
|
||||
echo "<tr>";
|
||||
}
|
||||
{//get link Status
|
||||
$objStr = '3.1';
|
||||
$levelWhere = getLevelWhere($objStr);
|
||||
$selSql = "select initValue from $paramTable where $levelWhere and instanceNo='$rows[instanceNo]'";
|
||||
$staResult = @mysqli_query($pubConn,$selSql);
|
||||
$staRows = @mysqli_fetch_array($staResult);
|
||||
$status = hexdec($staRows[initValue]);
|
||||
}
|
||||
$linkStateArr = array(0=>'Unavailable',1=>'Available',2=>'Inhibited');
|
||||
$flagArr=array(0=>'Disable',1=>'Enable');
|
||||
echo "<td><a href=\"javascript:openSet('{$linkArr[0][0]}','$instanceNo')\">";
|
||||
echo "$instanceNo</a></td>";
|
||||
echo "<td>{$flagArr[$flag]}</td>";
|
||||
echo "<td>$linksetNo</td>";
|
||||
echo "<td>$slcNo</td>";
|
||||
echo "<td>$cpcIp</td>";
|
||||
echo "<td>{$linkTypeArr[$linkType]}</td>";
|
||||
echo "<td>$sgNo</td>";
|
||||
echo "<td>$m2uaInterfaceId</td>";
|
||||
echo "<td>$alternativeMTP3</td>";
|
||||
echo "<td>{$linkStateArr[$status]}</td>";
|
||||
echo "<td><input type=\"checkbox\" name=\"C$instanceNo\" value=\"ON\" onClick=\"javascript:delFirm($instanceNo)\" ></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
//New
|
||||
echo "<tr>";
|
||||
echo "<td><a href=\"javascript:openSet('$objIdStr','new')\">";
|
||||
echo "New</a></td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "</tr>";
|
||||
?>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
adjust_content_tail();
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
261
wxc2_omc/configuration/confSs7/ss7LinksetConf.php
Executable file
261
wxc2_omc/configuration/confSs7/ss7LinksetConf.php
Executable file
@@ -0,0 +1,261 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߺ<EFBFBD><DFBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD> Linkset
|
||||
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: header.inc
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
|
||||
<20><><EFBFBD>ߣ<EFBFBD>
|
||||
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Cui Ticun
|
||||
ʱ<EFBFBD>䣺2004-4-21
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Support OMC7.0,<2C><>advanced<65>Ƶ<EFBFBD>configuration<6F>У<EFBFBD><D0A3><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><CFB7>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>ť
|
||||
*********************************************************/
|
||||
require("../../inc/header.inc");
|
||||
$DEBUG = 0;
|
||||
|
||||
if($DEBUG) echo "<br><3E><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD>";
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
$pubDb = 'OMC_PUB';
|
||||
$db = "OBJ_222";
|
||||
$numberPerPage = 100; //ÿҳ<C3BF><D2B3>¼<EFBFBD><C2BC>
|
||||
$paramTable ='OBJ_222.param_99';
|
||||
|
||||
$sysId ='222_99_99';
|
||||
$initValue ='initValue';
|
||||
$listPageUrl="./ss7LinksetList.php?setObjIdStr=$objIdStr&setInstanceNo=$instanceNo";
|
||||
$linksetOid ='2.4.1';
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<BR>instanceNo =$instanceNo";
|
||||
if($DEBUG) echo "<BR>objIdStr =$objIdStr";
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>
|
||||
//==========================================================
|
||||
$linksetConfArr=array(
|
||||
array('Linkset DPC', '0.0-2.7', 'DPC'),
|
||||
array('Network indicator', '3.0-3.1', 'NetID'),
|
||||
array('Flag', '3.2-3.2', 'Flag'),
|
||||
array('Loopback Option', '3.3-3.3', 'LoopFlag')
|
||||
);
|
||||
$NetIdConfArr=array(
|
||||
array('00','International'),
|
||||
array('01','International Spare'),
|
||||
array('10','National'),
|
||||
array('11','National Spare')
|
||||
);
|
||||
|
||||
$LoopConfArr=array(
|
||||
array('0','Disable'),
|
||||
array('1','Enable')
|
||||
);
|
||||
|
||||
$flagConfArr=array(0=>"Disable",1=>"Enable");
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<BR>";
|
||||
?>
|
||||
<br>
|
||||
<body topmargin="0" leftmargin="12">
|
||||
|
||||
<?php
|
||||
echo "<form method=\"POST\" name=\"setForm\" action=\"$PHP_SELF\">";
|
||||
$tableHeader ="<table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" ";
|
||||
$tableHeader .="bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
|
||||
|
||||
$levelArr=explode('.',$linksetOid);
|
||||
for($j=0;$j<sizeof($levelArr);$j++){
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG)
|
||||
echo "<BR>levelArr[$j]={$levelArr[$j]}";
|
||||
}
|
||||
|
||||
$defSql = "SELECT initValue from paramConf
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND level_3='$level_3'
|
||||
";
|
||||
if($DEBUG)
|
||||
echo "defSql=$defSql<br>";
|
||||
$defRes = mysqli_query($pubConn,$defSql);
|
||||
$defRow = mysqli_fetch_array($defRes);
|
||||
$defaultValue = $defRow[initValue];
|
||||
if($DEBUG)
|
||||
echo "defaultValue=$defaultValue<br>";
|
||||
|
||||
switch($objIdStr){
|
||||
case '2.4.1':
|
||||
if($instanceNo == 'new'){
|
||||
$orgValue='0000000000000000000000000000000000000000';
|
||||
}else{
|
||||
$selSql = "SELECT initValue
|
||||
FROM $paramTable
|
||||
WHERE level_1='2' AND level_2='4' AND level_3='1' AND instanceNo='$instanceNo'
|
||||
";
|
||||
if($DEBUG) echo "<BR>selSql=$selSql";
|
||||
$result=mysqli_query($pubConn,$selSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$rows =mysqli_fetch_array($result);
|
||||
$orgValue=$rows[0];
|
||||
echo mysqli_error($pubConn);
|
||||
//$orgValue=getSysParamValue($sysId,$objIdStr,$instanceNo,$initValue);
|
||||
}
|
||||
if($_SERVER['REQUEST_METHOD'] == "POST"){
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD>
|
||||
$newValue=$orgValue;
|
||||
//OPC
|
||||
if($DEBUG) echo "<br>OPC=$OPC";
|
||||
$OPC=omc_keep_length($OPC,"0","6","1");
|
||||
$newValue=setBitValue($newValue,$linksetConfArr[0][1],$OPC);
|
||||
if($DEBUG) echo "<br>newValue=$newValue";
|
||||
|
||||
|
||||
//NetID
|
||||
if($DEBUG) echo "<br>NetID=$NetID";
|
||||
$newValue=setBitValue($newValue,$linksetConfArr[1][1],$NetID);
|
||||
if($DEBUG) echo "<br>newValue=$newValue";
|
||||
|
||||
//Flag
|
||||
if($DEBUG) echo "<br>Flag=$Flag";
|
||||
$newValue=setBitValue($newValue,$linksetConfArr[2][1],$Flag);
|
||||
if($DEBUG) echo "<br>newValue=$newValue";
|
||||
|
||||
|
||||
//loopFlag
|
||||
if($DEBUG) echo "<br>loopFlag=$loopFlag";
|
||||
$newValue=setBitValue($newValue,$linksetConfArr[3][1],$loopFlag);
|
||||
if($DEBUG) echo "<br>newValue=$newValue";
|
||||
$updSql = "UPDATE $paramTable SET initValue = '$newValue'
|
||||
WHERE level_1='2' AND level_2='4' AND level_3='1' AND instanceNo='$instanceNo'
|
||||
";
|
||||
if($DEBUG) echo "<BR>updSql=$updSql";
|
||||
mysqli_query($pubConn,$updSql);
|
||||
echo mysqli_error($pubConn);
|
||||
//setSysParamValue($sysId,$objIdStr,$instanceNo,$newValue);
|
||||
echo "<script LANGUAGE=\"JavaScript\">";
|
||||
echo "\n window.opener.location.href=\"$listPageUrl\";";
|
||||
echo "\n window.opener.document.setForm.focus();";
|
||||
if(!$DEBUG){
|
||||
echo "\n window.close();";
|
||||
}
|
||||
echo "\n </script>";
|
||||
exit();
|
||||
}else{
|
||||
//<2F><>ʾ
|
||||
$OPC =getBitValue($orgValue,$linksetConfArr[0][1]);
|
||||
$NetID =getBitValue($orgValue,$linksetConfArr[1][1]);
|
||||
$Flag =getBitValue($orgValue,$linksetConfArr[2][1]);
|
||||
$loopFlag =getBitValue($orgValue,$linksetConfArr[3][1]);
|
||||
echo "\n $tableHeader";
|
||||
echo "\n <tr bgcolor=\"#E6E6E6\">";
|
||||
echo "<td>Name</td>";
|
||||
echo "<td>Value</td>";
|
||||
echo "</tr>";
|
||||
|
||||
if($instanceNo == 'new'){
|
||||
$levelArr=explode('.',$objIdStr);
|
||||
for($j=0;$j<sizeof($levelArr);$j++){
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG) echo "<BR>levelArr[$j]={$levelArr[$j]}";
|
||||
}
|
||||
$getInstanceSql="SELECT instanceNo FROM $paramTable
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND level_3='$level_3'AND $initValue = '$defaultValue'";
|
||||
$result=mysqli_query($pubConn,$getInstanceSql);
|
||||
echo mysqli_error($pubConn);
|
||||
echo "<tr><td>No.</td><td>";
|
||||
if($DEBUG)
|
||||
echo "<br>$getInstanceSql";
|
||||
echo "<select name=\"instanceNo\" size=\"1\">";
|
||||
while($row=mysqli_fetch_array($result)){
|
||||
echo "<option value=$row[instanceNo]>$row[instanceNo]</option>";
|
||||
}
|
||||
echo"</select>";
|
||||
echo"</td></tr>";
|
||||
}
|
||||
|
||||
echo "\n <tr>";
|
||||
echo "<td>Flag</td>";
|
||||
echo "<td>";
|
||||
echo "<select name=\"Flag\">";
|
||||
for($i=0;$i<sizeof($flagConfArr);$i++)
|
||||
{
|
||||
if($Flag == $i)
|
||||
echo "<option value=$i selected>{$flagConfArr[$i]}</option>";
|
||||
else
|
||||
echo "<option value=$i>{$flagConfArr[$i]}</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
echo "</td></tr>";
|
||||
|
||||
echo "\n <tr>";
|
||||
echo "<td>Linkset DPC(hex)</td>";
|
||||
echo "<td><input type=\"text\" name=\"OPC\" maxlength=\"6\" value=\"$OPC\" class=\"text\"></td>";
|
||||
echo "</tr>";
|
||||
|
||||
|
||||
|
||||
|
||||
echo "\n <tr>";
|
||||
echo "<td>Network Indicator</td>";
|
||||
echo "<td>";
|
||||
echo "<select name=\"NetID\" size=\"1\">";
|
||||
for($i=0;$i<sizeof($NetIdConfArr);$i++){
|
||||
if($NetID == $NetIdConfArr[$i][0]){
|
||||
echo "<option value=\"{$NetIdConfArr[$i][0]}\" selected>{$NetIdConfArr[$i][1]}</option>";
|
||||
}else{
|
||||
echo "<option value=\"{$NetIdConfArr[$i][0]}\">{$NetIdConfArr[$i][1]}</option>";
|
||||
}
|
||||
}
|
||||
echo "</select>";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td>Loopback Option</td>";
|
||||
echo "<td>";
|
||||
echo "<select name=\"loopFlag\" size=\"1\">";
|
||||
for($i=0;$i<sizeof($LoopConfArr);$i++){
|
||||
if($loopFlag == $LoopConfArr[$i][0]){
|
||||
echo "<option value=\"{$LoopConfArr[$i][0]}\" selected>{$LoopConfArr[$i][1]}</option>";
|
||||
}else{
|
||||
echo "<option value=\"{$LoopConfArr[$i][0]}\">{$LoopConfArr[$i][1]}</option>";
|
||||
}
|
||||
}
|
||||
echo "</select>";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
|
||||
echo "\n <input type=\"hidden\" name=\"objIdStr\" value=\"$objIdStr\">";
|
||||
if($instanceNo != 'new'){
|
||||
echo "\n <input type=\"hidden\" name=\"instanceNo\" value=\"$instanceNo\">";
|
||||
}
|
||||
echo "\n <input type=\"submit\" name=\"set\" value=\"Set\"> ";
|
||||
echo "\n <input type=\"reset\" name=\"reset\" value=\"Reset\">";
|
||||
break;
|
||||
}
|
||||
}
|
||||
/*
|
||||
Opposite point code: The opposite point code of the linkset<br><br>
|
||||
Network indicator: The network type of the opposite point code<br><br>
|
||||
Loop back: Loop back enable or disable, used for MSC loop back link
|
||||
*/
|
||||
?>
|
||||
</form>
|
||||
<b>Remarks:</b><br><br>
|
||||
DPC: Specify a Destination Point Code to this linkset.<br><br>
|
||||
Network indicator: The signaling network type of this signaling point.<br><br>
|
||||
Loop back: Enable or disable loopback function on this linkset. Used only for dual platform MSS loopback.
|
||||
</body>
|
||||
</html>
|
||||
510
wxc2_omc/configuration/confSs7/ss7LinksetList.php
Executable file
510
wxc2_omc/configuration/confSs7/ss7LinksetList.php
Executable file
@@ -0,0 +1,510 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߺ<EFBFBD><DFBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD> Linkset
|
||||
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: header.inc
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
|
||||
<20><><EFBFBD>ߣ<EFBFBD>
|
||||
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Cui Ticun
|
||||
ʱ<EFBFBD>䣺2004-4-21
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Support OMC7.0,<2C><>advanced<65>Ƶ<EFBFBD>configuration<6F>У<EFBFBD><D0A3><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><CFB7>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>ť
|
||||
*********************************************************/
|
||||
require("../../inc/header.inc");
|
||||
$helpId = "2.1.0";
|
||||
$DEBUG = 0;
|
||||
?>
|
||||
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
|
||||
|
||||
<?php
|
||||
adjust_head();
|
||||
adjust_title_head();
|
||||
if($DEBUG) echo "<br><3E><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD>";
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
$pubDb = 'OMC_PUB';
|
||||
$db = "OBJ_222";
|
||||
$paramTable ='OBJ_222.param_99';
|
||||
|
||||
$maxNum = 30;
|
||||
|
||||
$nGetComm = 0;
|
||||
$nSetComm = 3;
|
||||
|
||||
$sysId ='222_99_99';
|
||||
$instanceNo ='0';
|
||||
$initValue ='initValue';
|
||||
$readValue ='readValue';
|
||||
$editValue ='editValue';
|
||||
|
||||
$nProcFail = 0;//failure
|
||||
$nWaitProc = 1;//wait
|
||||
$nInProc = 2;
|
||||
$nOutProc = 3;
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<br>setInstanceNo=$setInstanceNo";
|
||||
if($DEBUG) echo "<BR>setObjIdStr =$setObjIdStr";
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD>get/set<65><74><EFBFBD><EFBFBD>
|
||||
if($_SERVER['REQUEST_METHOD'] == "POST"){
|
||||
echo "<br><br><br><br><br>";
|
||||
if(isset($setSys) || isset($getSys)){
|
||||
if(isset($setSys)){
|
||||
$moveSql = "UPDATE $paramTable SET readValue = initValue
|
||||
WHERE level_1='2' AND level_2='4' AND level_3='1'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$commIdStr = sysCommSend($sysId,$nSetComm,$objIdStr);
|
||||
|
||||
$showType="Set";
|
||||
}else{
|
||||
$commIdStr = sysCommSend($sysId,$nGetComm,$objIdStr);
|
||||
$showType="Get";
|
||||
}
|
||||
|
||||
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>$showType Linkset";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
|
||||
$sysId = "222_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
|
||||
//Get linkset status
|
||||
$commIdStr = sysCommSend($sysId,$nGetComm,"3.2");
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Get Linkset status";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
|
||||
$sysId = "222_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
|
||||
$moveSql = "UPDATE $paramTable SET initValue = readValue
|
||||
WHERE level_1='2' AND level_2='4' AND level_3='1'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
|
||||
$moveSql = "UPDATE $paramTable SET initValue = readValue
|
||||
WHERE level_1='3' AND level_2='2'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
}elseif(isset($saveSys)){
|
||||
$updSql = " UPDATE $paramTable SET initValue = '02'
|
||||
WHERE level_1 = '3' AND level_2 = '7'
|
||||
";
|
||||
$updRes = @mysqli_query($pubConn,$updSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$commIdStr=sysCommSend($sysId,$nSetComm,'3.7');
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Save parameter to system";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
|
||||
$sysId = "222_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
}elseif(isset($resetSys)){
|
||||
$updSql = " UPDATE $paramTable SET initValue = '01'
|
||||
WHERE level_1 = '3' AND level_2 = '7'
|
||||
";
|
||||
$updRes = @mysqli_query($pubConn,$updSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$commIdStr=sysCommSend($sysId,$nSetComm,'3.7');
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Reset system";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
|
||||
$sysId = "222_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if(1==$delete)
|
||||
{
|
||||
$delSql = "UPDATE $paramTable SET initValue = '0000000000000000000000000000000000000000'
|
||||
WHERE level_1='2' AND level_2='4' AND level_3='1' AND instanceNo='$delValue'";
|
||||
//echo "<br>delSql=$delSql";
|
||||
$delRes = @mysqli_query($pubConn,$delSql);
|
||||
echo mysqli_error($pubConn);
|
||||
}
|
||||
|
||||
|
||||
if($setSys || $getSys || $saveSys || $undoSet||$resetSys){
|
||||
echo "<br>";
|
||||
echo "<p align=\"left\"><a href=\"$PHP_SELF?setFlag=$setFlag\" target=\"contents\"><img align=absBottom border=0 src=\"../../images/left.gif\" width=\"14\" height=\"14\">$strBack</a>";
|
||||
exit();
|
||||
}
|
||||
|
||||
$linksetOid ='2.4.1';
|
||||
$objIdStr ='2.4.1';
|
||||
$linksetConfArr=array(
|
||||
array('Flag','3.2-3.2'),
|
||||
array('Linkset DPC','0.0-2.7'),
|
||||
array('Network indicator','3.0-3.1'),
|
||||
array('Loopback Option','3.3-3.3')
|
||||
);
|
||||
$NetIdConfArr=array(
|
||||
array('00','International'),
|
||||
array('01','International spare'),
|
||||
array('10','National'),
|
||||
array('11','National spare')
|
||||
);
|
||||
$flagConfArr=array(0=>"Disable",1=>"Enable");
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<BR>";
|
||||
?>
|
||||
|
||||
<script LANGUAGE="JavaScript">
|
||||
function openSet(objIdStr,instanceNo){
|
||||
URL="./ss7LinksetConf.php?instanceNo="+instanceNo+"&objIdStr="+objIdStr;
|
||||
var setWindow = open(URL, 'newWin', 'toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,status=yes,width=400,height=350');
|
||||
setWindow.focus();
|
||||
}
|
||||
function delFirm(instanceNo)
|
||||
{
|
||||
var delValue,x,y;
|
||||
x = document.body.scrollLeft;
|
||||
y = document.body.scrollTop;
|
||||
|
||||
if(confirm('Do you want to delete the selected?')!=true){
|
||||
window.location.href='<?php echo $PHP_SELF;?>'+"?scroll_x="+x+"&scroll_y="+y;
|
||||
}else{
|
||||
window.location.href='<?php echo $PHP_SELF;?>?&delete=1&delValue='+instanceNo+"&scroll_x="+x+"&scroll_y="+y;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
function ChComm($sysId,$chkType)
|
||||
{
|
||||
global $omc_db;
|
||||
global $remark,$nProcFail,$nWaitProc,$nInProc,$nOutProc;
|
||||
|
||||
$commTable = "parameterComm";
|
||||
|
||||
$sysIdArr = explode('_',$sysId);
|
||||
$sysTypeNo = $sysIdArr[0];
|
||||
$sysNo = $sysIdArr[1];
|
||||
$subSysNo = $sysIdArr[2];
|
||||
|
||||
if($chkType==0)
|
||||
$selComm = " SELECT commState,remark FROM $commTable WHERE sysTypeNo = '$sysTypeNo' ";
|
||||
else
|
||||
$selComm = " SELECT commState,remark FROM $commTable WHERE sysTypeNo = '$sysTypeNo' AND sysNo = '$sysNo' ";
|
||||
|
||||
$selRes = @mysqli_query($pubConn,$selComm);
|
||||
$selRow = @mysqli_fetch_array($selRes);
|
||||
echo mysqli_error($pubConn);
|
||||
$outProcCount=0;
|
||||
do
|
||||
{
|
||||
$temCommState = $selRow[commState];
|
||||
if(isset($selRow[remark])){
|
||||
$remark = $selRow[remark];
|
||||
if($DEBUG)echo "<br>remark=$remark";
|
||||
}
|
||||
if($DEBUG)echo "<br>temCommState=$temCommState";
|
||||
if($temCommState == $nWaitProc){
|
||||
return($nWaitProc);
|
||||
}elseif($temCommState == $nInProc){
|
||||
return($nInProc);
|
||||
}elseif($temCommState == $nOutProc){
|
||||
$commState = $nOutProc;
|
||||
$outProcCount++;
|
||||
}else{
|
||||
$commState = $nProcFail;
|
||||
}
|
||||
}while($selRow = @mysqli_fetch_array($selRes));
|
||||
if($outProcCount > 0){
|
||||
return($nOutProc);
|
||||
}else{
|
||||
return($nProcFail);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
echo "<form method=\"POST\" name=\"setForm\" action=\"$PHP_SELF\">";
|
||||
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
|
||||
echo "<tr>";
|
||||
echo "<td width=\"50%\">";
|
||||
echo "$strConfiguration > $strNetwork > SS7 > $strLinkset";
|
||||
echo "</td>";
|
||||
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
|
||||
showHelp($helpId);
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td align=\"left\">";
|
||||
|
||||
echo "<b>System:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getSys\" value=\"$strGet\" class=\"button\">";
|
||||
echo "<input type=\"submit\" name=\"setSys\" value=\"$strSet\" class=\"button\">";
|
||||
/*
|
||||
if ( TRUE == session_is_registered("linksetSetFlag") ) {
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}else{
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" DISABLED class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}
|
||||
*/
|
||||
echo " ";
|
||||
echo "<b>Command:</b> ";
|
||||
echo "<input type=\"submit\" name=\"saveSys\" value=\"$strSave\" class=\"button\">";
|
||||
echo "<input type=\"submit\" name=\"resetSys\" value=\"$strReset\" class=\"button\">";
|
||||
echo "<input type=\"hidden\" name=\"objIdStr\" value=\"2.4.1\">";
|
||||
echo "</form>";
|
||||
|
||||
echo "</td>";
|
||||
echo "<td> </td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
|
||||
adjust_title_tail();
|
||||
adjust_content_head();
|
||||
/*
|
||||
echo "<br>";
|
||||
echo "<b>System:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getSys\" value=\"$strGet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"setSys\" value=\"$strSet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"saveSys\" value=\"$strSave\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
if ( TRUE == session_is_registered("linksetSetFlag") ) {
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}else{
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" DISABLED class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}
|
||||
echo "<b>OMC:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getOmc\" value=\"$strGet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"saveOmc\" value=\"$strSave\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
echo "<input type=\"hidden\" name=\"objIdStr\" value=\"2.4.1\">";
|
||||
echo "</form>";
|
||||
*/
|
||||
|
||||
?>
|
||||
<br>
|
||||
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
|
||||
<?php
|
||||
echo "<tr bgcolor=\"#E6E6E6\">";
|
||||
echo "<td>No.</td>";
|
||||
echo "<td>Flag</td>";
|
||||
echo "<td>Linkset DPC</td>";
|
||||
echo "<td>Network Indicator</td>";
|
||||
echo "<td>Loopback Option</td>";
|
||||
echo "<td>Status</td>";
|
||||
echo "<td>Delete</td>";
|
||||
echo "</tr>";
|
||||
|
||||
|
||||
$levelArr=explode('.',$linksetOid);
|
||||
for($j=0;$j<sizeof($levelArr);$j++){
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG) echo "<BR>levelArr[$j]={$levelArr[$j]}";
|
||||
}
|
||||
|
||||
$defSql = "SELECT initValue from paramConf
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND level_3='$level_3'
|
||||
";
|
||||
if($DEBUG) echo "defSql=$defSql<br>";
|
||||
$defRes = mysqli_query($pubConn,$defSql);
|
||||
$defRow = mysqli_fetch_array($defRes);
|
||||
$defaultValue = $defRow[initValue];
|
||||
if($DEBUG) echo "defaultValue=$defaultValue<br>";
|
||||
|
||||
$getSql="SELECT $initValue,instanceNo FROM $paramTable
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND level_3='$level_3'
|
||||
";
|
||||
if($DEBUG) echo "<BR>getSql=$getSql";
|
||||
$result =mysqli_query($pubConn,$getSql);
|
||||
echo mysqli_error($pubConn);
|
||||
|
||||
while($rows =mysqli_fetch_array($result)){
|
||||
$instanceNo=$rows[instanceNo];
|
||||
$value=$rows[0];
|
||||
if(strcasecmp($rows[initValue],$defaultValue)==0){
|
||||
continue;
|
||||
}
|
||||
|
||||
$flag =getBitValue($value,$linksetConfArr[0][1]);
|
||||
$OPC =getBitValue($value,$linksetConfArr[1][1]);
|
||||
$NetID =getBitValue($value,$linksetConfArr[2][1]);
|
||||
$loopFlag =getBitValue($value,$linksetConfArr[3][1]);
|
||||
if($objIdStr == $setObjIdStr && $instanceNo == $setInstanceNo){
|
||||
echo "<tr bgcolor=\"#CCFFCC\">";
|
||||
}else{
|
||||
echo "<tr>";
|
||||
}
|
||||
echo "<td><a href=\"javascript:openSet('$objIdStr','$instanceNo')\">";
|
||||
echo "$instanceNo</a></td>";
|
||||
|
||||
echo "<td>{$flagConfArr[$flag]}</td>";
|
||||
|
||||
echo "<td>$OPC</td>";
|
||||
|
||||
echo "<td>";
|
||||
if($DEBUG) echo "NetID=$NetID<BR>";
|
||||
for($i=0;$i<sizeof($NetIdConfArr);$i++){
|
||||
if($NetID == $NetIdConfArr[$i][0]){
|
||||
echo "{$NetIdConfArr[$i][1]}";
|
||||
break;
|
||||
}
|
||||
}
|
||||
echo "</td><td>";
|
||||
if($DEBUG) echo "loopFlag=$loopFlag<BR>";
|
||||
if($loopFlag > 0){
|
||||
echo "Enable";
|
||||
}else{
|
||||
echo "Disable";
|
||||
}
|
||||
{//get linkset Status
|
||||
$objStr = '3.2';
|
||||
$levelWhere = getLevelWhere($objStr);
|
||||
$selSql = "select initValue from $paramTable where $levelWhere and instanceNo='$rows[instanceNo]'";
|
||||
$staResult = @mysqli_query($pubConn,$selSql);
|
||||
$staRows = @mysqli_fetch_array($staResult);
|
||||
$status = hexdec($staRows[initValue]);
|
||||
}
|
||||
$lsStateArr = array(0=>'Unavailable',1=>'Available',2=>'Reserved');
|
||||
echo "</td>";
|
||||
echo "<td>";
|
||||
echo "{$lsStateArr[$status]}";
|
||||
echo "</td>";
|
||||
echo "<td><input type=\"checkbox\" name=\"C$instanceNo\" value=\"ON\" onClick=\"javascript:delFirm($instanceNo)\" ></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
//New
|
||||
echo "<tr>";
|
||||
echo "<td><a href=\"javascript:openSet('$objIdStr','new')\">";
|
||||
echo "New</a></td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "</tr>";
|
||||
|
||||
?>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
adjust_content_tail();
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
533
wxc2_omc/configuration/confSs7/ss7spcRoutineConf.php
Executable file
533
wxc2_omc/configuration/confSs7/ss7spcRoutineConf.php
Executable file
@@ -0,0 +1,533 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߺ<EFBFBD><DFBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD> SPC Routing
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: header.inc
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD>ߣ<EFBFBD>
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Cui Ticun
|
||||
ʱ<EFBFBD>䣺2004-4-21
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Support OMC7.0,<2C><>advanced<65>Ƶ<EFBFBD>configuration<6F>У<EFBFBD><D0A3>ĺ<DEB8><C4BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><CFB7>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>ť
|
||||
*********************************************************/
|
||||
require("../../inc/header.inc");
|
||||
$DEBUG = 0;
|
||||
if($DEBUG) echo "<br><3E><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD>";
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
$nGetComm = 0;
|
||||
$nSetComm = 3;
|
||||
|
||||
$nProcFaileStat = 0;
|
||||
$nWaitProcStat = 1;
|
||||
$nInProcStat = 2;
|
||||
$nProcDoneStat = 3;
|
||||
|
||||
$listPageUrl="./ss7spcRoutineList.php?setObjIdStr=$objIdStr&setInstanceNo=$instanceNo";
|
||||
$pubDb = 'OMC_PUB';
|
||||
$paramTable ='OBJ_222.param_99';
|
||||
$sysId ='222_99_99';
|
||||
//$instanceNo ='0';
|
||||
$valueName ='initValue';
|
||||
|
||||
function getSysCommStat($commId)
|
||||
{
|
||||
$DEBUG = 0;
|
||||
$pubDb = 'OMC_PUB';
|
||||
$commTable = 'parameterComm';
|
||||
|
||||
$getSql = "SELECT commState FROM $commTable WHERE commId ='$commId'";
|
||||
$result=mysqli_query($pubConn,$getSql);
|
||||
echo mysqli_error($pubConn);
|
||||
if($result){
|
||||
$row=mysqli_fetch_array($result);
|
||||
$commState=$row[commState];
|
||||
return($commState);
|
||||
}else{
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<BR>sysId =$sysId";
|
||||
if($DEBUG) echo "<BR>instanceNo =$instanceNo";
|
||||
if($DEBUG) echo "<BR>objIdStr =$objIdStr";
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>
|
||||
//==========================================================
|
||||
$NetOPLenArr=array(
|
||||
//array('oid','offset', 'name'),
|
||||
array('International network','0.0'),
|
||||
array('International network spare','0.1'),
|
||||
array('National network','0.2'),
|
||||
array('National network spare','0.3')
|
||||
);
|
||||
|
||||
$NetOPTypeArr=array(
|
||||
//array('oid','offset', 'name'),
|
||||
array('International network type','0.4'),
|
||||
array('International network spare type','0.5'),
|
||||
array('National network type','0.6'),
|
||||
array('National network spare type','0.7')
|
||||
);//roger
|
||||
|
||||
$NetOPCArr=array(
|
||||
//array('oid', 'name'),
|
||||
array('2.3.1', '14bit international network'),
|
||||
array('2.3.2', '14bit international network -s'),
|
||||
array('2.3.3', '14bit national network'),
|
||||
array('2.3.4', '14bit national network -s'),
|
||||
array('2.3.5', '24bit international network'),
|
||||
array('2.3.6', '24bit internation network -s'),
|
||||
array('2.3.7', '24bit national network'),
|
||||
array('2.3.8', '24bit national network -s')
|
||||
);
|
||||
$RoutingArr=array(
|
||||
array('2.6.1', 'International network'),
|
||||
array('2.6.2', 'International network spare'),
|
||||
array('2.6.3', 'National network'),
|
||||
array('2.6.4', 'National network spare')
|
||||
);
|
||||
$RoutingConfArr=array(
|
||||
//array('remark', 'offset','inputName','valueLen'),
|
||||
array('DPC', '0.0-2.7','DPC','6'),
|
||||
array('Normal linkset', '3.0-3.7','normalLinkset','2'),
|
||||
array('Alternative linkset', '4.0-4.7','alterLinkSet','2'),
|
||||
array('M3UA Routing Context', '5.0-8.7','M3UARoutingContext','8')
|
||||
);
|
||||
|
||||
$ACNArr=array(
|
||||
array('2.7.1', 'Local ACN'),
|
||||
array('2.7.2', 'International network'),
|
||||
array('2.7.3', 'International network spare'),
|
||||
array('2.7.4', 'National network'),
|
||||
array('2.7.5', 'National network spare')
|
||||
);
|
||||
$ACNConfArr=array(
|
||||
array('Network Location Update', '0.0-0.7', 'NLU','2'),
|
||||
array('Location Cancel', '1.0-1.7', 'LC','2'),
|
||||
array('Roaming Number Enquiry', '2.0-2.7', 'RNN','2'),
|
||||
array('Location Info Retrieval', '3.0-3.7', 'LIR','2'),
|
||||
array('Reset Context', '4.0-4.7', 'RC','2'),
|
||||
array('Handover Control', '5.0-5.7', 'HC','2'),
|
||||
array('Equipment Management', '6.0-6.7', 'EM','2'),
|
||||
array('Info Retrieval', '7.0-7.7', 'IR','2'),
|
||||
array('Inter VLR Info Retrieval', '8.0-8.7', 'IVIR','2'),
|
||||
array('Subscriber Data Management', '9.0-9.7', 'SDM','2'),
|
||||
array('Tracing', '10.0-10.7','Trac','2'),
|
||||
array('Network Functional SS', '11.0-11.7','NFSS','2'),
|
||||
array('Network Unstructured SS', '12.0-12.7','NUSS','2'),
|
||||
array('Short Message Gateway', '13.0-13.7','SMG','2'),
|
||||
array('Short Messsage MO Relay', '14.0-14.7','SMMOR','2'),
|
||||
array('Short Message Alert', '15.0-15.7','SMA','2'),
|
||||
array('Short Message Waiting Data Management', '16.0-16.7','SMWDM','2'),
|
||||
array('Mobile Terminating Short Message Relay', '17.0-17.7','MTSMR','2'),
|
||||
array('IMSI Retrieval', '18.0-18.7','IMSIR','2'),
|
||||
array('MS Purging', '19.0-19.7','MSP','2'),
|
||||
array('Subscriber Info Enquiry', '20.0-20.7','SIE','2'),
|
||||
array('Any Time Info Enquiry', '21.0-21.7','ATIE','2'),
|
||||
array('Call Control Transfer', '22.0-22.7','CCT','2'),
|
||||
array('Invocation Notification', '23.0-23.7','IN','2'),
|
||||
array('SIWFS Allocation', '24.0-24.7','SA','2'),
|
||||
array('Group Call Control', '25.0-25.7','GCC','2'),
|
||||
array('GPRS Location Update', '26.0-26.7','CLU','2'),
|
||||
array('GPRS Location Info Retrieval', '27.0-27.7','GLIR','2'),
|
||||
array('Failure Report', '28.0-28.7','FR','2'),
|
||||
array('GPRS Notify', '29.0-29.7','GN','2'),
|
||||
array('Reporting', '30.0-30.7','Repo','2'),
|
||||
array('Call Completion', '31.0-31.7','CallComp','2'),
|
||||
array('Security Triplets', '32.0-32.7','ST','2'),
|
||||
array('Subscriber Interrogate', '33.0-33.7','SI','2'),
|
||||
array('HLR Subscriber Management', '34.0-34.7','HLRSM','2'),
|
||||
array('HLR Ping AUC', '35.0-35.7','HLRPAUC','2')
|
||||
);
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<BR>";
|
||||
?>
|
||||
|
||||
<script LANGUAGE="JavaScript">
|
||||
function selectType(){
|
||||
var base_url,url_add,url;
|
||||
base_url='<?php echo "$PHP_SELF?flag=1&objIdStr=$objIdStr&length_type=";?>';
|
||||
url_add=document.setForm.length_type.options[document.setForm.length_type.selectedIndex].value;
|
||||
url=base_url+url_add;
|
||||
window.location=url;
|
||||
}
|
||||
</script>
|
||||
|
||||
<BR>
|
||||
<body topmargin="0" leftmargin="12">
|
||||
<?php
|
||||
echo "<form method=\"POST\" name=\"setForm\" action=\"$PHP_SELF\">";
|
||||
$tableHeader ="<table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" ";
|
||||
$tableHeader .="bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
|
||||
switch($objIdStr){
|
||||
case '2.2.0':
|
||||
case '2.2.1':
|
||||
case '2.2.2':
|
||||
case '2.2.3':
|
||||
$levelArr=explode('.',$objIdStr);
|
||||
for($j=0;$j<sizeof($levelArr);$j++){
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG) echo "<BR>levelArr[$j]={$levelArr[$j]}";
|
||||
}
|
||||
$getInstanceSql="SELECT initValue
|
||||
FROM $paramTable
|
||||
WHERE level_1='$level_1' AND level_2='$level_2'";
|
||||
$result=mysqli_query($pubConn,$getInstanceSql);
|
||||
$row=mysqli_fetch_array($result);
|
||||
|
||||
if($_SERVER['REQUEST_METHOD'] == "POST"){
|
||||
//sysCommSend($sysId,$nGetComm,"2.2");
|
||||
//sleep(2);
|
||||
$getInstanceSql="SELECT initValue
|
||||
FROM $paramTable
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' ";
|
||||
$result=mysqli_query($pubConn,$getInstanceSql);
|
||||
$row=mysqli_fetch_array($result);
|
||||
$row[0]=setBitValue($row[0],$NetOPLenArr[$level_3][1],$length_type);
|
||||
$row[0]=setBitValue($row[0],$NetOPTypeArr[$level_3][1],$type_type);//roger
|
||||
echo "$row[0]";
|
||||
$setSql="UPDATE $paramTable
|
||||
SET initValue='$row[0]'
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' ";
|
||||
|
||||
mysqli_query($pubConn,$setSql);
|
||||
echo mysqli_error($pubConn);
|
||||
echo "<script LANGUAGE=\"JavaScript\">";
|
||||
echo "\n window.opener.location.href=\"$listPageUrl\";";
|
||||
echo "\n window.opener.document.setForm.focus();";
|
||||
if(!$DEBUG){
|
||||
echo "\n window.close();";
|
||||
}
|
||||
echo "\n </script>";
|
||||
exit();
|
||||
}
|
||||
switch($level_3){
|
||||
case '0':
|
||||
$opcArr="International Network";
|
||||
break;
|
||||
case '1':
|
||||
$opcArr="International Spare Network";
|
||||
break;
|
||||
case '2':
|
||||
$opcArr="National Network";
|
||||
break;
|
||||
case '3':
|
||||
$opcArr="National Spare Network";
|
||||
break;
|
||||
}
|
||||
|
||||
echo "<table>";
|
||||
echo "<tr width=\"100%\">";
|
||||
echo "<td><b>$opcArr</b></td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
echo "<table>";
|
||||
echo "<tr>";
|
||||
echo "<td><b>Length </b></td>";
|
||||
|
||||
$arr_LengthType = array("14bit","24bit");
|
||||
$arr_TypeType = array("ITU","ANSI");
|
||||
if(!$flag)
|
||||
{
|
||||
$length_type=getBitValue($row[0],$NetOPLenArr[$level_3][1]);
|
||||
$type_type=getBitValue($row[0],$NetOPTypeArr[$level_3][1]);//roger
|
||||
}
|
||||
else
|
||||
{
|
||||
$length_type=$length_type;
|
||||
$type_type=$type_type;//roger
|
||||
};
|
||||
echo "<td>";
|
||||
echo "<select name=\"length_type\">"; //roger
|
||||
//language=javascript....
|
||||
//not refresh itself
|
||||
for ($i=0;$i<2;$i++)
|
||||
{
|
||||
echo "<option value=\"$i\" ";
|
||||
if ($i == $length_type)
|
||||
{
|
||||
echo "selected";
|
||||
}
|
||||
echo ">$arr_LengthType[$i]</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
echo "</td>";
|
||||
//roger............................................................
|
||||
echo "<td><b>Type </b></td>";
|
||||
echo "<td>";
|
||||
echo "<select name=\"type_type\">";
|
||||
for ($i=0;$i<2;$i++)
|
||||
{
|
||||
echo "<option value=\"$i\" ";
|
||||
if ($i == $type_type)
|
||||
{
|
||||
echo "selected";
|
||||
}
|
||||
echo ">$arr_TypeType[$i]</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
echo "</td>";
|
||||
//roger...............................................................
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
break;
|
||||
case '2.3.1':
|
||||
case '2.3.2':
|
||||
case '2.3.3':
|
||||
case '2.3.4':
|
||||
case '2.3.5':
|
||||
case '2.3.6':
|
||||
case '2.3.7':
|
||||
case '2.3.8':
|
||||
$levelArr=explode('.',$objIdStr);
|
||||
for($j=0;$j<sizeof($levelArr);$j++){
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG) echo "<BR>levelArr[$j]={$levelArr[$j]}";
|
||||
}
|
||||
$getInstanceSql="SELECT initValue
|
||||
FROM $paramTable
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND level_3='$level_3'";
|
||||
$result=mysqli_query($pubConn,$getInstanceSql);
|
||||
$row=mysqli_fetch_array($result);
|
||||
$row[0] = hexdec($row[0]);
|
||||
if($_SERVER['REQUEST_METHOD'] == "POST"){
|
||||
$opc = dechex($opc);
|
||||
//if(strlen($opc) > 6)alertmax();
|
||||
$opc=omc_keep_length($opc,"0","6","1");
|
||||
$setSql="UPDATE $paramTable
|
||||
SET initValue='$opc'
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND level_3='$level_3' ";
|
||||
mysqli_query($pubConn,$setSql);
|
||||
echo mysqli_error($pubConn);
|
||||
echo "<script LANGUAGE=\"JavaScript\">";
|
||||
echo "\n window.opener.location.href=\"$listPageUrl\";";
|
||||
echo "\n window.opener.document.setForm.focus();";
|
||||
if(!$DEBUG){
|
||||
echo "\n window.close();";
|
||||
}
|
||||
echo "\n </script>";
|
||||
exit();
|
||||
}
|
||||
|
||||
switch($level_3){
|
||||
case '1':
|
||||
case '5':
|
||||
$opcArr="International Network";
|
||||
break;
|
||||
case '2':
|
||||
case '6':
|
||||
$opcArr="International Spare Network";
|
||||
break;
|
||||
case '3':
|
||||
case '7':
|
||||
$opcArr="National Network";
|
||||
break;
|
||||
case '4':
|
||||
case '8':
|
||||
$opcArr="National Spare Network";
|
||||
break;
|
||||
}
|
||||
|
||||
echo "<table>";
|
||||
echo "<tr width=\"100%\">";
|
||||
echo "<td><b>$opcArr</b></td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
echo "<table>";
|
||||
echo "<tr>";
|
||||
echo "<td><b>OPC (dec)</b></td>";
|
||||
echo "<td><nobr><input type=text name=\"opc\" maxlength=\"8\" value=\"$row[0]\" class=\"text\"></nobr> </td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
break;
|
||||
case '2.6.1':
|
||||
case '2.6.2':
|
||||
case '2.6.3':
|
||||
case '2.6.4':
|
||||
$levelArr=explode('.',$objIdStr);
|
||||
for($j=0;$j<sizeof($levelArr);$j++){
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG) echo "<BR>levelArr[$j]={$levelArr[$j]}";
|
||||
}
|
||||
if($instanceNo == 'new'){
|
||||
$RoutValue="000000808000000000";
|
||||
}else{
|
||||
$getSql="SELECT $valueName
|
||||
FROM $paramTable
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND level_3='$level_3' AND instanceNo='$instanceNo'
|
||||
";
|
||||
if($DEBUG) echo "<BR>getSql=$getSql";
|
||||
$result =mysqli_query($pubConn,$getSql);
|
||||
$rows= mysqli_fetch_array($result);
|
||||
$RoutValue=$rows[0];
|
||||
}
|
||||
if($DEBUG) echo "<BR>RoutValue=$RoutValue";
|
||||
if($DEBUG) echo "<BR>";
|
||||
if($_SERVER['REQUEST_METHOD'] == "POST"){
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD>
|
||||
$newRoutValue=$RoutValue;
|
||||
for($i=0;$i<sizeof($RoutingConfArr);$i++){
|
||||
$unitName=$RoutingConfArr[$i][2];
|
||||
$unitValue=${$unitName};
|
||||
$unitValue = dechex($unitValue);//roger
|
||||
$unitValue=omc_keep_length($unitValue,"0",$RoutingConfArr[$i][3],"1");
|
||||
//if($DEBUG)
|
||||
echo "<BR>$unitName=$unitValue";
|
||||
$newRoutValue=setBitValue($newRoutValue,$RoutingConfArr[$i][1],$unitValue);
|
||||
//if($DEBUG)
|
||||
echo "<BR>newRoutValue=$newRoutValue";
|
||||
}
|
||||
|
||||
$moveSql="UPDATE $paramTable SET initValue ='$newRoutValue'
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND level_3='$level_3' AND instanceNo='$instanceNo'
|
||||
";
|
||||
if($DEBUG) echo "<BR>getSql=$getSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo "<script LANGUAGE=\"JavaScript\">";
|
||||
echo "\n window.opener.location.href=\"$listPageUrl\";";
|
||||
echo "\n window.opener.document.setForm.focus();";
|
||||
if(!$DEBUG){
|
||||
echo "\n window.close();";
|
||||
}
|
||||
echo "\n </script>";
|
||||
exit();
|
||||
}else{
|
||||
//<2F><>ʾ
|
||||
echo "\n $tableHeader";
|
||||
echo "\n <tr bgcolor=\"#E6E6E6\">";
|
||||
echo "<td>Name</td><td>Value</td>";
|
||||
echo "</tr>";
|
||||
if($instanceNo == 'new'){
|
||||
$getInstanceSql="SELECT instanceNo FROM $paramTable
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND level_3='$level_3'AND $valueName = '000000808000000000'";
|
||||
$result=mysqli_query($pubConn,$getInstanceSql);
|
||||
echo mysqli_error($pubConn);
|
||||
echo "<td>No.</td><td>";
|
||||
if($DEBUG) echo "<br>$getInstanceSql";
|
||||
echo "<select name=\"instanceNo\" size=\"1\">";
|
||||
while($row=mysqli_fetch_array($result)){
|
||||
echo "<option value=$row[instanceNo]>$row[instanceNo]</option>";
|
||||
}
|
||||
echo"</select>";
|
||||
echo"</td>";
|
||||
}
|
||||
|
||||
for($i=0;$i<sizeof($RoutingConfArr);$i++){
|
||||
$unitShowName=$RoutingConfArr[$i][0];
|
||||
$unitValue=getBitValue($RoutValue,$RoutingConfArr[$i][1]);
|
||||
$unitValue = hexdec($unitValue);//roger
|
||||
|
||||
if($DEBUG) echo "<br>unitValue=$unitValue";
|
||||
$unitInputName=$RoutingConfArr[$i][2];
|
||||
$unitLen=$RoutingConfArr[$i][3]+1;//roger
|
||||
if($DEBUG)
|
||||
echo "<br>unitLen=$unitLen";
|
||||
echo "\n <tr>";
|
||||
echo "<td>$unitShowName</td>";
|
||||
if($i==0){
|
||||
echo "<td><input type=text name=\"$unitInputName\" maxlength=\"8\" value=\"$unitValue\" class=\"text\">";//roger
|
||||
}else{
|
||||
echo "<td><input type=text name=\"$unitInputName\" maxlength=\"$unitLen\" value=\"$unitValue\" class=\"text\">";
|
||||
}
|
||||
echo "  (DEC)</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case '2.7.1':
|
||||
case '2.7.2':
|
||||
case '2.7.3':
|
||||
case '2.7.4':
|
||||
case '2.7.5':
|
||||
$levelArr=explode('.',$objIdStr);
|
||||
for($j=0;$j<sizeof($levelArr);$j++){
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG) echo "<BR>levelArr[$j]={$levelArr[$j]}";
|
||||
}
|
||||
$acnValue=getSysParamValue($sysId,$objIdStr,$instanceNo,$valueName);
|
||||
if($_SERVER['REQUEST_METHOD'] == "POST"){
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD>
|
||||
$newRoutValue=$acnValue;
|
||||
for($i=0;$i<sizeof($ACNConfArr);$i++){
|
||||
$unitName=$ACNConfArr[$i][2];
|
||||
$unitValue=${$unitName};
|
||||
$unitValue = dechex($unitValue);//roger
|
||||
$unitValue=omc_keep_length($unitValue,"0",$ACNConfArr[$i][3],"1");
|
||||
if($DEBUG) echo "<BR>$unitName=$unitValue";
|
||||
$newRoutValue=setBitValue($newRoutValue,$ACNConfArr[$i][1],$unitValue);
|
||||
if($DEBUG) echo "<BR>newRoutValue=$newRoutValue";
|
||||
}
|
||||
|
||||
$moveSql="UPDATE $paramTable SET initValue ='$newRoutValue'
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND level_3='$level_3' AND instanceNo='$instanceNo'
|
||||
";
|
||||
if($DEBUG) echo "<BR>getSql=$getSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
|
||||
echo "<script LANGUAGE=\"JavaScript\">";
|
||||
echo "\n window.opener.location.href=\"$listPageUrl\";";
|
||||
if(!$DEBUG){
|
||||
echo "\n window.close();";
|
||||
}
|
||||
echo "\n </script>";
|
||||
exit();
|
||||
}else{
|
||||
//<2F><>ʾ
|
||||
echo "\n $tableHeader";
|
||||
echo "\n <tr bgcolor=\"#E6E6E6\">";
|
||||
echo "<td>Operation</td><td>Suggested version</td>";
|
||||
echo "</tr>";
|
||||
for($i=0;$i<sizeof($ACNConfArr);$i++){
|
||||
$unitShowName=$ACNConfArr[$i][0];
|
||||
$unitValue=getBitValue($acnValue,$ACNConfArr[$i][1]);
|
||||
$unitValue = hexdec($unitValue);//roger
|
||||
$unitInputName=$ACNConfArr[$i][2];
|
||||
$unitLen=$ACNConfArr[$i][3]+1;
|
||||
echo "\n <tr>";
|
||||
echo "<td>$unitShowName</td>";
|
||||
echo "<td><input type=text name=\"$unitInputName\" maxlength=\"$unitLen\" value=\"$unitValue\" class=\"text\"></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
echo "\n </table>";
|
||||
|
||||
|
||||
echo "\n <input type=\"hidden\" name=\"objIdStr\" value=\"$objIdStr\">";
|
||||
if($instanceNo != 'new'){
|
||||
echo "\n <input type=\"hidden\" name=\"instanceNo\" value=\"$instanceNo\">";
|
||||
}
|
||||
echo "\n <input type=\"submit\" name=\"set\" value=\"Set\"> ";
|
||||
echo "\n <input type=\"reset\" name=\"reset\" value=\"Reset\">";
|
||||
/*
|
||||
DPC: Destination point code of the MSC using this OPC<br><br>
|
||||
Normal linkset: Linkset assigned to the link connected to the device using this DPC<br><br>
|
||||
Alternative linkset: Alternative linkset of the normal linkset<br><br>
|
||||
The ACN facility enables the version negotiation for the above messages, which make the WXC2 System more compatible with the other networks by means of flexible message version adjustment. The adjustable version includes Version 1, Version 2 and Version 3
|
||||
*/
|
||||
?>
|
||||
|
||||
</form>
|
||||
<b>Remarks:</b><br><br>
|
||||
DPC: Specify a Destination Point Code to this route.<br><br>
|
||||
Normal linkset: Assign a primary linkset to this route.<br><br>
|
||||
Alternative linkset: Assign an alternative linkset to this route when the normal linkset becomes unavailable.<br><br>
|
||||
M3UA Routing Context: For M3UA use only. Specify the M3UA Routing Context used by M3UA peers to identify a particular application server.
|
||||
</body>
|
||||
</html>
|
||||
809
wxc2_omc/configuration/confSs7/ss7spcRoutineList.php
Executable file
809
wxc2_omc/configuration/confSs7/ss7spcRoutineList.php
Executable file
@@ -0,0 +1,809 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߺ<EFBFBD><DFBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD> SPC Routing
|
||||
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: header.inc
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
|
||||
<20><><EFBFBD>ߣ<EFBFBD>
|
||||
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Cui Ticun
|
||||
ʱ<EFBFBD>䣺2004-4-21
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Support OMC7.0,<2C><>advanced<65>Ƶ<EFBFBD>configuration<6F>У<EFBFBD><D0A3>ĺ<DEB8><C4BA><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><CFB7>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>ť
|
||||
*********************************************************/
|
||||
require("../../inc/header.inc");
|
||||
$helpId = "2.1.0";
|
||||
$DEBUG = 0;
|
||||
?>
|
||||
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
|
||||
|
||||
<?php
|
||||
adjust_head();
|
||||
adjust_title_head();
|
||||
if($DEBUG) echo "<br><3E><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD>";
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
$pubDb = 'OMC_PUB';
|
||||
$db = "OBJ_222";
|
||||
$paramTable ='OBJ_222.param_99';
|
||||
$maxNum = 30;
|
||||
|
||||
$sysId ='222_99_99';
|
||||
$instanceNo ='0';
|
||||
$editValue ='editValue';
|
||||
$initValue ='initValue';
|
||||
$readValue ='readValue';
|
||||
|
||||
$nGetComm = 0;
|
||||
$nSetComm = 3;
|
||||
|
||||
$nProcFail = 0;//failure
|
||||
$nWaitProc = 1;//wait
|
||||
$nInProc = 2;
|
||||
$nOutProc = 3;
|
||||
|
||||
$NetOPLenArr=array(
|
||||
//array('oid','offset', 'name'),
|
||||
array('2.2','0.0','International network'),
|
||||
array('2.2','0.1','International network spare'),
|
||||
array('2.2','0.2','National network'),
|
||||
array('2.2','0.3','National network spare')
|
||||
);
|
||||
|
||||
$NetOPTypeArr=array(
|
||||
//array('oid','offset', 'name'),
|
||||
array('International network type','0.4'),
|
||||
array('International network spare type','0.5'),
|
||||
array('National network type','0.6'),
|
||||
array('National network spare type','0.7')
|
||||
);
|
||||
|
||||
$NetOPCArr=array(
|
||||
//array('oid', 'name'),
|
||||
array('2.3.1', '14bit international network'),
|
||||
array('2.3.2', '14bit international network -s'),
|
||||
array('2.3.3', '14bit national network'),
|
||||
array('2.3.4', '14bit national network -s'),
|
||||
array('2.3.5', '24bit international network'),
|
||||
array('2.3.6', '24bit internation network -s'),
|
||||
array('2.3.7', '24bit national network'),
|
||||
array('2.3.8', '24bit national network -s')
|
||||
);
|
||||
|
||||
$RoutingArr=array(
|
||||
array('2.6.1', 'International network'),
|
||||
array('2.6.2', 'International network spare'),
|
||||
array('2.6.3', 'National network'),
|
||||
array('2.6.4', 'National network spare')
|
||||
);
|
||||
|
||||
$ACNArr=array(
|
||||
array('2.7.1', 'Local ACN'),
|
||||
array('2.7.2', 'International network'),
|
||||
array('2.7.3', 'International network spare'),
|
||||
array('2.7.4', 'National network'),
|
||||
array('2.7.5', 'National network spare')
|
||||
);
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<br>setInstanceNo=$setInstanceNo";
|
||||
if($DEBUG) echo "<BR>setObjIdStr =$setObjIdStr";
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD>get/set<65><74><EFBFBD><EFBFBD>
|
||||
if($_SERVER['REQUEST_METHOD'] == "POST"){
|
||||
echo "<br><br><br><br><br>";
|
||||
if(isset($setSys)){
|
||||
//Ϊset<65><74><EFBFBD><D7BC>
|
||||
$moveSql = "UPDATE $paramTable SET readValue = initValue
|
||||
WHERE level_1='2' AND level_2='2'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$moveSql = "UPDATE $paramTable SET readValue = initValue
|
||||
WHERE level_1='2' AND level_2='3'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$moveSql = "UPDATE $paramTable SET readValue = initValue
|
||||
WHERE level_1='2' AND level_2='6'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$moveSql = "UPDATE $paramTable SET readValue = initValue
|
||||
WHERE level_1='2' AND level_2='7'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
|
||||
$commIdStr = sysCommSend($sysId,$nSetComm,"2.3");
|
||||
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Set OPC";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "222_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
$commIdStr = sysCommSend($sysId,$nSetComm,"2.2");
|
||||
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Set PC length";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "222_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
|
||||
$commIdStr = sysCommSend($sysId,$nSetComm,"2.6");
|
||||
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Set DPC,Normal linkset,Alternative linkset";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "222_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
|
||||
$commIdStr = sysCommSend($sysId,$nSetComm,"2.7");
|
||||
|
||||
|
||||
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Set ACN";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "222_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
}elseif(isset($getSys)){
|
||||
$commIdStr = sysCommSend($sysId,$nGetComm,"2.3");
|
||||
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Get OPC";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "222_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
|
||||
$commIdStr = sysCommSend($sysId,$nGetComm,"2.2");
|
||||
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Get PC length";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "222_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
|
||||
$commIdStr = sysCommSend($sysId,$nGetComm,"2.6");
|
||||
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Get DPC,Normal linkset,Alternative linkset";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "222_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
|
||||
$commIdStr = sysCommSend($sysId,$nGetComm,"2.7");
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Get ACN";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "222_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
|
||||
$moveSql = "UPDATE $paramTable SET initValue = readValue
|
||||
WHERE level_1='2' AND level_2='2'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$moveSql = "UPDATE $paramTable SET initValue = readValue
|
||||
WHERE level_1='2' AND level_2='3'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$moveSql = "UPDATE $paramTable SET initValue = readValue
|
||||
WHERE level_1='2' AND level_2='6'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$moveSql = "UPDATE $paramTable SET initValue = readValue
|
||||
WHERE level_1='2' AND level_2='7'
|
||||
";
|
||||
if($DEBUG) echo "<BR>moveSql=$moveSql";
|
||||
mysqli_query($pubConn,$moveSql);
|
||||
echo mysqli_error($pubConn);
|
||||
}elseif(isset($saveSys)){
|
||||
$updSql = " UPDATE $paramTable SET initValue = '02'
|
||||
WHERE level_1 = '3' AND level_2 = '7'
|
||||
";
|
||||
$updRes = @mysqli_query($pubConn,$updSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$objIdStr = "3.7";
|
||||
$commIdStr=sysCommSend($sysId,$nSetComm,$objIdStr);
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Save parameter to system";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "222_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
}elseif(isset($resetSys)){
|
||||
$updSql = " UPDATE $paramTable SET initValue = '01'
|
||||
WHERE level_1 = '3' AND level_2 = '7'
|
||||
";
|
||||
$updRes = @mysqli_query($pubConn,$updSql);
|
||||
echo mysqli_error($pubConn);
|
||||
$objIdStr = "3.7";
|
||||
$commIdStr=sysCommSend($sysId,$nSetComm,$objIdStr);
|
||||
$i = 0;
|
||||
while(1)
|
||||
{
|
||||
//echo "<br>i=$i";
|
||||
if($i == 0)
|
||||
echo "<br>Reset system";
|
||||
if($i > $maxNum){
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">Timeout</font>";
|
||||
break;
|
||||
}
|
||||
echo "<img border=\"0\" src=\"../../images/arrow.gif\" width=\"10\" height=\"10\">";
|
||||
flush();
|
||||
$sysId = "222_99_99";
|
||||
$chkType = "0";
|
||||
$chRes=ChComm($sysId,$chkType);
|
||||
//echo "<br>chRes=$chRes";
|
||||
if($chRes == $nOutProc || $chRes == $nProcFail){
|
||||
if($chRes == $nProcFail)
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
elseif($remark == 'response timeout')
|
||||
echo "<br><font size=\"2\" color=\"#FF0000\">$remark</font><br>";
|
||||
else
|
||||
echo "<br><font size=\"2\" color=\"#0000FF\">$remark</font><br>";
|
||||
break;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(1==$delete){
|
||||
$levelArr=explode('.',$objIdStr);
|
||||
for($j=0;$j<sizeof($levelArr);$j++){
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG) echo "<BR>levelArr[$j]={$levelArr[$j]}";
|
||||
}
|
||||
|
||||
$delSql = "UPDATE $paramTable SET initValue = '000000808000000000'
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND level_3='$level_3' AND instanceNo='$delValue'";
|
||||
//echo "<br>delSql=$delSql";
|
||||
$delRes = @mysqli_query($pubConn,$delSql);
|
||||
echo mysqli_error($pubConn);
|
||||
}
|
||||
|
||||
|
||||
if($setSys || $getSys || $saveSys || $undoSet||$resetSys){
|
||||
echo "<br>";
|
||||
echo "<p align=\"left\"><a href=\"$PHP_SELF?setFlag=$setFlag\" target=\"contents\"><img align=absBottom border=0 src=\"../../images/left.gif\" width=\"14\" height=\"14\">$strBack</a>";
|
||||
exit();
|
||||
}
|
||||
|
||||
if($DEBUG) echo "<BR>=======NetID==========";
|
||||
$NetIDArr=array(
|
||||
//array('name', 'len value','OPC'),
|
||||
array('International Network', '', ''),
|
||||
array('International Network Spare','', ''),
|
||||
array('National Network', '', ''),
|
||||
array('National Network Spare', '', '')
|
||||
);
|
||||
|
||||
$NetTypeArr=array(
|
||||
array('International Network', '', ''),
|
||||
array('International Network Spare','', ''),
|
||||
array('National Network', '', ''),
|
||||
array('National Network Spare', '', '')
|
||||
);
|
||||
|
||||
$objIdStr =$NetOPLenArr[0][0];
|
||||
$NetIDvalue=getSysParamValue($sysId,$objIdStr,$instanceNo,$initValue);
|
||||
if($DEBUG) echo "<BR>NetIDvalue=$NetIDvalue";
|
||||
for($i=0;$i<sizeof($NetIDArr);$i++){
|
||||
$tmpValue=getBitValue($NetIDvalue,$NetOPLenArr[$i][1]);
|
||||
if($tmpValue > '0'){
|
||||
$NetIDArr[$i][1]='24bit';
|
||||
$objIdStr=$NetOPCArr[$i+4][0];
|
||||
$OPCvalue=getSysParamValue($sysId,$objIdStr,$instanceNo,$initValue);
|
||||
$NetIDArr[$i][2]=$OPCvalue;
|
||||
$m=$i+5;
|
||||
}else{
|
||||
$NetIDArr[$i][1]='14bit';
|
||||
$objIdStr=$NetOPCArr[$i][0];
|
||||
$OPCvalue=getSysParamValue($sysId,$objIdStr,$instanceNo,$initValue);
|
||||
$NetIDArr[$i][2]=$OPCvalue;
|
||||
$m=$i+1;
|
||||
}
|
||||
$tmpValue=getBitValue($NetIDvalue,$NetOPTypeArr[$i][1]);
|
||||
|
||||
if($tmpValue > '0'){
|
||||
$NetTypeArr[$i][1]='ANSI';
|
||||
}else{
|
||||
$NetTypeArr[$i][1]='ITU';
|
||||
};
|
||||
$opcIdArr[$i]="2."."3.".$m;
|
||||
if($DEBUG) echo "<BR>{$NetIDArr[$i][0]}:<t>Len={$NetIDArr[$i][1]} ,<t>OPC={$NetIDArr[$i][2]}";
|
||||
}
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<BR>";
|
||||
?>
|
||||
|
||||
<script LANGUAGE="JavaScript">
|
||||
function openSet(objIdStr,instanceNo){
|
||||
URL="./ss7spcRoutineConf.php?instanceNo="+instanceNo+"&objIdStr="+objIdStr;
|
||||
var setWindow = open(URL, 'newWin', 'toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,status=yes,width=400,height=350');
|
||||
setWindow.focus();
|
||||
}
|
||||
|
||||
function delFirm(objIdStr,instanceNo)
|
||||
{
|
||||
var delValue,x,y;
|
||||
x = document.body.scrollLeft;
|
||||
y = document.body.scrollTop;
|
||||
|
||||
if(confirm('Do you want to delete the selected?')!=true){
|
||||
window.location.href='<?php echo $PHP_SELF;?>'+"?scroll_x="+x+"&scroll_y="+y;
|
||||
}else{
|
||||
window.location.href='<?php echo $PHP_SELF;?>?&delete=1&delValue='+instanceNo+"&objIdStr="+objIdStr+"&scroll_x="+x+"&scroll_y="+y;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
function ChComm($sysId,$chkType)
|
||||
{
|
||||
global $omc_db;
|
||||
global $remark,$nProcFail,$nWaitProc,$nInProc,$nOutProc;
|
||||
//$DEBUG = 1;
|
||||
|
||||
$commTable = "parameterComm";
|
||||
|
||||
$sysIdArr = explode('_',$sysId);
|
||||
$sysTypeNo = $sysIdArr[0];
|
||||
$sysNo = $sysIdArr[1];
|
||||
$subSysNo = $sysIdArr[2];
|
||||
|
||||
if($chkType==0)
|
||||
$selComm = " SELECT commState,remark FROM $commTable WHERE sysTypeNo = '$sysTypeNo' ";
|
||||
else
|
||||
$selComm = " SELECT commState,remark FROM $commTable WHERE sysTypeNo = '$sysTypeNo' AND sysNo = '$sysNo' ";
|
||||
|
||||
$selRes = @mysqli_query($pubConn,$selComm);
|
||||
$selRow = @mysqli_fetch_array($selRes);
|
||||
echo mysqli_error($pubConn);
|
||||
$outProcCount=0;
|
||||
do
|
||||
{
|
||||
$temCommState = $selRow[commState];
|
||||
if(isset($selRow[remark])){
|
||||
$remark = $selRow[remark];
|
||||
if($DEBUG)echo "<br>remark=$remark";
|
||||
}
|
||||
if($DEBUG)echo "<br>temCommState=$temCommState";
|
||||
if($temCommState == $nWaitProc){
|
||||
return($nWaitProc);
|
||||
}elseif($temCommState == $nInProc){
|
||||
return($nInProc);
|
||||
}elseif($temCommState == $nOutProc){
|
||||
$commState = $nOutProc;
|
||||
$outProcCount++;
|
||||
}else{
|
||||
$commState = $nProcFail;
|
||||
}
|
||||
}while($selRow = @mysqli_fetch_array($selRes));
|
||||
if($outProcCount > 0){
|
||||
return($nOutProc);
|
||||
}else{
|
||||
return($nProcFail);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
|
||||
|
||||
|
||||
<?php
|
||||
echo "<form method=\"POST\" name=\"setForm\" action=\"$PHP_SELF\">";
|
||||
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
|
||||
echo "<tr>";
|
||||
echo "<td width=\"50%\">";
|
||||
echo "$strConfiguration > $strNetwork > SS7 > SPC Routing";
|
||||
echo "</td>";
|
||||
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
|
||||
showHelp($helpId);
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td align=\"left\">";
|
||||
|
||||
echo "<b>System:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getSys\" value=\"$strGet\" class=\"button\">";
|
||||
echo "<input type=\"submit\" name=\"setSys\" value=\"$strSet\" class=\"button\">";
|
||||
/*
|
||||
if ( TRUE == session_is_registered("routineSetFlag") ) {
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}else{
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" DISABLED class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}
|
||||
*/
|
||||
echo " ";
|
||||
echo "<b>Command:</b> ";
|
||||
echo "<input type=\"submit\" name=\"saveSys\" value=\"$strSave\" class=\"button\">";
|
||||
echo "<input type=\"submit\" name=\"resetSys\" value=\"$strReset\" class=\"button\">";
|
||||
echo "<input type=\"hidden\" name=\"objIdStr\" value=\"2\">";
|
||||
echo "</form>";
|
||||
|
||||
echo "</td>";
|
||||
echo "<td> </td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
adjust_title_tail();
|
||||
adjust_content_head();
|
||||
/*
|
||||
echo "<b>System:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getSys\" value=\"$strGet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"setSys\" value=\"$strSet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"saveSys\" value=\"$strSave\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
if ( TRUE == session_is_registered("routineSetFlag") ) {
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}else{
|
||||
echo "<input type=\"submit\" name=\"undoSet\" value=\"$strUndo\" DISABLED class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\"> ";
|
||||
}
|
||||
echo "<b>OMC:</b> ";
|
||||
echo "<input type=\"submit\" name=\"getOmc\" value=\"$strGet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"submit\" name=\"saveOmc\" value=\"$strSave\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 25; position: relative\">";
|
||||
echo "<input type=\"hidden\" name=\"objIdStr\" value=\"2\">";
|
||||
echo "</form>";
|
||||
*/
|
||||
|
||||
|
||||
echo "<br>";
|
||||
$tableHead="<table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
|
||||
for($i=0;$i<sizeof($NetIDArr);$i++){
|
||||
//echo "opcIdArr[$i]=$opcIdArr[$i]";
|
||||
echo "$tableHead";
|
||||
$RTobjIdStr =$RoutingArr[$i][0];
|
||||
$ACNobjIdStr=$ACNArr[$i+1][0];
|
||||
$opcIdStr =$opcIdArr[$i];
|
||||
echo "<tr bgcolor=\"#E6E6E6\">";
|
||||
echo "<td colspan=\"7\"><b>{$NetIDArr[$i][0]}</b></td>";
|
||||
echo "</tr>";
|
||||
|
||||
$NetworkId="2.2.".$i;
|
||||
echo "<tr bgcolor=\"#E6E6E6\">";
|
||||
echo "<td colspan=\"7\"><a href=\"javascript:openSet('$NetworkId','0')\">PC length:{$NetIDArr[$i][1]} | PC type:{$NetTypeArr[$i][1]}</a></td>";
|
||||
echo "</tr>";
|
||||
echo "<tr bgcolor=\"#E6E6E6\">";
|
||||
echo "<td colspan=\"5\"><a href=\"javascript:openSet('$opcIdStr','$instanceNo')\">OPC (hex):{$NetIDArr[$i][2]}</a></td>";
|
||||
echo "<td colspan=\"2\"><a href=\"javascript:openSet('{$ACNArr[0][0]}','0')\">";
|
||||
echo "ACN</a></td>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td width=\"5%\">No.</td>";
|
||||
echo "<td width=\"20%\">DPC (hex)</td>";
|
||||
echo "<td width=\"20%\">Normal linkset (dec)</td>";
|
||||
echo "<td width=\"22%\">Alternative linkset (dec)</td>";
|
||||
echo "<td>M3UA Routing Context (dec)</td>";
|
||||
echo "<td width=\"5%\">ACN</td>";
|
||||
echo "<td width=\"5%\">Delete</td>";
|
||||
echo "</tr>";
|
||||
|
||||
$levelArr=explode('.',$RoutingArr[$i][0]);
|
||||
for($j=0;$j<sizeof($levelArr);$j++){
|
||||
$levelNo=$j+1;
|
||||
${"level_$levelNo"}=$levelArr[$j];
|
||||
if($DEBUG) echo "<BR>levelArr[$j]={$levelArr[$j]}";
|
||||
}
|
||||
|
||||
$defSql = "SELECT initValue from paramConf
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND level_3='$level_3'
|
||||
";
|
||||
if($DEBUG) echo "defSql=$defSql<br>";
|
||||
$defRes = mysqli_query($pubConn,$defSql);
|
||||
$defRow = mysqli_fetch_array($defRes);
|
||||
$defaultValue = $defRow[initValue];
|
||||
if($DEBUG)
|
||||
echo "defaultValue=$defaultValue<br>";
|
||||
|
||||
$getSql="SELECT $initValue,instanceNo FROM $paramTable
|
||||
WHERE level_1='$level_1' AND level_2='$level_2' AND level_3='$level_3'
|
||||
";
|
||||
if($DEBUG)
|
||||
echo "<BR>getSql=$getSql";
|
||||
$result =mysqli_query($pubConn,$getSql);
|
||||
echo mysqli_error($pubConn);
|
||||
|
||||
while($rows =mysqli_fetch_array($result)){
|
||||
if($DEBUG)
|
||||
echo "$rows[0], <1>";
|
||||
if(strcasecmp($rows[0],$defaultValue)==0){
|
||||
continue;
|
||||
}
|
||||
$DPC=substr($rows[0],0,6);
|
||||
$NormalLinkset=substr($rows[0],6,2);
|
||||
$NormalLinkset=hexdec($NormalLinkset);
|
||||
$M3UA_routing_context=hexdec(substr($rows[0],10,8));
|
||||
if($NormalLinkset>127)
|
||||
$NormalLinkset="--";
|
||||
|
||||
$AlternativeLinkset=substr($rows[0],8,2);
|
||||
$AlternativeLinkset=hexdec($AlternativeLinkset);
|
||||
if($AlternativeLinkset > 127){
|
||||
$AlternativeLinkset="--";
|
||||
}
|
||||
|
||||
$instanceNo=$rows[instanceNo];
|
||||
if(($RTobjIdStr == $setObjIdStr || $ACNobjIdStr== $setObjIdStr) && $instanceNo == $setInstanceNo){
|
||||
echo "<tr bgcolor=\"#CCFFCC\">";
|
||||
}else{
|
||||
echo "<tr>";
|
||||
}
|
||||
|
||||
echo "<td><a href=\"javascript:openSet('$RTobjIdStr','$instanceNo')\">";
|
||||
echo "$instanceNo</a></td>";
|
||||
echo "<td>$DPC</td>";
|
||||
echo "<td>$NormalLinkset</td>";
|
||||
echo "<td>$AlternativeLinkset</td>";
|
||||
echo "<td>$M3UA_routing_context</td>";
|
||||
echo "<td><a href=\"javascript:openSet('$ACNobjIdStr','$instanceNo')\">";
|
||||
echo "ACN</a></td>";
|
||||
echo "<td><input type=\"checkbox\" name=\"C$instanceNo\" value=\"ON\" onClick=\"javascript:delFirm('$RTobjIdStr','$instanceNo')\" ></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "<tr>";
|
||||
echo "<td><a href=\"javascript:openSet('$RTobjIdStr','new')\">";
|
||||
echo "New</a></td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "<td>--</td>";
|
||||
echo "</tr>";
|
||||
echo "</table><br>";
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
<br><b>Remarks:</b><br>This SPC routing page provides a straightforward interface to set the MTP3 signaling addressing (point code) and ACN (application context name) control. The MSC supports four networks (international, international spare, national and national spare) and both 14-bit and 24-bit signaling point codes. To add or modify a point code, firstly select the type of the network, and then click on the correspondent number of the point code to open the point code set window.
|
||||
<?php
|
||||
adjust_content_tail();
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user