正在调试中!!";
//==========================================================
//变量定义
//==========================================================
$pubDb = 'OMC_PUB';
$sysSubsConfTable = 'OMC_PUB.sysSubsConf';
$systemConfTable = 'OMC_PUB.sysConf';
$numberPerPage = 100; //每页纪录数
$nReadComm = 1;
$nChangeComm = 2;
$nCreateComm = 3;
$nDeleteComm = 4;
$nLoadIndexComm = 5;
//确定告警内容显示语言种类
if($language=='eng'){
$alarmDesc = alarmDesc_1;
}else{
$alarmDesc = alarmDesc_2;
}
//==========================================================
//输入变量
//==========================================================
if($DEBUG) echo "
sysTypeNo=$sysTypeNo";
$dataTypeNo = $_REQUEST['dataTypeNo'];
$sysTypeNo = $_REQUEST['sysTypeNo'];
$bgnNo = $_REQUEST['bgnNo'];
if($DEBUG) echo "
dataTypeNo=$dataTypeNo";
$commType = $_REQUEST['commType'];
$keyValue = $_REQUEST['keyValue'];
//if(1) echo "
sysTypeNo=$sysTypeNo";
if ($_REQUEST['sysId'])
{
$sysId = $_REQUEST['sysId'];
if($DEBUG) echo "
sysId=$sysId";
$sysIdArr=explode('_',$sysId);
$sysTypeNo=$sysIdArr[0];
$sysNo=$sysIdArr[1];
// echo "sysTypeNo=$sysTypeNo,sysNo=$sysNo";
}
if(!isset($sysNo))
$sysNo=0;
//echo "
sysId=$sysId";
//根据sysTypeNo,dataTypeNo获取数据表名,索引字段名
if($sysTypeNo==390){
if(!isset($sysId))
$sysId='390_0_0';
$sysIdArr=explode('_',$sysId);
$sysNo=$sysIdArr[1];
$getConfSql="SELECT indexFieldName,subsDataTable,tmpDataTable
FROM $sysSubsConfTable
WHERE sysTypeNo='$sysTypeNo'
AND dataTypeNo='$dataTypeNo'
AND sysNo='$sysNo'
";
}else{
$getConfSql="SELECT indexFieldName,subsDataTable,tmpDataTable
FROM $sysSubsConfTable
WHERE sysTypeNo='$sysTypeNo'
AND dataTypeNo='$dataTypeNo'
";
}
if($DEBUG) echo "
getConfSql=$getConfSql";
$getConfResult=mysqli_query($pubConn,$getConfSql);
echo mysqli_error($pubConn);
$getConfRows=mysqli_fetch_array($getConfResult);
$tableName =$getConfRows[subsDataTable];
$keyFieldName =$getConfRows[indexFieldName];
if($DEBUG) echo "
tableName=$tableName";
if($DEBUG) echo "
keyFieldName=$keyFieldName";
//排序所依赖的字段名
if(!isset($orderByField)){
$orderByField = $keyFieldName;
}
if($DEBUG) echo "
orderByField=$orderByField";
//排序字符串
$orderByStr = " $orderByField";
if($DEBUG) echo "
orderByStr=$orderByStr";
//==========================================================
//数据处理
//==========================================================
//处理删除命令返回
if($commType == $nDeleteComm){
$delSql = "DELETE FROM $tableName WHERE $keyFieldName = '$keyValue'";
if($DEBG) echo "
delSql=$delSql";
mysqli_query($srcDataConn,$delSql);
echo mysqli_error($srcDataConn);
}
//echo "a=$sysTypeNo";
//定义各个系统的变量
switch($sysTypeNo){
case '330':
$sysTypeName='HLR';
$canSetNum='all';
$tableWidth='100%';
$selectFieldList = "imsi,inter_msisdn,used_flag,nam,camel_flag";
$showNameList="IMSI,MSISDN,Used flag,Network Access mode,Camel flag";
$targetPage="./hlrSubsConf.php";
//$targetPage="./subscriberConfig.php";
break;
case '325':
$sysTypeName='VLR';
$canSetNum='all';
$tableWidth='100%';
$selectFieldList = "IMSI,MSISDN,IMSIDetachFlag,LAI,O_CSI";
$showNameList = "IMSI,MSISDN,Attach,LAI (MCC-MNC-LAC),O_CSI Flag";
$targetPage="./vlrSubsConf.php";
//$targetPage="./subscriberConfig.php";
break;
case '360':
$pssCardMinCount = getPubVar('pssCardMinCount') - 0;
$dotLen = strLen($pssCardMinCount) - 1;
$fmtBit = "%01.".$dotLen."f";
if($dataTypeNo == 0){
$sysTypeName='PPS';
$canSetNum='all';
$tableWidth='100%';
$selectFieldList = "msisdn,status,balance,mo_expiration_date,mt_expiration_date,cug_id,access_date";
$showNameList= "MSISDN,Status,Balance,Expiration(MO),Expiration(MT),CUG,Active since";
$targetPage="./ppsSubsConf.php";
//$targetPage="./subscriberConfig.php";
}else{
$sysTypeName='Prepaid Card';
$canSetNum='all';
$tableWidth='100%';
$selectFieldList ="card_no,face_value,card_status,expiry_date,valid_time,updated_date,msisdn_used";
$showNameList="Card no.,Face value,Status,Expiry date,Valid days,Updated date,MSISDN";
$targetPage="./ppsCardConf.php";
}
break;
case '395':
$pssCardMinCount = getPubVar('pssCardMinCount') - 0;
$dotLen = strLen($pssCardMinCount) - 1;
$fmtBit = "%01.".$dotLen."f";
if($dataTypeNo == 0){
$sysTypeName='RCM';
$canSetNum='all';
$tableWidth='100%';
$selectFieldList = "msisdn,status,balance,mo_expiration_date,mt_expiration_date,cug_id,access_date";
$showNameList= "MSISDN,Status,Balance,Expiration(MO),Expiration(MT),CUG,Active since";
$targetPage="./rcmSubsConf.php";
}else{
$sysTypeName='Prepaid Card';
$canSetNum='all';
$tableWidth='100%';
$selectFieldList ="card_no,face_value,card_status,expiry_date,valid_time,updated_date,msisdn_used";
$showNameList="Card no.,Face value,Status,Expiry date,Valid days,Updated date,MSISDN";
$targetPage="./rcmCardConf.php";
}
break;
case '370':
$sysTypeName='MNP';
$canSetNum='all';
$tableWidth='100%';
$selectFieldList = "msisdn,status,routing_number,donor,recipient,date";
$showNameList = "MSISDN,Status,Routing number,Donor,Recipient,Date";
$targetPage="./mnpSubsConf.php";
break;
case '375':
$sysTypeName='OPPS';
$canSetNum='all';
$tableWidth='100%';
//$selectFieldList = "msisdn,imei,imsi,oprFlag,type,status";
$selectFieldList = "msisdn,imsi,imei,oprFlag,class";
//$showNameList="MSISDN,Imei,Imsi,Opr Flag,type,Status";
$showNameList="MSISDN,IMSI,IMEI,User Status,Class";
$targetPage="./oprSubsConf.php";
//$targetPage="./subscriberConfig.php";
break;
case '378':
$sysTypeName='iPALIM';
$canSetNum='all';
$tableWidth='100%';
$selectFieldList = "imsi,msisdn,msisdn_extern,tmsi,lai,type";
$showNameList = "IMSI,MSISDN Public,MSISDN Private,TMSI,MCC-MNC-LAC-CI,Type";
$targetPage="./ipalimSubsConf.php";
break;
case '340':
$sysTypeName='AUC';
$canSetNum='all';
$tableWidth='100%';
$selectFieldList = "key_imsi,a3a8_version,status";
$showNameList = "IMSI,A3A8 version,Service Status";
$targetPage="./aucSubsConf.php";
//$targetPage="./subscriberConfig.php";
break;
case '380':
$sysTypeName='EIR';
$canSetNum='all';
$tableWidth='50%';
$selectFieldList = "imei,status";
$showNameList= "IMEI,Status";
$targetPage="./eirSubsConf.php";
//$targetPage="./subscriberConfig.php";
break;
case '390':
$sysTypeName='VMS';
$canSetNum='all';
$tableWidth='100%';
$selectFieldList = "msisdn,mailboxID,promo_language,greeting,pwdValue";
$showNameList= "MSISDN,Mailbox No.,Language,Greeting type,Password";
$targetPage="./vmsSubsConf.php";
//$targetPage="./subscriberConfig.php";
break;
case '253':
$sysTypeName='SN-HLR';
$canSetNum='all';
$tableWidth='100%';
$selectFieldList = "imsi,msisdn,used_flag,lac";
$showNameList= "imsi,msisdn,used_flag,lac";
$targetPage="./snHlrSubsConf.php";
break;
default:
echo "Unknown sysTypeNo";
exit(1);
}
global $OMC_server;
$srcDataConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], $sysTypeName."_DB");
//获取活动的系统id
if($sysTypeNo==390)
$getSysIdSql = "SELECT sysNo,subSysNo FROM OMC_PUB.sysInfo
WHERE sysTypeNo='$sysTypeNo' AND sysNo='$sysNo'
ORDER BY baseStat DESC,updateTime DESC";
else
$getSysIdSql = "SELECT sysNo,subSysNo FROM OMC_PUB.sysInfo
WHERE sysTypeNo='$sysTypeNo'
ORDER BY baseStat DESC,updateTime DESC";
//if($DEBUG)
// debug_log("/tmp/debug.txt",$getSysIdSql);
$getSysIdResult=mysqli_query($pubConn,$getSysIdSql);
// debug_log("/tmp/debug.txt",$getSysIdResult);
echo mysqli_error($pubConn);
//debug_log("/tmp/debug.txt",mysqli_num_rows($getSysIdResult));
if(mysqli_num_rows($getSysIdResult) > 0){
$getSysIdRows=mysqli_fetch_array($getSysIdResult);
$sysNo = $getSysIdRows[sysNo];
$subSysNo = $getSysIdRows[subSysNo];
$sysId = $sysTypeNo.'_'.$sysNo.'_'.$subSysNo;
}else{
?>