init web ems all
This commit is contained in:
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>
|
||||
Reference in New Issue
Block a user