init web ems all

This commit is contained in:
agtuser committed 2024-09-27 17:13:36 +08:00
1 parent 81c97acbe9
commit 5cc56f8078
4263 files changed
+798779

No files matched your search

Binary file not shown.
Binary file not shown.
Binary file not shown.
+2197
View File
File diff suppressed because it is too large. Load diff
+2167
View File
File diff suppressed because it is too large. Load diff
+506
View File
@@ -0,0 +1,506 @@
<?php
/**
*@Purpose:
* 1. Search header.
* 2. "Previous" and "next" button.
* 3. total CDRs statistics.
*File name: cdrHeader.php
*Author: Li Long
*Create: No20040316-1
*Modifications:
*No.1
*Name:Cui Ticun
*Date:2004-5-27
*Description:Support SMLog
*/
//=============================================================================
if($DEBUG)
{
echo "<BR>***********************************************************<BR>";
echo "serverName=$serverName, sysId=$sysId,cdrType=$cdrType<BR>";
echo "queryField=$queryField<BR>";
echo "keyWord=$keyWord<BR>";
echo "preTbNum=$preTbNum, preDispNum=$preDispNum<BR>";
echo "cntTbNum=$cntTbNum, cntDispNum=$cntDispNum<BR>";
echo "nextTbNum=$nextTbNum, nextDispNum=$nextDispNum<BR>";
echo "***************************************************************<BR>";
}
global $OMC_server;
$dbName = "CDR_DB";
$cdrDbConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], $dbName);
$dispNumOfPerPage = 30;
$sortFld = isset($sortFld)?$sortFld:"releaseTime DESC ";
if(!isset($cntTbNum)) $cntTbNum = 0;
if(!isset($cntDispNum)) $cntDispNum = 0;
if(isset($pageNext)){
if($DEBUG) echo "NEXT<BR>";
if(isset($nextTbNum)){
$cntTbNum = intval($nextTbNum);
$cntTbNum_1 = intval($nextTbNum);
}else{
$nextTbNum = 0;
}
if(isset($nextDispNum))
$cntDispNum = intval($nextDispNum);
else
$nextDispNum = 0;
}
if(isset($pagePrevious)){
if($DEBUG) echo "PREVIOUS<BR>";
if(isset($preTbNum)){
$cntTbNum = intval($preTbNum);
$cntTbNum_1 = intval($preTbNum);
}else
$preTbNum = $cntTbNum;
if(isset($preDispNum))
$cntDispNum = intval($preDispNum);
else
$preDispNum = $cntDispNum;
}
if($DEBUG){
echo "cntTbNum=$cntTbNum<BR>";
echo "cntDispNum=$cntDispNum<BR>";
}
$rlsTb="cdrReleaseConf";
$srcTb="cdrServiceConf";
$typeTb="cdrTypeConf";
if($DEBUG){
$currentReleaseTime = date("Y-m-d H:i:s");
echo "cntDate=$cntDate, currentReleaseTime=$currentReleaseTime<BR>";
}
for($i=0;$i<24;$i++){
$beginTime[$i] = date("y-m-d H:i:s",mktime(date("H")-$i,0,0,date("m"),date("d"),date("Y")));
$endTime[$i] = date("y-m-d H:i:s",mktime(date("H")-$i,59,59,date("m"),date("d"),date("Y")));
$selHour[$i] = date("H",mktime(date("H")-$i,0,0,date("m"),date("d"),date("Y")));
$tbName[$i] = "cdrFrom".$serverName."_".$selHour[$i];
if($DEBUG) echo "beginTime[$i]=$beginTime[$i], endTime[$i]=$endTime[$i], tbName[$i]=$tbName[$i]<BR>";
}
/************* Get the CDR count of passed hours ***************************/
if(!isset($keyWord)){
for($i=0;$i<24;$i++){
$recordCount[$i] = 0;
}
for($i=0;$i<=date("G");$i++){
$hour = date("H",mktime($i,0,0,date("m"),date("d"),date("Y")));
$tmpTbName = "cdrFrom".$serverName."_".$hour;
/****************changed for SMLog by Cui Ticun start*************************/
if($cdrType==18||$cdrType==19||$cdrType==20||$cdrType==21){
$selSql = "SELECT count(*) FROM $tmpTbName WHERE recordType=$cdrType";
}else{
/*
if($sysId == 320)
{
echo "mscType=**$mscType**<br>";
$mscType=trim($mscType);
if($mscType == "call")
{
$selSql.="SELECT count(*) FROM $tmpTbName WHERE (recordType>=0 AND recordType<=5) ";
}
else if($mscType == "sm")
{
$selSql.= "SELECT count(*) FROM $tmpTbName WHERE (recordType>=6 AND recordType<=7) ";
}
else
{ */
$selSql = "SELECT count(*) FROM $tmpTbName";
//}
//}
}
/****************changed for SMLog by Cui Ticun end*************************/
if($DEBUG)
echo "<BR>$selSql<BR>";
$selRes = @mysqli_query($cdrDbConn,$selSql);
$selRow = @mysqli_fetch_array($selRes);
//echo mysqli_error($pubConn);
if($selRow[0]=="")
$recordCount[$i] = 0;
else
$recordCount[$i] = $selRow[0];
if($DEBUG) echo "recordCount[$i] = $recordCount[$i]<BR>";
}
}
/*********** Get the CDR count of passed hours end. *****************/
/******** Get the next table number and next display number start **********/
if($DEBUG){
echo "<BR>************ Next ***************<BR>";
echo "tbName[$cntTbNum]=$tbName[$cntTbNum]<BR>";
echo "cntTbNum=$cntTbNum,cntDispNum=$cntDispNum<BR>";
}
$displayNum = 0;
$nextTbNum = $cntTbNum;
while((($displayNum-$cntDispNum)<$dispNumOfPerPage)&&($nextTbNum<24)){
/****************changed for SMLog by Cui Ticun start*************************/
if($cdrType==18||$cdrType==19||$cdrType==20||$cdrType==21){
if(isset($keyWord)){
$WHERE = " $queryField like '%$keyWord%'";
$WHERE = "WHERE ".$WHERE." AND recordType=$cdrType";
$selSql = "SELECT count(*) FROM $tbName[$nextTbNum] $WHERE";
}else{
$selSql = "SELECT count(*) FROM $tbName[$nextTbNum] WHERE recordType=$cdrType";
}
}else{
if(isset($keyWord)){
if($queryField=="callingNumber")
$rrType=6;
else
$rrType=7;
$WHERE = " $queryField like '%$keyWord%' or (recordType=$rrType and servedMSISDN like '%$keyWord%') ";
$WHERE = "WHERE ".$WHERE;
$selSql = "SELECT count(*) FROM $tbName[$nextTbNum] $WHERE ";
}else{
$selSql = "SELECT count(*) FROM $tbName[$nextTbNum]";
}
//echo "sysId=$sysId,mscType=**$mscType**<br>";
if($sysId == 320)
{
if($mscType == "call")
{
//$selSql.=" AND (recordType>=0 AND recordType<=5) ";
if(isset($keyWord)){
if($queryField=="callingNumber")
$rrType=6;
else
$rrType=7;
$WHERE = " ($queryField like '%$keyWord%' or (recordType=$rrType and servedMSISDN like '%$keyWord%')) AND (recordType>=0 AND recordType<=5) ";
$WHERE = "WHERE ".$WHERE;
$selSql = "SELECT count(*) FROM $tbName[$nextTbNum] $WHERE ";
}else{
$selSql = "SELECT count(*) FROM $tbName[$nextTbNum] WHERE recordType>=0 AND recordType<=5 ";
}
}
else if($mscType == "sm")
{
//$selSql.=" AND (recordType>=6 AND recordType<=7) ";
if(isset($keyWord)){
if($queryField=="callingNumber")
$rrType=6;
else
$rrType=7;
$WHERE = " ($queryField like '%$keyWord%' or (recordType=$rrType and servedMSISDN like '%$keyWord%')) AND (recordType>=6 AND recordType<=7) ";
$WHERE = "WHERE ".$WHERE;
$selSql = "SELECT count(*) FROM $tbName[$nextTbNum] $WHERE ";
}else{
$selSql = "SELECT count(*) FROM $tbName[$nextTbNum] WHERE recordType>=6 AND recordType<=7 ";
}
}
else
{
if(isset($keyWord)){
if($queryField=="callingNumber")
$rrType=6;
else
$rrType=7;
$WHERE = " $queryField like '%$keyWord%' or (recordType=$rrType and serviceCentre like '%$keyWord%') ";
$WHERE = "WHERE ".$WHERE;
$selSql = "SELECT count(*) FROM $tbName[$nextTbNum] $WHERE ";
}else{
$selSql = "SELECT count(*) FROM $tbName[$nextTbNum]";
}
}
}
}
/****************changed for SMLog by Cui Ticun end**************************/
if($sysId==375)
$selSql=" SELECT count(*) FROM $tbName[$nextTbNum] WHERE msisdn like '%$keyWord%' ";
if($sysId==386)
$selSql=" SELECT count(*) FROM $tbName[$nextTbNum] WHERE nodeName like '%$keyWord%' ";
if($sysId==380)
{
if($eirType == "imei")
$selSql=" SELECT count(*) FROM $tbName[$nextTbNum] WHERE servedIMEI like '%$keyWord%' ";
else
$selSql=" SELECT count(*) FROM $tbName[$nextTbNum] WHERE servedIMSI like '%$keyWord%' ";
}
if($DEBUG)
echo "selSql=$selSql<br>";
$selRes = @mysqli_query($cdrDbConn,$selSql);
$selRow = @mysqli_fetch_array($selRes);
echo mysqli_error($cdrDbConn);
if($selRow[0]=="")
$recordNum[$nextTbNum] = 0;
else
$recordNum[$nextTbNum] = $selRow[0];
if($DEBUG) echo "recordNum[$nextTbNum]=$recordNum[$nextTbNum]<BR>";
$displayNum += $selRow[0];
if(($cntDispNum+$dispNumOfPerPage)>$displayNum){
$nextTbNum++;
}
if($DEBUG) echo "displayNum = $displayNum, nextTbNum=$nextTbNum<BR>";
}
if(($nextTbNum==24||$displayNum<$dispNumOfPerPage))
unset($nextFlag);
else
$nextFlag = 1;
/********************changed for SMLog by Cui Ticun start**********************/
/********************deal with when $displayNum==$dispNumOfPerPage*************/
if($displayNum==$dispNumOfPerPage&&$nextTbNum!=24){
$tmpTbNum=$nextTbNum+1;
do{
if($cdrType==18||$cdrType==19||$cdrType==20||$cdrType==21){
if(isset($keyWord)){
$WHERE = " $queryField like '%$keyWord%'";
$WHERE = "WHERE ".$WHERE." AND recordType=$cdrType";
$selSql = "SELECT count(*) FROM $tbName[$tmpTbNum] $WHERE";
}else{
$selSql = "SELECT count(*) FROM $tbName[$tmpTbNum] WHERE recordType=$cdrType";
}
}else{
if(isset($keyWord)){
$WHERE = " $queryField like '%$keyWord%'";
$WHERE = "WHERE ".$WHERE;
$selSql = "SELECT count(*) FROM $tbName[$tmpTbNum] $WHERE ";
}else{
$selSql = "SELECT count(*) FROM $tbName[$tmpTbNum]";
}
}
if($DEBUG)echo "selSql=$selSql, ";
$selRes = @mysqli_query($cdrDbConn,$selSql);
$selRow = @mysqli_fetch_array($selRes);
// echo mysqli_error($pubConn);
if($selRow[0]=="")
$selRow[0] = 0;
$tmpTbNum++;
}while(!$selRow[0]&&$tmpTbNum<24);
}
if($tmpTbNum==24)
unset($nextFlag);
/********************changed for SMLog by Cui Ticun end**********************/
if($DEBUG){
echo "==========================<BR>";
echo "recordNum[$nextTbNum]=$recordNum[$nextTbNum]<BR>";
echo "cntDispNum=$cntDispNum<BR>";
echo "displayNum=$displayNum<BR>";
echo "==========================<BR>";
}
if($nextTbNum == $cntTbNum){
//echo "IF<BR>";
$nextDispNum = $cntDispNum+$dispNumOfPerPage;
}else{
//echo "ELSE<BR>";
$nextDispNum = $cntDispNum+$dispNumOfPerPage+$recordNum[$nextTbNum]-$displayNum;
}
//if(($recordNum[$nextTbNum]-$cntDispNum)>$dispNumOfPerPage){
if($DEBUG){
echo "nextTbNum=$nextTbNum, nextDispNum=$nextDispNum<BR>";
echo "********************************<BR>";
}
if($displayNum==0){
echo "No record.<BR>";
exit();
}
/*********** Get the next table number and display number end. **********/
/******** Get the previous table number and display number start ********/
if($DEBUG){
echo "<BR>************ Previous ***************<BR>";
echo "tbName[$cntTbNum]=$tbName[$cntTbNum]<BR>";
echo "cntTbNum=$cntTbNum, cntDispNum=$cntDispNum<BR>";
}
if(($cntTbNum!=0)||($cntDispNum!=0)){
$previousFlag=1;
}
if(isset($previousFlag)){
$preTbNum = $cntTbNum;
if($cntDispNum >= $dispNumOfPerPage){
$preDispNum = $cntDispNum - $dispNumOfPerPage;
}else{
$leftDisplay = $dispNumOfPerPage - $cntDispNum;
if($preTbNum==0) $leftDisplay = 0;
while(($leftDisplay>0)&&($preTbNum>0)){
$preTbNum = $preTbNum-1;
/****************changed for SMLog by Cui Ticun start**************************/
if($cdrType==18||$cdrType==19||$cdrType==20||$cdrType==21){
if(isset($keyWord)){
$WHERE = " $queryField like '%$keyWord%'";
$WHERE = "WHERE ".$WHERE." AND recordType=$cdrType";
$selSql = "SELECT count(*) FROM $tbName[$preTbNum] $WHERE";
}else{
$selSql = "SELECT count(*) FROM $tbName[$preTbNum] WHERE recordType=$cdrType";
}
}else{
if(isset($keyWord)){
$WHERE = " $queryField like '%$keyWord%'";
$WHERE = "WHERE ".$WHERE;
$selSql = "SELECT count(*) FROM $tbName[$preTbNum] $WHERE";
}else{
$selSql = "SELECT count(*) FROM $tbName[$preTbNum]";
}
}
/****************changed for SMLog by Cui Ticun end**************************/
if($DEBUG) echo "selSql=$selSql<BR>";
$selRes = @mysqli_query($cdrDbConn,$selSql);
$selRow = @mysqli_fetch_array($selRes);
if($selRow[0]=="")
$selRow[0] = 0;
$leftDisplay = $leftDisplay - $selRow[0];
//echo mysqli_error($pubConn);
}
if( $leftDisplay!=$dispNumOfPerPage ){
$preDispNum = abs($leftDisplay);
}else{
$preDispNum = 0;
}
}
}
if($DEBUG){
echo "preTbNum=$preTbNum,preDispNum=$preDispNum<BR>";
echo "********************************<BR>";
}
/******** Get the previous table number and display number end. *********/
?>
<!--------------------TABLE START:: Display CDR count ---------------------->
<?php
if(!isset($keyWord)){
$cntDate = date("Y-m-d");
echo "$cntDate:<br>";
if($cdrType!=20){
echo "<TABLE border=1 width=100% cellpadding=2 cellspacing=0 bordercolor=#666666 bordercolordark=#FFFFFF bgcolor=#FFFFFF>";
echo "<TR bgcolor=\"#E6E6E6\" align=\"center\">";
echo "<td>Period</td>";
$field = "queryField=$queryField";
$sys = "serverName=$serverName&&sysId=$sysId&&cdrType=$cdrType";
for($i=0;$i<12;$i++){
if($recordCount[$i] > 0){
$tmpTbNum = date("G")-$i;
$cnt = "cntTbNum=$tmpTbNum&&cntTbNum_1=$tmpTbNum&&cntDispNum=0";
$cntPageLink = $field."&&".$sys."&&".$cnt;
if($DEBUG) echo "cntPageLink=$cntPageLink<BR>";
echo "<td><a href=\"$PHP_SELF?$cntPageLink\">$i</a></td>";
}else{
echo "<td>$i</td>";
}
}
echo "</TR>";
echo "<TR align=\"center\">";
echo "<TD>Total</TD>";
for($i=0;$i<12;$i++){
echo "<TD>$recordCount[$i]</TD>";
}
echo "</TR>";
echo "<TR bgcolor=\"#E6E6E6\" align=\"center\">";
echo "<td>Period</td>";
for($i=12;$i<24;$i++){
if($recordCount[$i] > 0){
$tmpTbNum = date("G")-$i;
$cnt = "cntTbNum=$tmpTbNum&&cntTbNum_1=$tmpTbNum&&cntDispNum=0";
$cntPageLink = $field."&&".$sys."&&".$cnt;
if($DEBUG) echo "cntPageLink=$cntPageLink<BR>";
echo "<td><a href=\"$PHP_SELF?$cntPageLink\">$i</a></td>";
}else{
echo "<td>$i</td>";
}
}
echo "</TR>";
echo "<TR align=\"center\">";
echo "<TD>Total</TD>";
for($i=12;$i<24;$i++){
echo "<TD>$recordCount[$i]</TD>";
}
echo "</TR>";
echo "</TABLE>";
}
}
?>
<!--------------------TABLE END:: Display CDR count ------------------------>
<!-----------TABLE START:: Display "Previous" and "Next" button ------------>
<TABLE border="0" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
<TR >
<TD align=left>
Period:
<?php
$periodStartArray = explode("_",$tbName[$cntTbNum]);
$periodStart = $periodStartArray[1];
$periodEndArray = explode("_",$tbName[$nextTbNum]);
$periodEnd = $periodEndArray[1];
if(!isset($periodEnd)){
$periodEnd = $periodStart;
}
echo "$periodStart - $periodEnd";
?>
</TD>
<TD align="right">
<?PHP
// NEW: Display a link for the previous set of records.
$next = " nextTbNum=$nextTbNum && nextDispNum=$nextDispNum ";
$previous = " preTbNum=$preTbNum && preDispNum=$preDispNum ";
$flag = " pagePrevious=1 ";
$field = " queryField=$queryField ";
$sys = " serverName=$serverName&&sysId=$sysId&&cdrType=$cdrType ";
$key = " keyWord=$keyWord ";
$msc_type= " mscType=$mscType ";
if(isset($keyWord)){
$previousPageLink = $previous." && ".$next." && ".$flag." && ".$field." && ".$sys." && ".$msc_type." && ".$key;
}else{
$previousPageLink = $previous." && ".$next." && ".$flag." && ".$field." && ".$sys." && ".$msc_type;
}
if($DEBUG) echo "¡¾PREVIOUS¡¿$previousPageLink";
if (isset($previousFlag)) {
echo "<a href=\"$PHP_SELF?$previousPageLink\">";
echo "<IMG alt=$strPrevious src=\"../../images/pre_page.gif\" border=\"0\"></a>";
}
/*
else{
echo "<font color=\"#808080\"><IMG alt=$strPrevious src=\"../../images/pre_page.gif\" border=\"0\"></font>";
}
*/
// NEW: Display a link for the next set of records.
$flag = " pageNext=1 ";
if(isset($keyWord))
$nextPageLink = $previous." && ".$next." && ".$flag." && ".$field." && ".$sys." && ".$msc_type." && ".$key;
else
$nextPageLink = $previous." && ".$next." && ".$flag." && ".$field." && ".$sys." && ".$msc_type;
if($DEBUG) echo "¡¾NEXT¡¿$nextPageLink";
if (isset($nextFlag)){
echo "<a href=\"$PHP_SELF?$nextPageLink\">";
//echo "&nbsp;>>&nbsp;$strNext</a>";
echo "<IMG alt=$strNext src=\"../../images/next_page.gif\" border=\"0\"></a>";
}
/*
else{
//echo "<font color=\"#808080\">&nbsp;>>&nbsp;$strNext</font>";
echo "<font color=\"#808080\"><IMG alt=$strNext src=\"../../images/next_page.gif\" border=\"0\"></font>";
}
*/
if ( (!isset($previousFlag)) && (!isset($nextFlag)) ){
echo "<BR>";
}
?>
<TD>
<TR>
</TABLE>
<!------------TABLE END:: Display "Previous" and "Next" button ------------->
+62
View File
@@ -0,0 +1,62 @@
<?php
require("../../inc/header.inc");
$DEBUG = 0;
$sysId = $_REQUEST['sysId'];
$helpId = $_REQUEST['helpId'];
$cdrType= $_REQUEST['cdrType'];
if(isset($sysId)){
$sysIdArr=explode('_',$sysId);
$sysTypeNo =$sysIdArr[0];
$sysNo =$sysIdArr[1];
$subSysNo =$sysIdArr[2];
}else{
echo "Cannot find sysId";
exit(0);
}
if($DEBUG) echo "helpId=$helpId, sysId=$sysId,cdrType=$cdrType<br>";
global $pubConn;
/******************** Get the server name ********************************/
$tbName = "sysConf";
$dbName = "OMC_PUB";
$where = " WHERE $sysId=sysTypeNo ";
$selSql = "SELECT sysTypeName FROM $tbName $where";
//if ($DEBUG)
//echo "<br>selSql=$selSql<br>";
//echo "<br>dbName=$dbName";
//echo "<br>selSql=$selSql";
$selRes = @mysqli_query($pubConn,$selSql);
$selRow = @mysqli_fetch_array($selRes);
echo mysqli_error($pubConn);
//echo "<br>XXXXXXXXXXXXXXXX";
$serverName = $selRow[0];
//EIR CDRs are get from MSC device
if($sysId == 320 && $define == "eirCdrDefine")
{
$sysId=380;
$serverName="EIR";
}
//deal with special CNF
if ("CNF-Center" == $serverName){
$serverName = "CNF";
}
if($DEBUG) echo "serverName=$serverName<br>";
if($serverName == "IMDM")
$serverName="OPR";
/********************* Get the server name end ****************************/
?>
<frameset rows="75,*" framespacing="0" border="0" frameborder="0">
<frame name="header" scrolling="no" noresize target="main"
src="cdrUp.php?helpId=<?php echo "$helpId"; ?>&&serverName=<?php echo "$serverName"; ?>&&sysId=<?php echo "$sysId"; ?>&&cdrType=<?php echo "$cdrType"; ?>"
style="border-bottom: 0 solid #000000" marginwidth="0" marginheight="0">
<frame name="main" src="cdrDown.php?serverName=<?php echo "$serverName"; ?>&&sysId=<?php echo "$sysId"; ?>&&cdrType=<?php echo "$cdrType"; ?>" scrolling="auto">
<noframes>
<body>
<p>此网页使用了框架,但您的浏览器不支持框架。</p>
</body>
</noframes>
</frameset>
</html>
+149
View File
@@ -0,0 +1,149 @@
<?php
/**
*@Purpose:
* 1. Search header.
* 2. "Previous" and "next" button.
* 3. total CDRs statistics.
*File name: cdrHeader.php
*Author: Li Long
*Create: No20040316-1
*Modifications:
*No.1
*Name:Cui Ticun
*Date:2004-5-27
*Description:Support SMLog
*/
//=============================================================================
require("../../inc/header.inc");
//echo "helpId=$helpId, serverName=$serverName,sysId=$sysId<br>";
?>
<script LANGUAGE="JavaScript">
function ignoreSpaces(string) {
var temp = "";
string = '' + string;
splitstring = string.split(" ");
for(i = 0; i < splitstring.length; i++)
temp += splitstring[i];
return temp;
}
</script>
<?php
$DEBUG=0;
$sysId = $_REQUEST['sysId'];
$cdrType= $_REQUEST['cdrType'];
$serverName = $_REQUEST['serverName'];
if($DEBUG) echo "sysId=$sysId,cdrType=$cdrType, serverName=$serverName, <br>";
if(isset($sysId)){
$sysIdArr=explode('_',$sysId);
$sysTypeNo =$sysIdArr[0];
$sysNo =$sysIdArr[1];
$subSysNo =$sysIdArr[2];
}else{
echo "Cannot find sysId";
exit(0);
}
//echo "helpId=$helpId, serverName=$serverName,sysId=$sysId<br>";
?>
<BASE target="main">
<body topmargin=16 leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('up');" onresize="javascript:adjust_frame('up');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<FORM method="POST" action="cdrDown.php?serverName=<?php echo "$serverName"; ?>&&sysId=<?php echo "$sysId"; ?>&&cdrType=<?php echo "$cdrType"; ?>" name="selectform" onsubmit="">
<?php
adjust_head_frame("up");
adjust_title_head_frame("up");
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\" align=\"left\">";
/********************changed for SMLog by Cui Ticun start**************************/
if(18==$cdrType) echo "$strLog > $serverName > $strSent ";
elseif(19==$cdrType) echo "$strLog > $serverName > $strDiscarded ";
elseif(20==$cdrType) echo "$strLog > $serverName > $strPending ";
elseif($serverName=="OPR") echo "$strLog > IMDM";
else echo "$strLog > $serverName ";
/********************changed for SMLog by Cui Ticun end**************************/
echo "</td>";
echo "<td align=\"right\" title=\"Help\">";
if($sysId != 330 && $sysId != 325 && $sysId != 351)
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=\"left\">";
switch($sysTypeNo){
case '386':
echo "Node Name";
echo "<input type=\"hidden\" name=\"queryField\" value=\"nodeName\"> ";
break;
case '375':
echo "MSISDN";
echo "<input type=\"hidden\" name=\"queryField\" value=\"msisdn\"> ";
break;
case '380':
echo "<select size=\"1\" name=\"eirType\" >";
echo "<option value=\"imsi\">IMSI</option>";
echo "<option value=\"imei\">IMEI</option>";
echo "</select>&nbsp;&nbsp;";
//echo "IMSI";
echo "<input type=\"hidden\" name=\"queryField\" value=\"servedIMSI\"> ";
break;
case '270': //CNF
case '351': //SMLOG
case '360': //PPS
echo "<select size=\"1\" name=\"queryField\" >";
echo "<option value=\"callingNumber\">Caller number</option>";
echo "<option value=\"calledNumber\">Called number</option>";
echo "</select>";
break;
case '320': //MSC
echo "<select size=\"1\" name=\"mscType\" >";
echo "<option value=\"call_sm\">Call&SM</option>";
echo "<option value=\"call\">Call</option>";
echo "<option value=\"sm\">SM</option>";
echo "</select>&nbsp;&nbsp;";
echo "<select size=\"1\" name=\"queryField\" >";
echo "<option value=\"callingNumber\">Caller number</option>";
echo "<option value=\"calledNumber\">Called number</option>";
//echo "<option value=\"serviceCentre\">Service centre</option>";
echo "</select>";
break;
case '325': //VLR
case '330': // HLR
echo "IMSI";
echo "<input type=\"hidden\" name=\"queryField\" value=\"servedIMSI\"> ";
break;
case '350': // SMSC
echo "MSISDN";
echo "<input type=\"hidden\" name=\"queryField\" value=\"servedMSISDN\"> ";
break;
default:
break;
}
?>
&nbsp;<input type="text" name="keyWord" size="20" style="font-family: Verdana; font-size: 8pt">&nbsp;&nbsp;
<span onClick="javascript:document.selectform.submit();" style="cursor:hand">
<IMG align=absBottom border=0 src="../../images/search.gif" ><?php echo "$strSearch"; ?>
</span>
<?php
echo "</td>";
echo "<td align=\"right\">";
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail_frame("up");
adjust_content_head_frame("up");
adjust_content_tail_frame("up");
?>
</FORM>
</BODY>
+176
View File
@@ -0,0 +1,176 @@
<?php
function u2utf8($c)
{
for($i=0;$i<count($c);$i++)
$str="";
/*
if ($c < 0x80) {
//$str.=(0x80 | $c>>6);
$str .= $c;
}
else
*/
if ($c < 0x800) {
$str.=(0xC0 | $c>>6);
$str.=(0x80 | $c & 0x3F);
}
else if ($c < 0x10000) {
$str.=(0xE0 | $c>>12);
$str.=(0x80 | $c>>6 & 0x3F);
$str.=(0x80 | $c & 0x3F);
}
else if ($c < 0x200000) {
$str.=(0xF0 | $c>>18);
$str.=(0x80 | $c>>12 & 0x3F);
$str.=(0x80 | $c>>6 & 0x3F);
$str.=(0x80 | $c & 0x3F);
}
return $str;
}
function chkDiffChr($inChr)
{
switch($inChr)
{
case 2:
$outChr = 36;//'$'
break;
case 0:
$outChr = 64;//'@'
break;
case 17:
$outChr = 95;//'_'
break;
// case 47:
// $outChr = 92;//'/'
// break;
default:
return($inChr);
}
return($outChr);
}
function decode7bitTo8bit($in_buffer)
{
$DEBUG=0;
$out_buffer="";
$len_of_data=strlen($in_buffer);
$in_buffer_len = ($len_of_data+1)*8/7;
if($DEBUG) echo "<br>in_buffer_len=$in_buffer_len";
for ($i=0; $i<$in_buffer_len; $i+=14)
{
$len_of_data=strlen($in_buffer);
$tmp7byte=substr($in_buffer,0,($len_of_data >= 14 ? 14 : $len_of_data));
if($DEBUG) echo "<br>tmp7byte=$tmp7byte";
$out_buffer .= decode7byteTo8byte($tmp7byte);
if($DEBUG) echo "<br>out_buffer=$out_buffer";
$in_buffer=substr($in_buffer,14);
if($DEBUG) echo "<br>in_buffer=$in_buffer,i=$i";
}
return($out_buffer);
}
function decode7byteTo8byte($Str)
{
$DEBUG=0;
$len_of_data=strlen($Str);
$len_of_byte=0;
for ($i=0;$i<$len_of_data;$i+=2)
{
$in_buffer[$len_of_byte]=hexdec(substr($Str,$i,2));
if($DEBUG) echo "<br>in_buffer[$len_of_byte]={$in_buffer[$len_of_byte]}";
$len_of_byte++;
}
$out_buffer='';
for ($i=0;$i<$len_of_byte;$i++)
{
switch ($i)
{
case 0:
$out_buffer .= chr(chkDiffChr(($in_buffer[0]) & 0x7f));
if($DEBUG) echo "<br>outChar=$outChar out_buffer=$out_buffer";
break;
case 1:
$out_buffer .= chr(chkDiffChr((($in_buffer[1] & 0x3f) << 1 ) | (($in_buffer[0] >> 7) & 0x01)));
if($DEBUG) echo "<br>out_buffer=$out_buffer";
break;
case 2:
$out_buffer .= chr(chkDiffChr((($in_buffer[2] & 0x1f) << 2 ) | (($in_buffer[1] >> 6) & 0x03)));
if($DEBUG) echo "<br>out_buffer=$out_buffer";
break;
case 3:
$out_buffer .= chr(chkDiffChr((($in_buffer[3] & 0x0f) << 3 ) | (($in_buffer[2] >> 5) & 0x07)));
if($DEBUG) echo "<br>out_buffer=$out_buffer";
break;
case 4:
$out_buffer .= chr(chkDiffChr((($in_buffer[4] & 0x07) << 4 ) | (($in_buffer[3] >> 4) & 0x0f)));
if($DEBUG) echo "<br>out_buffer=$out_buffer";
break;
case 5:
$out_buffer .= chr(chkDiffChr((($in_buffer[5] & 0x03) << 5 ) | (($in_buffer[4] >> 3) & 0x1f)));
if($DEBUG) echo "<br>out_buffer=$out_buffer";
break;
case 6:
$out_buffer .= chr(chkDiffChr((($in_buffer[6] & 0x01) << 6 ) | (($in_buffer[5] >> 2) & 0x3f)));
if($DEBUG) echo "<br>out_buffer=$out_buffer";
if ( $in_buffer[6] >> 1 )
{
$out_buffer .= chr(chkDiffChr(($in_buffer[6] >> 1) & 0x7f));
if($DEBUG) echo "<br>out_buffer=$out_buffer";
}
break;
default:
break;
}
}
return($out_buffer);
}
function encodeUTF8($smsContent,$smsDCS)
{
if(!trim($smsContent))
return $smsContent;
//echo "smsDCS=$smsDCS";
$encodeType=substr(decbin($smsDCS),-4,-2);
//echo "encodeType=$encodeType";
switch($encodeType){
case '00':$encodeStr=decode7bitTo8bit($smsContent);
case '0':$encodeStr=decode7bitTo8bit($smsContent);
case '':$encodeStr=decode7bitTo8bit($smsContent);
return($encodeStr);
case '01':
case '10':
$encodeStr=$smsContent;
break;
default: return('');
}
$utf8="";
$rrr="";
while($encodeStr){
$now=substr($encodeStr,0,4);
//echo "<BR>this=$this";
$trr="&#x".$now.";";
$rrr.=$trr;
$utf8.=u2utf8(hexdec($now));
$encodeStr=substr($encodeStr,4,strlen($encodeStr));
//echo "<BR>utf8-1=$utf8,encodeStr=$encodeStr";
}
return $rrr;
/*
//echo "<BR>utf8=$utf8";
$ret="";
for($i=0;$i<strlen($utf8);$i+=3)
$ret.=chr(substr($utf8,$i,3));
return $ret;
*/
}
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">";
//$UTF8Str=encodeUTF8($smsContent,$smsDCS);
//echo "$UTF8Str";
?>
+890
View File
@@ -0,0 +1,890 @@
<?php
/*************************************************
File name: cos.php
Author: Cui Ticun
Version: 8.02.00
Date: 2007-11-9
Description:Set PPS's COS Parameters
Calls: header.inc,operwebfunc.inc
Called:
History:
No.1:
Author:
Date:
Version:
Description:
*************************************************/
$DEBUG = 0;
require("../../inc/header.inc");
require("../sub_inc/operwebfunc.inc");
//---------------------------------------------------------
//Variable definitions
//---------------------------------------------------------
$objDb='OBJ_360';
$table_name='param_99';
$sysId ='360_99_99';
$nProcFail = 0;//failure
$nWaitProc = 1;//wait
$nInProc = 2;
$nOutProc = 3;
$maxNum = 30;
$nGetComm = 0;
$nSetComm = 3;
$objIdStr ='2.1.4';
$currentCosObjIdstr=$objIdStr.'.'.($cos_id+1);
$objIdWhere=getLevelWhere($objIdStr);
$strThisPage=$strTitleAccount.$strTitleSpace."COS";
//$strThisPage=$strConfiguration.$strTitleSpace."PPS".$strTitleSpace."COS";
?>
<base>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<script LANGUAGE="JavaScript">
function selectTitle(){
var base_url,url_add,url;
base_url='<?php echo "$PHP_SELF?cos_id=";?>';
url_add=document.selectform.cos_id.options[document.selectform.cos_id.selectedIndex].value;
url=base_url+url_add;
window.location=url;
}
</script>
<?php
adjust_head();
adjust_title_head();
if($_SERVER['REQUEST_METHOD'] == "POST"){
echo "<br><br><br><br><br>";
if(isset($setSys)){
//send set command
$commIdStr = sysCommSend($sysId,$nSetComm,$currentCosObjIdstr);
$showType="Set";
}elseif(isset($getSys)){
$commIdStr = sysCommSend($sysId,$nGetComm,$currentCosObjIdstr);
$showType="Get";
}elseif(isset($saveSys)){
$updSql = " UPDATE $table_name SET initValue = '01'
WHERE level_1 = '2' AND level_2 = '1' AND level_3 = '6' AND level_4 = '2'
";
$updRes = @mysqli_query($pubConn,$updSql);
echo mysqli_error($pubConn);
$commIdStr=sysCommSend($sysId,$nSetComm,'2.1.6.2');
$showType="Save parameter to system";
}/*elseif(isset($resetSys)){
$updSql = " UPDATE $table_name SET initValue = '01'
WHERE level_1 = '2' AND level_2 = '1' AND level_3 = '6' AND level_4 = '2'
";
$updRes = @mysqli_query($pubConn,$updSql);
echo mysqli_error($pubConn);
$commIdStr=sysCommSend($sysId,$nSetComm,'2.1.6.2');
}*/
if($DEBUG) echo "<BR>commIdStr =$commIdStr";
$i = 0;
while(1)
{
//echo "<br>i=$i";
if($i == 0)
echo "<br>$showType";
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 = "360_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(isset($getSys)){
$moveSql = "UPDATE $table_name SET initValue = readValue
WHERE $objIdWhere
";
if($DEBUG) echo "<BR>moveSql=$moveSql";
mysqli_query($pubConn,$moveSql);
echo mysqli_error($pubConn);
}
}
if($setSys || $getSys || $saveSys ||$resetSys){
echo "<br>";
echo "<p align=\"left\"><a href=\"$PHP_SELF?cos_id=$cos_id\" target=\"contents\"><img align=absBottom border=0 src=\"../../images/left.gif\" width=\"14\" height=\"14\">$strBack</a>";
exit();
}
?>
<?php
function ChComm($sysId,$chkType)
{
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 method="POST" name="selectform" action="<?php echo "$PHP_SELF";?>">
<?php
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strThisPage";
echo "</td>";
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
$helpId="2.2.4";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=\"left\">";
echo "<b>System:</b>&nbsp;&nbsp;";
echo "<input type=\"submit\" name=\"getSys\" value=\"$strGet\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 20; position: relative\">";
echo "<input type=\"submit\" name=\"setSys\" value=\"$strSet\" class=\"button\" style=\"left: 1; top: 2; width: 50; height: 20; position: relative\">";
echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Command:</b>&nbsp;&nbsp;";
echo "<input type=\"submit\" name=\"saveSys\" value=\"$strSave\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 20; position: relative\">";
echo "</td>";
echo "<td align=\"right\">";
echo "<b>COS ID</b>";
echo "&nbsp;&nbsp;&nbsp;&nbsp;";
$maxCosSql = " SELECT pubVarValue FROM OMC_PUB.omcPubVarConf WHERE pubVarName = 'maxCOSNumber' ";
$maxCosRes = @mysqli_query($pubConn,$maxCosSql);
$maxCosRow = @mysqli_fetch_array($maxCosRes);
$maxCosNum = $maxCosRow[pubVarValue];
echo "<select size=\"1\" name=\"cos_id\" onChange=\"javascript:selectTitle()\">";
for($i=0;$i< $maxCosNum;$i++){
$m=($i<10?"0":"").$i;
if($m != $cos_id){
echo "<option value=\"$m\">$m</option>";
}else{
echo "<option value=\"$m\" selected>$m</option>";
}
}
echo "</select>";
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
echo "<br>";
//echo "<input type=\"submit\" name=\"resetSys\" value=\"$strReset\" class=\"button\" style=\"left: 1; top: 2; width: 60; height: 20; position: relative\">";
//echo "</table>";
?>
<?php
//COS ID
$cos_id=$cos_id+1;
//Tariff±í¸ñ
$tableHeader ="<table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\"
bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
$tableHeaderNoBorder="<table width=\"100%\" cellpadding=\"1\" cellspacing=\"0\"
bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
?>
<?php
//Tariff title
echo "<br>";
echo "\n $tableHeader";
echo "\n <tr bgcolor=\"#F3F3F3\">";
echo "<td width=\"180\"><b>Title</b></td>";
echo "<td>";
$titleId=$objIdStr.'.'.$cos_id.'.10';
showParameter($sysId,$titleId,1,3);
//echo "($sysId,$titleId,1,1)";
echo "</td>";
echo "</tr>";
echo "</table>";
?>
<!--
<?php
echo "\n $tableHeader";
echo "\n <tr bgcolor=\"#F3F3F3\">";
echo "<td width=\"180\"><b>COS Title</td>";
echo "<td>";
echo "<input type=\"text\" name=\"minbalance\" size=\"16\" value=\"Service Plan XX\" style=\"font-family: Verdana; font-size: 10px\" maxLength=\"16\">";
echo "</td>";
echo "</tr>";
echo "</table>";
?>
-->
<?php
//Tariff±í¸ñ
echo "<br>";
echo "\n $tableHeader";
echo "\n <tr bgcolor=\"#F3F3F3\">";
echo "<td colspan=2><b>Tariff</b></td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"180\">";
echo "MO Tariff ID";
echo "</td>";
echo "<td>";
$moTariffId=$objIdStr.'.'.$cos_id.'.2.1';
showParameter($sysId,$moTariffId,1,1);
//echo "($sysId,$moTariffId,1,1)";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "MT Tariff ID";
echo "</td>";
echo "<td>";
$moTariffId=$objIdStr.'.'.$cos_id.'.2.2';
showParameter($sysId,$moTariffId,1,1);
//echo "($sysId,$moTariffId,1,1)";
echo "</td>";
echo "</tr>";
echo "</table>";
?>
<?php
//Tariff subscription±í¸ñ
echo "<br><br>";
echo "\n $tableHeader";
echo "\n <tr bgcolor=\"#F3F3F3\">";
echo "<td colspan=2><b>Tariff Subscription</b></td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"180\">";
echo "Charge By";
echo "</td>";
echo "<td>";
$tariffSubId=$objIdStr.'.'.$cos_id.'.2.3';
showParameter($sysId,$tariffSubId,1,1);
//echo "($sysId,$tariffSubId,1,1)";
echo "</td>";
echo "</tr>";
echo "</table>";
?>
<?php
//service control±í¸ñ
echo "<br><br>";
echo "\n $tableHeader";
echo "\n <tr bgcolor=\"#F3F3F3\">";
echo "<td colspan=2><b>Service Control</b></td></tr>";
//MO Call
echo "<tr>";
echo "<td width=\"180\">MO Call</td>";
echo "<td>";
echo "$tableHeaderNoBorder";
echo "<tr>";
echo "<td width=\"180\">Set Threshold for MO Call</td>";
echo "<td>";
$minbalanceId=$objIdStr.'.'.$cos_id.'.3.1';
showParameter($sysId,$minbalanceId,1,1);
//echo "($sysId,$minbalanceId,1,1)";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"180\">Minimum Balance for MO</td>";
echo "<td>";
$minbalanceId=$objIdStr.'.'.$cos_id.'.3.1';
showParameter($sysId,$minbalanceId,2,1);
//echo "($sysId,$minbalanceId,2,1)";
echo "&nbsp;&nbsp;(currency unit)";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</td>";
echo "<tr>";
//MT Call
echo "<tr>";
echo "<td width=\"180\">MT Call</td>";
echo "<td>";
echo "$tableHeaderNoBorder";
echo "<tr>";
echo "<td width=\"180\">Charged Flag</td>";
echo "<td>";
$mtChargeId=$objIdStr.'.'.$cos_id.'.4.1';
showParameter($sysId,$mtChargeId,1,1);
//echo "($sysId,$mtChargeId,1,1)";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"180\">Balance Control</td>";
echo "<td>";
$mtZeroId=$objIdStr.'.'.$cos_id.'.4.2';
showParameter($sysId,$mtZeroId,1,1);
//echo "($sysId,$mtZeroId,1,1)";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"180\">Balance Threshold</td>";
echo "<td>";
$mtZeroId=$objIdStr.'.'.$cos_id.'.4.3';
showParameter($sysId,$mtZeroId,1,1);
//echo "($sysId,$mtZeroId,1,1)";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</td>";
//F&&F Number
echo "<tr>";
echo "<td>Friends & Family Number</td>";
echo "<td>";
echo "$tableHeaderNoBorder";
echo "<tr>";
echo "<td width=\"180\">Flag</td>";
echo "<td>";
$ffNumberId=$objIdStr.'.'.$cos_id.'.5.5';
showParameter($sysId,$ffNumberId,2,1);
//echo "($sysId,$ffNumberId,2,1)";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"180\">Charge Flag</td>";
echo "<td>";
showParameter($sysId,$ffNumberId,3,1);
//echo "($sysId,$ffNumberId,3,1)";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Free Changes</td>";
echo "<td>";
showParameter($sysId,$ffNumberId,5,1);
//echo "($sysId,$ffNumberId,5,1)";
echo "&nbsp;&nbsp;(times)";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</td>";
echo "<tr>";
echo "<td>Others</td>";
echo "<td>";
echo "$tableHeaderNoBorder";
echo "<tr>";
echo "<td width=\"180\">Close User Group Service";
echo "<td>";
showParameter($sysId,$ffNumberId,1,1);
//echo "($sysId,$ffNumberId,1,1)";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"180\">Recharge via Credit Card</td>";
echo "<td>";
$rechargeViaCardId=$objIdStr.'.'.$cos_id.'.5.6';
showParameter($sysId,$rechargeViaCardId,1,1);
//echo "($sysId,$rechargeViaCardId,1,1)";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"180\">Credit Vault</td>";
echo "<td>";
$creditVaultServiceId=$objIdStr.'.'.$cos_id.'.5.7';
showParameter($sysId,$creditVaultServiceId,1,1);
//echo "($sysId,$creditVaultServiceId,1,1)";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"180\">Credit Vault Amount</td>";
echo "<td>";
showParameter($sysId,$creditVaultServiceId,2,1);
//echo "($sysId,$creditVaultServiceId,2,1)";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</td>";
echo "</tr>";
echo "</table>";
?>
<?php
//Account validity±í¸ñ
echo "<br><br>";
echo "\n $tableHeader";
echo "\n <tr bgcolor=\"#F3F3F3\">";
echo "<td colspan=2><b>Account Validity</b></td>";
echo "<tr>";
echo "<td width=\"180\">Account Expiration</td>";
echo "<td>";
echo "$tableHeaderNoBorder";
echo "<td width=\"180\">Maximum account validity is</td>";
echo "<td width=\"80\">";
$maxvalidityId=$objIdStr.'.'.$cos_id.'.3.2';
showParameter($sysId,$maxvalidityId,1,1);
//echo "($sysId,$maxvalidityId,1,1)";
echo "&nbsp;&nbsp;(days).";
echo "</td>";
echo "<td width=\"180\">When account expires</td>";
echo "<td><nobr>";
$clearBalanceId=$objIdStr.'.'.$cos_id.'.5.1';
showParameter($sysId,$clearBalanceId,1,1);
//echo "($sysId,$clearBalanceId,1,1)";
echo "</td>";
//--
echo "<td width=\"30\"><nobr>Expired when</td>";
echo "<td>";
showParameter($sysId,$clearBalanceId,3,1);
//echo "($sysId,$clearBalanceId,1,1)";
echo "</td>";
//--
echo "</tr>";
echo "<tr>";
echo "<td width=\"180\">Keep an expired account for";
echo "<td width=\"80\">";
$keepExpireDayId=$objIdStr.'.'.$cos_id.'.3.3';
showParameter($sysId,$keepExpireDayId,1,1);
//echo "($sysId,$keepExpireDayId,1,1)";
echo "&nbsp;&nbsp;(days).";
echo "</td>";
echo "<td width=\"180\">After that";
echo "<td>";
showParameter($sysId,$clearBalanceId,2,1);
//echo "($sysId,$clearBalanceId,2,1)";
echo "</td>";
//--
echo "</td>";
echo "<td width=\"180\">SMS Notification</td>";
echo "<td>";
showParameter($sysId,$clearBalanceId,4,1);
echo "</td>";
//--
echo "</tr>";
echo "</table>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Validity Adjustment</td>";
echo "<td>" ;
echo "$tableHeaderNoBorder";
echo "<tr>";
echo "<td width=\"180\">After recharge, account validity</td>";
echo "<td>";
$balanceAfRechargeId=$objIdStr.'.'.$cos_id.'.5.2';
showParameter($sysId,$balanceAfRechargeId,1,1);
//echo "($sysId,$balanceAfRechargeId,1,1)";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"180\">When balance is depleted, change account validity</td>";
echo "<td width=\"80\">";
$validityBalanceId=$objIdStr.'.'.$cos_id.'.5.3';
showParameter($sysId,$validityBalanceId,1,1);
//echo "($sysId,$validityBalanceId,1,1)";
echo "</td>";
echo "<td width=\"180\">Change validity to</td>";
echo "<td>";
showParameter($sysId,$validityBalanceId,2,1);
//echo "($sysId,$validityBalanceId,2,1)";
echo "&nbsp;&nbsp(days)";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"180\">Activation by inquiring is</td>";
echo "<td width=\"80\">";
$activatedAccountValidityId=$objIdStr.'.'.$cos_id.'.5.4';
showParameter($sysId,$activatedAccountValidityId,1,1);
//echo "($sysId,$activatedAccountValidityId,1,1)";
echo "</td>";
echo "<td width=\"180\">Validity of activated account with zero balance </td>";
echo "<td>";
showParameter($sysId,$activatedAccountValidityId,2,1);
//echo "($sysId,$activatedAccountValidityId,2,1)";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</td>";
echo "</tr>";
echo "</table>";
?>
<?php
//SMS notification±í¸ñ
echo "<br><br>";
echo "\n $tableHeader";
echo "\n <tr bgcolor=\"#F3F3F3\">";
echo "<td colspan=2><b>Short Message Notification & Inquiry</b></td>";
echo "<tr>";
echo "<td width=\"180\">Short Message Notification</td>";
echo "<td>";
echo "$tableHeaderNoBorder";
echo "<tr>";
echo "<td width=\"180\">Successful Recharge";
echo "<td>";
$feedbackSMId=$objIdStr.'.'.$cos_id.'.6.1';
showParameter($sysId,$feedbackSMId,1,1);
//echo "($sysId,$feedbackSMId,1,1)";
echo "</td>";
echo "<td width=\"180\">CAP Plan about to change";
echo "<td>";
showParameter($sysId,$feedbackSMId,3,1);
//echo "($sysId,$feedbackSMId,1,1)";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"180\">Account Inquiry</td>";
echo "<td>";
showParameter($sysId,$feedbackSMId,2,1);
//echo "($sysId,$feedbackSMId,2,1)";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"180\">Expiration</td>";
echo "<td width=\"80\">";
$SMExpiryId=$objIdStr.'.'.$cos_id.'.6.3';
showParameter($sysId,$SMExpiryId,1,1);
//echo "($sysId,$SMExpiryId,1,1)";
echo "<td width=\"180\">";
showParameter($sysId,$SMExpiryId,2,1);
//echo "($sysId,$SMExpiryId,2,1)";
echo "&nbsp;&nbsp(days) before expiration";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"180\">Insufficient Balance";
echo "<td width=\"80\">";
$SMLowBalanceId=$objIdStr.'.'.$cos_id.'.6.4';
showParameter($sysId,$SMLowBalanceId,1,1);
//echo "($sysId,$SMLowBalanceId,1,1)";
echo "<td width=\"180\">";
echo "When balance reaches&nbsp;&nbsp;&nbsp;&nbsp";
echo "</td>";
echo "<td>";
showParameter($sysId,$SMLowBalanceId,2,1);
//echo "($sysId,$SMLowBalanceId,2,1)";
echo "&nbsp;&nbsp(currency unit)";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"180\">Inquiry by Short Message</td>";
echo "<td>";
echo "$tableHeaderNoBorder";
echo "<tr>";
echo "<td width=\"180\">Charge</td>";
echo "<td>";
$InquirySMId=$objIdStr.'.'.$cos_id.'.6.2';
showParameter($sysId,$InquirySMId,1,1);
//echo "($sysId,$InquirySMId,1,1)";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"180\">Free Inquiry per Day</td>";
echo "<td>";
showParameter($sysId,$InquirySMId,2,1);
//echo "($sysId,$InquirySMId,2,1)";
echo "&nbsp;&nbsp(times)";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</td>";
echo "</tr>";
echo "</table>";
?>
<?php
//Recharge card validity±í¸ñ
echo "<br><br>";
echo "\n $tableHeader";
echo "\n <tr bgcolor=\"#F3F3F3\">";
echo "<td colspan=2><b>Recharge Card Validity</b></td></tr>";
$rechargeCardValidityId=$objIdStr.'.'.$cos_id.'.2.4';
for($instanceNo=0;$instanceNo<4;$instanceNo++){
echo "<tr>";
echo "<td width=\"180\">Recharge Card Type $instanceNo</td>";
echo "<td>";
echo "$tableHeaderNoBorder";
echo "<tr>";
echo "<td width=\"80\">Card Credit</td>";
echo "<td width=\"100\">";
showParameter($sysId,$rechargeCardValidityId,1,1,$instanceNo);
//echo "($sysId,$rechargeCardValidityId,1,1,$instanceNo)";
echo "</td>";
echo "<td width=\"80\">MO Validity</td>";
echo "<td width=\"100\">";
showParameter($sysId,$rechargeCardValidityId,2,1,$instanceNo);
//echo "($sysId,$rechargeCardValidityId,2,1,$instanceNo)";
echo "</td>";
echo "<td width=\"80\">MT Validity</td>";
echo "<td>";
showParameter($sysId,$rechargeCardValidityId,3,1,$instanceNo);
//echo "($sysId,$rechargeCardValidityId,3,1,$instanceNo)";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</td>";
echo "</tr>";
}
echo "</table>";
?>
<?php
//Recharge promotion±í¸ñ
echo "<br><br>";
echo "\n $tableHeader";
echo "\n <tr bgcolor=\"#F3F3F3\">";
echo "<td colspan=2><b>Recharge Promotion</b></td></tr>";
echo "<tr>";
echo "<td colspan=2>";
echo "$tableHeaderNoBorder";
echo "<tr>";
$startDateId=$objIdStr.'.'.$cos_id.'.1.1';
echo "<td width=\"180\">Start Date:20";
showParameter($sysId, $startDateId,1,1);
//echo "($sysId, $startDateId,1,1)";
echo "/";
showParameter($sysId, $startDateId,2,1);
//echo "($sysId, $startDateId,2,1)";
echo "/";
showParameter($sysId, $startDateId,3,1);
//echo "($sysId, $startDateId,3,1)";
echo "</td>";
$endDateId=$objIdStr.'.'.$cos_id.'.1.2';
echo "<td>End Date:20";
showParameter($sysId, $endDateId,1,1);
//echo "($sysId, $endDateId,1,1)";
echo "/";
showParameter($sysId, $endDateId,2,1);
//echo "($sysId, $endDateId,2,1)";
echo "/";
showParameter($sysId, $endDateId,3,1);
//echo "($sysId, $endDateId,3,1)";
echo "</td>";
echo "</tr>";
echo "</table>" ;
echo "</td>";
echo "</tr>";
$promotionBonusId= $objIdStr.'.'.$cos_id.'.1.3';
for($instanceNo=0;$instanceNo<4;$instanceNo++){
echo "<tr>";
echo "<td width=\"180\">Promotion $instanceNo</td>";
echo "<td>";
echo "$tableHeaderNoBorder";
echo "<tr>";
echo "<td width=\"140\">Recharge Card Credit</td>";
echo "<td width=\"40\">";
showParameter($sysId,$promotionBonusId,1,1,$instanceNo);
//echo "($sysId,$promotionBonusId,1,1,$instanceNo)";
echo "</td>";
echo "<td width=\"105\">Promotion Bonus</td>";
echo "<td width=\"75\">";
showParameter($sysId,$promotionBonusId,2,1,$instanceNo);
//echo "($sysId,$promotionBonusId,2,1,$instanceNo)";
echo "<td width=\"90\">Bonus Validity</td>";
echo "<td>";
showParameter($sysId,$promotionBonusId,3,1,$instanceNo);
//echo "($sysId,$promotionBonusId,3,1,$instanceNo)";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</td>";
echo "</tr>";
}
echo "</table>";
?>
<?php
//CAP Plan±í¸ñ
echo "<br><br>";
echo "\n $tableHeader";
echo "\n <tr bgcolor=\"#F3F3F3\">";
echo "<td colspan=2><b>CAP Plan</b></td></tr>";
echo "<tr>";
echo "<td colspan=2>";
echo "Reset Date:";
$resetDayId=$promotionBonusId= $objIdStr.'.'.$cos_id.'.7.1';
showParameter($sysId,$resetDayId,1,1);
//echo "($sysId,$resetDayId,1,1)";
echo "</td>";
echo "</tr>";
for($i=0;$i<4;$i++){
$capPlanId= $objIdStr.'.'.$cos_id.'.7.'.($i+2);
echo "<tr>";
if($i % 2 == 0)
echo "<td width=\"180\">CAP Plan $i (Home Network)</td>";
else
echo "<td width=\"180\">CAP Plan $i (Other Network)</td>";
echo "<td>";
echo "$tableHeaderNoBorder";
echo "<tr>";
echo "<td width=\"80\">Flag</td>";
echo "<td width=\"100\">";
showParameter($sysId,$capPlanId,1,1);
//echo "($sysId,$capPlanId,1,1)";
echo "</td>";
echo "<td width=\"80\">Type</td>";
echo "<td width=\"100\">";
showParameter($sysId,$capPlanId,2,1);
//echo "($sysId,$capPlanId,2,1)";
echo "</td>";
echo "</tr>";
/*
echo "<tr>";
echo "<td width=\"80\">Type</td>";
echo "<td width=\"100\">";
showParameter($sysId,$capPlanId,2,1);
echo "</td>";
echo "</tr>";
*/
echo "<tr>";
echo "<td width=\"80\">Threshold 0 </td>";
echo "<td width=\"100\">";
showParameter($sysId,$capPlanId,3,1);
//echo "($sysId,$capPlanId,3,1)";
echo "</td>";
echo "<td width=\"80\">Threshold 1 </td>";
echo "<td width=\"100\">";
showParameter($sysId,$capPlanId,4,1);
//echo "($sysId,$capPlanId,4,1)";
echo "</td>";
echo "<td width=\"80\">Threshold 2 </td>";
echo "<td width=\"100\">";
showParameter($sysId,$capPlanId,5,1);
//echo "($sysId,$capPlanId,5,1)";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"80\">Tariff ID 0 </td>";
echo "<td width=\"100\">";
showParameter($sysId,$capPlanId,6,1);
//echo "($sysId,$capPlanId,6,1)";
echo "</td>";
echo "<td width=\"80\">Tariff ID 1 </td>";
echo "<td width=\"100\">";
showParameter($sysId,$capPlanId,7,1);
//echo "($sysId,$capPlanId,7,1)";
echo "</td>";
echo "<td width=\"80\">Tariff ID 2 </td>";
echo "<td width=\"100\">";
showParameter($sysId,$capPlanId,8,1);
//echo "($sysId,$capPlanId,8,1)";
echo "<td width=\"80\">Tariff ID 3 </td>";
echo "<td>";
showParameter($sysId,$capPlanId,9,1);
//echo "($sysId,$capPlanId,9,1)";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</td>";
echo "</tr>";
}
?>
</form>
<?php
adjust_content_tail();
?>
</body>
</html>
+208
View File
@@ -0,0 +1,208 @@
<?php
/*********************************************************
文件说明:
功能说明:修改基本费率
调用关系:调用:header.inc
被调用:实现各个功能模块的页面
变量说明:
作者:
NO.1
姓名:
时间:
修改说明:
/*********************************************************/
require("../../inc/header.inc");
/*********************************************************/
function pps_get_shm($offset,$count)
{
// define("Semaphore_Key",440,1);
define("SharedMem_Key",0x61230000,1);
define("SharedMem_Size",1024,1); //共享内存大小
$SharedMemID = @shmop_open(SharedMem_Key,"c",0666,SharedMem_Size);
//将指定共享内存存入变量
$Read_str= shmop_read($SharedMemID,$offset,$count);
return($Read_str);
}
function pps_set_shm($offset,$str)
{
define("SharedMem_Key",0x61230000,1);
define("SharedMem_Size",1024,1); //共享内存大小
$SharedMemID = @shmop_open(SharedMem_Key,"c",0666,SharedMem_Size);
$sharemen_sign = 0;
//将指定变量存入共享内存
if(shmop_write($SharedMemID,$str,$offset))
$sharemen_sign++;
if($sharemen_sign == 1){
return(1);
}else{
return(-1);
}
}
/*********************************************************/
$ppsDb='PPS_DB';
$tableName='recover';
$strPageTitle=$strTitleAdvanced.$strTitleSpace."PPS".$strTitleSpace.$strCurrentTariff.$strTitleSpace.$strMultiServices;
if($start){
$delSql = "DELETE FROM $tableName";
mysqli_query($pubConn,$delSql);
$editSql = " INSERT into $tableName set start_time='$startTime',end_time='$endTime',digital_6='$digital_6',digital_8='$digital_8',cc='$cc',ndc='$ndc',ip_address='$ip_address';";
mysqli_query($pubConn,$editSql);
echo mysqli_error($pubConn);
pps_set_shm(0,'1');
$command_status=pps_get_shm(0,1);
$command_status=pps_get_shm(0,1);
$remark = pps_get_shm(1,40);
/*
if($command_status == '1')
{
if($start%4==0)
$remark = "........";
else if($start%4==1)
$remark = "......";
else if($start%4==2)
$remark = "....";
else if($start%4==3)
$remark = "..";
}
*/
if($command_status == '3' || $command_status=='4'){
pps_set_shm(0,'0');
pps_set_shm(1,0);
$start = 0;
}
$start++;
}
$sql="SELECT * FROM $tableName";
//if(!$start)
{
$result=mysqli_query($pubConn,$sql);
$rows=mysqli_fetch_array($result);
echo mysqli_error($pubConn);
}
?>
<body>
<?php
echo "Recover PPS account balance for system abnormal shutdown";
echo "<p></p>";
/*
//没有纪录时,显示无记录提示
if(!$rows){
echo "$strNotFindRecord";
exit();
}
*/
?>
<form name="editform" action="/wxc2_omc/account/ppsRecover/recoverIndex.php?id=1&mode=edit" method="POST">
<table border="1" width="500" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<?php
echo "<tr bgcolor=\"#E6E6E6\">";
echo "<td width=\"34%\">Item</td>";
echo "<td align =\"left\" width=\"33%\">Value</td>";
echo "<td align =\"left\" width=\"33%\">Example</td>";
echo "</tr>";
$arr_editfieldAmount = array("Start time","End time","First 6 digits of 12-digit recharge card","First 8 digits of 16-digit recharge card","Country code","Natinal destination code","IP address","Progress");
$arr_remark = array("2003-06-30","2003-06-30 10:25:30","229000","22900001","86","755","172.18.98.1");
$startTime = $rows[start_time];
$endTime = $rows[end_time];
$digital_6 = $rows[digital_6];
$digital_8 = $rows[digital_8];
$cc = $rows[cc];
$ndc = $rows[ndc];
$ip_address = $rows[ip_address];
{
echo "<tr>";
echo "<td align=\"left\">$arr_editfieldAmount[0]</td>";
echo "<td align=\"right\">";
echo "<input type=\"input\" name=\"startTime\" value=\"$startTime\">";
echo "<td align=\"left\">$arr_remark[0]</td>";
echo "</tr>";
}
{
echo "<tr>";
echo "<td align=\"left\">$arr_editfieldAmount[1]</td>";
echo "<td align=\"right\">";
echo "<input type=\"input\" name=\"endTime\" value=\"$endTime\">";
echo "<td align=\"left\">$arr_remark[1]</td>";
echo "</tr>";
}
{
echo "<tr>";
echo "<td align=\"left\">$arr_editfieldAmount[2]</td>";
echo "<td align=\"right\">";
echo "<input type=\"input\" name=\"digital_6\" value=\"$digital_6\">";
echo "<td align=\"left\">$arr_remark[2]</td>";
echo "</tr>";
}
{
echo "<tr>";
echo "<td align=\"left\">$arr_editfieldAmount[3]</td>";
echo "<td align=\"right\">";
echo "<input type=\"input\" name=\"digital_8\" value=\"$digital_8\">";
echo "<td align=\"left\">$arr_remark[3]</td>";
echo "</tr>";
}
{
echo "<tr>";
echo "<td align=\"left\">$arr_editfieldAmount[4]</td>";
echo "<td align=\"right\">";
echo "<input type=\"input\" name=\"cc\" value=\"$cc\">";
echo "<td align=\"left\">$arr_remark[4]</td>";
echo "</tr>";
}
{
echo "<tr>";
echo "<td align=\"left\">$arr_editfieldAmount[5]</td>";
echo "<td align=\"right\">";
echo "<input type=\"input\" name=\"ndc\" value=\"$ndc\">";
echo "<td align=\"left\">$arr_remark[5]</td>";
echo "</tr>";
}
{
echo "<tr>";
echo "<td align=\"left\">$arr_editfieldAmount[6]</td>";
echo "<td align=\"right\">";
echo "<input type=\"input\" name=\"ip_address\" value=\"$ip_address\">";
echo "<td align=\"left\">$arr_remark[6]</td>";
echo "</tr>";
}
{
$progress++;
echo "<tr>";
echo "<td align=\"left\">$arr_editfieldAmount[7]</td>";
echo "<td colspan=\"2\" align=\"left\">";
echo "$remark&nbsp";
echo "</td>";
echo "</tr>";
}
/*
<meta http-equiv="refresh" content="4 url=./recoverIndex.php?start=<?php echo start;?>">
*/
?>
</table><br>
<input type="submit" name="start" value="Recover" style="width:60" class="button">&nbsp;
</form>
</body>
<b>Remarks:</b><br><br>
This facility is used to recover PPS account balance of abnormal shutdown time. The PPS saves memory data to harddisk at 4:00 am every day. When abnormal shutdown occurs, the PPS account balance data of the current day will be lost without being saved in harddisk. This facility helps recover the account balance by debiting all PPS account according to the CDR of the current day. <br>
<b><i>Start time:</b></i> The date when abnormal shutdown occurs.<br>
<b><i>End time:</b></i> The time at which abnormal shutdown occurs.<br>
<b><i>IP address:</b></i> IP address of either PPS 0 (172.18.98.1) or PPS 1 (172.18.99.1). <br>
To recover PPS account balance, fill in the above forms, click on Recover button and run a script cdrRestore under the path /usr/local/omc/tools/ in the OMC.
</html>
+208
View File
@@ -0,0 +1,208 @@
<?php
/*********************************************************
文件说明:
功能说明:修改基本费率
调用关系:调用:header.inc
被调用:实现各个功能模块的页面
变量说明:
作者:
NO.1
姓名:
时间:
修改说明:
/*********************************************************/
require("../../inc/header.inc");
/*********************************************************/
function pps_get_shm($offset,$count)
{
// define("Semaphore_Key",440,1);
define("SharedMem_Key",0x61230000,1);
define("SharedMem_Size",1024,1); //共享内存大小
$SharedMemID = @shmop_open(SharedMem_Key,"c",0666,SharedMem_Size);
//将指定共享内存存入变量
$Read_str= shmop_read($SharedMemID,$offset,$count);
return($Read_str);
}
function pps_set_shm($offset,$str)
{
define("SharedMem_Key",0x61230000,1);
define("SharedMem_Size",1024,1); //共享内存大小
$SharedMemID = @shmop_open(SharedMem_Key,"c",0666,SharedMem_Size);
$sharemen_sign = 0;
//将指定变量存入共享内存
if(shmop_write($SharedMemID,$str,$offset))
$sharemen_sign++;
if($sharemen_sign == 1){
return(1);
}else{
return(-1);
}
}
/*********************************************************/
$ppsDb='PPS_DB';
$tableName='recover';
$strPageTitle=$strTitleAdvanced.$strTitleSpace."PPS".$strTitleSpace.$strCurrentTariff.$strTitleSpace.$strMultiServices;
if($start){
$delSql = "DELETE FROM $tableName";
mysqli_query($pubConn,$delSql);
$editSql = " INSERT into $tableName set start_time='$startTime',end_time='$endTime',digital_6='$digital_6',digital_8='$digital_8',cc='$cc',ndc='$ndc',ip_address='$ip_address';";
mysqli_query($pubConn,$editSql);
echo mysqli_error($pubConn);
pps_set_shm(0,'1');
$command_status=pps_get_shm(0,1);
$command_status=pps_get_shm(0,1);
$remark = pps_get_shm(1,40);
/*
if($command_status == '1')
{
if($start%4==0)
$remark = "........";
else if($start%4==1)
$remark = "......";
else if($start%4==2)
$remark = "....";
else if($start%4==3)
$remark = "..";
}
*/
if($command_status == '3' || $command_status=='4'){
pps_set_shm(0,'0');
pps_set_shm(1,0);
$start = 0;
}
$start++;
}
$sql="SELECT * FROM $tableName";
//if(!$start)
{
$result=mysqli_query($pubConn,$sql);
$rows=mysqli_fetch_array($result);
echo mysqli_error($pubConn);
}
?>
<body>
<?php
echo "Recover PPS account balance for system abnormal shutdown";
echo "<p></p>";
/*
//没有纪录时,显示无记录提示
if(!$rows){
echo "$strNotFindRecord";
exit();
}
*/
?>
<form name="editform" action="/wxc2_omc/account/ppsRecover/recoverIndex.php?id=1&mode=edit" method="POST">
<table border="1" width="500" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<?php
echo "<tr bgcolor=\"#E6E6E6\">";
echo "<td width=\"34%\">Item</td>";
echo "<td align =\"left\" width=\"33%\">Value</td>";
echo "<td align =\"left\" width=\"33%\">Example</td>";
echo "</tr>";
$arr_editfieldAmount = array("Start time","End time","First 6 digits of 12-digit recharge card","First 8 digits of 16-digit recharge card","Country code","Natinal destination code","IP address","Progress");
$arr_remark = array("2003-06-30","2003-06-30 10:25:30","229000","22900001","86","755","172.18.98.1");
$startTime = $rows[start_time];
$endTime = $rows[end_time];
$digital_6 = $rows[digital_6];
$digital_8 = $rows[digital_8];
$cc = $rows[cc];
$ndc = $rows[ndc];
$ip_address = $rows[ip_address];
{
echo "<tr>";
echo "<td align=\"left\">$arr_editfieldAmount[0]</td>";
echo "<td align=\"right\">";
echo "<input type=\"input\" name=\"startTime\" value=\"$startTime\">";
echo "<td align=\"left\">$arr_remark[0]</td>";
echo "</tr>";
}
{
echo "<tr>";
echo "<td align=\"left\">$arr_editfieldAmount[1]</td>";
echo "<td align=\"right\">";
echo "<input type=\"input\" name=\"endTime\" value=\"$endTime\">";
echo "<td align=\"left\">$arr_remark[1]</td>";
echo "</tr>";
}
{
echo "<tr>";
echo "<td align=\"left\">$arr_editfieldAmount[2]</td>";
echo "<td align=\"right\">";
echo "<input type=\"input\" name=\"digital_6\" value=\"$digital_6\">";
echo "<td align=\"left\">$arr_remark[2]</td>";
echo "</tr>";
}
{
echo "<tr>";
echo "<td align=\"left\">$arr_editfieldAmount[3]</td>";
echo "<td align=\"right\">";
echo "<input type=\"input\" name=\"digital_8\" value=\"$digital_8\">";
echo "<td align=\"left\">$arr_remark[3]</td>";
echo "</tr>";
}
{
echo "<tr>";
echo "<td align=\"left\">$arr_editfieldAmount[4]</td>";
echo "<td align=\"right\">";
echo "<input type=\"input\" name=\"cc\" value=\"$cc\">";
echo "<td align=\"left\">$arr_remark[4]</td>";
echo "</tr>";
}
{
echo "<tr>";
echo "<td align=\"left\">$arr_editfieldAmount[5]</td>";
echo "<td align=\"right\">";
echo "<input type=\"input\" name=\"ndc\" value=\"$ndc\">";
echo "<td align=\"left\">$arr_remark[5]</td>";
echo "</tr>";
}
{
echo "<tr>";
echo "<td align=\"left\">$arr_editfieldAmount[6]</td>";
echo "<td align=\"right\">";
echo "<input type=\"input\" name=\"ip_address\" value=\"$ip_address\">";
echo "<td align=\"left\">$arr_remark[6]</td>";
echo "</tr>";
}
{
$progress++;
echo "<tr>";
echo "<td align=\"left\">$arr_editfieldAmount[7]</td>";
echo "<td colspan=\"2\" align=\"left\">";
echo "$remark&nbsp";
echo "</td>";
echo "</tr>";
}
/*
<meta http-equiv="refresh" content="4 url=./recoverIndex.php?start=<?php echo start;?>">
*/
?>
</table><br>
<input type="submit" name="start" value="Recover" style="width:60" class="button">&nbsp;
</form>
</body>
<b>Remarks:</b><br><br>
This facility is used to recover PPS account balance of abnormal shutdown time. The PPS saves memory data to harddisk at 4:00 am every day. When abnormal shutdown occurs, the PPS account balance data of the current day will be lost without being saved in harddisk. This facility helps recover the account balance by debiting all PPS account according to the CDR of the current day. <br>
<b><i>Start time:</b></i> The date when abnormal shutdown occurs.<br>
<b><i>End time:</b></i> The time at which abnormal shutdown occurs.<br>
<b><i>IP address:</b></i> IP address of either PPS 0 (172.18.98.1) or PPS 1 (172.18.99.1). <br>
To recover PPS account balance, fill in the above forms, click on Recover button and run a script cdrRestore under the path /usr/local/omc/tools/ in the OMC.
</html>
+168
View File
@@ -0,0 +1,168 @@
<?php
/*********************************************************
文件说明:
功能说明:
调用关系:调用:header.inc
被调用:实现各个功能模块的页面
变量说明:
作者:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$db=$refresh_card_db;
$table_name='card_param';
?>
<script language="javascript">
function select_type(){
var url,base,id,add_1,tariff_type,add_2,charge_date,add_3,charge_period,add_4,periodic_amount,add_5,foredit,add_6;
base="<?php echo $PHP_SELF; ?>?";
id=document.selectform.id.value;
add_1="id="+id;
tariff_type=document.selectform.tariff_type.value;
add_2="&tariff_type="+tariff_type;
charge_date=document.selectform.charge_date.value;
add_3="&charge_date="+charge_date;
charge_period="&charge_period="+charge_period;
periodic_amount=document.selectform.periodic_amount.value;
add_5="&periodic_amount="+periodic_amount;
foredit=document.selectform.foredit.value;
add_6="&foredit="+foredit
url=base+add_1+add_2+add_3+add_4+add_5+add_6;
window.location=url;
}
</script>
<?php
if($edit)
{
$delSql = " DELETE FROM $table_name ";
$delRes = mysqli_query($pubConn,$delSql);
$insertSql = " Insert INTO $table_name VALUES('$faceTypes','$faceValue1','$faceValue2','$faceValue3','$faceValue4','$chageToMinConto')
";
//echo "<br>insertSql=$insertSql";
$insertRes=mysqli_query($pubConn,$insertSql);
if($insertRes){
echo "<br><font color=\"#0000FF\">Edit success</font>";
$log_name = "Edit Succss".$user_info["account"];
insertLog("$log_name");
}
else{
echo "<br><font color=\"#FF0000\">Edit Failure</font>";
$log_name = "Edit Failure".$user_info["account"];
insertLog("$log_name");
}
}
$sql = " SELECT *
FROM $table_name
";
//echo "<br>sql=$sql";
$res = mysqli_query($pubConn,$sql);
$row = mysqli_fetch_array($res);
?>
<body>
<form name="selectform" action=<?php echo "$PHP_SELF?id=$id&debit_date=$debit_date&periodic_amount=$periodic_amount";?> method="POST">
<table border="1" width="400" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFA4">
<tr>
<td vAlign="middle" width="40%" bgcolor="#FFFFFF">
<?php echo "Face value types"; ?>
</td>
<td width="60%" valign="middle" bgcolor="#FFFFFF">
<select name="faceTypes">
<?php
for($i=1;$i<5;$i++)
{
if($row[faceTypes] == $i)
{
echo "<option value=\"$i\" selected>$i</option>";
}
else
{
echo "<option value=\"$i\">$i</option>";
}
}
?>
</select>
</td>
</tr>
<tr>
<td vAlign="middle" width="40%" bgcolor="#FFFFFF">
<?php echo "Face value 1"; ?>
</td>
<td width="60%" valign="middle" bgcolor="#FFFFFF">
<input type="input" name="faceValue1" value="<?php echo "$row[faceValue1]"; ?>" maxlength="5" size="5">
</td>
</tr>
<tr>
<td vAlign="middle" width="40%" bgcolor="#FFFFFF">
<?php echo "Face value 2"; ?>
</td>
<td width="60%" valign="middle" bgcolor="#FFFFFF">
<input type="input" name="faceValue2" value="<?php echo "$row[faceValue2]"; ?>" maxlength="5" size="5">
</td>
</tr>
<tr>
<td vAlign="middle" width="40%" bgcolor="#FFFFFF">
<?php echo "Face value 3"; ?>
</td>
<td width="60%" valign="middle" bgcolor="#FFFFFF">
<input type="input" name="faceValue3" value="<?php echo "$row[faceValue3]"; ?>" maxlength="5" size="5">
</td>
</tr>
<tr>
<td vAlign="middle" width="40%" bgcolor="#FFFFFF">
<?php echo "Face value 4"; ?>
</td>
<td width="60%" valign="middle" bgcolor="#FFFFFF">
<input type="input" name="faceValue4" value="<?php echo "$row[faceValue4]"; ?>" maxlength="5" size="5">
</td>
</tr>
<tr>
<td vAlign="middle" width="40%" bgcolor="#FFFFFF">
<?php echo "Decimal places"; ?>
</td>
<td width="60%" valign="middle" bgcolor="#FFFFFF">
<select name="chageToMinConto">
<?php
if($row[chageToMinConto] == 0.01)
{
echo "<option value=\"0.01\" selected>0.01</option>";
}
else
{
echo "<option value=\"0.01\">0.01</option>";
}
if($row[chageToMinConto] == 0.1)
{
echo "<option value=\"0.1\" selected>0.1</option>";
}
else
{
echo "<option value=\"0.1\">0.1</option>";
}
if($row[chageToMinConto] == 1)
{
echo "<option value=\"1\" selected>1</option>";
}
else
{
echo "<option value=\"1\">1</option>";
}
?>
</select>
</td>
</tr>
</table>
<input type="submit" name="edit" value="<?php echo "$strEdit"; ?>" tabindex="1">&nbsp;&nbsp;
<input type="submit" name="reset" value="reset" tabindex="1">&nbsp;&nbsp;
</form>
</body>
</html>
+100
View File
@@ -0,0 +1,100 @@
<?php
/*********************************************************
文件说明:
功能说明:prepaid parameter configuration
调用关系:
变量说明:
作者:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$DEBUG=1;
//=====================================
//变量定义
//=====================================
$db='OMC_PUB';
$tableName='omcPubVarConf';
$editVarArr=array('pssCardMinCount');
function getPubVar($pubVarName)
{
$db='OMC_PUB';
$tableName='omcPubVarConf';
$sql = " SELECT pubVarValue,remark
FROM $tableName
WHERE pubVarName='$pubVarName'
";
//echo "<br>sql=$sql";
$res = @mysqli_query($pubConn,$sql);
if(mysqli_num_rows($res) > 0){
$row = @mysqli_fetch_array($res);
//$varInfoArr=array(name,value,remark);
$varInfoArr[name]=$pubVarName;
$varInfoArr[value]=$row[pubVarValue];
$varInfoArr[remark]=$row[remark];
return($varInfoArr);
}else{
return(-1);
}
}
//=====================================
//输入变量
//=====================================
//保存修改的参数
if(strlen($actMode) > 1){
for($i=0;$i<sizeof($editVarArr);$i++){
$name = $editVarArr[$i];
$value = ${$editVarArr[$i]};
$remark = $name.'_remark';
$remark = ${$remark};
if($DEBUG) echo "<br>=====================";
if($DEBUG) echo "<br>name=$name";
if($DEBUG) echo "<br>value=$value";
if($DEBUG) echo "<br>remark=$remark";
$sql = " UPDATE $tableName SET
pubVarValue='$value',
remark='$remark'
WHERE pubVarName='$name'
";
if($DEBUG) echo "<br>sql=$sql";
$res = @mysqli_query($pubConn,$sql);
}
}
?>
<body>
<form name="listForm" method="POST" action="<?php echo"$PHP_SELF";?>">
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<?php
echo "<tr><td width=\"100%\" colspan=\"12\" align=\"center\" bgcolor=\"#E6E6E6\">";
echo "Public Var Define";
echo "</td></tr>";
for($i=0;$i<sizeof($editVarArr);$i++){
$varInfoArr=getPubVar($editVarArr[$i]);
echo "<tr>";
echo "<td width=\"30%\">&nbsp;{$varInfoArr[name]}</td>";
echo "<td width=\"20%\">&nbsp;";
echo "<input type=text name=\"{$varInfoArr[name]}\" value=\"{$varInfoArr[value]}\" size=8>";
echo "</td>";
echo "<td width=\"50%\">&nbsp;";
echo "<input type=text name=\"{$varInfoArr[name]}_remark\" value=\"{$varInfoArr[remark]}\" size=50></td>";
echo "</tr>";
}
?>
</table>
<br>&nbsp;&nbsp;&nbsp;&nbsp;
<input type="submit" value="Save" name="actMode">
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="submit" value="Delete" name="actMode">
</form>
</body>
</html>
+226
View File
@@ -0,0 +1,226 @@
<?php
/*********************************************************
程序说明:
功能说明:列表显示账号信息,默认显示第一页用户资料
调用关系:调用: header.inc
被调用:
变量说明:
作者:
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
?>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
echo "<br>";
$DEBUG=0;
$helpId="6.4.2";
if($sysTypeNo == 360)
{
$db='PPS_DB';
$table_name="used_card_info"; //查询的表名
}
else
{
$db='RCM_RC_DB';
$table_name="used_card_info"; //查询的表名
}
//$card_num_len 电话号码长度
$cardStatDef=array(
array(value =>'0',remark =>'Not Used'),
array(value =>'1',remark =>'Used')
);
if($DEBUG) echo "sort_field=$sort_field<br>";
if(!$sort_field ){
$sort_field='card_no'; //排序所依赖的字段名
}
if(!$sort_direction){
$sort_direction= 'ASC '; //排序顺序
}
$number_records_to_display = 100; //每页纪录数
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
if ($DEBUG)echo "selKeyFieldName=$selKeyFieldName<br>";
if ($DEBUG)echo "initial_record=$initial_record,number_records_to_display=$number_records_to_display";
if ($selKeyValue <> '')
$where=" where card_status=1 AND $selKeyFieldName like '%$selKeyValue%'";
else
$where=" where card_status=1";
?>
<script LANGUAGE="JavaScript">
function goto(){
var iurl_1,url_2,url_3,url_4,nitial_record;
var gotopage,number_records_to_display,bgn_num,number_of_records,sort_field;
gotopage=document.selectform.gotopage.value;
number_records_to_display=<?php echo $number_records_to_display; ?>;
//bgn_num=document.selectform.bgn_num.value;
initial_record=number_records_to_display*(gotopage-1);
number_of_records=document.selectform.number_of_records.value;
sort_field=document.selectform.sort_field.value;
url_1='<?php echo $PHP_SELF;?>?initial_record='+initial_record;
//url_2="&bgn_num="+bgn_num;
url_3="&number_of_records="+number_of_records;
url_4="&sort_field="+sort_field;
//window.location.href=url_1+url_2+url_3+url_4;
window.location.href=url_1+url_3+url_4;
}
</script>
<?php
if(!isset($number_of_records) || $number_of_records == 0){
$initial_record=0;
$str_sql="SELECT count(*) FROM $table_name $where";
$result = mysqli_query($pubConn,$str_sql);
$record = mysqli_fetch_array($result);
$number_of_records = $record[0];
if(!$number_of_records){
//echo "<br><font size =\"3\" color=\"#000000\">$strNotFindRecord!</font>";
echo "No record.<BR>";
exit();
}
}
if($number_of_records >= 1) {
//下面是控制分页显示,传递变量
$next_index = $initial_record + $number_records_to_display; //本页的结束数目
if ($next_index > $number_of_records){
$next_index = $number_of_records;
}
$t1 = $initial_record + 1;
$prev_index = $initial_record - $number_records_to_display;
if ($prev_index < 0) {
$prev_index = 0;
}
}
$show_initial_record=$initial_record+1;
$sql = "SELECT * FROM $table_name $where ORDER BY $sort_field
LIMIT $initial_record,$number_records_to_display";
if($DEBUG)echo "<br>sql=$sql<br>";
$result = mysqli_query($pubConn,$sql);
echo mysqli_error($pubConn);
?>
<form name="selectform">
<TABLE border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
<TR >
<TD><?php echo"$strDisplayRecords<FONT color=#0000ff>&nbsp;$show_initial_record - $next_index</FONT>, ($strTotal:<font color=#0000FF>$number_of_records</font>)";?></TD>
<TD align="center">&nbsp;
<?php
// NEW: Display a link for the previous set of records.
if ($initial_record != 0) {
$t1 = "initial_record=$prev_index&number_of_records=$number_of_records&sort_field=$sort_field";
$t2 = "bgn_num=$bgn_num&end_num=$end_num";
echo "<a href=\"$PHP_SELF?$t1&$t2\">";
echo "<IMG alt=\"$strPreviousPage\" border=\"0\" src=\"../../images/prePage.gif\" ></a>&nbsp;";
}
// NEW: Display a link for the next set of records.
if ($next_index != $number_of_records && $number_of_records >0) {
$t1 = "initial_record=$next_index&number_of_records=$number_of_records&sort_field=$sort_field";
$t2 = "bgn_num=$bgn_num&end_num=$end_num";
echo "<a href=\"$PHP_SELF?$t1&$t2\">";
echo "<IMG alt=\" $strNextPage \" border=\"0\" src=\"../../images/nextPage.gif\" ></a>&nbsp;";
}
if($DEBUG) echo "number_of_records=$number_of_records";
if($number_of_records > 0){
$this_page = $initial_record / $number_records_to_display + 1;
$all_page = ceil($number_of_records / $number_records_to_display );
/* $all_page = round($number_of_records / $number_records_to_display );
if($number_of_records % $number_records_to_display > 0){
$all_page = $all_page + 1;
}
*/
}
if($DEBUG) echo "<br>all_page=$all_page";
?>
</TD>
<TD align="center"><?php echo "$strToPage";?>
<SELECT size="1" name="gotopage" onChange="javasript:goto()">
<?php
for($i=1;$i<=$all_page;$i++){
if($i== $this_page){
echo "<option selected value=\"$i\" >$i</option>";
}else{
echo "<option value=\"$i\">$i</option>";
}
}
?>
</SELECT>
</TD>
</TR>
</TABLE>
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
<tr bgcolor="#E6E6E6">
<td align="center"><?php echo "<a href=\"$PHP_SELF?sort_field=card_no&bgn_num=$bgn_num\">Card no.</a>"; ?></td>
<td align="center"><?php echo "<a href=\"$PHP_SELF?sort_field=card_status&bgn_num=$bgn_num\">Status</a>"; ?></td>
<td align="center"><?php echo "<a href=\"$PHP_SELF?sort_field=face_value&bgn_num=$bgn_num\">Face value</a>"; ?></td>
<td align="center"><?php echo "<a href=\"$PHP_SELF?sort_field=expiry_date&bgn_num=$bgn_num\"> Expriation date</a>"; ?></td>
<td align="center"><?php echo "<a href=\"$PHP_SELF?sort_field=updated_date &bgn_num=$bgn_num\">Updated time</a>"; ?></td>
<td align="center"><?php echo "<a href=\"$PHP_SELF?sort_field=msisdn_used&bgn_num=$bgn_num\">Recharged number</a>"; ?></td>
</tr>
<?php
while($rows = mysqli_fetch_array($result)){
echo"<tr>";
echo "<td align=\"center\">$rows[card_no]</td>";
echo "<td align=\"center\">";
for($i=0;$i < sizeof($cardStatDef);$i++){
if($rows[card_status] == $cardStatDef[$i][value]){
echo "{$cardStatDef[$i][remark]}";
break;
}
}
echo "</td>";
$rows[face_value]=$rows[face_value];//$moneyPara;
echo "<td align=\"center\">$rows[face_value]</td>";
//$year =substr($rows[expiry_date],0,4);
//$mon =substr($rows[expiry_date],4,2);
//$day =substr($rows[expiry_date],6,2);
//$expiry_date=$year."-".$mon."-".$day;
echo "<td align=\"center\">$rows[expiry_date]</td>";
//$year =substr($rows[updated_date],0,4);
//$mon =substr($rows[updated_date],4,2);
//$day =substr($rows[updated_date],6,2);
//$updated_date=$year."-".$mon."-".$day;
echo "<td align=\"center\">$rows[updated_date]</td>";
if(!$rows[msisdn_used]){
$msisden_used = '----';
}else{
$msisden_used = $rows[msisdn_used];
}
echo "<td align=\"center\">$msisden_used</td>";
}
echo "<input type=\"hidden\" name=\"number_of_records\" value=\"$number_of_records\">";
echo "<input type=\"hidden\" name=\"sort_field\" value=\"$sort_field\">";
echo "<input type=\"hidden\" name=\"sysTypeNo\" value=\"$sysTypeNo\">";
?>
</table>
<?php
adjust_content_tail("down");
?>
</form>
</body>
+19
View File
@@ -0,0 +1,19 @@
<?php
require("../../inc/header.inc");
?>
<frameset rows="75,*" framespacing="0" border="0" frameborder="0">
<?php
echo "<frame name=\"header\" scrolling=\"auto\" noresize target=\"main\" src=\"usedCardListUp.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo\" marginwidth=\"0\" marginheight=\"0\">";
echo "<frame name=\"main\" src=\"usedCardListDown.php?sysTypeNo=$sysTypeNo&selKeyValue=$selKeyValue\" scrolling=\"auto\"target=\"_self\" marginwidth=\"0\" marginheight=\"0\">";
?>
<noframes>
<body>
<p>此网页使用了框架,但您的浏览器不支持框架。</p>
</body>
</noframes>
</frameset>
</html>
+86
View File
@@ -0,0 +1,86 @@
<?php
/*********************************************************
程序说明:
功能说明:列表显示充值卡信息
调用关系:调用: header.inc
被调用:
变量说明:
作者:
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$DEBUG=0;
$helpId="4.7";
if($sysTypeNo == 360)
{
$db='PPS_DB';
$table_name="used_card_info"; //查询的表名
}
else
{
$db='RCM_RC_DB';
$table_name="used_card_info"; //查询的表名
}
?>
<base target="main">
<body topmargin=16 leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('up');" onresize="javascript:adjust_frame('up');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<form name="selectform" action="./usedCardListDown.php">
<?php
adjust_head_frame("up");
adjust_title_head_frame("up");
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\" align=\"left\">";
echo "Log > Used recharge card";
echo "</td>";
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=\"left\">";
echo "<select size=\"1\" name=\"selKeyFieldName\" >";
echo "<option value=\"card_no\" selected>Card no.</option>";
echo "<option value=\"msisdn_used\">Recharged number</option>";
echo "</select>";
?>
<input type="text" name="selKeyValue" size="20" onBlur="this.value=ignoreSpaces(this.value);" size="20" style="font-family: Verdana; font-size: 8pt">&nbsp;&nbsp;
</nobr>
<span onClick="javascript:document.selectform.submit();" style="cursor:hand">
<IMG align=absBottom border=0 src="../../images/search.gif" >&nbsp;<?php echo "$strSearch"; ?>
</span>
<input type="hidden" name="bgn_num" value="<?php echo $bgn_num; ?>">
<input type="hidden" name="number_of_records" value="<?php echo $number_of_records; ?>">
<input type="hidden" name="sort_field" value="<?php echo $sort_field; ?>">
<input type="hidden" name="sysTypeNo" value="<?php echo $sysTypeNo; ?>">
<?php
echo "</td>";
echo "<td align=\"right\">&nbsp;";
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail_frame("up");
adjust_content_head_frame("up");
adjust_content_tail_frame("up");
?>
</form>
</body>
</html>
+466
View File
@@ -0,0 +1,466 @@
<?php
/*********************************************************
程序说明:
功能说明:auc用户数据维护专用页面
1、将用户数据表的数据导入到临时参数表。
2、修改的用户数据保存到临时参数表中,
3、设置用户参数时,返回值将修改用户表和临时表。
调用关系:调用: header.inc
变量说明:
输入变量:
$keyValue :由用户列表传来
$sysId :由用户列表传来或本页面指定
$dataTypeNo :数据类型,0=用户数据,1=冲值卡数据
$language :语言种类
$canSetNum :每次最多可以修改的字段个数
作者:
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$DEBUG = 0;
if($DEBUG) echo "<br>正在调试中,给您的工作带来不便,请原谅!!:)";
//==========================================================
//变量定义
//==========================================================
$canwrite_flag=checkWritePrivilege();
$pubDb = 'OMC_PUB';
$sysSubsConfTable ='OMC_PUB.sysSubsConf';
$systemConfTable = 'OMC_PUB.sysConf';
$nReadComm = 1;
$nChangeComm = 2;
$nCreateComm = 3;
$nDeleteComm = 4;
$nLoadIndexComm = 5;
$maxLevelNum = 10;
$nInteger = 2;
$nAscStr = 3;
$nHexStr = 4;
//select sum(balance) from user_info
//==========================================================
//输入变量
//==========================================================
$canSetNum=$_REQUEST['canSetNum'];
$keyValue=$_REQUEST['keyValue'];
$subSysNo=$_REQUEST['subSysNo'];
$dataTypeNo=$_REQUEST['dataTypeNo'];
$canSetNum = isset($canSetNum)?$canSetNum:'all';
if ($_REQUEST['sysId'])
{
$sysId = $_REQUEST['sysId'];
if($DEBUG) echo "<br>sysId=$sysId";
$sysIdArr=explode('_',$sysId);
$sysTypeNo=$sysIdArr[0];
$sysNo=$sysIdArr[1];
// echo "sysTypeNo=$sysTypeNo,sysNo=$sysNo";
}
$canSetNum = isset($canSetNum)?$canSetNum:'all';
//显示用户数据编辑页面,需要的变量
if($DEBUG) echo "<br>sysId=$sysId";
if($DEBUG) echo "<br>canSetNum=$canSetNum";
if($DEBUG) echo "<br>keyValue=$keyValue";
if($DEBUG) echo "<br>sysTypeNo=$sysTypeNo";
if($DEBUG) echo "<br>sysNo=$sysNo";
if($DEBUG) echo "<br>subSysNo=$subSysNo";
if($DEBUG) echo "<br>dataTypeNo=$dataTypeNo";
//例如:
//$canSetNum =1; // 或= 'all'
//$sysId='330_0_0';
//$keyValue= '0460022157127016';
//操作类型变量
$isLoadIndex=$_REQUEST['isLoadIndex'];
$isTryCreate=$_REQUEST['isTryCreate'];
$isBatchCreate=$_REQUEST['isBatchCreate'];
$isCreate=$_REQUEST['isCreate'];
$isDelete=$_REQUEST['isDelete'];
$isChange=$_REQUEST['isChange'];
$isRead=$_REQUEST['isRead'];
if($DEBUG) echo "<br>isRead=$isRead";
if($DEBUG) echo "<br>isChange=$isChange";
if($DEBUG) echo "<br>isCreate=$isCreate";
if($DEBUG) echo "<br>isDelete=$isDelete";
if($DEBUG) echo "<br>isLoadIndex=$isLoadIndex";
//保存用户数据修改的数据
$bgnNo=$_POST['bgnNo'];
$endNo=$_POST['endNo'];
if($DEBUG) echo "<br>bgnNo=$bgnNo";
if($DEBUG) echo "<br>endNo=$endNo";
//---------定义需要编辑保存的字段-------
//$showAttrDef=array(array('fieldName'=>'','inputName'=>'');
$showAttrDef=array(
array('fieldName'=>'key_imsi', 'inputName'=>'key_imsi'),
array('fieldName'=>'a3a8_version', 'inputName'=>'a3a8Version'),
array('fieldName'=>'status', 'inputName'=>'status')
);
//For operation log use
{
for($i=0;$i<256;$i++)
{
$key=strtoupper(dechex($i));
if($i < 16)
$key="0".$key;
$a3a8_version_def[$key]="$i";
}
$status_def=array(
"00"=>"Inactive","0"=>"Active",
"01"=>"Inactive","1"=>"Active"
);
}
$logFieldDef=array(
'a3a8_version',
'status',
);
if($_SERVER['REQUEST_METHOD'] == "POST"){
//system("echo '-------------------------------------'>>/tmp/test.txt");
$preValueInfo="Change $pre_keyvalue ";
$isChangeFlag=0;
for($i=0;$i<sizeof($logFieldDef);$i++){
$inputName =$logFieldDef[$i];
$inputValue =${$inputName};
$ppName=$inputName."_ppvalue";
$ddName=$inputName."_ddef";
$cdName=$inputName."_cdef";
$nnName=$inputName."_name";
if(strlen($inputValue)){
//system("echo '{$$ddName} ,$inputName = $inputValue' >> /tmp/test.txt");
if(isset($$ddName))
{
$tmpv=$$ppName;
$val1=${$$ddName}[$tmpv];
$val2=${$$ddName}[$inputValue];
if(strlen($$ppName) == 0)
$val1="NoValue";
//system("echo 'val1=$val1,val2=$val2,tmpv=$tmpv' >>/tmp/test.txt");
if(strcasecmp($val1,$val2) != 0)
{
$isChangeFlag=1;
$preValueInfo.="[{$$nnName},{$val1}->{$val2}]";
//system("echo 'c[{$$nnName},{$val1}->{$val2}]' >>/tmp/test.txt");
}
}
else if(isset($$cdName))
{
$newValue="";
for($iii=0;$iii<sizeof(${$$cdName});$iii++)
{
$chkname=${$$cdName}[$iii][0];
if($$chkname == '1')
$newValue.=${$$cdName}[$iii][2].",";
}
$newValue=substr($newValue,0,strlen($newValue)-1);
if(strcasecmp($$ppName,$newValue) != 0)
{
$isChangeFlag=1;
$preValueInfo.="[{$$nnName},({$$ppName})->({$newValue})]";
//system("echo 'a[{$$nnName},({$$ppName})->({$newValue})]' >>/tmp/test.txt");
}
}
else
{
if(strlen($$ppName) == 0)
$$ppName="NoValue";
if(strcasecmp($$ppName,$inputValue) != 0)
{
$isChangeFlag=1;
$preValueInfo.="[{$$nnName},{$$ppName}->$inputValue]";
//system("echo 'b[{$$nnName},{$$ppName}->$inputValue]'>>/tmp/test.txt");
}
}
}else{
//echo "<br>Can not find $inputName's value";
}
}
if($isChangeFlag==1)
{
$preValueInfo.=" in {$log_sysTypeName}_{$log_sysNo}_{$log_subSysNo}";
insertLog($preValueInfo);
}
}
//处理各个的输入单元的值,组成各个需要编辑的字段值
if($_SERVER['REQUEST_METHOD'] == "POST"){
//格式化每个需要保存的字段,以便数据处理模块处理
$bgnNo=0;
$endNo=0;
for($i=$bgnNo;$i<sizeof($showAttrDef);$i++){
if($oldFieldName == $showAttrDef[$i][fieldName]){
continue;
}
$oldFieldName = $showAttrDef[$i][fieldName];
${'checkBox_'.$endNo} =1;
${'fieldName_'.$endNo}=$oldFieldName;
${'editValue_'.$endNo}=${$oldFieldName};
if($DEBUG) echo "<br>checkBox_$endNo = ${'checkBox_'.$endNo}";
if($DEBUG) echo "<br>fieldName_$endNo = ${'fieldName_'.$endNo}";
if($DEBUG) echo "<br>editValue_$endNo = ${'editValue_'.$endNo}";
$endNo++;
}
}
//==========================================================
//数据处理
//==========================================================
if (1 == $isLoadIndex) {
$fieldNameList = "key_imsi,a3a8_version,status";
} else {
$fieldNameList = "ALL";
}
if ($DEBUG) echo "fieldNameList=$fieldNameList<br>";
?>
<base target="_self">
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
require("../pubSubsMng/sendComm.inc");
require("../pubSubsMng/dataProc.inc");
//==========================================================
//输出并显示数据
//==========================================================
$seqNo=0;
?>
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
echo "<br>";
//**********************************编辑参数时所用javascript*****************************************
?>
<script LANGUAGE="JavaScript">
function selCheckBox(thisCheckBox)
{
if(thisCheckBox.checked == true){
thisCheckBox.value=1;
}else{
thisCheckBox.value=0;
}
}
function askSureToDel(keyName,keyId)
{
var answer = confirm("Are you sure to delete this subscriber( "+keyName+"="
+ keyId + ") from <?php echo"$sysTypeName";?> server?");
if (answer == true){
window.location.href = "<?php echo "$PHP_SELF?sysId=$sysId&dataTypeNo=$dataTypeNo&bufferNo=$bufferNo&keyValue=$keyValue&isDelete=1";?>";
//alert('Try to send delete command');
}else{
return(false);
}
}
</script>
<form method="POST" name="update" action="<?php echo"$PHP_SELF";?>" >
<?php
//显示用户参数编辑页面
?>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><nobr>
<?php echo "Server Id:"?>
<select name="sysId" size="1">
<?php
$selSysIdSql="SELECT sysNo,subSysNo,sysTypeName
FROM sysInfo,sysConf
WHERE sysInfo.sysTypeNo='$sysTypeNo' AND sysConf.sysTypeNo='$sysTypeNo'
ORDER BY baseStat DESC,updateTime DESC
";
if($DEBUG) echo "<br>$selSysIdSql";
$sysIdResult=mysqli_query($pubConn,$selSysIdSql);
echo mysqli_error($pubConn);
while($sysIdRows=mysqli_fetch_array($sysIdResult)){
echo "<option value=\"$sysTypeNo"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]\"";
if(($sysNo == $sysIdRows[sysNo]) && ($subSysNo == $sysIdRows[subSysNo]))
echo " selected";
echo " >$sysIdRows[sysTypeName]"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]";
echo "</option>";
}
?>
</select>
</nobr>
</td>
<td><nobr>
<?php
$showkeyValue= substr($keyValue,1);
$keyValueName='IMSI';
echo "&nbsp;&nbsp;$keyValueName:$showkeyValue";
?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</nobr></td>
<?php
if($isTryCreate > 0){
?>
<td >
<input type="submit" value="Create in <?php echo "$sysTypeName"?>" name="create" title="" class="button" onClick="javascript:document.update.isCreate.value=1;">
<input type="hidden" value="0" name="isCreate">
<input type="hidden" value="0" name="isChange">
</td>
<td>
&nbsp;&nbsp;&nbsp;
<input type="submit" value="Create in OMC" name="create" title="" class="button" onClick="javascript:document.update.isCreate.value=2;">
</td>
<?php
}else{
?>
<td>
<input type="submit" value="Get" name="read" title="" class="button" onClick="javascript:document.update.isRead.value=1;">
<input type="hidden" value="0" name="isRead">
</td>
<td>
<?php
if($canwrite_flag)
echo "<input type=\"submit\" value=\"Set\" name=\"change\" title=\"\" class=\"button\" onClick=\"javascript:document.update.isChange.value=1;\">";
else
echo "<input type=\"submit\" disabled value=\"Set\" name=\"change\" title=\"\" class=\"button\" onClick=\"javascript:document.update.isChange.value=1;\">";
?>
<input type="hidden" value="0" name="isChange">
<input type="hidden" value="0" name="isCreate">
</td>
<td>
<?php
if($canwrite_flag)
echo "<input type=\"button\" value=\"Delete\" name=\"delete\" title=\"Delete this subscriber\" class=\"button\" onClick=\"askSureToDel('$keyValueName','$keyValue');\">";
else
echo "<input type=\"button\" disabled value=\"Delete\" name=\"delete\" title=\"Delete this subscriber\" class=\"button\" onClick=\"askSureToDel('$keyValueName','$keyValue');\">";
?>
<input type="hidden" value="0" name="isDelete">
</td>
<?php
}
?>
<td width="100%">&nbsp;</td>
</tr>
</table>
<br>
<?php
//将已取出的用户数据显示出来
//$tmpRow[fieldName]
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
<tr bgcolor="#E6E6E6">
<td width="5%"> No.</td>
<td width="25%">Name</td>
<td width="20%">Value</td>
<td width="50%">Description</td>
</tr>
<?php
if($isTryCreate > 0){
//key_imsi
$key_imsi=$tmpRow[key_imsi];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>IMSI</td>";
echo "<td>";
echo "<input type=\"text\" name=\"key_imsi\" maxlength=\"16\" size=\"20\" value=\"$key_imsi\" class=\"text\">";
echo "</td>";
echo "<td>IMSI=MCC+MNC+MSIN</td>";
echo "</tr>";
}else{
echo "<input type=\"hidden\" name=\"key_imsi\" value=\"$keyValue\">";
}
echo "<input type=\"hidden\" name=\"log_sysTypeName\" value=\"$sysTypeName\">";
echo "<input type=\"hidden\" name=\"log_sysNo\" value=\"$sysNo\">";
echo "<input type=\"hidden\" name=\"log_subSysNo\" value=\"$subSysNo\">";
echo "<input type=\"hidden\" name=\"pre_keyvalue\" value=\"{$keyValue}'s\">";
//a3a8_version
$a3a8_version =$tmpRow[a3a8_version];//hex有大小写的区别,故转成dec
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>A3A8 version</td>";
echo "<td>";
echo "<select name=\"a3a8_version\" size=\"1\">";
for($i=0;$i<256;$i++){
$showValue=$i;
$realValue=strtoupper(dechex($i));
$realValue=(strlen($realValue) == 1)?'0'.$realValue:$realValue;
if($realValue == $a3a8_version){
echo "<option value=\"$realValue\" selected>$showValue</option>";
}else{
echo "<option value=\"$realValue\">$showValue</option>";
}
}
echo "</select>";
echo "</td>";
echo "<input type=\"hidden\" name=\"a3a8_version_name\" value=\"A3A8 version\">";
echo "<input type=\"hidden\" name=\"a3a8_version_ppvalue\" value=\"$a3a8_version\">";
echo "<input type=\"hidden\" name=\"a3a8_version_ddef\" value=\"a3a8_version_def\">";
echo "<td>Version of A3/A8 algorithm being used: COMP128-V1, V2 and V3<br>1=version 1, 2=version 2, 3=version 3, 255=pseudo authentication, else (0, 4-254) reserved</td>";
echo "</tr>";
//status
$status=$tmpRow[status];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Service status</td>";
echo "<td>";
if($status > 0){
echo "<input type=\"radio\" name=\"status\" value=\"00\"> Inactive &nbsp;&nbsp;&nbsp;&nbsp;";
echo "<input type=\"radio\" name=\"status\" value=\"01\" checked> Active";
}else{
echo "<input type=\"radio\" name=\"status\" value=\"00\" checked>Inactive &nbsp;&nbsp;&nbsp;&nbsp;";
echo "<input type=\"radio\" name=\"status\" value=\"01\">Active";
}
echo "</td>";
echo "<input type=\"hidden\" name=\"status_name\" value=\"Service status\">";
echo "<input type=\"hidden\" name=\"status_ppvalue\" value=\"$status\">";
echo "<input type=\"hidden\" name=\"status_ddef\" value=\"status_def\">";
echo "<td>Inactive=Waiting for authentication. Active=Authentication is successful</td>";
echo "</tr>";
?>
</table>
<?php
//*****************************************隐藏输入框,用于传递值****************************************
echo "\n<input type=\"hidden\" name=\"dataTypeNo\" value=\"$dataTypeNo\">";
echo "\n<input type=\"hidden\" name=\"keyFieldName\" value=\"$indexFieldName\">";
echo "\n<input type=\"hidden\" name=\"keyValue\" value=\"$keyValue\">";
?>
</form>
&nbsp;
<?php
adjust_content_tail("down");
?>
</body>
</html>
<?php
flush();
?>
+275
View File
@@ -0,0 +1,275 @@
[para]0[Name]IMSI
[sqlName]key_imsi[t]input[unit]IMSI[u]00.0-07.7[u]
[v]keepAsc-low-E
[remark]
IMSI=MCC+MNC+MSIN
MCC=mobile country code, MNC=mobile network code, MSIN=mobile subscriber identity number.
[para]1[Name]A3A8 version
[sqlName]a3a8_version[t]select[unit]A3A8 version[u]00.0-00.7[u]
[v]0[opt]0
[v]1[opt]1
[v]2[opt]2
[v]3[opt]3
[v]4[opt]4
[v]5[opt]5
[v]6[opt]6
[v]7[opt]7
[v]8[opt]8
[v]9[opt]9
[v]10[opt]10
[v]11[opt]11
[v]12[opt]12
[v]13[opt]13
[v]14[opt]14
[v]15[opt]15
[v]16[opt]16
[v]17[opt]17
[v]18[opt]18
[v]19[opt]19
[v]20[opt]20
[v]21[opt]21
[v]22[opt]22
[v]23[opt]23
[v]24[opt]24
[v]25[opt]25
[v]26[opt]26
[v]27[opt]27
[v]28[opt]28
[v]29[opt]29
[v]30[opt]30
[v]31[opt]31
[v]32[opt]32
[v]33[opt]33
[v]34[opt]34
[v]35[opt]35
[v]36[opt]36
[v]37[opt]37
[v]38[opt]38
[v]39[opt]39
[v]40[opt]40
[v]41[opt]41
[v]42[opt]42
[v]43[opt]43
[v]44[opt]44
[v]45[opt]45
[v]46[opt]46
[v]47[opt]47
[v]48[opt]48
[v]49[opt]49
[v]50[opt]50
[v]51[opt]51
[v]52[opt]52
[v]53[opt]53
[v]54[opt]54
[v]55[opt]55
[v]56[opt]56
[v]57[opt]57
[v]58[opt]58
[v]59[opt]59
[v]60[opt]60
[v]61[opt]61
[v]62[opt]62
[v]63[opt]63
[v]64[opt]64
[v]65[opt]65
[v]66[opt]66
[v]67[opt]67
[v]68[opt]68
[v]69[opt]69
[v]70[opt]70
[v]71[opt]71
[v]72[opt]72
[v]73[opt]73
[v]74[opt]74
[v]75[opt]75
[v]76[opt]76
[v]77[opt]77
[v]78[opt]78
[v]79[opt]79
[v]80[opt]80
[v]81[opt]81
[v]82[opt]82
[v]83[opt]83
[v]84[opt]84
[v]85[opt]85
[v]86[opt]86
[v]87[opt]87
[v]88[opt]88
[v]89[opt]89
[v]90[opt]90
[v]91[opt]91
[v]92[opt]92
[v]93[opt]93
[v]94[opt]94
[v]95[opt]95
[v]96[opt]96
[v]97[opt]97
[v]98[opt]98
[v]99[opt]99
[v]100[opt]100
[v]101[opt]101
[v]102[opt]102
[v]103[opt]103
[v]104[opt]104
[v]105[opt]105
[v]106[opt]106
[v]107[opt]107
[v]108[opt]108
[v]109[opt]109
[v]110[opt]110
[v]111[opt]111
[v]112[opt]112
[v]113[opt]113
[v]114[opt]114
[v]115[opt]115
[v]116[opt]116
[v]117[opt]117
[v]118[opt]118
[v]119[opt]119
[v]120[opt]120
[v]121[opt]121
[v]122[opt]122
[v]123[opt]123
[v]124[opt]124
[v]125[opt]125
[v]126[opt]126
[v]127[opt]127
[v]128[opt]128
[v]129[opt]129
[v]130[opt]130
[v]131[opt]131
[v]132[opt]132
[v]133[opt]133
[v]134[opt]134
[v]135[opt]135
[v]136[opt]136
[v]137[opt]137
[v]138[opt]138
[v]139[opt]139
[v]140[opt]140
[v]141[opt]141
[v]142[opt]142
[v]143[opt]143
[v]144[opt]144
[v]145[opt]145
[v]146[opt]146
[v]147[opt]147
[v]148[opt]148
[v]149[opt]149
[v]150[opt]150
[v]151[opt]151
[v]152[opt]152
[v]153[opt]153
[v]154[opt]154
[v]155[opt]155
[v]156[opt]156
[v]157[opt]157
[v]158[opt]158
[v]159[opt]159
[v]160[opt]160
[v]161[opt]161
[v]162[opt]162
[v]163[opt]163
[v]164[opt]164
[v]165[opt]165
[v]166[opt]166
[v]167[opt]167
[v]168[opt]168
[v]169[opt]169
[v]170[opt]170
[v]171[opt]171
[v]172[opt]172
[v]173[opt]173
[v]174[opt]174
[v]175[opt]175
[v]176[opt]176
[v]177[opt]177
[v]178[opt]178
[v]179[opt]179
[v]180[opt]180
[v]181[opt]181
[v]182[opt]182
[v]183[opt]183
[v]184[opt]184
[v]185[opt]185
[v]186[opt]186
[v]187[opt]187
[v]188[opt]188
[v]189[opt]189
[v]190[opt]190
[v]191[opt]191
[v]192[opt]192
[v]193[opt]193
[v]194[opt]194
[v]195[opt]195
[v]196[opt]196
[v]197[opt]197
[v]198[opt]198
[v]199[opt]199
[v]200[opt]200
[v]201[opt]201
[v]202[opt]202
[v]203[opt]203
[v]204[opt]204
[v]205[opt]205
[v]206[opt]206
[v]207[opt]207
[v]208[opt]208
[v]209[opt]209
[v]210[opt]210
[v]211[opt]211
[v]212[opt]212
[v]213[opt]213
[v]214[opt]214
[v]215[opt]215
[v]216[opt]216
[v]217[opt]217
[v]218[opt]218
[v]219[opt]219
[v]220[opt]220
[v]221[opt]221
[v]222[opt]222
[v]223[opt]223
[v]224[opt]224
[v]225[opt]225
[v]226[opt]226
[v]227[opt]227
[v]228[opt]228
[v]229[opt]229
[v]230[opt]230
[v]231[opt]231
[v]232[opt]232
[v]233[opt]233
[v]234[opt]234
[v]235[opt]235
[v]236[opt]236
[v]237[opt]237
[v]238[opt]238
[v]239[opt]239
[v]240[opt]240
[v]241[opt]241
[v]242[opt]242
[v]243[opt]243
[v]244[opt]244
[v]245[opt]245
[v]246[opt]246
[v]247[opt]247
[v]248[opt]248
[v]249[opt]249
[v]250[opt]250
[v]251[opt]251
[v]252[opt]252
[v]253[opt]253
[v]254[opt]254
[v]255[opt]255
[remark]
Version of A3/A8 algorithm being used: COMP128-V1, V2 and V3
1=version 1, 2=version 2, 3=version 3, 255=pseudo authentication, else (0, 4-254) reserved
[para]2[Name]Service status
[sqlName]status[t]radio[unit]Service status[u]00.0-00.7[u]
[v]0[opt]Inactive
[v]1[opt]Active
[remark]
Inactive=Waiting for authentication. Active=Authentication is successful
+426
View File
@@ -0,0 +1,426 @@
<?php
/*********************************************************
程序说明:
功能说明:列表显示账号信息,默认显示第一页用户资料
调用关系:调用: header.inc
被调用:
变量说明:
作者:
修改注释:
NO.1
姓名:lilong
时间:6/4/2004
修改说明:display subscriber while read subscriber.
*********************************************************/
$DEBUG = 0;
//echo "sysId=$sysId, sysTypeNo=$sysTypeNo<br>";
if($DEBUG) echo "<br>正在调试中!!";
//==========================================================
//变量定义
//==========================================================
$dbName = 'OMC_PUB';
$sysSubsConfTable = 'OMC_PUB.sysSubsConf';
$systemConfTable = 'OMC_PUB.sysConf';
$numberPerPage = 100; //每页纪录数
$nReadComm = 1;
$nChangeComm = 2;
$nCreateComm = 3;
$nDeleteComm = 4;
$nLoadIndexComm = 5;
//确定告警内容显示语言种类
if($selectedLanguage=='chn'){
$alarmDesc = alarmDesc_1;
}elseif($selectedLanguage=='eng'){
$alarmDesc = alarmDesc_2;
}
//==========================================================
//输入变量
//==========================================================
//列表所需基本变量
if($DEBUG) echo "<br>sysTypeNo=$sysTypeNo";
if($DEBUG) echo "<br>dataTypeNo=$dataTypeNo";
//删除用户
if($DEBUG) echo "<br>commType =$commType";
//根据sysTypeNo,dataTypeNo获取数据表名,索引字段名
if($sysTypeNo==390){
if(!isset($sysNo)){
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 "<br>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 "<br>tableName=$tableName";
if($DEBUG) echo "<br>keyFieldName=$keyFieldName";
//排序所依赖的字段名
if(!isset($orderByField)){
$orderByField = $keyFieldName;
}
if($DEBUG) echo "<br>orderByField=$orderByField";
//排序字符串
$orderByStr = " $orderByField";
if($DEBUG) echo "<br>orderByStr=$orderByStr";
//==========================================================
//数据处理
//==========================================================
//删除命令,且该命令被执行
if($commType == $nDeleteComm ){
$delSql="Delete FROM $tableName WHERE $keyFieldName='$keyValue'";
if($DEBUG) echo "<br>delSql=$delSql";
$result=mysqli_query($pubConn,$delSql);
echo mysqli_error($pubConn);
if($result){
echo "<br>Delete $keyValue OK!";
}
}
switch($sysTypeNo){
case '330':
if(!isset($sysId)){
$sysId='330_0_0';
}
$sysTypeName='HLR';
$canSetNum='all';
$selectFieldList = "imsi,inter_msisdn,used_flag,nam,camel_flag";
$showNameList="IMSI,MSISDN,usedFlag,NetworkAccessMode,CamelFlag";
break;
case '325':
if(!isset($sysId)){
$sysId='325_0_0';
}
$sysTypeName='VLR';
$canSetNum='all';
$selectFieldList = "IMSI,MSISDN,TMSI,LMSI";
$showNameList = "IMSI,MSISDN,TMSI,LMSI";
break;
case '360':
if($dataTypeNo == 0){
$sysTypeName='PPS';
$canSetNum='all';
$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";
// $selectFieldList = "msisdn,overdraft,status,balance,expiration_date,first_used_date,user_type";
// $showNameList= "MSISDN,Overdraft,Status,Balance,Expiration Date,First used Date,User Type";
}else{
$sysTypeName='Prepaid Card';
$canSetNum='all';
$selectFieldList ="card_no,card_hrn,face_value,card_status,expiry_date,valid_time,updated_date";
$showNameList="Card No,Card_hrn,Face Value,Status,Expiry Date,Valid Time,Updated Date";
}
if(!isset($sysId)){
$sysId='360_0_0';
}
break;
case '395':
if($dataTypeNo == 0){
$sysTypeName='RCM';
$canSetNum='all';
$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";
// $selectFieldList = "msisdn,overdraft,status,balance,expiration_date,first_used_date,user_type";
// $showNameList= "MSISDN,Overdraft,Status,Balance,Expiration Date,First used Date,User Type";
}else{
$sysTypeName='Prepaid Card';
$canSetNum='all';
$selectFieldList ="card_no,card_hrn,face_value,card_status,expiry_date,valid_time,updated_date";
$showNameList="Card No,Card_hrn,Face Value,Status,Expiry Date,Valid Time,Updated Date";
}
if(!isset($sysId)){
$sysId='395_0_0';
}
break;
case '340':
if(!isset($sysId)){
$sysId='340_0_0';
}
$sysTypeName='AUC';
$canSetNum='all';
$selectFieldList = "key_imsi,a3a8_version,status";
$showNameList = "IMSI,A3A8 version,status";
break;
case '370':
if(!isset($sysId)){
$sysId='370_0_0';
}
$sysTypeName='MNP';
$canSetNum='all';
$selectFieldList = "msisdn,routing_number,status,donor,recipient,date";
$showNameList = "MSISDN,RN,status,Donor,Recipient,Date";
break;
break;
case '375':
if(!isset($sysId)){
$sysId='375_0_0';
}
$sysTypeName='OPPS';
$canSetNum='all';
$selectFieldList = "msisdn,imsi,imei,oprFlag,class,userType";
$showNameList = "MSISDN,IMSI,IMEI,User Status,Class,User Type";
break;
break;
case '378':
if(!isset($sysId)){
$sysId='378_0_0';
}
$sysTypeName='iPALIM';
$canSetNum='all';
$selectFieldList = "imsi,msisdn,msisdn_extern,tmsi,lai,type";
$showNameList = "IMSI,MSISDN Public,MSISDN Private,TMSI,MCC-MNC-LAC-CI,Type";
break;
case '380':
if(!isset($sysId)){
$sysId='380_0_0';
}
$sysTypeName='EIR';
$canSetNum='all';
$selectFieldList = "imei,status";
$showNameList= "IMEI,Status";
break;
case '390':
if(!isset($sysId)){
$sysId='390_0_0';
}
$sysTypeName='VMS';
$canSetNum='all';
$selectFieldList = "msisdn,mailboxID,promo_Language,greeting";
$showNameList= "MSISDN,Enable,Mailbox No,Language,GreetingFlag";
break;
case '253':
if(!isset($sysId)){
$sysId='253_0_0';
}
$sysTypeName='SN-HLR';
$canSetNum='all';
$selectFieldList = "imsi,msisdn,used_flag,lac";
$showNameList= "imsi,msisdn,used_flag,lac";
break;
default:
echo "Uaaaknown sysTypeNo";
exit(1);
}
$showFieldArr=explode(',',$selectFieldList);
$showNameArr=explode(',',$showNameList);
//根据上部页面传来的变量,生成查询条件
if(strlen($selKeyFieldName) > 0 && strlen($selKeyValue) > 0){
$whereStr = "WHERE $selKeyFieldName like '%$selKeyValue%'";
}
//查询基本条件
if(strlen($whereStr) > 10){
$bascWhereStr ="";
}else{
$bascWhereStr ="";
}
//首次查询,查出符合条件的纪录条数,并在以后的页面跳转中传递。
if(!$numberOfRecords){
$bgnNo=0;
$countSql="SELECT count(*) as totalNum
FROM $tableName
$whereStr
$bascWhereStr
";
if($DEBUG) echo "<br>countSql=$countSql";
$result=mysqli_query($pubConn,$countSql);
echo mysqli_error($pubConn);
$record = @mysqli_fetch_array($result);
$numberOfRecords = $record[0];
if($DEBUG) echo "<br>numberOfRecords=$numberOfRecords";
if($numberOfRecords > 0){
//插入日志
insertLog("search $sysTypeName subscriber: $selKeyValue ");
}else{
//插入日志
insertLog("search $sysTypeName subscriber: $selKeyValue not found");
echo "<br>No Found";
return;
//exit();
}
}
//找到需要显示的纪录
if($numberOfRecords > 0){
$showSql=" SELECT $selectFieldList
FROM $tableName
$whereStr
$bascWhereStr
ORDER BY $orderByStr
LIMIT $bgnNo, $numberPerPage
";
if($DEBUG) echo "<br>showSql=$showSql";
$result=@mysqli_query($pubConn,$showSql);
echo mysqli_error($pubConn);
$rows=@mysqli_fetch_array($result);
//下面是控制分页显示需要传递的变量传递变量
if ($numberOfRecords >= 1) {
$nextBgnNo = $bgnNo + $numberPerPage; //本页的结束数目
if ($nextBgnNo > $numberOfRecords){
$nextBgnNo = $numberOfRecords;
}
$t1 = $bgnNo + 1;
$prevBgnNo = $bgnNo - $numberPerPage;
if ($prevBgnNo < 0) {
$prevBgnNo = 0;
}
$basePageLink ="sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&numberOfRecords=$numberOfRecords";
$basePageLink .="&selKeyFieldName=$selKeyFieldName&selKeyValue=$selKeyValue";
$prePageLink ="bgnNo=$prevBgnNo";
$nextPageLink ="bgnNo=$nextBgnNo";
}
$showBgnNo=$bgnNo+1;
}
//==========================================================
//输出并显示数据
//==========================================================
?>
<script LANGUAGE="JavaScript">
function gotoPage(){
var pageUrl,bgnNo,numberPerPage;
pageNo=document.selectform.pageNo.value;
numberPerPage='<?php echo "$numberPerPage";?>';
bgnNo=numberPerPage*(pageNo-1);
baseUrl='<?php echo "$PHP_SELF?$basePageLink";?>';
pageUrl="&bgnNo="+bgnNo;
window.location.href=baseUrl+pageUrl;
}
</script>
<form name="selectform">
<TABLE border="0" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
<TR >
<TD >
<?php
echo "$strDisplayRecords<FONT color=#0000ff>&nbsp;$showBgnNo - $nextBgnNo</FONT>, ";
echo "($strTotal:$numberOfRecords)";
?>
<TD>&nbsp;
<?php /*
// NEW: Display a link for the previous set of records.
if ($bgnNo != 0) {
echo "<a href=\"$PHP_SELF?$basePageLink&$prePageLink\">";
echo "<IMG alt=$strPreviousPage border=0 src=../../images/prePage.gif ></a>&nbsp;&nbsp;&nbsp;";
}else{
echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
}
// NEW: Display a link for the next set of records.
if ($nextBgnNo != $numberOfRecords && $numberOfRecords >0) {
echo "<a href=\"$PHP_SELF?$basePageLink&$nextPageLink\">";
echo "<IMG alt=$strNextPage border=0 src=../../images/nextPage.gif ></a>&nbsp;";
}else{
echo "&nbsp;&nbsp;&nbsp;&nbsp;";
}
//根据纪录条数,算出页码数,本页页码
if($numberOfRecords > 0){
$totalPageNum = ceil($numberOfRecords / $numberPerPage );
$pageNo = $bgnNo / $numberPerPage + 1;
}*/
?>
</TD>
<TD align="right">
<?php
// NEW: Display a link for the previous set of records.
if ($bgnNo != 0) {
echo "<a href=\"$PHP_SELF?$basePageLink&$prePageLink\">";
echo "$strPrevious&nbsp;<IMG alt=$strPreviousPage align=absBottom border=0 src=../../images/left.gif ></a>&nbsp";
}else{
echo "<font color=\"#808080\">$strPrevious&nbsp;</font><IMG alt=$strPreviousPage align=absBottom border=0 src=../../images/left_1.gif ></a>&nbsp";
}
//根据纪录条数,算出页码数,本页页码
if($numberOfRecords > 0){
$totalPageNum = ceil($numberOfRecords / $numberPerPage );
$pageNo = $bgnNo / $numberPerPage + 1;
}
echo "<SELECT size=\"1\" name=\"pageNo\" onChange=\"javasript:gotoPage()\">";
for($i=1;$i<=$totalPageNum;$i++){
if($i== $pageNo){
echo "<option selected value=\"$i\" >$i</option>";
}else{
echo "<option value=\"$i\">$i</option>";
}
}
echo "</SELECT>";
// NEW: Display a link for the next set of records.
if ($nextBgnNo != $numberOfRecords && $numberOfRecords >0) {
echo "<a href=\"$PHP_SELF?$basePageLink&$nextPageLink\">";
echo "<IMG alt=$strNextPage align=absBottom border=0 src=../../images/right.gif >&nbsp;$strNext</a>";
}else{
echo "<IMG alt=$strNextPage align=absBottom border=0 src=../../images/right.gif ><font color=\"#808080\">&nbsp;$strNext</font>";
}
?>
</TD>
</TR>
</TABLE>
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
<tr bgcolor="#E6E6E6">
<?php
for($i=0;$i<sizeof($showFieldArr);$i++){
echo "<td align=\"center\">";
echo "<a href=\"$PHP_SELF?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&orderByField=$showFieldArr[$i]&selKeyFieldName=$selKeyFieldName&selKeyValue=$selKeyValue\">";
echo "$showNameArr[$i]</a>";
echo "</td>";
}
?>
</tr>
<?php
do{
echo "<tr>";
for($i=0;$i<sizeof($showFieldArr);$i++){
echo "<td align=\"center\">";
if ($i == "0"){
echo "<a href=\"./subscriberConf.php?sysId=$sysId&dataTypeNo=$dataTypeNo&keyValue={$rows[$keyFieldName]}&canSetNum=$canSetNum&isRead=1\">&nbsp;$rows[$i]</a>";
}else{
echo "&nbsp;$rows[$i]";
}
echo "</td>";
}
/* echo "<td align=\"center\">";
echo "<a href=\"./subscriberConf.php?sysId=$sysId&dataTypeNo=$dataTypeNo&keyValue=$rows[$keyFieldName]&canSetNum=$canSetNum&isRead=1\">edit</a>";
echo "</td>";*/
echo "</tr>";
}while($rows=mysqli_fetch_array($result));
?>
</table>
</form>
&nbsp;
+325
View File
@@ -0,0 +1,325 @@
<?php
/********************************************************************
程序说明:
功能说明:发送完参数命令后,通过定时扫描数据库,显示命令的操作的状态过程,每隔两秒自动刷新
输入变量:(由发送命令页面传来)$commIdStr,$okURL,$failURL
输出并输入变量:$usedTime,$waitTime,$isFinish,$okURL,$failURL,$commIdStr
作者:
********************************************************************/
require("../../inc/header.inc");
?>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
echo "<br>";
$DEBUG = 0;
global $pubConn;
$commIdStr=$_REQUEST['commIdStr'];
$okURL=$_REQUEST['okURL'];
$failURL=$_REQUEST['failURL'];
//commType 's value
$nReadComm = 1;
$nChangeComm = 2;
$nCreateComm = 3;
$nDeleteComm = 4;
$nLoadIndexComm = 5;
$nReplaceIndexComm=6;
//commState's value
$nProcFail = 0;
$nWaitProc = 1;
$nInProc = 2;
$nOutProc = 3;
$failURL = rawurldecode($failURL);
$okURL = rawurldecode($okURL);
$pubDb = 'OMC_PUB';
$commTable = 'subscriberComm';
$sysConfTable ='sysConf';
$commNum=$_REQUEST['commNum'];
$commType=$_REQUEST['commType'];
$lastTimeFinishNumStr=$_REQUEST['lastTimeFinishNumStr'];
if($commNum <= 0){
$commArr = explode('-',$commIdStr);
$commNum = sizeof($commArr);
}
$maxOverTime = $commNum * 5 + 10; //根据子系统个数和对每个子系统操作的最大延时(5秒)来决定
$maxWaitTime = $commNum * 2;
$maxStopTime = $commNum * 5 + 10;
$maxOfCommId = 50000; //设定命令表的最大值
$isFinish = $_REQUEST['isFinish'];
$waitTime = $_REQUEST['waitTime'];
$stopTime = $_REQUEST['stopTime'];
$usedTime = $_REQUEST['usedTime'];
if($DEBUG) echo "<br>if(isFinish != 0 || (waitTime >= maxWaitTime) ||(stopTime > maxStopTime))<br>";
if($DEBUG) echo "<br>if($isFinish != 0 || ($waitTime >= $maxWaitTime) ||($stopTime > $maxStopTime))<br>";
//显示命令执行状态
//-----------------------------
$showTime = $usedTime*2;
echo "<font size=2>Time:$showTime s<br></font>";
$okNum = 0;
$failNum = 0;
$commNum = 0;
$commArr = explode('-',$commIdStr);
$thisTImeFinishNumstr='';
$lastTimeFinishNumArr = explode('-',$lastTimeFinishNumStr);
for($i=0;$i<sizeof($commArr);$i++){
if(strlen($commArr[$i]) <=0){ continue;}
$commNum++;
$commSql = "SELECT * FROM $commTable WHERE commId= $commArr[$i]";
if($DEBUG) echo "<br>get command = $commSql";
$commResult = mysqli_query($pubConn,$commSql);
if(mysqli_num_rows($commResult) <= 0){
echo "<br>Can not find this command's info in datebase";
exit();
}
$commRows = @mysqli_fetch_array($commResult);
$sysTypeNo = $commRows['sysTypeNo'];
$sysNo = $commRows['sysNo'];
$subSysNo = $commRows['subSysNo'];
$dataTypeNo = $commRows['dataTypeNo'];
$commType = $commRows['commType'];
$paramType = $commRows['paramType'];
$objId = $commRows['objId'];
$commState = $commRows['commState'];
$indexValueList = $commRows['indexValueList'];
$fieldNameList = $commRows['fieldNameList'];
$remark = $commRows['remark'];
//获取该系统类型的snmp头和类型名称
if(!isset($sysTypeName)){
$sysConfSql = "SELECT snmpHead,sysTypeName FROM $sysConfTable WHERE sysTypeNo='$sysTypeNo'";
if($DEBUG) echo "<br>get conf = $sysConfSql";
$sysConfResult = mysqli_query($pubConn,$sysConfSql);
echo mysqli_error($pubConn);
$sysConfRows = @mysqli_fetch_array($sysConfResult);
$sysTypeName = $sysConfRows['sysTypeName'];
$snmpHead = $sysConfRows['snmpHead'];
}
$sysName = $sysTypeName.'_'.$sysNo.'_'.$subSysNo;
//echo "<br><font size=2> $sysName 's</font><br>";
$objIdStr=$snmpHead.'.'.$objId;
//echo "<br><font size=2 color=blue>$objIdStr</font><br>";
if($dataTypeNo > 0){
$dataTypeName='Card';
}else{
$dataTypeName='subscriber';
}
switch($commType){
case $nReadComm:
$showInfo="Read $dataTypeName $indexValueList from $sysName";
break;
case $nChangeComm:
$showInfo="Change $indexValueList's field[$fieldNameList] in $sysName";
break;
case $nCreateComm:
$showInfo="Create $dataTypeName $indexValueList to $sysName";
break;
case $nDeleteComm:
$showInfo="Delete $sysName's $dataTypeName $indexValueList";
break;
case $nLoadIndexComm:
$showInfo="Load $sysName's $dataTypeName Data ";
break;
case $nReplaceIndexComm:
$showInfo="Replace $dataTypeName Index $indexValueList -> $remark in $sysName";
break;
default:
echo "<font size=2> Unknown Command Type</font>";
exit();
}
if($DEBUG) echo "commState = $commState<br>";
switch($commState){
case 0: //process failed
$failNum++;
echo "<br><b><font size=2 color=red> $commRows[remark] </font></b>";
insertLog("$showInfo Failed:$remark");
sleep(1);
break;
case 1: //wait process
$waitTime++;
break;
case 2: //in process
$waitTime = 0;
//只要有一个命令的完成数在增长,就认为该组命令在运行,否则认为命令处理超时
if($DEBUG) echo "====> {$commRows[finishNum]} > {$lastTimeFinishNumArr[$i]}";
if($commRows[finishNum] > $lastTimeFinishNumArr[$i]){
$stopTime = 0;
}else{
$stopTime++;
}
if($DEBUG){
echo "commRows[totalNum]=$commRows[totalNum],commRows[finishNum]=$commRows[finishNum]<br>";
}
omcProgressBar($commRows[totalNum],$commRows[finishNum]);
$thisTimeFinishNumStr .=$commRows[finishNum].'-';
break;
case 3: //process finished
$okNum++;
omcProgressBar(100,100);
insertLog("$showInfo OK");
break;
default:
echo "<font size=3>Unknown Command State</font>";
exit();
}
echo "<br><br>";
}//end of for($i=0;$i<sizeof($commArr);$i++)
if($DEBUG) echo"<br>$commNum =?= $finishNum";
if($commNum == $okNum){
$isFinish = 1;
}elseif($failNum > 0 && $okNum > 0&&($failNum+$okNum==$commNum)){
$isFinish = -1;
}elseif($commNum == $failNum){
$isFinish = -2;
}else{
$isFinish = 0;
}
//当删除用户时,只要不是"回应超时",都删除OMC数据库的用户
if($commType == $nDeleteComm && $commState != $nWaitProc && $commState != $nInProc){
if($DEBUG) echo"<br>commType == DeleteComm ($commType == $nDeleteComm)";
if($DEBUG) echo"<br>remark={$commRows[remark]}";
if($DEBUG) sleep(5);
if( $commRows[remark] != "response timeout"){
if(!strstr($commRows[remark],"Can not delete an in used subscriber, please disable first"))
$isFinish = 1;
}
}
if($DEBUG) echo"<br>lastTimeFinishNumStr=$lastTimeFinishNumStr";
if($DEBUG) echo"<br>thisTimeFinishNumStr=$thisTimeFinishNumStr";
$lastTimeFinishNumStr = $thisTimeFinishNumStr;
//刷新返回
//命令处理完毕
//----------------
if(($isFinish != 0) || ($waitTime >= $maxWaitTime) || ($stopTime > $maxStopTime)){
if($commId >= $maxOfCommId){ //初始化命令表
//先删除表
$dropSql = "DROP TABLE $commTable ";
mysqli_query($pubConn,$dropSql);
//再建一个结构相同的新表
$createSql="CREATE TABLE subscriberComm (
commId smallint(5) unsigned NOT NULL auto_increment,
commType tinyint(1) DEFAULT '0' NOT NULL,
dataTypeNo tinyint(4) DEFAULT '0' NOT NULL,
sysTypeNo smallint(5) unsigned DEFAULT '0' NOT NULL,
sysNo smallint(5) unsigned DEFAULT '0' NOT NULL,
subSysNo smallint(5) unsigned DEFAULT '0' NOT NULL,
indexValueList varchar(255) NOT NULL,
fieldNameList text NOT NULL,
paramType tinyint(4) DEFAULT '0' NOT NULL,
commState tinyint(3) unsigned DEFAULT '0' NOT NULL,
totalNum smallint(5) unsigned DEFAULT '0' NOT NULL,
finishNum smallint(5) unsigned DEFAULT '0' NOT NULL,
sendTime datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
bgnTime datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
endTime datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
remark varchar(200) binary NOT NULL,
PRIMARY KEY (commId),
KEY sysTypeNo (sysTypeNo),
KEY sysNo (sysNo),
KEY subSysNo (subSysNo),
KEY bufferKey (indexValueList)
)
";
mysqli_query($pubConn,$createSql);
}else{
//删除命令表的相关命令
$commArr = explode('-',$commIdStr);
for($i=0;$i<sizeof($commArr);$i++){
if(strlen($commArr[$i]) <=0){
continue;
}
$deleteSql = "DELETE FROM $commTable WHERE commId='$commArr[$i]'";
if($DEBUG) echo "<br>deleteSql = $deleteSql";
mysqli_query($pubConn,$deleteSql);
echo mysqli_error($pubConn);
}
}
if($isBatchCreate==1){
// 重定向返回指定页
if($isFinish != 0){
if($isFinish > 0){
echo "<b><font size=3 color=blue>Finished!!</font></b>";
}elseif($isFinish == -1){
echo "<b><font size=3 color=black>Some of them failed!!</font></b>";
}else{
echo "<b><font size=3 color=red>Failed!!</font></b>";
}
}elseif($usedTime >= $maxOverTime && $stopTime == 1){
echo "<b><font size=3 color=red>Stoped!!</font></b>";
}else{ //$usedTime >= $maxOverTime
echo "<b><font size=3 color=red>Timeout!!</font></b>";
}
echo "<br>";
echo "<p align=\"left\"><a href=\"../../account/priSubsMng/subscriberListIndex.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo\" target=\"contents\"><img align=absBottom border=0 src=\"../../images/left.gif\" width=\"14\" height=\"14\">$strBack</a>";
exit();
}else{
// 重定向返回指定页
if($isFinish != 0){
if($isFinish > 0){
echo "<b><font size=3 color=blue>Finished!!</font></b>";
if($commType == $nLoadIndexComm){
sleep(8);//等8秒,这样数据库插入才能完全完成
}
if($DEBUG) echo "<br>okURL=$okURL";
if($DEBUG) exit();
echo " <meta http-equiv=\"refresh\" content=\"2; url=$okURL\"> ";
}elseif($isFinish == -1){
echo "<b><font size=3 color=black>Failed in some system!!</font></b>";
if($DEBUG) exit();
echo " <meta http-equiv=\"refresh\" content=\"2; url=$okURL\"> ";
}else{
echo "<b><font size=3 color=red>Failed!!</font></b>";
if($DEBUG) echo "<br>failURL=$failURL";
if($DEBUG) exit();
echo " <meta http-equiv=\"refresh\" content=\"2; url=$failURL\"> ";
}
}elseif($usedTime >= $maxOverTime && $stopTime == 1){
echo "<b><font size=3 color=red>Stoped!!</font></b>";
if($DEBUG) exit();
echo " <meta http-equiv=\"refresh\" content=\"2; url=$failURL\"> ";
}else{ //$usedTime >= $maxOverTime
echo "<b><font size=3 color=red>Timeout!!</font></b>";
if($DEBUG) exit();
echo " <meta http-equiv=\"refresh\" content=\"2; url=$failURL\"> ";
}
}
exit();
}//end of if($isFinish....)
//--------------
$usedTime++; //总时间
$failURL= rawurlencode($failURL);
$okURL = rawurlencode($okURL);
//保留变量值,传到下次刷新
$keepStr= "usedTime=$usedTime&waitTime=$waitTime&isFinish=$isFinish&stopTime=$stopTime";
$keepStr.="&failURL=$failURL&okURL=$okURL&commIdStr=$commIdStr&commNum=$commNum&isBatchCreate=$isBatchCreate";
$keepStr.="&lastTimeFinishNumStr=$lastTimeFinishNumStr&commType=$commType";
$keepStr.="&isLoadIndex=$isLoadIndex";
if($DEBUG) echo "<br>keepStr=$keepStr";
if ( 1==$isLoadIndex ) {
require("commDown.php");
}
adjust_content_tail("down");
sleep(5);
?>
<script type="text/javascript">
window.location.href="<?php echo "$PHP_SELF?$keepStr"; ?>";
</script>
+413
View File
@@ -0,0 +1,413 @@
<?php
/*********************************************************
程序说明:
功能说明:eir用户数据维护专用页面
1、将用户数据表的数据导入到临时参数表。
2、修改的用户数据保存到临时参数表中,
3、设置用户参数时,返回值将修改用户表和临时表。
调用关系:调用: header.inc
变量说明:
输入变量:
$keyValue :由用户列表传来
$sysId :由用户列表传来或本页面指定
$dataTypeNo :数据类型,0=用户数据,1=冲值卡数据
$language :语言种类
$canSetNum :每次最多可以修改的字段个数
作者:
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$DEBUG = 0;
if($DEBUG) echo "<br>正在调试中,给您的工作带来不便,请原谅!!:)";
//==========================================================
//变量定义
//==========================================================
$canwrite_flag=checkWritePrivilege();
$pubDb = 'OMC_PUB';
$sysSubsConfTable ='OMC_PUB.sysSubsConf';
$systemConfTable = 'OMC_PUB.sysConf';
$nReadComm = 1;
$nChangeComm = 2;
$nCreateComm = 3;
$nDeleteComm = 4;
$nLoadIndexComm = 5;
$maxLevelNum = 10;
$nInteger = 2;
$nAscStr = 3;
$nHexStr = 4;
//------------选择语言版本----------
if($language == 'eng'){
}else{
}
//select sum(balance) from user_info
//==========================================================
//输入变量
//==========================================================
$canSetNum = isset($canSetNum)?$canSetNum:'all';
//显示用户数据编辑页面,需要的变量
if($DEBUG) echo "<br>sysId=$sysId";
if($DEBUG) echo "<br>canSetNum=$canSetNum";
if($DEBUG) echo "<br>keyValue=$keyValue";
if($DEBUG) echo "<br>sysTypeNo=$sysTypeNo";
if($DEBUG) echo "<br>sysNo=$sysNo";
if($DEBUG) echo "<br>subSysNo=$subSysNo";
if($DEBUG) echo "<br>dataTypeNo=$dataTypeNo";
//例如:
//$canSetNum =1; // 或= 'all'
//$sysId='330_0_0';
//$keyValue= '0460022157127016';
//操作类型变量
if($DEBUG) echo "<br>isRead=$isRead";
if($DEBUG) echo "<br>isChange=$isChange";
if($DEBUG) echo "<br>isCreate=$isCreate";
if($DEBUG) echo "<br>isDelete=$isDelete";
if($DEBUG) echo "<br>isLoadIndex=$isLoadIndex";
//保存用户数据修改的数据
if($DEBUG) echo "<br>bgnNo=$bgnNo";
if($DEBUG) echo "<br>endNo=$endNo";
//---------定义需要编辑保存的字段-------
$showAttrDef=array(
array('fieldName'=>'imei', 'inputName'=>'imei'),
array('fieldName'=>'status', 'inputName'=>'status')
);
//For operation log use
{
$status_def=array(
"01"=>"BlackListed","1"=>"BlackListed",
"02"=>"GreyListed","2"=>"GreyListed"
);
}
$logFieldDef=array(
'status',
);
if($_SERVER['REQUEST_METHOD'] == "POST"){
//system("echo '-------------------------------------'>>/tmp/test.txt");
$preValueInfo="Change $pre_keyvalue ";
$isChangeFlag=0;
for($i=0;$i<sizeof($logFieldDef);$i++){
$inputName =$logFieldDef[$i];
$inputValue =${$inputName};
$ppName=$inputName."_ppvalue";
$ddName=$inputName."_ddef";
$cdName=$inputName."_cdef";
$nnName=$inputName."_name";
if(strlen($inputValue)){
//echo "<br>$inputName = $inputValue";
if(isset($$ddName))
{
$tmpv=$$ppName;
$val1=${$$ddName}[$tmpv];
$val2=${$$ddName}[$inputValue];
if(strlen($$ppName) == 0)
$val1="NoValue";
if(strcasecmp($val1,$val2) != 0)
{
$isChangeFlag=1;
$preValueInfo.="[{$$nnName},{$val1}->{$val2}]";
//system("echo '[{$$nnName},{$val1}->{$val2}]' >>/tmp/test.txt");
}
}
else if(isset($$cdName))
{
$newValue="";
for($iii=0;$iii<sizeof(${$$cdName});$iii++)
{
$chkname=${$$cdName}[$iii][0];
if($$chkname == '1')
$newValue.=${$$cdName}[$iii][2].",";
}
$newValue=substr($newValue,0,strlen($newValue)-1);
if(strcasecmp($$ppName,$newValue) != 0)
{
$isChangeFlag=1;
$preValueInfo.="[{$$nnName},({$$ppName})->({$newValue})]";
//system("echo '[{$$nnName},({$$ppName})->({$newValue})]' >>/tmp/test.txt");
}
}
else
{
if(strlen($$ppName) == 0)
$$ppName="NoValue";
if(strcasecmp($$ppName,$inputValue) != 0)
{
$isChangeFlag=1;
$preValueInfo.="[{$$nnName},{$$ppName}->$inputValue]";
//system("echo '[{$$nnName},{$$ppName}->$inputValue]'>>/tmp/test.txt");
}
}
}else{
//echo "<br>Can not find $inputName's value";
}
}
if($isChangeFlag==1)
{
$preValueInfo.=" in {$log_sysTypeName}_{$log_sysNo}_{$log_subSysNo}";
insertLog($preValueInfo);
}
}
//处理各个的输入单元的值,组成各个需要编辑的字段值
if($_SERVER['REQUEST_METHOD'] == "POST"){
//$status=$status;
//格式化每个需要保存的字段,以便数据处理模块处理
$bgnNo=0;
$endNo=0;
for($i=$bgnNo;$i<sizeof($showAttrDef);$i++){
if($oldFieldName == $showAttrDef[$i][fieldName]){
continue;
}
$oldFieldName = $showAttrDef[$i][fieldName];
${'checkBox_'.$endNo} =1;
${'fieldName_'.$endNo}=$oldFieldName;
${'editValue_'.$endNo}=${$oldFieldName};
if($DEBUG) echo "<br>checkBox_$endNo = ${'checkBox_'.$endNo}";
if($DEBUG) echo "<br>fieldName_$endNo = ${'fieldName_'.$endNo}";
if($DEBUG) echo "<br>editValue_$endNo = ${'editValue_'.$endNo}";
$endNo++;
}
}
//==========================================================
//数据处理
//==========================================================
if (1 == $isLoadIndex) {
$fieldNameList = "imei,status";
} else {
$fieldNameList = "ALL";
}
if ($DEBUG) echo "fieldNameList=$fieldNameList<br>";
?>
<base target="_self">
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
require("../pubSubsMng/sendComm.inc");
require("../pubSubsMng/dataProc.inc");
//==========================================================
//输出并显示数据
//==========================================================
$seqNo=0;
?>
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
echo "<br>";
//**********************************编辑参数时所用javascript*****************************************
?>
<script LANGUAGE="JavaScript">
function selCheckBox(thisCheckBox)
{
if(thisCheckBox.checked == true){
thisCheckBox.value=1;
}else{
thisCheckBox.value=0;
}
}
function askSureToDel(keyName,keyId)
{
var answer = confirm("Are you sure to delete this subscriber( "+keyName+"="
+ keyId + ") from <?php echo"$sysTypeName";?> server?");
if (answer == true){
window.location.href = "<?php echo "$PHP_SELF?sysId=$sysId&dataTypeNo=$dataTypeNo&bufferNo=$bufferNo&keyValue=$keyValue&isDelete=1";?>";
//alert('Try to send delete command');
}else{
return(false);
}
}
</script>
<form method="POST" name="update" action="<?php echo"$PHP_SELF";?>" >
<?php
//显示用户参数编辑页面
?>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><nobr>
<?php echo "Server Id:"?>
<select name="sysId" size="1">
<?php
$selSysIdSql="SELECT sysNo,subSysNo,sysTypeName
FROM sysInfo,sysConf
WHERE sysInfo.sysTypeNo='$sysTypeNo' AND sysConf.sysTypeNo='$sysTypeNo'
ORDER BY baseStat DESC,updateTime DESC
";
if($DEBUG) echo "<br>$selSysIdSql";
$sysIdResult=mysqli_query($pubConn,$selSysIdSql);
echo mysqli_error($pubConn);
while($sysIdRows=mysqli_fetch_array($sysIdResult)){
echo "<option value=\"$sysTypeNo"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]\"";
if(($sysNo == $sysIdRows[sysNo]) && ($subSysNo == $sysIdRows[subSysNo]))
echo " selected";
echo " >$sysIdRows[sysTypeName]"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]";
echo "</option>";
}
?>
</select>
</nobr>
</td>
<td><nobr>
<?php
$showkeyValue= $keyValue;
$keyValueName='IMEI';
echo "&nbsp;&nbsp;$keyValueName:$showkeyValue";
?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</nobr></td>
<?php
if($isTryCreate > 0){
?>
<td >
<input type="submit" value="Create in <?php echo "$sysTypeName"?>" name="create" title="" class="button" onClick="javascript:document.update.isCreate.value=1;">
<input type="hidden" value="0" name="isCreate">
<input type="hidden" value="0" name="isChange">
</td>
<?php
$myPrivilege = $userInfo[privilege];
if($myPrivilege >=4){
?>
<td>
&nbsp;&nbsp;&nbsp;
<input type="submit" value="Create in OMC" name="create" title="" class="button" onClick="javascript:document.update.isCreate.value=2;">
</td>
<?php
}
?>
<?php
}else{
?>
<td>
<input type="submit" value="Get" name="read" title="" class="button" onClick="javascript:document.update.isRead.value=1;">
<input type="hidden" value="0" name="isRead">
</td>
<td>
<?php
if($canwrite_flag)
echo "<input type=\"submit\" value=\"Set\" name=\"change\" title=\"\" class=\"button\" onClick=\"javascript:document.update.isChange.value=1;\">";
else
echo "<input type=\"submit\" disabled value=\"Set\" name=\"change\" title=\"\" class=\"button\" onClick=\"javascript:document.update.isChange.value=1;\">";
?>
<input type="hidden" value="0" name="isChange">
<input type="hidden" value="0" name="isCreate">
</td>
<td>
<?php
if($canwrite_flag)
echo "<input type=\"button\" value=\"Delete\" name=\"delete\" title=\"Delete this subscriber\" class=\"button\" onClick=\"askSureToDel('$keyValueName','$keyValue');\">";
else
echo "<input type=\"button\" disabled value=\"Delete\" name=\"delete\" title=\"Delete this subscriber\" class=\"button\" onClick=\"askSureToDel('$keyValueName','$keyValue');\">";
?>
<input type="hidden" value="0" name="isDelete">
</td>
<?php
}
?>
<td width="100%">&nbsp;</td>
</tr>
</table>
<br>
<?php
//将已取出的用户数据显示出来
//$tmpRow[fieldName]
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
<tr bgcolor="#E6E6E6">
<td width="5%"> No.</td>
<td width="25%">Name</td>
<td width="20%">Value</td>
<td width="50%">Description</td>
</tr>
<?
//imei
if($isTryCreate > 0){
$imei=$tmpRow[imei];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>IMEI</td>";
echo "<td>";
echo "<input type=\"text\" name=\"imei\" maxlength=\"16\" size=\"20\" value=\"$imei\" class=\"text\">";
echo "</td>";
echo "<td>International mobile station equipment identity and software version Number (IMEISV), as defined in TS GSM 03.03, is a 16-digit decimal number composed of four distinct elements:<br>- 6-digit Type Approval Code (TAC)<br>- 2-digit Final Assembly Code (FAC)<br>- 6-digit Serial Number (SNR)<br>- 2-digit Software Version Number (SVN)</td>";
echo "</tr>";
}else{
echo "<input type=\"hidden\" name=\"imei\" value=\"$keyValue\">";
}
echo "<input type=\"hidden\" name=\"log_sysTypeName\" value=\"$sysTypeName\">";
echo "<input type=\"hidden\" name=\"log_sysNo\" value=\"$sysNo\">";
echo "<input type=\"hidden\" name=\"log_subSysNo\" value=\"$subSysNo\">";
echo "<input type=\"hidden\" name=\"pre_keyvalue\" value=\"{$keyValue}'s\">";
//status
$status=$tmpRow[status];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Service status</td>";
echo "<td><nobr>";
if($status > 1){
echo "<input type=\"radio\" name=\"status\" value=\"01\"> BlackListed &nbsp;&nbsp;&nbsp;&nbsp;";
echo "<input type=\"radio\" name=\"status\" value=\"02\" checked> GreyListed";
}else{
echo "<input type=\"radio\" name=\"status\" value=\"01\" checked>BlackListed &nbsp;&nbsp;&nbsp;&nbsp;";
echo "<input type=\"radio\" name=\"status\" value=\"02\">GreyListed";
}
echo "</nobr></td>";
echo "<input type=\"hidden\" name=\"status_name\" value=\"Service status\">";
echo "<input type=\"hidden\" name=\"status_ppvalue\" value=\"$status\">";
echo "<input type=\"hidden\" name=\"status_ddef\" value=\"status_def\">";
echo "<td>The ME has the following three states:<br>White list: It is composed of all number series of equipment identities that are permitted for use<br>Black list: It contains all equipment identities that belong to equipment that need to be barred<br>Grey list: Equipments on the grey list are not barred (unless on the black list or not on the white list), but are tracked by the network for evaluation or other purposes<br>The EIR only store the MEs that has the Blacklisted or Greylisted state, the Whitelisted MEs are defined by the system parameter. 1=BlackListed, 2=GreyListed.</td>";
echo "</tr>";
?>
</table>
<?php
//*****************************************隐藏输入框,用于传递值****************************************
echo "\n<input type=\"hidden\" name=\"dataTypeNo\" value=\"$dataTypeNo\">";
echo "\n<input type=\"hidden\" name=\"keyFieldName\" value=\"$indexFieldName\">";
echo "\n<input type=\"hidden\" name=\"keyValue\" value=\"$keyValue\">";
?>
</form>
&nbsp;
<?php
adjust_content_tail("down");
?>
</body>
</html>
<?php
flush();
?>
+20
View File
@@ -0,0 +1,20 @@
[para]0[Name]IMEI
[sqlName]imei[t]input[unit]IMEI[u]00.0-07.7[u]
[v]keepHex-high-0
[remark]
International mobile station equipment identity and software version Number (IMEISV), as defined in TS GSM 03.03, is a 16-digit decimal number composed of four distinct elements:
- 6-digit Type Approval Code (TAC)
- 2-digit Final Assembly Code (FAC)
- 6-digit Serial Number (SNR)
- 2-digit Software Version Number (SVN)
[para]1[Name]Service status
[sqlName]status[t]radio[unit]Service status[u]00.0-00.7[u]
[v]1[opt]BlackListed
[v]2[opt]GreyListed
[remark]
The ME has the following three states:
White list: It is composed of all number series of equipment identities that are permitted for use
Black list: It contains all equipment identities that belong to equipment that need to be barred
Grey list: Equipments on the grey list are not barred (unless on the black list or not on the white list), but are tracked by the network for evaluation or other purposes
The EIR only store the MEs that has the Blacklisted or Greylisted state, the Whitelisted MEs are defined by the system parameter. 1=BlackListed, 2=GreyListed.
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+445
View File
@@ -0,0 +1,445 @@
<?php
/*************************
ipalim subscriber management
**************************/
require("../../inc/header.inc");
?>
<script language="JavaScript">
function changeType()
{
var type_value=document.update.iType.value;
if(type_value == 0)
{
document.update.iMsisdn.readOnly=true;
document.update.iMsisdn.value="N/A";
document.update.iMsisdn_extern.readOnly=false;
}
else if(type_value == 1)
{
document.update.iMsisdn_extern.readOnly=true;
document.update.iMsisdn_extern.value="N/A";
document.update.iMsisdn.readOnly=false;
}
else
{
document.update.iMsisdn_extern.readOnly=false;
document.update.iMsisdn.readOnly=false;
}
}
</script>
<?
$DEBUG = 0;
//==========================================================
//????
//==========================================================
$canwrite_flag=checkWritePrivilege();
$pubDb = 'OMC_PUB';
$sysSubsConfTable = 'OMC_PUB.sysSubsConf';
$systemConfTable = 'OMC_PUB.sysConf';
$nReadComm = 1;
$nChangeComm = 2;
$nCreateComm = 3;
$nDeleteComm = 4;
$nLoadIndexComm = 5;
$maxLevelNum = 10;
$nInteger = 2;
$nAscStr = 3;
$nHexStr = 4;
//==========================================================
//????
//==========================================================
$canSetNum = isset($canSetNum) ? $canSetNum : 'all';
//??????????,?????
if($DEBUG)
{
echo "<br>sysId=$sysId";
echo "<br>canSetNum=$canSetNum";
echo "<br>keyValue=$keyValue";
echo "<br>sysTypeNo=$sysTypeNo";
echo "<br>sysNo=$sysNo";
echo "<br>subSysNo=$subSysNo";
echo "<br>dataTypeNo=$dataTypeNo";
}
//??????
if($DEBUG)
{
echo "<br>isRead=$isRead";
echo "<br>isChange=$isChange";
echo "<br>isCreate=$isCreate";
echo "<br>isDelete=$isDelete";
echo "<br>isLoadIndex=$isLoadIndex";
//???????????
echo "<br>bgnNo=$bgnNo";
echo "<br>endNo=$endNo";
}
//---------???????????-------
//$showAttrDef=array(array('fieldName'=>'','inputName'=>'');
$showAttrDef=array(
array('fieldName'=>'imsi', 'inputName'=>'iImsi'),
array('fieldName'=>'msisdn', 'inputName'=>'iMsisdn'),
array('fieldName'=>'msisdn_extern', 'inputName'=>'iMsisdn_extern'),
array('fieldName'=>'tmsi', 'inputName'=>'iTmsi'),
array('fieldName'=>'lai', 'inputName'=>'iLai'),
array('fieldName'=>'type', 'inputName'=>'iType')
);
//?????????????
if($DEBUG && $_SERVER['REQUEST_METHOD'] == "POST")
{
for($i=0;$i<sizeof($showAttrDef);$i++)
{
$inputName =$showAttrDef[$i][inputName];
$inputValue =${$inputName};
echo "<br>$inputName,$inputValue";
if(strlen($inputValue))
{
echo "<br>$inputName = $inputValue";
}
else
{
echo "<br>Can not find $inputName's value";
}
}
exit();
}
//??????????,????????????
if($_SERVER['REQUEST_METHOD'] == "POST")
{
$imsi = $iImsi;
$msisdn = $iMsisdn;
$type = $iType;
$msisdn_extern = $iMsisdn_extern;
$tmsi = $iTmsi;
$lai = $iLai;
//????????????,??????????
$bgnNo=0;
$endNo=0;
for($i=$bgnNo;$i<sizeof($showAttrDef);$i++)
{
if($oldFieldName == $showAttrDef[$i][fieldName])
{
continue;
}
$oldFieldName = $showAttrDef[$i][fieldName];
${'checkBox_'.$endNo} =1;
${'fieldName_'.$endNo}=$oldFieldName;
${'editValue_'.$endNo}=${$oldFieldName};
if($DEBUG)
{
echo "<br>checkBox_$endNo = ${'checkBox_'.$endNo}";
echo "<br>fieldName_$endNo = ${'fieldName_'.$endNo}";
echo "<br>editValue_$endNo = ${'editValue_'.$endNo}";
}
$endNo++;
}
}
//==========================================================
//????
//==========================================================
if (1 == $isLoadIndex)
{
$fieldNameList = "imsi,msisdn,msisdn_extern,tmsi,lai,type";
}
else
{
$fieldNameList = "ALL";
}
if ($DEBUG) echo "fieldNameList=$fieldNameList<br>";
?>
<base target="_self">
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
require("../pubSubsMng/sendComm.inc");
//exit();
require("../pubSubsMng/dataProc.inc");
//==========================================================
//???????
//==========================================================
$seqNo=0;
?>
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
echo "<br>";
//**********************************???????javascript*****************************************
?>
<script LANGUAGE="JavaScript">
function selCheckBox(thisCheckBox)
{
if(thisCheckBox.checked == true)
{
thisCheckBox.value=1;
}
else
{
thisCheckBox.value=0;
}
}
function askSureToDel(keyName,keyId)
{
var answer = confirm("Are you sure to delete this subscriber( "+keyName+"="
+ keyId + ") from <?php echo"$sysTypeName";?> server?");
if (answer == true)
{
window.location.href = "<?php echo "$PHP_SELF?sysId=$sysId&dataTypeNo=$dataTypeNo&bufferNo=$bufferNo&keyValue=$keyValue&isDelete=1";?>";
//alert('Try to send delete command');
}
else
{
return(false);
}
}
</script>
<FORM method="POST" name="update" action="<?php echo"$PHP_SELF";?>" >
<!--***************** TABLE START:: DISPLAY SELECT HEADER **************-->
<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
<TR>
<TD><NOBR>Server ID:
<SELECT name="sysId" size="1">
<?php
$selSysIdSql="SELECT sysNo,subSysNo,sysTypeName
FROM sysInfo,sysConf
WHERE sysInfo.sysTypeNo='$sysTypeNo' AND sysConf.sysTypeNo='$sysTypeNo'
ORDER BY baseStat DESC,updateTime DESC
";
if($DEBUG) echo "<br>$selSysIdSql";
$sysIdResult=mysqli_query($pubConn,$selSysIdSql);
echo mysqli_error($pubConn);
while($sysIdRows=mysqli_fetch_array($sysIdResult)){
echo "<option value=\"$sysTypeNo"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]\"";
if(($sysNo == $sysIdRows[sysNo]) && ($subSysNo == $sysIdRows[subSysNo]))
echo " selected";
echo " >$sysIdRows[sysTypeName]"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]";
echo "</option>";
}
?>
</SELECT>
</NOBR></TD>
<TD><NOBR>
<?php
$showkeyValue= $keyValue;
$keyValueName='imsi';
echo "&nbsp;&nbsp;$keyValueName:$showkeyValue";
?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</NOBR></TD>
<?php
if($isTryCreate > 0)
{
?>
<TD>
<input type="submit" value="Create in <?php echo "$sysTypeName"?>" name="create" title="Add a new subscriber" class="button" onClick="javascript:document.update.isCreate.value=1;">
<input type="hidden" value="0" name="isCreate">
<input type="hidden" value="0" name="isChange">
</TD>
<?php
$myPrivilege = $userInfo[privilege];
if($myPrivilege >=4)
{
?>
<TD>
&nbsp;&nbsp;&nbsp;
<input type="submit" value="Create in OMC" name="create" title="" class="button" onClick="javascript:document.update.isCreate.value=2;">
</TD>
<?php
}
?>
<?php
}
else
{
?>
<TD>
<input type="submit" value="Get" name="read" title="Read this subscriber" class="button" onClick="javascript:document.update.isRead.value=1;">
<input type="hidden" value="0" name="isRead">
</TD>
<TD>
<?php
if($canwrite_flag)
echo "<input type=\"submit\" value=\"Set\" name=\"change\" title=\"Change this subscriber\" class=\"button\" onClick=\"javascript:document.update.isChange.value=1;\">";
else
echo "<input type=\"submit\" disabled value=\"Set\" name=\"change\" title=\"Change this subscriber\" class=\"button\" onClick=\"javascript:document.update.isChange.value=1;\">";
?>
<input type="hidden" value="0" name="isChange">
<input type="hidden" value="0" name="isCreate">
</TD>
<TD>
<?php
if($canwrite_flag)
echo "<input type=\"button\" value=\"Delete\" name=\"delete\" title=\"Delete this subscriber\" class=\"button\" onClick=\"askSureToDel('$keyValueName','$keyValue');\">";
else
echo "<input type=\"button\" disabled value=\"Delete\" name=\"delete\" title=\"Delete this subscriber\" class=\"button\" onClick=\"askSureToDel('$keyValueName','$keyValue');\">";
?>
<input type="hidden" value="0" name="isDelete">
</TD>
<?php
}
?>
<TD width="100%">&nbsp;</TD>
</TR>
</TABLE>
<!--***************** TABLE END:: DISPLAY SELECT HEADER ************** -->
<BR>
<!--***************** TABLE START:: DISPLAY USER DETAILS ************** -->
<TABLE border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
<TR bgcolor="#E6E6E6">
<TD width="5%"> No.</TD>
<TD width="25%">Name</TD>
<TD width="20%">Value</TD>
<TD width="50%">Description</TD>
</TR>
<?php
//imsi
if($isTryCreate > 0){
// echo "$tmpRow[msisdn],$tmpRow[msisdn],$tmpRow[msisdn]<br>";
$imsi=$tmpRow[imsi];
echo "\n <TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD>IMSI</TD>";
echo "<TD>";
echo "<input type=\"text\" name=\"iImsi\" maxlength=\"15\" size=\"28\" value=\"\" class=\"text\">";
echo "</TD>";
echo "<TD>";
echo "15-digit IMSI";
echo "</TD>";
echo "</TR>";
}else{
echo "<input type=\"hidden\" name=\"iImsi\" value=\"$keyValue\">";
}
$ipalimType =$tmpRow[type]+0;
//echo "ipalimType=$ipalimType<br>";
//msisdn
$iMsisdn=$tmpRow[msisdn];
echo "\n <TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD>MSISDN Public</TD>";
echo "<TD>";
//private do not have the MSISDN Public
if($ipalimType == 0)
echo "<input readonly type=\"text\" name=\"iMsisdn\" maxlength=\"15\" value=\"N/A\" size=\"28\" class=\"text\">";
else
echo "<input type=\"text\" name=\"iMsisdn\" maxlength=\"15\" value=\"$iMsisdn\" size=\"28\" class=\"text\">";
echo "</TD>";
echo "<TD>MSISDN=CC+NDC+SN</TD>";
echo "</TR>";
//msisdn extern
$iMsisdn_extern=$tmpRow[msisdn_extern];
echo "\n <TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD>MSISDN Private</TD>";
echo "<TD>";
if($ipalimType == 1)
echo "<input type=\"text\" readonly name=\"iMsisdn_extern\" maxlength=\"15\" value=\"N/A\" size=\"28\" class=\"text\">";
else
echo "<input type=\"text\" name=\"iMsisdn_extern\" maxlength=\"15\" value=\"$iMsisdn_extern\" size=\"28\" class=\"text\">";
echo "</TD>";
echo "<TD>&nbsp;</TD>";
echo "</TR>";
//tmsi
$iTmsi=$tmpRow[tmsi];
echo "\n <TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD>TMSI</TD>";
echo "<TD>";
echo "$iTmsi&nbsp;";
//echo "<input type=\"text\" name=\"iTmsi\" maxlength=\"15\" readonly value=\"$iTmsi\" size=\"28\" class=\"text\">";
echo "</TD>";
echo "<TD>&nbsp;</TD>";
echo "</TR>";
//lai
$iLai=$tmpRow[lai];
echo "\n <TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD>MCC-MNC-LAC-CI</TD>";
echo "<TD>";
$lai_mcc=substr($iLai,0,3);
$lai_mnc=substr($iLai,3,3);
$lai_lai=substr($iLai,6,4);
$lai_ci=substr($iLai,10,4);
echo "$lai_mcc-$lai_mnc-$lai_lai-$lai_ci&nbsp;";
//echo "<input type=\"text\" name=\"iLai\" maxlength=\"15\" readonly value=\"$iLai\" size=\"28\" class=\"text\">";
echo "</TD>";
echo "<TD>&nbsp;</TD>";
echo "</TR>";
//type
$ipalimTypeDef=array(
array('0','Private'),
array('1','Public'),
array('2','Hybrid')
);
$ipalimType =$tmpRow[type];
echo "\n <TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD>Type</TD>";
echo "<TD>";
echo "<select name=\"iType\" size=\"1\" onChange=\"javascript:changeType();\">";
for($i=0;$i<sizeof($ipalimTypeDef);$i++)
{
if($ipalimTypeDef[$i][0] == $ipalimType)
{
echo "<option value=\"{$ipalimTypeDef[$i][0]}\" selected>{$ipalimTypeDef[$i][1]}</option>";
}
else
{
echo "<option value=\"{$ipalimTypeDef[$i][0]}\">{$ipalimTypeDef[$i][1]}</option>";
}
}
echo "</select>";
echo "</TD>";
echo "<TD>&nbsp;</TD>";
echo "</TR>";
?>
</TABLE>
<?php
//*****************************************?????,?????****************************************
echo "\n<input type=\"hidden\" name=\"dataTypeNo\" value=\"$dataTypeNo\">";
echo "\n<input type=\"hidden\" name=\"keyFieldName\" value=\"$indexFieldName\">";
echo "\n<input type=\"hidden\" name=\"keyValue\" value=\"$keyValue\">";
?>
</form>
&nbsp;
<?php
adjust_content_tail("down");
?>
</body>
</html>
<?php
flush();
?>
+477
View File
@@ -0,0 +1,477 @@
<?php
/*********************************************************
程序说明:
功能说明:pps用户数据维护专用页面
1、将用户数据表的数据导入到临时参数表。
2、修改的用户数据保存到临时参数表中,
3、设置用户参数时,返回值将修改用户表和临时表。
调用关系:调用: header.inc
变量说明:
输入变量:
$keyValue :由用户列表传来
$sysId :由用户列表传来或本页面指定
$dataTypeNo :数据类型,0=用户数据,1=冲值卡数据
$language :语言种类
$canSetNum :每次最多可以修改的字段个数
作者:
修改注释:
NO.1
姓名:
修改说明:将过期时间(expiration_date)的改成只读模式。
No.2
Name: Lilong
Date: Wednesday, March 24, 2004
Description: Modify supporting R7.0
No.3
Name: CuiTicun Date:2004-04-09
Description: Modify supporting R7.0
No.4
Name: Lilong Date:2004-7-2
Description: delete voice prompt 1
No.5
Name: CUiTicun Date:2004-7-20
Description: Mofify "recharge failed times、overdraft、
access day、SM inquiry counter、favorite
number counter"readonly
No.6
Name: CUiTicun Date:2004-8-29
Description:
*********************************************************
* No.7
* Name: Arwean Date:2005-12-06
* Description: Change the PPS Web into this MNP Web,
* Delete those items which MNP doesn't need.
*********************************************************
*********************************************************/
require("../../inc/header.inc");
$DEBUG = 0;
if($DEBUG) echo "<br>正在调试中,给您的工作带来不便,请原谅!!^_^";
//==========================================================
//变量定义
//==========================================================
$canwrite_flag=checkWritePrivilege();
$pubDb = 'OMC_PUB';
$sysSubsConfTable = 'OMC_PUB.sysSubsConf';
$systemConfTable = 'OMC_PUB.sysConf';
$nReadComm = 1;
$nChangeComm = 2;
$nCreateComm = 3;
$nDeleteComm = 4;
$nLoadIndexComm = 5;
$maxLevelNum = 10;
$nInteger = 2;
$nAscStr = 3;
$nHexStr = 4;
//==========================================================
//输入变量
//==========================================================
$canSetNum = isset($canSetNum) ? $canSetNum : 'all';
//显示用户数据编辑页面,需要的变量
if($DEBUG)
{
echo "<br>sysId=$sysId";
echo "<br>canSetNum=$canSetNum";
echo "<br>keyValue=$keyValue";
echo "<br>sysTypeNo=$sysTypeNo";
echo "<br>sysNo=$sysNo";
echo "<br>subSysNo=$subSysNo";
echo "<br>dataTypeNo=$dataTypeNo";
}
//例如:
//$canSetNum =1; // 或= 'all'
//$sysId='330_0_0';
//$keyValue= '0460022157127016';
//操作类型变量
if($DEBUG)
{
echo "<br>isRead=$isRead";
echo "<br>isChange=$isChange";
echo "<br>isCreate=$isCreate";
echo "<br>isDelete=$isDelete";
echo "<br>isLoadIndex=$isLoadIndex";
//保存用户数据修改的数据
echo "<br>bgnNo=$bgnNo";
echo "<br>endNo=$endNo";
}
//---------定义需要编辑保存的字段-------
//$showAttrDef=array(array('fieldName'=>'','inputName'=>'');
$showAttrDef=array(
array('fieldName'=>'msisdn', 'inputName'=>'iMsisdn'),
array('fieldName'=>'status', 'inputName'=>'iStatus'),
array('fieldName'=>'routing_number', 'inputName'=>'iRoutingNumber'),
array('fieldName'=>'donor', 'inputName'=>'iDonor'),
array('fieldName'=>'recipient', 'inputName'=>'iRecipient'),
array('fieldName'=>'date', 'inputName'=>'iDate')
);
//检查各个需要编辑的输入单元
if($DEBUG && $_SERVER['REQUEST_METHOD'] == "POST")
{
for($i=0;$i<sizeof($showAttrDef);$i++)
{
$inputName =$showAttrDef[$i][inputName];
$inputValue =${$inputName};
echo "<br>$inputName,$inputValue";
if(strlen($inputValue))
{
echo "<br>$inputName = $inputValue";
}
else
{
echo "<br>Can not find $inputName's value";
}
}
exit();
}
//处理每个输入单元的值,组成各个需要编辑的字段值
if($_SERVER['REQUEST_METHOD'] == "POST")
{
$msisdn = $iMsisdn;
$status = $iStatus;
$routing_number = $iRoutingNumber;
$donor = $iDonor;
$recipient = $iRecipient;
$date = $iDate;
//格式化每个需要保存的字段,以便数据处理模块处理
$bgnNo=0;
$endNo=0;
for($i=$bgnNo;$i<sizeof($showAttrDef);$i++)
{
if($oldFieldName == $showAttrDef[$i][fieldName])
{
continue;
}
$oldFieldName = $showAttrDef[$i][fieldName];
${'checkBox_'.$endNo} =1;
${'fieldName_'.$endNo}=$oldFieldName;
${'editValue_'.$endNo}=${$oldFieldName};
if($DEBUG)
{
echo "<br>checkBox_$endNo = ${'checkBox_'.$endNo}";
echo "<br>fieldName_$endNo = ${'fieldName_'.$endNo}";
echo "<br>editValue_$endNo = ${'editValue_'.$endNo}";
}
$endNo++;
}
}
//==========================================================
//数据处理
//==========================================================
if (1 == $isLoadIndex)
{
$fieldNameList = "msisdn,status,routing_number,donor,recipient,date";
}
else
{
$fieldNameList = "ALL";
}
if ($DEBUG) echo "fieldNameList=$fieldNameList<br>";
?>
<base target="_self">
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
require("../pubSubsMng/sendComm.inc");
//exit();
require("../pubSubsMng/dataProc.inc");
//==========================================================
//输出并显示数据
//==========================================================
$seqNo=0;
?>
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
echo "<br>";
//**********************************编辑参数时所用javascript*****************************************
?>
<script LANGUAGE="JavaScript">
function selCheckBox(thisCheckBox)
{
if(thisCheckBox.checked == true)
{
thisCheckBox.value=1;
}
else
{
thisCheckBox.value=0;
}
}
function askSureToDel(keyName,keyId)
{
var answer = confirm("Are you sure to delete this subscriber( "+keyName+"="
+ keyId + ") from <?php echo"$sysTypeName";?> server?");
if (answer == true)
{
window.location.href = "<?php echo "$PHP_SELF?sysId=$sysId&dataTypeNo=$dataTypeNo&bufferNo=$bufferNo&keyValue=$keyValue&isDelete=1";?>";
//alert('Try to send delete command');
}
else
{
return(false);
}
}
</script>
<FORM method="POST" name="update" action="<?php echo"$PHP_SELF";?>" >
<!--***************** TABLE START:: DISPLAY SELECT HEADER **************-->
<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
<TR>
<TD><NOBR>Server ID:
<SELECT name="sysId" size="1">
<?php
$selSysIdSql="SELECT sysNo,subSysNo,sysTypeName
FROM sysInfo,sysConf
WHERE sysInfo.sysTypeNo='$sysTypeNo' AND sysConf.sysTypeNo='$sysTypeNo'
ORDER BY baseStat DESC,updateTime DESC
";
if($DEBUG) echo "<br>$selSysIdSql";
$sysIdResult=mysqli_query($pubConn,$selSysIdSql);
echo mysqli_error($pubConn);
while($sysIdRows=mysqli_fetch_array($sysIdResult)){
echo "<option value=\"$sysTypeNo"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]\"";
if(($sysNo == $sysIdRows[sysNo]) && ($subSysNo == $sysIdRows[subSysNo]))
echo " selected";
echo " >$sysIdRows[sysTypeName]"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]";
echo "</option>";
}
?>
</SELECT>
</NOBR></TD>
<TD><NOBR>
<?php
$showkeyValue= $keyValue;
$keyValueName='MSISDN';
echo "&nbsp;&nbsp;$keyValueName:$showkeyValue";
?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</NOBR></TD>
<?php
if($isTryCreate > 0)
{
?>
<TD>
<input type="submit" value="Create in <?php echo "$sysTypeName"?>" name="create" title="Add a new subscriber" class="button" onClick="javascript:document.update.isCreate.value=1;">
<input type="hidden" value="0" name="isCreate">
<input type="hidden" value="0" name="isChange">
</TD>
<?php
$myPrivilege = $userInfo[privilege];
if($myPrivilege >=4)
{
?>
<TD>
&nbsp;&nbsp;&nbsp;
<input type="submit" value="Create in OMC" name="create" title="" class="button" onClick="javascript:document.update.isCreate.value=2;">
</TD>
<?php
}
?>
<?php
}
else
{
?>
<TD>
<input type="submit" value="Get" name="read" title="Read this subscriber" class="button" onClick="javascript:document.update.isRead.value=1;">
<input type="hidden" value="0" name="isRead">
</TD>
<TD>
<?php
if($canwrite_flag)
echo "<input type=\"submit\" value=\"Set\" name=\"change\" title=\"Change this subscriber\" class=\"button\" onClick=\"javascript:document.update.isChange.value=1;\">";
else
echo "<input type=\"submit\" disabled value=\"Set\" name=\"change\" title=\"Change this subscriber\" class=\"button\" onClick=\"javascript:document.update.isChange.value=1;\">";
?>
<input type="hidden" value="0" name="isChange">
<input type="hidden" value="0" name="isCreate">
</TD>
<TD>
<?php
if($canwrite_flag)
echo "<input type=\"button\" value=\"Delete\" name=\"delete\" title=\"Delete this subscriber\" class=\"button\" onClick=\"askSureToDel('$keyValueName','$keyValue');\">";
else
echo "<input type=\"button\" disabled value=\"Delete\" name=\"delete\" title=\"Delete this subscriber\" class=\"button\" onClick=\"askSureToDel('$keyValueName','$keyValue');\">";
?>
<input type="hidden" value="0" name="isDelete">
</TD>
<?php
}
?>
<TD width="100%">&nbsp;</TD>
</TR>
</TABLE>
<!--***************** TABLE END:: DISPLAY SELECT HEADER ************** -->
<BR>
<!--***************** TABLE START:: DISPLAY USER DETAILS ************** -->
<TABLE border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
<TR bgcolor="#E6E6E6">
<TD width="5%"> No.</TD>
<TD width="25%">Name</TD>
<TD width="20%">Value</TD>
<TD width="50%">Description</TD>
</TR>
<?php
//msisdn
if($isTryCreate > 0){
// echo "$tmpRow[msisdn],$tmpRow[msisdn],$tmpRow[msisdn]<br>";
$msisdn=$tmpRow[msisdn];
echo "\n <TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD>MSISDN</TD>";
echo "<TD>";
echo "<input type=\"text\" name=\"iMsisdn\" maxlength=\"16\" size=\"28\" value=\"\" class=\"text\">";
echo "</TD>";
echo "<TD>MSISDN = phone number of the subscriber. Includes the country code and area code,len should be 9-16</TD>";
echo "</TR>";
}else{
echo "<input type=\"hidden\" name=\"iMsisdn\" value=\"$keyValue\">";
}
//Subscriber status
$statusDef=array(
array('02','own ported out'),
array('03','foreign ported in'),
array('04','foreign ported to third party')
);
$status =$tmpRow[status];
echo "\n <TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD>Status</TD>";
echo "<TD>";
echo "<select name=\"iStatus\" size=\"1\">";
for($i=0;$i<sizeof($statusDef);$i++)
{
if($statusDef[$i][0] == $status)
{
echo "<option value=\"{$statusDef[$i][0]}\" selected>{$statusDef[$i][1]}</option>";
}
else
{
echo "<option value=\"{$statusDef[$i][0]}\">{$statusDef[$i][1]}</option>";
}
}
echo "</select>";
echo "</TD>";
//echo "<TD>2 = Own ported out<br>3 = Foreign ported in<br>4 = Foreign ported to third party</TD>";
echo "<TD>&nbsp;</TD>";
echo "</TR>";
//Routing number
$iRoutingNumber=substr($tmpRow[routing_number],0,8);
echo "\n <TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD>Routing number</TD>";
echo "<TD>";
echo "<input type=\"text\" name=\"iRoutingNumber\" maxlength=\"8\" value=\"$iRoutingNumber\" size=\"28\" class=\"text\">";
echo "</TD>";
echo "<TD>";
echo "Routing number, the length should be 1-8";
echo "</TD>";
echo "</TR>";
//Donor
$iDonor=substr($tmpRow[donor],0,16);
echo "\n<TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD> Donor </TD>";
echo "<TD>";
echo "<input type=\"text\" name=\"iDonor\" maxlength=\"16\" value=\"$iDonor\" size=\"28\" class=\"text\">";
echo "</TD>";
echo "<TD>";
echo "Donor network of the ported subscriber, <br>the length should be 1-16.";
echo "</TD>";
echo "</TR>";
//Recipient
$iRecipient=substr($tmpRow[recipient],0,16);
echo "\n<TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD> Recipient </TD>";
echo "<TD>";
echo "<input type=\"text\" name=\"iRecipient\" maxlength=\"16\" value=\"$iRecipient\" size=\"28\" class=\"text\">";
echo "</TD>";
echo "<TD>";
echo "Recipient network of the ported subscriber, <br>the length should be 1-16.";
echo "</TD>";
echo "</TR>";
//Date
if($isTryCreate>0)
{
$iDate = date("YmdHis");
}
else
{
$iDate = $tmpRow[date];
}
$iDate = substr($iDate,0,8);
echo "\n <TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD>Date</TD>";
echo "<TD>";
echo "<input type=\"text\" name=\"iDate\" maxlength=\"14\" value=\"$iDate\" size=\"28\" class=\"text\">";
//echo "$date";
echo "</TD>";
echo "<td>Port date, the format is Year Month Day.<br>Such as 20050102 indicates 2005-01-02.</td>";
echo "</TR>";
?>
</TABLE>
<?php
//*****************************************隐藏输入框,用于传递值****************************************
echo "\n<input type=\"hidden\" name=\"dataTypeNo\" value=\"$dataTypeNo\">";
echo "\n<input type=\"hidden\" name=\"keyFieldName\" value=\"$indexFieldName\">";
echo "\n<input type=\"hidden\" name=\"keyValue\" value=\"$keyValue\">";
?>
</form>
&nbsp;
<?php
adjust_content_tail("down");
?>
</body>
</html>
<?php
flush();
?>
+472
View File
@@ -0,0 +1,472 @@
<?php
/*************************
IMDM subscriber management
**************************/
require("../../inc/header.inc");
$DEBUG = 0;
//==========================================================
//变量定义
//==========================================================
$canwrite_flag=checkWritePrivilege();
$pubDb = 'OMC_PUB';
$sysSubsConfTable = 'OMC_PUB.sysSubsConf';
$systemConfTable = 'OMC_PUB.sysConf';
$nReadComm = 1;
$nChangeComm = 2;
$nCreateComm = 3;
$nDeleteComm = 4;
$nLoadIndexComm = 5;
$maxLevelNum = 10;
$nInteger = 2;
$nAscStr = 3;
$nHexStr = 4;
//==========================================================
//输入变量
//==========================================================
$canSetNum = isset($canSetNum) ? $canSetNum : 'all';
//显示用户数据编辑页面,需要的变量
if($DEBUG)
{
echo "<br>sysId=$sysId";
echo "<br>canSetNum=$canSetNum";
echo "<br>keyValue=$keyValue";
echo "<br>sysTypeNo=$sysTypeNo";
echo "<br>sysNo=$sysNo";
echo "<br>subSysNo=$subSysNo";
echo "<br>dataTypeNo=$dataTypeNo";
}
//操作类型变量
if($DEBUG)
{
echo "<br>isRead=$isRead";
echo "<br>isChange=$isChange";
echo "<br>isCreate=$isCreate";
echo "<br>isDelete=$isDelete";
echo "<br>isLoadIndex=$isLoadIndex";
//保存用户数据修改的数据
echo "<br>bgnNo=$bgnNo";
echo "<br>endNo=$endNo";
}
//---------定义需要编辑保存的字段-------
//$showAttrDef=array(array('fieldName'=>'','inputName'=>'');
$showAttrDef=array(
array('fieldName'=>'msisdn', 'inputName'=>'iMsisdn'),
array('fieldName'=>'imsi', 'inputName'=>'iImsi'),
array('fieldName'=>'imei', 'inputName'=>'iImei'),
array('fieldName'=>'oprFlag', 'inputName'=>'iOprFlag'),
array('fieldName'=>'class','inputName'=>'iClass')
//array('fieldName'=>'type', 'inputName'=>'iType'),
//array('fieldName'=>'status', 'inputName'=>'iStatus')
);
//检查各个需要编辑的输入单元
if($DEBUG && $_SERVER['REQUEST_METHOD'] == "POST")
{
for($i=0;$i<sizeof($showAttrDef);$i++)
{
$inputName =$showAttrDef[$i][inputName];
$inputValue =${$inputName};
echo "<br>$inputName,$inputValue";
if(strlen($inputValue))
{
echo "<br>$inputName = $inputValue";
}
else
{
echo "<br>Can not find $inputName's value";
}
}
exit();
}
//处理每个输入单元的值,组成各个需要编辑的字段值
if($_SERVER['REQUEST_METHOD'] == "POST")
{
$msisdn = $iMsisdn;
$imei = $iImei;
$imsi = $iImsi;
$oprFlag = $iOprFlag;
$type = $iType;
$status = $iStatus;
$oprClass = $iClass;
//格式化每个需要保存的字段,以便数据处理模块处理
$bgnNo=0;
$endNo=0;
for($i=$bgnNo;$i<sizeof($showAttrDef);$i++)
{
if($oldFieldName == $showAttrDef[$i][fieldName])
{
continue;
}
$oldFieldName = $showAttrDef[$i][fieldName];
${'checkBox_'.$endNo} =1;
${'fieldName_'.$endNo}=$oldFieldName;
${'editValue_'.$endNo}=${$oldFieldName};
if($DEBUG)
{
echo "<br>checkBox_$endNo = ${'checkBox_'.$endNo}";
echo "<br>fieldName_$endNo = ${'fieldName_'.$endNo}";
echo "<br>editValue_$endNo = ${'editValue_'.$endNo}";
}
$endNo++;
}
}
//==========================================================
//数据处理
//==========================================================
if (1 == $isLoadIndex)
{
$fieldNameList = "msisdn,imei,imsi,oprFlag,class";
}
else
{
$fieldNameList = "ALL";
}
if ($DEBUG) echo "fieldNameList=$fieldNameList<br>";
?>
<base target="_self">
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?
require("../pubSubsMng/sendComm.inc");
//exit();
require("../pubSubsMng/dataProc.inc");
//==========================================================
//输出并显示数据
//==========================================================
$seqNo=0;
?>
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
echo "<br>";
//**********************************编辑参数时所用javascript*****************************************
?>
<script LANGUAGE="JavaScript">
function selCheckBox(thisCheckBox)
{
if(thisCheckBox.checked == true)
{
thisCheckBox.value=1;
}
else
{
thisCheckBox.value=0;
}
}
function askSureToDel(keyName,keyId)
{
var answer = confirm("Are you sure to delete this subscriber( "+keyName+"="
+ keyId + ") from <?php echo"$sysTypeName";?> server?");
if (answer == true)
{
window.location.href = "<?php echo "$PHP_SELF?sysId=$sysId&dataTypeNo=$dataTypeNo&bufferNo=$bufferNo&keyValue=$keyValue&isDelete=1";?>";
//alert('Try to send delete command');
}
else
{
return(false);
}
}
</script>
<FORM method="POST" name="update" action="<?php echo"$PHP_SELF";?>" >
<!--***************** TABLE START:: DISPLAY SELECT HEADER **************-->
<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
<TR>
<TD><NOBR>Server ID:
<SELECT name="sysId" size="1">
<?php
$selSysIdSql="SELECT sysNo,subSysNo,sysTypeName
FROM sysInfo,sysConf
WHERE sysInfo.sysTypeNo='$sysTypeNo' AND sysConf.sysTypeNo='$sysTypeNo'
ORDER BY baseStat DESC,updateTime DESC
";
if($DEBUG) echo "<br>$selSysIdSql";
$sysIdResult=mysqli_query($pubConn,$selSysIdSql);
echo mysqli_error($pubConn);
while($sysIdRows=mysqli_fetch_array($sysIdResult)){
echo "<option value=\"$sysTypeNo"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]\"";
if(($sysNo == $sysIdRows[sysNo]) && ($subSysNo == $sysIdRows[subSysNo]))
echo " selected";
echo " >$sysIdRows[sysTypeName]"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]";
echo "</option>";
}
?>
</SELECT>
</NOBR></TD>
<TD><NOBR>
<?php
$showkeyValue= $keyValue;
$keyValueName='msisdn';
echo "&nbsp;&nbsp;$keyValueName:$showkeyValue";
?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</NOBR></TD>
<?php
if($isTryCreate > 0)
{
?>
<TD>
<input type="submit" value="Create in <?php echo "$sysTypeName"?>" name="create" title="Add a new subscriber" class="button" onClick="javascript:document.update.isCreate.value=1;">
<input type="hidden" value="0" name="isCreate">
<input type="hidden" value="0" name="isChange">
</TD>
<?php
$myPrivilege = $userInfo[privilege];
if($myPrivilege >=4)
{
?>
<TD>
&nbsp;&nbsp;&nbsp;
<input type="submit" value="Create in OMC" name="create" title="" class="button" onClick="javascript:document.update.isCreate.value=2;">
</TD>
<?php
}
?>
<?php
}
else
{
?>
<TD>
<input type="submit" value="Get" name="read" title="Read this subscriber" class="button" onClick="javascript:document.update.isRead.value=1;">
<input type="hidden" value="0" name="isRead">
</TD>
<TD>
<?php
if($canwrite_flag)
echo "<input type=\"submit\" value=\"Set\" name=\"change\" title=\"Change this subscriber\" class=\"button\" onClick=\"javascript:document.update.isChange.value=1;\">";
else
echo "<input type=\"submit\" disabled value=\"Set\" name=\"change\" title=\"Change this subscriber\" class=\"button\" onClick=\"javascript:document.update.isChange.value=1;\">";
?>
<input type="hidden" value="0" name="isChange">
<input type="hidden" value="0" name="isCreate">
</TD>
<TD>
<?php
if($canwrite_flag)
echo "<input type=\"button\" value=\"Delete\" name=\"delete\" title=\"Delete this subscriber\" class=\"button\" onClick=\"askSureToDel('$keyValueName','$keyValue');\">";
else
echo "<input type=\"button\" disabled value=\"Delete\" name=\"delete\" title=\"Delete this subscriber\" class=\"button\" onClick=\"askSureToDel('$keyValueName','$keyValue');\">";
?>
<input type="hidden" value="0" name="isDelete">
</TD>
<?php
}
?>
<TD width="100%">&nbsp;</TD>
</TR>
</TABLE>
<!--***************** TABLE END:: DISPLAY SELECT HEADER ************** -->
<BR>
<!--***************** TABLE START:: DISPLAY USER DETAILS ************** -->
<TABLE border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
<TR bgcolor="#E6E6E6">
<TD width="5%"> No.</TD>
<TD width="25%">Name</TD>
<TD width="20%">Value</TD>
<TD width="50%">Description</TD>
</TR>
<?php
//msisdn
if($isTryCreate > 0){
// echo "$tmpRow[msisdn],$tmpRow[msisdn],$tmpRow[msisdn]<br>";
$msisdn=$tmpRow[msisdn];
echo "\n <TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD>MSISDN</TD>";
echo "<TD>";
echo "<input type=\"text\" name=\"iMsisdn\" maxlength=\"16\" size=\"28\" value=\"\" class=\"text\">";
echo "</TD>";
echo "<TD>MSISDN=CC+NDC+SN</TD>";
echo "</TR>";
}else{
echo "<input type=\"hidden\" name=\"iMsisdn\" value=\"$keyValue\">";
}
//imsi
$iImsi=$tmpRow[imsi];
echo "\n <TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD>IMSI</TD>";
echo "<TD>";
echo "<input type=\"text\" name=\"iImsi\" maxlength=\"15\" value=\"$iImsi\" size=\"28\" class=\"text\">";
echo "</TD>";
echo "<TD>";
echo "15-digit IMSI";
echo "</TD>";
echo "</TR>";
//imei
$iImei=$tmpRow[imei];
echo "\n <TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD>IMEI</TD>";
echo "<TD>";
echo "<input type=\"text\" name=\"iImei\" maxlength=\"15\" value=\"$iImei\" size=\"28\" class=\"text\">";
echo "</TD>";
echo "<TD>";
echo "15-digit IMEI (For OPR use only)";
echo "</TD>";
echo "</TR>";
//opr Flag
$oprFlagDef=array(
array('00','OPR-0'),//array('00','Not Registered'),
array('01','OPR-1'),//array('01','OprStateWithoutRoamingAgreement'),
array('02','OPR-2a'),//array('02','OprStateWithRoamingAgreement'),
array('03','OPR-2b'),//array('03','RoamingState'),
array('04','IMDX-P1'),
array('05','IMDX-P2'),
array('06','IMDX-H')
);
$oprFlag =$tmpRow[oprFlag];
echo "\n <TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD>User Status</TD>";
echo "<TD>";
echo "<select name=\"iOprFlag\" size=\"1\">";
for($i=0;$i<sizeof($oprFlagDef);$i++)
{
if($oprFlagDef[$i][0] == $oprFlag)
{
echo "<option value=\"{$oprFlagDef[$i][0]}\" selected>{$oprFlagDef[$i][1]}</option>";
}
else
{
echo "<option value=\"{$oprFlagDef[$i][0]}\">{$oprFlagDef[$i][1]}</option>";
}
}
echo "</select>";
echo "</TD>";
echo "<TD>";
echo "OPR-0 = Not in use (Fresh)<br>";//"Initial status of a new created or imported OPR account. The associated MSISDN will be allocated to an auto-registered subscriber.<br>";
echo "OPR-1 = In use: without roaming agreement<br>";//"OPR subscriber is from PLMN without roaming agreement. <br>";
echo "OPR-2a = In use: with roaming agreement (OPR)<br>";//"OPR subscriber is from PLMN with roaming agreement. <br>";
echo "OPR-2b = In use: with roaming agreement (Roaming)<br>";//"OPR subscriber is from PLMN with roaming agreement. But its current application status is switched to roaming mode.";
echo "IMDX-P1 = IMDX Private Ordinary<br>";
echo "IMDX-P2 = IMDX Private Premium<br>";
echo "IMDX-H = IMDX Hybrid<br>";
echo "</TD>";
echo "</TR>";
//class
$oprClass_label=array(0=>"Ordinary",1=>"Premium",2=>"VIP");
$oprClass =$tmpRow['class'];
echo "\n <TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD>Class</TD>";
echo "<TD>";
echo "{$oprClass_label[$oprClass]}";
echo "</TD>";
echo "<TD>";
echo "Class";
echo "</TD>";
echo "</TR>";
//type
/*
$typeDef=array(
array('00','Trial'),
array('01','Normal')
);
$type =$tmpRow[type];
echo "\n <TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD>Type</TD>";
echo "<TD>";
echo "<select name=\"iType\" size=\"1\">";
for($i=0;$i<sizeof($typeDef);$i++)
{
if($typeDef[$i][0] == $type)
{
echo "<option value=\"{$typeDef[$i][0]}\" selected>{$typeDef[$i][1]}</option>";
}
else
{
echo "<option value=\"{$typeDef[$i][0]}\">{$typeDef[$i][1]}</option>";
}
}
echo "</select>";
echo "</TD>";
echo "<TD>&nbsp;</TD>";
echo "</TR>";
*/
/*
//status
$statusDef=array(
array('00','Idle'),
array('01','Msisdn Allocated'),
array('02','Msisdn Registered')
);
$status =$tmpRow[status];
echo "\n <TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD>MSISDN Status</TD>";
echo "<TD>";
echo "<select name=\"iStatus\" size=\"1\">";
for($i=0;$i<sizeof($statusDef);$i++)
{
if($statusDef[$i][0] == $status)
{
echo "<option value=\"{$statusDef[$i][0]}\" selected>{$statusDef[$i][1]}</option>";
}
else
{
echo "<option value=\"{$statusDef[$i][0]}\">{$statusDef[$i][1]}</option>";
}
}
echo "</select>";
echo "</TD>";
echo "<TD>&nbsp;</TD>";
echo "</TR>";
*/
?>
</TABLE>
<?php
//*****************************************隐藏输入框,用于传递值****************************************
echo "\n<input type=\"hidden\" name=\"dataTypeNo\" value=\"$dataTypeNo\">";
echo "\n<input type=\"hidden\" name=\"keyFieldName\" value=\"$indexFieldName\">";
echo "\n<input type=\"hidden\" name=\"keyValue\" value=\"$keyValue\">";
?>
</form>
&nbsp;
<?php
adjust_content_tail("down");
?>
</body>
</html>
<?php
flush();
?>
+43
View File
@@ -0,0 +1,43 @@
[para]0[Name]MSISDN
[sqlName]msisdn[t]input[unit]MSISDN[u]00.0-15.7[u]
[v]keepAsc-low-E
[remark]
MSISDN=CC+NDC+SN
[para]1[Name]IMSI
[sqlName]imsi[t]input[unit]IMSI[u]00.0-14.7[u]
[v]keepAsc-low-E
[remark]
15-digit IMSI
[para]2[Name]IMEI
[sqlName]imei[t]input[unit]IMEI[u]00.0-14.7[u]
[v]keepAsc-low-E
[remark]
15-digit IMEI (For OPR use only)
[para]3[Name]User Status
[sqlName]oprFlag[t]select[unit]User Status[u]00.0-00.7[u]keepAsc
[v]0[opt]OPR-0
[v]1[opt]OPR-1
[v]2[opt]OPR-2a
[v]3[opt]OPR-2b
[v]4[opt]IMDX-P1
[v]5[opt]IMDX-P2
[v]6[opt]IMDX-H
[remark]
OPR-0 = Not in use (Fresh)
OPR-1 = In use: without roaming agreement
OPR-2a = In use: with roaming agreement (OPR)
OPR-2b = In use: with roaming agreement (Roaming)
IMDX-P1 = IMDX Private Ordinary
IMDX-P2 = IMDX Private Premium
IMDX-H = IMDX Hybrid
[para]4[Name]Class
[sqlName]class[t]show[unit]Class[u]00.0-00.7[u]
[v]0[opt]Ordinary
[v]1[opt]Premium
[v]2[opt]VIP
[remark]
Class
+396
View File
@@ -0,0 +1,396 @@
<?php
/*********************************************************
程序说明:
功能说明:pps用户数据维护专用页面
1、将用户数据表的数据导入到临时参数表。
2、修改的用户数据保存到临时参数表中,
3、设置用户参数时,返回值将修改用户表和临时表。
调用关系:调用: header.inc
变量说明:
输入变量:
$keyValue :由用户列表传来
$sysId :由用户列表传来或本页面指定
$dataTypeNo :数据类型,0=用户数据,1=冲值卡数据
$language :语言种类
$canSetNum :每次最多可以修改的字段个数
作者:
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$DEBUG = 0;
if($DEBUG) echo "<br>正在调试中,给您的工作带来不便,请原谅!!:)";
//==========================================================
//变量定义
//==========================================================
$pubDb = 'OMC_PUB';
$sysSubsConfTable ='OMC_PUB.sysSubsConf';
$systemConfTable = 'OMC_PUB.sysConf';
$nReadComm = 1;
$nChangeComm = 2;
$nCreateComm = 3;
$nDeleteComm = 4;
$nLoadIndexComm = 5;
$maxLevelNum = 10;
$nInteger = 2;
$nAscStr = 3;
$nHexStr = 4;
//------------选择语言版本----------
if($language == 'eng'){
}else{
}
$userTypeDef=array(
//array('Name', 'offset','remark'),
array('rent01', '00.0' ,'rent01'),
array('rent02', '00.1' ,'rent02'),
array('rent03', '00.2' ,'rent03'),
array('rent04', '00.3' ,'rent04'),
array('rent05', '00.4' ,'rent05'),
array('rent06', '00.5' ,'rent06'),
array('rent07', '00.6' ,'rent07'),
array('rent08', '00.7' ,'rent08')
);
//select sum(balance) from user_info
//==========================================================
//输入变量
//==========================================================
$canSetNum = isset($canSetNum)?$canSetNum:'all';
//显示用户数据编辑页面,需要的变量
if($DEBUG) echo "<br>sysId=$sysId";
if($DEBUG) echo "<br>canSetNum=$canSetNum";
if($DEBUG) echo "<br>keyValue=$keyValue";
if($DEBUG) echo "<br>sysTypeNo=$sysTypeNo";
if($DEBUG) echo "<br>sysNo=$sysNo";
if($DEBUG) echo "<br>subSysNo=$subSysNo";
if($DEBUG) echo "<br>dataTypeNo=$dataTypeNo";
//例如:
//$canSetNum =1; // 或= 'all'
//$sysId='330_0_0';
//$keyValue= '0460022157127016';
//操作类型变量
if($DEBUG) echo "<br>isRead=$isRead";
if($DEBUG) echo "<br>isChange=$isChange";
if($DEBUG) echo "<br>isCreate=$isCreate";
if($DEBUG) echo "<br>isDelete=$isDelete";
if($DEBUG) echo "<br>isLoadIndex=$isLoadIndex";
//保存用户数据修改的数据
if($DEBUG) echo "<br>bgnNo=$bgnNo";
if($DEBUG) echo "<br>endNo=$endNo";
//---------定义需要编辑保存的字段-------
//$showAttrDef=array(array('fieldName'=>'','inputName'=>'');
$showAttrDef=array(
array('fieldName'=>'card_no', 'inputName'=>'cardNo'),
array('fieldName'=>'card_hrn', 'inputName'=>'password'),
array('fieldName'=>'face_value', 'inputName'=>'faceValue'),
array('fieldName'=>'card_status', 'inputName'=>'cardStatus'),
array('fieldName'=>'expiry_date', 'inputName'=>'expiryDate'),
array('fieldName'=>'valid_time', 'inputName'=>'validTime'),
array('fieldName'=>'msisdn_used', 'inputName'=>'msisdnUsed'),
array('fieldName'=>'update_date', 'inputName'=>'updateDate')
);
//检查各个需要编辑的输入单元
if($DEBUG && $_SERVER['REQUEST_METHOD'] == "POST"){
for($i=0;$i<sizeof($showAttrDef);$i++){
$inputName =$showAttrDef[$i][inputName];
$inputValue =${$inputName};
if(strlen($inputValue)){
echo "<br>$inputName = $inputValue";
}else{
echo "<br>Can not find $inputName's value";
}
}
}
//处理各个的输入单元的值,组成各个需要编辑的字段值
if($_SERVER['REQUEST_METHOD'] == "POST"){
$card_no =$cardNo;
$card_hrn =$password;
$face_value =$faceValue;
$card_status =$cardStatus;
$expiry_date =$expiryDate;
$valid_time =$validTime;
$msisdn_used =$msisdnUsed;
$update_date =$updateDate;
//格式化每个需要保存的字段,以便数据处理模块处理
$bgnNo=0;
$endNo=0;
for($i=$bgnNo;$i<sizeof($showAttrDef);$i++){
if($oldFieldName == $showAttrDef[$i][fieldName]){
continue;
}
$oldFieldName = $showAttrDef[$i][fieldName];
${'checkBox_'.$endNo} =1;
${'fieldName_'.$endNo}=$oldFieldName;
${'editValue_'.$endNo}=${$oldFieldName};
if($DEBUG) echo "<br>checkBox_$endNo = ${'checkBox_'.$endNo}";
if($DEBUG) echo "<br>fieldName_$endNo = ${'fieldName_'.$endNo}";
if($DEBUG) echo "<br>editValue_$endNo = ${'editValue_'.$endNo}";
$endNo++;
}
}
//==========================================================
//数据处理
//==========================================================
if (1 == $isLoadIndex) {
$fieldNameList = "card_no,face_value,card_status,expiry_date,valid_time,updated_date,msisdn_used";
} else {
$fieldNameList = "ALL";
}
if ($DEBUG) echo "fieldNameList=$fieldNameList<br>";
?>
<base target="_self">
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
require("../pubSubsMng/sendComm.inc");
require("../pubSubsMng/dataProc.inc");
//添加用户时,各个值置为缺省值
if(strlen($keyValue) == 0){
for($i=0;$i<sizeof($showAttrDef);$i++){
$tmpRow[$showAttrDef[$i][fieldName]]=$showAttrDef[$i][defaultValue];
if($DEBUG) echo "<br>tmpRow[{$showAttrDef[$i][fieldName]}]={$showAttrDef[$i][defaultValue]}";
}
}
//==========================================================
//输出并显示数据
//==========================================================
$seqNo=0;
?>
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
echo "<br>";
//**********************************编辑参数时所用javascript*****************************************
?>
<script LANGUAGE="JavaScript">
function selCheckBox(thisCheckBox)
{
if(thisCheckBox.checked == true){
thisCheckBox.value=1;
}else{
thisCheckBox.value=0;
}
}
function askSureToDel(keyName,keyId)
{
var answer = confirm("Are you sure to delete this subscriber( "+keyName+"="
+ keyId + ") from <?php echo"$sysTypeName";?> server?");
if (answer == true){
window.location.href = "<?php echo "$PHP_SELF?sysId=$sysId&dataTypeNo=$dataTypeNo&bufferNo=$bufferNo&keyValue=$keyValue&isDelete=1";?>";
//alert('Try to send delete command');
}else{
return(false);
}
}
</script>
<form method="POST" name="update" action="<?php echo"$PHP_SELF";?>" >
<?php
//显示用户参数编辑页面
?>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><nobr>
<?php echo "Server Id:"?>
<select name="sysId" size="1">
<?php
$selSysIdSql="SELECT sysNo,subSysNo,sysTypeName
FROM sysInfo,sysConf
WHERE sysInfo.sysTypeNo='$sysTypeNo' AND sysConf.sysTypeNo='$sysTypeNo'
ORDER BY baseStat DESC,updateTime DESC
";
if($DEBUG) echo "<br>$selSysIdSql";
$sysIdResult=mysqli_query($pubConn,$selSysIdSql);
echo mysqli_error($pubConn);
while($sysIdRows=mysqli_fetch_array($sysIdResult)){
echo "<option value=\"$sysTypeNo"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]\"";
if(($sysNo == $sysIdRows[sysNo]) && ($subSysNo == $sysIdRows[subSysNo]))
echo " selected";
echo " >$sysIdRows[sysTypeName]"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]";
echo "</option>";
}
?>
</select>
</nobr>
</td>
<td><nobr>
<?php
$showkeyValue= $keyValue;
$keyValueName='Card No.';
echo "&nbsp;&nbsp;$keyValueName:$showkeyValue";
?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</nobr></td>
<td>
<input type="submit" value="Get" name="read" title="" class="button" onClick="javascript:document.update.isRead.value=1;">
<input type="hidden" value="0" name="isRead">
</td>
<td width="100%">&nbsp;</td>
</tr>
</table>
<br>
<?php
//将已取出的用户数据显示出来
//$tmpRow[fieldName]
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
<tr bgcolor="#E6E6E6">
<td width="5%"> No.</td>
<td width="35%">Name</td>
<td width="20%">Value</td>
<td width="40%">Description</td>
</tr>
<?
//cardNo
$cardNo=$tmpRow[card_no];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Card no.</td>";
echo "<td>";
echo "&nbsp;$cardNo";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//password
$password=$tmpRow[card_hrn];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Password</td>";
echo "<td>";
echo "&nbsp;$password";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//faceValue
$faceValue=$tmpRow[face_value];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Face value</td>";
echo "<td>";
echo "&nbsp;$faceValue";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//card_status
$cardStatus=$tmpRow[card_status];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Card status</td>";
echo "<td>";
if($cardStatus == 0){
echo "&nbsp;fresh";
}else if($cardStatus == 1){
echo "&nbsp;used";
}else if($cardStatus == 2){
echo "&nbsp;suspended";
}
//echo "&nbsp;$cardStatus";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//expiry_date
$expiryDate=$tmpRow[expiry_date];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Expiry date</td>";
echo "<td>";
echo "&nbsp;$expiryDate";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//valid_time
$validTime=$tmpRow[valid_time];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Valid days</td>";
echo "<td>";
echo "&nbsp;$validTime";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//msisdn_used
$msisdn_used=$tmpRow[msisdn_used];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>MSISDN charged</td>";
echo "<td>";
echo "&nbsp;$msisdn_used";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//update_date
$updateDate=$tmpRow[update_date];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Update date</td>";
echo "<td>";
echo "&nbsp;$updateDate";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
?>
</table>
<?php
//*****************************************隐藏输入框,用于传递值****************************************
echo "\n<input type=\"hidden\" name=\"dataTypeNo\" value=\"$dataTypeNo\">";
echo "\n<input type=\"hidden\" name=\"keyFieldName\" value=\"$indexFieldName\">";
echo "\n<input type=\"hidden\" name=\"keyValue\" value=\"$keyValue\">";
?>
</form>
&nbsp;
<?php
adjust_content_tail("down");
?>
</body>
</html>
<?php
flush();
?>
File diff suppressed because it is too large. Load diff
+346
View File
@@ -0,0 +1,346 @@
[para]0[Name]MSISDN
[sqlName]msisdn[t]input[unit]MSISDN[u]00.0-15.7[u]
[v]keepAsc-low-E
[remark]
MSISDN = phone number of the subscriber. Includes the country code and area code,len should be 9-16
[para]1[Name]Password
[sqlName]PIN[t]input[unit]Password[u]00.0-05.7[u]
[v]keepAsc-low-0
[remark]
Pin of the account,only support digits of 0-9
[para]2[Name]Status
[sqlName]status[t]select[unit]Status[u]00.0-00.7[u]
[v]0[opt]Fresh
[v]1[opt]Used
[v]2[opt]Suspend
[v]3[opt]BlackList
[v]4[opt]Released
[v]5[opt]OPR Trial
[remark]
Fresh=not activated, Used=activated, Suspended=suspended from prepaid service, Blacklist=blacklisted, Released=released from service suspension
[para]3[Name]Balance
[sqlName]balance[t]readOnly[unit]Balance[u]00.0-03.7[u]showComma
[v]keepHex-high-0
[remark]
Balance amount of PPS account in the smallest currency unit.
[para]4[Name]Promotion bonus
[sqlName]promo_balance[t]readOnly[unit]Promotion bonus[u]00.0-03.7[u]showComma
[v]keepHex-high-0
[remark]
Promotion balance after recharge specific recharge card in specific period, this value can not be used as periodic charge.
[para]5[Name]Overdraft
[sqlName]overdraft[t]readOnly[unit]Overdraft[u]00.0-02.7[u]showComma
[v]keepHex-high-0
[remark]
Set credit amount of an account, can be positive or negative.
If this value is set to positive then subscriber can use the PPS service until his account balance turn to the negative overdraft value.
If this value is set to negative then subscriber can use PPS service until his account balance turn to the absolute overdraft value. Default=0
[para]6[Name]Access date
[sqlName]access_date[t]readOnly[unit]Access date[u]00.0-06.7[u]read 8
[v]keepHex-high-0
[remark]
For fresh account, this is the creation date of the blank account; For activated accounts, then this is the date of the first recharge
[para]7[Name]MO Expiry date
[sqlName]mo_expiration_date[t]readOnly[unit]MO Expiry date[u]00.0-06.7[u]read 8
[v]keepHex-high-0
[remark]
Format: yyyymmdd
Expiry date of an account to make MO call. The expiration date will be extended by every successful recharge
[para]8[Name]MT Expiry date
[sqlName]mt_expiration_date[t]readOnly[unit]MT Expiry date[u]00.0-06.7[u]read 8
[v]keepHex-high-0
[remark]
Format: yyyymmdd
Expiry date of an account to make MT call. The expiration date will be extended by every successful recharge
[para]9[Name]Promotion bonus validity
[sqlName]promo_exp_date[t]readOnly[unit]Promotion bonus validity[u]00.0-06.7[u]read 8
[v]keepHex-high-0
[remark]
Promotion balance expiry day, if no promotion day set then this value should be the same as MT Expiration date
[para]10[Name]COS ID
[sqlName]cos_id[t]readOnly[unit]COS ID[u]00.0-00.7[u]
[v]toDec-high-0
[remark]
Class of Service (COS) defines prepaid service packages, includes service parameter, tariff plan
[para]11[Name]Rent type
[sqlName]rent_type[t]checkbox[unit]VMS rent[u]00.0-00.0[u]
[v]0[opt]disable
[v]1[opt]enable
[t]checkbox[unit]Rent01[u]00.1-00.1[u]
[v]0[opt]disable
[v]1[opt]enable
[t]checkbox[unit]Rent02[u]00.2-00.2[u]
[v]0[opt]disable
[v]1[opt]enable
[t]checkbox[unit]Rent03[u]00.3-00.3[u]
[v]0[opt]disable
[v]1[opt]enable
[t]checkbox[unit]Rent04[u]00.4-00.4[u]
[v]0[opt]disable
[v]1[opt]enable
[t]checkbox[unit]Rent05[u]00.5-00.5[u]
[v]0[opt]disable
[v]1[opt]enable
[t]checkbox[unit]Rent06[u]00.6-00.6[u]
[v]0[opt]disable
[v]1[opt]enable
[t]checkbox[unit]Rent07[u]00.7-00.7[u]
[v]0[opt]disable
[v]1[opt]enable
[remark]
There are 8 rental types can be set in the Rent tariff
Please refer to the Rent tariff to set this rent type
Default=no rent
[para]12[Name]Home location0
[sqlName]home_location0[t]input[unit]Home location0[u]00.0-00.7[u]
[v]toDec-high-0
[remark]
Home area of the account, besides these areas, the account is treated as roaming user.255 means not set yet.
[para]13[Name]Home location1
[sqlName]home_location1[t]input[unit]Home location1[u]00.0-00.7[u]
[v]toDec-high-0
[remark]
Home area of the account, besides these areas, the account is treated as roaming user.255 means not set yet.
[para]14[Name]Home location2
[sqlName]home_location2[t]input[unit]Home location2[u]00.0-00.7[u]
[v]toDec-high-0
[remark]
Home area of the account, besides these areas, the account is treated as roaming user.255 means not set yet.
[para]15[Name]Home location3
[sqlName]home_location3[t]input[unit]Home location3[u]00.0-00.7[u]
[v]toDec-high-0
[remark]
Home area of the account, besides these areas, the account is treated as roaming user.255 means not set yet.
[para]16[Name]CUG ID
[sqlName]cug_id[t]input[unit]CUG ID[u]00.0-04.7[u]
[v]keepHex-high-0
[remark]
Define the close user group to which this subscriber belongs
Any call within a single user group will be charged by the user group billing rate. PPS supports maximum 10,000 user groups
0=the subscriber is not a CUG user. Default=0
[para]17[Name]Language type
[sqlName]language_type[t]input[unit]Language type[u]00.0-00.7[u]
[v]keepHex-high-0
[remark]
Code of default voice type, and announcement will be played by the code defined lanague for the account, this code is defined in SRF paramete
[para]18[Name]Recharge failure
[sqlName]recharge_fail_counter[t]readOnly[unit]Recharge failure[u]00.0-00.7[u]
[v]toDec-high-0
[remark]
Legal recharge failure, subscriber who breaks the threshold will be marked in blacklist and suspended from service provisioning
[para]19[Name]SM inquiry counter
[sqlName]sm_inquiry_counter[t]readOnly[unit]SM inquiry counter[u]00.0-00.7[u]
[v]toDec-high-0
[remark]
Quantity of balance inquiry by short message in a day. System provides certain quantity of free inquiry for one day
[para]20[Name]Friends and family number edit counter
[sqlName]fav_change_counter[t]readOnly[unit]Friends and family number edit counter[u]00.0-00.7[u]
[v]toDec-high-0
[remark]
Total quantity of favorite number set. System provides certain quantity of free favorite number change
[para]21[Name]Friends and family number 0
[sqlName]favorite_number0[t]input[unit]Friends and family number 0[u]00.0-15.7[u]
[v]keepAsc-low-F
[remark]
System provides five favorite numbers. Call to these number is charged according to favorite call tariff
[para]22[Name]Friends and family number 1
[sqlName]favorite_number1[t]input[unit]Friends and family number 1[u]00.0-15.7[u]
[v]keepAsc-low-F
[remark]
System provides five favorite numbers. Call to these number is charged according to favorite call tariff
[para]23[Name]Friends and family number 2
[sqlName]favorite_number2[t]input[unit]Friends and family number 2[u]00.0-15.7[u]
[v]keepAsc-low-F
[remark]
System provides five favorite numbers. Call to these number is charged according to favorite call tariff
[para]24[Name]Friends and family number 3
[sqlName]favorite_number3[t]input[unit]Friends and family number 3[u]00.0-15.7[u]
[v]keepAsc-low-F
[remark]
System provides five favorite numbers. Call to these number is charged according to favorite call tariff
[para]25[Name]Friends and family number 4
[sqlName]favorite_number4[t]input[unit]Friends and family number 4[u]00.0-15.7[u]
[v]keepAsc-low-F
[remark]
System provides five favorite numbers. Call to these number is charged according to favorite call tariff
[para]26[Name]Last call type
[sqlName]last_call_type[t]show[unit]Last call type[u]00.0-00.7[u]
[v]0[opt]mo call
[v]1[opt]mt call
[v]2[opt]mf call
[v]3[opt]mo sms
[remark]
-
[para]27[Name]Last call time
[sqlName]last_call_time[t]readOnly[unit]Last call time[u]00.0-04.7[u]read 12 -
[v]keepHex-high-0
[remark]
Last call taken place time
[para]28[Name]Last call number
[sqlName]last_call_number[t]readOnly[unit]Last call number[u]00.0-15.7[u]-
[v]keepAsc-high-0
[remark]
Last call msisdn
[para]29[Name]Free SMS Remaining Days
[sqlName]free_sms_remaining_days[t]readOnly[unit]Free SMS Remaining Days[u]00.0-00.7[u]
[v]keepHex-high-0
[remark]
--
[para]30[Name]Pool Account Type
[sqlName]pool_account_type[t]select[unit]Pool Account Type[u]00.0-00.7[u]
[v]0[opt]Normal
[v]1[opt]Parent
[v]2[opt]Child
[remark]
--
[para]31[Name]Child Account Number
[sqlName]child_account_number[t]readOnly[unit]Child Account Number[u]00.0-00.7[u]-
[v]keepHex-high-0
[remark]
--
[para]32[Name]Child Number Edit Count
[sqlName]child_number_edit_count[t]readOnly[unit]Child Number Edit Count[u]00.0-00.7[u]-
[v]keepHex-high-0
[remark]
--
[para]33[Name]Child Number 1
[sqlName]child_number1[t]input[unit]Child Number 1[u]00.0-17.7[u]
[v]keepAsc-low-F
[remark]
--
[para]34[Name]Child Number 2
[sqlName]child_number2[t]input[unit]Child Number 2[u]00.0-17.7[u]
[v]keepAsc-low-F
[remark]
--
[para]35[Name]Child Number 3
[sqlName]child_number3[t]input[unit]Child Number 3[u]00.0-17.7[u]
[v]keepAsc-low-F
[remark]
--
[para]36[Name]Child Number 4
[sqlName]child_number4[t]input[unit]Child Number 4[u]00.0-17.7[u]
[v]keepAsc-low-F
[remark]
--
[para]37[Name]Child Number 5
[sqlName]child_number5[t]input[unit]Child Number 5[u]00.0-17.7[u]
[v]keepAsc-low-F
[remark]
--
[para]38[Name]Parent Number
[sqlName]parent_number[t]input[unit]Parent Number[u]00.0-17.7[u]
[v]keepAsc-low-F
[remark]
--
[para]39[Name]Intraday Calls
[sqlName]intraday_calls[t]readOnly[unit]Intraday Calls[u]00.0-04.7[u]-
[v]keepHex-high-0
[remark]
--
[para]40[Name]Intraday SMS
[sqlName]intraday_sms[t]readOnly[unit]Intraday SMS[u]00.0-04.7[u]-
[v]keepHex-high-0
[remark]
--
[para]41[Name]Intraday Charged Balance
[sqlName]intraday_charged_balance[t]readOnly[unit]Intraday Charged Balance[u]00.0-04.7[u]-
[v]keepHex-high-0
[remark]
--
[para]42[Name]Cap GPRS Volume
[sqlName]cap_gprs_volume[t]readOnly[unit]Cap GPRS Volume[u]00.0-04.7[u]-
[v]keepHex-high-0
[remark]
Unit: KB
[para]43[Name]Cap GPRS Balance
[sqlName]cap_gprs_balance[t]readOnly[unit]Cap GPRS Balance[u]00.0-04.7[u]-
[v]keepHex-high-0
[remark]
--
[para]44[Name]GPRS Volume of This Month
[sqlName]gprs_volume_this_month[t]readOnly[unit]GPRS Volume of This Month[u]00.0-04.7[u]-
[v]keepHex-high-0
[remark]
Unit: KB
[para]45[Name]GPRS Notification Times Today
[sqlName]gprs_notification_times_today[t]readOnly[unit]GPRS Notification Times Today[u]00.0-01.7[u]-
[v]keepHex-high-0
[remark]
--
[para]46[Name]Call me back request times
[sqlName]callme_back_request_times[t]input[unit]Call me back request times[u]00.0-00.7[u]
[v]keepHex-high-0
[remark]
--
[para]47[Name]Friends and Family Plan ID
[sqlName]favorite_plan_id[t]input[unit]Friends and Family Plan ID[u]00.0-00.7[u]
[v]keepHex-high-0
[remark]
--
[para]48[Name]Friends and Family Free Call Duration
[sqlName]favorite_free_call_duration[t]input[unit]Friends and Family Free Call Duration[u]00.0-04.7[u]
[v]keepHex-high-0
[remark]
--
[para]49[Name]Friends and Family Free SMS
[sqlName]favorite_free_sms[t]input[unit]Friends and Family Free SMS[u]00.0-04.7[u]
[v]keepHex-high-0
[remark]
--
[para]50[Name]Friends and Family Plan State
[sqlName]favorite_plan_state[t]select[unit]Friends and Family Plan State[u]00.0-00.7[u]
[v]0[opt]Normal
[v]1[opt]Suspend
[remark]
--
+396
View File
@@ -0,0 +1,396 @@
<?php
/*********************************************************
程序说明:
功能说明:pps用户数据维护专用页面
1、将用户数据表的数据导入到临时参数表。
2、修改的用户数据保存到临时参数表中,
3、设置用户参数时,返回值将修改用户表和临时表。
调用关系:调用: header.inc
变量说明:
输入变量:
$keyValue :由用户列表传来
$sysId :由用户列表传来或本页面指定
$dataTypeNo :数据类型,0=用户数据,1=冲值卡数据
$language :语言种类
$canSetNum :每次最多可以修改的字段个数
作者:
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$DEBUG = 0;
if($DEBUG) echo "<br>正在调试中,给您的工作带来不便,请原谅!!:)";
//==========================================================
//变量定义
//==========================================================
$pubDb = 'OMC_PUB';
$sysSubsConfTable ='OMC_PUB.sysSubsConf';
$systemConfTable = 'OMC_PUB.sysConf';
$nReadComm = 1;
$nChangeComm = 2;
$nCreateComm = 3;
$nDeleteComm = 4;
$nLoadIndexComm = 5;
$maxLevelNum = 10;
$nInteger = 2;
$nAscStr = 3;
$nHexStr = 4;
//------------选择语言版本----------
if($language == 'eng'){
}else{
}
$userTypeDef=array(
//array('Name', 'offset','remark'),
array('rent01', '00.0' ,'rent01'),
array('rent02', '00.1' ,'rent02'),
array('rent03', '00.2' ,'rent03'),
array('rent04', '00.3' ,'rent04'),
array('rent05', '00.4' ,'rent05'),
array('rent06', '00.5' ,'rent06'),
array('rent07', '00.6' ,'rent07'),
array('rent08', '00.7' ,'rent08')
);
//select sum(balance) from user_info
//==========================================================
//输入变量
//==========================================================
$canSetNum = isset($canSetNum)?$canSetNum:'all';
//显示用户数据编辑页面,需要的变量
if($DEBUG) echo "<br>sysId=$sysId";
if($DEBUG) echo "<br>canSetNum=$canSetNum";
if($DEBUG) echo "<br>keyValue=$keyValue";
if($DEBUG) echo "<br>sysTypeNo=$sysTypeNo";
if($DEBUG) echo "<br>sysNo=$sysNo";
if($DEBUG) echo "<br>subSysNo=$subSysNo";
if($DEBUG) echo "<br>dataTypeNo=$dataTypeNo";
//例如:
//$canSetNum =1; // 或= 'all'
//$sysId='330_0_0';
//$keyValue= '0460022157127016';
//操作类型变量
if($DEBUG) echo "<br>isRead=$isRead";
if($DEBUG) echo "<br>isChange=$isChange";
if($DEBUG) echo "<br>isCreate=$isCreate";
if($DEBUG) echo "<br>isDelete=$isDelete";
if($DEBUG) echo "<br>isLoadIndex=$isLoadIndex";
//保存用户数据修改的数据
if($DEBUG) echo "<br>bgnNo=$bgnNo";
if($DEBUG) echo "<br>endNo=$endNo";
//---------定义需要编辑保存的字段-------
//$showAttrDef=array(array('fieldName'=>'','inputName'=>'');
$showAttrDef=array(
array('fieldName'=>'card_no', 'inputName'=>'cardNo'),
array('fieldName'=>'card_hrn', 'inputName'=>'password'),
array('fieldName'=>'face_value', 'inputName'=>'faceValue'),
array('fieldName'=>'card_status', 'inputName'=>'cardStatus'),
array('fieldName'=>'expiry_date', 'inputName'=>'expiryDate'),
array('fieldName'=>'valid_time', 'inputName'=>'validTime'),
array('fieldName'=>'msisdn_used', 'inputName'=>'msisdnUsed'),
array('fieldName'=>'update_date', 'inputName'=>'updateDate')
);
//检查各个需要编辑的输入单元
if($DEBUG && $_SERVER['REQUEST_METHOD'] == "POST"){
for($i=0;$i<sizeof($showAttrDef);$i++){
$inputName =$showAttrDef[$i][inputName];
$inputValue =${$inputName};
if(strlen($inputValue)){
echo "<br>$inputName = $inputValue";
}else{
echo "<br>Can not find $inputName's value";
}
}
}
//处理各个的输入单元的值,组成各个需要编辑的字段值
if($_SERVER['REQUEST_METHOD'] == "POST"){
$card_no =$cardNo;
$card_hrn =$password;
$face_value =$faceValue;
$card_status =$cardStatus;
$expiry_date =$expiryDate;
$valid_time =$validTime;
$msisdn_used =$msisdnUsed;
$update_date =$updateDate;
//格式化每个需要保存的字段,以便数据处理模块处理
$bgnNo=0;
$endNo=0;
for($i=$bgnNo;$i<sizeof($showAttrDef);$i++){
if($oldFieldName == $showAttrDef[$i][fieldName]){
continue;
}
$oldFieldName = $showAttrDef[$i][fieldName];
${'checkBox_'.$endNo} =1;
${'fieldName_'.$endNo}=$oldFieldName;
${'editValue_'.$endNo}=${$oldFieldName};
if($DEBUG) echo "<br>checkBox_$endNo = ${'checkBox_'.$endNo}";
if($DEBUG) echo "<br>fieldName_$endNo = ${'fieldName_'.$endNo}";
if($DEBUG) echo "<br>editValue_$endNo = ${'editValue_'.$endNo}";
$endNo++;
}
}
//==========================================================
//数据处理
//==========================================================
if (1 == $isLoadIndex) {
$fieldNameList = "card_no,face_value,card_status,expiry_date,valid_time,updated_date,msisdn_used";
} else {
$fieldNameList = "ALL";
}
if ($DEBUG) echo "fieldNameList=$fieldNameList<br>";
?>
<base target="_self">
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
require("../pubSubsMng/sendComm.inc");
require("../pubSubsMng/dataProc.inc");
//添加用户时,各个值置为缺省值
if(strlen($keyValue) == 0){
for($i=0;$i<sizeof($showAttrDef);$i++){
$tmpRow[$showAttrDef[$i][fieldName]]=$showAttrDef[$i][defaultValue];
if($DEBUG) echo "<br>tmpRow[{$showAttrDef[$i][fieldName]}]={$showAttrDef[$i][defaultValue]}";
}
}
//==========================================================
//输出并显示数据
//==========================================================
$seqNo=0;
?>
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
echo "<br>";
//**********************************编辑参数时所用javascript*****************************************
?>
<script LANGUAGE="JavaScript">
function selCheckBox(thisCheckBox)
{
if(thisCheckBox.checked == true){
thisCheckBox.value=1;
}else{
thisCheckBox.value=0;
}
}
function askSureToDel(keyName,keyId)
{
var answer = confirm("Are you sure to delete this subscriber( "+keyName+"="
+ keyId + ") from <?php echo"$sysTypeName";?> server?");
if (answer == true){
window.location.href = "<?php echo "$PHP_SELF?sysId=$sysId&dataTypeNo=$dataTypeNo&bufferNo=$bufferNo&keyValue=$keyValue&isDelete=1";?>";
//alert('Try to send delete command');
}else{
return(false);
}
}
</script>
<form method="POST" name="update" action="<?php echo"$PHP_SELF";?>" >
<?php
//显示用户参数编辑页面
?>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><nobr>
<?php echo "Server Id:"?>
<select name="sysId" size="1">
<?php
$selSysIdSql="SELECT sysNo,subSysNo,sysTypeName
FROM sysInfo,sysConf
WHERE sysInfo.sysTypeNo='$sysTypeNo' AND sysConf.sysTypeNo='$sysTypeNo'
ORDER BY baseStat DESC,updateTime DESC
";
if($DEBUG) echo "<br>$selSysIdSql";
$sysIdResult=mysqli_query($pubConn,$selSysIdSql);
echo mysqli_error($pubConn);
while($sysIdRows=mysqli_fetch_array($sysIdResult)){
echo "<option value=\"$sysTypeNo"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]\"";
if(($sysNo == $sysIdRows[sysNo]) && ($subSysNo == $sysIdRows[subSysNo]))
echo " selected";
echo " >$sysIdRows[sysTypeName]"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]";
echo "</option>";
}
?>
</select>
</nobr>
</td>
<td><nobr>
<?php
$showkeyValue= $keyValue;
$keyValueName='Card No.';
echo "&nbsp;&nbsp;$keyValueName:$showkeyValue";
?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</nobr></td>
<td>
<input type="submit" value="Get" name="read" title="" class="button" onClick="javascript:document.update.isRead.value=1;">
<input type="hidden" value="0" name="isRead">
</td>
<td width="100%">&nbsp;</td>
</tr>
</table>
<br>
<?php
//将已取出的用户数据显示出来
//$tmpRow[fieldName]
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
<tr bgcolor="#E6E6E6">
<td width="5%"> No.</td>
<td width="35%">Name</td>
<td width="20%">Value</td>
<td width="40%">Description</td>
</tr>
<?
//cardNo
$cardNo=$tmpRow[card_no];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Card no.</td>";
echo "<td>";
echo "&nbsp;$cardNo";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//password
$password=$tmpRow[card_hrn];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Password</td>";
echo "<td>";
echo "&nbsp;$password";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//faceValue
$faceValue=$tmpRow[face_value];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Face value</td>";
echo "<td>";
echo "&nbsp;$faceValue";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//card_status
$cardStatus=$tmpRow[card_status];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Card status</td>";
echo "<td>";
if($cardStatus == 0){
echo "&nbsp;fresh";
}else if($cardStatus == 1){
echo "&nbsp;used";
}else if($cardStatus == 2){
echo "&nbsp;suspended";
}
//echo "&nbsp;$cardStatus";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//expiry_date
$expiryDate=$tmpRow[expiry_date];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Expiry date</td>";
echo "<td>";
echo "&nbsp;$expiryDate";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//valid_time
$validTime=$tmpRow[valid_time];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Valid days</td>";
echo "<td>";
echo "&nbsp;$validTime";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//msisdn_used
$msisdn_used=$tmpRow[msisdn_used];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>MSISDN charged</td>";
echo "<td>";
echo "&nbsp;$msisdn_used";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//update_date
$updateDate=$tmpRow[update_date];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Update date</td>";
echo "<td>";
echo "&nbsp;$updateDate";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
?>
</table>
<?php
//*****************************************隐藏输入框,用于传递值****************************************
echo "\n<input type=\"hidden\" name=\"dataTypeNo\" value=\"$dataTypeNo\">";
echo "\n<input type=\"hidden\" name=\"keyFieldName\" value=\"$indexFieldName\">";
echo "\n<input type=\"hidden\" name=\"keyValue\" value=\"$keyValue\">";
?>
</form>
&nbsp;
<?php
adjust_content_tail("down");
?>
</body>
</html>
<?php
flush();
?>
File diff suppressed because it is too large. Load diff
+904
View File
@@ -0,0 +1,904 @@
<?php
/*********************************************************
程序说明:
功能说明:hlr用户数据维护专用页面
1、将用户数据表的数据导入到临时参数表。
2、修改的用户数据保存到临时参数表中,
3、设置用户参数时,返回值将修改用户表和临时表。
调用关系:调用: header.inc
变量说明:
输入变量:
$keyValue :由用户列表传来
$sysId :由用户列表传来或本页面指定
$dataTypeNo :数据类型,0=用户数据,1=冲值卡数据
$language :语言种类
$canSetNum :每次最多可以修改的字段个数
作者:
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$DEBUG = 0;
if($DEBUG) echo "<br>正在调试中,给您的工作带来不便,请原谅!!:)";
//==========================================================
//变量定义
//==========================================================
$pubDb = 'OMC_PUB';
$sysSubsConfTable ='OMC_PUB.sysSubsConf';
$systemConfTable = 'OMC_PUB.sysConf';
$nReadComm = 1;
$nChangeComm = 2;
$nCreateComm = 3;
$nDeleteComm = 4;
$nLoadIndexComm = 5;
$maxLevelNum = 10;
$nInteger = 2;
$nAscStr = 3;
$nHexStr = 4;
//------------选择语言版本----------
if($language == 'eng'){
}else{
}
$odbCodeDef=array(
//array('inputName', 'offset' ,'remark'),
array('OUT_LOCAL', '00.0' ,'本地呼出'),
array('OUT_TRK', '00.1' ,'出局呼叫'),
array('OUT_NATION', '00.2' ,'国内长途'),
array('OUT_INTERNATION', '00.3' ,'国际长途'),
array('All_IN_CALL', '01.1' ,'所有来电')
);
$restrictDef=array(
//array('inputName', 'offset' ,'remark'),
array('restrictGrp_1', '00.0' ,'组1'),
array('restrictGrp_2', '00.1' ,'组2'),
array('restrictGrp_3', '00.2' ,'组3'),
array('restrictGrp_4', '00.3' ,'组4')
);
//==========================================================
//输入变量
//==========================================================
$canSetNum = isset($canSetNum)?$canSetNum:'all';
//显示用户数据编辑页面,需要的变量
if($DEBUG) echo "<br>sysId=$sysId";
if($DEBUG) echo "<br>canSetNum=$canSetNum";
if($DEBUG) echo "<br>keyValue=$keyValue";
if($DEBUG) echo "<br>sysTypeNo=$sysTypeNo";
if($DEBUG) echo "<br>sysNo=$sysNo";
if($DEBUG) echo "<br>subSysNo=$subSysNo";
if($DEBUG) echo "<br>dataTypeNo=$dataTypeNo";
//例如:
//$canSetNum =1; // 或= 'all'
//$sysId='330_0_0';
//$keyValue= '0460022157127016';
//操作类型变量
if($DEBUG) echo "<br>isRead=$isRead";
if($DEBUG) echo "<br>isChange=$isChange";
if($DEBUG) echo "<br>isCreate=$isCreate";
if($DEBUG) echo "<br>isDelete=$isDelete";
if($DEBUG) echo "<br>isLoadIndex=$isLoadIndex";
//保存用户数据修改的数据
if($DEBUG) echo "<br>bgnNo=$bgnNo";
if($DEBUG) echo "<br>endNo=$endNo";
//---------定义需要编辑保存的字段-------
$showAttrDef=array(
array('fieldName'=>'used_flag', 'inputName'=>'used_flag'),
array('fieldName'=>'imsi', 'inputName'=>'imsi'),
array('fieldName'=>'msisdn', 'inputName'=>'msisdn'),
//array('fieldName'=>'acc_mode', 'inputName'=>'acc_mode'),
//array('fieldName'=>'lac', 'inputName'=>'lac'),
array('fieldName'=>'ODB_Code', 'inputName'=>'ODB_Code'),
array('fieldName'=>'clip_state', 'inputName'=>'clip_state'),
array('fieldName'=>'callwait_state', 'inputName'=>'callwait_state'),
array('fieldName'=>'callhold_state', 'inputName'=>'callhold_state'),
//array('fieldName'=>'seccall_state', 'inputName'=>'seccall_state'),
array('fieldName'=>'group_number', 'inputName'=>'group_number'),
array('fieldName'=>'alarm_time', 'inputName'=>'alarm_time'),
array('fieldName'=>'call_bar_opt', 'inputName'=>'call_bar_opt'),
array('fieldName'=>'call_bar_pwd', 'inputName'=>'call_bar_pwd'),
//array('fieldName'=>'bar_pw_attemp', 'inputName'=>'bar_pw_attemp'),
array('fieldName'=>'boic_state', 'inputName'=>'boic_state'),
array('fieldName'=>'boic_hplmn', 'inputName'=>'boic_hplmn'),
array('fieldName'=>'baic_state', 'inputName'=>'baic_state'),
array('fieldName'=>'boc_state', 'inputName'=>'boc_state'),
array('fieldName'=>'baoc_state', 'inputName'=>'baoc_state'),
array('fieldName'=>'cfu_state', 'inputName'=>'cfu_state'),
array('fieldName'=>'cfu_number', 'inputName'=>'cfu_number'),
array('fieldName'=>'cfb_state', 'inputName'=>'cfb_state'),
array('fieldName'=>'cfb_num', 'inputName'=>'cfb_num'),
array('fieldName'=>'cfnry_st', 'inputName'=>'cfnry_st'),
array('fieldName'=>'cfnry_num', 'inputName'=>'cfnry_num'),
array('fieldName'=>'cfnry_time', 'inputName'=>'cfnry_time'),
array('fieldName'=>'cfnrc_st', 'inputName'=>'cfnrc_st'),
array('fieldName'=>'cfnrc_num', 'inputName'=>'cfnrc_num'),
array('fieldName'=>'Restrict_num', 'inputName'=>'Restrict_num'),
array('fieldName'=>'CCBS', 'inputName'=>'CCBS'),
array('fieldName'=>'mutiPty_call', 'inputName'=>'mutiPty_call'),
array('fieldName'=>'malicious_call', 'inputName'=>'malicious_call')
);
//如果fieldName和inputName相等,则不用做附加处理
//否则,需要根据这个变量的值来做一些附加处理,例如电话号码的前补91后补E,或是一些复选框的合并
//检查各个需要编辑的输入单元
if($DEBUG && $_SERVER['REQUEST_METHOD'] == "POST"){
for($i=0;$i<sizeof($showAttrDef);$i++){
$inputName =$showAttrDef[$i][inputName];
$inputValue =${$inputName};
if(strlen($inputValue)){
echo "<br>$inputName = $inputValue";
}else{
echo "<br>Can not find $inputName's value";
}
}
}
//处理各个的输入单元的值,组成各个需要编辑的字段值
if($_SERVER['REQUEST_METHOD'] == "POST"){
//显示时需要处理拆分的字段,提交后也需要处理合成
//$lac =dechex($lac);
$cfnry_time=dechex($cfnry_time);
//ODB_Code
$orgValue=$ODB_Code;
for($i=0;$i<sizeof($odbCodeDef);$i++){
$inputName =$odbCodeDef[$i][0];
$inputValue =${$inputName};
if($DEBUG) echo "<br>$inputName = $inputValue";
if(strlen($inputValue) == 0){
$inputValue=0;
}
$inputOffset=$odbCodeDef[$i][1];
if($DEBUG) echo "<br>setBitValue($orgValue,$inputOffset,$inputValue)";
$orgValue=setBitValue($orgValue,$inputOffset,$inputValue);
}
$ODB_Code=$orgValue;
//Restrict_num
$orgValue=$Restrict_num;
for($i=0;$i<sizeof($restrictDef);$i++){
$inputName =$restrictDef[$i][0];
$inputValue =${$inputName};
if($DEBUG) echo "<br>$inputName = $inputValue";
if(strlen($inputValue) == 0){
$inputValue=0;
}
$inputOffset=$restrictDef[$i][1];
if($DEBUG) echo "<br>setBitValue($orgValue,$inputOffset,$inputValue)";
$orgValue=setBitValue($orgValue,$inputOffset,$inputValue);
}
$Restrict_num=$orgValue;
//格式化每个需要保存的字段,以便数据处理模块处理
$bgnNo=0;
$endNo=0;
for($i=$bgnNo;$i<sizeof($showAttrDef);$i++){
$tmpFieldName = $showAttrDef[$i][fieldName];
${'checkBox_'.$endNo} =1;
${'fieldName_'.$endNo}=$tmpFieldName;
${'editValue_'.$endNo}=${$tmpFieldName};
if($DEBUG) echo "<br>checkBox_$endNo = ${'checkBox_'.$endNo}";
if($DEBUG) echo "<br>fieldName_$endNo = ${'fieldName_'.$endNo}";
if($DEBUG) echo "<br>editValue_$endNo = ${'editValue_'.$endNo}";
$endNo++;
if($canSetNum != 'all' && $endNo > $canSetNum){
break;
}
}
//if($DEBUG) exit();
}
//==========================================================
//数据处理
//==========================================================
if (1 == $isLoadIndex) {
$fieldNameList = "imsi,msisdn,used_flag,lac";
} else {
$fieldNameList = "ALL";
}
if ($DEBUG) echo "fieldNameList=$fieldNameList<br>";
?>
<base target="_self">
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
require("../pubSubsMng/sendComm.inc");
require("../pubSubsMng/dataProc.inc");
//==========================================================
//输出并显示数据
//==========================================================
$seqNo=1;
?>
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
echo "<br>";
//**********************************编辑参数时所用javascript*****************************************
?>
<script LANGUAGE="JavaScript">
function selCheckBox(thisCheckBox)
{
if(thisCheckBox.checked == true){
thisCheckBox.value=1;
}else{
thisCheckBox.value=0;
}
}
function askSureToDel(keyName,keyId)
{
var answer = confirm("Are you sure to delete this subscriber( "+keyName+"="
+ keyId + ") from <?php echo"$sysTypeName";?> server?");
if (answer == true){
window.location.href = "<?php echo "$PHP_SELF?sysId=$sysId&dataTypeNo=$dataTypeNo&bufferNo=$bufferNo&keyValue=$keyValue&isDelete=1";?>";
//alert('Try to send delete command');
}else{
return(false);
}
}
</script>
<form method="POST" name="update" action="<?php echo"$PHP_SELF";?>" >
<?php
//显示用户参数编辑页面
?>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><nobr>
<?php echo "Server Id:"?>
<select name="sysId" size="1">
<?php
$selSysIdSql="SELECT sysNo,subSysNo,sysTypeName
FROM sysInfo,sysConf
WHERE sysInfo.sysTypeNo='$sysTypeNo' AND sysConf.sysTypeNo='$sysTypeNo'
ORDER BY baseStat DESC,updateTime DESC
";
if($DEBUG) echo "<br>$selSysIdSql";
$sysIdResult=mysqli_query($pubConn,$selSysIdSql);
echo mysqli_error($pubConn);
while($sysIdRows=mysqli_fetch_array($sysIdResult)){
echo "<option value=\"$sysTypeNo"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]\"";
if(($sysNo == $sysIdRows[sysNo]) && ($subSysNo == $sysIdRows[subSysNo]))
echo " selected";
echo " >$sysIdRows[sysTypeName]"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]";
echo "</option>";
}
?>
</select>
</nobr>
</td>
<td><nobr>
<?php
$showkeyValue= $keyValue;
$keyValueName='IMSI';
echo "&nbsp;&nbsp;$keyValueName:$showkeyValue";
?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</nobr></td>
<?php
if($isTryCreate > 0){
?>
<td >
<input type="submit" value="Create in <?php echo "$sysTypeName"?>" name="create" title="" class="button" onClick="javascript:document.update.isCreate.value=1;">
<input type="hidden" value="0" name="isCreate">
<input type="hidden" value="0" name="isChange">
</td>
<td>
&nbsp;&nbsp;&nbsp;
<input type="submit" value="Create in OMC" name="create" title="" class="button" onClick="javascript:document.update.isCreate.value=2;">
</td>
<?php
}else{
?>
<td>
<input type="submit" value="Get" name="read" title="" class="button" onClick="javascript:document.update.isRead.value=1;">
<input type="hidden" value="0" name="isRead">
</td>
<td>
<input type="submit" value="Set" name="change" title="" class="button" onClick="javascript:document.update.isChange.value=1;">
<input type="hidden" value="0" name="isChange">
<input type="hidden" value="0" name="isCreate">
</td>
<td>
<input type="button" value="Delete" name="delete" title="Delete this subscriber" class="button" onClick="askSureToDel(<?php echo"'$keyValueName','$keyValue'";?>)">
<input type="hidden" value="0" name="isDelete">
</td>
<?php
}
?>
<td width="100%">&nbsp;</td>
</tr>
</table>
<br>
<?php
//将已取出的用户数据显示出来
//$tmpRow[fieldName]
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
<tr bgcolor="#E6E6E6">
<td width="5%"> No.</td>
<td width="35%">项目</td>
<td width="20%">取值</td>
<td width="40%">说明</td>
</tr>
<?
//used_flag
$used_flag=$tmpRow[used_flag];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>使用标志</td>";
echo "<td>";
if($used_flag > '00'){
echo "<input type=\"radio\" name=\"used_flag\" value=\"01\" checked>使用中";
echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ";
echo "<input type=\"radio\" name=\"used_flag\" value=\"00\">未使用";
}else{
echo "<input type=\"radio\" name=\"used_flag\" value=\"01\">使用中";
echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ";
echo "<input type=\"radio\" name=\"used_flag\" value=\"00\" checked>未使用";
}
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//imsi
$imsi=$tmpRow[imsi];
if($isTryCreate > 0){
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>IMSI</td>";
echo "<td>";
echo "<input type=\"text\" name=\"imsi\" maxlength=\"15\" size=\"18\" value=\"$imsi\" class=\"text\">";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
}else{
$acc_mode=$tmpRow[acc_mode];
if($acc_mode == '01'){
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>EAN编号</td>";
echo "<td>";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>端口号</td>";
echo "<td>";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
}else{
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>IMSI</td>";
echo "<td>$imsi";
echo "<input type=\"hidden\" name=\"imsi\" value=\"$imsi\">";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
}
}
//msisdn
$msisdn =$tmpRow[msisdn];
$msisdn =str_replace('E','',$msisdn);
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>电话号码</td>";
echo "<td>";
echo "<input type=\"text\" name=\"msisdn\" maxlength=\"15\" size=\"18\" value=\"$msisdn\" class=\"text\">";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//acc_mode
$acc_mode=$tmpRow[acc_mode];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>用户类别</td>";
echo "<td>";
if($isTryCreate > 0){
if($acc_mode == '01'){
echo "固定用户<input type=\"radio\" name=\"acc_mode\" value=\"01\" checked>&nbsp;&nbsp;";
echo "移动用户<input type=\"radio\" name=\"acc_mode\" value=\"02\" >";
}else{
echo "固定用户<input type=\"radio\" name=\"acc_mode\" value=\"01\">&nbsp;&nbsp;";
echo "移动用户<input type=\"radio\" name=\"acc_mode\" value=\"02\" checked>";
}
}else{
if($acc_mode == '01'){
echo "固定用户";
}else{
echo "移动用户";
}
}
echo "";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//lac
$lac =str_replace('F','',$tmpRow[lac]);
$lac =hexdec($lac);
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>LAC编号</td>";
echo "<td>";
echo "$lac";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//ODB_Code
//$odbCodeDef在前面定义,因为提交后合成值也需要
$ODB_Code=$tmpRow[ODB_Code];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>用户权限(ODB)</td>";
echo "<td>";
echo "&nbsp; <input type=\"hidden\" name=\"ODB_Code\" value=\"$ODB_Code\">";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
for($i=0;$i<sizeof($odbCodeDef);$i++){
echo "\n <tr>";
echo "<td> &nbsp; </td>";
echo "<td>{$odbCodeDef[$i][2]}</td>";
echo "<td>";
$value=getBitValue($ODB_Code,$odbCodeDef[$i][1]);
if($value == '0'){
echo "无限制<input type=\"radio\" name=\"{$odbCodeDef[$i][0]}\" value=\"1\" checked>&nbsp;&nbsp;";
echo "禁用<input type=\"radio\" name=\"{$odbCodeDef[$i][0]}\" value=\"0\" >";
}else{
echo "无限制<input type=\"radio\" name=\"{$odbCodeDef[$i][0]}\" value=\"1\" >&nbsp;&nbsp;";
echo "禁用<input type=\"radio\" name=\"{$odbCodeDef[$i][0]}\" value=\"0\" checked>";
}
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
}
//增值业务====================================
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>增值业务</td>";
echo "<td>&nbsp;</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//clip_state
$clip_state=$tmpRow[clip_state];
echo "\n <tr>";
echo "<td>&nbsp;</td>";
echo "<td>来电显示</td>";
echo "<td>";
if($clip_state == '01'){
echo "提供<input type=\"radio\" name=\"clip_state\" value=\"01\" checked>&nbsp;&nbsp;";
echo "未提供<input type=\"radio\" name=\"clip_state\" value=\"00\" >";
}else{
echo "提供<input type=\"radio\" name=\"clip_state\" value=\"01\" >&nbsp;&nbsp;";
echo "未提供<input type=\"radio\" name=\"clip_state\" value=\"00\" checked>";
}
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//callwait_state
$tmpDef=array(
//array('value','Name'),
array('05','激活'),
array('04','未激活'),
array('00','未提供')
);
$tmpName='callwait_state';
$callwait_state=$tmpRow[callwait_state];
echo "\n <tr>";
echo "<td>&nbsp;</td>";
echo "<td>呼叫等待</td>";
echo "<td>";
for($i=0;$i<sizeof($tmpDef);$i++){
echo "{$tmpDef[$i][1]}<input type=\"radio\" name=\"$tmpName\" value=\"{$tmpDef[$i][0]}\" ";
if($tmpDef[$i][0] == $callwait_state){
echo "checked";
}
echo ">&nbsp;&nbsp;";
}
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//callhold_state
$callhold_state=$tmpRow[callhold_state];
echo "\n <tr>";
echo "<td>&nbsp;</td>";
echo "<td>呼叫保持</td>";
echo "<td>";
if($callhold_state == '01'){
echo "提供<input type=\"radio\" name=\"callhold_state\" value=\"01\" checked>&nbsp;&nbsp;";
echo "未提供<input type=\"radio\" name=\"callhold_state\" value=\"00\" >";
}else{
echo "提供<input type=\"radio\" name=\"callhold_state\" value=\"01\" >&nbsp;&nbsp;";
echo "未提供<input type=\"radio\" name=\"callhold_state\" value=\"00\" checked>";
}
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
/*
//seccall_state
$seccall_state=$tmpRow[seccall_state];
echo "\n <tr>";
echo "<td>&nbsp;</td>";
echo "<td>恶意电话追踪</td>";
echo "<td>";
if($seccall_state == '01'){
echo "提供<input type=\"radio\" name=\"seccall_state\" value=\"01\" checked>&nbsp;&nbsp;";
echo "未提供<input type=\"radio\" name=\"seccall_state\" value=\"00\" >";
}else{
echo "提供<input type=\"radio\" name=\"seccall_state\" value=\"01\" >&nbsp;&nbsp;";
echo "未提供<input type=\"radio\" name=\"seccall_state\" value=\"00\" checked>";
}
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
*/
//group_number
$group_number=$tmpRow[group_number];
echo "\n <tr>";
echo "<td>&nbsp;</td>";
echo "<td>集团用户</td>";
echo "<td>";
echo "<select size=\"1\" name=\"group_number\">";
for($i=0; $i<256; $i++){
if($i == $group_number){
echo "<option value=\"$i\" selected>$i</option>";
}else{
echo "<option value=\"$i\">$i</option>";
}
}
echo "</select>";
echo "</td>";
echo "<td>集团用户,0号代表不属于任何集团</td>";
echo "</tr>";
//alarm_time
$tmpDef=array(
//array('value','Name'),
array('05','激活'),
array('04','未激活'),
array('00','未提供')
);
$tmpName='alarm_time';
$alarm_time=$tmpRow[alarm_time];
$alarmFlag=substr($alarm_time,2,1);
echo "\n <tr>";
echo "<td>&nbsp;</td>";
echo "<td>闹钟服务</td>";
echo "<td>";
for($i=0;$i<sizeof($tmpDef);$i++){
echo "{$tmpDef[$i][1]}<input type=\"radio\" name=\"$tmpName\" value=\"{$tmpDef[$i][0]}\" ";
if($tmpDef[$i][0] == $alarmFlag){
echo "checked";
}
echo ">&nbsp;&nbsp;";
}
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
$alarmHour=substr($alarm_time,0,1);
$alarmMinute=substr($alarmMinute,1,1);
echo "\n <tr>";
echo "<td>&nbsp;</td>";
echo "<td>闹钟时间设置</td>";
echo "<td>";
echo "小时<select size=\"1\" name=\"alarmHour\">";
for($i=0; $i<24; $i++){
if($i == $alarmHour){
echo "<option value=\"$i\" selected>$i</option>";
}else{
echo "<option value=\"$i\">$i</option>";
}
}
echo "</select>";
echo "&nbsp;&nbsp;分钟<select size=\"1\" name=\"alarmMinute\">";
for($i=0; $i<60; $i++){
if($i == $alarmMinute){
echo "<option value=\"$i\" selected>$i</option>";
}else{
echo "<option value=\"$i\">$i</option>";
}
}
echo "</select>";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//呼叫限制==========================================
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>呼叫限制</td>";
echo "<td>&nbsp;";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//call_bar_opt
$tmpDef=array(
//array('value','Name'),
array('00','操作员控制'),
array('01','用户控制(使用密码)'),
array('02','用户控制(不使用密码)')
);
$call_bar_opt=$tmpRow[call_bar_opt];
echo "\n <tr>";
echo "<td>&nbsp;</td>";
echo "<td>控制方式</td>";
echo "<td>";
echo "<select size=\"1\" name=\"call_bar_opt\">";
for($i=0;$i<sizeof($tmpDef);$i++){
if($tmpDef[$i][0] == $call_bar_opt){
echo "<option value=\"{$tmpDef[$i][0]}\" selected>{$tmpDef[$i][1]}</option>";
}else{
echo "<option value=\"{$tmpDef[$i][0]}\" >{$tmpDef[$i][1]}</option>";
}
}
echo "</select>";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//call_bar_pwd
$call_bar_pwd=$tmpRow[call_bar_pwd];
echo "\n <tr>";
echo "<td>&nbsp;</td>";
echo "<td>权限密码</td>";
echo "<td>";
echo "<input type=\"text\" name=\"call_bar_pwd\" maxlength=\"4\" value=\"$call_bar_pwd\" class=\"text\">";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
/*
//bar_pw_attemp
$bar_pw_attemp=$tmpRow[bar_pw_attemp];
echo "\n <tr>";
echo "<td>&nbsp;</td>";
echo "<td>允许密码输措次数</td>";
echo "<td>";
echo "<input type=\"text\" name=\"bar_pw_attemp\" maxlength=\"2\" value=\"$bar_pw_attemp\" class=\"text\">";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
*/
$tmpDef=array(
//array('value','Name'),
array('05','激活'),
array('04','未激活'),
array('00','未提供')
);
$callBarDef=array(
//array('fieldName','Remark'),
array('boic_state','国际长途限制'),
array('boic_hplmn','国内长途限制'),
array('baic_state','呼入限制(免打扰)'),
array('boc_state','出局呼叫限制'),
array('baoc_state','本地呼出限制')
);
for($j=0;$j<sizeof($callBarDef);$j++){
$tmpName=$callBarDef[$j][0];
$tmpValue=$tmpRow[$tmpName];
$tmpRemark=$callBarDef[$j][1];
echo "\n <tr>";
echo "<td> &nbsp; </td>";
echo "<td>$tmpRemark</td>";
echo "<td>";
for($i=0;$i<sizeof($tmpDef);$i++){
echo "{$tmpDef[$i][1]}<input type=\"radio\" name=\"$tmpName\" value=\"{$tmpDef[$i][0]}\" ";
if($tmpDef[$i][0] == $tmpValue){
echo "checked";
}
echo ">&nbsp;&nbsp;";
}
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
}
//呼叫转移===================================
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>呼叫转移</td>";
echo "<td>&nbsp;";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
//call_bar_opt
$tmpDef=array(
//array('value','Name'),
array('05','激活'),
array('04','未激活'),
array('00','未提供')
);
$cfDef=array(
//array('fieldName_1','Remark_1','fieldName_2','Remark_2'),
array('cfu_state', '无条件转移(CFU)', 'cfu_number', '无条件转移号码'),
array('cfb_state', '遇忙转移(CFB)', 'cfb_num', '遇忙转移号码'),
array('cfnry_st', '无应答转移(CFNRy)', 'cfnry_num', '无应答转移号码', 'cfnry_time', '无应答转移时间设置'),
array('cfnrc_st', '不在服务区转移(CFNRc)','cfnrc_num', '不在服务区转移号码')
);
for($j=0;$j<sizeof($cfDef);$j++){
$tmpName_1 =$cfDef[$j][0];
$tmpValue_1 =$tmpRow[$tmpName_1];
$tmpRemark_1 =$cfDef[$j][1];
$tmpName_2 =$cfDef[$j][2];
$tmpValue_2 =str_replace('E','',$tmpRow[$tmpName_2]);
$tmpValue_2 =str_replace('F','',$tmpRow[$tmpName_2]);
$tmpRemark_2 =$cfDef[$j][3];
echo "\n <tr>";
echo "<td> &nbsp; </td>";
echo "<td>$tmpRemark_1</td>";
echo "<td>";
for($i=0;$i<sizeof($tmpDef);$i++){
echo "{$tmpDef[$i][1]}<input type=\"radio\" name=\"$tmpName_1\" value=\"{$tmpDef[$i][0]}\" ";
if($tmpDef[$i][0] == $tmpValue_1){
echo "checked";
}
echo ">&nbsp;&nbsp;";
}
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
echo "\n <tr>";
echo "<td> &nbsp; </td>";
echo "<td>$tmpRemark_2</td>";
echo "<td>";
echo "<input type=\"text\" name=\"$tmpName_2\" value=\"$tmpValue_2\" maxlength=\"16\" class=\"text\">";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
if(strlen($cfDef[$j][4]) > 0){
$tmpName_3 =$cfDef[$j][4];
$tmpValue_3 =hexdec($tmpRow[$tmpName_3]);
$tmpRemark_3 =$cfDef[$j][5];
echo "\n <tr>";
echo "<td> &nbsp; </td>";
echo "<td>$tmpRemark_3</td>";
echo "<td>";
echo "<input type=\"text\" name=\"$tmpName_3\" value=\"$tmpValue_3\" maxlength=\"3\" size=\"5\" class=\"text\">(s)";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
}
}
//Restrict_num
$Restrict_num=$tmpRow[Restrict_num];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>呼叫组限制</td>";
echo "<td>";
echo "<input type=\"hidden\" name=\"Restrict_num\" value=\"$Restrict_num\">";
echo "<nobr>";
for($i=0;$i<sizeof($restrictDef);$i++){
$value=getBitValue($Restrict_num,$restrictDef[$i][1]);
if($value == '1'){
echo "{$restrictDef[$i][2]}<input type=\"checkbox\" name=\"{$restrictDef[$i][0]}\" onClick=selCheckBox(this) value=\"1\" checked>&nbsp;&nbsp;";
}else{
echo "{$restrictDef[$i][2]}<input type=\"checkbox\" name=\"{$restrictDef[$i][0]}\" onClick=selCheckBox(this) value=\"0\" >&nbsp;&nbsp;";
}
}
echo "</nobr>";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
$tmpCallDef=array(
//array('fieldName','Remark'),
array('CCBS','遇忙回叫'),
array('mutiPty_call','三方通话'),
array('malicious_call','通话中转移')
);
$tmpDef=array(
//array('value','Name'),
array('01','提供'),
array('00','未提供')
);
for($j=0;$j<sizeof($tmpCallDef);$j++){
$tmpName=$tmpCallDef[$j][0];
$tmpValue=$tmpRow[$tmpName];
$tmpRemark=$tmpCallDef[$j][1];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>$tmpRemark</td>";
echo "<td>";
for($i=0;$i<sizeof($tmpDef);$i++){
echo "{$tmpDef[$i][1]}<input type=\"radio\" name=\"$tmpName\" value=\"{$tmpDef[$i][0]}\" ";
if($tmpDef[$i][0] == $tmpValue){
echo "checked";
}
echo ">&nbsp;&nbsp;";
}
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
}
?>
</table>
<?php
//*****************************************隐藏输入框,用于传递值****************************************
echo "\n<input type=\"hidden\" name=\"dataTypeNo\" value=\"$dataTypeNo\">";
echo "\n<input type=\"hidden\" name=\"keyFieldName\" value=\"$indexFieldName\">";
echo "\n<input type=\"hidden\" name=\"keyValue\" value=\"$keyValue\">";
?>
</form>
&nbsp;
<?php
adjust_content_tail("down");
?>
</body>
</html>
<?php
flush();
?>
+247
View File
@@ -0,0 +1,247 @@
<?php
/*********************************************************
程序说明:
功能说明:统计用户资料
调用关系:调用: header.inc
被调用:
变量说明:
作者:LiLong 2004-04-14
修改注释:
NO.1
姓名:Cui Ticun
时间:2004-04-15
修改说明:修改了充值卡的统计功能
*********************************************************/
$DEBUG=0;
global $pubConn;
$sysTypeNo=$_REQUEST['sysTypeNo'];
$overview=$_REQUEST['overview'];
$searchInServer=$_REQUEST['searchInServer'];
$dataTypeNo=$_REQUEST['dataTypeNo'];
$keyValue=$_REQUEST['keyValue'];
$canSetNum=$_REQUEST['canSetNum'];
$isRead=$_REQUEST['isRead'];
$searchInServer=$_REQUEST['searchInServer'];
if ($_REQUEST['sysId'])
{
$sysId = $_REQUEST['sysId'];
if($DEBUG) echo "<br>sysId=$sysId";
$sysIdArr=explode('_',$sysId);
$sysTypeNo=$sysIdArr[0];
$sysNo=$sysIdArr[1];
// echo "sysTypeNo=$sysTypeNo,sysNo=$sysNo";
}
//overview statistic webpage
if(isset($overview)){
if($DEBUG) echo "****************** Overview **********************<br>";
switch($sysTypeNo){
case '330': //HLR
//select HLR subscriber count
$selSql = "SELECT count(*) FROM $tableName";
if($DEBUG) echo "<br>selSql=$selSql";
$result=@mysqli_query($pubConn,$selSql);
echo mysqli_error($pubConn);
$record = @mysqli_fetch_array($result);
$nHlrSubscriber = $record[0];
if($DEBUG) echo "<br>nHlrSubscriber=$nHlrSubscriber";
//select postpaid subscriber total
//camel_flag:
//highest bit=1 => Enable Prepaid; highest bit=0 => Disable Postpaid
$nPrepaidTotal = 0;
$nPostTotal = 0;
$nGprs = 0;
$nNoGprs = 0;
$nBoth = 0;
$selSql = "SELECT camel_flag,nam FROM $tableName";
if($DEBUG) echo "<br>selSql=$selSql";
$result=@mysqli_query($pubConn,$selSql);
echo mysqli_error($pubConn);
$record = @mysqli_fetch_array($result);
do{
$flag = substr($record[camel_flag],0,1);
//prepaid subscriber
if('8'==$flag){
$nPrepaidTotal++;
}
//postpaid subscriber
elseif('0'==$flag){
$nPostTotal++;
}
$nam = $record[nam] - 0;
if (1 == $nam){
$nNoGprs++;
}elseif (2 == $nam){
$nGprs++;
}elseif (0 == $nam){
$nBoth++;
}
}while($record=@mysqli_fetch_array($result));
if($DEBUG) echo "<br>nPrepaidTotal=$nPrepaidTotal,nPostTotal=$nPostTotal";
if($DEBUG) echo "<br>nNoGprs=$nNoGprs,nGprs=$nGprs,nBoth=$nBoth";
echo "<b><font size=3><p align=center>HLR subscriber statistics</p></font></b>";
echo "<TABLE border=1 width=100% cellpadding=2 cellspacing=0 bordercolor=#666666 bordercolordark=#FFFFFF bgcolor=#FFFFFF>";
echo "<TR>";
echo "<TD width=40% colspan=2 bgcolor=#E6E6E6>HLR subscriber</TD>";
echo "<TD colspan=3 align=center>$nHlrSubscriber</TD>";
echo "</TR>";
echo "<TR>";
echo "<TD width=20% bgcolor=#E6E6E6>Postpay subscriber</TD>";
echo "<TD width=20% bgcolor=#E6E6E6>Prepay subscriber</TD>";
echo "<TD width=20% bgcolor=#E6E6E6>Only non-GPRS subscriber</TD>";
echo "<TD width=20% bgcolor=#E6E6E6>Only GPRS subscriber</TD>";
echo "<TD width=20% bgcolor=#E6E6E6>Both GPRS and non-GPRS subscriber</TD>";
echo "</TR>";
echo "<TR>";
echo "<TD width=20% align=center>$nPostTotal</TD>";
echo "<TD width=20% align=center>$nPrepaidTotal</TD>";
echo "<TD width=20% align=center>$nNoGprs</TD>";
echo "<TD width=20% align=center>$nGprs</TD>";
echo "<TD width=20% align=center>$nBoth</TD>";
echo "</TR>";
echo "</TABLE>";
break;
case '360': //PPS
case '395':
//total pps subscriber
$selSql = "SELECT count(*) FROM $tableName";
if($DEBUG) echo "<br>selSql=$selSql";
$result=@mysqli_query($pubConn,$selSql);
echo mysqli_error($pubConn);
$record = @mysqli_fetch_array($result);
$nPpsAmount = $record[0];
if($DEBUG) echo "<br>nPpsAmount=$nPpsAmount";
//statistics by all kinds of types
$nFresh=0;
$nUsed=0;
$nSuspend=0;
$nBlacklist=0;
$nRelease=0;
$nLowbalance=0;
if(0==$dataTypeNo){
$selSql = "SELECT status FROM $tableName";
if($DEBUG) echo "<br>selSql=$selSql";
$result=@mysqli_query($pubConn,$selSql);
echo mysqli_error($pubConn);
$record = @mysqli_fetch_array($result);
do{
switch($record[0]){
case "00":
$nFresh++;
break;
case "01":
$nUsed++;
break;
case "02":
$nSuspend++;
break;
case "03":
$nBlacklist++;
break;
case "04":
$nRelease++;
break;
case "05":
$nLowbalance++;
break;
default:
break;
}
}while( $record=@mysqli_fetch_array($result) );
if($DEBUG) echo "<br>nFresh=$nFresh,nSuspend=$nSuspend,nBlacklist=$nBlacklist,nRelease=$nRelease,nLowbalance";
//display
echo "<b><font size=3><p align=center>PPS subscriber statistics</p></font></b>";
echo "<TABLE border=1 width=100% cellpadding=2 cellspacing=0 bordercolor=#666666 bordercolordark=#FFFFFF bgcolor=#FFFFFF>";
echo "<TR>";
echo "<TD width=50% bgcolor=#E6E6E6>Prepaid subscriber</TD>";
echo "<TD align=center>$nPpsAmount</TD>";
echo "</TR>";
echo "<TR>";
echo "<TD width=50% bgcolor=#E6E6E6>Fresh</TD>";
echo "<TD align=center>$nFresh</TD>";
echo "</TR>";
echo "<TR>";
echo "<TD width=50% bgcolor=#E6E6E6>Normal</TD>";
echo "<TD align=center>$nUsed</TD>";
echo "</TR>";
echo "<TR>";
echo "<TD width=50% bgcolor=#E6E6E6>Suspend</TD>";
echo "<TD align=center>$nSuspend</TD>";
echo "</TR>";
echo "<TR>";
echo "<TD width=50% bgcolor=#E6E6E6>Blacklist</TD>";
echo "<TD align=center>$nBlacklist</TD>";
echo "</TR>";
echo "<TR>";
echo "<TD width=50% bgcolor=#E6E6E6>Release</TD>";
echo "<TD align=center>$nRelease</TD>";
echo "</TR>";
echo "<TR>";
echo "<TD width=50% bgcolor=#E6E6E6>Low balance</TD>";
echo "<TD align=center>$nLowbalance</TD>";
echo "</TR>";
echo "</TABLE>";
}
else{
$selSql = "SELECT card_status FROM $tableName";
if($DEBUG) echo "<br>selSql=$selSql";
$result=@mysqli_query($pubConn,$selSql);
echo mysqli_error($pubConn);
$record = @mysqli_fetch_array($result);
do{
if(0==$record[0]){
$nFresh++;
}
else{
$nUsed++;
}
}while( $record=@mysqli_fetch_array($result) );
if($DEBUG) echo "<br>nFresh=$nFresh,nUsed=$nUsed";
//display
echo "<b><font size=3><p align=center>PPS Recharge card statistics</p></font></b>";
echo "<TABLE border=1 width=100% cellpadding=2 cellspacing=0 bordercolor=#666666 bordercolordark=#FFFFFF bgcolor=#FFFFFF>";
echo "<TR>";
echo "<TD width=50% bgcolor=#E6E6E6>Recharge card</TD>";
echo "<TD align=center>$nPpsAmount</TD>";
echo "</TR>";
echo "<TR>";
echo "<TD width=50% bgcolor=#E6E6E6>Fresh</TD>";
echo "<TD align=center>$nFresh</TD>";
echo "</TR>";
echo "<TR>";
echo "<TD width=50% bgcolor=#E6E6E6>Used</TD>";
echo "<TD align=center>$nUsed</TD>";
echo "</TR>";
echo "</TABLE>";
}
break;
default:
break;
}
exit(0);
}
if ( isset($searchInServer) ) {
if ($DEBUG) {
echo "****************** Search in server **********************<br>";
echo "$targetPage?sysId=$sysId&dataTypeNo=$dataTypeNo&keyValue=$selKeyValue&canSetNum=$canSetNum&isRead=1<br>";
}
?>
<script language=javascript>
var url = '<?php echo "$targetPage?sysId=$sysId&dataTypeNo=$dataTypeNo&keyValue=$selKeyValue&canSetNum=$canSetNum&isRead=1&searchInServer=1"; ?>';
window.parent.main.location = url;
//window.alert(url);
</script>
<?php
}
?>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+51
View File
@@ -0,0 +1,51 @@
<?php
require("../../inc/header.inc");
$dataTypeNo = $_REQUEST['dataTypeNo'];
$sysTypeNo = $_REQUEST['sysTypeNo'];
/*
if($sysTypeNo == '340' || $sysTypeNo == '380'){
if($isInpPwd < 1){
if($sysTypeNo == '340'){
$showTitle="AUC Manage Password";
}else{
$showTitle="EIR Manage Password";
}
echo "<form method=\"POST\" name=\"aucPwdChk\" action=\"$PHP_SELF\">";
echo "$showTitle:<input type=\"password\" name=\"inputPwd\" size=\"10\" class=\"text\">";
echo "<input type=\"hidden\" name=\"sysTypeNo\" value=\"$sysTypeNo\">";
echo "<input type=\"hidden\" name=\"isInpPwd\" value=\"1\">";
echo "&nbsp;&nbsp;&nbsp;<input type=\"submit\" value=\"$strSubmit\" class=\"button\">";
echo "</form>";
exit();
}else{
if($sysTypeNo == '340'){
$varName='AucManagePwd';
}else{
$varName='EirManagePwd';
}
$managePwd = getPubVar($varName);
if($managePwd != $inputPwd){
echo "Password error!";
exit();
}
}
}
*/
?>
<frameset rows="75,*" framespacing="0" border="0" frameborder="0">
<?php
echo "<frame name=\"header\" scrolling=\"auto\" noresize target=\"main\" src=\"subscriberListUp.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&userType=$userType\" marginwidth=\"0\" marginheight=\"0\">";
echo "<frame name=\"main\" src=\"subscriberListDown.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&userType=$userType\" scrolling=\"auto\"target=\"_self\" marginwidth=\"0\" marginheight=\"0\">";
?>
<noframes>
<body>
<p>此网页使用了框架,但您的浏览器不支持框架。</p>
</body>
</noframes>
</frameset>
</html>
+484
View File
@@ -0,0 +1,484 @@
<?php
/*********************************************************
程序说明:
功能说明:用户信息显示上部页面
调用关系:调用: header.inc
被调用:
变量说明:
作者:
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$dataTypeNo = $_REQUEST['dataTypeNo'];
$sysTypeNo=$_REQUEST['sysTypeNo'];
?>
<script LANGUAGE="JavaScript">
function checkType(sel)
{
if(sel.value=="MSISDN")
{
document.getElementById('sisid').disabled=true;
}
else
{
document.getElementById('sisid').disabled=false;
}
}
function selectSysId(sysTypeNo,dataTypeNo){
var URL,selSysId;
selSysId = document.actionForm.sysId.value;
URL = "./subscriberListDown.php?sysId="+selSysId+"&sysTypeNo="+sysTypeNo+"&dataTypeNo="+dataTypeNo;
//window.alert(URL);
window.parent.main.location = URL;
}
function ignoreSpaces(string) {
var temp = "";
string = '' + string;
splitstring = string.split(" ");
for(i = 0; i < splitstring.length; i++)
temp += splitstring[i];
return temp;
}
function checkSubmit(actionType,transValue){
var baseURL,URL,selSysId;
//console.log("actionType"+<?php echo $sysTypeNo;?>);
switch(actionType){
case 3: //single add
<?php
switch($sysTypeNo){
case '325':
echo "baseURL = \"./vlrSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
//echo "baseURL = \"./subscriberConfig.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
case '330':
echo "baseURL = \"./hlrSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
//echo "baseURL = \"./subscriberConfig.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
case '340':
echo "baseURL = \"./aucSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
//echo "baseURL = \"./subscriberConfig.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
case '360':
echo "baseURL = \"./ppsSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
//echo "baseURL = \"./subscriberConfig.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
case '395':
echo "baseURL = \"./rcmSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
case '370':
echo "baseURL = \"./mnpSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
case '375':
echo "baseURL = \"./oprSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
//echo "baseURL = \"./subscriberConfig.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
case '378':
echo "baseURL = \"./ipalimSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
case '380':
echo "baseURL = \"./eirSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
//echo "baseURL = \"./subscriberConfig.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
case '390':
echo "selSysId = document.actionForm.sysId.value;";
echo "baseURL = \"./vmsSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
//echo "baseURL = \"./subscriberConfig.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
?>
baseURL = baseURL+'sysId='+selSysId+'&';
<?php
break;
case '253':
echo "baseURL = \"./sn-hlrSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
}
?>
break;
case 6: //batch add
<?php
switch($sysTypeNo){
case '330':
echo "baseURL = \"./hlrSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&isBatchCreate=1&\"; \n";
//echo "baseURL = \"./subscriberConfig.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&isBatchCreate=1&\"; \n";
break;
case '360':
echo "baseURL = \"./ppsSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&isBatchCreate=1&\"; \n";
//echo "baseURL = \"./subscriberConfig.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&isBatchCreate=1&\"; \n";
break;
case '395':
echo "baseURL = \"./rcmSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&isBatchCreate=1&\"; \n";
break;
case '390':
echo "selSysId = document.actionForm.sysId.value;";
echo "baseURL = \"./vmsSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&isBatchCreate=1&\"; \n";
//echo "baseURL = \"./subscriberConfig.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&isBatchCreate=1&\"; \n";
?>
baseURL = baseURL+'sysId='+selSysId+'&';
<?php
break;
case '253':
echo "baseURL = \"./sn-hlrSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
}
?>
break;
case 5: //upload
<?php
switch($sysTypeNo){
case '325':
echo "baseURL = \"./vlrSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
//echo "baseURL = \"./subscriberConfig.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
case '330':
echo "baseURL = \"./hlrSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
//echo "baseURL = \"./subscriberConfig.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
case '340':
echo "baseURL = \"./aucSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
//echo "baseURL = \"./subscriberConfig.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
case '360':
echo "baseURL = \"./ppsSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
//echo "baseURL = \"./subscriberConfig.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
case '395':
echo "baseURL = \"./rcmSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
case '370':
echo "baseURL = \"./mnpSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
case '375':
echo "baseURL = \"./oprSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
//echo "baseURL = \"./subscriberConfig.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
case '378':
echo "baseURL = \"./ipalimSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
case '380':
echo "baseURL = \"./eirSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
//echo "baseURL = \"./subscriberConfig.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
case '390':
echo "selSysId = document.actionForm.sysId.value;";
echo "baseURL = \"./vmsSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
//echo "baseURL = \"./subscriberConfig.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
?>
baseURL = baseURL+'sysId='+selSysId+'&';
<?php
break;
case '253':
echo "baseURL = \"./sn-hlrSubsConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
break;
}
?>
break;
case 4: //statistic
<?php
if($sysTypeNo==390)
echo "baseURL = \"../pubSubsImport/subscriberImportIndex.php?sysId=$sysId&dataTypeNo=$dataTypeNo&\"; \n";
else
echo "baseURL = \"../pubSubsImport/subscriberImportIndex.php?sysId=$sysTypeNo"."_99_99&dataTypeNo=$dataTypeNo&\"; \n";
?>
break;
default:
alert("Unknown action!");
return(false);
}
//URL = baseURL+transValue+'&sysId='+selSysId;
//alert(baseURL);
URL = baseURL+transValue;
window.parent.main.location = URL;
}
</script>
<!--
if (actionType == 5) {
window.alert(URL);
return;
}
-->
<base target="main">
<body topmargin=14 leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('up');" onresize="javascript:adjust_frame('up');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<form name="actionForm" method="POST" action="./subscriberListDown.php" >
<?php
$canwrite_flag=checkWritePrivilege();
switch($sysTypeNo){
case '330':
$titleName="$strTitleAccount > Subscriber > HLR";
$helpId = "2.2.1.2";
break;
case '325':
$titleName="$strTitleAccount > Subscriber > VLR";
$helpId = "2.2.1.1";
break;
case '360':
if($dataTypeNo == 0){
$titleName="$strTitleAccount > Subscriber > PPS";
$helpId = "2.2.1.3";
}else{
$titleName="$strTitleAccount > Recharge card";
$helpId = "2.2.2";
}
break;
case '395':
$titleName="$strTitleAccount > Recharge card";
$helpId = "2.2.2";
break;
case '370':
$titleName="$strTitleAccount > Subscriber > MNP";
$helpId = "2.2.1.7";
break;
case '375':
$titleName="$strTitleAccount > Subscriber > OPPS";
$helpId = "2.2.1.8";
break;
case '378':
$titleName="$strTitleAccount > Subscriber > iPALIM";
$helpId = "2.2.1.9";
break;
case '340':
$titleName="$strTitleAccount > Subscriber > AUC";
$helpId = "2.2.1.4";
break;
case '380':
$titleName="$strTitleAccount > Subscriber > EIR";
$helpId = "2.2.1.5";
break;
case '390':
$titleName="$strTitleAccount > Subscriber > $strVMSOrVSS";
$helpId = "2.2.1.6";
break;
default:
$titleName="Unknown sysTypeNo";
exit(1);
}
adjust_head_frame("up");
adjust_title_head_frame("up");
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"60%\">";
echo "$titleName";
echo "</td>";
echo "<td width=\"40%\" align=\"right\" title=\"Help\">";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=\"left\">";
switch($sysTypeNo){
case '330':
echo "$tabelHead";
echo "<select size=\"1\" name=\"selKeyFieldName\" >";
echo "<option value=\"inter_msisdn\">MSISDN</option>";
echo "<option value=\"imsi\" selected>IMSI</option>";
echo "</select>";
break;
case '325':
echo "$tabelHead";
echo "<select size=\"1\" name=\"selKeyFieldName\" onChange=\"javascript:checkType(this);\">";
echo "<option value=\"MSISDN\">MSISDN</option>";
echo "<option value=\"IMSI\" selected>IMSI</option>";
echo "</select>";
break;
case '360':
if($dataTypeNo == 0){
echo "$tabelHead";
echo "MSISDN";
echo "<input type=\"hidden\" name=\"selKeyFieldName\" value=\"msisdn\">";
}else{
echo "$tabelHead";
echo "Card no.";
echo "<input type=\"hidden\" name=\"selKeyFieldName\" value=\"card_no\">";
}
break;
case '395':
echo "$tabelHead";
echo "Card no.";
echo "<input type=\"hidden\" name=\"selKeyFieldName\" value=\"card_no\">";
break;
case '370':
echo "$tabelHead";
echo "MSISDN";
echo "<input type=\"hidden\" name=\"selKeyFieldName\" value=\"msisdn\">";
break;
case '375':
echo "$tabelHead";
if(!isset($opps_type_sel))
$opps_type_sel=0;
$oppsType=array(0=>"All",1=>"OPR",2=>"IMDX");
echo "User Type&nbsp;";
echo "<select name=\"opps_type_sel\">";
for($i=0;$i<sizeof($oppsType);$i++)
{
if($i == $opps_type_sel)
echo "<option value=$i selected>{$oppsType[$i]}</option>";
else
echo "<option value=$i>{$oppsType[$i]}</option>";
}
echo "</select>&nbsp;";
//echo "MSISDN";
//echo "<input type=\"hidden\" name=\"selKeyFieldName\" value=\"msisdn\">";
echo "&nbsp;&nbsp;<select size=\"1\" name=\"selKeyFieldName\" >";
echo "<option value=\"msisdn\">MSISDN</option>";
echo "<option value=\"imsi\" selected>IMSI</option>";
echo "<option value=\"imei\" selected>IMEI</option>";
echo "</select>&nbsp;";
break;
case '378':
echo "$tabelHead";
echo "IMSI";
echo "<input type=\"hidden\" name=\"selKeyFieldName\" value=\"imsi\">";
break;
case '340':
echo "$tabelHead";
echo "IMSI";
echo "<input type=\"hidden\" name=\"selKeyFieldName\" value=\"key_imsi\">";
break;
case '380':
echo "$tabelHead";
echo "IMEI";
echo "<input type=\"hidden\" name=\"selKeyFieldName\" value=\"imei\">";
break;
case '390':
echo "$tabelHead";
echo "MSISDN";
echo "<input type=\"hidden\" name=\"selKeyFieldName\" value=\"msisdn\">";
break;
case '253':
echo "$tabelHead";
echo "<select size=\"1\" name=\"selKeyFieldName\" >";
echo "<option value=\"msisdn\" selected>MSISDN</option>";
echo "<option value=\"imsi\">IMSI</option>";
echo "</select> ";
break;
default:
echo "Unknown sysTypeNo";
exit(1);
}
?>
<input type="text" name="selKeyValue" size="20" onBlur="this.value=ignoreSpaces(this.value);" class="text">&nbsp;&nbsp;
<nobr>
<span id="divid" onClick="javascript:document.actionForm.submit();" style="cursor:hand">
<?php
echo "<input type=\"submit\" value=\"Search in OMC\" class=\"button\" name=\"searchInOmc\">";
echo "&nbsp;";
//echo "<IMG align=absBottom border=0 src=\"../../images/search.gif\" >&nbsp;$strSearch&nbsp;";
if( ('330'==$sysTypeNo) || ('360'==$sysTypeNo) || ('395'==$sysTypeNo)){
echo "<input type=\"submit\" value=\"Overview\" class=\"button\" name=\"overview\">";
}
switch ($sysTypeNo) {
case '325':
echo "<input type=\"submit\" id=\"sisid\" value=\"Search in VLR\" class=\"button\" name=\"searchInServer\">";
//echo "<input type=button onClick=\"javascript:checkType();\" class=\"button\" value=\"Search in VLR\" name=\"searchInServer\">";
break;
/*
case '330':
echo "<input type=\"submit\" value=\"Search in HLR\" class=\"button\" name=\"searchInServer\">";
break;
case '360':
echo "<input type=\"submit\" value=\"Search in PPS\" class=\"button\" name=\"searchInServer\">";
break;
*/
default:
break;
}
if($sysTypeNo==390){
echo "Select System:";
echo "<select name=\"sysId\" size=\"1\" onChange=\"javascript:selectSysId($sysTypeNo,$dataTypeNo)\">";
echo "<option value=\"{$sysTypeNo}_0_0\">{$strVMSOrVSS}_0_0</option>";
echo "<option value=\"{$sysTypeNo}_1_0\">{$strVMSOrVSS}_1_0</option>";
echo "<option value=\"{$sysTypeNo}_2_0\">{$strVMSOrVSS}_2_0</option>";
echo "<option value=\"{$sysTypeNo}_3_0\">{$strVMSOrVSS}_3_0</option>";
echo "<option value=\"{$sysTypeNo}_4_0\">{$strVMSOrVSS}_4_0</option>";
echo "<option value=\"{$sysTypeNo}_5_0\">{$strVMSOrVSS}_5_0</option>";
echo "<option value=\"{$sysTypeNo}_6_0\">{$strVMSOrVSS}_6_0</option>";
echo "<option value=\"{$sysTypeNo}_7_0\">{$strVMSOrVSS}_7_0</option>";
echo "<option value=\"{$sysTypeNo}_8_0\">{$strVMSOrVSS}_8_0</option>";
echo "<option value=\"{$sysTypeNo}_9_0\">{$strVMSOrVSS}_9_0</option>";
echo "</select>";
}
?>
</div>
<?php
echo "</td>";
echo "<td align=\"right\">";
if($sysTypeNo==390)
$strGetAll='Get';
?>
<span style="cursor:hand" onClick=checkSubmit(5,"isLoadIndex=1")>
<nobr>
<IMG align=absBottom border=0 src="../../images/reload.gif">&nbsp;<?php echo "$strGetAll";?>&nbsp;&nbsp;
</nobr>
</span>
<?php
if ($sysTypeNo != 325 && $sysTypeNo != 340 && $dataTypeNo != 1){
if($canwrite_flag)
echo "<span style=\"cursor:hand\" onClick=checkSubmit(3,\"isTryCreate=1\")><nobr>";
else
echo "<span disabled><nobr>";
echo "<IMG align=absBottom border=0 src=\"../../images/add.gif\">Add single";
echo "&nbsp;&nbsp;</nobr></span>";
}
if (($sysTypeNo == 330 || $sysTypeNo == 360 || $sysTypeNo == 390) &&$dataTypeNo == 0){
if($canwrite_flag)
echo "<span style=\"cursor:hand\" onClick=checkSubmit(6,\"isTryCreate=1\")><nobr>";
else
echo "<span disabled><nobr>";
echo "<IMG align=absBottom border=0 src=\"../../images/batchAdd.gif\">Add batch";
echo "&nbsp;&nbsp;</nobr></span>";
}
if ($sysTypeNo != 325 && $sysTypeNo != 340 && $sysTypeNo != 390){
if($canwrite_flag)
echo "<span style=\"cursor:hand\" onClick=checkSubmit(4,\"isTryImport=1\")><nobr>";
else
echo "<span disabled><nobr>";
echo "<IMG align=absBottom border=0 src=\"../../images/import_1.gif\">$strImport";
echo "</nobr></span>";
}
echo "</td>";
echo "</tr>";
echo "</table>";
//$tabelHead="<table border=\"0\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\"><tr valign=\"bottom\"><td><nobr> ";
echo "<input Name=\"sysTypeNo\" type=\"hidden\" value=\"$sysTypeNo\">";
echo "<input Name=\"dataTypeNo\" type=\"hidden\" value=\"$dataTypeNo\">";
adjust_title_tail_frame("up");
adjust_content_head_frame("up");
adjust_content_tail_frame("up");
?>
</form>
</body>
</html>
+684
View File
@@ -0,0 +1,684 @@
<?php
/*********************************************************
程序说明:
功能说明:vlr单个用户数据显示专用页面
调用关系:调用: header.inc
变量说明:
输入变量:
$keyValue :由用户列表传来
$sysId :由用户列表传来或本页面指定
$dataTypeNo :数据类型,0=用户数据,1=冲值卡数据
$language :语言种类
$canSetNum :每次最多可以修改的字段个数
作者:
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$DEBUG = 0;
if($DEBUG)echo "<br>正在调试中,给您的工作带来不便,请原谅!!:)";
//==========================================================
//变量定义
//==========================================================
$pubDb ='OMC_PUB';
$sysSubsConfTable ='OMC_PUB.sysSubsConf';
$systemConfTable ='OMC_PUB.sysConf';
$nReadComm = 1;
$nChangeComm = 2;
$nCreateComm = 3;
$nDeleteComm = 4;
$nLoadIndexComm = 5;
$maxLevelNum = 10;
$nInteger = 2;
$nAscStr = 3;
$nHexStr = 4;
//------------选择语言版本----------
if($language == 'eng'){
}else{
}
$odbGeneralDef=array(
//array('Name', 'offset' ,'remark'),
array('BAOC', '00.0' ,'BAOC'),
array('BOIC', '00.1' ,'BOIC'),
array('BOIC_HPLMN', '00.2' ,'BOIC-HPLMN'),
array('BAIC_HPLMN_CT', '02.1' ,'BAIC-HPLMN CT'),
array('Roaming', '02.3' ,'Roaming'),
array('Roaming_CT', '02.4' ,'Roaming CT')
);
$CamelFlagDef=array(
array('camelFlag', '00.0' ,'Support Camel'),
array('OCSI', '00.1' ,'OCSI'),
array('TCSI', '00.2' ,'TCSI'),
array('SMS_CSI', '01.0' ,'SMS-CSI'),
);
//==========================================================
//输入变量
//==========================================================
$canSetNum = isset($canSetNum)?$canSetNum:'all';
//显示用户数据编辑页面,需要的变量
$sysId=$_REQUEST['sysId'];
$keyValue=$_REQUEST['keyValue'];
$sysTypeNo=$_REQUEST['sysTypeNo'];
$sysNo=$_REQUEST['sysNo'];
$subSysNo=$_REQUEST['subSysNo'];
$dataTypeNo=$_REQUEST['dataTypeNo'];
$isRead=$_REQUEST['isRead'];
$isChange=$_REQUEST['isChange'];
$isCreate=$_REQUEST['isCreate'];
$isDelete=$_REQUEST['isDelete'];
$isLoadIndex=$_REQUEST['isLoadIndex'];
if($DEBUG)echo "<br>sysId=$sysId";
if($DEBUG)echo "<br>canSetNum=$canSetNum";
if($DEBUG)echo "<br>keyValue=$keyValue";
if($DEBUG)echo "<br>sysTypeNo=$sysTypeNo";
if($DEBUG)echo "<br>sysNo=$sysNo";
if($DEBUG)echo "<br>subSysNo=$subSysNo";
if($DEBUG)echo "<br>dataTypeNo=$dataTypeNo";
//例如:
//$canSetNum =1; // 或= 'all'
//$sysId='330_0_0';
//$keyValue= '0460022157127016';
//操作类型变量
if($DEBUG)echo "<br>isRead=$isRead";
if($DEBUG)echo "<br>isChange=$isChange";
if($DEBUG)echo "<br>isCreate=$isCreate";
if($DEBUG)echo "<br>isDelete=$isDelete";
if($DEBUG)echo "<br>isLoadIndex=$isLoadIndex";
//==========================================================
//数据处理
//==========================================================
if (1 == $isLoadIndex) {
$fieldNameList = "IMSI,MSISDN,IMSIDetachFlag,LAI,O_CSI";
} else {
$fieldNameList = "ALL";
}
if ($DEBUG) echo "fieldNameList=$fieldNameList<br>";
?>
<base target="_self">
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
require("../pubSubsMng/sendComm.inc");
require("../pubSubsMng/dataProc.inc");
//==========================================================
//输出并显示数据
//==========================================================
$seqNo=0;
?>
<script LANGUAGE="JavaScript">
function keepCheckBox(thisCheckBox)
{
if(thisCheckBox.value == 1){
thisCheckBox.checked = true;
}else{
thisCheckBox.checked = false;
}
}
</script>
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
echo "<br>";
?>
<form method="POST" name="update" action="<?php echo"$PHP_SELF";?>" >
<?php
//显示用户参数编辑页面
?>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><nobr>
<?php echo "Server Id:"?>
<select name="sysId" size="1">
<?php
$selSysIdSql="SELECT sysNo,subSysNo,sysTypeName
FROM sysInfo,sysConf
WHERE sysInfo.sysTypeNo='$sysTypeNo' AND sysConf.sysTypeNo='$sysTypeNo'
ORDER BY baseStat DESC,updateTime DESC
";
if($DEBUG)echo "<br>$selSysIdSql";
$sysIdResult=mysqli_query($pubConn,$selSysIdSql);
echo mysqli_error($pubConn);
while($sysIdRows=mysqli_fetch_array($sysIdResult)){
echo "<option value=\"$sysTypeNo"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]\"";
if(($sysNo == $sysIdRows[sysNo]) && ($subSysNo == $sysIdRows[subSysNo]))
echo " selected";
echo " >$sysIdRows[sysTypeName]"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]";
echo "</option>";
}
?>
</select>
</nobr>
</td>
<td><nobr>
<?php
$showkeyValue= $keyValue;
$keyValueName='IMSI';
echo "&nbsp;&nbsp;$keyValueName:$showkeyValue";
?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</nobr></td>
<td>
<input type="submit" value="Get" name="read" title="" class="button" onClick="javascript:document.update.isRead.value=1;">
<input type="hidden" value="0" name="isRead">
</td>
<td width="100%">&nbsp;</td>
</tr>
</table>
<br>
<?php
//将已取出的用户数据显示出来
//$tmpRow[fieldName]
?>
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
<?php
//Table Head
echo "<tr bgcolor=\"#E6E6E6\">";
echo "<td width=\"10%\">$strID</td>";
echo "<td width=\"45%\">$strField</td>";
echo "<td width=\"45%\">$strValue</td>";
echo "</tr>";
//IMSI
$IMSI=$tmpRow[IMSI];
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>IMSI</td>";
echo "<td>$IMSI &nbsp;</td>";
echo "</tr>";
//MSISDN
$MSISDN=str_replace('F','',$tmpRow[MSISDN]);
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>MSISDN</td>";
echo "<td>$MSISDN &nbsp;</td>";
echo "</tr>";
//MS Category
$categoryDef=array(
array('00','Unknown'),
array('01','French language'),
array('02','English language'),
array('03','German language'),
array('04','Russian language'),
array('05','Spanish language'),
array('0A','Ordinary'),
array('0B','Subscriber with priority'),
);
$category=$tmpRow[MS_Category];
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>MS category</td>";
for($i=0;$i<sizeof($categoryDef);$i++){
if($categoryDef[$i][0] == $category){
$showValue=$categoryDef[$i][1];
break;
}
}
if(strlen($showValue)){
echo "<td>$showValue</td>";
}else{
echo "<td>unknown($category)</td>";
}
echo "</tr>";
//Subscriber status
//0=service granted, 1=operator determined barring
$Sub_status=$tmpRow[Sub_status];
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>ODB status</td>";
if($Sub_status > 0){
echo "<td>Operator determined barring</td>";
}else{
echo "<td>Service granted</td>";
}
echo "</tr>";
//ODB general
$odbGeneral=$tmpRow[ODB_General];
$odbGeneralDef=array(
//array('Name', 'offset' ,'remark'),
array('BAOC', '00.0' ,'provisioned'),
array('BOIC', '00.1' ,'provisioned'),
array('BOIC_exHC', '00.2' ,'provisioned'),
array('BPRIC', '00.3' ,'provisioned'),
array('BPREC', '00.4' ,'provisioned'),
array('SS_Access', '00.5' ,'provisioned'),
array('BAIC', '02.0' ,'provisioned'),
array('BAICRoam', '02.1' ,'provisioned')
// array('BR_outH', '02.3' ,'provisioned'),
// array('BR_outHC', '02.4' ,'provisioned')
);
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>ODB general</td>";
echo "<td>";
for($i=0;$i<sizeof($odbGeneralDef);$i++){
$value=getBitValue($odbGeneral,$odbGeneralDef[$i][1]);
if($value == '1'){
echo "<input type=\"checkbox\" value=\"1\" onclick=\"keepCheckBox(this);\" checked >{$odbGeneralDef[$i][0]}<br>";
}else{
echo "<input type=\"checkbox\" value=\"0\" onclick=\"keepCheckBox(this);\" >{$odbGeneralDef[$i][0]}<br>";
}
}
echo "</td>";
echo "</tr>";
//Provision_ts
$provisionTs=$tmpRow[Provision_ts];
$provisionTsDef=array(
//array('Name', 'offset'),
array('Telephony provision', '00.0' ),
array('Emergency call provision', '00.1' ),
array('Short message MT provision', '00.2' ),
array('Short message MO provision', '00.3' ),
);
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Provisioned tele service</td>";
echo "<td>";
for($i=0;$i<sizeof($provisionTsDef);$i++){
$value=getBitValue($provisionTs,$provisionTsDef[$i][1]);
if($value == '1'){
echo "<input type=\"checkbox\" value=\"1\" onclick=\"keepCheckBox(this);\" checked >{$provisionTsDef[$i][0]}<br>";
}else{
echo "<input type=\"checkbox\" value=\"0\" onclick=\"keepCheckBox(this);\" >{$provisionTsDef[$i][0]}<br>";
}
}
echo "</td>";
echo "</tr>";
//TMSI
$TMSI=$tmpRow[TMSI];
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>TMSI</td>";
echo "<td>$TMSI &nbsp;</td>";
echo "</tr>";
//LAI
$LAI=$tmpRow[LAI];
$MCC=substr($LAI,0,2);
$MCC=strrev($MCC);
$MCC=$MCC.strrev(substr($LAI,2,2));
$MCC=str_replace("F","",$MCC);
$MNC=substr($LAI,4,2);
$MNC=strrev($MNC);
$MNC=str_replace("F","",$MNC);
$LAC=substr($LAI,-4);
//$LAC=str_replace("F","",$LAC);
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>LAI(MCC-MNC-LAC)</td>";
echo "<td>$MCC-$MNC-$LAC</td>";
echo "</tr>";
//Cell_ID
$cellId=$tmpRow[Cell_ID];
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Cell ID</td>";
echo "<td>$cellId &nbsp;</td>";
echo "</tr>";
//Location confirm
$locationConfirm=$tmpRow[LocationConfirm];
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Location confirm</td>";
if($locationConfirm > 0){
echo "<td>Confirmed</td>";
}else{
echo "<td>Not Confirmed</td>";
}
echo "</tr>";
//Data confirm
$dataConfirmFlag=$tmpRow[DataConfirmFlag];
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Data confirm</td>";
if($dataConfirmFlag > 0){
echo "<td>Confirmed</td>";
}else{
echo "<td>Not Confirmed</td>";
}
echo "</tr>";
//RadioConfirmFlag
$radioConfirmFlag=$tmpRow[RadioConfirmFlag];
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Radio confirm</td>";
if($radioConfirmFlag > 0){
echo "<td>Confirmed</td>";
}else{
echo "<td>Not Confirmed</td>";
}
echo "</tr>";
//IMSI detach
$IMSIDetachFlag=$tmpRow[IMSIDetachFlag];
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>IMSI detach</td>";
if($IMSIDetachFlag > 0){
echo "<td>Detached</td>";
}else{
echo "<td>Attached</td>";
}
echo "</tr>";
//MNRF
$MNRF=$tmpRow[MNRF];
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>MNRF</td>";
if($MNRF > 0){
echo "<td>Not Reachable</td>";
}else{
echo "<td>Reachable</td>";
}
echo "</tr>";
//LA_Not_allowed
$LANotAllowedFlag =$tmpRow[LANotAllowedFlag];
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>LA_Not_allowed</td>";
if($LANotAllowedFlag > 0){
echo "<td>Allowed</td>";
}else{
echo "<td>Not allowed</td>";
}
echo "</tr>";
//Roaming Restricted
$RoamRestricFlag =$tmpRow[RoamRestricFlag];
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Roaming restricted</td>";
if($RoamRestricFlag > 0){
echo "<td>Restricted</td>";
}else{
echo "<td>Not restricted</td>";
}
echo "</tr>";
$tmpFieldArr=array(
//array('showName_1','fielname_1','showName_2','fielname_2'),
array('CFU status', 'CFU_ST', 'CFU: Forward to number', 'CFU_Num'),
array('CFB status', 'CFB_ST', 'CFB: Forward to number', 'CFB_Num'),
array('CFNRy status', 'CFNRy_ST', 'CFNRy: Forward to number', 'CFNRy_Num'),
array('CFNRc status', 'CFNRc_ST', 'CFNRc: Forward to number', 'CFNRc_Num')
);
$tmpDefArr=array(
//array('Name', 'offset'),
array('A bit (indicate active state)', '00.0' ),
array('R bit (indicate registration state)','00.1' ),
array('P bit (indicate provision state)', '00.2' ),
array('Q bit (indicate quiescent state)', '00.3' ),
array('Notification to calling party', '00.5' ),
array('Notification to forwarding party', '00.7' )
);
for($i=0;$i<sizeof($tmpFieldArr);$i++){
$showName_1 =$tmpFieldArr[$i][0];
$showValue_1 =$tmpRow[$tmpFieldArr[$i][1]];
//echo "showValue_1=$showValue_1";
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>$showName_1</td>";
echo "<td>";
//$valuetest=getBitValue(04,00.7);
//echo "valuetest=$valuetest";
for($j=0;$j<sizeof($tmpDefArr);$j++){
$value=getBitValue($showValue_1,$tmpDefArr[$j][1]);
//echo "j=$j,value=$value";
if($value == '1'){
echo "<input type=\"checkbox\" value=\"1\" onclick=\"keepCheckBox(this);\" checked >{$tmpDefArr[$j][0]}<br>";
}else{
echo "<input type=\"checkbox\" value=\"0\" onclick=\"keepCheckBox(this);\" >{$tmpDefArr[$j][0]}<br>";
}
}
echo "</td>";
echo "</tr>";
$showName_2 =$tmpFieldArr[$i][2];
$showValue_2 =$tmpRow[$tmpFieldArr[$i][3]];
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>$showName_2</td>";
echo "<td>$showValue_2 &nbsp;</td>";
echo "</tr>";
}
//Barring all calls
$allBarFlag =$tmpRow[ALLBAR];
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Barring all calls</td>";
if($allBarFlag > 0){
echo "<td>Yes</td>";
}else{
echo "<td>No</td>";
}
echo "</tr>";
$tmpFieldArr=array(
// array('showName','fieldName'),
array('BAOC','BAOC'),
array('BOIC','BOIC'),
array('BOIC-ExHC','BOICexHC'),
array('BAIC','BAIC'),
array('BICRoam','BICRoam')
);
$tmpDef=array(
//array('Name', 'offset'),
array('A bit (indicate active state)', '00.0' ),
array('R bit (indicate registration state)','00.1' ),
array('P bit (indicate provision state)', '00.2' ),
array('Q bit (indicate quiescent state)', '00.3' )
);
for($i=0;$i<sizeof($tmpFieldArr);$i++){
$showName =$tmpFieldArr[$i][0];
$showValue =$tmpRow[$tmpFieldArr[$i][1]];
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>$showName</td>";
echo "<td>";
for($j=0;$j<sizeof($tmpDef);$j++){
$value=getBitValue($showValue,$tmpDef[$j][1]);
if($value == '1'){
echo "<input type=\"checkbox\" value=\"1\" checked onclick=\"keepCheckBox(this);\" >{$tmpDef[$j][0]}<br>";
}else{
echo "<input type=\"checkbox\" value=\"0\" onclick=\"keepCheckBox(this);\">{$tmpDef[$j][0]}<br>";
}
}
echo "</td>";
echo "</tr>";
}
$tmpDefArr=array(
// array('showName','fieldName'),
array('CLIP','CLIP'),
array('CLIR','CLIR'),
array('COLP','COLP'),
array('COLR','COLR'),
array('AOCI','AOCI'),
array('AOCC','AOCC'),
array('Call hold','CallHold'),
array('Call wait','CallWait'),
array('ECT','ECT'),
array('MPTY','MPTY')
);
$tmpDef=array(
//array('Name', 'offset'),
array('A bit (indicate active state)', '00.0' ),
array('R bit (indicate registration state)','00.1' ),
array('P bit (indicate provision state)', '00.2' ),
array('Q bit (indicate quiescent state)', '00.3' )
);
for($i=0;$i<sizeof($tmpDefArr);$i++){
$showName =$tmpDefArr[$i][0];
$showValue =$tmpRow[$tmpDefArr[$i][1]];
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>$showName</td><td>";
/*
if($showValue > 0){
echo "<td>Actived</td>";
}else{
echo "<td>Not Actived</td>";
}
*/
for($j=0;$j<sizeof($tmpDef);$j++){
$value=getBitValue($showValue,$tmpDef[$j][1]);
if($value == '1'){
echo "<input type=\"checkbox\" value=\"1\" checked onclick=\"keepCheckBox(this);\" >{$tmpDef[$j][0]}<br>";
}else{
echo "<input type=\"checkbox\" value=\"0\" onclick=\"keepCheckBox(this);\">{$tmpDef[$j][0]}<br>";
}
}
echo "</td></tr>";
}
//O_CSI
$O_CSI =$tmpRow[O_CSI];
$oCsiFlag=substr($O_CSI,0,1);
$oCsiScpNum=substr($O_CSI,4,12);
$oCsiScpNum=str_replace('F','',$oCsiScpNum);
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>O-CSI</td>";
if(strlen($O_CSI) == 0){
echo "<td>Not Provisioned</td>";
}else{
echo "<td>";
echo "Provisioned";
echo "<br>SCF Number:$oCsiScpNum";
echo "</td>";
echo "</tr>";
}
//SMS_CSI
$SMS_CSI =$tmpRow[SMS_CSI];
$smsCsiFlag=substr($SMS_CSI,0,1);
$smsCsiNum=substr($SMS_CSI,4,12);
$smsCsiNum=str_replace('F','',$smsCsiNum);
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>SMS-CSI</td>";
if(strlen($SMS_CSI) == 0){
echo "<td>Not Provisioned</td>";
}else{
echo "<td>";
echo "Provisioned";
echo "<br>SCF Number:$smsCsiNum";
echo "</td>";
echo "</tr>";
}
//MSISDN opt
$msisdn_opt=$tmpRow[MSISDN_opt];
$msisdn_opt=str_replace('F','',$msisdn_opt);
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>MSISDN(Opt)</td>";
if(trim($msisdn_opt)=="")
echo "<td>--</td>";
else
echo "<td>$msisdn_opt</td>";
//opps flag
$opps_flag=$tmpRow[OppsFlag]+0;
$opps_flag_label=array(0=>"OPR Not Registerd",
1=>"OPR WithOut Roam Agreement OPRState",
2=>"OPR With Roam Agreeement OPRState",
3=>"OPR With Roam Agreeement RoamingState",
4=>"IMDXPrivate",
5=>"IMDXHbrid",
6=>"IMDXPublic");
echo "<tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>OPPS Flag</td>";
if($opps_flag<0 || $opps_flag>6)
echo "<td>--</td>";
else
echo "<td>{$opps_flag_label[$opps_flag]}</td>";
?>
</table>
<?php
//*****************************************隐藏输入框,用于传递值****************************************
echo "\n<input type=\"hidden\" name=\"dataTypeNo\" value=\"$dataTypeNo\">";
echo "\n<input type=\"hidden\" name=\"keyFieldName\" value=\"$indexFieldName\">";
echo "\n<input type=\"hidden\" name=\"keyValue\" value=\"$keyValue\">";
?>
<p>&nbsp;</p>
<?php
adjust_content_tail("down");
?>
</body>
</html>
+496
View File
@@ -0,0 +1,496 @@
[para]0[Name]MSISDN
[sqlName]MSISDN[t]input[unit]MSISDN[u]00.0-08.7[u]
[v]keepHex-low-F
[remark]
[para]1[Name]IMSI
[sqlName]IMSI[t]readOnly[unit]IMSI[u]00.0-15.7[u]
[v]keepAsc-low-F
[remark]
[para]2[Name]MSISDN
[sqlName]MSISDN[t]readOnly[unit]MSISDN[u]00.0-08.7[u]
[v]keepHex-low-F
[remark]
[para]3[Name]MS category
[sqlName]MS_Category[t]show[unit]MS category[u]00.0-00.7[u]
[v]00[opt]Unknown
[v]01[opt]French language
[v]02[opt]English language
[v]03[opt]German language
[v]04[opt]Russian language
[v]05[opt]Spanish language
[v]10[opt]Ordinary
[v]11[opt]Subscriber with priority
[remark]
[para]4[Name]ODB status
[sqlName]Sub_status[t]show[unit]ODB status[u]00.0-00.7[u]
[v]00[opt]Service granted
[v]01[opt]Operator determined barring
[remark]
[para]5[Name]ODB general
[sqlName]ODB_General[t]checkbox[unit]BAOC[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]BOIC[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]BOIC_exHC[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]BPRIC[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]BPREC[u]00.4-00.4[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]SS_Access[u]00.5-00.5[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]BAIC[u]00.6-00.6[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]BAICRoam[u]00.7-00.7[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]6[Name]Provisioned tele service
[sqlName]Provision_ts[t]checkbox[unit]Telephony provision[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Emergency call provision[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Short message MT provision[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Short message MO provision[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]7[Name]TMSI
[sqlName]TMSI[t]readOnly[unit]TMSI[u]00.0-03.7[u]
[v]keepHex-high-0
[remark]
[para]8[Name]LAI(MCC-MNC-LAC)
[sqlName]LAI[t]vlrSpecialRead[unit]CC[u]00.0-04.7[u]
[v]keepHex-low-F
[remark]
[para]9[Name]Cell ID
[sqlName]Cell_ID[t]readOnly[unit]Cell ID[u]00.0-01.7[u]
[v]keepHex-high-0
[remark]
[para]10[Name]Location confirm
[sqlName]LocationConfirm[t]show[unit]Location confirm[u]00.0-00.7[u]
[v]0[opt]Not Confirmed
[v]1[opt]Confirmed
[remark]
[para]11[Name]Data confirm
[sqlName]DataConfirmFlag[t]show[unit]Data confirm[u]00.0-00.7[u]
[v]0[opt]Not Confirmed
[v]1[opt]Confirmed
[remark]
[para]12[Name]Radio confirm
[sqlName]RadioConfirmFlag[t]show[unit]Radio confirm[u]00.0-00.7[u]
[v]0[opt]Not Confirmed
[v]1[opt]Confirmed
[remark]
[para]13[Name]IMSI detach
[sqlName]IMSIDetachFlag[t]show[unit]IMSI detach[u]00.0-00.7[u]
[v]0[opt]Attached
[v]1[opt]Detached
[remark]
[para]14[Name]MNRF
[sqlName]MNRF[t]show[unit]MNRF[u]00.0-00.7[u]
[v]0[opt]Reachable
[v]1[opt]Not Reachable
[remark]
[para]15[Name]LA_Not_allowed
[sqlName]LANotAllowedFlag[t]show[unit]LA_Not_allowed[u]00.0-00.7[u]
[v]0[opt]Not allowed
[v]1[opt]Allowed
[remark]
[para]16[Name]Roaming restricted
[sqlName]RoamRestricFlag[t]show[unit]Roaming restricted[u]00.0-00.7[u]
[v]0[opt]Not restricted
[v]1[opt]Restricted
[remark]
[para]17[Name]CFU status
[sqlName]CFU_ST[t]checkbox[unit]A bit (indicate active state[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Notification to calling party[u]00.5-00.5[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Notification to forwarding party[u]00.7-00.7[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]18[Name]CFU: Forward to number
[sqlName]CFU_Num[t]readOnly[unit]CFU: Forward to number[u]00.0-08.7[u]
[v]keepHex-low-F
[remark]
[para]19[Name]CFB status
[sqlName]CFB_ST[t]checkbox[unit]A bit (indicate active state[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Notification to calling party[u]00.5-00.5[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Notification to forwarding party[u]00.7-00.7[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]20[Name]CFB: Forward to number
[sqlName]CFB_Num[t]readOnly[unit]CFB: Forward to number[u]00.0-08.7[u]
[v]keepHex-low-F
[remark]
[para]21[Name]CFNRy status
[sqlName]CFNRy_ST[t]checkbox[unit]A bit (indicate active state[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Notification to calling party[u]00.5-00.5[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Notification to forwarding party[u]00.7-00.7[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]22[Name]CFNRy: Forward to number
[sqlName]CFNRy_Num[t]readOnly[unit]CFNRy: Forward to number[u]00.0-08.7[u]
[v]keepHex-low-F
[remark]
[para]23[Name]CFNRc status
[sqlName]CFNRc_ST[t]checkbox[unit]A bit (indicate active state[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Notification to calling party[u]00.5-00.5[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Notification to forwarding party[u]00.7-00.7[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]24[Name]CFNRc: Forward to number
[sqlName]CFNRc_Num[t]readOnly[unit]CFNRc: Forward to number[u]00.0-08.7[u]
[v]keepHex-low-F
[remark]
[para]25[Name]Barring all calls
[sqlName]ALLBAR[t]show[unit]Roaming restricted[u]00.0-03.7[u]
[v]00[opt]No
[v]01[opt]Yes
[remark]
[para]26[Name]BAOC
[sqlName]BAOC[t]checkbox[unit]A bit (indicate active state)[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]27[Name]BOIC
[sqlName]BOIC[t]checkbox[unit]A bit (indicate active state)[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]28[Name]BOIC-ExHC
[sqlName]BOICexHC[t]checkbox[unit]A bit (indicate active state)[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]29[Name]BAIC
[sqlName]BAIC[t]checkbox[unit]A bit (indicate active state)[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]30[Name]BICRoam
[sqlName]BICRoam[t]checkbox[unit]A bit (indicate active state)[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]31[Name]CLIP
[sqlName]CLIP[t]checkbox[unit]A bit (indicate active state)[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]32[Name]CLIR
[sqlName]CLIR[t]checkbox[unit]A bit (indicate active state)[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]33[Name]COLP
[sqlName]COLP[t]checkbox[unit]A bit (indicate active state)[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]34[Name]COLR
[sqlName]COLR[t]checkbox[unit]A bit (indicate active state)[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]35[Name]AOCI
[sqlName]AOCI[t]checkbox[unit]A bit (indicate active state)[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]36[Name]AOCC
[sqlName]AOCC[t]checkbox[unit]A bit (indicate active state)[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]37[Name]Call hold
[sqlName]CallHold[t]checkbox[unit]A bit (indicate active state)[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]38[Name]Call wait
[sqlName]CallWait[t]checkbox[unit]A bit (indicate active state)[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]38[Name]ECT
[sqlName]ECT[t]checkbox[unit]A bit (indicate active state)[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]39[Name]MPTY
[sqlName]MPTY[t]checkbox[unit]A bit (indicate active state)[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]R bit (indicate registration state)[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]P bit (indicate provision state)[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Q bit (indicate quiescent state)[u]00.3-00.3[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
[para]40[Name]O-CSI
[sqlName]O_CSI[t]show[unit]O-CSI[u]00.0-03.7[u]
[v]00[opt]Not Provisioned
[v]01[opt]Provisioned
SCF Number:$oCsiScpNum
[remark]
[para]41[Name]SMS-CSI
[sqlName]SMS_CSI[t]show[unit]SMS-CSI[u]00.0-03.7[u]
[v]00[opt]Not Provisioned
[v]01[opt]Provisioned
SCF Number:$oCsiScpNum
[remark]
[para]42[Name]MSISDN(Opt)
[sqlName]MSISDN_opt[t]readOnly[unit]MSISDN(Opt)[u]00.0-15.7[u]--
[v]keepAsc-low-E
[remark]
[para]43[Name]OPPS Flag
[sqlName]MSISDN_opt[t]show[unit]]OPPS Flag[u]00.0-03.7[u]
[v]0[opt]OPR Not Registerd
[v]1[opt]OPR WithOut Roam Agreement OPRState
[v]2[opt]OPR With Roam Agreeement OPRState
[v]3[opt]OPR With Roam Agreeement RoamingState
[v]4[opt]IMDXPrivate
[v]5[opt]IMDXHbrid
[v]6[opt]IMDXPublic
[remark]
+649
View File
@@ -0,0 +1,649 @@
<?php
/*********************************************************
程序说明:
功能说明:vms用户数据维护专用页面
1、将用户数据表的数据导入到临时参数表。
2、修改的用户数据保存到临时参数表中,
3、设置用户参数时,返回值将修改用户表和临时表。
调用关系:调用: header.inc
变量说明:
输入变量:
$keyValue :由用户列表传来
$sysId :由用户列表传来或本页面指定
$dataTypeNo :数据类型,0=用户数据,1=冲值卡数据
$language :语言种类
$canSetNum :每次最多可以修改的字段个数
作者:
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$DEBUG = 0;
if($DEBUG) echo "<br>正在调试中,给您的工作带来不便,请原谅!!:)";
//==========================================================
//变量定义
//==========================================================
$canwrite_flag=checkWritePrivilege();
$pubDb = 'OMC_PUB';
$sysSubsConfTable ='OMC_PUB.sysSubsConf';
$systemConfTable = 'OMC_PUB.sysConf';
$nReadComm = 1;
$nChangeComm = 2;
$nCreateComm = 3;
$nDeleteComm = 4;
$nLoadIndexComm = 5;
$maxLevelNum = 10;
$nInteger = 2;
$nAscStr = 3;
$nHexStr = 4;
$statusDef=array(
//array('Name', 'offset','remark'),
array('use_flag', '00.2' ,'Register flag'),
array('enable_flag','00.1' ,'Active flag'),
array('locked_flag','00.0' ,'Locked flag')
);
//------------选择语言版本----------
if($language == 'eng'){
}else{
}
//select sum(balance) from user_info
//==========================================================
//输入变量
//==========================================================
$canSetNum=$_REQUEST['canSetNum'];
$keyValue=$_REQUEST['keyValue'];
$subSysNo=$_REQUEST['subSysNo'];
$dataTypeNo=$_REQUEST['dataTypeNo'];
$canSetNum = isset($canSetNum)?$canSetNum:'all';
if ($_REQUEST['sysId'])
{
$sysId = $_REQUEST['sysId'];
if($DEBUG) echo "<br>sysId=$sysId";
$sysIdArr=explode('_',$sysId);
$sysTypeNo=$sysIdArr[0];
$sysNo=$sysIdArr[1];
// echo "sysTypeNo=$sysTypeNo,sysNo=$sysNo";
}
$canSetNum = isset($canSetNum)?$canSetNum:'all';
//显示用户数据编辑页面,需要的变量
if($DEBUG) echo "<br>sysId=$sysId";
if($DEBUG) echo "<br>canSetNum=$canSetNum";
if($DEBUG) echo "<br>keyValue=$keyValue";
if($DEBUG) echo "<br>sysTypeNo=$sysTypeNo";
if($DEBUG) echo "<br>sysNo=$sysNo";
if($DEBUG) echo "<br>subSysNo=$subSysNo";
if($DEBUG) echo "<br>dataTypeNo=$dataTypeNo";
//例如:
//$canSetNum =1; // 或= 'all'
//$sysId='330_0_0';
//$keyValue= '0460022157127016';
//操作类型变量
$isLoadIndex=$_REQUEST['isLoadIndex'];
$isTryCreate=$_REQUEST['isTryCreate'];
$isBatchCreate=$_REQUEST['isBatchCreate'];
$isCreate=$_REQUEST['isCreate'];
$isDelete=$_REQUEST['isDelete'];
$isChange=$_REQUEST['isChange'];
$isRead=$_REQUEST['isRead'];
if($DEBUG) echo "<br>isRead=$isRead";
if($DEBUG) echo "<br>isChange=$isChange";
if($DEBUG) echo "<br>isCreate=$isCreate";
if($DEBUG) echo "<br>isDelete=$isDelete";
if($DEBUG) echo "<br>isLoadIndex=$isLoadIndex";
//保存用户数据修改的数据
$bgnNo=$_POST['bgnNo'];
$endNo=$_POST['endNo'];
if($DEBUG) echo "<br>bgnNo=$bgnNo";
if($DEBUG) echo "<br>endNo=$endNo";
//---------定义需要编辑保存的字段-------
//$showAttrDef=array(array('fieldName'=>'','inputName'=>'');
$showAttrDef=array(
array('fieldName'=>'msisdn', 'inputName'=>'msisdn'),
array('fieldName'=>'status', 'inputName'=>'status'),
array('fieldName'=>'promo_language', 'inputName'=>'promo_language'),
array('fieldName'=>'greeting', 'inputName'=>'greeting'),
//array('fieldName'=>'pwdFlag', 'inputName'=>'pwdFlag'),
array('fieldName'=>'pwdValue', 'inputName'=>'pwdValue')
);
//For operation log use
{
$used_flag_def=array(
"00"=>"Disable","0"=>"Disable",
"01"=>"Enable","1"=>"Enable"
);
$promo_language_def=array(
"00"=>"Language 0","0"=>"Language 0",
"01"=>"Language 1","1"=>"Language 1",
"02"=>"Language 2","2"=>"Language 2",
"03"=>"Language 3","3"=>"Language 3",
"04"=>"Language 4","4"=>"Language 4"
);
$greeting_def=array(
"00"=>"System",
"01"=>"Host name",
"02"=>"Personal",
"80"=>"Temporary"
);
}
$logFieldDef=array(
'status',
'promo_language',
'greeting',
'pwdValue',
);
if($_SERVER['REQUEST_METHOD'] == "POST"){
//system("echo '-------------------------------------'>>/tmp/test.txt");
$preValueInfo="Change $pre_keyvalue ";
$isChangeFlag=0;
for($i=0;$i<sizeof($logFieldDef);$i++){
$inputName =$logFieldDef[$i];
$inputValue =${$inputName};
$ppName=$inputName."_ppvalue";
$ddName=$inputName."_ddef";
$cdName=$inputName."_cdef";
$nnName=$inputName."_name";
if(strlen($inputValue)){
//echo "<br>$inputName = $inputValue";
if(isset($$ddName))
{
$tmpv=$$ppName;
$val1=${$$ddName}[$tmpv];
$val2=${$$ddName}[$inputValue];
if(strlen($$ppName) == 0)
$val1="NoValue";
if(strcasecmp($val1,$val2) != 0)
{
$isChangeFlag=1;
$preValueInfo.="[{$$nnName},{$val1}->{$val2}]";
//system("echo '[{$$nnName},{$val1}->{$val2}]' >>/tmp/test.txt");
}
}
else if(isset($$cdName))
{
$newValue="";
for($iii=0;$iii<sizeof(${$$cdName});$iii++)
{
$chkname=${$$cdName}[$iii][0];
if($$chkname == '1')
$newValue.=${$$cdName}[$iii][2].",";
}
$newValue=substr($newValue,0,strlen($newValue)-1);
if(strcasecmp($$ppName,$newValue) != 0)
{
$isChangeFlag=1;
$preValueInfo.="[{$$nnName},({$$ppName})->({$newValue})]";
//system("echo '[{$$nnName},({$$ppName})->({$newValue})]' >>/tmp/test.txt");
}
}
else
{
if(strlen($$ppName) == 0)
$$ppName="NoValue";
if(strcasecmp($$ppName,$inputValue) != 0)
{
$isChangeFlag=1;
$preValueInfo.="[{$$nnName},{$$ppName}->$inputValue]";
//system("echo '[{$$nnName},{$$ppName}->$inputValue]'>>/tmp/test.txt");
}
}
}else{
//echo "<br>Can not find $inputName's value";
}
}
if($isChangeFlag==1)
{
$preValueInfo.=" in {$log_sysTypeName}_{$log_sysNo}_{$log_subSysNo}";
insertLog($preValueInfo);
}
}
//处理各个的输入单元的值,组成各个需要编辑的字段值
if($_SERVER['REQUEST_METHOD'] == "POST"){
//$enableFlag=$enableFlag;
//$promptLanguage=$promptLanguage;
//$greetingFlag=$greetingFlag;
$orgValue=$status;
$orgValue = sprintf("%02x",$orgValue); //需要理解
//echo "<1>orgValue=$orgValue<br>";
for($i=0;$i<sizeof($statusDef);$i++){
$inputName =$statusDef[$i][0];
$inputValue =${$inputName};
if(strlen($inputValue) == 0){
$inputValue=0;
}
$inputOffset=$statusDef[$i][1];
$orgValue=setBitValue($orgValue,$inputOffset,$inputValue);
}
$status=$orgValue;
//格式化每个需要保存的字段,以便数据处理模块处理
$bgnNo=0;
$endNo=0;
for($i=$bgnNo;$i<sizeof($showAttrDef);$i++){
if($oldFieldName == $showAttrDef[$i][fieldName]){
continue;
}
$oldFieldName = $showAttrDef[$i][fieldName];
$test=$oldFieldName;
${'checkBox_'.$endNo} =1;
${'fieldName_'.$endNo}=$oldFieldName;
${'editValue_'.$endNo}=$_POST[$oldFieldName];
if($DEBUG) echo "<br>checkBox1$endNo = ${'checkBox_'.$endNo}";
if($DEBUG) echo "<br>fieldName_$endNo = ${'fieldName_'.$endNo}";
if($DEBUG) echo "<br>editValue_$endNo = ${'editValue_'.$endNo}";
$endNo++;
}
}
//==========================================================
//数据处理
//==========================================================
if (1 == $isLoadIndex) {
$fieldNameList = "msisdn,mailboxID,proo_language,greeting,pwdFlag";
} else {
$fieldNameList = "ALL";
}
if ($DEBUG) echo "fieldNameList=$fieldNameList<br>";
?>
<base target="_self">
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
require("../pubSubsMng/sendComm.inc");
require("../pubSubsMng/dataProc.inc");
//==========================================================
//输出并显示数据
//==========================================================
$seqNo=0;
?>
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
echo "<br>";
//**********************************编辑参数时所用javascript*****************************************
?>
<script LANGUAGE="JavaScript">
function selCheckBox(thisCheckBox)
{
if(thisCheckBox.checked == true){
thisCheckBox.value=1;
}else{
thisCheckBox.value=0;
}
}
function askSureToDel(keyName,keyId)
{
var answer = confirm("Are you sure to delete this subscriber( "+keyName+"="
+ keyId + ") from <?php echo"$sysTypeName";?> server?");
if (answer == true){
window.location.href = "<?php echo "$PHP_SELF?sysId=$sysId&dataTypeNo=$dataTypeNo&bufferNo=$bufferNo&keyValue=$keyValue&isDelete=1";?>";
//alert('Try to send delete command');
}else{
return(false);
}
}
</script>
<form method="POST" name="update" action="<?php echo"$PHP_SELF";?>" >
<?php
//显示用户参数编辑页面
?>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><nobr>
<?php echo "Server Id:"?>
<select name="sysId" size="1">
<?php
$selSysIdSql="SELECT sysNo,subSysNo,sysTypeName
FROM sysInfo,sysConf
WHERE sysInfo.sysTypeNo='$sysTypeNo' AND sysConf.sysTypeNo='$sysTypeNo'
ORDER BY baseStat DESC,updateTime DESC
";
if($DEBUG) echo "<br>$selSysIdSql";
$sysIdResult=mysqli_query($pubConn,$selSysIdSql);
echo mysqli_error($pubConn);
while($sysIdRows=mysqli_fetch_array($sysIdResult)){
echo "<option value=\"$sysTypeNo"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]\"";
if(($sysNo == $sysIdRows[sysNo]) && ($subSysNo == $sysIdRows[subSysNo]))
echo " selected";
echo " >$sysIdRows[sysTypeName]"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]";
echo "</option>";
}
?>
</select>
</nobr>
</td>
<td><nobr>
<?php
if(!isset($isTryCreate)||$isTryCreate <= 0){
$showkeyValue= $keyValue;
$keyValueName='MSISDN';
echo "&nbsp;&nbsp;$keyValueName:$showkeyValue";
}
?>
</nobr></td>
<?php
if($isTryCreate > 0){
if($isBatchCreate> 0){
?>
<TD><NOBR>
&nbsp;&nbsp;&nbsp;
Batch amount(<=100):<input type="text" name="batchNum" class="text" maxlength="3" size="3">
</TD>
<?php
}
?>
<td >
<input type="submit" value="Create in <?php echo "$sysTypeName"?>" name="create" title="" class="button" onClick="javascript:document.update.isCreate.value=1;">
<input type="hidden" value="0" name="isCreate">
<input type="hidden" value="0" name="isChange">
<input type="hidden" value="<?php echo "$isBatchCreate"; ?>" name="isBatchCreate">
</td>
<?php
$myPrivilege = $userInfo[privilege];
if($myPrivilege >=4){
?>
<td>
<input type="submit" value="Create in OMC" name="create" title="" class="button" onClick="javascript:document.update.isCreate.value=2;">
</td>
<?php
}
?>
<?php
}else{
?>
<td>
<input type="submit" value="Get" name="read" title="" class="button" onClick="javascript:document.update.isRead.value=1;">
<input type="hidden" value="0" name="isRead">
</td>
<td>
<?php
if($canwrite_flag)
echo "<input type=\"submit\" value=\"Set\" name=\"change\" title=\"\" class=\"button\" onClick=\"javascript:document.update.isChange.value=1;\">";
else
echo "<input type=\"submit\" disabled value=\"Set\" name=\"change\" title=\"\" class=\"button\" onClick=\"javascript:document.update.isChange.value=1;\">";
?>
<input type="hidden" value="0" name="isChange">
<input type="hidden" value="0" name="isCreate">
</td>
<td>
<?php
if($canwrite_flag)
echo "<input type=\"button\" value=\"Delete\" name=\"delete\" title=\"Delete this subscriber\" class=\"button\" onClick=\"askSureToDel('$keyValueName','$keyValue');\">";
else
echo "<input type=\"button\" disabled value=\"Delete\" name=\"delete\" title=\"Delete this subscriber\" class=\"button\" onClick=\"askSureToDel('$keyValueName','$keyValue');\">";
?>
<input type="hidden" value="0" name="isDelete">
</td>
<?php
}
?>
<td width="100%">&nbsp;</td>
</tr>
</table>
<br>
<?php
//将已取出的用户数据显示出来
//$tmpRow[fieldName]
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
<tr bgcolor="#E6E6E6">
<td width="5%"> No.</td>
<td width="25%">Name</td>
<td width="20%">Value</td>
<td width="50%">Description</td>
</tr>
<?php
//msisdn
if($isTryCreate > 0){
$msisdn=$tmpRow[msisdn];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
if($isBatchCreate > 0)
echo "<td>Start MSISDN</td>";
else
echo "<td>MSISDN</td>";
echo "<td>";
echo "<input type=\"text\" name=\"msisdn\" maxlength=\"16\" size=\"20\" value=\"$msisdn\" class=\"text\">";
echo "</td>";
echo "<td>&nbsp;</td>";
echo "</tr>";
}else{
echo "<input type=\"hidden\" name=\"msisdn\" value=\"$keyValue\">";
}
echo "<input type=\"hidden\" name=\"log_sysTypeName\" value=\"$sysTypeName\">";
echo "<input type=\"hidden\" name=\"log_sysNo\" value=\"$sysNo\">";
echo "<input type=\"hidden\" name=\"log_subSysNo\" value=\"$subSysNo\">";
echo "<input type=\"hidden\" name=\"pre_keyvalue\" value=\"{$keyValue}'s\">";
//status
$status =$tmpRow[status];
echo "\n <TR>";
echo "<TD> $seqNo </TD>";
$seqNo++;
echo "<TD>Status</TD>";
echo "<TD>";
$preValue="";
echo "<input type=\"hidden\" name=\"status\" value=\"$status\">";
for($i=0;$i<sizeof($statusDef);$i++){
$value=getBitValue($status,$statusDef[$i][1]);
if($value == '1'){
echo "<input type=\"checkbox\" name=\"{$statusDef[$i][0]}\" onClick=selCheckBox(this) value=\"1\" checked >{$statusDef[$i][2]}<br>";
$preValue.="{$statusDef[$i][2]},";
}else{
echo "<input type=\"checkbox\" name=\"{$statusDef[$i][0]}\" onClick=selCheckBox(this) value=\"0\" >{$statusDef[$i][2]}<br>";
}
}
$preValue=substr($preValue,0,strlen($preValue)-1);
echo "</TD>";
echo "<input type=\"hidden\" name=\"status_name\" value=\"Status\">";
echo "<input type=\"hidden\" name=\"status_ppvalue\" value=\"$preValue\">";
echo "<input type=\"hidden\" name=\"status_cdef\" value=\"statusDef\">";
echo "<TD>-</TD>";
echo "</TR>";
//mailboxNo
$mailboxID =hexdec($tmpRow[mailboxID]);
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Mailbox no. </td>";
echo "<td>&nbsp;$mailboxID</td>";
echo "<td>Mailbox number (0-9999)</td>";
echo "</tr>";
//promptLanguage
$languageDefArr=array('Language 0','Language 1','Language 2','Language 3',
'Language 4');
$promo_language =$tmpRow[promo_language];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Language </td>";
echo "<td>";
echo "<select name=\"promo_language\" size=\"1\">";
for($i=0;$i<sizeof($languageDefArr);$i++){
$showValue=$languageDefArr[$i];
$realValue=$i;
if($realValue == $promo_language){
echo "<option value=\"$realValue\" selected>$showValue</option>";
}else{
echo "<option value=\"$realValue\">$showValue</option>";
}
}
echo "</select>";
echo "</td>";
echo "<input type=\"hidden\" name=\"promo_language_name\" value=\"Language\">";
echo "<input type=\"hidden\" name=\"promo_language_ppvalue\" value=\"$promo_language\">";
echo "<input type=\"hidden\" name=\"promo_language_ddef\" value=\"promo_language_def\">";
echo "<td>Select a language from five active language for greetings</td>";
echo "</tr>";
//greetingFlag
$greetingDefArr=array(
array('00','System'),
array('01','Host name'),
array('02','Personal'),
array('80','Temporary')
);
$greeting =$tmpRow[greeting];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Greeting type</td>";
echo "<td>";
echo "<select name=\"greeting\" size=\"1\">";
for($i=0;$i<sizeof($greetingDefArr);$i++){
$realValue =$greetingDefArr[$i][0];
$showName =$greetingDefArr[$i][1];
if($realValue == $greeting){
echo "<option value=\"$realValue\" selected>$showName</option>";
}else{
echo "<option value=\"$realValue\">$showName</option>";
}
}
echo "</select>";
echo "</td>";
echo "<input type=\"hidden\" name=\"greeting_name\" value=\"Greeting type\">";
echo "<input type=\"hidden\" name=\"greeting_ppvalue\" value=\"$greeting\">";
echo "<input type=\"hidden\" name=\"greeting_ddef\" value=\"greeting_def\">";
echo "<td>Select a kind of greeting to play for dial-in call, selective greetings include system, host name and personal greetings</td>";
/*
//pwdEnable
$pwdFlag=$tmpRow[pwdFlag];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Password Enable</td>";
echo "<td><nobr>";
if($pwdFlag > 0){
echo "<input type=\"radio\" name=\"pwdFlag\" value=\"01\" checked> Enable &nbsp;&nbsp;&nbsp;&nbsp;";
echo "<input type=\"radio\" name=\"pwdFlag\" value=\"00\"> Disable";
}else{
echo "<input type=\"radio\" name=\"pwdFlag\" value=\"01\"> Enable &nbsp;&nbsp;&nbsp;&nbsp;";
echo "<input type=\"radio\" name=\"pwdFlag\" value=\"00\" checked> Disable";
}
echo "</nobr></td>";
echo "<td>VMS service password flag</td>";
echo "</tr>";
*/
//pwdValue
$pwdValue=$tmpRow[pwdValue];
echo "\n <tr>";
echo "<td> $seqNo </td>";
$seqNo++;
echo "<td>Password</td>";
echo "<td>";
echo "<input type=\"text\" name=\"pwdValue\" maxlength=\"4\" size=\"4\" value=\"$pwdValue\" class=\"text\">";
echo "</td>";
echo "<input type=\"hidden\" name=\"pwdValue_name\" value=\"Password\">";
echo "<input type=\"hidden\" name=\"pwdValue_ppvalue\" value=\"$pwdValue\">";
echo "<td>4-digit password</td>";
echo "</tr>";
/*
echo "</tr>";
echo "</table> ";
if($isTryCreate < 1){
//message info list
$newMessageNum =$tmpRow[newMessageNum];
$oldMessageNum =$tmpRow[oldMessageNum];
echo "<br>New Message Number:$newMessageNum &nbsp; &nbsp; Old Message Number:$oldMessageNum ";
echo "<table border=\"1\" width=\"100%\" cellpadding=\"2\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\" bgcolor=\"#FFFFFF\"> ";
echo "<tr bgcolor=\"#E6E6E6\">";
echo "<td>Message no.</td>";
echo "<td>Caller number</td>";
echo "<td>New</td>";
echo "<td>Time</td>";
echo "</tr>";
for($i=1;$i<=10;$i++){
$msgInfo=$tmpRow['messageInfo_'.$i];
$msgFlag =subStr($msgInfo,0,2);
if($msgFlag == 'FF') continue;
if($msgFlag == '01'){
$isNew='No';
}elseif($msgFlag == '02'){
$isNew='Yes';
}else{
continue;
}
$msgNo =$i;
$timeStr =subStr($msgInfo,2,8);
$timeStr =hexdec($timeStr);
$timeStr =date("Y-m-d H:i:s",$timeStr);
$callerNumber =subStr($msgInfo,10);
$callerNumber =str_replace('F','',$callerNumber);
echo "<tr>";
echo "<td>&nbsp;$msgNo</td>";
echo "<td>&nbsp;$callerNumber</td>";
echo "<td>&nbsp;$isNew</td>";
echo "<td>&nbsp;$timeStr</td>";
echo "</tr>";
}
echo "</table> ";
}*/
?>
<?php
//*****************************************隐藏输入框,用于传递值****************************************
echo "\n<input type=\"hidden\" name=\"dataTypeNo\" value=\"$dataTypeNo\">";
echo "\n<input type=\"hidden\" name=\"keyFieldName\" value=\"$indexFieldName\">";
echo "\n<input type=\"hidden\" name=\"keyValue\" value=\"$keyValue\">";
?>
</form>
&nbsp;
<?php
adjust_content_tail("down");
?>
</body>
</html>
<?php
flush();
?>
+49
View File
@@ -0,0 +1,49 @@
[para]0[Name]MSISDN
[sqlName]msisdn[t]input[unit]MSISDN[u]00.0-15.7[u]
[v]keepAsc-low-E
[remark]
[para]1[Name]Status
[sqlName]status[t]checkbox[unit]Register flag[u]00.2-00.2[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Active flag[u]00.1-00.1[u]
[v]0[opt]not support
[v]1[opt]support
[t]checkbox[unit]Locked flag[u]00.0-00.0[u]
[v]0[opt]not support
[v]1[opt]support
[remark]
-
[para]2[Name]Mailbox no.
[sqlName]mailboxID[t]readOnly[unit]Mailbox no.[u]00.0-03.7[u]
[v]toDec-high-0
[remark]
Mailbox number (0-9999)
[para]3[Name]Language
[sqlName]promo_language[t]select[unit]Language[u]00.0-00.7[u]
[v]0[opt]Language 0
[v]1[opt]Language 1
[v]2[opt]Language 2
[v]3[opt]Language 3
[v]4[opt]Language 4
[remark]
Select a language from five active language for greetings
[para]4[Name]Greeting type
[sqlName]greeting[t]select[unit]Greeting type[u]00.0-00.7[u]
[v]00[opt]System
[v]01[opt]Host name
[v]02[opt]Personal
[v]128[opt]Temporary
[remark]
Select a kind of greeting to play for dial-in call, selective greetings include system, host name and personal greetings
[para]5[Name]Password
[sqlName]pwdValue[t]input[unit]Password[u]00.0-3.7[u]
[v]keepAsc-low-F
[remark]
4-digit password
+42
View File
@@ -0,0 +1,42 @@
<?php
require("../../inc/lib.inc");
?>
<?php
$dstSeverIp=$_REQUEST['dstSeverIp'];
$ftpLoginName=$_REQUEST['ftpLoginName'];
$localFileName=$_REQUEST['localFileName'];
$remoteFileName=$_REQUEST['remoteFileName'];
$ftpLoginPwd=$_REQUEST['ftpLoginPwd'];
$logFileName=$_REQUEST['logFileName'];
//$logFileUrl="./get_log_file.php?dstSeverIp={$dstSeverIp}&ftpLoginName={$ftpLoginName}&ftpLoginPwd={$ftpLoginPwd}&localFileName={$localFileName}&remoteFileName={$remoteFileName}&logFileName={$logFileName}";
system("rm -rf ../../../ftpFile/*.log");
$connection=sftp_connect($dstSeverIp);
if($connection < 0){
echo "<br><font color=\"#FF0000\">Connect [$dstSeverIp] Failed!</font>";
exit();
}
$key=sftp_login($connection,$ftpLoginName,$ftpLoginPwd);
if(!$key)
{
echo "<br><font color=\"#FF0000\">Login Failed!</font>";
exit();
}
//echo "sftp_get($key,$localFileName,$remoteFileName)<br>";
if(!sftp_get($connection,$localFileName,$remoteFileName,SFTP_ASCII))
{
echo "<br><font color=\"#FF0000\">Get log file Failed</font>";
exit();
}
header("Content-type: application/txt");
header("Content-Disposition: attachment; filename=$logFileName");
//use for download csv in https
header('Expires: 0');
header('Pragma: public');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: public');
readfile("../../../ftpFile/$logFileName");
?>
+42
View File
@@ -0,0 +1,42 @@
<?php
require("../../inc/lib.inc");
?>
<?php
$dstSeverIp=$_REQUEST['dstSeverIp'];
$ftpLoginName=$_REQUEST['ftpLoginName'];
$localFileName=$_REQUEST['localFileName'];
$remoteFileName=$_REQUEST['remoteFileName'];
$ftpLoginPwd=$_REQUEST['ftpLoginPwd'];
$logFileName=$_REQUEST['logFileName'];
//$logFileUrl="./get_log_file.php?dstSeverIp={$dstSeverIp}&ftpLoginName={$ftpLoginName}&ftpLoginPwd={$ftpLoginPwd}&localFileName={$localFileName}&remoteFileName={$remoteFileName}&logFileName={$logFileName}";
system("rm -rf ../../../ftpFile/*.log");
$connection=sftp_connect($dstSeverIp);
if($connection < 0){
echo "<br><font color=\"#FF0000\">Connect [$dstSeverIp] Failed!</font>";
exit();
}
$key=sftp_login($connection,$ftpLoginName,$ftpLoginPwd);
if(!$key)
{
echo "<br><font color=\"#FF0000\">Login Failed!</font>";
exit();
}
//echo "sftp_get($key,$localFileName,$remoteFileName)<br>";
if(!sftp_get($key,$localFileName,$remoteFileName,SFTP_ASCII))
{
echo "<br><font color=\"#FF0000\">Get log file Failed</font>";
exit();
}
header("Content-type: application/txt");
header("Content-Disposition: attachment; filename=$logFileName");
//use for download csv in https
header('Expires: 0');
header('Pragma: public');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: public');
readfile("../../../ftpFile/$logFileName");
?>
+312
View File
@@ -0,0 +1,312 @@
<?php
/*********************************************************
程序说明:
功能说明:用户数据的批量导入
调用关系:调用: header.inc
被调用:
变量说明:
作者:
修改注释:
NO.1
姓名:
时间:2003-03-10
修改说明:优化流程,规范变量命名
*********************************************************/
require("../../inc/header.inc");
global $pubConn;
function getImpParamValue($sysId,$objIdStr,$instanceNo,$valueName)
{
global $paramConf_table,$OMC_server;
$DEBUG=0;
$tmpSysIdArr = explode('_',$sysId);
$sysTypeNo = $tmpSysIdArr[0];
$sysNo = $tmpSysIdArr[1];
$subSysNo = $tmpSysIdArr[2];
$objDbConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], 'OBJ_'.$sysTypeNo);
$paramDb = 'OBJ_'.$sysTypeNo;
//获取参数定义表的表名,根据oid取出参数定义
$tmpObjArr = explode('.',$objIdStr);
$objWhereStr='';
for($i=0;$i<sizeof($tmpObjArr);$i++){
$j=$i+1;
$objWhereStr .= ' level_'.$j."='{$tmpObjArr[$i]}' AND ";
}
$objWhereStr = substr($objWhereStr,0,-5); //最后多了一个' AND ',将其去掉
//根据参数类型,推出参数表的表名
if($sysTypeNo==390)
{
$paramTable = 'param_'.$sysNo;
}
else
{
$paramTable = 'param_99';
$subSysNo = '99';
}
//subSysNo = '$subSysNo' AND instanceNo = '$instanceNo' AND
//修改对应的参数值
if($DEBUG) echo"<br>valueName=$valueName <br>";
$getParamValueSql="SELECT $valueName FROM $paramTable
WHERE $objWhereStr and instanceNo <> ''
";
if($DEBUG) echo"<br> aaa=$getParamValueSql <br>";
$getResult=mysqli_query($objDbConn,$getParamValueSql);
echo mysqli_error($objDbConn);
if(mysqli_num_rows($getResult) > 0){
$paramRows = mysqli_fetch_array($getResult);
//print_r($paramRows);
$paramValue = $paramRows[0];
return($paramValue);
}else{
return(-1);
}
}//end of function
$DEBUG =0;
//command state
$nProcFail =0;
$nWaitProc =1;
$nInProc =2;
$nOutProc =3;
$sysId = $_REQUEST['sysId'];
$dataTypeNo = $_REQUEST['dataTypeNo'];
//impCommState
//01=通知导入用户;02=正在导入用户;03=导入用户成功;04=导入用户失败
/*
$impNote ='01';
$impBgn ='02';
$impOut ='03';
$impFail ='04';
*/
?>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
echo "<br>";
if($DEBUG)echo "paramValue=$paramValue";
$showFlag = $_REQUEST['showFlag'];
$dstSeverIp= $_REQUEST['dstSeverIp'];
$impRecordNum = $_REQUEST['impRecordNum'];
$commStr = $_REQUEST['commStr'];
$impFile = $_REQUEST['impFile'];
if ($DEBUG) echo "showFlag=$showFlag<br>";
if ($DEBUG) echo "remote ip = $dstSeverIp<br>";
if ($DEBUG) echo "impRecordNum=$impRecordNum<br>";
if ($DEBUG) echo "commStr=$commStr<br>";
if ($DEBUG) echo "impFile=$impFile<br>";
if(!$showFlag){
exit();
}
if($DEBUG)echo "<br>sysId=$sysId";
$runSeconds = $_REQUEST['runSeconds'];
$oldDoneNum = $_REQUEST['oldDoneNum'];
$pubDb = 'OMC_PUB';
$sysSubsConfTable = 'OMC_PUB.sysSubsConf';
$systemConfTable = 'OMC_PUB.sysConf';
$sysInfoTable = 'OMC_PUB.sysInfo';
$perTime = 0.05;
if(isset($sysId)){
$sysIdArr =explode('_',$sysId);
$sysTypeNo =$sysIdArr[0];
$sysNo =$sysIdArr[1];
$subSysNo =$sysIdArr[2];
/*if($systypeNo==360){
$getSysIdSql = "SELECT sysNo,subSysNo,ip
FROM $sysInfoTable
WHERE sysTypeNo='$sysTypeNo' AND baseStat > '0'
ORDER BY sysNo,subSysNo
";
if($DEBUG) echo "<br>getSysIdSql=$getSysIdSql";
$getSysIdResult= mysqli_query($pubConn,$getSysIdSql);
echo mysqli_error($pubConn);
$getSysIdRow=mysqli_fetch_array($getSysIdResult);
$sysNo=$getSysIdRow[sysNo];
$subSysNo=$getSysIdRow[subSysNo];
}*/
}else{
exit(0);
}
$dataTypeNo = isset($dataTypeNo)?$dataTypeNo:0;
$getConfSql="SELECT impObjId,ftpDir,ftpLoginName,ftpLoginPwd,logFileName
FROM $sysSubsConfTable
WHERE sysTypeNo='$sysTypeNo' AND dataTypeNo='$dataTypeNo'
";
if($DEBUG) echo "<br>getConfSql=$getConfSql";
$getConfResult=mysqli_query($pubConn,$getConfSql);
echo mysqli_error($pubConn);
$getConfRows=mysqli_fetch_array($getConfResult);
$impObjId = $getConfRows[impObjId];
$logFileName = $getConfRows[logFileName];
$ftpDir = $getConfRows[ftpDir];
$ftpLoginName = $getConfRows[ftpLoginName];
$ftpLoginPwd = $getConfRows[ftpLoginPwd];
if($DEBUG)echo "<br>impObjId =$impObjId";
if($DEBUG)echo "<br>logFileName =$logFileName";
if($DEBUG)echo "<br>ftpDir =$ftpDir";
if($DEBUG)echo "<br>ftpLoginName =$ftpLoginName";
if($DEBUG)echo "<br>ftpLoginPwd =$ftpLoginPwd";
if($DEBUG)echo "<br>sysId =$sysId";
//if($sysTypeNo==360)
// $paramValue = getSysParamValue($sysId,$impObjId,0,'readValue');
//else
$paramValue = getImpParamValue($sysId,$impObjId,0,'readValue');
if($DEBUG)echo "<br>paramValue=$paramValue";
$impCommState = substr($paramValue,0,2);
if($DEBUG)echo "<br>impCommState=$impCommState";
if($sysTypeNo==340){
$allNum=$impRecordNum;
$doneNum = substr($paramValue,2,6);
$doneNum = HexDec($doneNum);
}else{
$allNum = substr($paramValue,2,6);
$allNum = HexDec($allNum);
$doneNum = substr($paramValue,8,6);
$doneNum = HexDec($doneNum);
}
if($DEBUG)echo "<br>allNum=$allNum";
if($DEBUG)echo "<br>doneNum=$doneNum";
//show process
omcProgressBar($allNum,$doneNum);
$maxSeconds = 20;
$runSeconds = $runSeconds + 2;
if($DEBUG)echo "<br>maxSeconds=$maxSeconds";
if($DEBUG)echo "<br>runSeconds=$runSeconds";
if($DEBUG)echo "<br>if($runSeconds > $maxSeconds || $doneNum >= $allNum || $impCommState == '03' || $impCommState == '04') ";
if($doneNum > $oldDoneNum){
$runSeconds = 0;
}
if($runSeconds > $maxSeconds || $doneNum >= $allNum || $impCommState == '03' || $impCommState == '04')
{
if($impCommState == '04'){
echo "<br><FONT color=\"#FF0000\" size=\"3\"><b>upload $impFile Failed,please check log!!</b></FONT>";
}elseif($runSeconds > $maxSeconds){
echo "<br><FONT color=\"#FF0000\" size=\"3\"><b>Response Time Out!!</b></FONT>";
}else{
echo "<br><FONT color=\"#0000FF\" size=\"3\"><b>upload $impFile Finished!</b></FONT>";
echo "<br><br>After Import subscriber data finish,Plase upload it and get the lastest data.";
}
if($DEBUG)echo "<br>dstSeverIp=$dstSeverIp";
/* close ftp
$ftpCon=ftp_connect($dstSeverIp);
if($ftpCon < 0){
echo "<br><font color=\"#FF0000\">Connect Failed!</font>";
exit();
}
*/
//$connection=sftp_connect($dstSeverIp);
//if($connection < 0){
// echo "<br><font color=\"#FF0000\">Connect Failed!</font>";
// exit();
//}
/* close ftp
if(!ftp_login($ftpCon,$ftpLoginName,$ftpLoginPwd)){
echo "<br><font color=\"#FF0000\">Login Failed!</font>";
exit();
}
*/
//$key=sftp_login($connection,$ftpLoginName,$ftpLoginPwd);
//if(!$key)
//{
// echo "<br><font color=\"#FF0000\">Login Failed!</font>";
// exit();
//}
$remoteFileName =$ftpDir.$logFileName;
$timestamp = time();
$nameArray = explode(".",$logFileName);
$logFileName = $nameArray[0].$timestamp.".log";
$localFileName ="/usr/local/apache/htdocs/ftpFile/$logFileName";
//delete *.log
$handle=opendir('/usr/local/apache/htdocs/ftpFile/');
while($file=readdir($handle)){
$retval="";
$pt=strrpos($file,".");
if($pt) $retval=substr($file,$pt+1,strlen($file)-$pt);
$delFileName = "/usr/local/apache/htdocs/ftpFile/".$file;
if($retval=='log') unlink($delFileName);
}
/* close ftp
if(!ftp_get($ftpCon,$localFileName,$remoteFileName,FTP_ASCII)){
echo "<br><font color=\"#FF0000\">Get log file Failed</font>";
exit();
}
*/
//if(!sftp_get($key,$localFileName,$remoteFileName,SFTP_ASCII))
//{
// echo "<br><font color=\"#FF0000\">Get log file Failed</font>";
// exit();
//}
/* close ftp
ftp_quit($ftpCon);
*/
//$logFileUrl="../../../ftpFile/$logFileName";
$logFileUrl="./get_log_file.php?dstSeverIp={$dstSeverIp}&ftpLoginName={$ftpLoginName}&ftpLoginPwd={$ftpLoginPwd}&localFileName={$localFileName}&remoteFileName={$remoteFileName}&logFileName={$logFileName}";
echo "<br><br><a href=\"$logFileUrl\">Click here to download log.</a>";
echo "<script language=\"javascript\">";
echo "window.parent.frames.header.location.href='./subscriberImportUp.php?sysId=$sysId&dataTypeNo=$dataTypeNo&submitStat=ENABLE';";
echo "</script>";
echo "<font size=\"2\">";
exit();
}
$commIdArr = explode('-',$commStr);
$commId = $commIdArr[0];
if($DEBUG)echo "<br>commId=$commId";
//echo "sysNo=$sysNo";
/*if($sysTypeNo==360)
$commSql = " SELECT commState FROM parameterComm WHERE commId = '$commId' AND sysNo= '$sysNo'";
else*/
$commSql = " SELECT commState FROM parameterComm WHERE commId = '$commId' ";
if($DEBUG) echo "<br>commSql=$commSql";
$commRes = mysqli_query($pubConn,$commSql);
$commRow = @mysqli_fetch_array($commRes);
$commStat = $commRow[commState];
if($DEBUG)echo "<br>commStat=$commStat";
//echo "<br>sysId=$sysId,impObjId=$impObjId";
if($commStat == $nOutProc || !isset($commStat)){
//send get command
$commStr = sysCommSend($sysId,0,$impObjId);
}
echo "<meta http-equiv=\"refresh\" content=\"2;url=$PHP_SELF?showFlag=$showFlag&sysId=$sysId&dataTypeNo=$dataTypeNo&impRecordNum=$impRecordNum&runSeconds=$runSeconds&commStr=$commStr&dstSeverIp=$dstSeverIp&oldDoneNum=$doneNum\">";
echo "<meta http-equiv=\"pragma\" content=\"no-cache\">";
adjust_content_tail("down");
?>
+19
View File
@@ -0,0 +1,19 @@
<?php
require("../../inc/header.inc");
$sysId = $_REQUEST['sysId'];
$dataTypeNo = $_REQUEST['dataTypeNo'];
?>
<frameset rows="200,*" framespacing="0" border="0" frameborder="0">
<frame name="header" scrolling="no" noresize target="main" src="subscriberImportUp.php<?php echo "?sysId=$sysId&dataTypeNo=$dataTypeNo"?>" marginwidth="6" marginheight="0">
<frame name="main" src="subscriberImportDown.php" scrolling="auto" marginwidth="12" marginheight="16" target="_self">
<noframes>
<body>
<p>此网页使用了框架,但您的浏览器不支持框架。</p>
</body>
</noframes>
</frameset>
</html>
+492
View File
@@ -0,0 +1,492 @@
<?php
/*********************************************************
程序说明:
功能说明:用户数据的批量导入
调用关系:调用: header.inc
被调用:
变量说明:
作者:huangqingsen 2002-08-27
修改注释:
NO.1
姓名:hewd
时间:2003-03-10
修改说明:优化流程,规范变量命名
*********************************************************/
require("../../inc/header.inc");
$sysId=$_POST['sysId'];
$dataTypeNo=$_POST['dataTypeNo'];
function setImpParamValue($sysId,$objIdStr,$instanceNo,$newValue)
{
global $paramConf_table,$OMC_server;
$DEBUG=0;
if($DEBUG) echo"<br>sysId=$sysId";
$tmpSysIdArr = explode('_',$sysId);
$sysTypeNo = $tmpSysIdArr[0];
$sysNo = $tmpSysIdArr[1];
$subSysNo = $tmpSysIdArr[2];
$paramDb = 'OBJ_'.$sysTypeNo;
$objConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], $paramDb);
if($DEBUG) echo"<br>paramDb=$paramDb";
//获取参数定义表的表名,根据oid取出参数定义
$tmpObjArr = explode('.',$objIdStr);
$objWhereStr='';
for($i=0;$i<sizeof($tmpObjArr);$i++){
$j=$i+1;
$objWhereStr .= ' level_'.$j."='{$tmpObjArr[$i]}' AND ";
}
$objWhereStr = substr($objWhereStr,0,-5); //最后多了一个' AND ',将其去掉
//根据参数类型,推出参数表的表名
if($sysTypeNo==390)
{
$paramTable = 'param_'.$sysNo;
}
else
{
$paramTable = 'param_99';
$subSysNo = '99';
}
//subSysNo = '$subSysNo'
//修改对应的参数值
$objWhereStr=str_replace("AND",",",$objWhereStr);
$setParamValueSql="replace $paramTable
SET initValue='$newValue',readValue=''
,instanceNo = '0000',$objWhereStr ";
if($DEBUG)echo"<br> $setParamValueSql <br>";
$setResult=mysqli_query($objConn,$setParamValueSql);
echo mysqli_error($objConn);
if($setResult){
return(1);
}else{
return(-1);
}
}//end of function
$DEBUG = 0;
//echo "<br>impFile=$impFile";
//echo "<br>impFileSize=$impFileSize";
//echo "<br>sysId=$sysId";
$sysId = $_REQUEST['sysId'];
$dataTypeNo = $_REQUEST['dataTypeNo'];
$nGetComm = 0;
$nSetComm = 3;
$nSubSysParam = 0;
$nGlobalSubSysParam = 1;
$nGlobalSysParam = 2;
$pubDb = 'OMC_PUB';
$sysSubsConfTable = 'OMC_PUB.sysSubsConf';
$systemConfTable = 'OMC_PUB.sysConf';
$sysInfoTable = 'OMC_PUB.sysInfo';
if($DEBUG) echo "(1) sysId=$sysId, dataTypeNo = $dataTypeNo<br>";
if(isset($sysId) && isset($dataTypeNo)){
$sysIdArr=explode('_',$sysId);
$sysTypeNo =$sysIdArr[0];
$sysNo =$sysIdArr[1];
$subSysNo =$sysIdArr[2];
}else{
echo "Cannot find sysId and dataTypeNo";
exit(0);
}
if($DEBUG) echo "<br>sysTypeNo=$sysTypeNo";
if($DEBUG) echo "<br>dataTypeNo=$dataTypeNo";
if($sysTypeNo==390)
$getConfSql="SELECT subsDataTable,impObjId,impFileName,ftpDir,ftpLoginName,ftpLoginPwd,
logFileName,maxSegmentNum,maxIndexNumPerSeg
FROM $sysSubsConfTable
WHERE sysTypeNo='$sysTypeNo' AND dataTypeNo='$dataTypeNo' AND sysNo='$sysNo'
";
else
$getConfSql="SELECT subsDataTable,impObjId,impFileName,ftpDir,ftpLoginName,ftpLoginPwd,
logFileName,maxSegmentNum,maxIndexNumPerSeg
FROM $sysSubsConfTable
WHERE sysTypeNo='$sysTypeNo' AND dataTypeNo='$dataTypeNo'
";
if($DEBUG) echo "<br>getConfSql=$getConfSql";
$getConfResult=mysqli_query($pubConn,$getConfSql);
echo mysqli_error($pubConn);
$getConfRows=mysqli_fetch_array($getConfResult);
$subsDataTable = $getConfRows[subsDataTable];
$impObjId = $getConfRows[impObjId];
$impFileName = $getConfRows[impFileName];
$logFileName = $getConfRows[logFileName];
$ftpDir = $getConfRows[ftpDir];
$ftpLoginName = $getConfRows[ftpLoginName];
$ftpLoginPwd = $getConfRows[ftpLoginPwd];
$maxSegmentNum = $getConfRows[maxSegmentNum];
$maxIndexNumPerSeg = $getConfRows[maxIndexNumPerSeg];
if($sysTypeNo==360||$sysTypeNo==395||$sysTypeNo==370||$sysTypeNo==375||$sysTypeNo==330||$sysTypeNo==325||$sysTypeNo==340||$sysTypeNo==380||$sysTypeNo==378)
$paramType = $nGlobalSysParam;
else if($sysTypeNo==390)
$paramType = $nGlobalSubSysParam;
else
$paramType = $nSubSysParam;
$maxTotalNum = $maxSegmentNum * $maxIndexNumPerSeg;
if($sysTypeNo == 395)
{
$maxImpFileSize = 5*1024*1024*4;
$maxImpFileSizeM=ceil($maxImpFileSize/1024/1024);
$maxImpRecordNum = 20000;
}
else
{
$maxImpFileSize = 10*1024*1024;
$maxImpFileSizeM=ceil($maxImpFileSize/1024/1024);
$maxImpRecordNum = 5000;
}
if($DEBUG)echo "<br>subsDataTable=$subsDataTable";
if($DEBUG)echo "<br>impObjId= $impObjId";
if($DEBUG)echo "<br>impFileName=$impFileName ";
if($DEBUG)echo "<br>ftpDir=$ftpDir ";
if($DEBUG)echo "<br>ftpLoginName=$ftpLoginName ";
if($DEBUG)echo "<br>ftpLoginPwd=$ftpLoginPwd";
if($DEBUG)echo "<br>maxSegmentNum=$maxSegmentNum ";
if($DEBUG)echo "<br>maxIndexNumPerSeg=$maxIndexNumPerSeg ";
if($DEBUG)echo "<br>paramType=$paramType ";
if($DEBUG)echo "<br>maxTotalNum=$maxTotalNum ";
//Get the system name;
$selSql = "SELECT sysTypeName FROM sysConf WHERE sysTypeNo='$sysTypeNo'";
if ($DEBUG) echo "selSql = $selSql<br>";
$selRes = @mysqli_query($pubConn, $selSql);
echo mysqli_error($pubConn);
$selRow = @mysqli_fetch_array($selRes);
$sysName = $selRow[sysTypeName];
if ($DEBUG) echo "sysName = $sysName<br>";
$upfile=$_FILES['impFile']['name'];
$impFile=$_FILES['impFile']['tmp_name'];
//判断是否有文件上载
if(isset($impFile) && $impFile != "none"){
if($sysTypeNo==390)
{
$getSysIdSql = "SELECT sysNo,subSysNo,ip
FROM $sysInfoTable
WHERE sysTypeNo='$sysTypeNo' AND sysNo='$sysNo' AND baseStat > '0'
ORDER BY sysNo,subSysNo
";
}
else if($sysTypeNo == 378)
{
$getSysIdSql = "SELECT sysNo,subSysNo,ip
FROM $sysInfoTable
WHERE sysTypeNo='$sysTypeNo'
ORDER BY sysNo,subSysNo
";
}
else
{
$getSysIdSql = "SELECT sysNo,subSysNo,ip
FROM $sysInfoTable
WHERE sysTypeNo='$sysTypeNo' AND baseStat > '0'
ORDER BY sysNo,subSysNo
";
}
if($DEBUG) echo "<br>getSysIdSql=$getSysIdSql";
$getSysIdResult= mysqli_query($pubConn,$getSysIdSql);
echo mysqli_error($pubConn);
$runningServerNum = mysqli_num_rows($getSysIdResult);
//ipalim状态需要查看sysStat里的status值
if($sysTypeNo == 378)
{
$runningServerNum=0;
$checkstatesql="select detailStat,updateTime from OMC_PUB.sysStat where sysTypeNo=378 ";
$checkstateres=mysqli_query($pubConn,$checkstatesql);
while($checkstaterow=mysqli_fetch_array($checkstateres))
{
$update_time=$checkstaterow[updateTime];
$bin_data=$checkstaterow[detailStat];
$state=substr($bin_data,26*2,2)+0;
$due_date = date("Y-m-d H:i:s",mktime(date("H"),date("i"),date("s")-48,date("m"),date("d"),date("Y")));
$ove_date = date("Y-m-d H:i:s",mktime(date("H"),date("i"),date("s")+48,date("m"),date("d"),date("Y")));
if($update_time < $due_date || $update_time > $ove_date)
continue;
if($state == 0)
$runningServerNum++;
}
}
if($runningServerNum <= 0){
echo "<font color=\"#FF0000\" size=\"3\">Error: No system running normally</font>";
//by hewd 2003-08-19
//PPS 没有用户数据的时候,它自己会告警,使状态变为非normal,造成不能导入数据
exit();
}
if($DEBUG) echo "running server number = $runningServerNum<br>";
//找出已有的记录个数
$getTotalSql = "SELECT count(*) FROM $subsDataTable";
if($DEBUG) echo "<br>getTotalSql=$getTotalSql";
$getTotalRes = mysqli_query($pubConn,$getTotalSql);
$getTotalRow = @mysqli_fetch_array($getTotalRes);
$existNum = $getTotalRow[0];
if($DEBUG) echo "<br>existNum=$existNum";
//检查导入的文件大小,记录条数
$impFileSize = filesize($impFile);
if($DEBUG) {
echo "<br>impFile=$impFile";
echo "<br>impFileSize=$impFileSize<br>";
}
if($impFileSize > $maxImpFileSize){
$impFileSizeM=ceil($impFileSize/1024/1024);
echo "<br><font color=\"#FF0000\" size=3>Import File Size is $impFileSizeM M";
echo "<br>File size is too large!(Must <= {$maxImpFileSizeM}M)</font>";
@unlink ($impFile);
exit();
}
if($impFileSize <=0){
echo "<br><font color=\"#FF0000\" size=3>No import File";
@unlink ($impFile);
exit();
}
$impRecordNum = count(file($impFile));
if($DEBUG) echo "<br>impRecordNum=$impRecordNum";
if($impRecordNum > $maxImpRecordNum){
echo "<br><font color=\"#FF0000\" size=3>Import file record number is $impRecordNum";
echo "<br>Records are too much!(Must <= $maxImpRecordNum)</font>";
@unlink ($impFile);
exit();
}
if($impRecordNum > $maxTotalNum-$existNum){
echo "<br><font color=\"#FF0000\" size=3>Exist record number($existNum) + Import record number($impRecordNum) > Max record number ($maxTotalNum)";
echo "<br>User number is too much!</font>";
@unlink ($impFile);
exit();
}
$submitStat = 'DISABLED';
for ($k=0; $k<$runningServerNum; $k++) {
$getSysIdRow=mysqli_fetch_array($getSysIdResult);
$sysId=$sysTypeNo.'_'.$getSysIdRow[sysNo].'_'.$getSysIdRow[subSysNo];
$dstSeverIp = $getSysIdRow[ip];
if($sysTypeNo==360||$sysTypeNo==395||$sysTypeNo==370||$sysTypeNo==375||$sysTypeNo==330||$sysTypeNo==325||$sysTypeNo==340||$sysTypeNo==380||$sysTypeNo==378)
$sysIdCyc[$k] = $sysTypeNo.'_99_99';
else if($sysTypeNo==390)
$sysIdCyc[$k]='390_'.$getSysIdRow[sysNo].'_99';
else
$sysIdCyc[$k] = $sysId;
if($DEBUG) echo "<br>sysId = $sysId";
if($DEBUG) echo "<br>dstSeverIp = $dstSeverIp";
//debug_log("/tmp/deugImport.txt","sysIdCyc=$sysIdCyc[$k]");
/* close ftp
$ftpCon=ftp_connect($dstSeverIp);
if($ftpCon < 0){
echo "<br><font color=\"#FF0000\">Connect Failed!</font>";
@unlink ($impFile);
exit();
}
*/
$connection=sftp_connect($dstSeverIp);
if(!$connection){
echo "<br><font color=\"#FF0000\">Connect Failed!</font>";
@unlink ($impFile);
exit();
}
/* close ftp
if(!ftp_login($ftpCon,$ftpLoginName,$ftpLoginPwd)){
echo "<br><font color=\"#FF0000\">Login Failed!</font>";
@unlink ($impFile);
exit();
}
*/
$key=sftp_login($connection,$ftpLoginName,$ftpLoginPwd);
if(!$key)
{
echo "<br><font color=\"#FF0000\">Login Failed!</font>";
@unlink ($impFile);
exit();
}
$remoteFileName=$ftpDir.$impFileName;
/* close ftp
if(!ftp_put($ftpCon,$remoteFileName,$impFile,FTP_ASCII)){
echo "<br><font color=\"#FF0000\">Put file Failed</font>";
@unlink ($impFile);
exit();
}
*/
if(!sftp_put($key,$remoteFileName,$impFile,SFTP_ASCII))
{
echo "<br><font color=\"#FF0000\">Put file Failed</font>";
@unlink ($impFile);
exit();
}
/* close ftp
ftp_quit($ftpCon);
*/
$logFile="/usr/local/apache/htdocs/ftpFile/$logFileName";
@unlink ($logFile);
}
@unlink ($impFile);
//修改设备参数
if($sysTypeNo==340){
$instanceNo = 0;
$commState = $k4_flag.'1';
$totalNum = DecHex($impRecordNum);
$totalNum = omc_keep_length($totalNum,'0',6);
if($k4_flag!=8)
$k4 = '0000000000000000';
else{
if(strlen($k4)<16){
echo "<br><font color=\"#FF0000\" size=\"4\">K4 is incorrect!</font>";
exit();
}
}
$newValue = $commState.$totalNum.$k4;
}else{
$instanceNo = 0;
$commState = '01';
$totalNum = DecHex($impRecordNum);
$totalNum = omc_keep_length($totalNum,'0',6);
$finishNum = '000000';
$newValue = $commState.$totalNum.$finishNum;
}
if($DEBUG)echo "<br>newValue=$newValue";
//exit();
switch($paramType){
case '1':
$sysId=$sysTypeNo.'_'.$getSysIdRow[sysNo].'_99';
break;
case '2':
$sysId=$sysTypeNo.'_99_99';
break;
default:
break;
}
if($DEBUG) echo "<br>(2) sysId=$sysId";
//send set command
if($sysTypeNo==360||$sysTypeNo==395||$sysTypeNo==370||$sysTypeNo==375||$sysTypeNo==330||$sysTypeNo==325||$sysTypeNo==340||$sysTypeNo==380||$sysTypeNo==390||$sysTypeNo==378){
//if($sysTypeNo==360)
// $chgResult = setSysParamValue($sysIdCyc[0],$impObjId,$instanceNo,$newValue);
//else
$chgResult = setImpParamValue($sysIdCyc[0],$impObjId,$instanceNo,$newValue);
$commStr = sysCommSend($sysIdCyc[0],$nSetComm,$impObjId);
}else{
for ($k=0; $k<$runningServerNum; $k++) {
//if($DEBUG)
//echo "<br>{$sysIdCyc[$k]},$nSetComm,$impObjId<br>";
$chgResult = setSysParamValue($sysIdCyc[$k],$impObjId,$instanceNo,$newValue);
$commStr = sysCommSend($sysIdCyc[$k],$nSetComm,$impObjId);
if($DEBUG){
echo "setSysParamValue($sysId,$impObjId,$instanceNo,$newValue)<br>";
echo "sysCommSend($sysId,$nSetComm,$impObjId)";
}
}
}
//让下面的命令扫描页面开始启动
echo "<script language=\"javascript\">";
echo "window.parent.frames.main.location.href='./subscriberImportDown.php?showFlag=1&sysId=$sysIdCyc[0]&dataTypeNo=$dataTypeNo&dstSeverIp=$dstSeverIp&impRecordNum=$impRecordNum&commStr=$commStr&impFile=$impFile';";
echo "</script>";
sleep(2);
}elseif(isset($impFile)){
echo "<br><font color=\"#FF0000\" size=\"3\"><b>Upload file failed, File isn't exist or file is empty!</b></font>";
}
?>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
echo "<br>";
?>
<form method="POST" action="<?php echo "$PHP_SELF";?>" name="subsData" enctype="multipart/form-data">
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" >
<?php
//<!-- ************* Display title ************* -->
if ( (395 == $sysTypeNo || 360 == $sysTypeNo) && (1 == $dataTypeNo) ) {
$title = "$sysName recharge card data import";
} else {
$title = "$sysName subscriber data import";
}
echo "<tr bgcolor=\"#E6E6E6\">";
echo "<td width=100% colspan=2 align=center>";
echo "<font size=3><b>$title</b></font>";
echo "</td>";
echo "</tr>";
?>
<tr>
<td colspan=2>
<font color="#0000FF" size=2>Note:Import File's size <= <?php echo $maxImpFileSizeM;?>M, records <= <?php echo $maxImpRecordNum;?></font>
</td>
</tr>
<tr>
<td>Select File:</td>
<td>
<input type="file" name="impFile">
<input type="hidden" name="MAX_FILE_SIZE" value="20971520"><!-- MAX_FILE_SIZE = 20M -->
</td>
</tr>
<?php
if($sysTypeNo==340){
echo "<tr>";
echo "<td>K4 Flag</td>";
echo "<td>";
echo "<select size=\"1\" name=\"k4_flag\">";
echo "<option value=\"0\">Disable</option>";
echo "<option value=\"8\" selected>Enable</option>";
echo "</select>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>K4</td>";
echo "<td><input type=\"text\" name=\"k4\" maxlength=\"16\" size=\"17\" value=\"$k4\" class=\"text\"></td>";
echo "</tr>";
}
?>
<tr>
<td colspan=2>
<?php
if($DEBUG) echo "<br>submitStat=$submitStat";
if($submitStat == 'DISABLED'){
echo "<input type=\"submit\" DISABLED value=\"$strSubmit\">";
}else{
echo "<input type=\"submit\" value=\"$strSubmit\">";
}
echo "<input Name=\"dataTypeNo\" type=\"hidden\" value=\"$dataTypeNo\">";
echo "<input Name=\"sysId\" type=\"hidden\" value=\"$sysId\">";
?>
</td>
</tr>
</table>
</form>
<?php
adjust_content_tail("down");
?>
</body>
</html>
+11
View File
@@ -0,0 +1,11 @@
<?php
require("../../inc/header.inc");
?>
<frameset rows="65,*" framespacing="0" border="0" frameborder="0">
<?php
echo "<frame name=\"header\" scrolling=\"auto\" noresize target=\"main\" src=\"commScan.php?$scanURL\" marginwidth=\"0\" marginheight=\"0\">";
echo "<frame name=\"main\" src=\"commDown.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&userType=$userType\" scrolling=\"auto\"target=\"_self\" marginwidth=\"0\" marginheight=\"0\">";
?>
</frameset>
</html>
+291
View File
@@ -0,0 +1,291 @@
<?php
/********************************************************************
程序说明:
功能说明:发送完参数命令后,通过定时扫描数据库,显示命令的操作的状态过程,每隔两秒自动刷新
输入变量:(由发送命令页面传来)$commIdStr,$okURL,$failURL
输出并输入变量:$usedTime,$waitTime,$isFinish,$okURL,$failURL,$commIdStr
作者:
********************************************************************/
require("../../inc/header.inc");
$DEBUG = 0;
global $pubConn;
$commIdStr=$_REQUEST['commIdStr'];
$okURL=$_REQUEST['okURL'];
$failURL=$_REQUEST['failURL'];
//commType 's value
$nReadComm = 1;
$nChangeComm = 2;
$nCreateComm = 3;
$nDeleteComm = 4;
$nLoadIndexComm = 5;
$nReplaceIndexComm=6;
//commState's value
$nProcFail = 0;
$nWaitProc = 1;
$nInProc = 2;
$nOutProc = 3;
$failURL = rawurldecode($failURL);
$okURL = rawurldecode($okURL);
$pubDb = 'OMC_PUB';
$commTable = 'subscriberComm';
$sysConfTable ='sysConf';
$commNum=$_REQUEST['commNum'];
$commType=$_REQUEST['commType'];
$lastTimeFinishNumStr=$_REQUEST['lastTimeFinishNumStr'];
if($commNum <= 0){
$commArr = explode('-',$commIdStr);
$commNum = sizeof($commArr);
}
$maxOverTime = $commNum * 5 + 10; //根据子系统个数和对每个子系统操作的最大延时(5秒)来决定
$maxWaitTime = $commNum * 2;
$maxStopTime = $commNum * 5 + 10;
$maxOfCommId = 50000; //设定命令表的最大值
$isFinish = $_REQUEST['isFinish'];
$waitTime = $_REQUEST['waitTime'];
$stopTime = $_REQUEST['stopTime'];
$usedTime = $_REQUEST['usedTime'];
$isBatchCreate = $_REQUEST['isBatchCreate'];
$batchDelete = $_REQUEST['batchDelete'];
$dataTypeNo = $_REQUEST['dataTypeNo'];
if($DEBUG) echo "<br>if(isFinish != 0 || (waitTime >= maxWaitTime) ||(stopTime > maxStopTime))<br>";
if($DEBUG) echo "<br>if($isFinish != 0 || ($waitTime >= $maxWaitTime) ||($stopTime > $maxStopTime))<br>";
//命令处理完毕
//----------------
if(($isFinish != 0) || ($waitTime >= $maxWaitTime) || ($stopTime > $maxStopTime)){
if($commId >= $maxOfCommId){ //初始化命令表
//先删除表
$dropSql = "DROP TABLE $commTable ";
mysqli_query($pubConn,$dropSql);
//再建一个结构相同的新表
$createSql="CREATE TABLE subscriberComm (
commId smallint(5) unsigned NOT NULL auto_increment,
commType tinyint(1) DEFAULT '0' NOT NULL,
dataTypeNo tinyint(4) DEFAULT '0' NOT NULL,
sysTypeNo smallint(5) unsigned DEFAULT '0' NOT NULL,
sysNo smallint(5) unsigned DEFAULT '0' NOT NULL,
subSysNo smallint(5) unsigned DEFAULT '0' NOT NULL,
indexValueList varchar(255) NOT NULL,
fieldNameList tinytext NOT NULL,
paramType tinyint(4) DEFAULT '0' NOT NULL,
commState tinyint(3) unsigned DEFAULT '0' NOT NULL,
totalNum smallint(5) unsigned DEFAULT '0' NOT NULL,
finishNum smallint(5) unsigned DEFAULT '0' NOT NULL,
sendTime datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
bgnTime datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
endTime datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
remark varchar(200) binary NOT NULL,
PRIMARY KEY (commId),
KEY sysTypeNo (sysTypeNo),
KEY sysNo (sysNo),
KEY subSysNo (subSysNo),
KEY bufferKey (indexValueList)
)
";
mysqli_query($pubConn,$createSql);
}else{
//删除命令表的相关命令
$commArr = explode('-',$commIdStr);
for($i=0;$i<sizeof($commArr);$i++){
if(strlen($commArr[$i]) <=0){
continue;
}
$deleteSql = "DELETE FROM $commTable WHERE commId='$commArr[$i]'";
if($DEBUG) echo "<br>deleteSql = $deleteSql";
mysqli_query($pubConn,$deleteSql);
echo mysqli_error($pubConn);
}
}
// 重定向返回指定页
if($isFinish != 0){
if($isFinish > 0){
echo "<b><font size=3 color=blue>Finished!!</font></b>";
if($commType == $nLoadIndexComm){
sleep(8);//等8秒,这样数据库插入才能完全完成
}
if($DEBUG) echo "<br>okURL=$okURL";
if($DEBUG) exit();
echo " <meta http-equiv=\"refresh\" content=\"2; url=$okURL\"> ";
}elseif($isFinish == -1){
echo "<b><font size=3 color=black>Failed in some system!!</font></b>";
if($DEBUG) exit();
echo " <meta http-equiv=\"refresh\" content=\"2; url=$okURL\"> ";
}else{
echo "<b><font size=3 color=red>Failed!!</font></b>";
if($DEBUG) exit();
echo " <meta http-equiv=\"refresh\" content=\"2; url=$failURL\"> ";
}
}elseif($usedTime >= $maxOverTime && $stopTime == 1){
echo "<b><font size=3 color=red>Stoped!!</font></b>";
if($DEBUG) exit();
echo " <meta http-equiv=\"refresh\" content=\"2; url=$failURL\"> ";
}else{ //$usedTime >= $maxOverTime
echo "<b><font size=3 color=red>Timeout!!</font></b>";
if($DEBUG) exit();
echo " <meta http-equiv=\"refresh\" content=\"2; url=$failURL\"> ";
}
exit();
}//end of if($isFinish....)
//显示命令执行状态
//-----------------------------
$showTime = $usedTime*2;
echo "<font size=2>Time:$showTime s</font>";
$okNum = 0;
$failNum = 0;
$commNum = 0;
$commArr = explode('-',$commIdStr);
$thisTImeFinishNumstr='';
$lastTimeFinishNumArr = explode('-',$lastTimeFinishNumStr);
for($i=0;$i<sizeof($commArr);$i++){
if(strlen($commArr[$i]) <=0){ continue;}
$commNum++;
$commSql = "SELECT * FROM $commTable WHERE commId= $commArr[$i]";
if($DEBUG) echo "<br>get command = $commSql";
$commResult = mysqli_query($pubConn,$commSql);
if(mysqli_num_rows($commResult) <= 0){
echo "<br>Can not find this command's info in datebase";
exit();
}
$commRows = @mysqli_fetch_array($commResult);
$sysTypeNo = $commRows[sysTypeNo];
$sysNo = $commRows[sysNo];
$subSysNo = $commRows[subSysNo];
$commType = $commRows[commType];
$paramType = $commRows[paramType];
$objId = $commRows[objId];
$commState = $commRows[commState];
$indexValueList = $commRows[indexValueList];
$fieldNameList = $commRows[fieldNameList];
$remark = $commRows[remark];
if ($DEBUG)echo "commState=$commState, commRemakr=$remark<br>";
//获取该系统类型的snmp头和类型名称
if(!isset($sysTypeName)){
$sysConfSql = "SELECT snmpHead,sysTypeName FROM $sysConfTable WHERE sysTypeNo='$sysTypeNo'";
if($DEBUG) echo "<br>get conf = $sysConfSql";
$sysConfResult = mysqli_query($pubConn,$sysConfSql);
echo mysqli_error($pubConn);
$sysConfRows = @mysqli_fetch_array($sysConfResult);
$sysTypeName = $sysConfRows[sysTypeName];
$snmpHead = $sysConfRows[snmpHead];
}
$sysName = $sysTypeName.'_'.$sysNo.'_'.$subSysNo;
//echo "<br><font size=2> $sysName 's</font>";
$objIdStr=$snmpHead.'.'.$objId;
//echo "<font size=2 color=blue>$objIdStr</font>";
switch($commType){
case $nReadComm:
$showInfo="Read $indexValueList from $sysName";
break;
case $nChangeComm:
$showInfo="Change $indexValueList's field[$fieldNameList] in $sysName";
break;
case $nCreateComm:
$showInfo="Create $indexValueList to $sysName";
break;
case $nDeleteComm:
$showInfo="Delete $sysName's $indexValueList";
break;
case $nLoadIndexComm:
$showInfo="Load $sysName's subscriber Data ";
break;
case $nReplaceIndexComm:
$showInfo="Replace Index $indexValueList -> $remark in $sysName";
break;
default:
echo "<font size=2> Unknown Command Type</font>";
exit();
}
echo "<font size=2> $showInfo</font>";
switch($commState){
case 0: //process failed
$failNum++;
echo "<br><b><font size=2 color=red> $commRows[remark] </font></b>";
insertLog("$showInfo Failed:$remark");
sleep(1);
break;
case 1: //wait process
$waitTime++;
break;
case 2: //in process
$waitTime = 0;
//只要有一个命令的完成数在增长,就认为该组命令在运行,否则认为命令处理超时
if($DEBUG) echo "====> {$commRows[finishNum]} > {$lastTimeFinishNumArr[$i]}";
if($commRows[finishNum] > $lastTimeFinishNumArr[$i]){
$stopTime = 0;
}else{
$stopTime++;
}
omcProgressBar($commRows[totalNum],$commRows[finishNum]);
$thisTimeFinishNumStr .=$commRows[finishNum].'-';
break;
case 3: //process finished
$okNum++;
omcProgressBar(100,100);
insertLog("$showInfo OK");
break;
default:
echo "<font size=3>Unknown Command State</font>";
exit();
}
echo "<br><br>";
}//end of for($i=0;$i<sizeof($commArr);$i++)
if($DEBUG) echo"<br>$commNum =?= $finishNum";
if($commNum == $okNum){
$isFinish = 1;
}elseif($failNum > 0 && $okNum > 0){
$isFinish = -1;
}elseif($commNum == $failNum){
$isFinish = -2;
}else{
$isFinish = 0;
}
//当删除用户时,只要不是"回应超时",都删除OMC数据库的用户
if($commType == $nDeleteComm && $commState != $nWaitProc && $commState != $nInProc){
if($DEBUG) echo"<br>commType == DeleteComm ($commType == $nDeleteComm)";
if($DEBUG) echo"<br>remark={$commRows[remark]}";
if($DEBUG) sleep(5);
if( $commRows[remark] != "response timeout"){
if(!strstr($commRows[remark],"Can not delete an in used subscriber, please disable first"))
$isFinish = 1;
}
}
if($DEBUG) echo"<br>lastTimeFinishNumStr=$lastTimeFinishNumStr";
if($DEBUG) echo"<br>thisTimeFinishNumStr=$thisTimeFinishNumStr";
$lastTimeFinishNumStr = $thisTimeFinishNumStr;
//刷新返回
//--------------
$usedTime++; //总时间
$failURL= rawurlencode($failURL);
$okURL = rawurlencode($okURL);
//保留变量值,传到下次刷新
$keepStr= "usedTime=$usedTime&waitTime=$waitTime&isFinish=$isFinish&stopTime=$stopTime&failURL=$failURL&okURL=$okURL&commIdStr=$commIdStr&commNum=$commNum&lastTimeFinishNumStr=$lastTimeFinishNumStr&commType=$commType";
if($DEBUG) echo "<br>keepStr=$keepStr";
/*
if ( 1!=$searchInServer ) {
require("commDown.php");
}
*/
sleep(5);
$PHP_SELF = $_SERVER['PHP_SELF'];
?>
<script type="text/javascript">
window.location.href="<?php echo "$PHP_SELF?$keepStr"; ?>";
</script>
+499
View File
@@ -0,0 +1,499 @@
<?php
$DEBUG=0;
$sysTypeNo=$_REQUEST['sysTypeNo'];
$bufferNo=$_REQUEST['bufferNo'];
$keyValue=$_REQUEST['keyValue'];
$isTryCreate=$_REQUEST['isTryCreate'];
global $OMC_server,$pubConn;
if(isset($sysId)){
$sysIdArr = explode('_',$sysId);
$sysTypeNo = $sysIdArr[0];
$sysNo = $sysIdArr[1];
$subSysNo = $sysIdArr[2];
}elseif(isset($sysTypeNo)){
//����vlrû��heartbeat,��Ҫ����MSC��״̬��ȷ�������ĸ�ϵͳ
if($sysTypeNo == '325'){
$getSysIdSql = "SELECT sysNo,subSysNo FROM OMC_PUB.sysInfo
WHERE sysTypeNo='325'
ORDER BY baseStat DESC,updateTime DESC,sysNo,subSysNo";
}else{
$getSysIdSql = "SELECT sysNo,subSysNo FROM OMC_PUB.sysInfo
WHERE sysTypeNo='$sysTypeNo'
ORDER BY baseStat DESC,updateTime DESC,sysNo,subSysNo";
}
if($DEBUG) echo "<br>getSysIdSql=$getSysIdSql";
//debug_log("/tmp/debug.txt",$getSysIdSql);
$getSysIdResult=mysqli_query($pubConn,$getSysIdSql);
echo mysqli_error($pubConn);
if(mysql_errno())
debug_log("/tmp/debug.txt","remark-1");
if(mysqli_num_rows($getSysIdResult) > 0){
$getSysIdRows=mysqli_fetch_array($getSysIdResult);
$sysNo = $getSysIdRows[sysNo];
$subSysNo = $getSysIdRows[subSysNo];
$sysId = $sysTypeNo.'_'.$sysNo.'_'.$subSysNo;
}else{
echo "<br><font size=3 color=red>Can not find this system's IP in system List,";
echo "Please add it!</font>";
exit(0);
}
}else{
echo "Can not find sysTYpeNo!!";
exit(0);
}
if(($isBatchCreate>0&&$isCreate>0)&&(!isset($batchNum)||$batchNum>100||$batchNum<=0)){
echo "<SCRIPT LANGUAGE=\"JavaScript\">";
echo "alert(\"The batch amount should be >0 and <= 100. \")";
echo "</SCRIPT>";
echo " <meta http-equiv=\"refresh\" content=\"0; url=$PHP_SELF?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&isTryCreate=1&isBatchCreate=1\">";
exit();
}
$objDb='OBJ_'.$sysTypeNo;
$objConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], $objDb);
$dataTypeNo = (strlen($dataTypeNo) > 0)?$dataTypeNo:0;
$confTable = 'subsParamConf_'.$dataTypeNo;
if($sysTypeNo==390 || $sysTypeNo == 365 || $sysTypeNo == 366){
$getConfSql="SELECT sysTypeName,dataTypeNo,indexFieldName,subsDataTable,tmpDataTable
FROM $sysSubsConfTable,$systemConfTable
WHERE $sysSubsConfTable.sysTypeNo='$sysTypeNo'
AND $systemConfTable.sysTypeNo='$sysTypeNo'
AND $sysSubsConfTable.dataTypeNo='$dataTypeNo'
AND $sysSubsConfTable.sysNo='$sysNo'
";
}else{
$getConfSql="SELECT sysTypeName,dataTypeNo,indexFieldName,subsDataTable,tmpDataTable
FROM $sysSubsConfTable,$systemConfTable
WHERE $sysSubsConfTable.sysTypeNo='$sysTypeNo'
AND $systemConfTable.sysTypeNo='$sysTypeNo'
AND $sysSubsConfTable.dataTypeNo='$dataTypeNo'
";
}
//if($DEBUG)
//echo "<br>getConfSql=$getConfSql";
//exit();
$getConfResult=mysqli_query($pubConn,$getConfSql);
echo mysqli_error($pubConn);
if(mysql_errno())
debug_log("/tmp/debug.txt","remark-2");
$getConfRows=mysqli_fetch_array($getConfResult);
$sysTypeName =$getConfRows['sysTypeName'];
$indexFieldName =$getConfRows['indexFieldName'];
$srcDataTable =$getConfRows['subsDataTable'];
$tmpDataTable =$getConfRows['tmpDataTable'];
global $userName;
if($sysTypeName=="VSS") $sysTypeName="VMS";
$srcDataConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], $sysTypeName."_DB");
if($DEBUG)echo "<br>srcDataTable:$srcDataTable<br>tmpDataTable:$tmpDataTable";
//�����û��Ƿ������˲���
$editFlag = false;
if($editFlag < 0){
$chkFlagSql = "SELECT editFlag FROM $tmpDataTable WHERE $indexFieldName = '$keyValue'";
if($DEBUG) echo "<br>chkFlagSql=$chkFlagSql";
$result=mysqli_query($objConn,$chkFlagSql);
echo mysqli_error($objConn);
if(mysql_errno())
debug_log("/tmp/debug.txt","remark-3");
$flagRow=mysqli_fetch_array($result);
$editFlag = $flagRow[0];
if($editFlag > 0){
echo "This subscriber is be other one editing!!,please wait and try again";
}else{
$setFlagSql = "UPDATE $tmpDataTable SET editFlag = '1' WHERE $indexFieldName = '$keyValue'";
mysqli_query($objConn,$setFlagSql);
}
}
$needSaveEditValue = 0;
$needSendComm = 0;
$indexValueList = $keyValue;
//*********��ȡһ���û�***************************
if($isRead > 0){//$getFromSys
$commType = $nReadComm;
$needSendComm = 1;
}
//*********�޸�һ���û�*************************
if($isChange > 0){
$needSaveEditValue = 1;
$commType = $nChangeComm;
$needSendComm = 1;
}
//*********����һ���û�***************************
if($isCreate > 0){
if($isCreate == 2){//create in omc
$needSaveEditValue = 1;
}else{//$isCreate == 2,create in server
$commType = $nCreateComm;
$needSendComm = 1;
$needSaveEditValue = 1;
}
}
//*********ɾ��һ���û�***************************
if($isDelete > 0){
$commType = $nDeleteComm;
$needSendComm = 1;
}
//*********���������û�***************************
if($isLoadIndex > 0){
$commType = $nLoadIndexComm;
$needSendComm = 1;
}
//*********�滻�û�index����***************************
if($isReplaceIndex > 0){
$chkIndexPass = 0;
if($isConfirmed > 0){
$chkIndexPass=1;
if($DEBUG) echo "<br>newIndexValue=$newIndexValue";
//���newIndexValue������
switch($sysTypeNo){
case '330':
//���㳤��
for($i=strlen($newIndexValue);$i<16;$i++){
$imsi='0'.$newIndexValue;
}
$oldMccMnc=substr($keyValue,0,6);
$newMccMnc=substr($newIndexValue,0,6);
/*
if($oldMccMnc != $newMccMnc){
echo "<font color=red>Please Check new IMSI's MCC AND MNC!<font>";
$chkIndexPass=0;
}*/
if($newIndexValue == $keyValue){
echo "<font color=red>New IMSI Number same as old's!<font>";
$chkIndexPass=0;
}
break;
default:
echo "Unknown sysTypeNo($sysTypeNo)!";
exit();
}
if($chkIndexPass > 0){
$commType = $nReplaceIndexComm;
$needSendComm = 1;
}
}
if($chkIndexPass == 0){
if($DEBUG) echo "<br>";
echo "\n <form method=\"POST\" name=\"update\" action=\"$PHP_SELF\" >";
echo "\n <table border=\"1\" width=\"100%\" cellpadding=\"2\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\" bgcolor=\"#FFFFFF\"> ";
$showIndexName=strtoupper($indexFieldName);
echo "\n <tr bgcolor=\"#E6E6E6\"><th colspan=\"2\">Replace $showIndexName</th></tr>";
echo "\n <tr><td>Old $showIndexName:</td><td>$keyValue</td></tr>";
echo "\n <tr><td>New $showIndexName:</td><td>";
echo "\n <input type=\"text\" name=\"newIndexValue\" maxlength=\"16\" size=\"18\" value=\"$newIndexValue\" class=\"text\">";
echo "\n </td></tr></table>";
echo "<br> &nbsp;&nbsp;&nbsp;&nbsp; <input type=\"submit\" value=\"Replace\" class=\"button\">";
echo "\n <input type=\"hidden\" name=\"sysId\" value=\"$sysId\">";
echo "\n <input type=\"hidden\" name=\"dataTypeNo\" value=\"$dataTypeNo\">";
echo "\n <input type=\"hidden\" name=\"indexFieldName\" value=\"$indexFieldName\">";
echo "\n <input type=\"hidden\" name=\"keyValue\" value=\"$keyValue\">";
echo "\n <input type=\"hidden\" name=\"isReplaceIndex\" value=\"1\">";
echo "\n <input type=\"hidden\" name=\"isConfirmed\" value=\"1\">";
echo "</form>";
exit();
}
}
//---------�������------------------------------
if($needSaveEditValue == 1){
if($isBatchCreate>0&&$isCreate>0){
$stopFlag=0;
for($tmpNum=0;$tmpNum<$batchNum;$tmpNum++){
$counter=0;
for($i=$bgnNo;$i<$endNo;$i++){
if(${'checkBox_'.$i} > 0){
$editValue=${'editValue_'.$i};
$tmpFieldName = ${'fieldName_'.$i};
if($tmpFieldName == $indexFieldName){
if($tmpNum==0)
$indexValueList = $editValue;
$tmpLen=strlen($editValue);
$tmpEditValue=$editValue[$tmpLen-4].$editValue[$tmpLen-3].$editValue[$tmpLen-2].$editValue[$tmpLen-1];
$tmpEditValue = $tmpEditValue+$tmpNum;
if($tmpEditValue%10000==0 && $tmpNum!=0){
$batchNum=$tmpNum;
$stopFlag=1;
}
$tmpEditValue=''.$tmpEditValue;//ȷ��tmpEditValueΪ�ַ���
$tmpEditValue=omc_keep_length($tmpEditValue,'0',4);
$editValue[$tmpLen-4]= $tmpEditValue[0];
$editValue[$tmpLen-3]= $tmpEditValue[1];
$editValue[$tmpLen-2]= $tmpEditValue[2];
$editValue[$tmpLen-1]= $tmpEditValue[3];
//echo "<br>editValue=$editValue";
}
if($sysTypeNo==330&&$tmpFieldName == 'inter_msisdn'){
$tmpEditValueArr=explode("E",$editValue);
$editValue=$tmpEditValueArr[0];
$tmpLen=strlen($editValue);
$tmpEditValue=$editValue[$tmpLen-4].$editValue[$tmpLen-3].$editValue[$tmpLen-2].$editValue[$tmpLen-1];
$tmpEditValue = $tmpEditValue+$tmpNum;
if($tmpEditValue%10000==0 && $tmpNum!=0){
$batchNum=$tmpNum;
$stopFlag=1;
}
$tmpEditValue=''.$tmpEditValue;//ȷ��tmpEditValueΪ�ַ���
$tmpEditValue=omc_keep_length($tmpEditValue,'0',4);
$editValue[$tmpLen-4]=$tmpEditValue[0];
$editValue[$tmpLen-3]=$tmpEditValue[1];
$editValue[$tmpLen-2]=$tmpEditValue[2];
$editValue[$tmpLen-1]=$tmpEditValue[3];
$editValue=omc_keep_length($editValue,'E',18,0);
//echo "<br>editValue=$editValue";
}
if($counter == 0){
$setValueStr = "$tmpFieldName = '$editValue'";
$fieldNameList = "$tmpFieldName";
}else{
$setValueStr .= ", $tmpFieldName = '$editValue'";
$fieldNameList .= ",$tmpFieldName";
}
$counter++;
}
}
if($stopFlag==1)
break;
if($isCreate == 2){//��omc�ϴ���
$saveSql = "REPLACE $srcDataTable SET $setValueStr";
$saveResult = mysqli_query($srcDataConn,$saveSql);
}else{
$saveSql = "REPLACE $tmpDataTable SET $setValueStr";
$saveResult = mysqli_query($objConn,$saveSql);
echo mysqli_error($objConn);
}
if($DEBUG)
echo "<br>saveSql = $saveSql <br>objDb=$objDb";
echo mysqli_error($pubConn);
if(mysql_errno())
debug_log("/tmp/debug.txt","remark-4");
}
$keyValue=$indexValueList;
if($isCreate == 2){//��omc�ϴ���
echo "<script LANGUAGE=\"JavaScript\">";
echo "\n window.location.href=\"./subscriberListDown.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo\";";
echo "\n </script>";
exit();
}
}else{
$counter=0;
//echo "bgnNo=$endNo<br>";
for($i=$bgnNo;$i<$endNo;$i++){
//echo "checkBox_$i=".${'checkBox_'.$i}."<br>";
if(${'checkBox_'.$i} > 0){
$editValue=${'editValue_'.$i};
$tmpFieldName = ${'fieldName_'.$i};
if($isCreate > 0){
if($tmpFieldName == $indexFieldName){
$indexValueList = $editValue;
}
}else{
if($tmpFieldName == $indexFieldName){
continue;
}
}
if($counter == 0){
$setValueStr = "$tmpFieldName = '$editValue'";
$fieldNameList = "$tmpFieldName";
}else{
$setValueStr .= ", $tmpFieldName = '$editValue'";
$fieldNameList .= ",$tmpFieldName";
}
$counter++;
}
}
if($isCreate){
$keyValue=$indexValueList;
if($isCreate == 2){//��omc�ϴ���
$saveSql = "REPLACE $srcDataTable SET $setValueStr";
$saveResult = mysqli_query($srcDataConn,$saveSql);
}else{
$saveSql = "REPLACE $tmpDataTable SET $setValueStr";
$saveResult = mysqli_query($objConn,$saveSql);
echo mysqli_error($objConn);
}
}else{
$saveSql = "UPDATE $tmpDataTable SET $setValueStr
WHERE $indexFieldName = '$keyValue'
";
$saveResult = mysqli_query($objConn,$saveSql);
echo mysqli_error($objConn);
}
if($DEBUG) echo "<br>saveSql = $saveSql <br>objDb=$objDb";
//if(mysql_errno())
//debug_log("/tmp/debug.txt","remark-5:$saveSql,tmpFieldName=$tmpFieldName,editValue'=$editValue'");
echo mysqli_error($pubConn);
}
}
//if($DEBUG && $_SERVER['REQUEST_METHOD'] == "POST") exit();
//echo "$sysId";
//exit();
//---------���������תҳ��----------------------------
global $objConn, $srcDataConn;
if($needSendComm == 1 && isset($commType)){
if($commType == $nLoadIndexComm || $commType == $nDeleteComm){
if($commType == $nLoadIndexComm){
$okURL ="./subscriberListDown.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&sysNo=$sysNo&sysId=$sysId";
$failURL ="./subscriberListDown.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&sysNo=$sysNo&sysId=$sysId";
}else{
$okURL ="./subscriberListDown.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&sysNo=$sysNo&sysId=$sysId&commType=$nDeleteComm&keyValue=$keyValue";
$failURL = "$PHP_SELF?sysId=$sysId&bgnNo=$bgnNo&keyValue=$keyValue&canSetNum=$canSetNum&bufferNo=$bufferNo&dataTypeNo=$dataTypeNo";
}
}else{
if($commType == $nReplaceIndexComm){
$okURL = "$PHP_SELF?sysId=$sysId&bgnNo=$bgnNo&keyValue=$newIndexValue&canSetNum=$canSetNum&bufferNo=$bufferNo&dataTypeNo=$dataTypeNo&isRead=1";
}elseif($commType == $nCreateComm){
if($isBatchCreate==1)
$okURL = "$PHP_SELF?sysId=$sysId&bgnNo=$bgnNo&keyValue=$keyValue&canSetNum=$canSetNum&bufferNo=$bufferNo&dataTypeNo=$dataTypeNo&isBatchCreate=$isBatchCreate";
else
$okURL = "$PHP_SELF?sysId=$sysId&bgnNo=$bgnNo&keyValue=$keyValue&canSetNum=$canSetNum&bufferNo=$bufferNo&dataTypeNo=$dataTypeNo&isRead=1";
}else{
$okURL = "$PHP_SELF?sysId=$sysId&bgnNo=$bgnNo&keyValue=$keyValue&canSetNum=$canSetNum&bufferNo=$bufferNo&dataTypeNo=$dataTypeNo";
}
$failURL = "$PHP_SELF?sysId=$sysId&bgnNo=$bgnNo&keyValue=$keyValue&canSetNum=$canSetNum&bufferNo=$bufferNo&dataTypeNo=$dataTypeNo&isBatchCreate=$isBatchCreate";
}
if($DEBUG) echo "<br>okURL =$okURL ";
sleep(1);
if($commType == $nReplaceIndexComm){
if($DEBUG) echo "<br>subsCommSend(sysId,dataTypeNo,indexValueList,fieldNameList,commType,newIndexValue)";
if($DEBUG) echo "<br>subsCommSend($sysId,$dataTypeNo,$indexValueList,$fieldNameList,$commType,$newIndexValue)";
$commIdStr = subsCommSend($sysId,$dataTypeNo,"$indexValueList","$fieldNameList",$commType,$newIndexValue);
}else{
if($DEBUG) echo "<br>subsCommSend(sysId,dataTypeNo,indexValueList,fieldNameList,commType)";
if($DEBUG) echo "<br>subsCommSend($sysId,$dataTypeNo,$indexValueList,$fieldNameList,$commType)";
if($isBatchCreate==1){
for($tmpNum=0;$tmpNum<$batchNum;$tmpNum++){
$tmpCommIdStr = subsCommSend($sysId,$dataTypeNo,"$indexValueList","$fieldNameList",$commType);
$tmpLen=strlen($indexValueList);
$tmpIndexValueList=$indexValueList[$tmpLen-4].$indexValueList[$tmpLen-3].$indexValueList[$tmpLen-2].$indexValueList[$tmpLen-1];
$tmpIndexValueList = $tmpIndexValueList+1;
$tmpIndexValueList=''.$tmpIndexValueList;//ȷ��tmpIndexValueListΪ�ַ���
$tmpIndexValueList=omc_keep_length($tmpIndexValueList,'0',4);
$indexValueList[$tmpLen-4]=$tmpIndexValueList[0];
$indexValueList[$tmpLen-3]=$tmpIndexValueList[1];
$indexValueList[$tmpLen-2]=$tmpIndexValueList[2];
$indexValueList[$tmpLen-1]=$tmpIndexValueList[3];
//echo "<br>commIdStr=subsCommSend($sysId,$dataTypeNo,\"$indexValueList\",\"$fieldNameList\",$commType)";
$commIdStr=$commIdStr.$tmpCommIdStr;
}
}else
$commIdStr = subsCommSend($sysId,$dataTypeNo,"$indexValueList","$fieldNameList",$commType);
//exit();
}
if($DEBUG) {
echo "<br>commIdStr=subsCommSend($sysId,$dataTypeNo,\"$indexValueList\",\"$fieldNameList\",$commType)";
}
if(isset($commIdStr) && $commIdStr != -1){
if($commType == $nLoadIndexComm){
$srcDataTableArr=explode('.',$srcDataTable);
$srcDataDb=$srcDataTableArr[0];
$clearDataSql="DELETE FROM $srcDataTable";
mysqli_query($srcDataConn,$clearDataSql);
if($DEBUG)
echo "mysqli_query($srcDataConn,$clearDataSql);<br>";
$clearDataSql="DELETE FROM $tmpDataTable";
if($DEBUG)
echo "mysqli_query($srcDataConn,$clearDataSql);<br>";
mysqli_query($objConn,$clearDataSql);
mysqli_error($srcDataConn);
mysqli_error($objConn);
}
$failURL = urlencode($failURL);
$okURL = urlencode($okURL);
$scanURL = "commIdStr=$commIdStr&okURL=$okURL&failURL=$failURL";
if($DEBUG) echo "<br>scanURL = $scanURL";
if($DEBUG) exit();
echo " <meta http-equiv=\"refresh\" content=\"0; url=./commScan.php?$scanURL&sysId=$sysId&sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&userType=$userType&searchInServer=$searchInServer&isLoadIndex=$isLoadIndex&isBatchCreate=$isBatchCreate\"> ";
exit();
}else{
echo "<br><font size=3 color=red>SEND COMMAND ERROR!<br></font>";
}
}
//��Ҫ�༭�����ݵ�����ʱ��
$getDataSql="SELECT * FROM $srcDataTable WHERE $indexFieldName='$keyValue'";
if($DEBUG)
echo "<br>getDataSql=$getDataSql";
$result=mysqli_query($srcDataConn,$getDataSql);
$fieldNum=mysqli_num_fields($result);
if(mysql_errno())
debug_log("/tmp/debug.txt","remark-6");
echo mysqli_error($srcDataConn);
if($DEBUG)
echo "<br>fieldNum=$fieldNum";
$tmpRow=mysqli_fetch_array($result);
if($DEBUG) echo "<br>tmpRow[mo_expiration_date]=$tmpRow[mo_expiration_date]";
#if($DEBUG) echo "<br>valuestr=$valueStr,bufferNo=$bufferNo";
for($i=0;$i<$fieldNum;$i++){
$valueStr = "$valueStr ,'$tmpRow[$i]'";
# if($DEBUG) echo "<br>i:$i,tmpRow:$tmpRow[$i],valuestr=$valueStr";
}
$updateSql = "REPLACE $tmpDataTable VALUES('0' $valueStr)";
mysqli_query($objConn,$updateSql);
#if($DEBUG) echo "<br>bufferNo=$bufferNo";
if($DEBUG) echo "<br>updateSql=$updateSql";
//exit();
if(mysql_errno())
debug_log("/tmp/debug.txt","remark-7");
echo mysqli_error($objConn);
// echo"<br>objDb =$isTryCreate <br> ParamSql = $paramSql <br> ";
//����������û�������ȱʡֵ
if($isTryCreate > 0){
//�ڲ��������ȡ��˵��������ʱ������ȡ����ص�ֵ
$paramSql = " SELECT * FROM $confTable
WHERE $confTable.operType > '0'
ORDER BY level_1,level_2,level_3,level_4,level_5,level_6,level_7,level_8,level_9,level_10
";
if($DEBUG)
echo"<br>objDb =$objDb <br> ParamSql = $paramSql <br> ";
$paramResult = mysqli_query($objConn,$paramSql);
if(mysql_errno())
debug_log("/tmp/debug.txt","remark-8");
echo mysqli_error($objConn);
$i=0;
while($paramRows = @mysqli_fetch_array($paramResult)){
$tmpRow[$paramRows[fieldName]]=$paramRows[initValue];
}
if($DEBUG) echo "<br>tmpRow[mo_expiration_date]=$tmpRow[mo_expiration_date]";
}
?>
+585
View File
@@ -0,0 +1,585 @@
<?php
/*********************************************************
程序说明:(和paramEditPreview.php保持一致)
功能说明:本程序实现参数编辑模板代码的产生,保存,预览
调用关系:调用: connectdb.inc,inc/header.inc
被调用:
变量说明:
返回值:无
作者:
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
global $OMC_server;
$DEBUG = 0;
$TEST=$_REQUEST['TEST'];
$sysTypeNo=$_REQUEST['sysTypeNo'];
$dataTypeNo=$_REQUEST['dataTypeNo'];
$keyId=$_REQUEST['keyId'];
$setValue=$_REQUEST['setValue'];
$set=$_REQUEST['set'];
$inputName=$_REQUEST['inputName'];
$TEST = ($TEST > 0)?$TEST:0;
$objConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], "OBJ_".$sysTypeNo);
//value Type
$nInteger = 2;
$nAscStr = 3;
$nOctStr = 4;
function omcGetObjDb($sysTypeNo){
$dbName = 'OBJ_'.$sysTypeNo;
return($dbName);
}
function omcGetObjTbl($sysTypeNo,$tableType,$dataTypeNo){
$dbName = 'OBJ_'.$sysTypeNo;
$tableName = $dbName.'.subsParamConf_'.$dataTypeNo;
return($tableName);
}
/*
function omcStrFill($string,$defLen,$fillWay='high',$fillChar='0'){
if(strlen($string) <= $defLen){
$fillLen=$defLen - strlen($string);
for($i=0;$i<$fillLen;$i++){
if($fillWay == 'low'){
$string = $string.$fillChar;
}else{
$string = $fillChar.$string;
}
}
return($string);
}else{
echo "<br>Error in omcStrFill:the defLen < lengh of string!!";
echo "<br>defLen=$defLen and string=$string!!";
exit();
}
}
*/
$sysConfTable = 'OMC_PUB.sysConf';
$sysTypeNo = (isset($sysTypeNo)?$sysTypeNo:0);
$pubDb ='OMC_PUB';
$objDb = omcGetObjDb($sysTypeNo);
$paramConfTable = omcGetObjTbl($sysTypeNo,paramConf,$dataTypeNo);
$maxLevelNum = 10;
if($DEBUG) echo "<br>A=$paramConfTable<br>";
//----------------------
//选择语言版本
if($language == 'eng'){
$objNameField=name_2;
$objSetField=setTemplate_2 ; //语种2
}else{
$objNameField=name_1;
$objSetField=setTemplate_1 ; //语种1(默认语种)
}
//-----------------------
//=======================Get value From submit===================
if($set == 'Set'){
//sort by offset
$unitNum=$_POST['unitNum'];
$inputName = $_POST['inputName'];
for($i=1;$i<=$_POST['unitNum'];$i++){
// $tmpDef = ${'unitDef_'.$i};
// $tmpValue = ${'unit_'.$i};
$tmpDef = 'unitDef_'.$i;
$tmpValue = 'unit_'.$i;
$tmpDef = $_POST[$tmpDef];
$tmpValue = $_POST[$tmpValue];
if($DEBUG) echo "<br>tmpDef = $tmpDef";
$defArr[$i] = $tmpDef;
$tmpDefArr=explode('-',$tmpDef);
$sortArr[$i] = $tmpDefArr[0];
$valueArr[$i] = $tmpValue;
}
$lastValue = '';
$k = 0;
asort($sortArr);
for(reset($sortArr); $key = key($sortArr); next($sortArr)){
if($DEBUG) echo "<br>sortArr[$key] = {$sortArr[$key]}";
if($DEBUG) echo "<br>unitValue = {$valueArr[$key]}";
$unitValue = $valueArr[$key];
if($DEBUG) echo "<br>defArr[$key] = {$defArr[$key]}";
$unitDefArr = explode('-',$defArr[$key]); //例:0.0-0.7-input -toDec-high-0
if(sizeof($unitDefArr) <= 1){
if($DEBUG) echo "<br>nothing,just a name";
continue;
}
$bgnOffset = $unitDefArr[0];
$endOffset = $unitDefArr[1];
$operType = $unitDefArr[2];
$valueType = $unitDefArr[3];
$fillWay = $unitDefArr[4];
$fillChar = $unitDefArr[5];
$bgnOffsetArr = explode('.',$bgnOffset);
$bgnByte = $bgnOffsetArr[0];
$bgnBit = $bgnOffsetArr[1];
$endOffsetArr = explode('.',$endOffset);
$endByte = $endOffsetArr[0];
$endBit = $endOffsetArr[1];
$byteLen = $endByte - $bgnByte + 1;
$byteValue = '';
if($DEBUG) echo "<br>valueType = $valueType";
switch($valueType){
case 'toDec':
if($bgnBit > 0 ||$endBit < 7){
$bitLen = $byteLen*8 - $bgnBit - (7 - $endBit) ; //1 BYTE = 8 bit
$bitValue = DecBin($unitValue);
if($DEBUG) echo "<br>bitValue = $bitValue ";
$bitValue = omcStrFill($bitValue,$bitLen,$fillWay,$fillChar);
if($DEBUG) echo "<br>omcStrFill($bitValue,$bitLen,$fillWay,$fillChar)";
$bitValueArr[$k] = $bitValue;
if($DEBUG) echo "<br>bitValueArr[$k] = {$bitValueArr[$k]}";
if($endBit == 7){//发现这个单元结束,并没有跨byte,这时需要组成一个byte值
$bitValue = '';
for($bitNo=0; $bitNo<=$k; $bitNo++){
if($DEBUG) echo "<br>bitValueArr[$bitNo] = {$bitValueArr[$bitNo]}";
$bitValue = $bitValueArr[$bitNo].$bitValue;
}
$k=0;
if($DEBUG) echo "<br>bitValue = $bitValue";
$byteLen = strlen($bitValue) / 8;
if($DEBUG) echo "<br>byteLen = $byteLen";
$byteValue = BinDec($bitValue);
$byteValue = DecHex($byteValue);
$strLen = $byteLen*2;
if($DEBUG) echo "<br>omcStrFill($byteValue,$strLen,$fillWay,$fillChar)";
$byteValue = omcStrFill($byteValue,$strLen,$fillWay,$fillChar);
}else{//否则,继续组合下一个bit组
$byteValue = '';
$k++;
}
}else{
$byteValue = DecHex($unitValue);
$strLen = $byteLen*2;
$byteValue = omcStrFill($byteValue,$strLen,$fillWay,$fillChar);
if($DEBUG) echo "<br>omcStrFill($byteValue,$strLen,$fillWay,$fillChar)";
}
if($DEBUG) echo "<br>byteValue = $byteValue";
break;
case 'keepDec':
//echo "<br>Error:keepDec";
$byteValue = $unitValue - 0;
break;
case 'toHex':
echo "<br>Error:toHex";
break;
case 'keepHex':
if($bgnBit > 0 || $endBit < 7){//这里的处理不够全面,没有对=7的进行收尾
$byteValue = $unitValue;
$strLen = $byteLen;
$byteValue = omcStrFill($byteValue,$strLen,$fillWay,$fillChar);
$bitValue = DecBin(HexDec($byteValue));
$byteValue='';
$bitLen = $byteLen*8 - $bgnBit - (7 - $endBit) ; //1 BYTE = 8 bit
$bitValue = omcStrFill($bitValue,$bitLen,'high','0');
if($DEBUG) echo "<br>bitValue = $bitValue";
$bitValueArr[$k] = $bitValue;
$k++;
}else{
$k=0;
$byteValue = $unitValue;
$strLen = $byteLen*2;
$byteValue = omcStrFill($byteValue,$strLen,$fillWay,$fillChar);
if($DEBUG) echo "<br>omcStrFill($byteValue,$strLen,$fillWay,$fillChar)";
}
break;
case 'toAsc':
if($bgnBit > 0 ||$endBit < 7){
echo "<br>Error:toAsc";
exit(1);
}else{
$tmpLen=strlen($unitValue);
for($i=0;$i<$tmpLen;$i++){
$unitChar = substr($unitValue,$i,1);
$decValue = ord($unitChar); //ascii -> dec
$byteValue .= DecHex($decValue);
if(strlen($byteValue) < 2){
$byteValue = '0'.$byteValue;
}
}
$strLen = $byteLen*2;
$byteValue = omcStrFill($byteValue,$strLen,$fillWay,$fillChar);
}
break;
case 'keepAsc':
$byteValue = $unitValue;
break;
default:
echo "Error:Unknown valueType";
break;
}
if($DEBUG) echo "<br>byteValue = $byteValue ";
//--><-//$lastValue = $byteValue.$lastValue;
$lastValue = $lastValue.$byteValue;
}
if($DEBUG) echo "<br>lastValue = $lastValue ";
$setValue = $lastValue;
if($TEST != 1){
//set back to input field
echo "<script LANGUAGE=\"JavaScript\">";
echo "\n var setValue='$setValue'; ";
//echo "\n window.opener.document.update.$inputName.value=setValue.toUpperCase();";
echo "\n window.opener.document.update.$inputName.value=setValue;";
echo "\n window.opener.document.update.$inputName.style.color=\"BLUE\";";
echo "\n window.opener.document.update.$inputName.style.background = \"Yellow\";";
if($DEBUG) exit();
echo "\n window.opener.document.update.$inputName.focus();";
echo "\n window.close();";
echo "\n </script>";
}else{
if($valueType != 'keepAsc' && $valueType != 'toAsc'){
$setValue = strtoupper($setValue);
}
}
}//end of if($set == 1)
//=======================Show GUI ========================
?>
<body>
<script LANGUAGE="JavaScript">
function checkInt(term){
var checkOK = "0123456789";
var checkStr = term.value;
var allValid = true;
var termName = term.name;
var minValue = eval("document.confForm."+termName+"_min.value");
var maxValue = eval("document.confForm."+termName+"_max.value");
var oldValue = eval("document.confForm."+termName+"_old.value");
//alert(minValue+'<'+term.value+'<'+maxValue);
for (i = 0; i < checkStr.length; i++){
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++){
if (ch == checkOK.charAt(j))
break;
}
if (j == checkOK.length){
allValid = false;
break;
}
}
if (!allValid){
var errAlert="parameter Must be a dec number!";
alert(errAlert);
term.value=oldValue;
term.focus();
return (false);
}
if((minValue - term.value) > 0){
var errAlert="Too little!";
alert(errAlert);
term.value=oldValue;
term.focus();
return (false);
}
if((term.value - maxValue) > 0){
var errAlert="Too Big!";
alert(errAlert);
term.value=oldValue;
term.focus();
return (false);
}
}
</script>
<form method="POST" name="confForm" action="<?php echo"$PHP_SELF";?>" >
<?php
if($DEBUG) echo "<br>setValue = $setValue ,inputName = $inputName";
if($keyId > 0){
$objSql = "SELECT $objNameField,$objSetField,valueType,length,minValue,`maxValue` FROM $paramConfTable WHERE keyId = '$keyId'";
$objResult = mysqli_query($objConn ,$objSql);
$objRows = @mysqli_fetch_array($objResult);
$totalLen = $objRows[length]*2;
$objName = $objRows[$objNameField];
$setTemplate = $objRows[$objSetField];
$valueType = $objRows[valueType];
$minValue = $objRows[minValue];
$maxValue = $objRows[maxValue];
}else{
echo "<font><b>ERROR!!:keyId == NULL</b></font>";
exit();
}
/**************************************
*objName
*[unit]name[u]xx.xx-yy.yy[u]input[v]toDec-fillHigh-fillChar
*[unit]name[u]xx.xx-yy.yy[u]select[v]value1[opt]desc1[v]value2[opt]desc2
*[remark]
***************************************/
//explode by '[remark]'
$remarkArr = explode('[remark]',$setTemplate);
$remark = $remarkArr[1];
//explode by '[unit]'
$unitArr = explode('[unit]',$remarkArr[0]);
//show instance's name
echo "<b>{$unitArr[0]}</b><br>";
if($DEBUG) echo "<br>$unitArr[1]";
//show every one unit
//--><-//$setValue = strrev($setValue);
if($DEBUG){
echo "<table border=\"1\" cellpadding=\"0\" cellspacing=\"2\" width=\"100%\">";
}else{
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"2\" width=\"100%\">";
}
for($i=1;$i<sizeof($unitArr);$i++){
echo "\n <tr><td width=\"10%\" valign=middle><nobr>";
//unit input name
$unitName = "unit_".$i;
//explode by '[u]'
$tlvArr = explode('[u]',$unitArr[$i]);
if(sizeof($tlvArr) <= 1 ){
echo "<u><b>{$unitArr[$i]}</b></u>";
continue;
}
//show Unit Name
echo "$tlvArr[0]&nbsp;";
echo "</nobr></td><td>";
if($DEBUG) echo "$tlvArr[1]";
//explode by '-'
$offsetArr = explode('-',$tlvArr[1]);
$bgnOffsetArr = explode('.',$offsetArr[0]);
$bgnByte = $bgnOffsetArr[0];
$bgnBit = $bgnOffsetArr[1];
$endOffsetArr = explode('.',$offsetArr[1]);
$endByte = $endOffsetArr[0];
$endBit = $endOffsetArr[1];
$byteLen = $endByte - $bgnByte + 1;
$byteValue = substr($setValue,$bgnByte*2,$byteLen*2);
//--><-//$byteValue = strrev($byteValue);
if($DEBUG) echo "<br>byteValue = $byteValue";
$bitValue = '';
if($bgnBit > 0 ||$endBit < 7){
if($DEBUG) echo "<br>$bgnBit > 0 ||$endBit < 7";
$bitValue = HexDec($byteValue);
$bitValue = DecBin($bitValue);
if($DEBUG) echo "<br>bitValue = $bitValue";
$bitLen = $byteLen*8;//1 byte = 8 bit
$bitValue = omcStrFill($bitValue,$bitLen,'high','0');
if($DEBUG) echo "<br>omcStrFill($bitValue,$bitLen,'high','0')";
$bitValue = strrev($bitValue);
$catBitLen = $endByte*8+$endBit - ($bgnByte*8+$bgnBit) + 1; //1 byte = 8 bit
if($DEBUG) echo "<br>bitValue = substr($bitValue,$bgnBit,$catBitLen)";
$bitValue = substr($bitValue,$bgnBit,$catBitLen);
$bitValue = strrev($bitValue);
if($DEBUG) echo "<br>bitValue = $bitValue";
}
//explode by '[v]'
$valueArr = explode('[v]',$tlvArr[2]);
$typeAddTitleArr = explode('[t]',$valueArr[0]);
$operType = chop($typeAddTitleArr[0]);
$titleStr = chop($typeAddTitleArr[1]);
$valueArr[1] = chop($valueArr[1]);
if($DEBUG) echo "<br>operType = $operType";
switch($operType){
case 'input'://
//explode by '-'
$defArr = explode('-',$valueArr[1]);
if($DEBUG) echo "<br>defArr = $defArr[0],$defArr[1],$defArr[2]";
switch($defArr[0]){
case 'toDec':
if(strlen($bitValue) > 0){
$inputValue = BinDec($bitValue);
}else{
$inputValue = HexDec($byteValue);
}
break;
case 'keepDec':
$inputValue = $byteValue;
break;
case 'toHex':
echo "<br>Error:toHex";
break;
case 'keepHex':
$inputValue = $byteValue;
break;
case 'toAsc':
if($bgnBit > 0 ||$endBit < 7){
echo "<br>toAsc Error:bgnBit > 0 ||endBit < 7";
exit(1);
}else{
$tmpLen=strlen($byteValue);
for($charCount=0;$charCount<$tmpLen;$charCount++){
$unitByte = substr($byteValue,$charCount,2);
$unitChar = chr(HexDec($unitByte)); // hex -> ascii
if($DEBUG) echo "<br>unitChar=$unitChar";
$charValue .= $unitChar;
$charCount++;
}
$inputValue = $charValue;
}
break;
case 'keepAsc':
$inputValue = $byteValue;
break;
default:
echo "<br>Error:valueType=$defArr[0]";
break;
}
if($DEBUG) echo "<br>inputValue = $inputValue";
switch($defArr[1]){
case 'high':
switch($defArr[2]){
case '0':
if($defArr[0] == 'toHex' || $defArr[0] == 'keepHex'){
//$inputValue = str_replace('0','',$inputValue);
}else{
$inputValue = $inputValue - 0;
}
break;
case 'E':
echo "Error:high fill E";
break;
default: break;
}
break;
case 'low':
switch($defArr[2]){
case '0':
//$inputValue = str_replace('00','',$inputValue);
break;
case 'E':
//$inputValue = str_replace('E','',$inputValue);
break;
default: break;
}
break;
default: break;
}
if($valueType == $nOctStr){
if($DEBUG) echo "<br>$valueType =$nOctStr= OctStr";
if($defArr[0] == 'toHex' || $defArr[0] == 'keepHex'){
$inputLen = $byteLen *2;
}else{
$inputLen = $byteLen *3;
}
echo "<input type=\"text\" size=\"$inputLen\" maxLength =\"$inputLen\" name=\"$unitName\" value=\"$inputValue\">";
}elseif($valueType == $nAscStr){
if($DEBUG) echo "<br>$valueType == AscStr";
//if($defArr[0] == 'keepAsc'){
$inputLen = $byteLen;
//}
echo "<input type=\"text\" size=\"$inputLen\" maxLength =\"$inputLen\" name=\"$unitName\" value=\"$inputValue\">";
}else{
if($DEBUG) echo "<br>$valueType == Integer";
echo "<input type=\"text\" size=\"8\" name=\"$unitName\" value=\"$inputValue\" onchange=\"checkInt(this)\">";
echo "<input type=\"hidden\" name=\"$unitName"."_min\" value=\"$minValue\">";
echo "<input type=\"hidden\" name=\"$unitName"."_max\" value=\"$maxValue\">";
echo "<input type=\"hidden\" name=\"$unitName"."_old\" value=\"$inputValue\">";
}
break;
case 'select':
if($bitValue != ''){
$selectValue = BinDec($bitValue);
}else{
$selectValue = HexDec($byteValue);
}
if($DEBUG) echo "<br>bitValue = $bitValue";
if($DEBUG) echo "<br>selectValue = $selectValue";
echo "<select size=\"1\" name=\"$unitName\">";
$isSelected = 0;
for($j=1;$j<sizeof($valueArr);$j++){
//explode by '[opt]'
$defArr = explode('[opt]',$valueArr[$j]);
if(sizeof($defArr) < 2){
echo "<option value=\"$selectValue\" selected>Reserved Value</option>";
break;
}elseif($defArr[0] == $selectValue){
echo "<option value=\"$defArr[0]\" selected>$defArr[1]</option>";
$isSelected = 1;
}else{
echo "<option value=\"$defArr[0]\">$defArr[1]</option>";
}
}
if($isSelected ==0 && $j == sizeof($valueArr)){
echo "<option value=\"$selectValue\" selected>Undefined Value</option>";
}
echo "</select>";
break;
default: echo "<br>Error:operType =|$operType|";
break;
}//end of switch(..)
//like:unitDef_1 = 1.0-2.0-select-keepHex-high-0 -->$tlvArr[1]-$operType-
if($operType == 'select'){ //select
if($valueType == $nOctStr){
$tempDef = $tlvArr[1].'-'.$operType.'-'.'toDec-high-0';
}else{
$tempDef = $tlvArr[1].'-'.$operType.'-'.'keepDec-high-0';
}
}else{
$tempDef = $tlvArr[1].'-'.$operType.'-'.$valueArr[1];
}
$tempDef = str_replace(" ", "", $tempDef);
$tempDef = chop($tempDef);
echo "\n <input type=\"hidden\" name=\"unitDef_$i\" value=\"$tempDef\">";
echo "</td></tr>";
}//end of for(..)
echo "</table>";
$remark=nl2br($remark);
echo "<br><b>Remarks:</b><br>$remark<br>";
$unitNum = $i-1;
echo "\n<input type=\"hidden\" name=\"unitNum\" value=\"$unitNum\">";
echo "\n<input type=\"hidden\" name=\"inputName\" value=\"$inputName\">";
echo "\n<input type=\"hidden\" name=\"keyId\" value=\"$keyId\">";
echo "\n<input type=\"hidden\" name=\"sysTypeNo\" value=\"$sysTypeNo\">";
echo "\n<input type=\"hidden\" name=\"dataTypeNo\" value=\"$dataTypeNo\">";
echo "\n<input type=\"hidden\" name=\"setValue\" value=\"$setValue\">";
echo "\n<input type=\"hidden\" name=\"TEST\" value=\"$TEST\">";
echo "\n<input type=\"submit\" name=\"set\" value = \"Set\">";
echo "\n<input type=\"reset\" name=\"Reset\" value =\"Reset\">";
echo "</Form>";
//=======================Test input field========================
if($TEST){
echo "<Form method=\"POST\" name=\"testForm\" action=\"$PHP_SELF\">";
echo "<hr>";
//--><--// $setValue = strrev($setValue);
echo "<u><b>Test Area</b></u><br>";
echo "Test Value:&nbsp;&nbsp;&nbsp;<input type=\"text\" name=\"setValue\" value=\"$setValue\">";
echo "<input type=\"submit\" name=\"setTest\" value=\"set..\">";
echo "\n<input type=\"hidden\" name=\"sysTypeNo\" value=\"$sysTypeNo\">";
echo "\n<input type=\"hidden\" name=\"dataTypeNo\" value=\"$dataTypeNo\">";
echo "\n<input type=\"hidden\" name=\"keyId\" value=\"$keyId\">";
echo "\n<input type=\"hidden\" name=\"inputName\" value=\"$inputName\">";
echo "\n<input type=\"hidden\" name=\"TEST\" value=\"$TEST\">";
echo "</Form>";
}
?>
</body>
</html>
+567
View File
@@ -0,0 +1,567 @@
<?php
/*********************************************************
程序说明:(和paramEditPreview.php保持一致)
功能说明:本程序实现参数编辑模板代码的产生,保存,预览
调用关系:调用: connectdb.inc,inc/header.inc
被调用:
变量说明:
返回值:无
作者:
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$DEBUG = 0;
$TEST = ($TEST > 0)?$TEST:0;
//value Type
$nInteger = 2;
$nAscStr = 3;
$nOctStr = 4;
function omcGetObjDb($sysTypeNo){
$dbName = 'OBJ_'.$sysTypeNo;
return($dbName);
}
function omcGetObjTbl($sysTypeNo,$tableType,$dataTypeNo){
$dbName = 'OBJ_'.$sysTypeNo;
$tableName = $dbName.'.subsParamConf_'.$dataTypeNo;
return($tableName);
}
/*
function omcStrFill($string,$defLen,$fillWay='high',$fillChar='0'){
if(strlen($string) <= $defLen){
$fillLen=$defLen - strlen($string);
for($i=0;$i<$fillLen;$i++){
if($fillWay == 'low'){
$string = $string.$fillChar;
}else{
$string = $fillChar.$string;
}
}
return($string);
}else{
echo "<br>Error in omcStrFill:the defLen < lengh of string!!";
echo "<br>defLen=$defLen and string=$string!!";
exit();
}
}
*/
$sysConfTable = 'OMC_PUB.sysConf';
$sysTypeNo = (isset($sysTypeNo)?$sysTypeNo:0);
$pubDb ='OMC_PUB';
$objDb = omcGetObjDb($sysTypeNo);
$paramConfTable = omcGetObjTbl($sysTypeNo,paramConf,$dataTypeNo);
$maxLevelNum = 10;
if($DEBUG) echo "<br>$paramConfTable<br>";
//----------------------
//选择语言版本
if($language == 'eng'){
$objNameField=name_2;
$objSetField=setTemplate_2 ; //语种2
}else{
$objNameField=name_1;
$objSetField=setTemplate_1 ; //语种1(默认语种)
}
//-----------------------
//=======================Get value From submit===================
if($set == 'Set'){
//sort by offset
for($i=1;$i<=$unitNum;$i++){
$tmpDef = ${'unitDef_'.$i};
$tmpValue = ${'unit_'.$i};
if($DEBUG) echo "<br>tmpDef = $tmpDef,unitNum=$unitNum";
$defArr[$i] = $tmpDef;
$tmpDefArr=explode('-',$tmpDef);
$sortArr[$i] = $tmpDefArr[0];
$valueArr[$i] = $tmpValue;
}
$lastValue = '';
$k = 0;
asort($sortArr);
for(reset($sortArr); $key = key($sortArr); next($sortArr)){
if($DEBUG) echo "<br>sortArr[$key] = {$sortArr[$key]}";
if($DEBUG) echo "<br>unitValue = {$valueArr[$key]}";
$unitValue = $valueArr[$key];
if($DEBUG) echo "<br>defArr[$key] = {$defArr[$key]}";
$unitDefArr = explode('-',$defArr[$key]); //例:0.0-0.7-input -toDec-high-0
if(sizeof($unitDefArr) <= 1){
if($DEBUG) echo "<br>nothing,just a name";
continue;
}
$bgnOffset = $unitDefArr[0];
$endOffset = $unitDefArr[1];
$operType = $unitDefArr[2];
$valueType = $unitDefArr[3];
$fillWay = $unitDefArr[4];
$fillChar = $unitDefArr[5];
$bgnOffsetArr = explode('.',$bgnOffset);
$bgnByte = $bgnOffsetArr[0];
$bgnBit = $bgnOffsetArr[1];
$endOffsetArr = explode('.',$endOffset);
$endByte = $endOffsetArr[0];
$endBit = $endOffsetArr[1];
$byteLen = $endByte - $bgnByte + 1;
$byteValue = '';
if($DEBUG) echo "<br>valueType = $valueType";
switch($valueType){
case 'toDec':
if($bgnBit > 0 ||$endBit < 7){
$bitLen = $byteLen*8 - $bgnBit - (7 - $endBit) ; //1 BYTE = 8 bit
$bitValue = DecBin($unitValue);
if($DEBUG) echo "<br>bitValue = $bitValue ";
$bitValue = omcStrFill($bitValue,$bitLen,$fillWay,$fillChar);
if($DEBUG) echo "<br>omcStrFill($bitValue,$bitLen,$fillWay,$fillChar)";
$bitValueArr[$k] = $bitValue;
if($DEBUG) echo "<br>bitValueArr[$k] = {$bitValueArr[$k]}";
if($endBit == 7){//发现这个单元结束,并没有跨byte,这时需要组成一个byte值
$bitValue = '';
for($bitNo=0; $bitNo<=$k; $bitNo++){
if($DEBUG) echo "<br>bitValueArr[$bitNo] = {$bitValueArr[$bitNo]}";
$bitValue = $bitValueArr[$bitNo].$bitValue;
}
$k=0;
if($DEBUG) echo "<br>bitValue = $bitValue";
$byteLen = strlen($bitValue) / 8;
if($DEBUG) echo "<br>byteLen = $byteLen";
$byteValue = BinDec($bitValue);
$byteValue = DecHex($byteValue);
$strLen = $byteLen*2;
if($DEBUG) echo "<br>omcStrFill($byteValue,$strLen,$fillWay,$fillChar)";
$byteValue = omcStrFill($byteValue,$strLen,$fillWay,$fillChar);
}else{//否则,继续组合下一个bit组
$byteValue = '';
$k++;
}
}else{
$byteValue = DecHex($unitValue);
$strLen = $byteLen*2;
$byteValue = omcStrFill($byteValue,$strLen,$fillWay,$fillChar);
if($DEBUG) echo "<br>omcStrFill($byteValue,$strLen,$fillWay,$fillChar)";
}
if($DEBUG) echo "<br>byteValue = $byteValue";
break;
case 'keepDec':
//echo "<br>Error:keepDec";
$byteValue = $unitValue - 0;
break;
case 'toHex':
echo "<br>Error:toHex";
break;
case 'keepHex':
if($bgnBit > 0 || $endBit < 7){//这里的处理不够全面,没有对=7的进行收尾
$byteValue = $unitValue;
$strLen = $byteLen;
$byteValue = omcStrFill($byteValue,$strLen,$fillWay,$fillChar);
$bitValue = DecBin(HexDec($byteValue));
$byteValue='';
$bitLen = $byteLen*8 - $bgnBit - (7 - $endBit) ; //1 BYTE = 8 bit
$bitValue = omcStrFill($bitValue,$bitLen,'high','0');
if($DEBUG) echo "<br>bitValue = $bitValue";
$bitValueArr[$k] = $bitValue;
$k++;
}else{
$k=0;
$byteValue = $unitValue;
$strLen = $byteLen*2;
$byteValue = omcStrFill($byteValue,$strLen,$fillWay,$fillChar);
if($DEBUG) echo "<br>omcStrFill($byteValue,$strLen,$fillWay,$fillChar)";
}
break;
case 'toAsc':
if($bgnBit > 0 ||$endBit < 7){
echo "<br>Error:toAsc";
exit(1);
}else{
$tmpLen=strlen($unitValue);
for($i=0;$i<$tmpLen;$i++){
$unitChar = substr($unitValue,$i,1);
$decValue = ord($unitChar); //ascii -> dec
$byteValue .= DecHex($decValue);
if(strlen($byteValue) < 2){
$byteValue = '0'.$byteValue;
}
}
$strLen = $byteLen*2;
$byteValue = omcStrFill($byteValue,$strLen,$fillWay,$fillChar);
}
break;
case 'keepAsc':
$byteValue = $unitValue;
break;
default:
echo "Error:Unknown valueType";
break;
}
if($DEBUG) echo "<br>byteValue = $byteValue ";
//--><-//$lastValue = $byteValue.$lastValue;
$lastValue = $lastValue.$byteValue;
}
if($DEBUG) echo "<br>lastValue = $lastValue ";
$setValue = $lastValue;
if($TEST != 1){
//set back to input field
echo "<script LANGUAGE=\"JavaScript\">";
echo "\n var setValue='$setValue'; ";
echo "\n window.opener.document.update.$inputName.value=setValue.toUpperCase();";
echo "\n window.opener.document.update.$inputName.style.color=\"BLUE\";";
echo "\n window.opener.document.update.$inputName.style.background = \"Yellow\";";
if($DEBUG) exit();
echo "\n window.opener.document.update.$inputName.focus();";
echo "\n window.close();";
echo "\n </script>";
}else{
if($valueType != 'keepAsc' && $valueType != 'toAsc'){
$setValue = strtoupper($setValue);
}
}
}//end of if($set == 1)
//=======================Show GUI ========================
?>
<body>
<script LANGUAGE="JavaScript">
function checkInt(term){
var checkOK = "0123456789";
var checkStr = term.value;
var allValid = true;
var termName = term.name;
var minValue = eval("document.confForm."+termName+"_min.value");
var maxValue = eval("document.confForm."+termName+"_max.value");
var oldValue = eval("document.confForm."+termName+"_old.value");
//alert(minValue+'<'+term.value+'<'+maxValue);
for (i = 0; i < checkStr.length; i++){
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++){
if (ch == checkOK.charAt(j))
break;
}
if (j == checkOK.length){
allValid = false;
break;
}
}
if (!allValid){
var errAlert="parameter Must be a dec number!";
alert(errAlert);
term.value=oldValue;
term.focus();
return (false);
}
if((minValue - term.value) > 0){
var errAlert="Too little!";
alert(errAlert);
term.value=oldValue;
term.focus();
return (false);
}
if((term.value - maxValue) > 0){
var errAlert="Too Big!";
alert(errAlert);
term.value=oldValue;
term.focus();
return (false);
}
}
</script>
<form method="POST" name="confForm" action="<?php echo"$PHP_SELF";?>" >
<?
if($DEBUG) echo "<br>setValue = $setValue ,inputName = $inputName";
if($keyId > 0){
$objSql = "SELECT $objNameField,$objSetField,valueType,length,minValue,maxValue FROM $paramConfTable WHERE keyId = '$keyId'";
$objResult = mysqli_query($pubConn ,$objSql);
$objRows = @mysqli_fetch_array($objResult);
$totalLen = $objRows[length]*2;
$objName = $objRows[$objNameField];
$setTemplate = $objRows[$objSetField];
$valueType = $objRows[valueType];
$minValue = $objRows[minValue];
$maxValue = $objRows[maxValue];
}else{
echo "<font><b>ERROR!!:keyId == NULL</b></font>";
exit();
}
/**************************************
*objName
*[unit]name[u]xx.xx-yy.yy[u]input[v]toDec-fillHigh-fillChar
*[unit]name[u]xx.xx-yy.yy[u]select[v]value1[opt]desc1[v]value2[opt]desc2
*[remark]
***************************************/
//explode by '[remark]'
$remarkArr = explode('[remark]',$setTemplate);
$remark = $remarkArr[1];
//explode by '[unit]'
$unitArr = explode('[unit]',$remarkArr[0]);
//show instance's name
echo "<b>{$unitArr[0]}</b><br>";
if($DEBUG) echo "<br>$unitArr[1]";
//show every one unit
//--><-//$setValue = strrev($setValue);
if($DEBUG){
echo "<table border=\"1\" cellpadding=\"0\" cellspacing=\"2\" width=\"100%\">";
}else{
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"2\" width=\"100%\">";
}
for($i=1;$i<sizeof($unitArr);$i++){
echo "\n <tr><td width=\"10%\" valign=middle><nobr>";
//unit input name
$unitName = "unit_".$i;
//explode by '[u]'
$tlvArr = explode('[u]',$unitArr[$i]);
if(sizeof($tlvArr) <= 1 ){
echo "<u><b>{$unitArr[$i]}</b></u>";
continue;
}
//show Unit Name
echo "$tlvArr[0]&nbsp;";
echo "</nobr></td><td>";
if($DEBUG) echo "$tlvArr[1]";
//explode by '-'
$offsetArr = explode('-',$tlvArr[1]);
$bgnOffsetArr = explode('.',$offsetArr[0]);
$bgnByte = $bgnOffsetArr[0];
$bgnBit = $bgnOffsetArr[1];
$endOffsetArr = explode('.',$offsetArr[1]);
$endByte = $endOffsetArr[0];
$endBit = $endOffsetArr[1];
$byteLen = $endByte - $bgnByte + 1;
$byteValue = substr($setValue,$bgnByte*2,$byteLen*2);
//--><-//$byteValue = strrev($byteValue);
if($DEBUG) echo "<br>byteValue = $byteValue";
$bitValue = '';
if($bgnBit > 0 ||$endBit < 7){
if($DEBUG) echo "<br>$bgnBit > 0 ||$endBit < 7";
$bitValue = HexDec($byteValue);
$bitValue = DecBin($bitValue);
if($DEBUG) echo "<br>bitValue = $bitValue";
$bitLen = $byteLen*8;//1 byte = 8 bit
$bitValue = omcStrFill($bitValue,$bitLen,'high','0');
if($DEBUG) echo "<br>omcStrFill($bitValue,$bitLen,'high','0')";
$bitValue = strrev($bitValue);
$catBitLen = $endByte*8+$endBit - ($bgnByte*8+$bgnBit) + 1; //1 byte = 8 bit
if($DEBUG) echo "<br>bitValue = substr($bitValue,$bgnBit,$catBitLen)";
$bitValue = substr($bitValue,$bgnBit,$catBitLen);
$bitValue = strrev($bitValue);
if($DEBUG) echo "<br>bitValue = $bitValue";
}
//explode by '[v]'
$valueArr = explode('[v]',$tlvArr[2]);
$typeAddTitleArr = explode('[t]',$valueArr[0]);
$operType = chop($typeAddTitleArr[0]);
$titleStr = chop($typeAddTitleArr[1]);
$valueArr[1] = chop($valueArr[1]);
if($DEBUG) echo "<br>operType = $operType";
switch($operType){
case 'input'://
//explode by '-'
$defArr = explode('-',$valueArr[1]);
if($DEBUG) echo "<br>defArr = $defArr[0],$defArr[1],$defArr[2]";
switch($defArr[0]){
case 'toDec':
if(strlen($bitValue) > 0){
$inputValue = BinDec($bitValue);
}else{
$inputValue = HexDec($byteValue);
}
break;
case 'keepDec':
$inputValue = $byteValue;
break;
case 'toHex':
echo "<br>Error:toHex";
break;
case 'keepHex':
$inputValue = $byteValue;
break;
case 'toAsc':
if($bgnBit > 0 ||$endBit < 7){
echo "<br>toAsc Error:bgnBit > 0 ||endBit < 7";
exit(1);
}else{
$tmpLen=strlen($byteValue);
for($charCount=0;$charCount<$tmpLen;$charCount++){
$unitByte = substr($byteValue,$charCount,2);
$unitChar = chr(HexDec($unitByte)); // hex -> ascii
if($DEBUG) echo "<br>unitChar=$unitChar";
$charValue .= $unitChar;
$charCount++;
}
$inputValue = $charValue;
}
break;
case 'keepAsc':
$inputValue = $byteValue;
break;
default:
echo "<br>Error:valueType=$defArr[0]";
break;
}
if($DEBUG) echo "<br>inputValue = $inputValue";
switch($defArr[1]){
case 'high':
switch($defArr[2]){
case '0':
if($defArr[0] == 'toHex' || $defArr[0] == 'keepHex'){
//$inputValue = str_replace('0','',$inputValue);
}else{
$inputValue = $inputValue - 0;
}
break;
case 'E':
echo "Error:high fill E";
break;
default: break;
}
break;
case 'low':
switch($defArr[2]){
case '0':
$inputValue = str_replace('00','',$inputValue);
break;
case 'E':
$inputValue = str_replace('E','',$inputValue);
break;
default: break;
}
break;
default: break;
}
if($valueType == $nOctStr){
if($DEBUG) echo "<br>$valueType =$nOctStr= OctStr";
if($defArr[0] == 'toHex' || $defArr[0] == 'keepHex'){
$inputLen = $byteLen *2;
}else{
$inputLen = $byteLen *3;
}
echo "<input type=\"text\" size=\"$inputLen\" maxLength =\"$inputLen\" name=\"$unitName\" value=\"$inputValue\">";
}elseif($valueType == $nAscStr){
if($DEBUG) echo "<br>$valueType == AscStr";
//if($defArr[0] == 'keepAsc'){
$inputLen = $byteLen;
//}
echo "<input type=\"text\" size=\"$inputLen\" maxLength =\"$inputLen\" name=\"$unitName\" value=\"$inputValue\">";
}else{
if($DEBUG) echo "<br>$valueType == Integer";
echo "<input type=\"text\" size=\"8\" name=\"$unitName\" value=\"$inputValue\" onchange=\"checkInt(this)\">";
echo "<input type=\"hidden\" name=\"$unitName"."_min\" value=\"$minValue\">";
echo "<input type=\"hidden\" name=\"$unitName"."_max\" value=\"$maxValue\">";
echo "<input type=\"hidden\" name=\"$unitName"."_old\" value=\"$inputValue\">";
}
break;
case 'select':
if($bitValue != ''){
$selectValue = BinDec($bitValue);
}else{
$selectValue = HexDec($byteValue);
}
if($DEBUG) echo "<br>bitValue = $bitValue";
if($DEBUG) echo "<br>selectValue = $selectValue";
echo "<select size=\"1\" name=\"$unitName\">";
$isSelected = 0;
for($j=1;$j<sizeof($valueArr);$j++){
//explode by '[opt]'
$defArr = explode('[opt]',$valueArr[$j]);
if(sizeof($defArr) < 2){
echo "<option value=\"$selectValue\" selected>Reserved Value</option>";
break;
}elseif($defArr[0] == $selectValue){
echo "<option value=\"$defArr[0]\" selected>$defArr[1]</option>";
$isSelected = 1;
}else{
echo "<option value=\"$defArr[0]\">$defArr[1]</option>";
}
}
if($isSelected ==0 && $j == sizeof($valueArr)){
echo "<option value=\"$selectValue\" selected>Undefined Value</option>";
}
echo "</select>";
break;
default: echo "<br>Error:operType =|$operType|";
break;
}//end of switch(..)
//like:unitDef_1 = 1.0-2.0-select-keepHex-high-0 -->$tlvArr[1]-$operType-
if($operType == 'select'){ //select
if($valueType == $nOctStr){
$tempDef = $tlvArr[1].'-'.$operType.'-'.'toDec-high-0';
}else{
$tempDef = $tlvArr[1].'-'.$operType.'-'.'keepDec-high-0';
}
}else{
$tempDef = $tlvArr[1].'-'.$operType.'-'.$valueArr[1];
}
$tempDef = str_replace(" ", "", $tempDef);
$tempDef = chop($tempDef);
echo "\n <input type=\"hidden\" name=\"unitDef_$i\" value=\"$tempDef\">";
echo "</td></tr>";
}//end of for(..)
echo "</table>";
$remark=nl2br($remark);
echo "<br><b>Remarks:</b><br>$remark<br>";
$unitNum = $i-1;
echo "\n<input type=\"hidden\" name=\"unitNum\" value=\"$unitNum\">";
echo "\n<input type=\"hidden\" name=\"inputName\" value=\"$inputName\">";
echo "\n<input type=\"hidden\" name=\"keyId\" value=\"$keyId\">";
echo "\n<input type=\"hidden\" name=\"sysTypeNo\" value=\"$sysTypeNo\">";
echo "\n<input type=\"hidden\" name=\"dataTypeNo\" value=\"$dataTypeNo\">";
echo "\n<input type=\"hidden\" name=\"setValue\" value=\"$setValue\">";
echo "\n<input type=\"hidden\" name=\"TEST\" value=\"$TEST\">";
echo "\n<input type=\"submit\" name=\"set\" value = \"Set\">";
echo "\n<input type=\"reset\" name=\"Reset\" value =\"Reset\">";
echo "</Form>";
//=======================Test input field========================
if($TEST){
echo "<Form method=\"POST\" name=\"testForm\" action=\"$PHP_SELF\">";
echo "<hr>";
//--><--// $setValue = strrev($setValue);
echo "<u><b>Test Area</b></u><br>";
echo "Test Value:&nbsp;&nbsp;&nbsp;<input type=\"text\" name=\"setValue\" value=\"$setValue\">";
echo "<input type=\"submit\" name=\"setTest\" value=\"set..\">";
echo "\n<input type=\"hidden\" name=\"sysTypeNo\" value=\"$sysTypeNo\">";
echo "\n<input type=\"hidden\" name=\"dataTypeNo\" value=\"$dataTypeNo\">";
echo "\n<input type=\"hidden\" name=\"keyId\" value=\"$keyId\">";
echo "\n<input type=\"hidden\" name=\"inputName\" value=\"$inputName\">";
echo "\n<input type=\"hidden\" name=\"TEST\" value=\"$TEST\">";
echo "</Form>";
}
?>
</body>
</html>
+101
View File
@@ -0,0 +1,101 @@
<?php
function subsCommSend($sysId,$dataTypeNo,$indexValueList,$fieldNameList,$commType,$newIndexValue=0){
//global $pubDb,$commTable;
$DEBUG = 0;
$pubDb = 'OMC_PUB';
$commTable = 'subscriberComm';
$ipTable = 'sysInfo';
global $pubConn;
$nReadComm = 1;
$nChangeComm = 2;
$nCreateComm = 3;
$nDeleteComm = 4;
$nLoadIndexComm = 5;
$nReplaceIndexComm=6;
$sysIdArr = explode('_',$sysId);
$sysTypeNo = $sysIdArr[0];
$sysNo = $sysIdArr[1];
$subSysNo = $sysIdArr[2];
//step 1: delete overtime and imcompetent command
$overTime = date("Y-m-d H:i:s", mktime(date("H"),date("i")-1,date("s"),date("m"),date("d"),date("Y")));
$delSql = "DELETE FROM $commTable WHERE (commState ='0' OR commState ='3') AND sendTime < '$overTime'";
if($DEBUG) echo"<br>delete command sql = $delSql";
mysqli_query($pubConn,$delSql);
echo mysqli_error($pubConn);
$overTime = date("Y-m-d H:i:s", mktime(date("H"),date("i")-30,date("s"),date("m"),date("d"),date("Y")));
$delSql = "DELETE FROM $commTable WHERE sendTime < '$overTime'";
if($DEBUG) echo"<br>delete command sql = $delSql";
mysqli_query($pubConn,$delSql);
echo mysqli_error($pubConn);
/*
//step 2: check the system's ip
$chkIpSql = "SELECT ip FROM $ipTable
WHERE sysTypeNo='$sysTypeNo' AND sysNo='$sysNo' AND subSysNo='$subSysNo'
";
if($DEBUG) echo"<br>chkIpSql = $chkIpSql";
$chkIpResult = mysqli_query($pubConn,$chkIpSql);
echo mysqli_error($pubConn);
$rowsNum = @mysqli_num_rows($chkIpResult);
if($rowsNum > 0){
echo "<script language=\"javascript\"> ";
echo "alert('Can not find this system's ip address in system infp list,\n Please add it first!'); ";
echo "</script>";
return(-1);
}
*/
//step 3: check the command(����ͬʱ����ϵͳ���ͣ��������ͱ�ţ������������ͬ�IJ���)
$chkSql = "SELECT commId FROM $commTable
WHERE sysTypeNo='$sysTypeNo' AND indexValueList='$indexValueList'
";
if($DEBUG) echo"<br>check command sql = $chkSql";
$chkResult = mysqli_query($pubConn,$chkSql);
echo mysqli_error($pubConn);
$rowsNum = @mysqli_num_rows($chkResult);
if($rowsNum <= 0){
//step 4:insert commands into command table
if($commType == $nReplaceIndexComm){
$sendSql="INSERT INTO $commTable
(commType,dataTypeNo,sysTypeNo,sysNo,subSysNo,indexValueList, fieldNameList,paramType,commState,sendTime,remark)
VALUES
('$commType','$dataTypeNo','$sysTypeNo','$sysNo','$subSysNo','$indexValueList',
'$fieldNameList','0','1',CURRENT_TIMESTAMP,'$newIndexValue')
";
}else{
$sendSql="INSERT INTO $commTable
(commType,dataTypeNo,sysTypeNo,sysNo,subSysNo,indexValueList,fieldNameList,paramType,commState,sendTime)
VALUES
('$commType','$dataTypeNo','$sysTypeNo','$sysNo','$subSysNo','$indexValueList',
'$fieldNameList','0','1',CURRENT_TIMESTAMP)
";
}
if($DEBUG)echo"<br>send command sql = $sendSql";
$sendResult=mysqli_query($pubConn,$sendSql);
echo mysqli_error($pubConn);
}
//step 5:Return commIdStr
$selSql = "SELECT commId FROM $commTable
WHERE sysTypeNo='$sysTypeNo' AND sysNo='$sysNo' AND subSysNo='$subSysNo'
AND indexValueList='$indexValueList'
";
if($DEBUG)
echo"<br>get command id sql = $selSql";
$selResult=mysqli_query($pubConn,$selSql);
echo mysqli_error($pubConn);
$commIdStr='';
while($selRows = mysqli_fetch_array($selResult)){
$commIdStr .= $selRows[commId].'-';
}
if($DEBUG)echo "<br>commIdStr = $commIdStr";
if($DEBUG) exit();
return($commIdStr);
}//end of function sendComm()
?>
+609
View File
@@ -0,0 +1,609 @@
<?php
/*********************************************************
程序说明:
功能说明:将用户数据表的数据导入到临时参数表。
调用关系:调用: header.inc,lib.inc
被调用:params_adm_down_left.php
变量说明:
输入变量:
$keyValue :由用户列表传来
$sysId :由用户列表传来或本页面指定
$language:语言种类
返回值:无
作者:
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
?>
<base target="_self">
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
echo "<br>";
$DEBUG = 0;
global $pubConn;
if($DEBUG) echo "<br>正在调试中,给您的工作带来不便,请原谅!!:)";
//==========================================================
//变量定义
//==========================================================
$pubDb = 'OMC_PUB';
$sysSubsConfTable ='OMC_PUB.sysSubsConf';
$systemConfTable = 'OMC_PUB.sysConf';
$nReadComm = 1;
$nChangeComm = 2;
$nCreateComm = 3;
$nDeleteComm = 4;
$nLoadIndexComm = 5;
$nReplaceIndexComm = 6;
$maxLevelNum = 10;
$nInteger = 2;
$nAscStr = 3;
$nHexStr = 4;
$dataTypeNo = $_REQUEST['dataTypeNo'];
//------------选择语言版本----------
if($language == 'eng'){
$objNameField = 'name_2';
$objDescField = 'desc_2';
$objNoteField = 'note_2';
}else{
$objNameField = 'name_1';
$objDescField = 'desc_1';
$objNoteField = 'note_1';
}
//==========================================================
//输入变量
//==========================================================
$canSetNum = $_REQUEST['canSetNum'];
$keyValue=$_REQUEST['keyValue'];
$canSetNum = isset($canSetNum)?$canSetNum:'all';
$sysId=$_REQUEST['sysId'];
$dataTypeNo = $_REQUEST['dataTypeNo'];
$isLoadIndex=$_REQUEST['isLoadIndex'];
$isTryCreate=$_REQUEST['isTryCreate'];
$isBatchCreate = $_REQUEST['isBatchCreate'];
$isBatchDelete = $_REQUEST['isBatchDelete'];
$Delstartkey = $_REQUEST['Delstartkey'];
$batchDelNum = $_REQUEST['batchDelNum'];
$batchDelete = $_REQUEST['batchDelete'];
$batchNum=$_REQUEST['batchNum'];
$isCreate=$_REQUEST['isCreate'];
$isDelete=$_REQUEST['isDelete'];
$isChange=$_REQUEST['isChange'];
$isRead=$_REQUEST['isRead'];
$sysIdArr=explode('_',$sysId);
$sysTypeNo=$sysIdArr[0];
$sysNo=$sysIdArr[1];
$objConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], 'OBJ_'.$sysTypeNo);
//显示用户数据编辑页面,需要的变量
if($DEBUG) echo "<br>sysId=$sysId";
if($DEBUG) echo "<br>canSetNum=$canSetNum";
if($DEBUG) echo "<br>keyValue=$keyValue";
if($DEBUG) echo "<br>sysTypeNo=$sysTypeNo";
if($DEBUG) echo "<br>sysNo=$sysNo";
if($DEBUG) echo "<br>subSysNo=$subSysNo";
if($DEBUG) echo "<br>dataTypeNo=$dataTypeNo";
//例如:
//$canSetNum =1; // 或= 'all'
//$sysId='330_0_0';
//$keyValue= '0460022157127016';
$isRead=$_REQUEST['isRead'];
$isChange=$_REQUEST['isChange'];
$isCreate=$_REQUEST['isCreate'];
$isDelete=$_REQUEST['isDelete'];
$isTryCreate=$_REQUEST['isTryCreate'];
$isLoadIndex=$_REQUEST['isLoadIndex'];
//操作类型变量
if($DEBUG) echo "<br>isRead=$isRead";
if($DEBUG) echo "<br>isChange=$isChange";
if($DEBUG) echo "<br>isCreate=$isCreate";
if($DEBUG) echo "<br>isDelete=$isDelete";
if($DEBUG) echo "<br>isLoadIndex=$isLoadIndex";
$bgnNo=$_REQUEST['bgnNo'];
$endNo=$_REQUEST['endNo'];
if (!isset($keyValue)) $keyValue=$_POST['keyValue'];
//保存用户数据修改的数据
if($DEBUG) echo "<br>bgnNo=$bgnNo";
if($DEBUG) echo "<br>endNo=$endNo";
//显示每个需要保存的字段
for($i=$bgnNo;$i<$endNo;$i++){
${'checkBox_'.$i} = $_POST['checkBox_'.$i];
${'fieldName_'.$i} = $_POST['fieldName_'.$i];
${'editValue_'.$i} = $_POST['editValue_'.$i];
if($DEBUG) echo "<br>checkBox_$i = ${'checkBox_'.$i}";
if($DEBUG) echo "<br>fieldName_$i = ${'fieldName_'.$i}";
if($DEBUG) echo "<br>editValue_$i = ${'editValue_'.$i}";
if($isCreate > 0){
if($tmpFieldName == $indexFieldName){
$indexValueList = $editValue;
if($DEBUG) echo "<br> indexValueList($indexValueList) be change to $editValue";
}
}
}
//if($DEBUG && $endNo > 1) exit();
//==========================================================
//数据处理
//==========================================================
$fieldNameList = "ALL";
require("./sendComm.inc");
require("./dataProc.inc");
//==========================================================
//输出并显示数据
//==========================================================
?>
<?php
//**********************************编辑参数时所用javascript*****************************************
?>
<script LANGUAGE="JavaScript">
function changevalue(term)
{
term.style.color = "BLUE";
//term.value = term.value.toUpperCase();
/*
if(term.value.length != term.maxlength){
var LengthErrorWarning = "<?php echo $strLengthOfTheInputValueIsError; ?>";
var CorrectItWarning = "<?php echo $strPleaseCorrectIt; ?>";
alert(LengthErrorWarning + CorrectItWarning + "[= " + term.maxlength + "]");
term.focus();
return (false);
}
*/
var checkOK = "-0123456789ABCDEF";
var checkStr = term.value;
var allValid = true;
for (i = 0; i < checkStr.length; i++){
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++){
if (ch == checkOK.charAt(j))
break;
}
if (j == checkOK.length){
//allValid = false;
break;
}
}
if (!allValid){
var ParaHex="<?php echo $strParaMustBeAHexNumber; ?>";
var Capital="<?php echo $strCapitalCharacter; ?>";
alert(ParaHex+","+"("+Capital+")!");
term.focus();
return (false);
}
}
function selectToSet(thisCheckBox)
{
if(thisCheckBox.checked == true)
{
thisCheckBox.value=1;
document.update.setNum.value++;
if(document.update.setNum.value > (document.update.canSetNum.value - 0)){
alert("You can not change too much parameter["+document.update.setNum.value+" > "+document.update.canSetNum.value+"] in one times,please try it next time!");
thisCheckBox.checked = false;
document.update.setNum.value--;
return;
}
}else{
thisCheckBox.value=0;
document.update.setNum.value--;
}
}
function selectAllToSet(thisCheckBox)
{
var p;
var bgnNo=document.update.bgnNo.value;
var endNo=document.update.endNo.value;
var tmpCheckBox;
if(thisCheckBox.checked == true)
{
for(p=bgnNo; p < endNo; p++){
tmpCheckBox=eval("document.update.checkBox_"+p);
tmpCheckBox.checked = true;
tmpCheckBox.value=1;
}
}else{
for(p=bgnNo; p < endNo; p++){
tmpCheckBox=eval("document.update.checkBox_"+p);
tmpCheckBox.checked = false;
tmpCheckBox.value=0;
}
}
}
function checkSubmit()
{
var p;
var bgnNo=document.update.bgnNo.value;
var endNo=document.update.endNo.value;
var tmpCheckBox;
var selectedNum = 0;
var chgFlag = document.update.isChange.value;
var crtFlag = document.update.isCreate.value;
if(chgFlag == 0 && crtFlag == 0){
return (true);
}
for(p=bgnNo; p < endNo; p++){
tmpCheckBox=eval("document.update.checkBox_"+p);
if(tmpCheckBox.checked == true){
if(checkOneInput(p) == true){
selectedNum++;
}else{
return (false);
}
}
}
if(document.update.isRead.value != 1){
if(selectedNum > 0){
return (true);
}else{
alert("Please select the check box for edit parametr!");
return (false);
}
}
}
function openSet(sysTypeNo,objKeyId,inputName,dataTypeNo)
{
var inputValue,checkBoxValue;
//checkBoxValue = eval("document.update."+checkBoxName+".checked");
//if(checkBoxValue == false){
// alert("Please select the check box first!");
// return;
//}
inputValue = eval("document.update."+inputName+".value");
URL = "./paramEdit.php?sysTypeNo="+sysTypeNo;
URL += "&keyId="+objKeyId+"&setValue="+inputValue
URL += "&inputName="+inputName+"&dataTypeNo="+dataTypeNo;
var msgWindow = open(URL, 'newWin', 'toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,status=yes,width=400,height=350');
msgWindow.focus();
}
function checkOneInput(p)
{
var valueType,nInt=2,nAsc=3,nHex=4;
var i,j;
var checkOK = "-0123456789ABCDEF";
var editValue,readValue;
var allValid = true;
var LengthErrorWarning="<?php echo "$strLengthOfTheInputValueIsError"; ?>";
var CorrectItWarning="<?php echo "$strPleaseCorrectIt"; ?>";
var ValueCannotEmpty="value cannot be empty!";
var ValueLengthError="value length error!";
editInput = eval("document.update.editValue_"+p);
editValue = eval("document.update.editValue_"+p+".value.toUpperCase()");
valueType = eval("document.update.valueType_"+p+".value");
editFlag = eval("document.update.checkBox_"+p+".checked");
maxLen = eval("document.update.maxLen_"+p+".value");
if((editValue.length < 1) && (editFlag == true)){
editInput.style.background = "RED";
alert(ValueCannotEmpty);
return (false);
}
switch(valueType){
case nInt:
<?php //检测输入值是否为0-f的16进制字符?>
for (i = 0; i < editValue.length; i++){
ch = editValue.charAt(i);
for (j = 0; j < checkOK.length; j++){
if (ch == checkOK.charAt(j))
break;
}
if (j == checkOK.length){
allValid = false;
break;
}
}
break;
case nAsc:
break;
case nHex:
<?php //检测输入值是否超长或超短?>
if( editFlag == true && (editValue.length < maxLen || editValue.length > maxLen)){
document.update.editInput.style.color = "RED";
alert(ValueLengthError);
return (false);
}
<?php //检测输入值是否为0-f的16进制字符?>
for (i = 0; i < editValue.length; i++){
ch = editValue.charAt(i);
for (j = 0; j < checkOK.length; j++){
if (ch == checkOK.charAt(j))
break;
}
if (j == checkOK.length){
allValid = false;
break;
}
}
break;
default:
break;
}
//当输入值有非法字符
if (!allValid){
var ParaHex="Input value error!";
alert(ParaHex);
return (false);
}
editInput.style.background = "Yellow";
return (true);
}
function askSureToDel(keyName,keyId)
{
var answer = confirm("Are you sure to delete this subscriber( "+keyName+"="
+ keyId + ") from <?php echo"$sysTypeName";?> server?");
if (answer == true){
window.location.href = "<?php echo "$PHP_SELF?sysId=$sysId&dataTypeNo=$dataTypeNo&bufferNo=$bufferNo&keyValue=$keyValue&isDelete=1";?>";
//alert('Try to send delete command');
}else{
return(false);
}
}
function askSureToReplace(keyName,keyId)
{
var answer = confirm("Are you sure to replace this subscriber's Index( "+keyName+"="
+ keyId + ")?");
if (answer == true){
window.location.href = "<?php echo "$PHP_SELF?sysId=$sysId&dataTypeNo=$dataTypeNo&bufferNo=$bufferNo&keyValue=$keyValue&isReplaceIndex=1";?>";
}else{
return(false);
}
}
</script>
<form method="POST" name="update" action="<?php echo"$PHP_SELF";?>" onSubmit="return checkSubmit() ">
<?php
//显示用户参数编辑页面
?>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><nobr>
<?php echo "Server ID "?>
<select name="sysId" size="1">
<?php
$selSysIdSql="SELECT sysNo,subSysNo,sysTypeName
FROM sysInfo,sysConf
WHERE sysInfo.sysTypeNo='$sysTypeNo' AND sysConf.sysTypeNo='$sysTypeNo'
ORDER BY baseStat DESC,updateTime DESC
";
if($DEBUG) echo "<br>11.$selSysIdSql";
$sysIdResult=mysqli_query($pubConn,$selSysIdSql);
echo mysqli_error($pubConn);
while($sysIdRows=mysqli_fetch_array($sysIdResult)){
echo "<option value=\"$sysTypeNo"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]\"";
if(($sysNo == $sysIdRows[sysNo]) && ($subSysNo == $sysIdRows[subSysNo]))
echo " selected";
echo " >$sysIdRows[sysTypeName]"."_$sysIdRows[sysNo]"."_$sysIdRows[subSysNo]";
echo "</option>";
}
?>
</select>
</nobr>
</td>
<td><nobr>
<?php
if($sysTypeNo == '360' ||$sysTypeNo == '395'|| $sysTypeNo == '350' || $sysTypeNo == '375'){ //pps or smsc
$keyValueName = 'MSISDN';
if($sysTypeNo == '360')
{
if($dataTypeNo == 0)
{
$keyValueName = "MSISDN";
}
elseif($dataTypeNo == 1)
{
$keyValueName = "Card No.";
}
}
if($sysTypeNo == '390')
{
if($dataTypeNo == 0)
{
$keyValueName = "MSISDN";
}
elseif($dataTypeNo == 1)
{
$keyValueName = "Card No.";
}
}
}
else if($sysTypeNo == '365')
{
$keyValueName = 'SUPI';
}
else
{//hlr or auc or sn
$keyValueName = 'IMSI';
}
if(substr($keyValue,0,1) == 0 && strlen($keyValue) > 15){
$showkeyValue= substr($keyValue,1,15);
}else{
$showkeyValue= $keyValue;
}
echo "&nbsp;&nbsp;$keyValueName:$showkeyValue";
?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</nobr></td>
<?php
if($isTryCreate > 0){
?>
<td >
<input type="submit" value="Create in <?php echo "$sysTypeName"?>" name="create" title="" class="button" onClick="javascript:document.update.isCreate.value=1;">
<input type="hidden" value="0" name="isCreate">
<input type="hidden" value="0" name="isChange">
</td>
<td>
&nbsp;&nbsp;&nbsp;
<input type="submit" value="Create in OMC" name="create" title="" class="button" onClick="javascript:document.update.isCreate.value=2;">
</td>
<?php
}else{
?>
<td>
<input type="submit" value="Get" name="read" title="" class="button" onClick="javascript:document.update.isRead.value=1;">
<input type="hidden" value="0" name="isRead">
</td>
<?php
if($sysTypeNo!='325')
{
?>
<td>
<input type="submit" value="Set" name="change" title="" class="button" onClick="javascript:document.update.isChange.value=1;">
<input type="hidden" value="0" name="isChange">
<input type="hidden" value="0" name="isCreate">
</td>
<td>
<input type="button" value="Delete" name="delete" title="Delete this subscriber" class="button" onClick="askSureToDel(<?php echo"'$keyValueName','$keyValue'";?>)">
<input type="hidden" value="0" name="isDelete">
</td>
<td>
<input type="button" value="Replace index value" name="replace" title="Replace this subscriber's Index Value" class="button" onClick="askSureToReplace(<?php echo"'$keyValueName','$keyValue'";?>)">
<input type="hidden" value="0" name="isReplaceIndex">
</td>
<?php
}
}
?>
<td width="100%">&nbsp;</td>
</tr>
</table>
<br>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
<tr bgcolor="#E6E6E6">
<td width="5%" align="center" >No.</td>
<td width="50%"><?php echo"Parameter"; ?></td>
<td width="5%" >
<?php
if($canSetNum == 'all'){
echo "<input type=\"checkbox\" name=\"seleceAll\" title=\"Select all to set\" value=\"1\" onClick=selectAllToSet(this)>";
}else{
echo "&nbsp;";
}
?>
</td>
<td width="20%" title="">Value</td>
</tr>
<?php
//************************顺序显示该页每条参数************************
//在参数定义表取出说明和在临时参数表取出相关的值
$paramSql = " SELECT * FROM $confTable
WHERE $confTable.operType > '0'
ORDER BY level_1,level_2,level_3,level_4,level_5,level_6,level_7,level_8,level_9,level_10
";
if($DEBUG) echo"<br>objDb =$objDb <br> ParamSql = $paramSql <br> ";
$paramResult = mysqli_query($objConn,$paramSql);
echo mysqli_error($objConn);
$i=0;
while($paramRows = @mysqli_fetch_array($paramResult)){
$editName='editValue_'.$i;
$checkBoxName='checkBox_'.$i;
$fieldNameName = 'fieldName_'.$i;
$valueTypeName='valueType_'.$i;
$maxLen=$paramRows[length]*2;
$maxLenName='maxLen_'.$i;
if($paramRows[length] > 4){
$inputSize = $paramRows[length] * 2;
}else{
$inputSize = 8;
}
$fieldName =$paramRows[fieldName];
echo "\n <tr>";
echo "<td width=\"5%\"> $i</td> ";
echo "<td width=\"50%\" title=\"$paramRows[$objDescField]\">$paramRows[$objNameField]</td>";
echo "<td width=\"5%\">";
echo "<input type=\"checkbox\" name=\"$checkBoxName\" value=\"0\" onClick=selectToSet(this)>";
echo "</td> ";
echo "<td width=\"40%\">";
if($inputSize > 32){
$rows=ceil($inputSize / 32) + 1;
$cols=32;
echo "<textarea rows=\"$rows\" cols=\"$cols\" name=\"$editName\" size=\"$inputSize\" onchange = changevalue(this)>$tmpRow[$fieldName]</textarea>";
}else{
echo "<input type=\"text\" name=\"$editName\" maxlength=\"$maxLen\" size=\"$inputSize\" value=\"$tmpRow[$fieldName]\" onchange = changevalue(this)>";
}
echo "<a href=javascript:onClick=openSet('$sysTypeNo','$paramRows[keyId]','$editName','$dataTypeNo')>set..</a>";
echo "<input type=\"hidden\" name=\"$fieldNameName\" value=\"$paramRows[fieldName]\">";
echo "<input type=\"hidden\" name=\"$valueTypeName\" value=\"$paramRows[valueType]\">";
echo "<input type=\"hidden\" name=\"$maxLenName\" value=\"$paramRows[length]\">";
echo "</td>";
echo "</tr>";
$i++;
}
$bgnNo = 0;
$endNo = $i;
?>
</table>
<?php
//*****************************************隐藏输入框,用于传递值****************************************
echo "\n<input type=\"hidden\" name=\"keyFieldName\" value=\"$indexFieldName\">";
echo "\n<input type=\"hidden\" name=\"keyValue\" value=\"$keyValue\">";
echo "\n<input type=\"hidden\" name=\"canSetNum\" value=\"$canSetNum\">";
echo "\n<input type=\"hidden\" name=\"setNum\" >";
echo "\n<input type=\"hidden\" name=\"bgnNo\" value=\"$bgnNo\">";
echo "\n<input type=\"hidden\" name=\"endNo\" value=\"$endNo\">";
echo "\n<input type=\"hidden\" name=\"dataTypeNo\" value=\"$dataTypeNo\">";
?>
</form>
&nbsp;
<?php
adjust_content_tail("down");
?>
</body>
</html>
<?php
flush();
?>
+505
View File
@@ -0,0 +1,505 @@
<?php
/*********************************************************
程序说明:
功能说明:列表显示账号信息,默认显示第一页用户资料
调用关系:调用: header.inc
被调用:
变量说明:
作者:
修改注释:
NO.1
姓名:Cui Ticun
时间:2004-8-29
修改说明:Support OMC8.0,Modify the PPS subscriber field********************************************/
require("../../inc/header.inc");
?>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
echo "<br>";
//if($DEBUG) echo "<br>正在调试中!!";
//==========================================================
//变量定义
//==========================================================
$dbName = 'OMC_PUB';
$sysSubsConfTable = 'OMC_PUB.sysSubsConf';
$systemConfTable = 'OMC_PUB.sysConf';
$numberPerPage = 100; //每页纪录数
$nReadComm = 1;
$nChangeComm = 2;
$nCreateComm = 3;
$nDeleteComm = 4;
$nLoadIndexComm = 5;
//确定告警内容显示语言种类
if($selectedLanguage=='chn'){
$alarmDesc = alarmDesc_1;
}elseif($selectedLanguage=='eng'){
$alarmDesc = alarmDesc_2;
}
//==========================================================
//输入变量
//==========================================================
//列表所需基本变量
//fj
$DEBUG=0;
if($DEBUG) echo "<br>sysTypeNo=$sysTypeNo";
if($DEBUG) echo "<br>dataTypeNo=$dataTypeNo";
$dataTypeNo = $_REQUEST['dataTypeNo'];
if (strstr($userName, "student"))
{
$commType = $_REQUEST['commType'];
$keyValue = $_REQUEST['keyValue'];
}
if ($_REQUEST['sysTypeNo'])
{
$sysTypeNo = $_REQUEST['sysTypeNo'];
}
if ($_REQUEST['sysId'])
{
$sysId = $_REQUEST['sysId'];
if($DEBUG) echo "<br>sysId=$sysId";
$sysIdArr=explode('_',$sysId);
$sysTypeNo=$sysIdArr[0];
$sysNo=$sysIdArr[1];
// echo "sysTypeNo=$sysTypeNo,sysNo=$sysNo";
}
$bgnNo = $_REQUEST['bgnNo'];
//删除用户
if($DEBUG) echo "<br>commType =$commType";
//根据sysTypeNo,dataTypeNo获取数据表名,索引字段名
if($sysTypeNo==390 || $sysTypeNo==365 || $sysTypeNo==366){
if(!isset($sysNo)){
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 "<br>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 "<br>tableName=$tableName";
if($DEBUG) echo "<br>keyFieldName=$keyFieldName";
//排序所依赖的字段名
if(!isset($orderByField)){
$orderByField = $keyFieldName;
}
if($DEBUG) echo "<br>orderByField=$orderByField";
//排序字符串
$orderByStr = " $orderByField";
if($DEBUG) echo "<br>orderByStr=$orderByStr";
//==========================================================
//数据处理
//==========================================================
//删除命令,且该命令被执行
if($commType == $nDeleteComm ){
$delSql="Delete FROM $tableName WHERE $keyFieldName='$keyValue'";
if($DEBUG) echo "<br>delSql=$delSql";
$result=mysqli_query($pubConn,$delSql);
echo mysqli_error($pubConn);
if($result){
echo "<br>Delete $keyValue OK!";
}
}
switch($sysTypeNo){
case '375':
if(!isset($sysId)){
$sysId='375_0_0';
}
$sysTypeName='OPPS';
$canSetNum='all';
$selectFieldList = "msisdn,imsi,imei,oprFlag,class,userType";
$showNameList="MSISDN,IMSI,IMEI,User Status,Class,User Type";
break;
case '378':
if(!isset($sysId)){
$sysId='378_0_0';
}
$sysTypeName='iPALIM';
$canSetNum='all';
$selectFieldList = 'imsi,msisdn,msisdn_extern,tmsi,lai,type';
$showNameList='IMSI,MSISDN Public,MSISDN Private,TMSI,MCC-MNC-LAC-CI,Type';
break;
case '330':
if(!isset($sysId)){
$sysId='330_0_0';
}
$sysTypeName='HLR';
$canSetNum='all';
$selectFieldList = "imsi,inter_msisdn,used_flag,nam,camel_flag";
$showNameList="IMSI,MSISDN,usedFlag,NetworkAccessMode,CamelFlag";
break;
case '361':
if(!isset($sysId)){
$sysId='361_0_0';
}
$sysTypeName='MME';
$canSetNum='all';
$selectFieldList = "imsi,msisdn,mm_state,ecm_state,tai";
$showNameList="IMSI,MSISDN,MMState,ECMState,TAI";
break;
case '362':
if(!isset($sysId)){
$sysId='362_0_0';
}
$sysTypeName='SPGW';
$canSetNum='all';
$selectFieldList = "imsi,s11_local_teid,s11_remote_teid,ue_ps_state,ue_ims_state,ps_ip,ims_ip,granted_bytes,used_bytes,ccr_update_threshold";
$showNameList="IMSI,s11LocalTEID,s11RemoteTEID,uePSState,ueIMSState,psIP,imsIP,grantedBytes,used_bytes,ccrUpdateThreshold";
break;
case '363':
if(!isset($sysId)){
$sysId='363_0_0';
}
$sysTypeName='IMS';
$canSetNum='all';
$selectFieldList="msisdn,impu,barring,reg_state";
$showNameList="MSISDN,IMPU,Barring,regState";
break;
case '364':
if(!isset($sysId)){
$sysId='364_0_0';
}
$sysTypeName='RCS';
$canSetNum='all';
$selectFieldList = "imsi,tmsi,ptmsi,context_id,hnb_index,active_time";
$showNameList="IMSI,TMSI,P-TMSI,CONTEXT-ID,HNB-Index,ACTIVE-Time";
break;
case '365':
if(!isset($sysId)){
$sysId='365_0_0';
}
$sysTypeName='UDM';
$canSetNum='all';
//$selectFieldList = "supi,gpsis,internal_group_ids,subscribed_ue_ambr_temp,subscribed_snssais_temp,ue_usage_type";
//$showNameList="SUPI,GPSIS,INTERNAL-GROUP-IDS,SUBSCRIBED-UE-AMBR-TEMP,SUBSCRIBED-SNSSAIS-TEMP,UE-USAGE-TYPE";
$selectFieldList = "supi,gpsis,internal_group_ids,subscribed_ue_ambr_temp,subscribed_snssais_temp,ue_usage_type,rat_restriction,forbidden_areas_templ,service_area_restriction_templ,core_network_type_restriction,rfsp_index,periodic_registration_timer,mps_priority,mcs_priority,odb_packet_services,mico_mode,active_time,download_packet_count,subscribed_slice_selection_data_temp,subscribed_smf_selection_data_temp,subscribed_data,purge_flag,pei,ims_vops,guami,pdu_session_ids,single_nssais_str,dnns";
$showNameList="SUPI,GPSIS,INTERNAL-GROUP-IDS,SUBSCRIBED-UE-AMBR-TEMP,SUBSCRIBED-SNSSAIS-TEMP,UE-USAGE-TYPE,RAT-RESTRICTION,FORBIDDEN-AREAS-TEMPL,SERVICE-AREA-ERSTRICTION-TEMPL,CORE-NETWORK-TYPE-RESTRICTION,RFSP-INDEX,PERIODIC-REGISTRATION-TIMER,MPS-PRIORITY,MCS-PRIORITY,ODB-PACKET-SERVICES,MICO-MODE,ACTIVE-TIME,DOWNLOADED-PACKET-COUNT,SUBSCRIBED-SLIC-SELECTION-DATA-TEMP,SUBCRIBED-SMF-SELECTION-DATA-TEMP,SUBCRIBED-DATA,PURGE-FLAG,PEI,IMS-VOPS,GUAMI,PDU-SESSION-IDS,SINGLE-NSAIS-STR,DNNS";
break;
case '325':
if(!isset($sysId)){
$sysId='325_0_0';
}
$sysTypeName='VLR';
$canSetNum='all';
$selectFieldList = "IMSI,MSISDN,TMSI,LMSI";
$showNameList = "IMSI,MSISDN,TMSI,LMSI";
break;
case '360':
if($dataTypeNo == 0){
$sysTypeName='PPS';
$canSetNum='all';
$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";
// $selectFieldList = "msisdn,overdraft,status,balance,expiration_date,first_used_date,user_type";
// $showNameList= "MSISDN,Overdraft,Status,Balance,Expiration Date,First used Date,User Type";
}else{
$sysTypeName='Prepaid Card';
$canSetNum='all';
$selectFieldList ="card_no,card_hrn,face_value,card_status,expiry_date,valid_time,updated_date";
$showNameList="Card No,Card_hrn,Face Value,Status,Expiry Date,Valid Time,Updated Date";
}
if(!isset($sysId)){
$sysId='360_0_0';
}
break;
case '395':
$sysTypeName='Recharge Card';
$canSetNum='all';
$selectFieldList ="card_no,card_hrn,face_value,card_status,expiry_date,valid_time,updated_date";
$showNameList="Card No,Card_hrn,Face Value,Status,Expiry Date,Valid Time,Updated Date";
if(!isset($sysId)){
$sysId='395_0_0';
}
break;
case '340':
if(!isset($sysId)){
$sysId='340_0_0';
}
$sysTypeName='AUC';
$canSetNum='all';
$selectFieldList = "key_imsi,a3a8_version,status";
$showNameList = "IMSI,A3A8 version,status";
break;
case '380':
if(!isset($sysId)){
$sysId='380_0_0';
}
$sysTypeName='EIR';
$canSetNum='all';
$selectFieldList = "imei,status";
$showNameList= "IMEI,Status";
break;
case '390':
if(!isset($sysId)){
$sysId='390_0_0';
}
$sysTypeName='VMS';
$canSetNum='all';
$selectFieldList = "msisdn,mailboxID,status,promo_language,greeting,optionFlag,pwdValue,acbTimeOut";
$showNameList= "MSISDN,Mailbox No(Hex),Status,Language,Greeting,Option flag,Password,Acb timeout";
break;
case '253':
if(!isset($sysId)){
$sysId='253_0_0';
}
$sysTypeName='SN-HLR';
$canSetNum='all';
$selectFieldList = "imsi,msisdn,used_flag,lac";
$showNameList= "imsi,msisdn,used_flag,lac";
break;
case '370':
if(!isset($sysId)){
$sysId='370_0_0';
}
$sysTypeName='MNP';
$canSetNum='all';
$selectFieldList = "msisdn,routing_number,status,donor,recipient,Date";
$showNameList = "MSISDN,RN,status,Donor,Recipient,Date";
break;
break;
default:
echo "Uknown sysTypeNo: $sysTypeNo";
exit(1);
}
$showFieldArr=explode(',',$selectFieldList);
$showNameArr=explode(',',$showNameList);
//根据上部页面传来的变量,生成查询条件
$selKeyFieldName = $_REQUEST['selKeyFieldName'];
$selKeyValue = $_REQUEST['selKeyValue'];
if(strlen($selKeyFieldName) > 0 && strlen($selKeyValue) > 0){
$whereStr = "WHERE $selKeyFieldName like '%$selKeyValue%'";
}
//查询基本条件
if(strlen($whereStr) > 10){
$bascWhereStr ="";
}else{
$bascWhereStr ="";
}
$numberOfRecords = $_REQUEST['numberOfRecords'];
//首次查询,查出符合条件的纪录条数,并在以后的页面跳转中传递。
if(!$numberOfRecords){
$bgnNo=0;
$countSql="SELECT count(*) as totalNum
FROM $tableName
$whereStr
$bascWhereStr
";
if($DEBUG) echo "<br>countSql=$countSql";
$result=mysqli_query($pubConn,$countSql);
echo mysqli_error($pubConn);
$record = @mysqli_fetch_array($result);
$numberOfRecords = $record[0];
if($DEBUG) echo "<br>numberOfRecords=$numberOfRecords";
if($numberOfRecords > 0){
//插入日志
insertLog("search $sysTypeName subscriber: $selKeyValue ");
}else{
//插入日志
insertLog("search $sysTypeName subscriber: $selKeyValue not found");
echo "<br>No Found";
exit();
}
}
//找到需要显示的纪录
if($numberOfRecords > 0){
$showSql=" SELECT $selectFieldList
FROM $tableName
$whereStr
$bascWhereStr
ORDER BY $orderByStr
LIMIT $bgnNo, $numberPerPage
";
if($DEBUG) echo "<br>showSql=$showSql";
$result=@mysqli_query($pubConn,$showSql);
echo mysqli_error($pubConn);
$rows=@mysqli_fetch_array($result);
//下面是控制分页显示需要传递的变量传递变量
if ($numberOfRecords >= 1) {
$nextBgnNo = $bgnNo + $numberPerPage; //本页的结束数目
if ($nextBgnNo > $numberOfRecords){
$nextBgnNo = $numberOfRecords;
}
$t1 = $bgnNo + 1;
$prevBgnNo = $bgnNo - $numberPerPage;
if ($prevBgnNo < 0) {
$prevBgnNo = 0;
}
$basePageLink ="sysTypeNo=$sysTypeNo&sysId=$sysId&dataTypeNo=$dataTypeNo&numberOfRecords=$numberOfRecords";
$basePageLink .="&selKeyFieldName=$selKeyFieldName&selKeyValue=$selKeyValue";
$prePageLink ="bgnNo=$prevBgnNo";
$nextPageLink ="bgnNo=$nextBgnNo";
}
$showBgnNo=$bgnNo+1;
}
//==========================================================
//输出并显示数据
//==========================================================
?>
<script LANGUAGE="JavaScript">
function gotoPage(){
var pageUrl,bgnNo,numberPerPage;
pageNo=document.selectform.pageNo.value;
numberPerPage='<?php echo "$numberPerPage";?>';
bgnNo=numberPerPage*(pageNo-1);
baseUrl='<?php echo "$PHP_SELF?$basePageLink";?>';
pageUrl="&bgnNo="+bgnNo;
window.location.href=baseUrl+pageUrl;
}
</script>
<form name="selectform">
<TABLE border="0" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
<TR >
<TD >
<?php
echo "$strDisplayRecords<FONT color=#0000ff>&nbsp;$showBgnNo - $nextBgnNo</FONT>, ";
echo "($strTotal:$numberOfRecords)";
?>
<TD>&nbsp;
<?php /*
// NEW: Display a link for the previous set of records.
if ($bgnNo != 0) {
echo "<a href=\"$PHP_SELF?$basePageLink&$prePageLink\">";
echo "<IMG alt=$strPreviousPage border=0 src=../../images/prePage.gif ></a>&nbsp;&nbsp;&nbsp;";
}else{
echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
}
// NEW: Display a link for the next set of records.
if ($nextBgnNo != $numberOfRecords && $numberOfRecords >0) {
echo "<a href=\"$PHP_SELF?$basePageLink&$nextPageLink\">";
echo "<IMG alt=$strNextPage border=0 src=../../images/nextPage.gif ></a>&nbsp;";
}else{
echo "&nbsp;&nbsp;&nbsp;&nbsp;";
}
//根据纪录条数,算出页码数,本页页码
if($numberOfRecords > 0){
$totalPageNum = ceil($numberOfRecords / $numberPerPage );
$pageNo = $bgnNo / $numberPerPage + 1;
}*/
?>
</TD>
<TD align="right">
<?php
// NEW: Display a link for the previous set of records.
if ($bgnNo != 0) {
echo "<a href=\"$PHP_SELF?$basePageLink&$prePageLink\">";
echo "$strPrevious&nbsp;<IMG alt=$strPreviousPage align=absBottom border=0 src=../../images/left.gif ></a>&nbsp";
}else{
echo "<font color=\"#808080\">$strPrevious&nbsp;</font><IMG alt=$strPreviousPage align=absBottom border=0 src=../../images/left_1.gif ></a>&nbsp";
}
//根据纪录条数,算出页码数,本页页码
if($numberOfRecords > 0){
$totalPageNum = ceil($numberOfRecords / $numberPerPage );
$pageNo = $bgnNo / $numberPerPage + 1;
}
echo "<SELECT size=\"1\" name=\"pageNo\" onChange=\"javasript:gotoPage()\">";
for($i=1;$i<=$totalPageNum;$i++){
if($i== $pageNo){
echo "<option selected value=\"$i\" >$i</option>";
}else{
echo "<option value=\"$i\">$i</option>";
}
}
echo "</SELECT>";
// NEW: Display a link for the next set of records.
if ($nextBgnNo != $numberOfRecords && $numberOfRecords >0) {
echo "<a href=\"$PHP_SELF?$basePageLink&$nextPageLink\">";
echo "<IMG alt=$strNextPage align=absBottom border=0 src=../../images/right.gif >&nbsp;$strNext</a>";
}else{
echo "<IMG alt=$strNextPage align=absBottom border=0 src=../../images/right.gif ><font color=\"#808080\">&nbsp;$strNext</font>";
}
?>
</TD>
</TR>
</TABLE>
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
<tr bgcolor="#E6E6E6">
<?php
for($i=0;$i<sizeof($showFieldArr);$i++){
echo "<td align=\"center\">";
echo "<a href=\"$PHP_SELF?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&orderByField=$showFieldArr[$i]&selKeyFieldName=$selKeyFieldName&selKeyValue=$selKeyValue\">";
echo "$showNameArr[$i]</a>";
echo "</td>";
}
?>
</tr>
<?php
do{
echo "<tr>";
for($i=0;$i<sizeof($showFieldArr);$i++){
echo "<td align=\"center\">";
if ($i == "0"){
echo "<a href=\"./subscriberConf.php?sysId=$sysId&dataTypeNo=$dataTypeNo&sysNo=$sysNo&keyValue={$rows[$keyFieldName]}&canSetNum=$canSetNum&isRead=1\">&nbsp;$rows[$i]</a>";
}else{
echo "&nbsp;$rows[$i]";
}
echo "</td>";
}
/* echo "<td align=\"center\">";
echo "<a href=\"./subscriberConf.php?sysId=$sysId&dataTypeNo=$dataTypeNo&keyValue=$rows[$keyFieldName]&canSetNum=$canSetNum&isRead=1\">edit</a>";
echo "</td>";*/
echo "</tr>";
}while($rows=mysqli_fetch_array($result));
?>
</table>
</form>
&nbsp;
<?php
adjust_content_tail("down");
?>
</body>
</html>
+23
View File
@@ -0,0 +1,23 @@
<?php
require("../../inc/header.inc");
$sysTypeNo = $_REQUEST['sysTypeNo'];
$dataTypeNo = $_REQUEST['dataTypeNo'];
?>
<frameset rows="75,*" framespacing="0" border="0" frameborder="0">
<?php
echo "<frame name=\"header\" scrolling=\"auto\" noresize target=\"main\" src=\"subscriberListUp.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo\" marginwidth=\"0\" marginheight=\"0\">";
echo "<frame name=\"main\" src=\"subscriberListDown.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo\" scrolling=\"auto\"target=\"_self\" marginwidth=\"0\" marginheight=\"0\">";
?>
<noframes>
<body>
<p>此网页使用了框架,但您的浏览器不支持框架。</p>
</body>
</noframes>
</frameset>
</html>
+405
View File
@@ -0,0 +1,405 @@
<?php
/*********************************************************
程序说明:
功能说明:用户信息显示上部页面
调用关系:调用: header.inc
被调用:
变量说明:
作者:
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$sysTypeNo=$_REQUEST['sysTypeNo'];
$dataTypeNo=$_REQUEST['dataTypeNo'];
//$helpId="6.4.1";
?>
<script LANGUAGE="JavaScript">
function ignoreSpaces(string) {
var temp = "";
string = '' + string;
splitstring = string.split(" ");
for(i = 0; i < splitstring.length; i++)
temp += splitstring[i];
return temp;
}
function checkSubmit(actionType,transValue){
var baseURL,URL,selSysId;
switch(actionType){
case 3: //add
<?php
echo "baseURL = \"./subscriberConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
?>
break;
case 4: //import
<?php
if($sysTypeNo==390)
echo "baseURL = \"../pubSubsImport/subscriberImportIndex.php?sysId=$sysId&dataTypeNo=$dataTypeNo&\"; \n";
else
echo "baseURL = \"../pubSubsImport/subscriberImportIndex.php?sysId=$sysTypeNo"."_99_99&dataTypeNo=$dataTypeNo&\"; \n";
?>
break;
case 5: //get all
<?php
echo "baseURL = \"./subscriberConf.php?sysTypeNo=$sysTypeNo&dataTypeNo=$dataTypeNo&\"; \n";
?>
break;
default:
alert("Unknown action!");
return(false);
}
selSysId = document.actionForm.sysId.options[document.actionForm.sysId.selectedIndex].value;
URL = baseURL+transValue+'&sysId='+selSysId;
window.parent.main.location = URL;
}
function selectSysId(sysTypeNo,dataTypeNo){
var URL,selSysId;
selSysId = document.actionForm.sysId.value;
URL = "./subscriberListDown.php?sysId="+selSysId+"&sysTypeNo="+sysTypeNo+"&dataTypeNo="+dataTypeNo;
//window.alert(URL);
window.parent.main.location = URL;
}
</script>
<base target="main">
<body topmargin=16 leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('up');" onresize="javascript:adjust_frame('up');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<form name="actionForm" method="POST" action="./subscriberListDown.php" >
<?php
adjust_head_frame("up");
adjust_title_head_frame("up");
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\" align=\"left\">";
$pagetitle="Advanced > Subscriber ";
switch($sysTypeNo){
case '375':
$pagetitle.="> OPPS";
$helpId = "2.2.1.8";
break;
case '330':
$pagetitle.="> HLR";
$helpId = "2.2.1.2";
break;
case '361':
$pagetitle.="> MME";
$helpId = "2.2.1.2"; // ??
break;
case '362':
$pagetitle.="> SPGW";
$helpId = "2.2.1.2";
break;
case '363':
$pagetitle.="> IMS";
$helpId = "2.2.1.2";
break;
case '364':
$pagetitle.="> RCS";
$helpId = "2.2.1.2";
break;
case '365':
$pagetitle.="> UDM";
$helpId = "2.2.1.2";
break;
case '366':
$pagetitle.="> AUSF";
$helpId = "2.2.1.2";
break;
case '325':
$pagetitle.="> VLR";
$helpId = "2.2.1.1";
break;
case '360':
if($dataTypeNo == 0){
$pagetitle.="> PPS";
$helpId = "2.2.1.3";
}else{
$pagetitle="Advanced > Recharge Card > Fresh Card";
$helpId = "2.2.2";
}
break;
case '395':
$pagetitle="Advanced > Recharge Card > Fresh Card";
$helpId = "2.2.2";
break;
case '340':
$pagetitle.="> AUC";
$helpId = "2.2.1.4";
break;
case '380':
$pagetitle.="> EIR";
$helpId = "2.2.1.5";
break;
case '390':
$pagetitle.="> VSS";
$helpId = "2.2.1.6";
break;
case '253':
$helpId = "2.2.1.7";
break;
case '370':
$pagetitle.="> MNP";
$helpId = "2.2.1.7";
break;
case '378':
$pagetitle.="> iPALIM";
$helpId = "2.2.1.9";
break;
default:
echo "Unknown sysTypeNo:$sysTypeNo";
exit(1);
}
echo "$pagetitle";
echo "</td>";
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "</table>";
?>
<table border="0" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
<tr>
<td>
<nobr>
<?php
switch($sysTypeNo){
case '375':
$sysTypeName='OPPS';
//echo "MSISDN";
//echo "<input type=\"hidden\" name=\"selKeyFieldName\" value=\"msisdn\">";
echo "<select size=\"1\" name=\"selKeyFieldName\" >";
echo "<option value=\"msisdn\" selected>MSISDN</option>";
echo "<option value=\"imsi\">IMSI</option>";
echo "<option value=\"imei\">IMEI</option>";
echo "</select>";
break;
case '330':
$sysTypeName='HLR';
echo "<select size=\"1\" name=\"selKeyFieldName\" >";
echo "<option value=\"inter_msisdn\" selected>MSISDN</option>";
echo "<option value=\"imsi\">IMSI</option>";
echo "</select>";
break;
case '361':
$sysTypeName='MME';
echo "<select size=\"1\" name=\"selKeyFieldName\" >";
echo "<option value=\"imsi\">IMSI</option>";
echo "</select>";
break;
case '362':
$sysTypeName='SPGW';
echo "<select size=\"1\" name=\"selKeyFieldName\" >";
echo "<option value=\"imsi\">IMSI</option>";
echo "</select>";
break;
case '363':
$sysTypeName='IMS';
echo "<select size=\"1\" name=\"selKeyFieldName\" >";
echo "<option value=\"MSISDN\">MSISDN</option>";
echo "</select>";
break;
case '364':
$sysTypeName='RCS';
echo "<select size=\"1\" name=\"selKeyFieldName\" >";
echo "<option value=\"imsi\">IMSI</option>";
echo "</select>";
break;
case '365':
$sysTypeName='UDM';
echo "<select size=\"1\" name=\"selKeyFieldName\" >";
echo "<option value=\"supi\">SUPI</option>";
echo "</select>";
break;
case '366':
$sysTypeName='AUSF';
echo "<select size=\"1\" name=\"selKeyFieldName\" >";
echo "<option value=\"imsi\">IMSI</option>";
echo "</select>";
break;
case '378':
$sysTypeName='iPALIM';
echo "IMSI";
echo "<input type=\"hidden\" name=\"selKeyFieldName\" value=\"imsi\">";
break;
case '325':
$sysTypeName='VLR';
echo "<select size=\"1\" name=\"selKeyFieldName\" >";
echo "<option value=\"MSISDN\" selected>MSISDN</option>";
echo "<option value=\"IMSI\">IMSI</option>";
echo "</select>";
break;
case '360':
$sysTypeName='PPS';
if($dataTypeNo == 0){
echo "MSISDN";
echo "<input type=\"hidden\" name=\"selKeyFieldName\" value=\"msisdn\">";
}else{
echo "Card no.";
echo "<input type=\"hidden\" name=\"selKeyFieldName\" value=\"card_no\">";
}
break;
case '395':
$sysTypeName='RCM';
echo "Card no.";
echo "<input type=\"hidden\" name=\"selKeyFieldName\" value=\"card_no\">";
break;
case '340':
$sysTypeName='AUC';
echo "IMSI";
echo "<input type=\"hidden\" name=\"selKeyFieldName\" value=\"key_imsi\">";
break;
case '380':
$sysTypeName='EIR';
echo "IMEI";
echo "<input type=\"hidden\" name=\"selKeyFieldName\" value=\"imei\">";
break;
case '390':
$sysTypeName=$strVMSOrVSS;
echo "MSISDN";
echo "<input type=\"hidden\" name=\"selKeyFieldName\" value=\"msisdn\">";
break;
case '253':
$sysTypeName='SN';
echo "<select size=\"1\" name=\"selKeyFieldName\" >";
echo "<option value=\"msisdn\" selected>MSISDN</option>";
echo "<option value=\"imsi\">IMSI</option>";
echo "</select> ";
break;
case '370':
$sysTypeName='MNP';
echo "MSISDN";
echo "<input type=\"hidden\" name=\"selKeyFieldName\" value=\"msisdn\">";
break;
default:
echo "Uknown sysTypeNo:$sysTypeNo";
exit(1);
}
?>
<input type="text" name="selKeyValue" class="text" size="20" onBlur="this.value=ignoreSpaces(this.value);" >&nbsp;&nbsp;
</nobr>
</td>
<td>
<nobr>
<div onClick="javascript:document.actionForm.submit();" style="cursor:hand">
<IMG align=absBottom border=0 src="../../images/search.gif" >&nbsp;<?php echo "$strSearch"; ?>
</div>
</nobr>
</td>
<td width="40%">
&nbsp;
</td>
<td width="10%"><nobr>
<?php
if($sysTypeNo==390){
echo "Select System:";
echo "<select name=\"sysId\" size=\"1\" onChange=\"javascript:selectSysId($sysTypeNo,$dataTypeNo)\">";
echo "<option value=\"{$sysTypeNo}_0_0\">{$sysTypeName}_0_0</option>";
echo "<option value=\"{$sysTypeNo}_1_0\">{$sysTypeName}_1_0</option>";
echo "<option value=\"{$sysTypeNo}_2_0\">{$sysTypeName}_2_0</option>";
echo "<option value=\"{$sysTypeNo}_3_0\">{$sysTypeName}_3_0</option>";
echo "<option value=\"{$sysTypeNo}_4_0\">{$sysTypeName}_4_0</option>";
echo "<option value=\"{$sysTypeNo}_5_0\">{$sysTypeName}_5_0</option>";
echo "<option value=\"{$sysTypeNo}_6_0\">{$sysTypeName}_6_0</option>";
echo "<option value=\"{$sysTypeNo}_7_0\">{$sysTypeName}_7_0</option>";
echo "<option value=\"{$sysTypeNo}_8_0\">{$sysTypeName}_8_0</option>";
echo "<option value=\"{$sysTypeNo}_9_0\">{$sysTypeName}_9_0</option>";
echo "</select>";
}
else if($sysTypeNo == 365 || $sysTypeNo == 366)
{
echo "Select System:";
echo "<select name=\"sysId\" size=\"1\" onChange=\"javascript:selectSysId($sysTypeNo,$dataTypeNo)\">";
echo "<option value=\"{$sysTypeNo}_0_0\">{$sysTypeName}_0_0</option>";
echo "<option value=\"{$sysTypeNo}_1_0\">{$sysTypeName}_1_0</option>";
echo "<option value=\"{$sysTypeNo}_2_0\">{$sysTypeName}_2_0</option>";
echo "<option value=\"{$sysTypeNo}_3_0\">{$sysTypeName}_3_0</option>";
echo "<option value=\"{$sysTypeNo}_4_0\">{$sysTypeName}_4_0</option>";
echo "<option value=\"{$sysTypeNo}_5_0\">{$sysTypeName}_5_0</option>";
echo "<option value=\"{$sysTypeNo}_6_0\">{$sysTypeName}_6_0</option>";
echo "<option value=\"{$sysTypeNo}_7_0\">{$sysTypeName}_7_0</option>";
echo "<option value=\"{$sysTypeNo}_8_0\">{$sysTypeName}_8_0</option>";
echo "<option value=\"{$sysTypeNo}_9_0\">{$sysTypeName}_9_0</option>";
echo "<option value=\"{$sysTypeNo}_10_0\">{$sysTypeName}_10_0</option>";
echo "<option value=\"{$sysTypeNo}_11_0\">{$sysTypeName}_11_0</option>";
echo "</select>";
}
else
{
echo "Select System:";
echo "<select name=\"sysId\" size=\"1\" onChange=\"javascript:selectSysId($sysTypeNo,$dataTypeNo)\">";
echo "<option value=\"{$sysTypeNo}_0_0\">{$sysTypeName}_0_0</option>";
echo "<option value=\"{$sysTypeNo}_1_0\">{$sysTypeName}_1_0</option>";
echo "</select>";
}
?>
<?php
if($sysTypeNo==390)
$strGetAll='Get';
?>
</nobr></td>
<td width="10%">
&nbsp;
</td>
<td align="right">
<div style="cursor:hand" onClick=checkSubmit(5,"isLoadIndex=1")>
<nobr>
<IMG align=absBottom border=0 src="../../images/reload.gif"><?php echo "$strGetAll" ?>
</nobr>
</div>
</td>
<?php
if ($sysTypeNo != 325){
if($dataTypeNo != 1){
echo "<td align=\"right\">";
echo "<div style=\"cursor:hand\" onClick=checkSubmit(3,\"isTryCreate=1\")><nobr>";
echo "<IMG align=absBottom border=0 src=\"../../images/add.gif\">$strAdd";
echo "&nbsp;&nbsp;</nobr></div></td>";
}
echo "<td align=\"right\">";
echo "<div style=\"cursor:hand\" onClick=checkSubmit(4,\"isTryImport=1\")><nobr>";
echo "<IMG align=absBottom border=0 src=\"../../images/import_1.gif\">$strImport";
echo "</nobr></div></td>";
}
?>
<!--
<td align="right">
<input Name="isShowStat" type="button" DISABLED value="Statistics" title="Show subscriber data's statistics">&nbsp;
<input Name="isLoadIndex" type="button" value="Reload" onClick=checkSubmit(5,"isLoadIndex=1") title="Load all subscriber's data from server" class="button">&nbsp;
<input Name="isCreate" type="button" value="Create" onClick=checkSubmit(3,"isTryCreate=1") title="Create a new subscriber" class="button">&nbsp;
<input Name="isImport" type="button" value="Import" onClick=checkSubmit(4,"isTryImport=1") title="Import subscriber file to server" class="button">
</td>
-->
</tr>
</table>
<?php
echo "<input Name=\"sysTypeNo\" type=\"hidden\" value=\"$sysTypeNo\">";
echo "<input Name=\"dataTypeNo\" type=\"hidden\" value=\"$dataTypeNo\">";
?>
</form>
<?php
adjust_title_tail_frame("up");
adjust_content_head_frame("up");
adjust_content_tail_frame("up");
?>
</body>
</html>
+577
View File
@@ -0,0 +1,577 @@
<?php
require("../../inc/header.inc");
?>
<script language="JavaScript">
function selectOrder(order_field)
{
var page_num=document.myform.page_num.value;
var newurl="./replace_down.php?order_field="+order_field+"&page_num="+page_num;
window.location.href=newurl;
}
function selectPage()
{
var page_num=document.myform.page_num.value;
var order_field=document.myform.order_field.value;
var newurl="./replace_down.php?order_field="+order_field+"&page_num="+page_num;
window.location.href=newurl;
}
function selectPrevious()
{
var page_num=document.myform.page_num.value-1;
var order_field=document.myform.order_field.value;
var newurl="./replace_down.php?order_field="+order_field+"&page_num="+page_num;
window.location.href=newurl;
}
function selectNext()
{
var page_num=document.myform.page_num.value+1;
var order_field=document.myform.order_field.value;
var newurl="./replace_down.php?order_field="+order_field+"&page_num="+page_num;
window.location.href=newurl;
}
function selectMSISDN(msisdn)
{
var page_num=document.myform.page_num.value;
var order_field=document.myform.order_field.value;
var res=confirm("Select the MSISDN="+msisdn);
if(res == false)
return;
parent.replace_up.myform.replacingMSISDN.value=msisdn;
parent.replace_up.myform.page_num.value=page_num;
parent.replace_up.myform.order_field.value=order_field;
}
</script>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('down');" onresize="javascript:adjust_frame('down');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
adjust_head_frame("down");
adjust_title_head_frame("down");
adjust_title_tail_frame("down");
adjust_content_head_frame("down");
if(!isset($page_num))
$page_num=0;
if(!isset($order_field))
$order_field="msisdn";
if(isset($replace_opt) && $replace_opt == 1)
{
if($DEBUG)
{
echo "replacedMSISDN=$replacedMSISDN<br>";
echo "replacingMSISDN=$replacingMSISDN<br>";
echo "page_num=$page_num,order_field=$order_field<br>";
}
//check the status
$check_server_systype=array(330,360,375);
$check_server_name=array("HLR","PPS","OPPS");
for($i=0;$i<sizeof($check_server_systype);$i++)
{
$sql="select * from OMC_PUB.sysInfo where sysTypeNo={$check_server_systype[$i]} and baseStat>0 ";
$res=@mysqli_query($pubConn,$sql);
if(mysqli_num_rows($res) == 0)
exit("<font color=red>{$check_server_name[$i]} is not online</font><br>");
else
{
$rows=@mysqli_fetch_array($res);
$sysNo=$rows[sysNo]+0;
$server_sysId[$i]="{$check_server_systype[$i]}_{$sysNo}_0";
//echo "server_sysId[$i]={$server_sysId[$i]}<br>";
}
}
//get HLR IMSI by replaced msisdn
$replacedMSISDN91=omc_keep_length("91".$replacedMSISDN,'E',18,0);
$replacingMSISDN91=omc_keep_length("91".$replacingMSISDN,'E',18,0);
$sql="select imsi from HLR_DB.subscriberData where inter_msisdn = '{$replacedMSISDN91}' ";
//echo "$sql<br>";
$res=@mysqli_query($pubConn,$sql);
$num=mysqli_num_rows($res);
if($num == 0)
{
echo "<font color=red>Can not find HLR subscriber by MSISDN={$replacedMSISDN}</font><br>";
exit();
}
$rows=@mysqli_fetch_array($res);
$HLR_IMSI=$rows[imsi];
$HLR_replaced_IMSI=substr($HLR_IMSI,1);
//read HLR subscriber by IMSI
printInfo("Read HLR subscriber IMSI=$HLR_IMSI, MSISDN=$replacedMSISDN","blue");
clearCommTable();
$commId=subsCommSend($server_sysId[0],0,$HLR_IMSI,"ALL",1,0);
checkComm($commId);
//read PPS subscriber by MSISDN
printInfo("Read PPS subscriber MSISDN=$replacedMSISDN","blue");
clearCommTable();
$commId=subsCommSend($server_sysId[1],0,$replacedMSISDN,"ALL",1,0);
checkComm($commId);
//save the PPS subscriber data
$sql="desc PPS_DB.user_info ";
$res=@mysqli_query($pubConn,$sql);
$pps_field_num=mysqli_num_rows($res);
if($pps_field_num <= 0)
printInfo("PPS_DB.user_info table is null<br>");
$i=0;
while($rows=@mysqli_fetch_array($res))
{
$pps_field_name[$i]=$rows[Field];
if(stristr($rows[Type],"int"))
$pps_field_type[$i]="int";
else
$pps_field_type[$i]="char";
$i++;
}
$sql="select * from PPS_DB.user_info where msisdn='{$replacedMSISDN}' ";
$res=@mysqli_query($pubConn,$sql);
$rows=@mysqli_fetch_array($res);
$i=0;
while($i<$pps_field_num)
{
if(trim($rows[$i]) == "")
$pps_field_value[$i]="";
else
$pps_field_value[$i]=$rows[$i];
$i++;
}
//read OPPS subscriber by MSISDN
printInfo("Read OPPS subscriber MSISDN=$replacedMSISDN","blue");
clearCommTable();
$commId=subsCommSend($server_sysId[2],0,$replacedMSISDN,"ALL",1,0);
checkComm($commId);
//Modify the HLR MSISDN
printInfo("Modify HLR subscriber MSISDN from $replacedMSISDN to $replacingMSISDN","blue");
$sql="update OBJ_330.tmpSubsData_0 set inter_msisdn='{$replacingMSISDN91}' where imsi='{$HLR_IMSI}' ";
$res=@mysqli_query($pubConn,$sql);
echo mysqli_error($pubConn);
//echo "$sql<br>";
clearCommTable();
$commId=subsCommSend($server_sysId[0],0,$HLR_IMSI,"inter_msisdn",2,0);
checkComm($commId);
//read the new HLR subscriber
printInfo("Read HLR subscriber IMSI=$HLR_IMSI, MSISDN=$replacingMSISDN","blue");
clearCommTable();
$commId=subsCommSend($server_sysId[0],0,$HLR_IMSI,"ALL",1,0);
checkComm($commId);
//get the replaced OPPS subscriber data
$sql="select * from OBJ_375.tmpSubsData_0 where msisdn='{$replacedMSISDN}' ";
$res=@mysqli_query($pubConn,$sql);
$num=mysqli_num_rows($res);
if($num < 1)
{
printInfo("Can not find OPPS subscriber msisdn=$replacedMSISDN","red");
exit();
}
$rows=@mysqli_fetch_array($res);
$replaced_opps_userType=$rows[userType]+0;
//modify the replaced OPPS subscriber
printInfo("Modify OPPS subscriber MSISDN=$replacedMSISDN 's User Type from OPR-1 to OPR-0","blue");
//,imsi='$HLR_replacing_IMSI'
$sql="update OBJ_375.tmpSubsData_0 set oprFlag='0',imsi=' ' where msisdn='{$replacedMSISDN}' ";
$res=@mysqli_query($pubConn,$sql);
echo mysqli_error($pubConn);
//echo "$sql<br>";
clearCommTable();
$commId=subsCommSend($server_sysId[2],0,$replacedMSISDN,"oprFlag,imsi",2,0);
checkComm($commId);
//read the replaced OPPS subscriber
printInfo("Read OPPS subscriber MSISDN=$replacedMSISDN","blue");
clearCommTable();
$commId=subsCommSend($server_sysId[2],0,$replacedMSISDN,"ALL",1,0);
checkComm($commId);
//modify the replacing OPPS subscriber
printInfo("Modify OPPS subscriber MSISDN=$replacingMSISDN 's User Type from OPR-0 to OPR-1","blue");
//
$sql="update OBJ_375.tmpSubsData_0 set oprFlag='1',imsi='$HLR_replaced_IMSI',userType='$replaced_opps_userType' where msisdn='{$replacingMSISDN}' ";
$res=@mysqli_query($pubConn,$sql);
echo mysqli_error($pubConn);
//echo "$sql<br>";
clearCommTable();
$commId=subsCommSend($server_sysId[2],0,$replacingMSISDN,"oprFlag,imsi,userType",2,0);
checkComm($commId);
//read the replacing OPPS subscriber
printInfo("Read OPPS subscriber MSISDN=$replacingMSISDN","blue");
clearCommTable();
$commId=subsCommSend($server_sysId[2],0,$replacingMSISDN,"ALL",1,0);
checkComm($commId);
//delete old PPS subscriber
printInfo("Delete PPS subscriber MSISDN=$replacedMSISDN","blue");
clearCommTable();
$commId=subsCommSend($server_sysId[1],0,$replacedMSISDN,"ALL",4,0);
checkComm($commId);
$sql="delete from OBJ_360.tmpSubsData_0 where msisdn='{$replacedMSISDN}' ";
$res=@mysqli_query($pubConn,$sql);
echo mysqli_error($pubConn);
$sql="delete from PPS_DB.user_info where msisdn='{$replacedMSISDN}' ";
$res=@mysqli_query($pubConn,$sql);
echo mysqli_error($pubConn);
//create new PPS subsriber
printInfo("Create PPS subsriber MSISDN=$replacingMSISDN","blue");
//INSERT INTO omcPubVarConf (instance, pubVarName, pubVarValue, remark) VALUES ('24', '1', '1', '1')
$sql="insert into OBJ_360.tmpSubsData_0 (";
$field_sql=" values(";
$pps_field_list="";
for($i=0;$i<$pps_field_num;$i++)
{
$sql.=$pps_field_name[$i];
if($pps_field_type[$i] == "int")
$field_sql.=$pps_field_value[$i];
else
{
if($pps_field_name[$i] == "msisdn")
$field_sql.="'".$replacingMSISDN."'";
else
$field_sql.="'".$pps_field_value[$i]."'";
}
if($i == $pps_field_num-1)
{
$field_sql.=")";
$sql.=")";
$pps_field_list.=$pps_field_name[$i];
}
else
{
$field_sql.=", ";
$sql.=", ";
$pps_field_list.=$pps_field_name[$i].",";
}
}
$sql.=$field_sql;
$update_sql.=" where msisdn='{$replacingMSISDN}' ";
$res=@mysqli_query($pubConn,$sql);
echo mysqli_error($pubConn);
//echo "<p>$sql<p>";
$sql=str_replace("OBJ_360.tmpSubsData_0","PPS_DB.user_info",$sql);
$res=@mysqli_query($pubConn,$sql);
echo mysqli_error($pubConn);
//echo "<p>$sql<br>";
//echo "<p>$pps_field_list<br>";
clearCommTable();
$commId=subsCommSend($server_sysId[1],0,$replacingMSISDN,$pps_field_list,3,0);
checkComm($commId);
clearCommTable();
$commId=subsCommSend($server_sysId[0],0,$HLR_IMSI,"ALL",1,0);
checkComm($commId);
echo "\n<script language=\"JavaScript\">\n";
echo "alert('MSISDN of the selected user has been successfully changed from $replacedMSISDN to $replacingMSISDN;User Type = Hybrid');\n";
echo "</script>\n";
}
$maxRecordPerPage=20;
if(!isset($classValue))
$classValue=0;
$classValue=$classValue-1;
//All
if($classValue == -1)
$classWhere=" ";
//Ordinary
else
$classWhere=" and class=$classValue ";
$sql="select * from OPR_DB.subscriberData where msisdn is not null $classWhere ";
$res=@mysqli_query($pubConn,$sql);
$record_total_num=mysqli_num_rows($res);
$page_num_total=ceil($record_total_num/$maxRecordPerPage);
//echo "record_total_num=$record_total_num<br>";
$select_fields=array("msisdn","oprFlag","class");
$show_fields=array("MSISDN","User Type","Class");
$oprClassLabel=array(0=>"Ordinary",1=>"Premier",2=>"VIP");
$select_fields_flip=array_flip($select_fields);
$oprFlagFiledPos=$select_fields_flip['oprFlag'];
$limit_from=$page_num*$maxRecordPerPage;
$sql="select * from OPR_DB.subscriberData where msisdn is not null $classWhere order by $order_field LIMIT $limit_from,$maxRecordPerPage ";
$res=@mysqli_query($pubConn,$sql);
$record_num=0;
$field_num=sizeof($select_fields);
while($rows=@mysqli_fetch_array($res))
{
for($i=0;$i<$field_num;$i++)
{
$records[$record_num][$i]=$rows[$select_fields[$i]];
}
$record_num++;
}
echo mysqli_error($pubConn);
if($record_num == 0)
exit("No record found!<br>");
echo "<form name=\"myform\" method=post action=\"replace_down.php\">";
echo "<table border=0 width=100%>";
echo "<tr>";
echo "<td align=left>";
if((($page_num+1)*$maxRecordPerPage) > $record_total_num)
$tmp=$record_total_num;
else
$tmp=($page_num+1)*$maxRecordPerPage;
echo "Record <font color=blue>".($page_num*$maxRecordPerPage+1)."</font> - <font color=blue>".($tmp)."</font>(Total:$record_total_num)";
echo "</td>";
echo "<td align=right>";
if($page_num > 0)
echo "<a href=# onClick=\"javascript:selectPrevious();\">";
echo "Previous<IMG alt=Previous border=0 align=absBottom src=../../images/left.gif ></a>";
if($page_num > 0)
echo "</a>";
echo "<select size=1 name=\"page_num\" onchange=\"javascript:selectPage();\">";
for($i=0;$i<$page_num_total;$i++)
{
echo "<option value=$i";
if($i == $page_num)
echo " selected ";
echo ">".($i+1)."</option>";
}
echo "</select>";
if($page_num < ($page_num_total-1))
echo "<a href=# onClick=\"javascript:selectNext();\">";
echo "<IMG alt=Next border=0 align=absBottom src=../../images/right.gif >Next</a>";
if($page_num < ($page_num_total-1))
echo "</a>";
echo "</td>";
echo "</table>";
echo "<table border=\"1\" width=\"100%\" cellpadding=\"2\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\" bgcolor=\"#FFFFFF\">";
echo "<tr bgcolor=#E6E6E6>";
for($i=0;$i<$field_num;$i++)
echo "<td align=center><a href=# onclick=\"javascript:selectOrder('{$select_fields[$i]}');\">{$show_fields[$i]}</a></td>";
echo "</tr>";
for($i=0;$i<$record_num;$i++)
{
echo "<tr>";
for($j=0;$j<$field_num;$j++)
{
if($select_fields[$j] == "msisdn")
{
echo "<td align=center>";
if($records[$i][$oprFlagFiledPos] == 0)
echo "<a href=# onclick=\"javascript:selectMSISDN('{$records[$i][$j]}');\">{$records[$i][$j]}</a>";
else
echo "<font color=#cecece>{$records[$i][$j]}</font>";
echo "</td>";
}
else if($select_fields[$j] == "oprFlag")
{
echo "<td align=center>";
if($records[$i][$j] == 0)
echo "Idle";
else
echo "In Use";
echo "</td>";
}
else if($select_fields[$j] == "class")
{
echo "<td align=center>";
$showValue=$oprClassLabel[$records[$i][$j]];
echo "$showValue";
echo "</td>";
}
else
{
echo "<td align=center>{$records[$i][$j]}</td>";
}
}
echo "</tr>";
}
echo "</table>";
echo "<input type=hidden name=\"order_field\" value=\"$order_field\">";
echo "</form>";
function checkComm($commId)
{
$sep=explode("-",$commId);
for($i=0;$i<sizeof($sep);$i++)
{
if(trim($sep[$i]) == "")
continue;
do{
$sql="select * from OMC_PUB.subscriberComm where commId={$sep[$i]} ";
$res=@mysqli_query($pubConn,$sql);
$rows=@mysqli_fetch_array($res);
$remark=$rows[remark];
}while(trim($remark) == "");
//echo "$sql<br>";
//echo "commId={$sep[$i]},remark=$remark<br>";
if(stristr($remark,"process finished"))
printInfo("...successful<br>","blue");
else
{
printInfo("...fail<br>","red");
exit();
}
}
}
function clearCommTable()
{
$sql="delete from OMC_PUB.subscriberComm ";
$res=@mysqli_query($pubConn,$sql);
echo mysqli_error($pubConn);
}
function printInfo($info,$color)
{
echo "<font color=$color>$info</font>";
}
function subsCommSend($sysId,$dataTypeNo,$indexValueList,$fieldNameList,$commType,$newIndexValue=0){
//global $pubDb,$commTable;
$DEBUG = 0;
$pubDb = 'OMC_PUB';
$commTable = 'subscriberComm';
$ipTable = 'sysInfo';
$nReadComm = 1;
$nChangeComm = 2;
$nCreateComm = 3;
$nDeleteComm = 4;
$nLoadIndexComm = 5;
$nReplaceIndexComm=6;
$sysIdArr = explode('_',$sysId);
$sysTypeNo = $sysIdArr[0];
$sysNo = $sysIdArr[1];
$subSysNo = $sysIdArr[2];
$comm="echo 'subsCommSend(<$sysId>,<$dataTypeNo>,<$indexValueList>,<$fieldNameList>,<$commType>,<0>)' >> /tmp/subCommand.txt";
system($comm);
//step 1: delete overtime and imcompetent command
$overTime = date("Y-m-d H:i:s", mktime(date("H"),date("i")-1,date("s"),date("m"),date("d"),date("Y")));
$delSql = "DELETE FROM $commTable WHERE (commState ='0' OR commState ='3') AND sendTime < '$overTime'";
if($DEBUG) echo"<br>delete command sql = $delSql";
mysqli_query($pubConn,$delSql);
echo mysqli_error($pubConn);
$overTime = date("Y-m-d H:i:s", mktime(date("H"),date("i")-30,date("s"),date("m"),date("d"),date("Y")));
$delSql = "DELETE FROM $commTable WHERE sendTime < '$overTime'";
if($DEBUG) echo"<br>delete command sql = $delSql";
mysqli_query($pubConn,$delSql);
echo mysqli_error($pubConn);
/*
//step 2: check the system's ip
$chkIpSql = "SELECT ip FROM $ipTable
WHERE sysTypeNo='$sysTypeNo' AND sysNo='$sysNo' AND subSysNo='$subSysNo'
";
if($DEBUG) echo"<br>chkIpSql = $chkIpSql";
$chkIpResult = mysqli_query($pubConn,$chkIpSql);
echo mysqli_error($pubConn);
$rowsNum = @mysqli_num_rows($chkIpResult);
if($rowsNum > 0){
echo "<script language=\"javascript\"> ";
echo "alert('Can not find this system's ip address in system infp list,\n Please add it first!'); ";
echo "</script>";
return(-1);
}
*/
//step 3: check the command(............................)
$chkSql = "SELECT commId FROM $commTable
WHERE sysTypeNo='$sysTypeNo' AND indexValueList='$indexValueList'
";
if($DEBUG) echo"<br>check command sql = $chkSql";
$chkResult = mysqli_query($pubConn,$chkSql);
echo mysqli_error($pubConn);
$rowsNum = @mysqli_num_rows($chkResult);
if($rowsNum <= 0){
//step 4:insert commands into command table
if($commType == $nReplaceIndexComm){
$sendSql="INSERT INTO $commTable
(commType,dataTypeNo,sysTypeNo,sysNo,subSysNo,indexValueList, fieldNameList,paramType,commState,sendTime,remark)
VALUES
('$commType','$dataTypeNo','$sysTypeNo','$sysNo','$subSysNo','$indexValueList',
'$fieldNameList','0','1',CURRENT_TIMESTAMP,'$newIndexValue')
";
}else{
$sendSql="INSERT INTO $commTable
(commType,dataTypeNo,sysTypeNo,sysNo,subSysNo,indexValueList,fieldNameList,paramType,commState,sendTime)
VALUES
('$commType','$dataTypeNo','$sysTypeNo','$sysNo','$subSysNo','$indexValueList',
'$fieldNameList','0','1',CURRENT_TIMESTAMP)
";
}
if($DEBUG)echo"<br>send command sql = $sendSql";
$sendResult=mysqli_query($pubConn,$sendSql);
//echo mysqli_error($pubConn);
}
//step 5:Return commIdStr
$selSql = "SELECT commId FROM $commTable
WHERE sysTypeNo='$sysTypeNo' AND sysNo='$sysNo' AND subSysNo='$subSysNo'
AND indexValueList='$indexValueList'
";
if($DEBUG)
echo"<br>get command id sql = $selSql";
$selResult=mysqli_query($pubConn,$selSql);
echo mysqli_error($pubConn);
$commIdStr='';
while($selRows = mysqli_fetch_array($selResult)){
$commIdStr .= $selRows[commId].'-';
}
if($DEBUG)echo "<br>commIdStr = $commIdStr";
if($DEBUG) exit();
return($commIdStr);
}//end of function sendComm()
adjust_content_tail("down");
?>
+6
View File
@@ -0,0 +1,6 @@
<?php
echo "<frameset rows=\"75,*\" framespacing=\"0\" border=\"0\" frameborder=\"0\">";
echo "<frame name=\"replace_up\" noresize src=\"replace_up.php\" scrolling=\"no\" target=\"replace_down\">";
echo "<frame name=\"replace_down\" src=\"replace_down.php\">";
echo "</frameset>";
?>
+98
View File
@@ -0,0 +1,98 @@
<?php
require("../../inc/header.inc");
?>
<script language="JavaScript">
function replaceMSISDN()
{
var page_num=document.myform.page_num.value;
var order_field=document.myform.order_field.value;
var replacingMSISDN=document.myform.replacingMSISDN.value;
var replacedMSISDN=document.myform.replacedMSISDN.value;
if(replacedMSISDN == "")
{
alert("Please input the replaced MSISDN");
return;
}
if(replacingMSISDN == "" || replacingMSISDN == "Selected MSISDN")
{
alert("Please select the replacing MSISDN");
return;
}
var newurl="./replace_down.php?replace_opt=1&replacingMSISDN="+replacingMSISDN+"&replacedMSISDN="+replacedMSISDN+"&order_field="+order_field+"&page_num="+page_num;
parent.replace_down.location.href=newurl;
}
function selectClass()
{
var page_num=document.myform.page_num.value;
var order_field=document.myform.order_field.value;
var iClass=document.myform.class_select.value;
var newurl="./replace_down.php?order_field="+order_field+"&page_num="+page_num+"&classValue="+iClass;
parent.replace_down.location.href=newurl;
}
</script>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('up');" onresize="javascript:adjust_frame('up');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
$canwrite_flag=checkWritePrivilege();
echo "<form method=post action=\"replace_down.php\" name=\"myform\">";
adjust_head_frame("up");
adjust_title_head_frame("up");
echo "<table id=\"table_up\" border=0 width=\"100%\">";
echo "<tr>";
echo "<td width=50% align=\"left\">";
echo "Configuration > Database > Subscriber > Replace MSISDN";
echo "</td>";
echo "<td align=\"right\">";
$helpId = "2.2.1.10";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=\"left\" colspan=2>";
echo "Replace MSISDN ";
echo "<input name=\"replacedMSISDN\" type=text class=text value=\"\">";
echo " with ";
echo "<input name=\"replacingMSISDN\" style=\"background-color:#cecece;\" type=text class=text readonly class=text value=\"Selected MSISDN\">";
echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
if($canwrite_flag)
echo "<input type=button class=button value=Replace onclick=\"javascript:replaceMSISDN();\">";
else
echo "<input type=button class=button disabled value=Replace onclick=\"javascript:replaceMSISDN();\">";
echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
$classLabel=array(0=>"All",1=>"Ordinary",2=>"Premium",3=>"VIP");
echo "Class <select size=1 name=\"class_select\" class=text onchange=\"javascript:selectClass();\">";
for($i=0;$i<sizeof($classLabel);$i++)
{
echo "<option value=$i>{$classLabel[$i]}</option>";
}
echo "</select>";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "<br>";
echo "<input type=hidden name=\"page_num\" value=0>";
echo "<input type=hidden name=\"order_field\" value=\"msisdn\">";
echo "</form>";
adjust_title_tail_frame("up");
adjust_content_head_frame("up");
adjust_content_tail_frame("up");
?>
+928
View File
@@ -0,0 +1,928 @@
<?php
require("../../inc/lib.inc");
$Debug = 0;
$language = $lan;
$tmp1 = str_replace('.','_',$oidStr);
$id = 'ID_' . $sysId . '_' . $tmp1 . '_' . $order . '_ist' . $instanceNo;
$newId = "New".$id;
$inputID = 'Input'.$id;
$saveId = 'Save'.$id;
function getLevelWhere($objIdStr)
{
$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($j == 0){
$levelWhere ="level_$levelNo='${"level_$levelNo"}'";
}else{
$levelWhere .=" AND level_$levelNo='${"level_$levelNo"}'";
}
}
return($levelWhere);
}
function omcStrFill($string,$defLen,$fillWay='high',$fillChar='0'){
if(strlen($string) <= $defLen){
$fillLen=$defLen - strlen($string);
for($i=0;$i<$fillLen;$i++){
if($fillWay == 'low'){
$string = $string.$fillChar;
}else{
$string = $fillChar.$string;
}
}
return($string);
}else{
$errorInfo = "Error in omcStrFill:the defLen < lengh of string!!\\ndefLen=$defLen and string=$string!!";
echo "<script language='javascript'>";
echo "window.alert(\"$errorInfo\");";
echo "history.go(-1)";
echo "</script>";
exit();
echo "<br>Error in omcStrFill : the defLen < lengh of string!!";
echo "<br>defLen=$defLen and string=$string!!";
exit();
}
}
function getInnerValue($sysId,$oidStr,$order,$instanceNo=0,$otherWhereStr='',$showStr,$inputValueType)
{
global $language,$Debug,$inputID;
$sysIdArr = explode('_',$sysId);
$sysTypeNo = $sysIdArr[0];
$sysNo = $sysIdArr[1];
$subSysNo = $sysIdArr[2];
$objDb = 'OBJ_'.$sysTypeNo;
$paramTable = 'param_'.$sysNo;
$sysConfTable = 'OMC_PUB.sysConf';
$pubDb ='OMC_PUB';
$paramConfTable = $objDb.".paramConf";
$maxLevelNum = 10;
$nInteger = 2;
$nOctStr = 4;
if(strlen($showStr)>0){
echo "<input id=\"$inputID\" type=\"text\" class=\"text\" value=\"\" onchange=\"$chechFnc\">";
return "";
}
if($Debug) echo "<br>$paramConfTable<br>";
//----------------------
//选择语言版本
if($language == 'eng'){
$objNameField=name_2;
$objSetField=setTemplate_2 ; //语种2
}else{
$objNameField=name_1;
$objSetField=setTemplate_1 ; //语种1(默认语种)
}
if($Debug) echo "<br>getValue = $getValue";
$objWhereStr = getLevelWhere($oidStr);
$objSql = "SELECT $objNameField,$objSetField,valueType,length,minValue,maxValue FROM $paramConfTable WHERE $objWhereStr";
$objResult = mysqli_query($pubConn ,$objSql);
$objRows = @mysqli_fetch_array($objResult);
$totalLen = $objRows[length]*2;
$objName = $objRows[$objNameField];
$setTemplate = $objRows[$objSetField];
$valueType = $objRows[valueType];
$minValue = $objRows[minValue];
$maxValue = $objRows[maxValue];
$paramSql = " SELECT initValue FROM $paramTable WHERE $objWhereStr $otherWhereStr AND instanceNo = '$instanceNo' ";
$v_Result = mysqli_query($pubConn,$paramSql);
$v_Row = mysqli_fetch_array($v_Result);
$getValue = $v_Row[0];
//explode by '[remark]'
$remarkArr = explode('[remark]',$setTemplate);
$remark = $remarkArr[1];
//explode by '[unit]'
$unitArr = explode('[unit]',$remarkArr[0]);
//explode by '[u]'
$tlvArr = explode('[u]',$unitArr[$order]);
//Unit Name
if($Debug) echo "$tlvArr[0] : $tlvArr[1]";
//explode by '-'
$offsetArr = explode('-',$tlvArr[1]);
$bgnOffsetArr = explode('.',$offsetArr[0]);
$bgnByte = $bgnOffsetArr[0];
$bgnBit = $bgnOffsetArr[1];
$endOffsetArr = explode('.',$offsetArr[1]);
$endByte = $endOffsetArr[0];
$endBit = $endOffsetArr[1];
$byteLen = $endByte - $bgnByte + 1;
$byteValue = substr($getValue,$bgnByte*2,$byteLen*2);
//--><-//$byteValue = strrev($byteValue);
if($Debug) echo "<br>byteValue = $byteValue";
$bitValue = '';
if($bgnBit > 0 ||$endBit < 7)
{
if($Debug) echo "<br>$bgnBit > 0 ||$endBit < 7";
$bitValue = HexDec($byteValue);
$bitValue = DecBin($bitValue);
if($Debug) echo "<br>bitValue = $bitValue";
$bitLen = $byteLen*8;//1 byte = 8 bit
$bitValue = omcStrFill($bitValue,$bitLen,'high','0');
if($Debug) echo "<br>omcStrFill($bitValue,$bitLen,'high','0')";
$newBitValue='';
for($byteNum=$bgnByte;$byteNum<=$endByte;$byteNum++){
$tmpBitValue=substr($bitValue,($byteNum-$bgnByte)*8,8);
if($DEBUG) echo "<br>$tmpBitValue=substr($bitValue,($byteNum-$bgnByte)*8,8)";
$tmpBitValue = strrev($tmpBitValue);
if($DEBUG) echo "<br>$tmpBitValue = strrev($tmpBitValue)";
if($DEBUG) echo "<br>bitValue = $bitValue";
$newBitValue=$newBitValue.$tmpBitValue;
}
$catBitLen = $endByte*8+$endBit - ($bgnByte*8+$bgnBit) + 1; //1 byte = 8 bit
if($Debug) echo "<br>bitValue = substr($newBitValue,$bgnBit,$catBitLen)";
$bitValue = substr($newBitValue,$bgnBit,$catBitLen);
$bitValue = strrev($bitValue);
if($Debug) echo "<br>bitValue = $bitValue";
}
//explode by '[v]'
$valueArr = explode('[v]',$tlvArr[2]);
//$operType = chop($valueArr[0]);
$typeAddTitleArr = explode('[t]',$valueArr[0]);
$operType = chop($typeAddTitleArr[0]);
$titleStr = chop($typeAddTitleArr[1]);
$valueArr[1] = chop($valueArr[1]);
if($Debug) echo "<br>operType = $operType";
switch($operType){
case 'input':
{
//explode by '-'
$defArr = explode('-',$valueArr[1]);
switch($defArr[0]){
case 'toDec':
if(strlen($bitValue) > 0){
$inputValue = BinDec($bitValue);
}else{
$inputValue = HexDec($byteValue);
}
break;
case 'keepDec':
$inputValue = $byteValue;
break;
case 'toHex':
echo "<br>Error:toHex";
break;
case 'keepHex':
$inputValue = $byteValue;
break;
case 'toAscii':
$charValue = "";
if($bgnBit > 0 ||$endBit < 7){
echo "<br>Error:toAscii";
exit(1);
}else{
$tmpLen=strlen($byteValue);
for($charCount=0;$charCount<$tmpLen;$charCount++){
$unitByte = substr($byteValue,$charCount,2);
$unitChar = chr(HexDec($unitByte)); // hex -> ascii
if($Debug) echo "<br>unitChar=$unitChar";
$charValue .= $unitChar;
$charCount++;
}
$charValue = trim($charValue);
$inputValue = $charValue;
}
break;
default:
echo "<br>Error:valueType=$defArr[0]";
break;
}
if($Debug) echo "<br>inputValue = $inputValue";
switch($defArr[1]){
case 'high':
switch($defArr[2]){
case '0':
if($defArr[0] == 'toHex' || $defArr[0] == 'keepHex'){
//$inputValue = str_replace('0','',$inputValue);
}else{
$inputValue = $inputValue - 0;
}
break;
case 'E':
echo "Error:high fill E";
break;
default: break;
}
break;
case 'low':
if ("toAscii" != $defArr[0]) {
switch($defArr[2]){
case '0':
$inputValue = str_replace('00','',$inputValue);
break;
case 'E':
$inputValue = str_replace('E','',$inputValue);
break;
case 'F': //modify zane 20051004
$inputValue = str_replace('F','',$inputValue);
break;
default: break;
}
}
break;
default: break;
}
if($Debug) echo "<br>$valueType == $nOctStr";
if($def_flag){
$inputValue = $defaultVaule;
}
//echo "valueType:$valueType<br>";
//if($valueType == $nOctStr)
//echo "getInner----inputValueType:$inputValueType<br>";
//$inputValueType=$inputValueType+0;
if($valueType==2)
{
$chechFnc = "checkInput(this,16)";
if($defArr[0] == 'toAscii')
{
$inputLen = $byteLen;
$chechFnc = "";
}
elseif($defArr[0] == 'toHex' || $defArr[0] == 'keepHex')
{
$inputLen = $byteLen *2;
}
else
{
$inputLen = $byteLen *3;
}
$inputSize = $inputLen + 2;
}
else
{
$chechFnc = "checkInput(this,10)";
}
//=============input type=====================
$inputValueType=$inputValueType+0;
//echo "getInner----inputValueType:$inputValueType<br>";
//===only can input the dec num====
if($inputValueType==1)
{
if($valueType == 4)
{
$maxValue=hexdec($maxValue);
$minValue=hexdec($minValue);
}
else
{
$maxValue=$maxValue+0;
$minValue=$minValue+0;
}
if($order>1)
$chechFnc = "checkInput(this,10)";
else
$chechFnc = "checkInput(this,10,$maxValue,$minValue)";
}
//===only can input the hex num====
else if($inputValueType==2)
{
$chechFnc = "checkInput(this,16)";
}
//====can input all character
else if($inputValueType==3)
{
$chechFnc = "";
}
//=====can put only dec num but include blank
else if($inputValueType==4)
{
$chechFnc = "checkInput_patch(this)";
}
echo "<input id=\"$inputID\" type=\"text\" class=\"text\" value=\"$inputValue\" size=\"$inputSize\" maxLength =\"$inputLen\" onchange=\"$chechFnc\">";
return $inputValue;
break;
}
case 'select':
{
if($valueType == $nOctStr){
if($bitValue != ''){
$selectValue = BinDec($bitValue);
}else{
$selectValue = HexDec($byteValue);
}
}else{
$selectValue=$byteValue;
}
if($def_flag){
$selectValue = $defaultVaule;
}
if($Debug) echo "<br>bitValue = $bitValue";
if($Debug) echo "<br>selectValue = $selectValue";
if($Debug) echo "<br>$valueType =?= $nOctStr(nOctStr)";
echo "<select id=\"$inputID\" size=\"1\">";
$isSelected = 0;
for($j=1;$j<sizeof($valueArr);$j++){
//explode by '[opt]'
$defArr = explode('[opt]',$valueArr[$j]);
if(sizeof($defArr) < 2){
echo "<option value=\"$selectValue\" selected>Reserved Value</option>";
$selectshwo = "Reserved Value";
break;
}elseif($defArr[0] == $selectValue){
echo "<option value=\"$defArr[0]\" selected>$defArr[1]</option>";
$selectshwo ="$selectValue";
$isSelected = 1;
}else{
echo "<option value=\"$defArr[0]\">$defArr[1]</option>";
}
}
if($isSelected ==0 && $j == sizeof($valueArr)){
echo "<option value=\"$selectValue\" selected>Undefined Value</option>";
$selectshwo = "Undefined Value";
}
echo "</select>";
if($readonly){
echo "$selectshwo";
}
return $selectshwo;
break;
}
default: echo "<br>Error:operType =|$operType|";
break;
}//end of switch(..)
}//end getInnerValue
function getParamValue(&$titleStr,&$IniEquRead,$sysId,$oidStr,$order,$instanceNo=0,$otherWhereStr='',$inputValueType)
{
global $language;
//$Debug=1;
$sysIdArr = explode('_',$sysId);
$sysTypeNo = $sysIdArr[0];
$sysNo = $sysIdArr[1];
$subSysNo = $sysIdArr[2];
$objDb = 'OBJ_'.$sysTypeNo;
$paramTable = 'param_'.$sysNo;
$sysConfTable = 'OMC_PUB.sysConf';
$pubDb ='OMC_PUB';
$paramConfTable = $objDb.".paramConf";
$maxLevelNum = 10;
$nInteger = 2;
$nOctStr = 4;
if($language == 'eng'){
$objNameField=name_2;
$objSetField=setTemplate_2 ; //语种2
}else{
$objNameField=name_1;
$objSetField=setTemplate_1 ; //语种1(默认语种)
}
$objWhereStr = getLevelWhere($oidStr);
$objSql = "SELECT $objNameField,$objSetField,valueType,length,minValue,maxValue FROM $paramConfTable WHERE $objWhereStr";
$objResult = mysqli_query($pubConn ,$objSql);
$objRows = @mysqli_fetch_array($objResult);
$totalLen = $objRows[length]*2;
$objName = $objRows[$objNameField];
$setTemplate = $objRows[$objSetField];
$valueType = $objRows[valueType];
$minValue = $objRows[minValue];
$maxValue = $objRows[maxValue];
//explode by '[remark]'
$remarkArr = explode('[remark]',$setTemplate);
$remark = $remarkArr[1];
//explode by '[unit]'
$unitArr = explode('[unit]',$remarkArr[0]);
//explode by '[u]'
$tlvArr = explode('[u]',$unitArr[$order]);
//Unit Name
if($Debug) echo "$tlvArr[0] : $tlvArr[1]";
//explode by '-'
$offsetArr = explode('-',$tlvArr[1]);
$bgnOffsetArr = explode('.',$offsetArr[0]);
$bgnByte = $bgnOffsetArr[0];
$bgnBit = $bgnOffsetArr[1];
$endOffsetArr = explode('.',$offsetArr[1]);
$endByte = $endOffsetArr[0];
$endBit = $endOffsetArr[1];
$byteLen = $endByte - $bgnByte + 1;
$paramSql = " SELECT initValue,readValue FROM $paramTable WHERE $objWhereStr $otherWhereStr AND instanceNo = '$instanceNo' ";
$v_Result = mysqli_query($pubConn,$paramSql);
$v_Row = mysqli_fetch_array($v_Result);
$initGetValue = $v_Row[0];
$readGetValue = $v_Row[1];
$initByteValue = substr($initGetValue,$bgnByte*2,$byteLen*2);
$readByteValue = substr($readGetValue,$bgnByte*2,$byteLen*2);
if($Debug) echo "<br>init:$initByteValue<br>read:$readByteValue";
$readBitValue = '';
if($bgnBit > 0 ||$endBit < 7)
{
$bitLen = $byteLen*8;//1 byte = 8 bit
$readBitValue = DecBin(HexDec($readByteValue));
$readBitValue = omcStrFill($readBitValue,$bitLen,'high','0');
$newBitValue='';
for($byteNum=$bgnByte;$byteNum<=$endByte;$byteNum++){
$tmpBitValue=substr($readBitValue,($byteNum-$bgnByte)*8,8);
if($DEBUG) echo "<br>$tmpBitValue=substr($readBitValue,($byteNum-$bgnByte)*8,8)";
$tmpBitValue = strrev($tmpBitValue);
if($DEBUG) echo "<br>$tmpBitValue = strrev($tmpBitValue)";
if($DEBUG) echo "<br>bitValue = $bitValue";
$newBitValue=$newBitValue.$tmpBitValue;
}
$catBitLen = $endByte*8+$endBit - ($bgnByte*8+$bgnBit) + 1; //1 byte = 8 bit
if($Debug) echo "<br>readBitValue = substr($newBitValue,$bgnBit,$catBitLen)";
$readBitValue = substr($newBitValue,$bgnBit,$catBitLen);
$readBitValue = strrev($readBitValue);
if($Debug) echo "<br>readBitValue = $readBitValue";
}
$initBitValue = '';
if($bgnBit > 0 ||$endBit < 7)
{
$bitLen = $byteLen*8;//1 byte = 8 bit
$initBitValue = DecBin(HexDec($initByteValue));
$initBitValue = omcStrFill($initBitValue,$bitLen,'high','0');
$newBitValue='';
for($byteNum=$bgnByte;$byteNum<=$endByte;$byteNum++){
$tmpBitValue=substr($initBitValue,($byteNum-$bgnByte)*8,8);
if($DEBUG) echo "<br>$tmpBitValue=substr($initBitValue,($byteNum-$bgnByte)*8,8)";
$tmpBitValue = strrev($tmpBitValue);
if($DEBUG) echo "<br>$tmpBitValue = strrev($tmpBitValue)";
if($DEBUG) echo "<br>bitValue = $bitValue";
$newBitValue=$newBitValue.$tmpBitValue;
}
$catBitLen = $endByte*8+$endBit - ($bgnByte*8+$bgnBit) + 1; //1 byte = 8 bit
if($Debug) echo "<br>initBitValue = substr($initBitValue,$bgnBit,$catBitLen)";
$initBitValue = substr($newBitValue,$bgnBit,$catBitLen);
$initBitValue = strrev($initBitValue);
if($Debug) echo "<br>initBitValue = $initBitValue";
}
$IniEquRead = false;
if(strlen($initBitValue)>0)
{
if($initBitValue==$readBitValue)
$IniEquRead = true;
}
else
{
if($initByteValue == $readByteValue)
$IniEquRead = true;
}
//explode by '[v]'
$valueArr = explode('[v]',$tlvArr[2]);
$typeAddTitleArr = explode('[t]',$valueArr[0]);
$operType = chop($typeAddTitleArr[0]);
$titleStr = chop($typeAddTitleArr[1]);
$valueArr[1] = chop($valueArr[1]);
if($Debug) echo "<br>operType = $operType";
switch($operType)
{
case 'input':
{
//explode by '-'
$defArr = explode('-',$valueArr[1]);
if($Debug) echo "<br>defArr = $defArr[0],$defArr[1],$defArr[2]";
switch($defArr[0])
{
case 'toDec':
if(strlen($initBitValue) > 0){
$initParsedValue = BinDec($initBitValue);
}else{
$initParsedValue = HexDec($initByteValue);
}
break;
case 'keepDec':
$initParsedValue = $initByteValue;
break;
case 'toHex':
echo "<br>Error:toHex";
break;
case 'keepHex':
$initParsedValue = $initByteValue;
break;
case 'toAscii':
$charValue = "";
if($bgnBit > 0 ||$endBit < 7)
{
echo "<br>Error:toAscii";
exit(1);
}
else
{
$tmpLen=strlen($initByteValue);
for($charCount=0;$charCount<$tmpLen;$charCount++)
{
$unitByte = substr($initByteValue,$charCount,2);
$unitChar = chr(HexDec($unitByte)); // hex -> ascii
if($Debug) echo "<br>unitChar=$unitChar";
$charValue .= $unitChar;
$charCount++;
}
$charValue = trim($charValue);
$initParsedValue = $charValue;
}
break;
default:
echo "<br>Error:valueType=$defArr[0]";
break;
}
if($Debug) echo "<br>initParsedValue = $initParsedValue";
switch($defArr[1])
{
case 'high':
switch($defArr[2])
{
case '0':
if($defArr[0] == 'toHex' || $defArr[0] == 'keepHex'){
//$initParsedValue = str_replace('0','',$initParsedValue);
}else{
$initParsedValue = $initParsedValue - 0;
}
break;
case 'E':
echo "Error:high fill E";
break;
default: break;
}
break;
case 'low':
if ("toAscii" != $defArr[0])
{
switch($defArr[2]){
case '0':
$initParsedValue = str_replace('00','',$initParsedValue);
break;
case 'E':
$initParsedValue = str_replace('E','',$initParsedValue);
break;
case 'F': //modify zane 20051004
$initParsedValue = str_replace('F','',$initParsedValue);
break;
default: break;
}
}
break;
default: break;
}
$returnValue = $initParsedValue;
break;
}
case 'select':
{
if($valueType == $nOctStr){
if($initBitValue != ''){
$selectValue = BinDec($initBitValue);
}else{
$selectValue = HexDec($initByteValue);
}
}else{
$selectValue=$initByteValue;
}
$isSelected = 0;
for($j=1;$j<sizeof($valueArr);$j++){
//explode by '[opt]'
$defArr = explode('[opt]',$valueArr[$j]);
if(sizeof($defArr) < 2){
$selectShow = "Reserved Value";
break;
}elseif($defArr[0] == $selectValue){
$selectShow =$defArr[1];
$isSelected = 1;
}else{
//echo "<option value=\"$defArr[0]\">$defArr[1]</option>";
}
}
if($isSelected ==0 && $j == sizeof($valueArr)){
$selectShow = "Undefined Value";
}
$returnValue = $selectShow;
break;
}
default: echo "<br>Error:operType =|$operType|";
break;
}//end of switch(..)
if(strlen($returnValue)==0) $returnValue='--';
return $returnValue;
}//end getParamValue
function setParamValue($unitValue,$sysId,$oidStr,$order,$instanceNo=0,$otherWhereStr='',$inputValueType)
{
global $language;
$Debug=0;
$sysIdArr = explode('_',$sysId);
$sysTypeNo = $sysIdArr[0];
$sysNo = $sysIdArr[1];
$subSysNo = $sysIdArr[2];
$objDb = 'OBJ_'.$sysTypeNo;
$paramTable = 'param_'.$sysNo;
$sysConfTable = 'OMC_PUB.sysConf';
$pubDb ='OMC_PUB';
$paramConfTable = $objDb.".paramConf";
$maxLevelNum = 10;
$nInteger = 2;
$nOctStr = 4;
if($Debug) echo "===================<br>unitValue:$unitValue<br>";
//----------------------
//选择语言版本
if($language == 'eng'){
$objNameField=name_2;
$objSetField=setTemplate_2 ; //语种2
}else{
$objNameField=name_1;
$objSetField=setTemplate_1 ; //语种1(默认语种)
}
$objWhereStr = getLevelWhere($oidStr);
$objSql = "SELECT $objNameField,$objSetField,valueType,length,minValue,maxValue FROM $paramConfTable WHERE $objWhereStr";
$objResult = mysqli_query($pubConn ,$objSql);
$objRows = @mysqli_fetch_array($objResult);
$totalLen = $objRows[length]*2;
$objName = $objRows[$objNameField];
$setTemplate = $objRows[$objSetField];
$valueType = $objRows[valueType];
$minValue = $objRows[minValue];
$maxValue = $objRows[maxValue];
$paramSql = " SELECT initValue FROM $paramTable WHERE $objWhereStr $otherWhereStr AND instanceNo = '$instanceNo' ";
$v_Result = mysqli_query($pubConn,$paramSql);
$v_Row = mysqli_fetch_array($v_Result);
$getValue = $v_Row[0];
if($Debug) echo "<br>getValue = $getValue";
//explode by '[remark]'
$remarkArr = explode('[remark]',$setTemplate);
$remark = $remarkArr[1];
//explode by '[unit]'
$unitArr = explode('[unit]',$remarkArr[0]);
//explode by '[u]'
$tlvArr = explode('[u]',$unitArr[$order]);
//Unit Name
if($Debug) echo "<br>$tlvArr[0] : $tlvArr[1]";
//explode by '-'
$offsetArr = explode('-',$tlvArr[1]);
$bgnOffsetArr = explode('.',$offsetArr[0]);
$bgnByte = $bgnOffsetArr[0];
$bgnBit = $bgnOffsetArr[1];
$endOffsetArr = explode('.',$offsetArr[1]);
$endByte = $endOffsetArr[0];
$endBit = $endOffsetArr[1];
$byteLen = $endByte - $bgnByte + 1;
//explode by '[v]'
$valueArr = explode('[v]',$tlvArr[2]);
//$operType = chop($valueArr[0]);
$typeAddTitleArr = explode('[t]',$valueArr[0]);
$operType = chop($typeAddTitleArr[0]);
$titleStr = chop($typeAddTitleArr[1]);
$valueArr[1] = chop($valueArr[1]);
if($Debug) echo "<br>operType = $operType";
if($operType == 'select')
{ //select
if($valueType == $nOctStr)
$changeTypeStr = 'toDec-high-0';
else
$changeTypeStr = 'keepDec-high-0';
}
else
{
$changeTypeStr = $valueArr[1];
}
$changeTypeArr = explode('-',$changeTypeStr);
$changeType = $changeTypeArr[0];
$fillWay = $changeTypeArr[1];
$fillChar = $changeTypeArr[2];
$setUnitValue = '';
if($Debug)echo "<br>changeType:$changeType";
switch($changeType)
{
case 'toDec':
if($bgnBit > 0 ||$endBit < 7)
{
$bitLen = $byteLen*8 - $bgnBit - (7 - $endBit) ; //1 BYTE = 8 bit
$bitValue = DecBin($unitValue);
if($Debug)echo "<br>bitValue = $bitValue ";
if($Debug)echo "<br>omcStrFill($bitValue,$bitLen,$fillWay,$fillChar)";
$bitValue = omcStrFill($bitValue,$bitLen,$fillWay,$fillChar);
if($bgnByte!=$endByte){
if($DEBUG) echo "<br>substr($bitValue,0,1+$endBit)";
$tmpBitValue=substr($bitValue,0,1+$endBit);
$tmpOffset=$endByte.'.0-'.$endByte.'.'.$endBit;
if($endBit==7){
$tmpByteValue=omcStrFill(dechex(bindec($tmpBitValue)),2,$fillWay,$fillChar);
$getValue = setBitValue($getValue,$tmpOffset,$tmpByteValue);
}else
$getValue = setBitValue($getValue,$tmpOffset,$tmpBitValue);
if($DEBUG)echo "<br>$getValue = setBitValue($getValue,$tmpOffset,$tmpBitValue);";
$newBitValue=$tmpBitValue;
if($DEBUG) echo "<br>newBitValue=$newBitValue";
for($byteNum=$endByte-1;$byteNum >= $bgnByte;$byteNum--){
if($DEBUG) echo "<br>substr($bitValue,($byteNum-($endByte-1))*8+1+$endBit,8)";
$tmpBitValue=substr($bitValue,($byteNum-($endByte-1))*8+1+$endBit,8);
if($byteNum == $bgnByte){
$tmpOffset=$bgnByte.'.'.$bgnBit.'-'.$bgnByte.'.7';
if($DEBUG)
echo "<br>$getValue = setBitValue($getValue,$tmpOffset,$tmpBitValue);";
if($bgnBit==0){
$tmpByteValue=omcStrFill(dechex(bindec($tmpBitValue)),2,$fillWay,$fillChar);
$getValue = setBitValue($getValue,$tmpOffset,$tmpByteValue);
}else
$getValue = setBitValue($getValue,$tmpOffset,$tmpBitValue);
}else{
$tmpOffset=$byteNum.'.0-'.$bgnByte.'.7';
$getValue = setBitValue($getValue,$tmpOffset,dechex(bindec($tmpBitValue)));
}
if($DEBUG) echo "<br>$newBitValue.$tmpBitValue";
$newBitValue=$newBitValue.$tmpBitValue;
if($DEBUG) echo "<br>newBitValue=$newBitValue";
}
$bitValue=$newBitValue;
}
$setUnitValue = $bitValue;
}
else
{
$setUnitValue = DecHex($unitValue);
$strLen = $byteLen*2;
$setUnitValue = omcStrFill($setUnitValue,$strLen,$fillWay,$fillChar);
if($Debug) echo "<br>omcStrFill($setUnitValue,$strLen,$fillWay,$fillChar)";
}
if($Debug) echo "<br>setUnitValue = $setUnitValue";
break;
case 'keepHex':
if($bgnBit > 0 ||$endBit < 7)
{
$bitLen = $endBit - $bgnBit +1;
$bitValue = ($unitValue);
if($Debug) echo "<br>bitValue = $bitValue ";
$bitValue = omcStrFill($bitValue,$bitLen,$fillWay,$fillChar);
if($Debug) echo "<br>omcStrFill($bitValue,$bitLen,$fillWay,$fillChar)";
$setUnitValue = $bitValue;
}
else
{
$setUnitValue = ($unitValue);
$strLen = $byteLen*2;
$setUnitValue = omcStrFill($setUnitValue,$strLen,$fillWay,$fillChar);
if($Debug) echo "<br>omcStrFill($setUnitValue,$strLen,$fillWay,$fillChar)";
}
if($Debug) echo "<br>setUnitValue = $setUnitValue";
break;
case 'keepDec':
//echo "<br>Error:keepDec";
$setUnitValue = $unitValue - 0;
break;
case 'toHex':
echo "<br>Error:toHex";
break;
case 'toAscii':
if($bgnBit > 0 ||$endBit < 7){
echo "<br>Error:toAscii";
exit(1);
}else{
$tmpLen=strlen($unitValue);
for($i=0;$i<$tmpLen;$i++){
$unitChar = substr($unitValue,$i,1);
$decValue = ord($unitChar); //ascii -> dec
$setUnitValue .= DecHex($decValue);
if(strlen($setUnitValue) < 2){
$setUnitValue = '0'.$setUnitValue;
}
}
$strLen = $byteLen*2;
$setUnitValue = omcStrFill($setUnitValue,$strLen,$fillWay,$fillChar);
}
break;
default:
echo "Error:Unknown valueType";
break;
}
if($Debug) echo "<br>setUnitValue = $setUnitValue ";
//--><-//$lastValue = $setUnitValue.$lastValue;
if($changeType=='toDec'&&($bgnBit > 0 ||$endBit < 7)&&$bgnByte!=$endByte)
$setValue=$getValue;
else
$setValue = setBitValue($getValue,$tlvArr[1],$setUnitValue);
$setValue = strtoupper($setValue);
$updSql = "UPDATE $paramTable SET initValue = '$setValue'
WHERE $objWhereStr $otherWhereStr AND instanceNo = '$instanceNo'";
if($DEBUG)
echo "<br>updSql=$updSql";
mysqli_query($pubConn,$updSql);
echo mysqli_error($pubConn);
}//end setParamValue
//0: flag
echo $flag;
echo "###";
if($flag=='getVar')//用户点击的是参数
{
//1: idName
echo $newId;
echo "###";
//2: innerStr
$oldValue=getInnerValue($sysId,$oidStr,$order,$instanceNo,$otherWhereStr,$showStr,$inputValueType);
if(strlen($doingOtherUlr)>0)
{
$doingOtherUlr .= "&oldValue=$oldValue";
$doingOtherUlr=urlencode($doingOtherUlr);
}
echo "&nbsp;&nbsp;<span id=\"$saveId\" style=\"cursor:pointer\" onclick=\"javascript:getPar('saveVar','$language','$sysId','$oidStr','$order','$instanceNo','$inputID','$doingOtherUlr','$otherWhereStr','$showStr','$inputValueType');\"><font color=\"blue\"><b>&nbsp;SAVE&nbsp;<b></font></span>";
}
if($flag=='saveVar')//用户点击的是右边的‘Save’
{
//1: idName
echo $id;
echo "###";
//2: innerStr
setParamValue($setValue,$sysId,$oidStr,$order,$instanceNo,$otherWhereStr,$inputValueType);
$newValue = getParamValue($titleStr,$IniEquRead,$sysId,$oidStr,$order,$instanceNo,$otherWhereStr,$inputValueType);
if(strlen($showStr))
echo $showStr;
else
echo $newValue;
echo "###";
//3: isEqual
if($IniEquRead||strlen($showStr)) //initValue == readValue
echo "1";
else
echo "0";
echo "###";
//4: doingOtherUlr
if(strlen($doingOtherUlr)>0)
{
$doingOtherUlr .= "&newValue=$newValue";
}
echo $doingOtherUlr;
}
?>
+466
View File
@@ -0,0 +1,466 @@
<?
$settedColor="blue";
$notSettedColor="#008000";
$inputBkgrdColor = "#E7FEFD";
$saveBkgrdColor="#F3F77D";
$waitingBkgrdColor = "red";
function getParamValue(&$titleStr,&$IniEquRead,$sysId,$oidStr,$order,$instanceNo=0,$otherWhereStr='')
{
global $language;
//$DEBUG=1;
$sysIdArr = explode('_',$sysId);
$sysTypeNo = $sysIdArr[0];
$sysNo = $sysIdArr[1];
$subSysNo = $sysIdArr[2];
$objDb = 'OBJ_'.$sysTypeNo;
$paramTable = 'param_'.$sysNo;
$sysConfTable = 'OMC_PUB.sysConf';
$pubDb ='OMC_PUB';
$paramConfTable = $objDb.".paramConf";
$maxLevelNum = 10;
$nInteger = 2;
$nOctStr = 4;
if($language == 'eng'){
$objNameField=name_2;
$objSetField=setTemplate_2 ; //语种2
}else{
$objNameField=name_1;
$objSetField=setTemplate_1 ; //语种1(默认语种)
}
$objWhereStr = getLevelWhere($oidStr);
$objSql = "SELECT $objNameField,$objSetField,valueType,length,minValue,maxValue FROM $paramConfTable WHERE $objWhereStr";
$objResult = mysqli_query($pubConn ,$objSql);
$objRows = @mysqli_fetch_array($objResult);
$totalLen = $objRows[length]*2;
$objName = $objRows[$objNameField];
$setTemplate = $objRows[$objSetField];
$valueType = $objRows[valueType];
$minValue = $objRows[minValue];
$maxValue = $objRows[maxValue];
//explode by '[remark]'
$remarkArr = explode('[remark]',$setTemplate);
$remark = $remarkArr[1];
//explode by '[unit]'
$unitArr = explode('[unit]',$remarkArr[0]);
//explode by '[u]'
$tlvArr = explode('[u]',$unitArr[$order]);
//Unit Name
if($DEBUG) echo "$tlvArr[0] : $tlvArr[1]";
//explode by '-'
$offsetArr = explode('-',$tlvArr[1]);
$bgnOffsetArr = explode('.',$offsetArr[0]);
$bgnByte = $bgnOffsetArr[0];
$bgnBit = $bgnOffsetArr[1];
$endOffsetArr = explode('.',$offsetArr[1]);
$endByte = $endOffsetArr[0];
$endBit = $endOffsetArr[1];
$byteLen = $endByte - $bgnByte + 1;
$paramSql = " SELECT initValue,readValue FROM $paramTable WHERE $objWhereStr $otherWhereStr AND instanceNo = '$instanceNo' ";
$v_Result = mysqli_query($pubConn,$paramSql);
$v_Row = mysqli_fetch_array($v_Result);
$initGetValue = $v_Row[0];
$readGetValue = $v_Row[1];
$initByteValue = substr($initGetValue,$bgnByte*2,$byteLen*2);
$readByteValue = substr($readGetValue,$bgnByte*2,$byteLen*2);
if($DEBUG) echo "<br>init:$initByteValue<br>read:$readByteValue";
$readBitValue = '';
if($bgnBit > 0 ||$endBit < 7)
{
$bitLen = $byteLen*8;//1 byte = 8 bit
$readBitValue = DecBin(HexDec($readByteValue));
$readBitValue = omcStrFill($readBitValue,$bitLen,'high','0');
$newBitValue='';
for($byteNum=$bgnByte;$byteNum<=$endByte;$byteNum++){
$tmpBitValue=substr($readBitValue,($byteNum-$bgnByte)*8,8);
if($DEBUG) echo "<br>$tmpBitValue=substr($readBitValue,($byteNum-$bgnByte)*8,8)";
$tmpBitValue = strrev($tmpBitValue);
if($DEBUG) echo "<br>$tmpBitValue = strrev($tmpBitValue)";
if($DEBUG) echo "<br>bitValue = $bitValue";
$newBitValue=$newBitValue.$tmpBitValue;
}
$catBitLen = $endByte*8+$endBit - ($bgnByte*8+$bgnBit) + 1; //1 byte = 8 bit
if($DEBUG) echo "<br>readBitValue = substr($newBitValue,$bgnBit,$catBitLen)";
$readBitValue = substr($newBitValue,$bgnBit,$catBitLen);
$readBitValue = strrev($readBitValue);
if($DEBUG) echo "<br>readBitValue = $readBitValue";
}
$initBitValue = '';
if($bgnBit > 0 ||$endBit < 7)
{
$bitLen = $byteLen*8;//1 byte = 8 bit
$initBitValue = DecBin(HexDec($initByteValue));
$initBitValue = omcStrFill($initBitValue,$bitLen,'high','0');
$newBitValue='';
for($byteNum=$bgnByte;$byteNum<=$endByte;$byteNum++){
$tmpBitValue=substr($initBitValue,($byteNum-$bgnByte)*8,8);
if($DEBUG) echo "<br>$tmpBitValue=substr($initBitValue,($byteNum-$bgnByte)*8,8)";
$tmpBitValue = strrev($tmpBitValue);
if($DEBUG) echo "<br>$tmpBitValue = strrev($tmpBitValue)";
if($DEBUG) echo "<br>bitValue = $bitValue";
$newBitValue=$newBitValue.$tmpBitValue;
}
$catBitLen = $endByte*8+$endBit - ($bgnByte*8+$bgnBit) + 1; //1 byte = 8 bit
if($DEBUG) echo "<br>initBitValue = substr($newBitValue,$bgnBit,$catBitLen)";
$initBitValue = substr($newBitValue,$bgnBit,$catBitLen);
$initBitValue = strrev($initBitValue);
if($DEBUG) echo "<br>initBitValue = $initBitValue";
}
$IniEquRead = false;
if(strlen($initBitValue)>0)
{
if($initBitValue==$readBitValue)
$IniEquRead = true;
}
else
{
if($initByteValue == $readByteValue)
$IniEquRead = true;
}
//explode by '[v]'
$valueArr = explode('[v]',$tlvArr[2]);
$typeAddTitleArr = explode('[t]',$valueArr[0]);
$operType = chop($typeAddTitleArr[0]);
$titleStr = chop($typeAddTitleArr[1]);
$valueArr[1] = chop($valueArr[1]);
if($DEBUG) echo "<br>operType = $operType";
switch($operType)
{
case 'input':
{
//explode by '-'
$defArr = explode('-',$valueArr[1]);
if($DEBUG) echo "<br>defArr = $defArr[0],$defArr[1],$defArr[2]";
switch($defArr[0])
{
case 'toDec':
if(strlen($initBitValue) > 0){
$initParsedValue = BinDec($initBitValue);
}else{
$initParsedValue = HexDec($initByteValue);
}
break;
case 'keepDec':
$initParsedValue = $initByteValue;
break;
case 'toHex':
echo "<br>Error:toHex";
break;
case 'keepHex':
$initParsedValue = $initByteValue;
break;
case 'toAscii':
$charValue = "";
if($bgnBit > 0 ||$endBit < 7)
{
echo "<br>Error:toAscii";
exit(1);
}
else
{
$tmpLen=strlen($initByteValue);
for($charCount=0;$charCount<$tmpLen;$charCount++)
{
$unitByte = substr($initByteValue,$charCount,2);
$unitChar = chr(HexDec($unitByte)); // hex -> ascii
if($DEBUG) echo "<br>unitChar=$unitChar";
$charValue .= $unitChar;
$charCount++;
}
$charValue = trim($charValue);
$initParsedValue = $charValue;
}
break;
default:
echo "<br>Error:valueType=$defArr[0]";
break;
}
if($DEBUG) echo "<br>initParsedValue = $initParsedValue";
switch($defArr[1])
{
case 'high':
switch($defArr[2])
{
case '0':
if($defArr[0] == 'toHex' || $defArr[0] == 'keepHex'){
//$initParsedValue = str_replace('0','',$initParsedValue);
}else{
$initParsedValue = $initParsedValue - 0;
}
break;
case 'E':
echo "Error:high fill E";
break;
default: break;
}
break;
case 'low':
if ("toAscii" != $defArr[0])
{
switch($defArr[2]){
case '0':
$initParsedValue = str_replace('00','',$initParsedValue);
break;
case 'E':
$initParsedValue = str_replace('E','',$initParsedValue);
break;
case 'F': //modify zane 20051004
$initParsedValue = str_replace('F','',$initParsedValue);
break;
default: break;
}
}
break;
default: break;
}
$returnValue = $initParsedValue;
break;
}
case 'select':
{
if($valueType == $nOctStr){
if($initBitValue != ''){
$selectValue = BinDec($initBitValue);
}else{
$selectValue = HexDec($initByteValue);
}
}else{
$selectValue=$initByteValue;
}
$isSelected = 0;
for($j=1;$j<sizeof($valueArr);$j++){
//explode by '[opt]'
$defArr = explode('[opt]',$valueArr[$j]);
if(sizeof($defArr) < 2){
$selectShow = "Reserved Value";
break;
}elseif($defArr[0] == $selectValue){
$selectShow =$defArr[1];
$isSelected = 1;
}else{
//echo "<option value=\"$defArr[0]\">$defArr[1]</option>";
}
}
if($isSelected ==0 && $j == sizeof($valueArr)){
$selectShow = "Undefined Value";
}
$returnValue = $selectShow;
break;
}
default: echo "<br>Error:operType =|$operType|";
break;
}//end of switch(..)
if(strlen($returnValue)==0) $returnValue='--';
return $returnValue;
}//end getParamValue
function showParameter($sysId,$oidStr,$order,$inputValueType,$instanceNo=0,$doingOtherUlr='',$otherWhereStr='',$showStr='')
{
global $language,$notSettedColor,$settedColor;
$tmp1 = str_replace('.','_',$oidStr);
$id = 'ID_' . $sysId . '_' . $tmp1 . '_' . $order . '_ist' . $instanceNo;
$newId = "New".$id;
$showValue = getParamValue($titleStr,$IniEquRead,$sysId,$oidStr,$order,$instanceNo,$otherWhereStr);
if($IniEquRead)$color = $settedColor;
else $color = $notSettedColor;
$doingOtherUlr=urlencode($doingOtherUlr);
if(strlen($showStr))
{
$color = $settedColor;
$showValue = $showStr;
}
//$otherWhereStr=urlencode($otherWhereStr);
echo "<span id=\"$id\" title=\"$titleStr\" style=\"cursor:pointer\" onclick=\"javascript:getPar('getVar','$language','$sysId','$oidStr','$order','$instanceNo','0','$doingOtherUlr','$otherWhereStr','$showStr','$inputValueType');\"><font color=\"$color\">$showValue</font></span>";
echo "<span id=\"$newId\" style=\"display:none\" ></span>";
}
?>
<script LANGUAGE="JavaScript">
var globalID;
function getPar(flag,lan,sysId,oidStr,order,instanceNo,inputID,doingOtherUlr,otherWhereStr,showStr,inputValueType)
{
var ulr="../sub_inc/getParameter.php?flag="+flag+"&lan="+lan+"&sysId="+sysId+"&oidStr="+oidStr+"&order="+order+"&instanceNo="+instanceNo;
if(flag=='saveVar')
{
var setValue = document.getElementById(inputID).value;
ulr = ulr + "&setValue=" + setValue;
}
ulr = ulr+"&doingOtherUlr="+doingOtherUlr+"&otherWhereStr="+otherWhereStr+"&showStr="+showStr+"&inputValueType="+inputValueType;
var browser = navigator.appName;
if(browser == "Microsoft Internet Explorer")
{
request_o = new ActiveXObject("Microsoft.XMLHTTP");
}
else
{
request_o = new XMLHttpRequest();
}
//alert(ulr);
request_o.open("GET",ulr,"false");
request_o.onreadystatechange = updateID;
request_o.send(null);
}
function updateID()
{
if(request_o.readyState == 4)
{
var strResult = request_o.responseText;
var arrResult = strResult.split("###");
var flag = arrResult[0];
var idName = arrResult[1];
var innerStr = arrResult[2];
//alert(strResult+"00");
if(flag=='getVar')
{
var getVarId = idName.substr(3);//ID...
var InputId = "Input"+getVarId;
var saveId = "Save" + getVarId;
document.getElementById(getVarId).style.display="none";
document.getElementById(idName).style.display="";
}
if(flag=='saveVar')
{
globalID = idName;
var saveVarId = "New"+idName;//NewID...
document.getElementById(saveVarId).style.display="none";
document.getElementById(idName).style.display="";
document.getElementById(idName).style.cursor="pointer";
var isEqual = arrResult[3];
if(isEqual == '1') color="<?php echo $settedColor;?>";
else color = "<?php echo $notSettedColor;?>";
document.getElementById(idName).style.color = color;
//alert(innerStr);
var doingOtherUlr = arrResult[4];
if(doingOtherUlr.length>0)
{
//alert(doingOtherUlr);
doingOther(doingOtherUlr);
}
}
document.getElementById(idName).innerHTML = innerStr;
if(flag == 'getVar')
{
document.getElementById(InputId).style.background="<?php echo $inputBkgrdColor;?>";
document.getElementById(saveId).style.background="<?php echo $saveBkgrdColor;?>";
//alert(document.getElementById(InputId).value);
}
}
}
function doingOther(ulr)
{
var browser = navigator.appName;
if(browser == "Microsoft Internet Explorer")
{
request_o = new ActiveXObject("Microsoft.XMLHTTP");
}
else
{
request_o = new XMLHttpRequest();
}
request_o.open("GET",ulr,"false");
request_o.onreadystatechange = otherReturn;
request_o.send(null);
}
//当额外操作没有完成时,参数背景颜色为waitingBkgrdColor
function otherReturn()
{
if(request_o.readyState == 3)//没有完成
{
//var strResult = request_o.responseText;
document.getElementById(globalID).style.background="<?php echo $waitingBkgrdColor;?>";
}
if(request_o.readyState == 4)//完成
{
document.getElementById(globalID).style.background="";
}
}
function checkInput(term,flag,maxValue,minValue)
{
term.value = term.value.toUpperCase();
if (flag == 16)
{
var checkOK = "0123456789ABCDEF";
var showmsg ="Parameter must be a hexadecimal value";
}
else
{
var checkOK = "0123456789";
var showmsg ="Parameter must be a decimal value";
}
var checkStr = term.value;
var allValid = true;
for (i = 0; i < checkStr.length; i++){
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++){
if (ch == checkOK.charAt(j))
break;
}
if (j == checkOK.length){
allValid = false;
break;
}
}
if(checkStr == '')
{
showmsg = "Parameter can't be blank";
alert(showmsg+"!");
}
if (!allValid){
alert(showmsg+"!");
term.focus();
term.value = 0;
return (false);
}
if (maxValue != 0)
{
/*
if (checkStr >= maxValue)
{
showmsg = "Parameter must less then "+ maxValue;
alert(showmsg+"!");
term.value = maxValue;
term.focus();
return (false);
}
*/
}
if (minValue != '')
{
/*
if (checkStr < minValue)
{
maxValue = maxValue;
showmsg = "Parameter must between "+ minValue + " and " + maxValue;
alert(showmsg+"!");
term.value = minValue;
term.focus();
return (false);
}
*/
}
}
</script>
+81
View File
@@ -0,0 +1,81 @@
<?php
$strCallISDN ="主叫号码";
$strBeginTime ="开始时间";
$strCalledISDN ="被叫号码";
$strConverseTime ="通话时长(秒)";
$strEndTime ="结束时间";
$strCallerE1Slot ="主叫E1/时隙";
$strCalledE1Slot ="被叫E1/时隙";
$strCallerTrunkGroup ="主叫局向";
$strIncomingTrunkGroup ="入局局向";
$strOutgoingTrunkGroup ="出局局向";
$strCauseTerm ="中断原因";
$strServiceType ="业务类型";
$strSeizureTime ="拨号时间";
$strAnswerTime ="应答时间";
$strReleaseTime ="中断时间";
$strHlrInterrogation ="HLR查询";
$strLocationUpdate ="位置更新";
$strRecordingEntity ="纪录实体";
$strRoutingNumber ="路由号码";
$strNumberOfForwarding ="前转次数";
$strInterrogationResult ="询问结果";
$strIntTimeStamp ="询问时间";
$strOldLocation ="旧位置信息";
$strNewLocation ="新位置信息";
$strUpdateResult ="更新结果";
$strUpdateTimeStamp ="更新时间";
$strClassmark ="等级信息";
$strFee ="话费(元)";
$strBalance ="余额(元)";
$strLocalCallOut ="本局主叫";
$strLocalCallIn ="本局被叫";
$strTrunkCallOut ="本地通话";
$strNDDCallOut ="国内长途";
$strHMTCallOut ="港澳台长途";
$strIDDCallOut ="国际长途";
$strTrunkCallIn ="入局呼叫";
$strPeriodicCharge ="定期租金";
$strIncrementValue ="人工增值";
$strDecreaseValue ="人工扣费";
$strRechargeSuccess ="充值成功";
$strRechargeFailure ="充值失败";
//add by lilong
$strDescription ="描述";
$strTariffRentChargeType ="充值类型";
$strTariffRentAccordingToDate ="每天";
$strTariffRentAccordingToPeriod ="每月";
$strBasicTariff ="基本费率";
$strResideZone ="费率编号";
$strChargingPrefix ="字头";
$strCountryDistrict ="国家/地区";
$strUnitChargingTimeSecond ="计时单位(s)";
$strMinimumChargingUnit ="最小计时单位(s)";
$strBasicFee ="基本费率";
$strBasicLongDistance ="长途费率";
$strBasicInitial ="初次通话费用";
$strDiscount ="折扣";
$strTariffDiscountTimeSection ="时间段";
$strSpecialDay ="节假日";
$strReload ="重新载入";
$strSourceIP ="源IP";
//added by xiehua 2003-05-13
$strSMS ="短消息";
$strCallForwrd ="呼叫转移";
$strConferenceCall ="电话会议";
$strRoaming ="漫游";
$strCloseUserGroup ="集团用户";
$strTariffNoRecords ="没有费率$tariff_id"."的相关记录&nbsp;";
$strCdrMSC ="MSC话单";
$strCdrPPS ="PPS话单";
$strCdrSMSC ="短信记录";
$strSupplementary ="附加";
$strAdvanced ="高级";
$strRechargeCard ="充值卡";
$strFreshCard ="充值卡";
$strUsedCard ="已使用";
$strCapitalCharacter ="大写字符";
$strParaMustBeAHexNumber ="参数必须为十六进制数";
?>
+133
View File
@@ -0,0 +1,133 @@
<?php
//用户选择的语言类型
if($language == 'eng'){
require("../sub_inc/sub_english.inc");
}else{
require("../sub_inc/sub_chinese_gb.inc");
}
if($thisOmcType==1){
$DEFAULT_SYS="GMSC";
}elseif($thisOmcType==9){
$DEFAULT_SYS="HBSC";
}elseif($thisOmcType==10){
$DEFAULT_SYS="SN";
}else{
$DEFAULT_SYS="MSC";
}
//****************************************************************
//函数:
// decodeTelNumber($srcNumber,$keepLenCode='E')
//功能说明:
// 将一个按OSI编码方案编码的国际电话号码$srcNumber,解码成一般的电话号码
//
//
//参数说明:
// $keepLenCode,补位字符一般为'E'或'F'
//
//返回值:
// 解码后的一般电话号码
//
//作者:
//
//修改注释:
//NO.1
//姓名:
//时间:
//修改说明:
//----------------------------------------------------------
function decodeTelNumber($srcNumber,$keepLenCode='E')
{
$srcNumber=substr($srcNumber,2); //去掉前面的编号计划,例:'91'
$srcNumber=str_replace($keepLenCode,'',$srcNumber); //去掉后面的'E'
return($srcNumber);
}
//****************************************************************
//函数:
// encodeTelNumber($srcNumber,$len='16',$keepLenCode='E',$planCode='91')
//功能说明:
// 将一个一般的电话号码$srcNumber,按OSI编码方案编码成国际电话号码
//
//
//参数说明:
// $keepLenCode='E', 补位字符,一般为'E'或'F',模认为E
// $planCode='91', 编码方案代码,一般91,模认为E
//返回值:
// 编码后的国际电话号码
//
//作者:
//
//修改注释:
//NO.1
//姓名:
//时间:
//修改说明:
//----------------------------------------------------------
function encodeTelNumber($srcNumber,$len='18',$keepLenCode='E',$planCode='91')
{
$DEBUG=0;
if($DEBUG) echo "<br>srcNumber 1=$srcNumber";
$valueLen=strlen($srcNumber);
if($valueLen == $len){
return($srcNumber);
}elseif($valueLen > 0){
$srcNumber = $planCode.$srcNumber;
$valueLen=strlen($srcNumber);
for($i=$len; $i>$valueLen; $i--){
$srcNumber .=$keepLenCode;
if($DEBUG) echo "<br>srcNumber 2=$srcNumber";
}
}else{
for($i=0; $i<$len; $i++){
$srcNumber .=$keepLenCode;
}
}
if($DEBUG) echo "<br>srcNumber 3=$srcNumber";
return($srcNumber);
}
function getLevelWhere($objIdStr)
{
$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($j == 0){
$levelWhere ="level_$levelNo='${"level_$levelNo"}'";
}else{
$levelWhere .=" AND level_$levelNo='${"level_$levelNo"}'";
}
}
return($levelWhere);
}
function omcStrFill($string,$defLen,$fillWay='high',$fillChar='0'){
if(strlen($string) <= $defLen){
$fillLen=$defLen - strlen($string);
for($i=0;$i<$fillLen;$i++){
if($fillWay == 'low'){
$string = $string.$fillChar;
}else{
$string = $fillChar.$string;
}
}
return($string);
}else{
$errorInfo = "Error in omcStrFill:the defLen < lengh of string!!\\ndefLen=$defLen and string=$string!!";
echo "<script language='javascript'>";
echo "window.alert(\"$errorInfo\");";
echo "history.go(-1)";
echo "</script>";
exit();
echo "<br>Error in omcStrFill : the defLen < lengh of string!!";
echo "<br>defLen=$defLen and string=$string!!";
exit();
}
}
?>
+89
View File
@@ -0,0 +1,89 @@
<?php
$strCallISDN ="Caller number";
$strBeginTime ="Start time";
$strCalledISDN ="Called number";
$strConverseTime ="Duration(s)";
$strEndTime ="End time";
$strCallerE1Slot ="Caller E1/CH#";
$strCalledE1Slot ="Called E1/CH#";
$strCallerTrunkGroup ="Caller TG";
$strDate ="Date";
$strDescription ="Description";
$strDisplayRecords ="Records";
$strIncomingTrunkGroup ="Incoming TG";
$strOutgoingTrunkGroup ="Outgoing TG";
$strCauseTerm ="Cause for term";
$strServiceType ="Service type";
$strSeizureTime ="Seizure";
$strAnswerTime ="Answer";
$strReleaseTime ="Release";
$strHlrInterrogation ="HLR interrogation";
$strLocationUpdate ="Location update";
$strRecordingEntity ="Recording entity";
$strRoutingNumber ="Routing number";
$strNumberOfForwarding ="Number of forwarding";
$strInterrogationResult ="Result";
$strIntTimeStamp ="Int. time";
$strOldLocation ="Old location";
$strNewLocation ="New location";
$strUpdateResult ="Result";
$strUpdateTimeStamp ="Update time";
$strClassmark ="Classmark";
$strFee ="Fee";
$strBalance ="Balance";
$strLocalCallOut ="Local call-out";
$strLocalCallIn ="Local call-in";
$strTrunkCallOut ="Trunk call-out";
$strNDDCallOut ="NDD call-out";
$strHMTCallOut ="HMT call-out";
$strIDDCallOut ="IDD call-out";
$strTrunkCallIn ="Trunk call-in";
$strPeriodicCharge ="Periodic charge";
$strIncrementValue ="Increment";
$strDecreaseValue ="Decrease";
$strRechargeSuccess ="Recharge success";
$strRechargeFailure ="Recharge failure";
$strTariffNoRecords ="No record found for tariff ID&nbsp;";
$strTariffDiscountTimeSection ="Time section";
$strTotal ="Total";
$strNotFindRecord ="No record found!";
$strSourceIP ="Source IP";
//add by lilong
$strDescription ="Description";
$strTariffRentChargeType ="Charge type";
$strTariffRentAccordingToDate ="Every day";
$strTariffRentAccordingToPeriod ="Every month";
$strBasicTariff ="Basic tariff";
$strResideZone ="Tariff ID";
$strChargingPrefix ="Prefix";
$strCountryDistrict ="Country/District";
$strUnitChargingTimeSecond ="Charge unit (s)";
$strMinimumChargingUnit ="Min. charge unit";
$strBasicFee ="Basic fee";
$strBasicLongDistance ="Long distance";
$strBasicInitial ="Initial charge adjustment";
$strDiscount ="Discount";
$strTariffDiscountTimeSection ="Time section";
$strSpecialDay ="Holiday";
$strReload ="Reload";
//add by xiehua 2003-04-28
$strSMS ="SMS";
$strCallForwrd ="Call forward";
$strConferenceCall ="Conference call";
$strRoaming ="Roaming";
$strID ="ID";
$strCloseUserGroup ="Closed user group";
$strField ="Field";
$strValue ="Value";
$strCdrMSC ="MSC CDR";
$strCdrPPS ="PPS CDR";
$strCdrSMSC ="SMSC CDR";
$strSupplementary ="Supplementary";
$strRechargeCard ="Recharge card";
$strFreshCard ="Fresh card";
$strUsedCard ="Used card";
$strCapitalCharacter ="Capital character";
$strParaMustBeAHexNumber ="parameter must be a hexadecimal number";
?>
+692
View File
@@ -0,0 +1,692 @@
<?php
/*********************************************************
程序说明:
功能说明:列表显示基本计费信息
调用关系:调用: header.inc
被调用:
变量说明
作者:
修改注释:
NO.1
姓名:崔体存
时间: 2004-4-13
修改说明: Support OMC 7.0 把Mo tariff、Rent、SMS、Servives tariff放
进一个页面,都可以通过选择tariff_id来查看相应的费率情况
*********************************************************/
require("../../inc/header.inc");
$helpId = "2.2.3.1";
$db='PPS_DB';
$table_name='mo_tariff';
$objDbConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'],$db);
$strThisPage=$strTitleAccount.$strTitleSpace.$strCurrentTariff.$strTitleSpace.$strBasicTariff;
$arr_mode=array("edit","add");
$DEBUG = 0;
if(!$sort_field){
$sort_field = 'bill_id'; //排序所依赖的字段名
}
$sort_direction = 'ASC '; //排序顺序
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$call_cap_flag_label=array(0=>"Disable",1=>"Home PLMN Call",2=>"Other Network Call");
$sm_cap_flag_label=array(0=>"Disable",1=>"Home PLMN SM",2=>"Other Network SM");
//echo "<br>moneyPara = $moneyPara";
if($add_area){
echo " <meta http-equiv=\"refresh\" content=\"0; url=./rate_modify.php?add_area=1\"> ";
exit();
}
//编辑后保持对应tariff_id的页面
if ($keep_id != 1){
$tariff_id=isset($tariff_id)?$tariff_id:'00';
}
else {$tariff_id=$return_tariff_id;}
if($DEBUG) {echo "<br>keep_id=$keep_id<br>tariff_id=$return_tariff_id<br>";}
//
$where=" WHERE tariff_id=$tariff_id ";
//echo "<br>where=$where";
$str_sql ="SELECT count(*) FROM $table_name ".$where;
//echo "<br>str_sql=$str_sql";
$result=mysqli_query($objDbConn,$str_sql);
$record = mysqli_fetch_array($result);
$number_of_records = $record[0];
$order = " ORDER BY $sort_field $sort_direction ";
$sel_sql ="SELECT * FROM $table_name ".$where.$order;
//echo "<br>sel_sql=$sel_sql";
$result = @mysqli_query($objDbConn,$sel_sql);
$rows = @mysqli_fetch_array($result);
echo mysqli_error($objDbConn);
?>
<base>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<form method="POST" name="selectform" action="<?php echo "$PHP_SELF";?>">
<?php
adjust_head();
adjust_title_head();
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strThisPage";
echo "</td>";
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=\"left\">";
echo "<b>MO basic tariff</b> Total records:$number_of_records";
echo "</td>";
echo "<td align=\"right\">";
echo "$strResideZone:&nbsp;";
$maxCosSql = " SELECT pubVarValue FROM OMC_PUB.omcPubVarConf WHERE pubVarName = 'maxCOSNumber' ";
$maxCosRes = @mysqli_query($pubConn,$maxCosSql);
$maxCosRow = @mysqli_fetch_array($maxCosRes);
$maxCosNum = $maxCosRow[pubVarValue];
echo "<select size=\"1\" name=\"tariff_id\" onChange=\"javascript:selectTitle()\">";
for($i=0;$i< $maxCosNum;$i++){
$m=($i<10?"0":"").$i;
if($m != $tariff_id){
echo "<option value=\"$m\">$m</option>";
}else{
echo "<option value=\"$m\" selected>$m</option>";
}
}
echo "</select>";
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
echo "<br>";
?>
<script LANGUAGE="JavaScript">
function selectTitle(){
var base_url,url_add,url;
base_url='<?php echo "$PHP_SELF?tariff_id=";?>';
url_add=document.selectform.tariff_id.options[document.selectform.tariff_id.selectedIndex].value;
url=base_url+url_add;
window.location=url;
}
</script>
<?php
//没有纪录时,显示无记录提示
if(!$rows){
echo "$strTariffNoRecords $tariff_id"."!";
}
?>
<?php
if($rows){
echo "<table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
echo "<tr bgcolor=\"#E6E6E6\" valign=\"top\">";
echo "<td><a href=\"$PHP_SELF?tariff_id=$tariff_id&where=$where&sort_field=bill_id\" target=\"_self\">$strChargingPrefix</a></td>";
echo "<td><a href=\"$PHP_SELF?tariff_id=$tariff_id&where=$where&sort_field=area\" target=\"_self\">Country<br>/District</a></td>";
echo "<td >Call<br>type</td>";
echo "<td >Discount<br>id</td>";
echo "<td >$strUnitChargingTimeSecond</td>";
echo "<td >$strFreeChargeUnit</td>";
echo "<td >$strMinimumChargingUnit</td>";
//echo "<td >$strBasicFee</td>";
//echo "<td >$strBasicLongDistance</td>";
echo "<td >$strBasicInitial</td>";
echo "<td >$strTariffRentCapFlag</td>";
echo "<td >Tier Level</td>";
echo "<td >Tier0 Unit</td>";
echo "<td >$strBasicFee</td>";
echo "<td >$strBasicLongDistance</td>";
echo "<td >Tier1 Unit</td>";
echo "<td >$strBasicFee</td>";
echo "<td >$strBasicLongDistance</td>";
echo "<td >Tier2 Unit</td>";
echo "<td >$strBasicFee</td>";
echo "<td >$strBasicLongDistance</td>";
echo "</tr>";
do{
echo "<tr>";
echo "<td>$rows[bill_id]</td>";
echo "<td>$rows[area]&nbsp</td>";
if($rows[call_type]==0)
echo "<td>Local call out</td>";
elseif($rows[call_type]==1)
echo "<td>NDD</td>";
elseif($rows[call_type]==2)
echo "<td>IDD</td>";
else
echo "<td align=\"right\">---</td>";
echo "<td align=\"right\">$rows[discount_id]</td>";
echo "<td align=\"right\">$rows[unit_time]</td>";
echo "<td align=\"right\">$rows[free_time]</td>";
echo "<td align=\"right\">$rows[mini_time]</td>";
//echo "<td align=\"right\">$rows[base_fee]</td>";
//echo "<td align=\"right\">$rows[long_distance_fee]</td>";
echo "<td align=\"right\">$rows[adjustment]</td>";
echo "<td align=\"right\">{$call_cap_flag_label[$rows[cap_flag]]}</td>";
echo "<td align=\"right\">$rows[tier_level]</td>";
echo "<td align=\"right\">$rows[tier_unit_0]</td>";
echo "<td align=\"right\">$rows[base_fee_0]</td>";
echo "<td align=\"right\">$rows[long_distance_fee_0]</td>";
echo "<td align=\"right\">$rows[tier_unit_1]</td>";
echo "<td align=\"right\">$rows[base_fee_1]</td>";
echo "<td align=\"right\">$rows[long_distance_fee_1]</td>";
echo "<td align=\"right\">$rows[tier_unit_2]</td>";
echo "<td align=\"right\">$rows[base_fee_2]</td>";
echo "<td align=\"right\">$rows[long_distance_fee_2]</td>";
/* $base_fee=$rows[base_fee]/$moneyPara;
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>",$base_fee);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>",$base_fee);
}
else{
printf("<td align=\"right\">%5.2f</td>",$base_fee);
}
$long_distance_fee=$rows[long_distance_fee]/$moneyPara;
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>", $long_distance_fee);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>", $long_distance_fee);
}
else{
printf("<td align=\"right\">%5.2f</td>", $long_distance_fee);
}
$adjustment_fee=$rows[adjustment]/$moneyPara;
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>", $adjustment_fee);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>", $adjustment_fee);
}
else{
printf("<td align=\"right\">%5.2f</td>", $adjustment_fee);
}*/
echo "</tr>";
}while($rows = mysqli_fetch_array($result));
}
?>
</table>
</form>
<!-- Rent -->
<?php
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$db='PPS_DB';
$table_name='rent';
$arr_mode=array("edit","add");
//编辑后保持对应tariff_id的页面
if ($keep_id != 1){
$tariff_id=isset($tariff_id)?$tariff_id:'00';
}
else {
$tariff_id=$return_tariff_id;
}
if($DEBUG) echo "<br>keep_id=$keep_id<br>tariff_id=$return_tariff_id<br>";
$sql="SELECT id,description,rent_type,charge_date,rent_amount
FROM $table_name
WHERE tariff_id=$tariff_id
ORDER by id";
//echo $sql,$bill_db;
$result=@mysqli_query($objDbConn,$sql);
$rows=@mysqli_fetch_array($result);
echo mysqli_error($objDbConn);
echo "<table border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td>";
echo "<b>Rent</b>";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "<p></p>";
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<?php
echo "<td align=\"center\">$strTariffRentID</td>";
echo "<td align=\"center\">$strDescription</td>";
echo "<td align=\"center\">$strTariffRentChargeType</td>";
echo "<td align=\"center\">$strTariffRentChargeDate</td>";
echo "<td align=\"center\">$strTariffRentChargeAmount</td>";
?>
</tr>
<?php
$i=0;
if($rows && $result){
do{
$i++;
$showi=$i;
if ($rows[description] == ''){
echo "<tr>";
echo "<td align=\"center\">$showi</td>";
echo "<td align=\"center\">--</td>";
echo "<td align=\"center\">--</td>";
echo "<td align=\"center\">--</td>";
echo "<td align=\"right\">--</td>";
echo "</tr>";
}
else{
echo "<tr>";
echo "<td align=\"center\">$showi</td>";
echo "<td align=\"center\">$rows[description]</td>";
echo "<td align=\"center\">";
if($rows[rent_type]=='00'){
echo "$strTariffRentAccordingToDate";
}else{
echo "$strTariffRentAccordingToPeriod";
}
echo "</td>";
echo "<td align=\"center\">";
if($rows[rent_type]=='01'){
echo "$rows[charge_date]";
}else{
echo "--";
}
echo "</td>";
echo "<td align=\"right\">$rows[rent_amount]</td>";
/*
$rows[rent_amount] = $rows[rent_amount]/$moneyPara;
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>", $rows[rent_amount]);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>", $rows[rent_amount]);
}
else{
printf("<td align=\"right\">%5.2f</td>", $rows[rent_amount]);
}*/
echo "</tr>";
}
}while($rows=mysqli_fetch_array($result));
}
?>
</table>
<!-- SMS -->
<?php
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$db='PPS_DB';
$table_name='bill_sms';
$arr_mode=array("edit","add");
//编辑后保持对应tariff_id的页面
if ($keep_id != 1){
$tariff_id=isset($tariff_id)?$tariff_id:'00';
}
else {$tariff_id=$return_tariff_id;}
if($DEBUG) {echo "<br>keep_id=$keep_id<br>tariff_id=$return_tariff_id<br>";}
$sql="SELECT id,prefix,call_type,area,discount_id,charge_amount,cap_flag
FROM $table_name
WHERE tariff_id=$tariff_id
ORDER by id";
//echo $sql,$bill_db;
$result=@mysqli_query($objDbConn,$sql);
$rows=@mysqli_fetch_array($result);
echo mysqli_error($objDbConn);
?>
<p></p>
<?php
echo "<table border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td>";
echo "<b>SMS</b>";
echo "</td>";
echo "</tr>"; echo "</table>";
echo "<p></p>";
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<?php
echo "<td align=\"center\">$strTariffRentID</td>";
echo "<td align=\"center\">$strChargingPrefix</td>";
echo "<td align=\"center\">Call type</td>";
echo "<td align=\"center\">$strCountryDistrict</td>";
echo "<td align=\"center\">$strDiscountID</td>";
echo "<td align=\"center\">$strTariffRentChargeAmount</td>";
echo "<td align=\"center\">$strTariffRentCapFlag</td>";
?>
</tr>
<?php
$i=0;
if($rows && $result){
do{
$i++;
echo "<tr>";
echo "<td align=\"center\">$i</td>";
if("" == $rows[prefix]){
$rows[prefix]="--";
}
echo "<td align=\"center\">&nbsp;$rows[prefix]</td>";
if($rows[call_type]==0)
echo "<td align=\"center\">Local call out</td>";
elseif($rows[call_type]==1)
echo "<td align=\"center\">NDD</td>";
elseif($rows[call_type]==2)
echo "<td align=\"center\">IDD</td>";
else
echo "<td align=\"right\">---</td>";
if ($rows[area] == ''){
$rows[area]='--';
}
echo "<td align=\"center\">&nbsp;$rows[area]</td>";
echo "<td align=\"center\">$rows[discount_id]</td>";
echo "</td>";
echo "<td align=\"center\">$rows[charge_amount]</td>";
$cap_flag_value=$sm_cap_flag_label[$rows[cap_flag]+0];
echo "<td align=\"center\">$cap_flag_value</td>";
/*
$rows[charge_amount ] = $rows[charge_amount ]/$moneyPara;
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>", $rows[charge_amount]);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>", $rows[charge_amount]);
}
else{
printf("<td align=\"right\">%5.2f</td>", $rows[charge_amount]);
}*/
echo "</tr>";
}while($rows=mysqli_fetch_array($result));
}
?>
</table>
<!-- GPRS -->
<?php
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$db='PPS_DB';
$table_name='gprs_tariff';
$arr_mode=array("edit","add");
//编辑后保持对应tariff_id的页面
if ($keep_id != 1){
$tariff_id=isset($tariff_id)?$tariff_id:'00';
}
else {$tariff_id=$return_tariff_id;}
if($DEBUG) {echo "<br>keep_id=$keep_id<br>tariff_id=$return_tariff_id<br>";}
$sql="SELECT record_id,dest_ip,charge_unit,basic_fee,min_charge_unit,initial_adjustment,cap_flag,discount_id
FROM $table_name
WHERE tariff_id=$tariff_id
ORDER by record_id";
//echo $sql,$bill_db;
$result=@mysqli_query($objDbConn,$sql);
$rows=@mysqli_fetch_array($result);
echo mysqli_error($objDbConn);
?>
<p></p>
<?php
echo "<table border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td>";
echo "<b>GPRS</b>";
echo "</td>";
echo "</tr>"; echo "</table>";
echo "<p></p>";
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<?php
echo "<td align=\"center\">ID</td>";
echo "<td align=\"center\">Dest IP</td>";
echo "<td align=\"center\">Charge unit(KB)</td>";
echo "<td align=\"center\">Basic fee</td>";
echo "<td align=\"center\">Minimum charge unit</td>";
echo "<td align=\"center\">Initial adjustment</td>";
echo "<td align=\"center\">Cap flag</td>";
echo "<td align=\"center\">Discount ID</td>";
?>
</tr>
<?php
$i=0;
$gprs_cap_flag_label=array(0=>"Disable",1=>"Enable");
if($rows && $result){
do{
$i++;
echo "<tr>";
echo "<td align=\"center\">{$rows[record_id]}</td>";
echo "<td align=\"center\">&nbsp;$rows[dest_ip]</td>";
echo "<td align=\"center\">&nbsp;$rows[charge_unit]</td>";
echo "<td align=\"center\">&nbsp;$rows[basic_fee]</td>";
echo "<td align=\"center\">&nbsp;$rows[min_charge_unit]</td>";
echo "<td align=\"center\">&nbsp;$rows[initial_adjustment]</td>";
$cap_flag_value=$gprs_cap_flag_label[$rows[cap_flag]+0];
echo "<td align=\"center\">&nbsp;$cap_flag_value</td>";
echo "<td align=\"center\">&nbsp;$rows[discount_id]</td>";
echo "</tr>";
}while($rows=mysqli_fetch_array($result));
}
?>
</table>
<!-- MMS Send -->
<?php
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$db='PPS_DB';
$table_name='vas_mms_send_tariff';
$arr_mode=array("edit","add");
//编辑后保持对应tariff_id的页面
if ($keep_id != 1){
$tariff_id=isset($tariff_id)?$tariff_id:'00';
}
else {$tariff_id=$return_tariff_id;}
if($DEBUG) {echo "<br>keep_id=$keep_id<br>tariff_id=$return_tariff_id<br>";}
$sql="SELECT mms_send_id,mms_type,prefix,call_type,dest_name,discount_id,charge_fee,cap_flag
FROM $table_name
WHERE tariff_id=$tariff_id
ORDER by mms_send_id";
//echo $sql,$bill_db;
$result=@mysqli_query($objDbConn,$sql);
$rows=@mysqli_fetch_array($result);
echo mysqli_error($objDbConn);
?>
<p></p>
<?php
echo "<table border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td>";
echo "<b>MMS Send</b>";
echo "</td>";
echo "</tr>"; echo "</table>";
echo "<p></p>";
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<?php
echo "<td align=\"center\">ID</td>";
echo "<td align=\"center\">MMS type</td>";
echo "<td align=\"center\">Prefix</td>";
echo "<td align=\"center\">Call type</td>";
echo "<td align=\"center\">Dest name</td>";
echo "<td align=\"center\">Discount ID</td>";
echo "<td align=\"center\">Charge fee</td>";
echo "<td align=\"center\">Cap flag</td>";
?>
</tr>
<?php
$i=0;
$mms_send_cap_flag_label=array(0=>"Disable",1=>"Enable");
$mms_type_label=array(1=>"To mobile",2=>"To email");
$call_type_label=array(0=>"Local call out",1=>"NDD",2=>"IDD");
if($rows && $result){
do{
$i++;
echo "<tr>";
echo "<td align=\"center\">{$rows[mms_send_id]}</td>";
echo "<td align=\"center\">&nbsp;{$mms_type_label[$rows[mms_type]]}</td>";
if(trim($rows[prefix])=="")
echo "<td align=\"center\">--</td>";
else
echo "<td align=\"center\">&nbsp;$rows[prefix]</td>";
echo "<td align=\"center\">&nbsp;{$call_type_label[$rows[call_type]]}</td>";
if(trim($rows[dest_name])=="")
echo "<td align=\"center\">--</td>";
else
echo "<td align=\"center\">&nbsp;$rows[dest_name]</td>";
echo "<td align=\"center\">&nbsp;$rows[discount_id]</td>";
echo "<td align=\"center\">&nbsp;$rows[charge_fee]</td>";
$cap_flag_value=$gprs_cap_flag_label[$rows[cap_flag]+0];
echo "<td align=\"center\">&nbsp;$cap_flag_value</td>";
echo "</tr>";
}while($rows=mysqli_fetch_array($result));
}
echo "</table>";
?>
<!-- Service tariff -->
<?php
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$db='PPS_DB';
$tableName='comm_tariff';
//编辑后保持对应tariff_id的页面
if ($keep_id != 1){
$tariff_id=isset($tariff_id)?$tariff_id:'00';
}
else {$tariff_id=$return_tariff_id;}
if($DEBUG) {echo "<br>keep_id=$keep_id<br>tariff_id=$return_tariff_id<br>";}
//
$where=" WHERE tariff_id=$tariff_id ";
$sql="SELECT * FROM $tableName".$where;
//echo $sql,$bill_db;
$result=@mysqli_query($objDbConn,$sql);
$rows=@mysqli_fetch_array($result);
echo mysqli_error($objDbConn);
?>
<?php
//没有纪录时,显示无记录提示
if(!$rows){
$setSql="INSERT INTO $tableName
(tariff_id,mo_sm_charge,mt_sm_charge,cf_charge_unit,cf_charge_amount,roaming_charge_unit,roaming_charge_amount,cc_charge_unit,cc_charge_amount,cug_charge_unit,cug_charge_amount,fav_change_charge,fav_charge_unit,fav_charge_amount )
VALUES
('$tariff_id','','','','','','','','','','','','','')";
if($DEBUG) echo "<br>setSql=$setSql";
mysqli_query($objDbConn,$setSql);
}
echo "<table border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td>";
echo "<b><br>Supplementary tariff</b>";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "<p></p>";
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<?php
echo "<tr bgcolor=\"#E6E6E6\">";
echo "<td width=\"40%\">$strDescription</td>";
echo "<td align =\"right\" width=\"30%\">$strTariffRentChargeAmount</td>";
echo "<td align =\"right\" width=\"30%\">$strUnitChargingTimeSecond</td>";
echo "</tr>";
/*
$arr_editfieldAmount = array("cf_charge_amount","roaming_charge_amount","cc_charge_amount","cug_charge_amount","fav_charge_amount","fav_change_charge","cf_cug_charge_amount","cf_fav_charge_amount","cug_fav_charge_amount","cf_cug_fav_charge_amount");
$arr_editfieldUnit = array("cf_charge_unit","roaming_charge_unit","cc_charge_unit","cug_charge_unit","fav_charge_unit","","cf_cug_charge_unit","cf_fav_charge_unit","cug_fav_charge_unit","cf_cug_fav_charge_unit");
$arr_description = array($strCallForwrd,$strRoaming,$strConferenceCall,$strCloseUserGroup,$strFav_call,$strFav_listedtion,$strCf_Cug_call,$strCf_Fav_call,$strCug_Fav_call,$strCf_Cug_Fav_call);
$arr_amount = array($rows[cf_charge_amount],$rows[roaming_charge_amount],$rows[cc_charge_amount],$rows[cug_charge_amount],$rows[fav_charge_amount],$rows[fav_change_charge],$rows[cf_cug_charge_amount],$rows[cf_fav_charge_amount],$rows[cug_fav_charge_amount],$rows[cf_cug_fav_charge_amount]);
$arr_unit = array($rows[cf_charge_unit],$rows[roaming_charge_unit],$rows[cc_charge_unit],$rows[cug_charge_unit],$rows[fav_charge_unit],"----",$rows[cf_cug_charge_unit],$rows[cf_fav_charge_unit],$rows[cug_fav_charge_unit],$rows[cf_cug_fav_charge_unit]);
*/
$arr_editfieldAmount = array("cf_charge_amount","roaming_charge_amount","cc_charge_amount","cug_charge_amount","fav_charge_amount","fav_change_charge","cf_cug_charge_amount","cf_fav_charge_amount","cug_fav_charge_amount","cf_cug_fav_charge_amount","pool_account_change_charge","pool_call_amount","act_free_sms_charge","deact_free_sms_charge");
$arr_editfieldUnit = array("cf_charge_unit","roaming_charge_unit","cc_charge_unit","cug_charge_unit","fav_charge_unit","","cf_cug_charge_unit","cf_fav_charge_unit","cug_fav_charge_unit","cf_cug_fav_charge_unit","","pool_call_unit","","");
$arr_description = array($strCallForwrd,$strRoaming,$strConferenceCall,$strCloseUserGroup,$strFav_call,"Friends and family number change fee",$strCf_Cug_call,$strCf_Fav_call,$strCug_Fav_call,$strCf_Cug_Fav_call,"Pool account change fee","Pool call","Active free SMS charge","Deactive free SMS charge");
$arr_amount = array($rows[cf_charge_amount],$rows[roaming_charge_amount],$rows[cc_charge_amount],$rows[cug_charge_amount],$rows[fav_charge_amount],$rows[fav_change_charge],$rows[cf_cug_charge_amount],$rows[cf_fav_charge_amount],$rows[cug_fav_charge_amount],$rows[cf_cug_fav_charge_amount],$rows[pool_account_change_charge],$rows[pool_call_amount],$rows[act_free_sms_charge],$rows[deact_free_sms_charge]);
$arr_unit = array($rows[cf_charge_unit],$rows[roaming_charge_unit],$rows[cc_charge_unit],$rows[cug_charge_unit],$rows[fav_charge_unit],"----",$rows[cf_cug_charge_unit],$rows[cf_fav_charge_unit],$rows[cug_fav_charge_unit],$rows[cf_cug_fav_charge_unit],"----",$rows[pool_call_unit],"----","----");
for ($i=0;$i<14;$i++){
echo "<tr>";
echo "<td>$arr_description[$i]</td>";
echo "<td align=\"right\">$arr_amount[$i]</td>";
/*if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>", $arr_amount[$i]/$moneyPara);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>", $arr_amount[$i]/$moneyPara);
}
else{
printf("<td align=\"right\">%5.2f</td>", $arr_amount[$i]/$moneyPara);
}*/
echo "<td align =\"right\">&nbsp;$arr_unit[$i]</td>";
echo "</tr>";
echo $tariffID;
}
?>
</table>
<?php
adjust_content_tail();
?>
</body>
</html>
+160
View File
@@ -0,0 +1,160 @@
<?php
/*********************************************************
程序说明:
功能说明:列表显示折扣表信息
调用关系:调用: header.inc
被调用:
变量说明:
作者:Cui Ticun 2004-04-13
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$helpId = "2.2..3.3";
$ppsDb='PPS_DB';
$tableName='bill_discount';
$strThisPage=$strTitleAccount.$strTitleSpace.$strTariffPlan.$strTitleSpace.$strDiscount;
/*
$strCallInsideZone ="小区通话";
$strCallOutsideZone ="区外市话";
$strDomesticLongCall ="国内长途";
$strInternationalLongCall ="国际长途";
$strLongCallToHKOMTW ="港澳台长途";
*/
$order="hours"; //排序
$sql = "SELECT * FROM $tableName ORDER BY $order";
$result=mysqli_query($pubConn,$sql);
$rows = mysqli_fetch_array($result);
?>
<body>
<?php
echo "<table border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strThisPage";
echo "</td>";
echo "<td width=\"50%\" align=\"right\">";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "</table>";
echo "<p></p>";
//没有纪录时,显示无记录提示
if(!$rows){
echo "$strNotFindRecord";
exit();
}
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tbody>
<tr bgcolor="#E6E6E6">
<td align="center"><?php echo "$strTariffDiscountTimeSection"; ?></td>
<td align="center"><?php echo $strMonday; ?></td>
<td align="center"><?php echo $strTuesday; ?></td>
<td align="center"><?php echo $strWednesday; ?></td>
<td align="center"><?php echo $strThursday; ?></td>
<td align="center"><?php echo $strFriday; ?></td>
<td align="center"><?php echo $strSaturday; ?></td>
<td align="center"><?php echo $strSunday; ?></td>
<td align="center"><?php echo $strSpecialDay; ?></td>
</tr>
<?php
$record_length = 0;
do
{
echo "<tr>";
$hours=$rows[hours];
if(strlen($hours) < 2) $hours='0'.$hours;
if(strlen($hours+1) < 2)
{
$next_hours='0'.($hours+1);
}
else
{
$next_hours=$hours+1;
}
$mon=change2point($rows[mon]/100);
$tue=change2point($rows[tue]/100);
$wed=change2point($rows[wed]/100);
$thu=change2point($rows[thu]/100);
$fri=change2point($rows[fri]/100);
$sat=change2point($rows[sat]/100);
$sun=change2point($rows[sun]/100);
$holiday=change2point($rows[holiday]/100);
echo "<td align=center>$hours:00:00 - $next_hours:00:00</td>";
echo "<td align=center>$mon</td>";
echo "<td align=center>$tue</td>";
echo "<td align=center>$wed</td>";
echo "<td align=center>$thu</td>";
echo "<td align=center>$fri</td>";
echo "<td align=center>$sat</td>";
echo "<td align=center>$sun</td>";
echo "<td align=center>$holiday</td>";
echo "</tr>";
$record_length++;
}
while($rows = @mysqli_fetch_array($result));
//初始化折扣表,管理员没有设置折扣时,系统自动将各时段的折扣设为100%
for($i=$record_length;$i<24;$i++){
$hours=$i;
$defaultDiscount=100;
$setSql="INSERT INTO $tableName
(hours,mon,tue,wed,thu,fri,sat,sun,holiday)
VALUES ('$i','$defaultDiscount','$defaultDiscount','$defaultDiscount','$defaultDiscount','$defaultDiscount','$defaultDiscount','$defaultDiscount','$defaultDiscount')";
if($DEBUG) echo "<br>setSql=$setSql";
$result= @mysqli_query($pubConn,$setSql);
//echo mysqli_error($pubConn);
//echo "<br>sql=$sql";
if(strlen($hours) < 2) $hours='0'.$hours;
if(strlen($hours+1) < 2)
{
$next_hours='0'.($hours+1);
}
else
{
$next_hours=$hours+1;
}
$mon=change2point($rows[mon]/100);
$tue=change2point($rows[tue]/100);
$wed=change2point($rows[wed]/100);
$thu=change2point($rows[thu]/100);
$fri=change2point($rows[fri]/100);
$sat=change2point($rows[sat]/100);
$sun=change2point($rows[sun]/100);
$holiday=change2point($rows[holiday]/100);
echo "<tr>";
echo "<td align=center>$hours:00:00 - $next_hours:00:00</td>";
echo "<td align=center>$mon</td>";
echo "<td align=center>$tue</td>";
echo "<td align=center>$wed</td>";
echo "<td align=center>$thu</td>";
echo "<td align=center>$fri</td>";
echo "<td align=center>$sat</td>";
echo "<td align=center>$sun</td>";
echo "<td align=center>$holiday</td>";
echo "</tr>";
}
//
?>
</tbody>
</table>
</body>
</html>
+154
View File
@@ -0,0 +1,154 @@
<?php
/*********************************************************
程序说明:
功能说明:列表显示折扣表信息
调用关系:调用: header.inc
被调用:
变量说明:
作者:
修改注释:
NO.1
姓名: Lilong
时间:2004-4-13
修改说明: support 16 discount ID.
*********************************************************/
require("../../inc/header.inc");
$helpId = "2.2.3.3";
$DEBUG = 0;
$ppsDb='PPS_DB';
$objDbConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'],$ppsDb);
$tbName='bill_discount';
$strThisPage=$strTitleAccount.$strTitleSpace.$strCurrentTariff.$strTitleSpace.$strDiscount;
$order="hours"; //排序
if($DEBUG) echo "discount_id=$discount_id<br>";
if( FALSE == isset($discount_id) ){
$discount_id = 00;
}
/*
//insert discount to table while the time segment is NULL
$countSql = "SELECT count(*) as total FROM $tbName WHERE discount_id=$discount_id";
if($DEBUG) echo "countSql=$countSql<br>";
$countRes = mysqli_query($pubConn,$countSql);
$countRows = mysqli_fetch_array($countRes);
echo "countRows[total]=$countRows[total]<br>";
if($countRows[total]<24){
}
exit();
*/
//select current discount id details from TABLE "pre_bill_discount"
$selSql = "SELECT * FROM $tbName WHERE discount_id=$discount_id ORDER BY $order";
if($DEBUG) echo "selSql=$selSql<br>";
$selRes = mysqli_query($objDbConn,$selSql);
$selRows = mysqli_fetch_array($selRes);
?>
<base>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<form method="POST" action="$PHP_SELF" name="selectform">
<?php
adjust_head();
adjust_title_head();
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strThisPage";
echo "</td>";
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=\"left\">";
echo "&nbsp;";
echo "</td>";
echo "<td align=\"right\">";
echo "Discount ID:&nbsp;";
echo "<select size=\"1\" name=\"discount_id\" onChange=\"javascript:selectTitle()\">";
for($i=0;$i<32;$i++){
$m=($i<10?"0":"").$i;
if($m != $discount_id){
echo "<option value=\"$m\">$m</option>";
}else{
echo "<option value=\"$m\" selected>$m</option>";
}
}
echo "</select>";
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
echo "<br>";
?>
<script LANGUAGE="JavaScript">
function selectTitle(){
var base_url,url_add,url;
base_url='<?php echo "$PHP_SELF?discount_id=";?>';
url_add=document.selectform.discount_id.value;
url=base_url+url_add;
window.location=url;
}
</script>
</form>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<td align="center"><?php echo "$strTariffDiscountTimeSection"; ?></td>
<td align="center"><?php echo $strMonday; ?></td>
<td align="center"><?php echo $strTuesday; ?></td>
<td align="center"><?php echo $strWednesday; ?></td>
<td align="center"><?php echo $strThursday; ?></td>
<td align="center"><?php echo $strFriday; ?></td>
<td align="center"><?php echo $strSaturday; ?></td>
<td align="center"><?php echo $strSunday; ?></td>
<td align="center"><?php echo $strSpecialDay; ?></td>
</tr>
<?php
do{
echo "<tr>";
$hours=$selRows[hours];
if(strlen($hours) < 2) $hours='0'.$hours;
if(strlen($hours+1) < 2){
$next_hours='0'.($hours+1);
}else{
$next_hours=$hours+1;
}
$mon=change2point($selRows[mon]/100);
$tue=change2point($selRows[tue]/100);
$wed=change2point($selRows[wed]/100);
$thu=change2point($selRows[thu]/100);
$fri=change2point($selRows[fri]/100);
$sat=change2point($selRows[sat]/100);
$sun=change2point($selRows[sun]/100);
$holiday=change2point($selRows[holiday]/100);
echo "<td align=center>$hours:00:00 - $next_hours:00:00</td>";
echo "<td align=center>$mon</td>";
echo "<td align=center>$tue</td>";
echo "<td align=center>$wed</td>";
echo "<td align=center>$thu</td>";
echo "<td align=center>$fri</td>";
echo "<td align=center>$sat</td>";
echo "<td align=center>$sun</td>";
echo "<td align=center>$holiday</td>";
echo "</tr>";
}while($selRows = @mysqli_fetch_array($selRes));
?>
</table>
<?php
adjust_content_tail();
?>
</body>
</html>
+84
View File
@@ -0,0 +1,84 @@
<?php
/*********************************************************
文件说明:
功能说明:节假日列表
调用关系:调用:header.inc
被调用:实现各个功能模块的页面
变量说明:
作者:
NO.1
姓名:Cui Ticun
时间:2004-04-13
修改说明:Support OMC7.0
*********************************************************/
require("../../inc/header.inc");
$helpId = "2.2.3.4";
$ppsDb='PPS_DB';
$objDbConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'],$ppsDb);
$tableName='bill_holiday';
$arr_mode=array("edit","add");
$strThisPage=$strTitleAccount.$strTitleSpace.$strCurrentTariff.$strTitleSpace.$strHoliday;
$sql="SELECT *
FROM $tableName
ORDER BY 'month','day'";
$result=mysqli_query($objDbConn,$sql);
$rows=mysqli_fetch_array($result);
?>
<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();
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strThisPage";
echo "</td>";
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
echo "<br>";
/*
//没有纪录时,显示无记录提示
if(!$rows){
echo "$strNotFindRecord";
exit();
}
*/
?>
<table border="1" width="400" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<td align="center" width="40%"><?php echo $strDate; ?>(mm-dd)</td>
<td align="center" width="60%"><?php echo $strDescription; ?></td>
</tr>
<?php
$i=0;
do
{
echo "<tr>";
$id=$rows[id];
$month=omc_keep_length($rows[month],0,2);
$day=omc_keep_length($rows[day],0,2);
$showDate=$month."-".$day;
$rows[name]=$rows[name]?$rows[name]:'--';
echo "<td align=\"center\">$showDate</td>";
echo "<td align=\"center\">$rows[name]</td>";
echo "</tr>";
$i++;
}while($rows=mysqli_fetch_array($result));
?>
</table>
<?php
adjust_content_tail();
?>
</body>
</html>
+390
View File
@@ -0,0 +1,390 @@
<?php
/*********************************************************
程序说明:
功能说明:列表显示被叫计费号码信息
调用关系:调用: header.inc
被调用:
变量说明
作者:崔体存 2004-04-13
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
$DEBUG = 0;
require("../../inc/header.inc");
$helpId = "2.2.3.2";
$db='PPS_DB';
$table_name='mt_tariff';
$objDbConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'],$db);
$strThisPage=$strTitleAccount.$strTitleSpace.$strCurrentTariff.$strTitleSpace.$strMtTariff;
$arr_mode=array("edit","add");
if(!$sort_field){
$sort_field = 'bill_id'; //排序所依赖的字段名
}
$sort_direction = 'ASC '; //排序顺序
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
//echo "<br>moneyPara = $moneyPara";
if($add_area){
echo " <meta http-equiv=\"refresh\" content=\"0; url=./rate_modify.php?add_area=1\"> ";
exit();
}
//编辑后保持对应tariff_id的页面
if ($keep_id != 1){
$tariff_id=isset($tariff_id)?$tariff_id:'00';
}
else {$tariff_id=$return_tariff_id;}
if($DEBUG) {echo "<br>keep_id=$keep_id<br>tariff_id=$return_tariff_id<br>";}
$where=" WHERE tariff_id=$tariff_id ";
//echo "<br>where=$where";
$str_sql ="SELECT count(*) FROM $table_name ".$where;
// echo "<br>str_sql=$str_sql";
$result=mysqli_query($objDbConn,$str_sql);
$record = mysqli_fetch_array($result);
$number_of_records = $record[0];
$order = " ORDER BY $sort_field $sort_direction ";
$sel_sql ="SELECT * FROM $table_name ".$where.$order;
//echo "<br>sel_sql=$sel_sql";
$result = @mysqli_query($objDbConn,$sel_sql);
$rows = @mysqli_fetch_array($result);
echo mysqli_error($objDbConn);
?>
<base>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<form method="POST" name="selectform" action="<?php echo "$PHP_SELF";?>">
<?php
adjust_head();
adjust_title_head();
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strThisPage";
echo "</td>";
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=\"left\">";
echo "$strTotal&nbsp;$strDisplayRecords:<FONT color=blue>&nbsp;$number_of_records</FONT>";
echo "</td>";
echo "<td align=\"right\">";
echo "$strResideZone:&nbsp;";
$maxCosSql = " SELECT pubVarValue FROM OMC_PUB.omcPubVarConf WHERE pubVarName = 'maxCOSNumber' ";
$maxCosRes = @mysqli_query($pubConn,$maxCosSql);
$maxCosRow = @mysqli_fetch_array($maxCosRes);
$maxCosNum = $maxCosRow[pubVarValue];
echo "<select size=\"1\" name=\"tariff_id\" onChange=\"javascript:selectTitle()\">";
for($i=0;$i<$maxCosNum;$i++){
$m=($i<10?"0":"").$i;
if($m != $tariff_id){
echo "<option value=\"$m\">$m</option>";
}else{
echo "<option value=\"$m\" selected>$m</option>";
}
}
echo "</select>";
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
echo "<br>";
?>
<script LANGUAGE="JavaScript">
function selectTitle(){
var base_url,url_add,url;
base_url='<?php echo "$PHP_SELF?tariff_id=";?>';
url_add=document.selectform.tariff_id.options[document.selectform.tariff_id.selectedIndex].value;
url=base_url+url_add;
window.location=url;
}
</script>
<?php
//没有纪录时,显示无记录提示
if(!$rows)
{
echo "<br>&nbsp;";
echo "$strTariffNoRecords $tariff_id"."!";
exit();
}
?>
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
<tr bgcolor="#E6E6E6" valign="top">
<?php
// echo "<td>$strResideZone</td>";
echo "<td><a href=\"$PHP_SELF?tariff_id=$tariff_id&where=$where&sort_field=bill_id\" target=\"_self\">$strChargingPrefix</a></td>";
echo "<td><a href=\"$PHP_SELF?tariff_id=$tariff_id&where=$where&sort_field=area\" target=\"_self\">Country<br>/District</a></td>";
echo "<td >Call<br>type</td>";
echo "<td >Discount<br>ID</td>";
echo "<td >$strUnitChargingTimeSecond</td>";
echo "<td >$strFreeChargeUnit</td>";
echo "<td >$strMinimumChargingUnit</td>";
echo "<td >$strBasicInitial</td>";
echo "<td >Tier Level</td>";
echo "<td >Tier0 Unit</td>";
echo "<td >$strBasicFee</td>";
echo "<td >$strBasicLongDistance</td>";
echo "<td >Tier1 Unit</td>";
echo "<td >$strBasicFee</td>";
echo "<td >$strBasicLongDistance</td>";
echo "<td >Tier2 Unit</td>";
echo "<td >$strBasicFee</td>";
echo "<td >$strBasicLongDistance</td>";
?>
</tr>
<?php
do{
echo "<tr>";
// echo "<td>$rows[tariff_id]</td>";
echo "<td>$rows[bill_id]&nbsp;</td>";
echo "<td>$rows[area]&nbsp</td>";
if($rows[call_type]==4)
echo "<td>Local call in</td>";
elseif($rows[call_type]==5)
echo "<td>Trunk call in</td>";
else
echo "<td align=\"right\">---</td>";
echo "<td align=\"right\">$rows[discount_id]</td>";
echo "<td align=\"right\">$rows[unit_time]</td>";
echo "<td align=\"right\">$rows[free_time]</td>";
echo "<td align=\"right\">$rows[mini_time]</td>";
//echo "<td align=\"right\">$rows[base_fee]</td>";
//echo "<td align=\"right\">$rows[long_distance_fee]</td>";
echo "<td align=\"right\">$rows[adjustment]</td>";
echo "<td align=\"right\">$rows[tier_level]</td>";
echo "<td align=\"right\">$rows[tier_unit_0]</td>";
echo "<td align=\"right\">$rows[base_fee_0]</td>";
echo "<td align=\"right\">$rows[long_distance_fee_0]</td>";
echo "<td align=\"right\">$rows[tier_unit_1]</td>";
echo "<td align=\"right\">$rows[base_fee_1]</td>";
echo "<td align=\"right\">$rows[long_distance_fee_1]</td>";
echo "<td align=\"right\">$rows[tier_unit_2]</td>";
echo "<td align=\"right\">$rows[base_fee_2]</td>";
echo "<td align=\"right\">$rows[long_distance_fee_2]</td>";
/* $base_fee=$rows[base_fee]/$moneyPara;
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>",$base_fee);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>",$base_fee);
}
else{
printf("<td align=\"right\">%5.2f</td>",$base_fee);
}
$long_distance_fee=$rows[long_distance_fee]/$moneyPara;
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>", $long_distance_fee);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>", $long_distance_fee);
}
else{
printf("<td align=\"right\">%5.2f</td>", $long_distance_fee);
}
$adjustment_fee=$rows[adjustment]/$moneyPara;
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>", $adjustment_fee);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>", $adjustment_fee);
}
else{
printf("<td align=\"right\">%5.2f</td>", $adjustment_fee);
}*/
echo "</tr>";
}while($rows = mysqli_fetch_array($result));
?>
</table>
<?php
//--------MMS Retrieve--------------
echo "<br><b>MMS Retrieve</b><p>";
echo "<table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
echo "<tr bgcolor=\"#E6E6E6\">";
echo "<td align=\"center\">ID</td>";
echo "<td align=\"center\">Prefix</td>";
echo "<td align=\"center\">Call type</td>";
echo "<td align=\"center\">Dest name</td>";
echo "<td align=\"center\">Discount ID</td>";
echo "<td align=\"center\">Charge fee</td>";
echo "<td align=\"center\">Cap flag</td>";
echo "</tr>";
$tableName="PPS_DB.vas_mms_retrieve_tariff";
$sql="select * from $tableName where tariff_id=$tariff_id order by mms_retrieve_id asc ";
$res=@mysqli_query($objDbConn,$sql);
$num=@mysqli_num_rows($res);
$mms_retrieve_cap_flag_label=array(0=>"Disable",1=>"Enable");
$mms_retrieve_call_type_label=array(4=>"Local call in",5=>"Trunk call in");
for($i=0;$i<$num;$i++)
{
$row=@mysqli_fetch_array($res);
echo "<tr>";
//ID
$mms_retrieve_id=$row[mms_retrieve_id];
echo "<td align=\"center\">";
echo "$mms_retrieve_id";
echo "</td>";
//Prefix
echo "<td align=\"center\">";
if(trim($row[prefix]) == "")
echo "--";
else
echo "{$row[prefix]}";
echo "</td>";
//Call type
echo "<td align=\"center\">";
echo "{$mms_retrieve_call_type_label[$row[call_type]]}&nbsp;";
echo "</td>";
//Dest name
echo "<td align=\"center\">";
if(trim($row[dest_name]) == "")
echo "--";
else
echo "{$row[dest_name]}";
echo "</td>";
//Discount ID
echo "<td align=\"center\">";
echo "{$row[discount_id]}&nbsp;";
echo "</td>";
//Charge fee
echo "<td align=\"center\">";
echo "{$row[charge_fee]}&nbsp;";
echo "</td>";
//Cap flag
echo "<td align=\"center\">";
echo "{$mms_retrieve_cap_flag_label[$row[cap_flag]]}&nbsp;";
echo "</td>";
echo "</tr>";
}
//echo "tariff_id=$tariff_id<br>";
echo "</table>";
?>
<?php
//--------MMS Email--------------
echo "<br><b>MMS Email</b><p>";
echo "<table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
echo "<tr bgcolor=\"#E6E6E6\">";
echo "<td align=\"center\">ID</td>";
echo "<td align=\"center\">Prefix</td>";
echo "<td align=\"center\">Call type</td>";
echo "<td align=\"center\">Dest name</td>";
echo "<td align=\"center\">Discount ID</td>";
echo "<td align=\"center\">Charge fee</td>";
echo "<td align=\"center\">Cap flag</td>";
echo "</tr>";
$tableName="PPS_DB.vas_mms_email_tariff";
$sql="select * from $tableName where tariff_id=$tariff_id order by email_id asc ";
$res=@mysqli_query($objDbConn,$sql);
$num=@mysqli_num_rows($res);
$email_cap_flag_label=array(0=>"Disable",1=>"Enable");
$email_call_type_label=array(4=>"Local call in",5=>"Trunk call in");
for($i=0;$i<$num;$i++)
{
$row=@mysqli_fetch_array($res);
echo "<tr>";
//ID
$email_id=$row[email_id];
echo "<td align=\"center\">";
echo "$email_id";
echo "</td>";
//Prefix
echo "<td align=\"center\">";
if(trim($row[prefix]) == "")
echo "--";
else
echo "{$row[prefix]}";
echo "</td>";
//Call type
echo "<td align=\"center\">";
echo "{$email_call_type_label[$row[call_type]]}&nbsp;";
echo "</td>";
//Dest name
echo "<td align=\"center\">";
if(trim($row[dest_name]) == "")
echo "--";
else
echo "{$row[dest_name]}";
echo "</td>";
//Discount ID
echo "<td align=\"center\">";
echo "{$row[discount_id]}&nbsp;";
echo "</td>";
//Charge fee
echo "<td align=\"center\">";
echo "{$row[charge_fee]}&nbsp;";
echo "</td>";
//Cap flag
echo "<td align=\"center\">";
echo "{$email_cap_flag_label[$row[cap_flag]]}&nbsp;";
echo "</td>";
echo "</tr>";
}
//echo "tariff_id=$tariff_id<br>";
echo "</table>";
?>
</form>
<?php
adjust_content_tail();
?>
</body>
</html>
+274
View File
@@ -0,0 +1,274 @@
<?php
/*********************************************************
程序说明:
功能说明:download current tariff or tariff plan form PPS
调用关系:调用: header.inc
被调用:
变量说明:
作者:
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
?>
<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();
$helpId = "2.49";
$DEBUG=0;
global $pubConn,$OMC_server;
//==========================================================
//变量定义
//==========================================================
$db='PPS_DB';
$dbConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], "PPS_DB");
$sysTypeNo = 360;
$pagePath=$strTitleAdvanced.$strTitleSpace.$strRateAdmin.$strTitleSpace.$strRefresh;
//==========================================================
//输入变量
//==========================================================
$downloadCurrent = $_REQUEST['downloadCurrent'];
$downloadPlan = $_REQUEST['downloadPlan'];
if($DEBUG) echo "<br>downloadCurrent = ".$_REQUEST['downloadCurrent'];
if($DEBUG) echo "<br>downloadPlan = ".$_REQUEST['downloadPlan'];
//==========================================================
//数据处理
//==========================================================
$ftpInfo=getMSSFtpAccount();
if($DEBUG) print_r($ftpInfo);
if($downloadCurrent||$downloadPlan){
echo "<br><br><br><br><br>";
adjust_title_tail();
adjust_content_head();
//找到适合的子系统
$getSysIdSql = "SELECT sysNo,subSysNo,ip
FROM sysInfo
WHERE sysTypeNo='$sysTypeNo' AND baseStat > '0'
ORDER BY sysNo ASC,subSysNo ASC
";
if($DEBUG) echo "<br>getSysIdSql=$getSysIdSql";
$getSysIdResult= mysqli_query($pubConn,$getSysIdSql);
echo mysqli_error($pubConn);
if(mysqli_num_rows($getSysIdResult) <= 0) {
echo "<br>Sorry, All the PPS's status are abnormal!";
exit();
}
$getSysIdRow=mysqli_fetch_array($getSysIdResult);
$sysId=$sysTypeNo.'_'.$getSysIdRow[sysNo].'_'.$getSysIdRow[subSysNo];
$sysName='PPS_'.$getSysIdRow[sysNo].'_'.$getSysIdRow[subSysNo];
if($DEBUG) echo "<br>sysId = $sysId";
$dstSeverIp = $getSysIdRow[ip];
if($DEBUG) echo "<br>dstSeverIp = $dstSeverIp";
//下载数据
/* close ftp
$con=@ftp_connect($dstSeverIp);
*/
$connection=sftp_connect($dstSeverIp);
if($DEBUG)echo "<br>con=$con";
//login pps server
$loginName = $ftpInfo[UserName];
$password = $ftpInfo[Password];
/* close ftp
$log=@ftp_login($con,$loginName,$password);
if($DEBUG)echo "<br>log=$log";
if(!$log){
echo "<br><font>Fail to connect $dstSeverIp.</font>";
echo "<br><br><a href=\"./refresh.php\">$strBack</a>";
exit();
}
*/
$key=sftp_login($connection,$loginName,$password);
if(!$key)
{
echo "<br><font>Fail to connect $dstSeverIp.</font>";
echo "<br><br><a href=\"./refresh.php\">$strBack</a>";
exit();
}
$mode=FTP_ASCII;
$remoteFile[0] ='/usr/local/subsManage/rent.csv';
$remoteFile[1] ='/usr/local/subsManage/bill_sms.csv';
$remoteFile[2] ='/usr/local/subsManage/bill_discount.csv';
$remoteFile[3] ='/usr/local/subsManage/bill_holiday.csv';
$remoteFile[4] ='/usr/local/subsManage/comm_tariff.csv';
$remoteFile[5] ='/usr/local/subsManage/mo_tariff.csv';
$remoteFile[6] ='/usr/local/subsManage/mt_tariff.csv';
$remoteFile[7] ='/usr/local/subsManage/gprs_tariff.csv';
$remoteFile[8] ='/usr/local/subsManage/vas_mms_email_tariff.csv';
$remoteFile[9] ='/usr/local/subsManage/vas_mms_retrieve_tariff.csv';
$remoteFile[10] ='/usr/local/subsManage/vas_mms_send_tariff.csv';
$localFile[0] ='/usr/local/apache/htdocs/ftpFile/rent.csv';
$localFile[1] ='/usr/local/apache/htdocs/ftpFile/bill_sms.csv';
$localFile[2] ='/usr/local/apache/htdocs/ftpFile/bill_discount.csv';
$localFile[3] ='/usr/local/apache/htdocs/ftpFile/bill_holiday.csv';
$localFile[4] ='/usr/local/apache/htdocs/ftpFile/comm_tariff.csv';
$localFile[5] ='/usr/local/apache/htdocs/ftpFile/mo_tariff.csv';
$localFile[6] ='/usr/local/apache/htdocs/ftpFile/mt_tariff.csv';
$localFile[7] ='/usr/local/apache/htdocs/ftpFile/gprs_tariff.csv';
$localFile[8] ='/usr/local/apache/htdocs/ftpFile/vas_mms_email_tariff.csv';
$localFile[9] ='/usr/local/apache/htdocs/ftpFile/vas_mms_retrieve_tariff.csv';
$localFile[10] ='/usr/local/apache/htdocs/ftpFile/vas_mms_send_tariff.csv';
if($downloadCurrent){
$dstTable[0]="rent";
$dstTable[1]="bill_sms";
$dstTable[2]="bill_discount";
$dstTable[3]="bill_holiday";
$dstTable[4]="comm_tariff";
$dstTable[5]="mo_tariff";
$dstTable[6]="mt_tariff";
$dstTable[7]="gprs_tariff";
$dstTable[8]="vas_mms_email_tariff";
$dstTable[9]="vas_mms_retrieve_tariff";
$dstTable[10]="vas_mms_send_tariff";
}else{
$dstTable[0]="pre_rent";
$dstTable[1]="pre_bill_sms";
$dstTable[2]="pre_bill_discount";
$dstTable[3]="pre_bill_holiday";
$dstTable[4]="pre_comm_tariff";
$dstTable[5]="pre_mo_tariff";
$dstTable[6]="pre_mt_tariff";
$dstTable[7]="pre_gprs_tariff";
$dstTable[8]="pre_vas_mms_email_tariff";
$dstTable[9]="pre_vas_mms_retrieve_tariff";
$dstTable[10]="pre_vas_mms_send_tariff";
}
$fileNum = count($remoteFile);
for($i=0;$i<$fileNum;$i++){
/* close ftp
$getRes[$i]=ftp_get($con,$localFile[$i],$remoteFile[$i],$mode);
*/
//$getRes[$i]=sftp_get($key,$localFile[$i],$remoteFile[$i],SFTP_ASCII);
$getRes[$i]=sftp_get($connection,$localFile[$i],$remoteFile[$i],SFTP_ASCII);
if($DEBUG)echo "<br>getRes[$i]=$getRes[$i]";
if($getRes[$i]){
echo "<br>Download $remoteFile[$i] from $sysName($dstSeverIp) ..... <font color=\"#0000FF\" >ok</font>";
$delSql = " DELETE FROM $dstTable[$i] ";
$delRes = mysqli_query($dbConn,$delSql);
$loadSql = "LOAD DATA INFILE '$localFile[$i]' REPLACE
INTO TABLE $dstTable[$i]
FIELDS
TERMINATED BY ','
LINES
TERMINATED BY '\n'
";
//echo "<br>loadSql=$loadSql";
$loadRes = mysqli_query($dbConn,$loadSql);
if($loadRes){
echo "<br>Load $localFile[$i] into OMC $dstTable[$i]..... <font color=\"#0000FF\" >ok</font>";
}else{
$noSuccess=1;
echo "<br>Load $localFile[$i] into OMC $dstTable[$i]..... <font color=\"#FF0000\" >Failed</font>";
}
}else{
$noSuccess=1;
echo "<br>Download $remoteFile[$i] from $sysName($dstSeverIp) ..... <font color=\"#FF0000\" >Failed</font>";
}
echo "<br>";
}
if($noSuccess){
if($downloadCurrent)
insertLog("Download CURRENT TARIFF FAILURE");
else
insertLog("Download TARIFF PLAN FAILURE");
}else{
if($downloadCurrent)
insertLog("Download CURRENT TARIFF SUCCESS");
else
insertLog("Download TARIFF PLAN SUCCESS");
}
echo "<br><br><br><br><a href=\"$PHP_SELF\"> &nbsp;&nbsp;<< Return </a>";
adjust_content_tail();
exit();
}
//==========================================================
//输出并显示数据
//==========================================================
?>
<?php
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$pagePath";
echo "</td>";
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
echo "<br>";
?>
<form method="POST" action="<?php echo "$PHP_SELF";?>" name="updateTariff">
<?php
echo "<table border=\"1\" width=\"50%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
echo "<tr bgcolor=\"#E6E6E6\">";
echo "<td>";
if ($selectedLanguage == 'eng')
echo "<font>Please download current tariff from PPS.</font>";
elseif ($selectedLanguage == 'chn')
echo "<font>请从PPS下载当前费率.</font>";
echo "</td>";
echo "</tr>";
?>
<tr>
<td>
<input type="submit" name="downloadCurrent" value="<?php echo "$strDownload";?>" class="button">
</td>
</tr>
<tr bgcolor="#E6E6E6">
<td>
<?php
if ($selectedLanguage == 'eng')
echo "<font>Please download tariff plan from PPS.</font>";
elseif ($selectedLanguage == 'chn')
echo "<font>请从PPS下载费率计划.</font>";
?>
</td>
</tr>
<tr>
<td>
<input type="submit" name="downloadPlan" value="<?php echo "$strDownload";?>" class="button">
</td>
</tr>
</form>
<?php
adjust_content_tail();
?>
</body>
</html>
+79
View File
@@ -0,0 +1,79 @@
<?php
/*********************************************************
文件说明:
功能说明:修改基本费率
调用关系:调用:header.inc
被调用:实现各个功能模块的页面
变量说明:
作者:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$helpId = "2.2.3.3.5";
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$ppsDb='PPS_DB';
$tableName='comm_tariff';
$strPageTitle=$strTitleConfiguration.$strTitleSpace."PPS".$strTitleSpace.$strCurrentTariff.$strTitleSpace."Multiple services";
$sql="SELECT * FROM $tableName";
//echo $sql,$bill_db;
$result=mysqli_query($pubConn,$sql);
$rows=mysqli_fetch_array($result);
echo mysqli_error($pubConn);
?>
<body>
<?php
echo "<table border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strPageTitle";
echo "</td>";
echo "<td width=\"50%\" align=\"right\">";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "</table>";
echo "<p></p>";
//没有纪录时,显示无记录提示
if(!$rows){
echo "$strNotFindRecord";
exit();
}
?>
<table border="1" width="400" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<?php
echo "<tr bgcolor=\"#E6E6E6\">";
echo "<td width=\"40%\">$strDescription</td>";
echo "<td align =\"right\" width=\"30%\">$strTariffRentChargeAmount</td>";
echo "<td align =\"right\" width=\"30%\">$strUnitChargingTimeSecond</td>";
echo "</tr>";
$arr_description = array($strSMS,$strCallForwrd,$strRoaming,$strConferenceCall,$strCloseUserGroup);
$arr_amount = array($rows[sm_charge_amount],$rows[cf_charge_amount],$rows[roaming_charge_amount],$rows[cc_charge_amount],$rows[cug_charge_amount]);
$arr_unit = array("--",$rows[cf_charge_unit],$rows[roaming_charge_unit],$rows[cc_charge_unit],$rows[cug_charge_unit]);
for ($i=0;$i<5;$i++){
echo "<tr>";
echo "<td>$arr_description[$i]</td>";
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>", $arr_amount[$i]/$moneyPara);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>", $arr_amount[$i]/$moneyPara);
}
else{
printf("<td align=\"right\">%5.2f</td>", $arr_amount[$i]/$moneyPara);
}
//echo "<td>$arr_amount[$i]</td>";
echo "<td align =\"right\">$arr_unit[$i]</td>";
echo "</tr>";
}
?>
</table>
</body>
</html>
+69
View File
@@ -0,0 +1,69 @@
<?php
/*********************************************************
文件说明:
功能说明:节假日列表
调用关系:调用:header.inc
被调用:实现各个功能模块的页面
变量说明:
作者:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$db='PPS_DB';
$helpId = "2.2.3.3.4";
$table_name='bill_holiday';
$strThisPage=$strTitleConfiguration.$strTitleSpace."PPS".$strTitleSpace.$strCurrentTariff.$strTitleSpace.$strSpecialDay;
$sql="SELECT *
FROM $table_name
ORDER BY 'month','day'";
$result=mysqli_query($pubConn,$sql);
$rows=mysqli_fetch_array($result);
?>
<body>
<?php
echo "<table border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strThisPage";
echo "</td>";
echo "<td width=\"50%\" align=\"right\">";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "</table>";
echo "<p></p>";
//没有纪录时,显示无记录提示
if(!$rows){
echo "$strNotFindRecord";
exit();
}
?>
<table border="1" width="400" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<td align="center" width="40%"><?php echo $strDate; ?>(mm-dd)</td>
<td align="center" width="60%"><?php echo $strDescription; ?></td>
</tr>
<?php
do
{
echo "<tr>";
$month=omc_keep_length($rows[month],0,2);
$day=omc_keep_length($rows[day],0,2);
$showDate=$month."-".$day;
$rows[name]=$rows[name]?$rows[name]:'--';
echo "<td align=\"center\">$showDate</td>";
echo "<td align=\"center\">$rows[name]</td>";
echo "</tr>";
}while($rows=mysqli_fetch_array($result));
?>
</table>
</body>
</html>
+87
View File
@@ -0,0 +1,87 @@
<?php
/*********************************************************
程序说明:
功能说明:统计呼出合乎入计费号码信息
调用关系:调用:header.inc
被调用:
变量说明
作者:崔体存 2004-04-15
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$DEBUG = 0;
$db='PPS_DB';
$strThisPage=$strTitleConfiguration.$strTitleSpace."PPS".$strTitleSpace.$strCurrentTariff.$strTitleSpace.$strBasicTariff;
$tableName='mo_tariff';
for($i=0;$i<16;$i++){
$selSql = "SELECT count(*)
FROM $tableName
WHERE tariff_id='$i'";
if($DEBUG) echo "<br>selSql=$selSql";
$result=@mysqli_query($pubConn,$selSql);
echo mysqli_error($pubConn);
$record = @mysqli_fetch_array($result);
$nMoAmount[$i] = $record[0];
if($DEBUG) echo "<br>$nMoAmount=$nMoAmount";
}
$tableName='mt_tariff';
for($i=0;$i<8;$i++){
$selSql = "SELECT count(*)
FROM $tableName
WHERE tariff_id='$i'";
if($DEBUG) echo "<br>selSql=$selSql";
$result=@mysqli_query($pubConn,$selSql);
echo mysqli_error($pubConn);
$record = @mysqli_fetch_array($result);
$nMtAmount[$i] = $record[0];
if($DEBUG) echo "<br>$nMtAmount=$nMtAmount";
}
//display
echo "<table border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strThisPage";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "<b><font size=3><p align=center>Basic tariff statistics</p></font></b>";
echo "<TABLE border=1 width=100% cellpadding=2 cellspacing=0 bordercolor=#666666 bordercolordark=#FFFFFF bgcolor=#FFFFFF>";
echo "<TR>";
echo "<TD width=25% bgcolor=#E6E6E6>MO tariff ID</TD>";
echo "<TD width=25% bgcolor=#E6E6E6>Total record</TD>";
echo "<TD width=25% bgcolor=#E6E6E6>Mt tariff ID</TD>";
echo "<TD width=25% bgcolor=#E6E6E6>Total record</TD>";
echo "</TR>";
for($i=0;$i<8;$i++){
echo "<TR>";
echo "<TD width=25% bgcolor=#E6E6E6>$i</TD>";
echo "<TD align=center>$nMoAmount[$i]</TD>";
echo "<TD width=25% bgcolor=#E6E6E6>$i</TD>";
echo "<TD align=center>$nMtAmount[$i]</TD>";
echo "</TR>";
}
for($i=8;$i<16;$i++){
echo "<TR>";
echo "<TD width=25% bgcolor=#E6E6E6>$i</TD>";
echo "<TD align=center>$nMoAmount[$i]</TD>";
echo "<TD width=25% bgcolor=#E6E6E6>--</TD>";
echo "<TD align=center>--</TD>";
echo "</TR>";
}
?>
<table width="400">
<tr>
<td>
<input type="button" name="return" value="Return" onclick=jacascript:location.href="./baseTariffList.php" class="button">&nbsp;
</td>
</tr>
</table>
+386
View File
@@ -0,0 +1,386 @@
<?php
/*********************************************************
程序说明:
功能说明:列表显示补充服务信息
调用关系:调用: header.inc
被调用:
变量说明
作者:
修改注释:
NO.1
姓名:崔体存
时间: 2004-04-14
修改说明: OMC V7.0
*********************************************************/
$DEBUG = 0;
require("../../inc/header.inc");
$helpId = "2.2.3.3.2";
$db='PPS_DB';
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$table_name='rent';
$strThisPage=$strTitleConfiguration.$strTitleSpace."PPS".$strTitleSpace.$strCurrentTariff.$strTitleSpace.$strSupplementary;
//编辑后保持对应tariff_id的页面
$tariff_id=isset($tariff_id)?$tariff_id:'00';
$sql="SELECT id,description,rent_type,charge_date,rent_amount
FROM $table_name
WHERE tariff_id=$tariff_id
ORDER by id";
//echo $sql,$bill_db;
$result=@mysqli_query($pubConn,$sql);
$rows=@mysqli_fetch_array($result);
echo mysqli_error($pubConn);
?>
<base>
<body>
<?php
echo "<table border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strThisPage";
echo "</td>";
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "</table>";
?>
<script LANGUAGE="JavaScript">
function selectTitle(){
var base_url,url_add,url;
base_url='<?php echo "$PHP_SELF?tariff_id=";?>';
url_add=document.selectform.tariff_id.options[document.selectform.tariff_id.selectedIndex].value;
url=base_url+url_add;
window.location=url;
}
</script>
<form method="POST" name="selectform" action="<?php echo "$PHP_SELF";?>">
<table border="0" width="100%" cellpadding="1" cellspacing="2" bordercolor="#666666" bordercolordark="#FFFFFF">
<tr>
<td>
<?php
echo "<b>Rent</b>";
?>
</td>
<td align="right">
<?php
echo "$strResideZone:&nbsp;";
echo "<select size=\"1\" name=\"tariff_id\" onChange=\"javascript:selectTitle()\">";
for($i=0;$i<16;$i++){
$m=($i<10?"0":"").$i;
if($m != $tariff_id){
echo "<option value=\"$m\">$m</option>";
}else{
echo "<option value=\"$m\" selected>$m</option>";
}
}
echo "</select>";
?>
</td>
</tr>
</table>
</form>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<?php
echo "<td align=\"center\">$strTariffRentID</td>";
echo "<td align=\"center\">$strDescription</td>";
echo "<td align=\"center\">$strTariffRentChargeType</td>";
echo "<td align=\"center\">$strTariffRentChargeDate</td>";
echo "<td align=\"center\">$strTariffRentChargeAmount</td>";
?>
</tr>
<?php
$i=0;
if($rows && $result){
do{
$i++;
if ($rows[description] == ''){
echo "<tr>";
echo "<td align=\"center\"><a>$i</a></td>";
echo "<td align=\"center\">--</td>";
echo "<td align=\"center\">--</td>";
echo "<td align=\"center\">--</td>";
echo "<td align=\"right\">--</td>";
echo "</tr>";
}
else{
echo "<tr>";
echo "<td align=\"center\"><a>$i</a></td>";
echo "<td align=\"center\">$rows[description]</td>";
echo "<td align=\"center\">";
if($rows[rent_type]=='00'){
echo "$strTariffRentAccordingToDate";
}else{
echo "$strTariffRentAccordingToPeriod";
}
echo "</td>";
echo "<td align=\"center\">";
if($rows[rent_type]=='01'){
echo "$rows[charge_date]";
}else{
echo "--";
}
echo "</td>";
$rows[rent_amount] = $rows[rent_amount]/$moneyPara;
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>", $rows[rent_amount]);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>", $rows[rent_amount]);
}
else{
printf("<td align=\"right\">%5.2f</td>", $rows[rent_amount]);
}
}
}while($rows=mysqli_fetch_array($result));
}
?>
</table>
<!--- Service tariff -->
<?php
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$tableName='comm_tariff';
//编辑后保持对应tariff_id的页面
$tariff_id2=isset($tariff_id2)?$tariff_id2:'00';
$where=" WHERE tariff_id=$tariff_id2 ";
$sql="SELECT * FROM $tableName".$where;
//echo $sql,$bill_db;
$result=@mysqli_query($pubConn,$sql);
$rows=@mysqli_fetch_array($result);
echo mysqli_error($pubConn);
?>
<script LANGUAGE="JavaScript">
function selectTitle2(){
var base_url2,url_add2,url2;
base_url2='<?php echo "$PHP_SELF?tariff_id2=";?>';
url_add2=document.selectform2.tariff_id2.options[document.selectform2.tariff_id2.selectedIndex].value;
url2=base_url2+url_add2;
window.location=url2;
}
</script>
<form method="POST" name="selectform2" action="<?php echo "$PHP_SELF";?>">
<table border="0" width="100%" cellpadding="1" cellspacing="2" bordercolor="#666666" bordercolordark="#FFFFFF">
<tr>
<td>
<?php
echo "<b>Service tariff</b>";
?>
</td>
<td align="right">
<?php
echo "$strResideZone:&nbsp;";
echo "<select size=\"1\" name=\"tariff_id2\" onChange=\"javascript:selectTitle2()\">";
for($i=0;$i<16;$i++){
$m=($i<10?"0":"").$i;
if($m != $tariff_id2){
echo "<option value=\"$m\">$m</option>";
}else{
echo "<option value=\"$m\" selected>$m</option>";
}
}
echo "</select>";
?>
</td>
</tr>
</table>
</form>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<?php
echo "<tr bgcolor=\"#E6E6E6\">";
echo "<td width=\"40%\">$strDescription</td>";
echo "<td align =\"right\" width=\"30%\">$strTariffRentChargeAmount</td>";
echo "<td align =\"right\" width=\"30%\">$strUnitChargingTimeSecond</td>";
echo "</tr>";
$arr_editfieldAmount = array("cf_charge_amount","roaming_charge_amount","cc_charge_amount","cug_charge_amount","fav_charge_amount","fav_change_charge");
$arr_editfieldUnit = array("cf_charge_unit","roaming_charge_unit","cc_charge_unit","cug_charge_unit","fav_charge_unit","");
$arr_description = array($strCallForwrd,$strRoaming,$strConferenceCall,$strCloseUserGroup,$strFav_call,$strFav_listedtion);
$arr_amount = array($rows[cf_charge_amount],$rows[roaming_charge_amount],$rows[cc_charge_amount],$rows[cug_charge_amount],$rows[fav_charge_amount],$rows[fav_change_charge]);
$arr_unit = array($rows[cf_charge_unit],$rows[roaming_charge_unit],$rows[cc_charge_unit],$rows[cug_charge_unit],$rows[fav_charge_unit],"----");
for ($i=0;$i<6;$i++){
echo "<tr>";
echo "<td><a>$arr_description[$i]</a></td>";
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>", $arr_amount[$i]/$moneyPara);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>", $arr_amount[$i]/$moneyPara);
}
else{
printf("<td align=\"right\">%5.2f</td>", $arr_amount[$i]/$moneyPara);
}
echo "<td align =\"right\">&nbsp;$arr_unit[$i]</td>";
echo "</tr>";
echo $tariffID;
}
?>
</table>
</body>
<!-- Discount -->
<?php
$tableName='bill_discount';
$order="hours"; //排序
if($DEBUG) echo "discount_id=$discount_id<br>";
if( FALSE == isset($discount_id) ){
$discount_id = 00;
}
//select current discount id details from TABLE "pre_bill_discount"
$selSql = "SELECT * FROM $tableName WHERE discount_id=$discount_id ORDER BY $order";
if($DEBUG) echo "selSql=$selSql<br>";
$selRes = mysqli_query($pubConn,$selSql);
$selRows = mysqli_fetch_array($selRes);
?>
<base>
<body>
<script LANGUAGE="JavaScript">
function selectTitle1(){
var base_url1,url_add1,url1;
base_url1='<?php echo "$PHP_SELF?discount_id=";?>';
url_add1=document.selectform1.discount_id.value;
url1=base_url1+url_add1;
window.location=url1;
}
</script>
<form method="POST" action="$PHP_SELF" name="selectform1">
<table border="0" width="100%" cellpadding="1" cellspacing="2" bordercolor="#666666" bordercolordark="#FFFFFF">
<tr>
<td>
<?php
echo "<b>Discount</b>";
?>
</td>
<td align="right">
<?php
echo "Discount ID:&nbsp;";
echo "<select size=\"1\" name=\"discount_id\" onChange=\"javascript:selectTitle1()\">";
for($i=0;$i<16;$i++){
$m=($i<10?"0":"").$i;
if($m != $discount_id){
echo "<option value=\"$m\">$m</option>";
}else{
echo "<option value=\"$m\" selected>$m</option>";
}
}
echo "</select>";
?>
</td>
</tr>
</table>
</form>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<td align="center"><?php echo "$strTariffDiscountTimeSection"; ?></td>
<td align="center"><?php echo $strMonday; ?></td>
<td align="center"><?php echo $strTuesday; ?></td>
<td align="center"><?php echo $strWednesday; ?></td>
<td align="center"><?php echo $strThursday; ?></td>
<td align="center"><?php echo $strFriday; ?></td>
<td align="center"><?php echo $strSaturday; ?></td>
<td align="center"><?php echo $strSunday; ?></td>
<td align="center"><?php echo $strSpecialDay; ?></td>
</tr>
<?php
do{
echo "<tr>";
$hours=$selRows[hours];
if(strlen($hours) < 2) $hours='0'.$hours;
if(strlen($hours+1) < 2){
$next_hours='0'.($hours+1);
}else{
$next_hours=$hours+1;
}
$mon=change2point($selRows[mon]/100);
$tue=change2point($selRows[tue]/100);
$wed=change2point($selRows[wed]/100);
$thu=change2point($selRows[thu]/100);
$fri=change2point($selRows[fri]/100);
$sat=change2point($selRows[sat]/100);
$sun=change2point($selRows[sun]/100);
$holiday=change2point($selRows[holiday]/100);
echo "<td align=center><a>$hours:00:00 - $next_hours:00:00</a></td>";
echo "<td align=center>$mon</td>";
echo "<td align=center>$tue</td>";
echo "<td align=center>$wed</td>";
echo "<td align=center>$thu</td>";
echo "<td align=center>$fri</td>";
echo "<td align=center>$sat</td>";
echo "<td align=center>$sun</td>";
echo "<td align=center>$holiday</td>";
echo "</tr>";
}while($selRows = @mysqli_fetch_array($selRes));
?>
</table>
</body>
<!-- Holiday -->
<?php
$tableName='bill_holiday';
$sql="SELECT *
FROM $tableName
ORDER BY 'month','day'";
$result=mysqli_query($pubConn,$sql);
$rows=mysqli_fetch_array($result);
?>
<body>
<?php
echo "<table border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td>";
echo "<br>";
echo "<b>Holiday</b>";
echo "<br>";
echo "</td>";
echo "</tr>";
echo "</table>";
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<td align="center" width="40%"><?php echo $strDate; ?>(mm-dd)</td>
<td align="center" width="60%"><?php echo $strDescription; ?></td>
</tr>
<?php
$i=0;
if($rows){
do{
echo "<tr>";
$id=$rows[id];
$month=omc_keep_length($rows[month],0,2);
$day=omc_keep_length($rows[day],0,2);
$showDate=$month."-".$day;
$rows[name]=$rows[name]?$rows[name]:'--';
echo "<td align=\"center\"><a>$showDate</a></td>";
echo "<td align=\"center\">$rows[name]</td>";
echo "</tr>";
$i++;
}while($rows=mysqli_fetch_array($result));
}
?>
</table>
</body>
+768
View File
@@ -0,0 +1,768 @@
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '00', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '01', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '02', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '03', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '04', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '05', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '06', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '07', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '08', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '09', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '10', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '11', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '12', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '13', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '14', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '15', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '16', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '17', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '18', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '19', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '20', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '21', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '22', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '23', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '24', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '25', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '26', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '27', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '28', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '29', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '30', '23', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '0', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '1', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '2', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '3', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '4', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '5', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '6', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '7', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '8', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '9', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '10', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '11', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '12', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '13', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '14', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '15', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '16', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '17', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '18', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '19', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '20', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '21', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '22', '100', '100', '100', '100', '100', '100', '100', '100');
INSERT INTO PPS_DB.pre_bill_discount VALUES ( '31', '23', '100', '100', '100', '100', '100', '100', '100', '100');
File diff suppressed because it is too large. Load diff
+64
View File
@@ -0,0 +1,64 @@
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '2', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '3', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '4', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '5', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '6', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '7', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '8', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '9', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '10', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '11', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '12', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '13', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '14', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '15', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '16', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '17', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '18', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '19', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '20', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '21', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '22', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '23', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '24', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '25', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '26', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '27', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '28', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '29', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '30', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '31', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '32', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '33', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '34', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '35', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '36', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '37', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '38', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '39', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '40', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '41', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '42', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '43', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '44', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '45', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '46', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '47', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '48', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '49', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '50', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '51', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '52', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '53', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '54', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '55', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '56', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '57', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '58', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '59', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '60', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '61', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '62', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_comm_tariff VALUES ( '63', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
+64
View File
@@ -0,0 +1,64 @@
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '0', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '1', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '2', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '3', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '4', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '5', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '6', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '7', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '8', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '9', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '10', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '11', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '12', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '13', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '14', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '15', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '16', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '17', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '18', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '19', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '20', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '21', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '22', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '23', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '24', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '25', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '26', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '27', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '28', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '29', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '30', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '31', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '32', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '33', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '34', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '35', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '36', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '37', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '38', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '39', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '40', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '41', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '42', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '43', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '44', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '45', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '46', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '47', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '48', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '49', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '50', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '51', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '52', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '53', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '54', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '55', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '56', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '57', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '58', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '59', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '60', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '61', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '62', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_gprs_tariff VALUES ( '63', '1', '0.0.0.0', '0', '0', '0', '0', '0', '0');
+64
View File
@@ -0,0 +1,64 @@
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '00', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '01', '4', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '02', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '03', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '04', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '05', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '06', '4', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '07', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '08', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '09', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '10', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '11', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '12', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '13', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '14', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '15', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '16', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '17', '4', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '18', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '19', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '20', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '21', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '22', '4', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '23', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '24', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '25', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '26', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '27', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '28', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '29', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '30', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '31', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '32', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '33', '4', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '34', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '35', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '36', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '37', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '38', '4', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '39', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '40', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '41', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '42', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '43', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '44', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '45', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '46', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '47', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '48', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '49', '4', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '50', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '51', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '52', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '53', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '54', '4', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '55', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '56', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '57', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '58', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '59', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '60', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '61', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '62', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO PPS_DB.pre_mt_tariff VALUES ( '', 'Default', '63', '0', '00', '0', '60', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
+512
View File
@@ -0,0 +1,512 @@
INSERT INTO PPS_DB.pre_rent VALUES ( '0', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '0', '02', 'aaa', '00', '00', '1');
INSERT INTO PPS_DB.pre_rent VALUES ( '0', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '0', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '0', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '0', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '0', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '0', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '1', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '1', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '1', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '1', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '1', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '1', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '1', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '1', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '2', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '2', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '2', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '2', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '2', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '2', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '2', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '2', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '3', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '3', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '3', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '3', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '3', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '3', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '3', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '3', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '4', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '4', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '4', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '4', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '4', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '4', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '4', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '4', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '5', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '5', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '5', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '5', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '5', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '5', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '5', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '5', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '6', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '6', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '6', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '6', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '6', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '6', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '6', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '6', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '7', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '7', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '7', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '7', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '7', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '7', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '7', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '7', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '8', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '8', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '8', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '8', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '8', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '8', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '8', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '8', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '9', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '9', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '9', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '9', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '9', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '9', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '9', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '9', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '10', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '10', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '10', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '10', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '10', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '10', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '10', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '10', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '11', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '11', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '11', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '11', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '11', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '11', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '11', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '11', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '12', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '12', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '12', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '12', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '12', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '12', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '12', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '12', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '13', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '13', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '13', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '13', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '13', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '13', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '13', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '13', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '14', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '14', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '14', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '14', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '14', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '14', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '14', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '14', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '15', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '15', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '15', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '15', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '15', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '15', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '15', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '15', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '16', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '16', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '16', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '16', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '16', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '16', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '16', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '16', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '17', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '17', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '17', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '17', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '17', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '17', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '17', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '17', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '18', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '18', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '18', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '18', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '18', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '18', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '18', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '18', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '19', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '19', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '19', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '19', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '19', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '19', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '19', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '19', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '20', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '20', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '20', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '20', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '20', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '20', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '20', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '20', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '21', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '21', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '21', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '21', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '21', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '21', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '21', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '21', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '22', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '22', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '22', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '22', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '22', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '22', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '22', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '22', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '23', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '23', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '23', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '23', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '23', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '23', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '23', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '23', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '24', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '24', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '24', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '24', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '24', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '24', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '24', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '24', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '25', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '25', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '25', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '25', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '25', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '25', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '25', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '25', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '26', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '26', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '26', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '26', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '26', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '26', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '26', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '26', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '27', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '27', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '27', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '27', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '27', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '27', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '27', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '27', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '28', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '28', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '28', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '28', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '28', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '28', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '28', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '28', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '29', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '29', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '29', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '29', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '29', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '29', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '29', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '29', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '30', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '30', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '30', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '30', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '30', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '30', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '30', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '30', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '31', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '31', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '31', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '31', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '31', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '31', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '31', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '31', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '32', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '32', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '32', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '32', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '32', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '32', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '32', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '32', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '33', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '33', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '33', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '33', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '33', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '33', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '33', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '33', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '34', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '34', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '34', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '34', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '34', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '34', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '34', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '34', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '35', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '35', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '35', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '35', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '35', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '35', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '35', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '35', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '36', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '36', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '36', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '36', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '36', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '36', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '36', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '36', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '37', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '37', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '37', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '37', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '37', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '37', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '37', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '37', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '38', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '38', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '38', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '38', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '38', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '38', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '38', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '38', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '39', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '39', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '39', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '39', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '39', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '39', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '39', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '39', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '40', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '40', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '40', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '40', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '40', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '40', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '40', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '40', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '41', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '41', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '41', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '41', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '41', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '41', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '41', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '41', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '42', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '42', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '42', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '42', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '42', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '42', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '42', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '42', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '43', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '43', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '43', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '43', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '43', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '43', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '43', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '43', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '44', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '44', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '44', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '44', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '44', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '44', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '44', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '44', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '45', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '45', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '45', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '45', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '45', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '45', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '45', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '45', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '46', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '46', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '46', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '46', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '46', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '46', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '46', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '46', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '47', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '47', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '47', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '47', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '47', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '47', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '47', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '47', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '48', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '48', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '48', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '48', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '48', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '48', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '48', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '48', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '49', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '49', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '49', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '49', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '49', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '49', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '49', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '49', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '50', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '50', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '50', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '50', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '50', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '50', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '50', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '50', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '51', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '51', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '51', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '51', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '51', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '51', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '51', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '51', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '52', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '52', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '52', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '52', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '52', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '52', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '52', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '52', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '53', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '53', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '53', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '53', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '53', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '53', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '53', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '53', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '54', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '54', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '54', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '54', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '54', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '54', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '54', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '54', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '55', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '55', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '55', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '55', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '55', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '55', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '55', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '55', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '56', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '56', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '56', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '56', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '56', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '56', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '56', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '56', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '57', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '57', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '57', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '57', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '57', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '57', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '57', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '57', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '58', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '58', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '58', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '58', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '58', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '58', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '58', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '58', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '59', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '59', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '59', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '59', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '59', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '59', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '59', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '59', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '60', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '60', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '60', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '60', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '60', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '60', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '60', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '60', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '61', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '61', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '61', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '61', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '61', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '61', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '61', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '61', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '62', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '62', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '62', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '62', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '62', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '62', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '62', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '62', '08', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '63', '01', 'VMS', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '63', '02', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '63', '03', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '63', '04', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '63', '05', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '63', '06', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '63', '07', '', '00', '00', '0');
INSERT INTO PPS_DB.pre_rent VALUES ( '63', '08', '', '00', '00', '0');
+221
View File
@@ -0,0 +1,221 @@
<?php
/*********************************************************
文件说明:
功能说明:修改短消息费率
调用关系:调用:header.inc
被调用:实现各个功能模块的页面
变量说明:
作者:崔体存 2004-04-13
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
?>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<form name="editform" action="<?php echo"$PHP_SELF?record_id=".$_REQUEST['record_id']."&mode=".$_REQUEST['mode']; ?>" method="POST">
<?php
$DEBUG =0;
adjust_head();
adjust_title_head();
//==========================================================
//变量定义
//==========================================================
$ppsDb ='PPS_DB';
$id=$_REQUEST['id'];
$record_id=$_REQUEST['record_id'];
$tariffID=$_REQUEST['tariffID'];
$tariff_id=$_REQUEST['tariff_id'];
$mode=$_REQUEST['mode'];
$dest_ip=$_REQUEST['dest_ip'];
$charge_unit=$_REQUEST['charge_unit'];
$basic_fee=$_REQUEST['basic_fee'];
$min_charge_unit=$_REQUEST['min_charge_unit'];
$initial_adjustment=$_REQUEST['initial_adjustment'];
$cap_flag=$_REQUEST['cap_flag'];
$discount_id=$_REQUEST['discount_id'];
$min_charge_unit=$_REQUEST['min_charge_unit'];
global $OMC_server;
$srcDataConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], $ppsDb);
$tableName ='pre_gprs_tariff';
$listPageURL = "tariffBasic.php?keep_id=1&return_tariff_id=$tariffID";
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$strPageTitle=$strTitleAdvanced.$strTitleSpace."PPS".$strTitleSpace."Tariff plan".$strTitleSpace."GPRS";
$arr_mode=array("edit","add");
if($mode == "add"){
$tableTitle = "Add GPRS";
}
elseif($mode == "edit"){
$tableTitle = "Edit GPRS";
}
//==========================================================
//输入变量
//==========================================================
if($DEBUG) echo "<br>record_id=$record_id";
//==========================================================
//数据处理
//==========================================================
//保存修改的变量
if(strlen($_POST['set']) > 0){
if ($mode == "edit"){
$setSql="UPDATE $tableName
SET dest_ip= '$dest_ip',
charge_unit= '$charge_unit',
basic_fee= '$basic_fee',
min_charge_unit= '$min_charge_unit',
initial_adjustment = '$initial_adjustment',
cap_flag = '$cap_flag',
discount_id = '$discount_id'
WHERE record_id='$record_id' AND tariff_id='$tariffID'";
if($DEBUG) echo "<br>$setSql";
$result= @mysqli_query($srcDataConn,$setSql);
echo mysqli_error($srcDataConn);
if($DEBUG) exit();
echo " <meta http-equiv=\"refresh\" content=\"0; url=$listPageURL\"> ";
}
}
//==========================================================
//输出并显示数据
//==========================================================
$getEditSql="SELECT record_id,dest_ip,charge_unit,basic_fee,min_charge_unit,initial_adjustment,cap_flag,discount_id,tariff_id
FROM $tableName
WHERE record_id='$record_id' AND tariff_id='$tariffID'";
//if($DEBUG) echo "<br>$getEditSql";
$resultEdit= @mysqli_query($srcDataConn,$getEditSql);
$rows= @mysqli_fetch_array($resultEdit);
echo mysqli_error($srcDataConn);
/*
$getAddSql="SELECT id FROM $tableName";
//if($DEBUG) echo "<br>$getEditSql";
$resultAdd= @mysqli_query($pubConn,$getAddSql);
$rowsAdd= @mysqli_fetch_array($resultAdd);
echo mysqli_error($pubConn);
*/
?>
<script LANGUAGE="JavaScript">
function selectType(){
var base_url,url_add,url;
base_url='<?php echo "$PHP_SELF?edit=1&id=$id&mode=$mode&rent_type=";?>';
url_add=document.editform.rent_type.options[document.editform.rent_type.selectedIndex].value;
url=base_url+url_add;
window.location=url;
}
</script>
<?php
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strPageTitle";
echo "</td>";
echo "<td width=\"50%\" align=\"right\">&nbsp;";
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
echo "<br>";
?>
<table border="1" width="400" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<td colspan="2">
<?php echo $tableTitle; ?>
</td>
</tr>
<?php
if ($mode == "edit"){
echo "<tr>";
echo "<td width=\"40%\">ID</td>";
echo "<td width=\"60%\">$record_id</td>";
echo "<input type=\"hidden\" name=\"tariff_id\" value=\"$rows[tariff_id]\" size=\"25\">";
$return_tariff_id = $rows[tariff_id]; //定义返回时的页面
echo "</tr>";
echo "<tr>";
echo "<td>Dest IP</td>";
echo "<td><input type=\"text\" name=\"dest_ip\" size=\"10\" value=\"$rows[dest_ip]\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>Charge unit</td>";
echo "<td><input type=\"text\" name=\"charge_unit\" size=\"10\" value=\"$rows[charge_unit]\">(KB)</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Basic fee</td>";
echo "<td><input type=\"text\" name=\"basic_fee\" size=\"10\" value=\"$rows[basic_fee]\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>Minimum charge unit</td>";
echo "<td><input type=\"text\" name=\"min_charge_unit\" size=\"10\" value=\"$rows[min_charge_unit]\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>Initial adjustment</td>";
echo "<td><input type=\"text\" name=\"initial_adjustment\" size=\"10\" value=\"$rows[initial_adjustment]\"></td>";
echo "</tr>";
$cap_flag_value=$rows[cap_flag]+0;
$cap_flag_label=array(0=>"Disable",1=>"Enable");
echo "<tr>";
echo "<td>Cap flag</td>";
echo "<td>";
echo "<select name=\"cap_flag\" size=1>";
for($i=0;$i<sizeof($cap_flag_label);$i++)
{
if($cap_flag_value==$i)
echo "<option selected value=$i>{$cap_flag_label[$i]}</option>";
else
echo "<option value=$i>{$cap_flag_label[$i]}</option>";
}
echo "</select>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Discount ID</td>";
echo "<td><input type=\"text\" name=\"discount_id\" size=\"10\" value=\"$rows[discount_id]\"></td>";
echo "</tr>";
}
?>
</table>
<table width="400">
<tr>
<td>
<input type="hidden" name="tariffID" value="<?php echo $tariffID;?>">
<input type="submit" name="set" value="Set" style="width:40" class="button">&nbsp;
<input type="reset" name="reset" value="Reset" class="button">&nbsp;
<input type="button" name="return" value="Return" onclick=jacascript:location.href="./tariffBasic.php" class="button">&nbsp;
</td>
</tr>
</table>
</form>
<?php
adjust_content_tail();
?>
</body>
</html>
+188
View File
@@ -0,0 +1,188 @@
<?php
/*********************************************************
文件说明:
功能说明:修改短消息费率
调用关系:调用:header.inc
被调用:实现各个功能模块的页面
变量说明:
作者:崔体存 2004-04-13
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
?>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<form name="editform" action="<?php echo"$PHP_SELF?record_id=$record_id&mode=$mode"; ?>" method="POST">
<?php
$DEBUG =0;
adjust_head();
adjust_title_head();
//==========================================================
//变量定义
//==========================================================
$ppsDb ='PPS_DB';
$tableName ='pre_vas_mms_email_tariff';
$listPageURL = "mttariff.php?keep_id=1&return_tariff_id=$tariffID";
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$strPageTitle=$strTitleAdvanced.$strTitleSpace."PPS".$strTitleSpace."Tariff plan".$strTitleSpace."MMS Email";
$arr_mode=array("edit","add");
if($mode == "add"){
$tableTitle = "Add MMS Email";
}
elseif($mode == "edit"){
$tableTitle = "Edit MMS Email";
}
//==========================================================
//输入变量
//==========================================================
if($DEBUG) echo "<br>record_id=$record_id";
//==========================================================
//数据处理
//==========================================================
//保存修改的变量
if(strlen($set) > 0){
if ($mode == "edit"){
$setSql="UPDATE $tableName
SET prefix= '$prefix',
call_type= '$call_type',
dest_name= '$dest_name',
discount_id = '$discount_id',
charge_fee = '$charge_fee'
WHERE email_id='$record_id' AND tariff_id='$tariffID'";
if($DEBUG) echo "<br>$setSql";
$result= @mysqli_query($pubConn,$setSql);
echo mysqli_error($pubConn);
if($DEBUG) exit();
echo " <meta http-equiv=\"refresh\" content=\"0; url=$listPageURL\"> ";
}
}
//==========================================================
//输出并显示数据
//==========================================================
$getEditSql="SELECT tariff_id,email_id,prefix,call_type,dest_name,discount_id,charge_fee,cap_flag
FROM $tableName
WHERE email_id='$record_id' AND tariff_id='$tariffID'";
if($DEBUG)
echo "<br>$getEditSql";
$resultEdit= @mysqli_query($pubConn,$getEditSql);
$rows= @mysqli_fetch_array($resultEdit);
echo mysqli_error($pubConn);
?>
<?php
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strPageTitle";
echo "</td>";
echo "<td width=\"50%\" align=\"right\">&nbsp;";
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
echo "<br>";
//echo "<pre>";
//print_r($rows);
//echo "</pre>";
?>
<table border="1" width="400" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<td colspan="2">
<?php echo $tableTitle; ?>
</td>
</tr>
<?php
if ($mode == "edit"){
echo "<tr>";
echo "<td width=\"40%\">ID</td>";
echo "<td width=\"60%\">$record_id</td>";
echo "<input type=\"hidden\" name=\"tariff_id\" value=\"$rows[tariff_id]\" size=\"25\">";
$return_tariff_id = $rows[tariff_id]; //定义返回时的页面
echo "</tr>";
//prefix
echo "<tr>";
echo "<td>Prefix</td>";
echo "<td><input type=\"text\" name=\"prefix\" size=\"32\" value=\"$rows[prefix]\"></td>";
echo "</tr>";
//call type
$call_type_value=$rows[call_type]+0;
$mms_email_call_type_label=array(4=>"Local call in",5=>"Trunk call in");
echo "<tr>";
echo "<td>Call type</td>";
echo "<td>";
echo "<select name=\"call_type\" size=1>";
foreach($mms_email_call_type_label as $key => $value)
{
if($call_type_value==$key)
echo "<option selected value=$key>{$value}</option>";
else
echo "<option value=$key>{$value}</option>";
}
echo "</select>";
echo "</td>";
echo "</tr>";
//dest name
echo "<tr>";
echo "<td>Dest name</td>";
echo "<td><input type=\"text\" name=\"dest_name\" size=\"32\" value=\"$rows[dest_name]\"></td>";
echo "</tr>";
//discount_id
echo "<tr>";
echo "<td>Discount ID</td>";
echo "<td><input type=\"text\" name=\"discount_id\" size=\"10\" value=\"$rows[discount_id]\"></td>";
echo "</tr>";
//charge_fee
echo "<tr>";
echo "<td>Charge fee</td>";
echo "<td><input type=\"text\" name=\"charge_fee\" size=\"10\" value=\"$rows[charge_fee]\"></td>";
echo "</tr>";
//cap flag
$cap_flag_value=$rows[cap_flag]+0;
$cap_flag_label=array(0=>"Disable",1=>"Enable");
echo "<tr>";
echo "<td>Cap flag</td>";
echo "<td>{$cap_flag_label[$cap_flag_value]}&nbsp;</td>";
echo "</tr>";
}
?>
</table>
<table width="400">
<tr>
<td>
<input type="hidden" name="tariffID" value="<?php echo $tariffID;?>">
<input type="submit" name="set" value="Set" style="width:40" class="button">&nbsp;
<input type="reset" name="reset" value="Reset" class="button">&nbsp;
<input type="button" name="return" value="Return" onclick=jacascript:location.href="./tariffBasic.php" class="button">&nbsp;
</td>
</tr>
</table>
</form>
<?php
adjust_content_tail();
?>
</body>
</html>
+188
View File
@@ -0,0 +1,188 @@
<?php
/*********************************************************
文件说明:
功能说明:修改短消息费率
调用关系:调用:header.inc
被调用:实现各个功能模块的页面
变量说明:
作者:崔体存 2004-04-13
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
?>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<form name="editform" action="<?php echo"$PHP_SELF?record_id=$record_id&mode=$mode"; ?>" method="POST">
<?php
$DEBUG =0;
adjust_head();
adjust_title_head();
//==========================================================
//变量定义
//==========================================================
$ppsDb ='PPS_DB';
$tableName ='pre_vas_mms_retrieve_tariff';
$listPageURL = "mttariff.php?keep_id=1&return_tariff_id=$tariffID";
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$strPageTitle=$strTitleAdvanced.$strTitleSpace."PPS".$strTitleSpace."Tariff plan".$strTitleSpace."MMS Retrieve";
$arr_mode=array("edit","add");
if($mode == "add"){
$tableTitle = "Add MMS Retrieve";
}
elseif($mode == "edit"){
$tableTitle = "Edit MMS Retrieve";
}
//==========================================================
//输入变量
//==========================================================
if($DEBUG) echo "<br>record_id=$record_id";
//==========================================================
//数据处理
//==========================================================
//保存修改的变量
if(strlen($set) > 0){
if ($mode == "edit"){
$setSql="UPDATE $tableName
SET prefix= '$prefix',
call_type= '$call_type',
dest_name= '$dest_name',
discount_id = '$discount_id',
charge_fee = '$charge_fee'
WHERE mms_retrieve_id='$record_id' AND tariff_id='$tariffID'";
if($DEBUG) echo "<br>$setSql";
$result= @mysqli_query($pubConn,$setSql);
echo mysqli_error($pubConn);
if($DEBUG) exit();
echo " <meta http-equiv=\"refresh\" content=\"0; url=$listPageURL\"> ";
}
}
//==========================================================
//输出并显示数据
//==========================================================
$getEditSql="SELECT tariff_id,mms_retrieve_id,prefix,call_type,dest_name,discount_id,charge_fee,cap_flag
FROM $tableName
WHERE mms_retrieve_id='$record_id' AND tariff_id='$tariffID'";
if($DEBUG)
echo "<br>$getEditSql";
$resultEdit= @mysqli_query($pubConn,$getEditSql);
$rows= @mysqli_fetch_array($resultEdit);
echo mysqli_error($pubConn);
?>
<?php
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strPageTitle";
echo "</td>";
echo "<td width=\"50%\" align=\"right\">&nbsp;";
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
echo "<br>";
//echo "<pre>";
//print_r($rows);
//echo "</pre>";
?>
<table border="1" width="400" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<td colspan="2">
<?php echo $tableTitle; ?>
</td>
</tr>
<?php
if ($mode == "edit"){
echo "<tr>";
echo "<td width=\"40%\">ID</td>";
echo "<td width=\"60%\">$record_id</td>";
echo "<input type=\"hidden\" name=\"tariff_id\" value=\"$rows[tariff_id]\" size=\"25\">";
$return_tariff_id = $rows[tariff_id]; //定义返回时的页面
echo "</tr>";
//prefix
echo "<tr>";
echo "<td>Prefix</td>";
echo "<td><input type=\"text\" name=\"prefix\" size=\"32\" value=\"$rows[prefix]\"></td>";
echo "</tr>";
//call type
$call_type_value=$rows[call_type]+0;
$mms_retrieve_call_type_label=array(4=>"Local call in",5=>"Trunk call in");
echo "<tr>";
echo "<td>Call type</td>";
echo "<td>";
echo "<select name=\"call_type\" size=1>";
foreach($mms_retrieve_call_type_label as $key => $value)
{
if($call_type_value==$key)
echo "<option selected value=$key>{$value}</option>";
else
echo "<option value=$key>{$value}</option>";
}
echo "</select>";
echo "</td>";
echo "</tr>";
//dest name
echo "<tr>";
echo "<td>Dest name</td>";
echo "<td><input type=\"text\" name=\"dest_name\" size=\"32\" value=\"$rows[dest_name]\"></td>";
echo "</tr>";
//discount_id
echo "<tr>";
echo "<td>Discount ID</td>";
echo "<td><input type=\"text\" name=\"discount_id\" size=\"10\" value=\"$rows[discount_id]\"></td>";
echo "</tr>";
//charge_fee
echo "<tr>";
echo "<td>Charge fee</td>";
echo "<td><input type=\"text\" name=\"charge_fee\" size=\"10\" value=\"$rows[charge_fee]\"></td>";
echo "</tr>";
//cap flag
$cap_flag_value=$rows[cap_flag]+0;
$cap_flag_label=array(0=>"Disable",1=>"Enable");
echo "<tr>";
echo "<td>Cap flag</td>";
echo "<td>{$cap_flag_label[$cap_flag_value]}&nbsp;</td>";
echo "</tr>";
}
?>
</table>
<table width="400">
<tr>
<td>
<input type="hidden" name="tariffID" value="<?php echo $tariffID;?>">
<input type="submit" name="set" value="Set" style="width:40" class="button">&nbsp;
<input type="reset" name="reset" value="Reset" class="button">&nbsp;
<input type="button" name="return" value="Return" onclick=jacascript:location.href="./tariffBasic.php" class="button">&nbsp;
</td>
</tr>
</table>
</form>
<?php
adjust_content_tail();
?>
</body>
</html>
+252
View File
@@ -0,0 +1,252 @@
<?php
/*********************************************************
文件说明:
功能说明:修改短消息费率
调用关系:调用:header.inc
被调用:实现各个功能模块的页面
变量说明:
作者:崔体存 2004-04-13
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
?>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<form name="editform" action="<?php echo"$PHP_SELF?record_id=".$_REQUEST['record_id']."&mode=".$_REQUEST['mode']; ?>" method="POST">
<?php
$DEBUG =0;
adjust_head();
adjust_title_head();
//==========================================================
//变量定义
//==========================================================
$ppsDb ='PPS_DB';
$id=$_REQUEST['id'];
$record_id=$_REQUEST['record_id'];
$tariffID=$_REQUEST['tariffID'];
$tariff_id=$_REQUEST['tariff_id'];
$mode=$_REQUEST['mode'];
$setSql="UPDATE $tableName
SET mms_type= '$mms_type',
prefix= '$prefix',
call_type= '$call_type',
dest_name= '$dest_name',
discount_id = '$discount_id',
charge_fee = '$charge_fee'
WHERE mms_send_id='$record_id' AND tariff_id='$tariffID'";
$mms_type=$_REQUEST['mms_type'];
$prefix=$_REQUEST['prefix'];
$call_type=$_REQUEST['call_type'];
$dest_name=$_REQUEST['dest_name'];
$discount_id=$_REQUEST['discount_id'];
$charge_fee=$_REQUEST['charge_fee'];
global $OMC_server;
$srcDataConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], $ppsDb);
$tableName ='pre_vas_mms_send_tariff';
$listPageURL = "tariffBasic.php?keep_id=1&return_tariff_id=$tariffID";
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$strPageTitle=$strTitleAdvanced.$strTitleSpace."PPS".$strTitleSpace."Tariff plan".$strTitleSpace."MMS Send";
$arr_mode=array("edit","add");
if($mode == "add"){
$tableTitle = "Add MMS Send";
}
elseif($mode == "edit"){
$tableTitle = "Edit MMS Send";
}
//==========================================================
//输入变量
//==========================================================
if($DEBUG) echo "<br>record_id=$record_id";
//==========================================================
//数据处理
//==========================================================
//保存修改的变量
if(strlen($_POST['set']) > 0){
if ($mode == "edit"){
/*if($record_id == 1 || $record_id == 2)
{
$prefix="--";
$dest_name="default";
$mms_type=$record_id;
}*/
$setSql="UPDATE $tableName
SET mms_type= '$mms_type',
prefix= '$prefix',
call_type= '$call_type',
dest_name= '$dest_name',
discount_id = '$discount_id',
charge_fee = '$charge_fee'
WHERE mms_send_id='$record_id' AND tariff_id='$tariffID'";
if($DEBUG) echo "<br>$setSql";
$result= @mysqli_query($srcDataConn,$setSql);
echo mysqli_error($srcDataConn);
if($DEBUG) exit();
echo " <meta http-equiv=\"refresh\" content=\"0; url=$listPageURL\"> ";
}
}
//==========================================================
//输出并显示数据
//==========================================================
$getEditSql="SELECT tariff_id,mms_send_id,mms_type,prefix,call_type,dest_name,discount_id,charge_fee,cap_flag
FROM $tableName
WHERE mms_send_id='$record_id' AND tariff_id='$tariffID'";
if($DEBUG)
echo "<br>$getEditSql";
$resultEdit= @mysqli_query($srcDataConn,$getEditSql);
$rows= @mysqli_fetch_array($resultEdit);
echo mysqli_error($srcDataConn);
?>
<?php
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strPageTitle";
echo "</td>";
echo "<td width=\"50%\" align=\"right\">&nbsp;";
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
echo "<br>";
//echo "<pre>";
//print_r($rows);
//echo "</pre>";
?>
<table border="1" width="400" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<td colspan="2">
<?php echo $tableTitle; ?>
</td>
</tr>
<?php
if ($mode == "edit"){
echo "<tr>";
echo "<td width=\"40%\">ID</td>";
echo "<td width=\"60%\">$record_id</td>";
echo "<input type=\"hidden\" name=\"tariff_id\" value=\"$rows[tariff_id]\" size=\"25\">";
$return_tariff_id = $rows[tariff_id]; //定义返回时的页面
echo "</tr>";
//mms type
$mms_type_value=$rows[mms_type]+0;
$mms_type_label=array(1=>"To mobile",2=>"To email");
echo "<tr>";
echo "<td>MMS type</td>";
echo "<td>";
/*if($record_id == 1 || $record_id == 2)
echo "<select disabled name=\"mms_type\" size=1>";
else*/
echo "<select name=\"mms_type\" size=1>";
for($i=1;$i<=sizeof($mms_type_label);$i++)
{
if($mms_type_value==$i)
echo "<option selected value=$i>{$mms_type_label[$i]}</option>";
else
echo "<option value=$i>{$mms_type_label[$i]}</option>";
}
echo "</select>";
echo "</td>";
echo "</tr>";
//prefix
echo "<tr>";
echo "<td>Prefix</td>";
/*if($record_id == 1 || $record_id == 2)
echo "<td><input type=\"text\" disabled name=\"prefix\" size=\"32\" value=\"$rows[prefix]\"></td>";
else*/
echo "<td><input type=\"text\" name=\"prefix\" size=\"32\" value=\"$rows[prefix]\"></td>";
echo "</tr>";
//call type
$call_type_value=$rows[call_type]+0;
$call_type_label=array(0=>"Local call out",1=>"NDD",2=>"IDD");
echo "<tr>";
echo "<td>Call type</td>";
echo "<td>";
echo "<select name=\"call_type\" size=1>";
for($i=0;$i<sizeof($call_type_label);$i++)
{
if($call_type_value==$i)
echo "<option selected value=$i>{$call_type_label[$i]}</option>";
else
echo "<option value=$i>{$call_type_label[$i]}</option>";
}
echo "</select>";
echo "</td>";
echo "</tr>";
//dest name
echo "<tr>";
echo "<td>Dest name</td>";
/*if($record_id == 1 || $record_id == 2)
echo "<td><input type=\"text\" disabled name=\"dest_name\" size=\"32\" value=\"$rows[dest_name]\"></td>";
else*/
echo "<td><input type=\"text\" name=\"dest_name\" size=\"32\" value=\"$rows[dest_name]\"></td>";
echo "</tr>";
//discount_id
echo "<tr>";
echo "<td>Discount ID</td>";
echo "<td><input type=\"text\" name=\"discount_id\" size=\"10\" value=\"$rows[discount_id]\"></td>";
echo "</tr>";
//charge_fee
echo "<tr>";
echo "<td>Charge fee</td>";
echo "<td><input type=\"text\" name=\"charge_fee\" size=\"10\" value=\"$rows[charge_fee]\"></td>";
echo "</tr>";
//cap flag
$cap_flag_value=$rows[cap_flag]+0;
$cap_flag_label=array(0=>"Disable",1=>"Enable");
echo "<tr>";
echo "<td>Cap flag</td>";
echo "<td>{$cap_flag_label[$cap_flag_value]}&nbsp;</td>";
echo "</tr>";
}
?>
</table>
<table width="400">
<tr>
<td>
<input type="hidden" name="tariffID" value="<?php echo $tariffID;?>">
<input type="submit" name="set" value="Set" style="width:40" class="button">&nbsp;
<input type="reset" name="reset" value="Reset" class="button">&nbsp;
<input type="button" name="return" value="Return" onclick=jacascript:location.href="./tariffBasic.php" class="button">&nbsp;
</td>
</tr>
</table>
</form>
<?php
adjust_content_tail();
?>
</body>
</html>
+406
View File
@@ -0,0 +1,406 @@
<?php
/*********************************************************
程序说明:
功能说明:列表显示被叫计费号码信息
调用关系:调用: header.inc
被调用:
变量说明
作者:崔体存 2004-04-13
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
$DEBUG = 0;
require("../../inc/header.inc");
?>
<base>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<form method="POST" name="selectform" action="<?php echo "$PHP_SELF";?>">
<?php
adjust_head();
adjust_title_head();
$helpId = "2.2.3.2";
global $OMC_server,$pubConn;
$tariff_id=$_REQUEST['tariff_id'];
$where=$_REQUEST['where'];
$sort_field=$_REQUEST['sort_field'];
$return_tariff_id=$_REQUEST['return_tariff_id'];
$keep_id=$_REQUEST['keep_id'];
$db='PPS_DB';
$srcDataConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], $db);
$table_name='pre_mt_tariff';
$strThisPage=$strTitleAdvanced.$strTitleSpace.$strTariffPlan.$strTitleSpace."MT tariff";
$arr_mode=array("edit","add");
if(!$sort_field){
$sort_field = 'bill_id'; //排序所依赖的字段名
}
$sort_direction = 'ASC '; //排序顺序
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
//echo "<br>moneyPara = $moneyPara";
if($add_area){
echo " <meta http-equiv=\"refresh\" content=\"0; url=./rate_modify.php?add_area=1\"> ";
exit();
}
//编辑后保持对应tariff_id的页面
if ($keep_id != 1){
$tariff_id=isset($tariff_id)?$tariff_id:'00';
}
else {$tariff_id=$return_tariff_id;}
if($DEBUG) {echo "<br>keep_id=$keep_id<br>tariff_id=$return_tariff_id<br>";}
$where=" WHERE tariff_id=$tariff_id ";
//echo "<br>where=$where";
$str_sql ="SELECT count(*) FROM $table_name ".$where;
// echo "<br>str_sql=$str_sql";
$result=mysqli_query($srcDataConn,$str_sql);
$record = mysqli_fetch_array($result);
$number_of_records = $record[0];
$order = " ORDER BY $sort_field $sort_direction ";
$sel_sql ="SELECT * FROM $table_name ".$where.$order;
//echo "<br>sel_sql=$sel_sql";
$result = @mysqli_query($srcDataConn,$sel_sql);
$rows = @mysqli_fetch_array($result);
echo mysqli_error($srcDataConn);
?>
<?php
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\" align=\"left\">";
echo "$strThisPage";
echo "</td>";
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=\"left\">&nbsp;";
echo "</td>";
echo "<td align=\"right\">";
echo "$strResideZone:&nbsp;";
$maxCosSql = " SELECT pubVarValue FROM OMC_PUB.omcPubVarConf WHERE pubVarName = 'maxCOSNumber' ";
$maxCosRes = @mysqli_query($pubConn,$maxCosSql);
$maxCosRow = @mysqli_fetch_array($maxCosRes);
$maxCosNum = $maxCosRow[pubVarValue];
echo "<select size=\"1\" name=\"tariff_id\" onChange=\"javascript:selectTitle()\">";
for($i=0;$i<$maxCosNum;$i++){
$m=($i<10?"0":"").$i;
if($m != $tariff_id){
echo "<option value=\"$m\">$m</option>";
}else{
echo "<option value=\"$m\" selected>$m</option>";
}
}
echo "</select>";
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
echo "<br>";
?>
<script LANGUAGE="JavaScript">
function selectTitle(){
var base_url,url_add,url;
base_url='<?php echo "$PHP_SELF?tariff_id=";?>';
url_add=document.selectform.tariff_id.options[document.selectform.tariff_id.selectedIndex].value;
url=base_url+url_add;
window.location=url;
}
</script>
<table border="0" width="100%" cellpadding="1" cellspacing="2" bordercolor="#666666" bordercolordark="#FFFFFF">
<tr>
<td width="3%">
<a href="./mttariff.php" target="_self"><img align=absBottom border="0" src="../../images/list.gif" width="16" height="16"><?php echo "$strList"; ?></a></td>
<td width="30%">
<?php
$maxMoPrefixNumCosSql = " SELECT pubVarValue FROM OMC_PUB.omcPubVarConf WHERE pubVarName = 'maxMoPrefixNumPerCOS' ";
$maxMoPrefixNumCosRes = @mysqli_query($pubConn,$maxMoPrefixNumCosSql);
$maxMoPrefixNumCosRow = @mysqli_fetch_array($maxMoPrefixNumCosRes);
$maxMoPrefixNumCosNum = $maxMoPrefixNumCosRow[pubVarValue];
echo "Total records:$number_of_records&nbsp&nbsp&nbsp&nbspMax records:$maxMoPrefixNumCosNum";
?>
</td>
<td width="12%">
<?php
echo "<a href=\"mttariffEdit.php?mode=$arr_mode[1]&number_of_records=$number_of_records&tariff_id=$tariff_id\" target=\"_self\">";
?>
<img align="absBottom" border="0" src="../../images/add.gif" width="16" height="16"><?php echo "$strAdd"; ?></a></td>
</td>
<td align="right">
&nbsp
</td>
</tr>
</table>
<?php
echo "<br>";
//没有纪录时,显示无记录提示
if(!$rows)
{
echo "<br>&nbsp;";
echo "$strTariffNoRecords $tariff_id"."!";
exit();
}
?>
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
<tr bgcolor="#E6E6E6" valign="top">
<?php
// echo "<td>$strResideZone</td>";
echo "<td><a href=\"$PHP_SELF?tariff_id=$tariff_id&where=$where&sort_field=bill_id\" target=\"_self\">$strChargingPrefix</a></td>";
echo "<td><a href=\"$PHP_SELF?tariff_id=$tariff_id&where=$where&sort_field=area\" target=\"_self\">$strCountryDistrict</a></td>";
echo "<td >$strCallType</td>";
echo "<td >$strDiscountID</td>";
echo "<td >$strUnitChargingTimeSecond</td>";
echo "<td >$strFreeChargeUnit</td>";
echo "<td >$strMinimumChargingUnit</td>";
//echo "<td >$strBasicFee($moneyPara)</td>";
//echo "<td >$strBasicLongDistance($moneyPara)</td>";
echo "<td >$strBasicInitial($moneyPara)</td>";
echo "<td >Tier Level</td>";
?>
</tr>
<?php
do{
echo "<tr>";
// echo "<td>$rows[tariff_id]</td>";
if(''==$rows[bill_id])
echo "<td><a href=\"./mttariffEdit.php?id=$rows[bill_id]&tariffID=$rows[tariff_id]&mode=$arr_mode[0]\">--</a></td>";
else
echo "<td><a href=\"./mttariffEdit.php?id=$rows[bill_id]&tariffID=$rows[tariff_id]&mode=$arr_mode[0]\">$rows[bill_id]</a></td>";
echo "<td>$rows[area]&nbsp</a></td>";
if($rows[call_type]==4)
echo "<td>Local call in</td>";
elseif($rows[call_type]==5)
echo "<td>Trunk call in</td>";
else
echo "<td align=\"right\">---</td>";
echo "<td align=\"right\">$rows[discount_id]&nbsp;</td>";
echo "<td align=\"right\">$rows[unit_time]</td>";
echo "<td align=\"right\">$rows[free_time]</td>";
echo "<td align=\"right\">$rows[mini_time]</td>";
//echo "<td align=\"right\">$rows[base_fee]</td>";
//echo "<td align=\"right\">$rows[long_distance_fee]</td>";
echo "<td align=\"right\">$rows[adjustment]</td>";
echo "<td align=\"right\">$rows[tier_level]</td>";
/* $base_fee=$rows[base_fee]/$moneyPara;
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>",$base_fee);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>",$base_fee);
}
else{
printf("<td align=\"right\">%5.2f</td>",$base_fee);
}
$long_distance_fee=$rows[long_distance_fee]/$moneyPara;
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>", $long_distance_fee);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>", $long_distance_fee);
}
else{
printf("<td align=\"right\">%5.2f</td>", $long_distance_fee);
}
$adjustment_fee=$rows[adjustment]/$moneyPara;
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>", $adjustment_fee);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>", $adjustment_fee);
}
else{
printf("<td align=\"right\">%5.2f</td>", $adjustment_fee);
}*/
echo "</tr>";
}while($rows = mysqli_fetch_array($result));
?>
</table>
<?php
//--------MMS Retrieve--------------
echo "<br><b>MMS Retrieve</b><p>";
echo "<table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
echo "<tr bgcolor=\"#E6E6E6\">";
echo "<td align=\"center\">ID</td>";
echo "<td align=\"center\">Prefix</td>";
echo "<td align=\"center\">Call type</td>";
echo "<td align=\"center\">Dest name</td>";
echo "<td align=\"center\">Discount ID</td>";
echo "<td align=\"center\">Charge fee</td>";
echo "<td align=\"center\">Cap flag</td>";
echo "</tr>";
$tableName="PPS_DB.pre_vas_mms_retrieve_tariff";
$sql="select * from $tableName where tariff_id=$tariff_id order by mms_retrieve_id asc ";
$res=@mysqli_query($srcDataConn,$sql);
$num=@mysqli_num_rows($res);
$mms_retrieve_cap_flag_label=array(0=>"Disable",1=>"Enable");
$mms_retrieve_call_type_label=array(4=>"Local call in",5=>"Trunk call in");
for($i=0;$i<$num;$i++)
{
$row=@mysqli_fetch_array($res);
echo "<tr>";
//ID
$mms_retrieve_id=$row[mms_retrieve_id];
echo "<td align=\"center\">";
echo "<a href=\"./mmsRetrieveEdit.php?record_id={$row[mms_retrieve_id]}&mode=$arr_mode[0]&tariffID=$tariff_id\">$mms_retrieve_id</a>";
echo "</td>";
//Prefix
echo "<td align=\"center\">";
if(trim($row[prefix]) == "")
echo "--";
else
echo "{$row[prefix]}";
echo "</td>";
//Call type
echo "<td align=\"center\">";
echo "{$mms_retrieve_call_type_label[$row[call_type]]}&nbsp;";
echo "</td>";
//Dest name
echo "<td align=\"center\">";
if(trim($row[dest_name]) == "")
echo "--";
else
echo "{$row[dest_name]}";
echo "</td>";
//Discount ID
echo "<td align=\"center\">";
echo "{$row[discount_id]}&nbsp;";
echo "</td>";
//Charge fee
echo "<td align=\"center\">";
echo "{$row[charge_fee]}&nbsp;";
echo "</td>";
//Cap flag
echo "<td align=\"center\">";
echo "{$mms_retrieve_cap_flag_label[$row[cap_flag]]}&nbsp;";
echo "</td>";
echo "</tr>";
}
//echo "tariff_id=$tariff_id<br>";
echo "</table>";
?>
<?php
//--------MMS Email--------------
echo "<br><b>MMS Email</b><p>";
echo "<table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
echo "<tr bgcolor=\"#E6E6E6\">";
echo "<td align=\"center\">ID</td>";
echo "<td align=\"center\">Prefix</td>";
echo "<td align=\"center\">Call type</td>";
echo "<td align=\"center\">Dest name</td>";
echo "<td align=\"center\">Discount ID</td>";
echo "<td align=\"center\">Charge fee</td>";
echo "<td align=\"center\">Cap flag</td>";
echo "</tr>";
$tableName="PPS_DB.pre_vas_mms_email_tariff";
$sql="select * from $tableName where tariff_id=$tariff_id order by email_id asc ";
$res=@mysqli_query($srcDataConn,$sql);
$num=@mysqli_num_rows($res);
$email_cap_flag_label=array(0=>"Disable",1=>"Enable");
$email_call_type_label=array(4=>"Local call in",5=>"Trunk call in");
for($i=0;$i<$num;$i++)
{
$row=@mysqli_fetch_array($res);
echo "<tr>";
//ID
$email_id=$row[email_id];
echo "<td align=\"center\">";
echo "<a href=\"./mmsEmailEdit.php?record_id={$row[email_id]}&mode=$arr_mode[0]&tariffID=$tariff_id\">$email_id</a>";
echo "</td>";
//Prefix
echo "<td align=\"center\">";
if(trim($row[prefix]) == "")
echo "--";
else
echo "{$row[prefix]}";
echo "</td>";
//Call type
echo "<td align=\"center\">";
echo "{$email_call_type_label[$row[call_type]]}&nbsp;";
echo "</td>";
//Dest name
echo "<td align=\"center\">";
if(trim($row[dest_name]) == "")
echo "--";
else
echo "{$row[dest_name]}";
echo "</td>";
//Discount ID
echo "<td align=\"center\">";
echo "{$row[discount_id]}&nbsp;";
echo "</td>";
//Charge fee
echo "<td align=\"center\">";
echo "{$row[charge_fee]}&nbsp;";
echo "</td>";
//Cap flag
echo "<td align=\"center\">";
echo "{$email_cap_flag_label[$row[cap_flag]]}&nbsp;";
echo "</td>";
echo "</tr>";
}
//echo "tariff_id=$tariff_id<br>";
echo "</table>";
?>
</form>
<?php
adjust_content_tail();
?>
</body>
</html>
+496
View File
@@ -0,0 +1,496 @@
<?php
/*********************************************************
程序说明:
功能说明:编辑被叫显示计费号码信息
调用关系:调用: header.inc
被调用:
变量说明
作者:崔体存 2004-04-13
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
?>
<base>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<form method="POST" name="editform" action="<?php echo"$PHP_SELF?id=$id&tariffID=$tariffID&mode=$mode"; ?>">
<?php
adjust_head();
adjust_title_head();
$ppsDb='PPS_DB';
$tableName='pre_mt_tariff';
$DEBUG = 0;
$listPageURL = 'mttariff.php?keep_id=1&return_tariff_id='.$tariff_id;
$strThisPage=$strTitleAdvanced.$strTitleSpace."Tariff plan".$strTitleSpace."MT tariff";
$arr_mode=array("edit","add");
if($mode == "add"){
if($number_of_records>=300){
echo "<SCRIPT LANGUAGE=\"JavaScript\">";
echo "alert(\"The number of MT tariff is full. \")";
echo "</SCRIPT>";
echo " <meta http-equiv=\"refresh\" content=\"0; url=tariffBasic.php?tariff_id=$tariff_id&mode=$mode\"> ";
exit();
}
}
if($mode == "add"){
$tableTitle = "Add MT tariff";
}
elseif($mode == "edit"){
$tableTitle = "Edit MT tariff";
}
if(!$sort_field){
$sort_field = 'bill_id'; //排序所依赖的字段名
}
$sort_direction = 'ASC '; //排序顺序
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
//==========================================================
//输入变量
//==========================================================
if($DEBUG) echo "<br>";
//==========================================================
//数据处理
//==========================================================
//保存修改的变量
if(strlen($set) > 0){
if($mode=="edit"){
$setSql="UPDATE $tableName
SET area = '$District',
call_type='$call_type',
discount_id = '$discount_id',
unit_time = '$Unit_time',
free_time = '$Free_time',
mini_time = '$Min_unit',
adjustment = '$adjustment',
tier_level = '$tier_level',
tier_unit_0 = '{$tier_unit_0}',
base_fee_0 = '{$base_fee_0}',
long_distance_fee_0 = '{$long_distance_fee_0}',
tier_unit_1 = '{$tier_unit_1}',
base_fee_1 = '{$base_fee_1}',
long_distance_fee_1 = '{$long_distance_fee_1}',
tier_unit_2 = '{$tier_unit_2}',
base_fee_2 = '{$base_fee_2}',
long_distance_fee_2 = '{$long_distance_fee_2}'
WHERE bill_id='$id' AND tariff_id='$tariffID'";
if($DEBUG) echo "<br>$setSql";
$result= @mysqli_query($pubConn,$setSql);
echo mysqli_error($pubConn);
if($DEBUG) echo"<br>$listPageURL";
if(0 == $DEBUG) echo " <meta http-equiv=\"refresh\" content=\"0; url=$listPageURL\"> ";
}
if($mode=="add"){
//检查区号和地区名是否输入
if (strlen($DistrictID) < 1){
echo "<SCRIPT LANGUAGE=\"JavaScript\">";
echo "alert(\"Please input prefix\")";
echo "</SCRIPT>";
echo " <meta http-equiv=\"refresh\" content=\"0; url=mttariffEdit.php?tariff_id=$tariff_id&mode=$mode\"> ";
exit();
}
if (!$District){
echo "<SCRIPT LANGUAGE=\"JavaScript\">";
echo "alert(\"Please input Country/District\")";
echo "</SCRIPT>";
echo " <meta http-equiv=\"refresh\" content=\"0; url=mttariffEdit.php?tariff_id=$tariff_id&mode=$mode\"> ";
exit();
}
for($count=0;$count<strlen($DistrictID);$count++){
if($DistrictID[$count]<'0'||$DistrictID[$count]>'9'){ if($DistrictID[$count]!='B'&&$DistrictID[$count]!='b'&&$DistrictID[$count]!='C'&&$DistrictID[$count]!='c'){
echo "<SCRIPT LANGUAGE=\"JavaScript\">";
echo "alert(\"The prefix is error\")";
echo "</SCRIPT>";
echo " <meta http-equiv=\"refresh\" content=\"0; url=mttariffEdit.php?tariff_id=$tariff_id&mode=$mode\"> ";
exit();
}
}
}
$setSql="INSERT INTO $tableName
(bill_id,tariff_id,area,call_type,discount_id,unit_time,free_time,mini_time,adjustment,tier_level,tier_unit_0,base_fee_0,long_distance_fee_0,tier_unit_1,base_fee_1,long_distance_fee_1,tier_unit_2,base_fee_2,long_distance_fee_2)
VALUES
('$DistrictID','$tariff_id','$District','$call_type','$discount_id','$Unit_time','$Free_time','$Min_unit','$adjustment','$tier_level','$tier_unit_0','$base_fee_0','$long_distance_fee_0','$tier_unit_1','$base_fee_1','$long_distance_fee_1','$tier_unit_2','$base_fee_2','$long_distance_fee_2')";
if($DEBUG) echo "<br>setSql=$setSql";
$result= @mysqli_query($pubConn,$setSql);
echo mysqli_error($pubConn);
echo " <meta http-equiv=\"refresh\" content=\"0; url=$listPageURL\"> ";
}
}
if(strlen($delete) > 0){
$deleteSql="DELETE FROM $tableName
WHERE bill_id='$id' AND tariff_id='$tariffID'";
if($DEBUG) echo "<br>$deleteSql";
$result= @mysqli_query($pubConn,$deleteSql);
echo mysqli_error($pubConn);
echo " <meta http-equiv=\"refresh\" content=\"0; url=$listPageURL\"> ";
}
//==========================================================
//输出并显示数据
//==========================================================
$sel_sql ="SELECT *
FROM $tableName
WHERE bill_id='$id' AND tariff_id='$tariffID'";
//echo "<br>sel_sql=$sel_sql";
$result = @mysqli_query($pubConn,$sel_sql);
$rows = @mysqli_fetch_array($result);
echo mysqli_error($pubConn);
?>
<script LANGUAGE="JavaScript">
function selectType(){
var base_url,url_add,url;
base_url='<?php echo "$PHP_SELF?edit=1&id=$id&tariffID=$tariffID&mode=$mode&call_type=";?>';
url_add=document.editform.call_type.options[document.editform.call_type.selectedIndex].value;
url=base_url+url_add;
window.location=url;
}
</script>
<?php
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strThisPage";
echo "</td>";
echo "<td width=\"50%\" align=\"right\">&nbsp;";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=\"left\">";
echo "<br>";
?>
<a href="./mttariff.php" target="_self"><img align=absBottom border="0" src="../../images/list.gif" width="16" height="16">List</a>
<?php
echo "</td>";
echo "<td width=\"50%\" align=\"right\">&nbsp;";
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
echo "<br>";
?>
<form method="POST" name="editform" action="<?php echo"$PHP_SELF?id=$id&tariffID=$tariffID&mode=$mode"; ?>">
<table border="1" width="400" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
<tr>
<td colspan="2" bgcolor="#E6E6E6">
<?php echo $tableTitle; ?>
</td>
</tr>
<?php
if ($mode == "edit"){
echo "<tr>";
echo "<td width=\"40%\">$strResideZone</td>";
echo "<td>$rows[tariff_id]<input type=\"hidden\" name=\"tariff_id\" value=\"$rows[tariff_id]\" size=\"25\"></td>";
$return_tariff_id = $rows[tariff_id]; //定义返回时的页面
echo "</tr>";
if('Default' == $rows[area]){
echo "<tr>";
echo "<td>$strChargingPrefix</td>";
echo "<td>&nbsp</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strCountryDistrict</td>";
echo "<td><input disabled type=\"text\" name=\"District\" value=\"$rows[area]\" size=\"25\" class=\"text\"></td>";
echo "<td><input type=\"hidden\" name=\"District\" value=\"$rows[area]\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
}else{
echo "<tr>";
echo "<td>$strChargingPrefix</td>";
echo "<td>$rows[bill_id] </td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strCountryDistrict</td>";
echo "<td><input type=\"text\" name=\"District\" value=\"$rows[area]\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
}
echo "<tr>";
echo "<td>$strCallType</td>";
$arr_CallType = array("Local call in","Trunk call in");
$length = sizeof($arr_CallType);
echo "<td>";
echo "<select onChange=\"javascript:selectType();\" name=\"call_type\">";
//检查是否处于编辑状态
if($edit != 1){
$call_type = $rows[call_type];
}
else {
$call_type=$call_type;
}
for ($i=4;$i<4+$length;$i++)
{
echo "<option value=\"$i\" ";
if ($i == $call_type)
{
echo "selected";
}
$tmpI=$i-4;
echo ">$arr_CallType[$tmpI]</option>";
}
echo "</select>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strDiscountID</td>";
echo "<td><input type=\"text\" name=\"discount_id\" value=\"$rows[discount_id]\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strUnitChargingTimeSecond</td>";
echo "<td><input type=\"text\" name=\"Unit_time\" value=\"$rows[unit_time]\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strFreeChargeUnit</td>";
echo "<td><input type=\"text\" name=\"Free_time\" value=\"$rows[free_time]\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strMinimumChargingUnit</td>";
echo "<td><input type=\"text\" name=\"Min_unit\" value=\"$rows[mini_time]\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicInitial</td>";
echo "<td><input type=\"text\" name=\"adjustment\" value=\"$rows[adjustment]\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Tier Level</td>";
echo "<td><input type=\"text\" name=\"tier_level\" value=\"$rows[tier_level]\" size=\"25\" class=\"text\">(0-2)</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Tier0 Unit</td>";
echo "<td><input type=\"text\" name=\"tier_unit_0\" value=\"$rows[tier_unit_0]\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicFee</td>";
echo "<td><input type=\"text\" name=\"base_fee_0\" value=\"$rows[base_fee_0]\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicLongDistance</td>";
echo "<td><input type=\"text\" name=\"long_distance_fee_0\" value=\"$rows[long_distance_fee_0]\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Tier1 Unit</td>";
echo "<td><input type=\"text\" name=\"tier_unit_1\" value=\"$rows[tier_unit_1]\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicFee</td>";
echo "<td><input type=\"text\" name=\"base_fee_1\" value=\"$rows[base_fee_1]\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicLongDistance</td>";
echo "<td><input type=\"text\" name=\"long_distance_fee_1\" value=\"$rows[long_distance_fee_1]\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Tier2 Unit</td>";
echo "<td><input type=\"text\" name=\"tier_unit_2\" value=\"$rows[tier_unit_2]\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicFee</td>";
echo "<td><input type=\"text\" name=\"base_fee_2\" value=\"$rows[base_fee_2]\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicLongDistance</td>";
echo "<td><input type=\"text\" name=\"long_distance_fee_2\" value=\"$rows[long_distance_fee_2]\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
}
elseif ($mode == "add"){
echo "<tr>";
echo "<td width=\"40%\">$strResideZone</td>";
echo "<td>$tariff_id";
/*
echo "<select size=\"1\" name=\"tariff_id\">";
for($i=0;$i<16;$i++){
$m=($i<10?"0":"").$i;
if($m != $tariff_id){
echo "<option value=\"$m\">$m</option>";
}else{
echo "<option value=\"$m\" selected>$m</option>";
}
}
echo "</select>";
*/
$return_tariff_id = $tariff_id; //定义返回时的页面
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strChargingPrefix</td>";
echo "<td><input type=\"text\" name=\"DistrictID\" value=\"\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strCountryDistrict</td>";
echo "<td><input type=\"text\" name=\"District\" value=\"\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strCallType</td>";
$arr_CallType = array("Local call in","Trunk call in");
$length = sizeof($arr_CallType);
echo "<td>";
echo "<select size=\"1\" name=\"call_type\">";
for ($i=4;$i<4+$length;$i++){
$tmpI=$i-4;
if($i != $call_type){
echo "<option value=\"$i\">$arr_CallType[$tmpI]</option>";
}else{
echo "<option value=\"$i\" selected>$arr_CallType[$tmpI]</option>";
}
}
echo "</select>";
$call_type = $call_type;
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strDiscountID</td>";
echo "<td><input type=\"text\" name=\"discount_id\" value=\"\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strUnitChargingTimeSecond</td>";
echo "<td><input type=\"text\" name=\"Unit_time\" value=\"\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strFreeChargeUnit</td>";
echo "<td><input type=\"text\" name=\"Free_time\" value=\"\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strMinimumChargingUnit</td>";
echo "<td><input type=\"text\" name=\"Min_unit\" value=\"\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicInitial</td>";
echo "<td><input type=\"text\" name=\"adjustment\" value=\"\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Tier Level</td>";
echo "<td><input type=\"text\" name=\"tier_level\" value=\"\" size=\"25\" class=\"text\">&nbsp;&nbsp;(0-2)</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Tier0 Unit</td>";
echo "<td><input type=\"text\" name=\"tier_unit_0\" value=\"\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicFee</td>";
echo "<td><input type=\"text\" name=\"base_fee_0\" value=\"\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicLongDistance</td>";
echo "<td><input type=\"text\" name=\"long_distance_fee_0\" value=\"\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Tier1 Unit</td>";
echo "<td><input type=\"text\" name=\"tier_unit_1\" value=\"\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicFee</td>";
echo "<td><input type=\"text\" name=\"base_fee_1\" value=\"\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicLongDistance</td>";
echo "<td><input type=\"text\" name=\"long_distance_fee_1\" value=\"\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Tier2 Unit</td>";
echo "<td><input type=\"text\" name=\"tier_unit_2\" value=\"\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicFee</td>";
echo "<td><input type=\"text\" name=\"base_fee_2\" value=\"\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicLongDistance</td>";
echo "<td><input type=\"text\" name=\"long_distance_fee_2\" value=\"\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
}
else {
exit();
}
?>
</table>
<table width="400">
<tr>
<td>
<input type="submit" name="set" value="Set" style="width:40" class="button">&nbsp;
<input type="reset" name="reset" value="Reset" class="button">&nbsp;
<?php
echo "<input type=\"button\" name=\"return\" value=\"Return\" onclick=jacascript:location.href=\"./mttariff.php?keep_id=1&return_tariff_id=$return_tariff_id\" class=\"button\">&nbsp;";
?>
<?php
if ($mode == "edit"){
if($rows[area]!='Default'){
echo "<input type=\"submit\" name=\"delete\" value=\"Delete\" class=\"button\">";
echo "<input type=\"hidden\" name=\"tariffID\" value=\"$tariffID\">";
}
else
{
echo "<input type=\"hidden\" name=\"tariffID\" value=\"$tariffID\">";
}
}else
echo "<input type=\"hidden\" name=\"tariff_id\" value=\"$tariff_id\">";
?>
</td>
</tr>
</table>
</form>
<?php
adjust_content_tail();
?>
</body>
</html>
+641
View File
@@ -0,0 +1,641 @@
<?php
/*********************************************************
程序说明:
功能说明:费率启动
调用关系:调用: header.inc
被调用:
变量说明:
作者:
修改注释:
NO.1
姓名:Cui Ticun
时间:2004-4-26
修改说明:Support OMC7.0
*********************************************************/
require("../../inc/header.inc");
?>
<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();
$DEBUG=0;
$helpId = "2.49";
//==========================================================
//变量定义
//==========================================================
$nGetComm = 0;
$nSetComm = 3;
$nSubSysParam = 0;
$nPubSubSysParam = 1;
$nPubSysParam = 2;
$ppsDb ='PPS_DB';
$pubDb ='OMC_PUB';
$sysInfoTable = 'OMC_PUB.sysInfo';
$tableName ='tariffPlanComm';
$sysTypeNo =360;
global $OMC_server;
$objConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], 'OBJ_'.$sysTypeNo);
$dbConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], $ppsDb);
$plan_year=$_REQUEST['plan_year'];
$plan_month=$_REQUEST['plan_month'];
$plan_day=$_REQUEST['plan_day'];
$plan_hour=$_REQUEST['plan_hour'];
$plan_minute=$_REQUEST['plan_minute'];
$plan_second=$_REQUEST['plan_second'];
$plan_remark=$_REQUEST['plan_remark'];
$set_plan_time=$_REQUEST['set_plan_time'];
$sysTypeName ='PPS';
$ftpInfo=getMSSFtpAccount();
//print_r($ftpInfo);
$ftpLoginName = $ftpInfo[UserName];
$ftpLoginPwd = $ftpInfo[Password];
$paramType = $nPubSysParam;
//$commDefArr[0][oid] = "2.1.3.4";
$commDefArr[0][oid] = "2.5.4";
$commDefArr[0][paramType] = $nPubSysParam;
$commDefArr[0][value] = "00000000000000";
//$commDefArr[1][oid] = "2.1.3.3";
$commDefArr[1][oid] = "2.5.3";
$commDefArr[1][paramType] = $nPubSysParam;
$commDefArr[1][value] = 1;
$dataDefArr[0][tableName] ='pre_rent';
$dataDefArr[0][orderBy] ='id';
$dataDefArr[0][localFile] ='/usr/local/apache/htdocs/ftpFile/pre_rent.csv';
$dataDefArr[0][remoteFile] ='/tmp/pre_rent.csv';
$dataDefArr[1][tableName] ='pre_bill_sms';
$dataDefArr[1][orderBy] ='id';
$dataDefArr[1][localFile] ='/usr/local/apache/htdocs/ftpFile/pre_bill_sms.csv';
$dataDefArr[1][remoteFile] ='/tmp/pre_bill_sms.csv';
$dataDefArr[2][tableName] ='pre_bill_discount';
$dataDefArr[2][orderBy] ='hours';
$dataDefArr[2][localFile] ='/usr/local/apache/htdocs/ftpFile/pre_bill_discount.csv';
$dataDefArr[2][remoteFile] ='/tmp/pre_bill_discount.csv';
$dataDefArr[3][tableName] ='pre_bill_holiday';
$dataDefArr[3][orderBy] ='month,day';
$dataDefArr[3][localFile] ='/usr/local/apache/htdocs/ftpFile/pre_bill_holiday.csv';
$dataDefArr[3][remoteFile] ='/tmp/pre_bill_holiday.csv';
$dataDefArr[4][tableName] ='pre_comm_tariff';
$dataDefArr[4][orderBy] ='tariff_id';
$dataDefArr[4][localFile] ='/usr/local/apache/htdocs/ftpFile/pre_comm_tariff.csv';
$dataDefArr[4][remoteFile] ='/tmp/pre_comm_tariff.csv';
$dataDefArr[5][tableName] ='pre_mo_tariff';
$dataDefArr[5][orderBy] ='bill_id';
$dataDefArr[5][localFile] ='/usr/local/apache/htdocs/ftpFile/pre_mo_tariff.csv';
$dataDefArr[5][remoteFile] ='/tmp/pre_mo_tariff.csv';
$dataDefArr[6][tableName] ='pre_mt_tariff';
$dataDefArr[6][orderBy] ='bill_id';
$dataDefArr[6][localFile] ='/usr/local/apache/htdocs/ftpFile/pre_mt_tariff.csv';
$dataDefArr[6][remoteFile] ='/tmp/pre_mt_tariff.csv';
$dataDefArr[7][tableName] ='pre_gprs_tariff';
$dataDefArr[7][orderBy] ='tariff_id,record_id';
$dataDefArr[7][localFile] ='/usr/local/apache/htdocs/ftpFile/pre_gprs_tariff.csv';
$dataDefArr[7][remoteFile] ='/tmp/pre_gprs_tariff.csv';
$dataDefArr[8][tableName] ='pre_vas_mms_email_tariff';
$dataDefArr[8][orderBy] ='tariff_id,email_id';
$dataDefArr[8][localFile] ='/usr/local/apache/htdocs/ftpFile/pre_vas_mms_email_tariff.csv';
$dataDefArr[8][remoteFile] ='/tmp/pre_vas_mms_email_tariff.csv';
$dataDefArr[9][tableName] ='pre_vas_mms_retrieve_tariff';
$dataDefArr[9][orderBy] ='tariff_id,mms_retrieve_id';
$dataDefArr[9][localFile] ='/usr/local/apache/htdocs/ftpFile/pre_vas_mms_retrieve_tariff.csv';
$dataDefArr[9][remoteFile] ='/tmp/pre_vas_mms_retrieve_tariff.csv';
$dataDefArr[10][tableName] ='pre_vas_mms_send_tariff';
$dataDefArr[10][orderBy] ='tariff_id,mms_send_id';
$dataDefArr[10][localFile] ='/usr/local/apache/htdocs/ftpFile/pre_vas_mms_send_tariff.csv';
$dataDefArr[10][remoteFile] ='/tmp/pre_vas_mms_send_tariff.csv';
$strThisPage=$strTitleAdvanced.$strTitleSpace.$strTariffPlan.$strTitleSpace."Startup";
function getImpParamValue($sysId,$objIdStr,$instanceNo,$valueName)
{
global $paramConf_table,$objConn;
$DEBUG=0;
$tmpSysIdArr = explode('_',$sysId);
$sysTypeNo = $tmpSysIdArr[0];
$sysNo = $tmpSysIdArr[1];
$subSysNo = $tmpSysIdArr[2];
$paramDb = 'OBJ_'.$sysTypeNo;
//获取参数定义表的表名,根据oid取出参数定义
$tmpObjArr = explode('.',$objIdStr);
$objWhereStr='';
for($i=0;$i<sizeof($tmpObjArr);$i++){
$j=$i+1;
$objWhereStr .= ' level_'.$j."='{$tmpObjArr[$i]}' AND ";
}
$objWhereStr = substr($objWhereStr,0,-5); //最后多了一个' AND ',将其去掉
//根据参数类型,推出参数表的表名
if($sysTypeNo==390)
{
$paramTable = 'param_'.$sysNo;
}
else
{
$paramTable = 'param_99';
$subSysNo = '99';
}
//subSysNo = '$subSysNo' AND instanceNo = '$instanceNo' AND
//修改对应的参数值
$getParamValueSql="SELECT $valueName FROM $paramTable
WHERE $objWhereStr and instanceNo <> ''
";
if($DEBUG) echo"<br> $getParamValueSql <br>";
$getResult=mysqli_query($objConn,$getParamValueSql);
echo mysqli_error($objConn);
if(mysqli_num_rows($getResult) > 0){
$paramRows = mysqli_fetch_array($getResult);
$paramValue = $paramRows[0];
return($paramValue);
}else{
return(-1);
}
}
function setImpParamValue($sysId,$objIdStr,$instanceNo,$newValue)
{
global $paramConf_table,$objConn;
$DEBUG=0;
if($DEBUG) echo"<br>sysId=$sysId";
$tmpSysIdArr = explode('_',$sysId);
$sysTypeNo = $tmpSysIdArr[0];
$sysNo = $tmpSysIdArr[1];
$subSysNo = $tmpSysIdArr[2];
$paramDb = 'OBJ_'.$sysTypeNo;
if($DEBUG) echo"<br>paramDb=$paramDb";
//获取参数定义表的表名,根据oid取出参数定义
$tmpObjArr = explode('.',$objIdStr);
$objWhereStr='';
for($i=0;$i<sizeof($tmpObjArr);$i++){
$j=$i+1;
$objWhereStr .= ' level_'.$j."='{$tmpObjArr[$i]}' AND ";
}
$objWhereStr = substr($objWhereStr,0,-5); //最后多了一个' AND ',将其去掉
//根据参数类型,推出参数表的表名
$paramTable = 'param_99';
$subSysNo = '99';
//subSysNo = '$subSysNo'
//修改对应的参数值
$objWhereStr=str_replace("AND",",",$objWhereStr);
$setParamValueSql="replace $paramTable
SET initValue='$newValue',readValue=''
,instanceNo = '0000',$objWhereStr ";
if($DEBUG)echo"<br> $setParamValueSql <br>";
$setResult=mysqli_query($objConn,$setParamValueSql);
echo mysqli_error($objConn);
if($setResult){
return(1);
}else{
return(-1);
}
}//end of function
function putImpFile($ftpCon)
{
global $dataDefArr;
for($j=0;$j<sizeof($dataDefArr);$j++){
$localFile =$dataDefArr[$j][localFile];
$remoteFile =$dataDefArr[$j][remoteFile];
/* close ftp
if(!ftp_put($ftpCon,$remoteFile,$localFile,FTP_ASCII)){
*/
if(!sftp_put($ftpCon,$remoteFile,$localFile,SFTP_ASCII)){
echo "<br><font color=\"#FF0000\">Put file Failed</font>";
return(-1);
}else{
echo "<br><font color=\"#0000FF\">Put {$dataDefArr[$j][remoteFile]} OK</font>";
}
}
return(1);
}
function delImpFile()
{
global $dataDefArr;
for($j=0;$j<sizeof($dataDefArr);$j++){
$localFile =$dataDefArr[$j][localFile];
@unlink ($localFile);
}
}
//==========================================================
//输入变量
//==========================================================
if ($DEBUG) echo "<br>plandate= $plan_year-$plan_month-$plan_day $plan_hour:$plan_minute:$plan_second";
if ($DEBUG) echo "<br>plan_remark=$plan_remark";
$commDefArr[0][value] = $plan_year.$plan_month.$plan_day.$plan_hour.$plan_minute.$plan_second;
if ($DEBUG) echo "<br>commDefArr[1][value]={$commDefArr[1][value]}";
//==========================================================
//数据处理
//==========================================================
if($_SERVER['REQUEST_METHOD'] == "POST"){
echo "<br><br><br><br><br>";
$planStatTime= mktime($plan_hour, $plan_minute, $plan_second, $plan_month, $plan_day, $plan_year);
if ($DEBUG) echo "<br>planStatTime=$planStatTime";
$nowTime = time();
if ($DEBUG) echo "<br>nowTime=$nowTime";
if($planStatTime >= ($nowTime + 10)){
//导出各项计划费率文件
for($i=0;$i<sizeof($dataDefArr);$i++){
//先删除
@unlink($dataDefArr[$i][localFile]);
sleep(1);
//后导出
$selSql=" SELECT * INTO OUTFILE '{$dataDefArr[$i][localFile]}'
FIELDS
TERMINATED BY ','
LINES
TERMINATED BY '\n'
FROM
{$dataDefArr[$i][tableName]}
ORDER BY {$dataDefArr[$i][orderBy]} ";
if($DEBUG)echo "<br>selSql=$selSql";
$selRes=mysqli_query($dbConn,$selSql);
echo mysqli_error($dbConn);
}
}else{
echo "<font size=3><br>Plan start time must later 10 second than now!</font>";
echo "<p><br><a href=\"./planManage.php\"><img align=absBottom border=0 src=\"../../images/left.gif\" width=\"14\" height=\"14\">Back</a>";
exit();
}
//查找正在运行的,状态为正常的PPS系统,来导入费率参数
$getSysIdSql = "SELECT sysNo,subSysNo,ip
FROM $sysInfoTable
WHERE sysTypeNo='$sysTypeNo'
ORDER BY sysNo,subSysNo
";
if($DEBUG) echo "<br>getSysIdSql=$getSysIdSql";
$getSysIdResult= mysqli_query($pubConn,$getSysIdSql);
echo mysqli_error($pubConn);
$ppsNum=mysqli_num_rows($getSysIdResult);
if($ppsNum <= 0){
echo "Error:Can not find any PPS's IP in system list,Please ADD it!";
delImpFile();
exit();
}
//顺次上载文件
$impOkFlag=0;
for($i=0;$i<$ppsNum;$i++){
$getSysIdRow=mysqli_fetch_array($getSysIdResult);
$sysName='PPS_'.$getSysIdRow[sysNo].'_'.$getSysIdRow[subSysNo];
$dstSeverIp = $getSysIdRow[ip];
if($DEBUG) echo "<br>sysId = $sysId";
if($DEBUG) echo "<br>dstSeverIp = $dstSeverIp";
echo "<br> Try to ftp tariff files to $sysName($dstSeverIp) ......";
flush();
/* close ftp
$ftpCon=@ftp_connect($dstSeverIp);
if($ftpCon < 1){
echo "<br><font color=\"#FF0000\">Connect Failed!</font>";
continue;
}
*/
$connection=sftp_connect($dstSeverIp);
if($connection < 0){
echo "<br><font color=\"#FF0000\">Connect Failed!</font>";
continue;
}
/* close ftp
if(!@ftp_login($ftpCon,$ftpLoginName,$ftpLoginPwd)){
echo "<br><font color=\"#FF0000\">Login Failed!</font>";
@ftp_quit($ftpCon);
continue;
}
*/
$key=sftp_login($connection,$ftpLoginName,$ftpLoginPwd);
if(!$key)
{
echo "<br><font color=\"#FF0000\">Login Failed!</font>";
continue;
}
/* close ftp
if(putImpFile($ftpCon)){
$impOkFlag = 1;
}
@ftp_quit($ftpCon);
*/
if(putImpFile($key)){
$impOkFlag = 1;
}
flush();
}
//delImpFile();
if($impOkFlag == 0){
exit();
}
//设置参数
echo "<br> Try to send command to $sysTypeName ......";
flush();
//修改设备参数
for($i=0;$i<sizeof($commDefArr);$i++){
sleep(2);
$instanceNo = 0;
$commState = '01';
$objId = $commDefArr[$i][oid];
$newValue = $commDefArr[$i][value];
$paramType = $nPubSysParam;
switch($paramType){
case $nPubSubSysParam:
$sysId=$sysTypeNo.'_'.$getSysIdRow[sysNo].'_99';
break;
case $nPubSysParam:
$sysId=$sysTypeNo.'_99_99';
break;
default:
break;
}
if($DEBUG) echo "<br>setImpParamValue($sysId,$objId,$instanceNo,$newValue)";
//$chgResult = setSysParamValue($sysId,$objId,$instanceNo,$newValue);
$chgResult = setImpParamValue($sysId,$objId,$instanceNo,$newValue);
if($chgResult != -1){
//send set command
if($DEBUG) echo "<br>sysCommSend($sysId,$nSetComm,$objId)";
$commStr = sysCommSend($sysId,$nSetComm,$objId);
sleep(2);
}
//根据读回的参数,判断费率是否导入成功
if($i == 1){
$waitTime = 0;
$maxWaitTime= 5;
do{
//获取导入费率命令执行状态
$commStr = sysCommSend($sysId,$nGetComm,$objId);
$commResult = getImpParamValue($sysId,$objId,$instanceNo,'readValue');
//echo "<br>get value=$commResult in $waitTime";
flush();
switch($commResult){
case '1': //wait process
echo "<br>Import ok, wait process";
break;
case '2': //in process
echo "<br>In process";
break;
case '3': //process OK
$waitTime = $maxWaitTime;
echo "<br>Process OK";
break;
case '4': //process Failed
$waitTime = $maxWaitTime;
echo "<br>Process Failed";
break;
default:
break;
}
if($commResult == 3 || $commResult == 5)
break;
$waitTime++;
sleep(2);
}while($waitTime < $maxWaitTime);
}//end of if($i == 1)
echo "OK!";
flush();
}//end of for($i=0;$i<sizeof($commDefArr);$i++)
//由于参数处理底层程序对系统公用参数的连续设置有问题,
//故把参数设置放到最后,一次设下去。
if($chgResult != -1){
//send set command
if($DEBUG) echo "<br>sysCommSend($sysId,$nSetComm,'2.5.4')";
$commStr = sysCommSend($sysId,$nSetComm,'2.5.4');
sleep(2);
if($DEBUG) echo "<br>sysCommSend($sysId,$nSetComm,'2.5.3')";
$commStr = sysCommSend($sysId,$nSetComm,'2.5.3');
sleep(2);
}
//插入到命令纪录表
$sql=" REPLACE $tableName
SET
comm_status = '1',
take_affect_time = '$planStatTime',
operator = '$userInfo[ID]',
host_ip = '$userInfo[IP]',
request_time = CURRENT_TIMESTAMP,
finish_time = DEFAULT,
remark = '$plan_remark',
key_comm_id = '01'
";
if ($DEBUG) echo "<br>sql=$sql";
$res=@mysqli_query($dbConn,$sql);
echo mysqli_error($dbConn);
echo "<br> <a href=\"$PHP_SELF\">&nbsp; << Return</a>";
exit();
}
$this_year=date("Y", mktime());
$this_month=date("m", mktime()+24*60*60);
$this_day=date("d", mktime());
$next_year=$this_year+1;
$next_month=$this_month+1;
$next_day=date("d", mktime()+24*60*60);
//==========================================================
//数据显示
//==========================================================
?>
<?php
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\" align=\"left\">";
echo "$strThisPage";
echo "</td>";
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
echo "<br>";
?>
<form method="POST" action="<?php echo "$PHP_SELF";?>" name="tariff_plan">
<table border="0">
<tr>
<td rowspan="2">
<?php echo"$strStartTime";?>&nbsp;&nbsp;
</td>
<td>Year</td>
<td></td>
<td>Month</td>
<td></td>
<td>Date</td>
<td width="10">&nbsp;</td>
<td>Hour</td>
<td></td>
<td>Minute</td>
<td></td>
<td>Second</td>
</tr>
<tr>
<td>
<select name="plan_year" size="1">
<option value="<?php echo "$this_year";?>" selected><?php echo "$this_year";?> </option>
<option value="<?php echo "$next_year";?>" ><?php echo "$next_year";?> </option>
</select>
</td>
<td>-</td>
<td>
<select name="plan_month" size="1">
<?php
for($i=1;$i<13;$i++){
$i=(strlen($i) < 2)?'0'.$i:$i;
$selected=($this_month == $i)?'selected':'';
echo "<option value=\"$i\" $selected>$i </option> \n";
}
?>
</select>
</td>
<td>-</td>
<td>
<select name="plan_day" size="1">
<?php
for($i=1;$i<32;$i++){
$i=(strlen($i) < 2)?'0'.$i:$i;
$selected=($next_day == $i)?'selected':'';
echo "<option value=\"$i\" $selected>$i </option> \n";
}
?>
</select>
</td>
<td width="10">&nbsp;</td>
<td>
<select name="plan_hour" size="1">
<?php
for($i=0; $i<24; $i++){
$i=(strlen($i) < 2)?'0'.$i:$i;
$selected=($i == '00')?'selected':'';
echo "<option value=\"$i\" $selected>$i </option> \n";
}
?>
</select>
</td>
<td>:</td>
<td>
<select name="plan_minute" size="1">
<?php
for($i=0;$i<60;$i++){
$i=(strlen($i) < 2)?'0'.$i:$i;
$selected=('00' == $i)?'selected':'';
echo "<option value=\"$i\" $selected>$i </option> \n";
}
?>
</select>
</td>
<td>:</td>
<td>
<select name="plan_second" size="1">
<?php
for($i=0;$i<60;$i++){
$i=(strlen($i) < 2)?'0'.$i:$i;
$selected=('00' == $i)?'selected':'';
echo "<option value=\"$i\" $selected>$i </option> \n";
}
?>
</select>
</td>
</tr>
<tr>
<td><?php echo "$strRemark";?></td>
<td colspan="12"><input type="text" name="plan_remark" size="52" class="text"></td>
</tr>
<tr>
<td><input type="submit" name="set_plan_time" value="<?php echo $strSubmit; ?>" class="button"></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
</tr>
</table>
</form>
<?php
//key_comm_id comm_status take_affect_time operator host_ip request_time finish_time remark
$sel_sql="SELECT * FROM $tableName ORDER BY request_time DESC";
echo $sel_sql;
$result=mysqli_query($dbConn,$sel_sql);
$result_rows=mysqli_fetch_array($result);
$rows_num=@mysqli_num_rows($result);
echo mysqli_error($dbConn);
if(!$rows_num){
exit();
echo "$strNoTariffPlan";
}
echo "<table border=\"1\" width=\"100%\" cellpadding=\"2\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\" bgcolor=\"#FFFFFF\">";
echo "<tr bgcolor=\"#E6E6E6\">";
echo "<td align=\"center\">$strStartTime</td>";
echo "<td align=\"center\">$strSender</td>";
echo "<td align=\"center\">$strSourceIP</td>";
echo "<td align=\"center\">$strAppealTime</td>";
echo "<td align=\"center\" width=\"40%\">$strRemark</td>";
echo "</tr>";
echo "<tr>";
do{
$take_affect_time = date("Y-m-d H:i:s",$result_rows[take_affect_time]);
echo "<td align=\"center\">$take_affect_time</td>";
echo "<td align=\"center\">$result_rows[operator]</td>";
echo "<td align=\"center\">$result_rows[host_ip]</td>";
echo "<td align=\"center\">$result_rows[request_time]</td>";
echo "<td colspan=\"5\">$result_rows[remark] &nbsp;</td>";
echo "</tr>";
}while($result_rows=mysqli_fetch_array($result));
echo "</table>";
adjust_content_tail();
?>
</body>
</html>
+82
View File
@@ -0,0 +1,82 @@
<?php
/*********************************************************
程序说明:
功能说明:清除费率计划
调用关系:调用: header.inc
被调用:
变量说明:
作者:
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$db=$bill_db;
$table_name='preplan_tariff_Comm';
if($sure_del){
$delSql="DELETE FROM $table_name";
//echo "del_sql=$del_sql";
$result=mysqli_query($pubConn,$delSql);
echo "<br><font color=\"#0000FF\">$strOperateDatabaseSuccess please set parameter!</font>";
//---插入日志------
$log_name = "Can Tarriff plan".$user_info["account"];
insertLog("$log_name");
//----------------
echo "<p>";
echo "<br><input type=\"button\" value=\"$strReturn\" onclick=jacascript:location.href=\"./setStart.php\">";
}elseif($no_del){
echo " <meta http-equiv=\"refresh\" content=\"0; url=./setStart.php\"> ";
}else{
echo "<form action=\"$PHP_SELF\">";
// WHERE key_comm_id='$plan_id'
$sel_sql="SELECT * FROM $table_name";
$result=mysqli_query($pubConn,$sel_sql);
$result_rows=mysqli_fetch_array($result);
$rows_num=mysqli_num_rows($result);
if($rows_num > 0){
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<?php
echo "<td align=\"center\">$strNewTariffPlanStartTime</td>";
echo "<td align=\"center\">$strProcessStatus</td>";
echo "<td align=\"center\">$strExecutionTime</td>";
echo "<td align=\"center\">$strSender</td>";
echo "<td align=\"center\">$strSourceIP</td>";
echo "<td align=\"center\">$strAppealTime</td>";
echo " </tr>";
echo " <tr>";
$take_affect_time = date("Y-m-d H:i:s",$result_rows[take_affect_time]);
echo "<td align=\"center\">$take_affect_time</td>";
//0/1=已处理/待处理
$show_status=$result_rows[comm_status]?'waiting':'finish';
echo "<td align=\"center\">$show_status</td>";
echo "<td align=\"center\">$result_rows[finish_time]</td>";
echo "<td align=\"center\">$result_rows[operator]</td>";
echo "<td align=\"center\">$result_rows[host_ip]</td>";
echo "<td align=\"center\">$result_rows[request_time]</td>";
echo " </tr>";
echo " <tr>";
echo "<td align=\"center\" width=\"15%\" bgcolor=\"#E6E6E6\">remark</td>";
echo "<td colspan=\"5\">$result_rows[remark] &nbsp;</td>";
echo " <tr>";
echo "<table>";
echo "<br><input type=\"hidden\" name=\"plan_id\" value=\"$plan_id\">";
echo "<font color=\"#0000FF\" size=\"2\">$strCancelThisPlan?</font>";
echo "&nbsp;&nbsp;&nbsp;<input type=\"Submit\" name=\"sure_del\" value=\"$strYes\"> ";
echo "&nbsp;&nbsp;&nbsp;<input type=\"Submit\" name=\"no_del\" value=\"$strNo \"> ";
echo "</form> ";
}//end if($rows_num > 0)
}
?>
</body>
</html>
+64
View File
@@ -0,0 +1,64 @@
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '00', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '01', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '02', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '03', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '04', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '05', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '06', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '07', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '08', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '09', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '10', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '11', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '12', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '13', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '14', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '15', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '16', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '17', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '18', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '19', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '20', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '21', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '22', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '23', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '24', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '25', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '26', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '27', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '28', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '29', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '30', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '31', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '32', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '33', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '34', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '35', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '36', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '37', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '38', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '39', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '40', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '41', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '42', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '43', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '44', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '45', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '46', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '47', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '48', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '49', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '50', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '51', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '52', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '53', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '54', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '55', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '56', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '57', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '58', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '59', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '60', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '61', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '62', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_email_tariff VALUES ( '63', '1', '', '4', '', '00', '0', '0');
+64
View File
@@ -0,0 +1,64 @@
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '00', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '01', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '02', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '03', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '04', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '05', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '06', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '07', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '08', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '09', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '10', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '11', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '12', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '13', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '14', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '15', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '16', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '17', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '18', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '19', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '20', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '21', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '22', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '23', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '24', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '25', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '26', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '27', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '28', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '29', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '30', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '31', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '32', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '33', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '34', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '35', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '36', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '37', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '38', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '39', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '40', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '41', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '42', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '43', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '44', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '45', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '46', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '47', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '48', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '49', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '50', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '51', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '52', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '53', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '54', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '55', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '56', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '57', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '58', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '59', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '60', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '61', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '62', '1', '', '4', '', '00', '0', '0');
INSERT INTO PPS_DB.pre_vas_mms_retrieve_tariff VALUES ( '63', '1', '', '4', '', '00', '0', '0');
File diff suppressed because it is too large. Load diff
+731
View File
@@ -0,0 +1,731 @@
<?php
/*********************************************************
程序说明:
功能说明:列表显示基本计费信息
调用关系:调用: header.inc
被调用:
变量说明
作者:
修改注释:
NO.1
姓名:崔体存
时间: 2004-4-13
修改说明: OMC 7.0 把Mo tariff、Rent、SMS、Servives tariff放
进一个页面,都可以通过选择tariff_id来查看相应的费率情况
*********************************************************/
require("../../inc/header.inc");
?>
<base>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<form method="POST" name="selectform" action="<?php echo "$PHP_SELF";?>">
<?php
adjust_head();
adjust_title_head();
$helpId = "2.2.3.1";
global $OMC_server,$pubConn;
$tariff_id=$_REQUEST['tariff_id'];
$where=$_REQUEST['where'];
$sort_field=$_REQUEST['sort_field'];
$return_tariff_id=$_REQUEST['return_tariff_id'];
$keep_id=$_REQUEST['keep_id'];
$db='PPS_DB';
$srcDataConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], $db);
$table_name='pre_mo_tariff';
$strThisPage=$strTitleAdvanced.$strTitleSpace.$strTariffPlan.$strTitleSpace.$strBasicTariff;
$arr_mode=array("edit","add");
$DEBUG = 0;
if(!$sort_field){
$sort_field = 'bill_id'; //排序所依赖的字段名
}
$sort_direction = 'ASC '; //排序顺序
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$call_cap_flag_label=array(0=>"Disable",1=>"Home PLMN Call",2=>"Other Network Call");
$sm_cap_flag_label=array(0=>"Disable",1=>"Home PLMN SM",2=>"Other Network SM");
//echo "<br>moneyPara = $moneyPara";
if($add_area){
echo " <meta http-equiv=\"refresh\" content=\"0; url=./rate_modify.php?add_area=1\"> ";
exit();
}
//编辑后保持对应tariff_id的页面
if ($keep_id != 1){
$tariff_id=isset($tariff_id)?$tariff_id:'00';
}
else {$tariff_id=$return_tariff_id;}
if($DEBUG) {echo "<br>keep_id=$keep_id<br>tariff_id=$return_tariff_id<br>";}
//
$where=" WHERE tariff_id=$tariff_id ";
//echo "<br>where=$where";
$str_sql ="SELECT count(*) FROM $table_name ".$where;
//echo "<br>str_sql=$str_sql";
$result=mysqli_query($srcDataConn,$str_sql);
$record = mysqli_fetch_array($result);
$number_of_records = $record[0];
$order = " ORDER BY $sort_field $sort_direction ";
$sel_sql ="SELECT * FROM $table_name ".$where.$order;
//echo "<br>sel_sql=$sel_sql";
$result = @mysqli_query($srcDataConn,$sel_sql);
$rows = @mysqli_fetch_array($result);
echo mysqli_error($srcDataConn);
?>
<?php
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\" align=\"left\">";
echo "$strThisPage";
echo "</td>";
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=\"left\">&nbsp;";
echo "</td>";
echo "<td align=\"right\">";
echo "$strResideZone:&nbsp;";
$maxCosSql = " SELECT pubVarValue FROM OMC_PUB.omcPubVarConf WHERE pubVarName = 'maxCOSNumber' ";
$maxCosRes = @mysqli_query($pubConn,$maxCosSql);
$maxCosRow = @mysqli_fetch_array($maxCosRes);
$maxCosNum = $maxCosRow[pubVarValue];
echo "<select size=\"1\" name=\"tariff_id\" onChange=\"javascript:selectTitle()\">";
for($i=0;$i<$maxCosNum;$i++){
$m=($i<10?"0":"").$i;
if($m != $tariff_id){
echo "<option value=\"$m\">$m</option>";
}else{
echo "<option value=\"$m\" selected>$m</option>";
}
}
echo "</select>";
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
echo "<br>";
?>
<script LANGUAGE="JavaScript">
function selectTitle(){
var base_url,url_add,url;
base_url='<?php echo "$PHP_SELF?tariff_id=";?>';
url_add=document.selectform.tariff_id.options[document.selectform.tariff_id.selectedIndex].value;
url=base_url+url_add;
window.location=url;
}
</script>
<?php
echo "<b>MO basic tariff</b>";
?>
<table border="0" width="40%" cellpadding="1" cellspacing="2" bordercolor="#666666" bordercolordark="#FFFFFF">
<tr>
<td width="3%">
<a href="./tariffBasic.php" target="_self"><img align=absBottom border="0" src="../../images/list.gif" width="16" height="16"><?php echo "$strList"; ?></a></td>
<td width="30%">
<?php
$maxMoPrefixNumCosSql = " SELECT pubVarValue FROM OMC_PUB.omcPubVarConf WHERE pubVarName = 'maxMoPrefixNumPerCOS' ";
$maxMoPrefixNumCosRes = @mysqli_query($pubConn,$maxMoPrefixNumCosSql);
$maxMoPrefixNumCosRow = @mysqli_fetch_array($maxMoPrefixNumCosRes);
$maxMoPrefixNumCosNum = $maxMoPrefixNumCosRow[pubVarValue];
echo "Total records:$number_of_records Max records:$maxMoPrefixNumCosNum";
//modify on 2008-4-30
//echo "Total records:$number_of_records&nbsp&nbsp&nbsp&nbspMax records:300";
?>
</td>
<td width="12%">
<?php
echo "<a href=\"tariffBasicEdit.php?mode=$arr_mode[1]&number_of_records=$number_of_records&tariff_id=$tariff_id\" target=\"_self\">";
?>
<img align="absBottom" border="0" src="../../images/add.gif" width="16" height="16"><?php echo "$strAdd"; ?></a></td>
</td>
</tr>
</table>
<p></p>
<?php
//没有纪录时,显示无记录提示
if(!$rows){
echo "$strTariffNoRecords $tariff_id"."!";
}
?>
<?php
if($rows){
echo "<table border=\"1\" width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\">";
echo "<tr bgcolor=\"#E6E6E6\" valign=\"top\">";
echo "<td><a href=\"$PHP_SELF?tariff_id=$tariff_id&where=$where&sort_field=bill_id\" target=\"_self\">$strChargingPrefix</a></td>";
echo "<td><a href=\"$PHP_SELF?tariff_id=$tariff_id&where=$where&sort_field=area\" target=\"_self\">$strCountryDistrict</a></td>";
echo "<td >$strCallType</td>";
echo "<td >$strDiscountID</td>";
echo "<td >$strUnitChargingTimeSecond</td>";
echo "<td >$strFreeChargeUnit</td>";
echo "<td >$strMinimumChargingUnit</td>";
//echo "<td >$strBasicFee($moneyPara)</td>";
//echo "<td >$strBasicLongDistance($moneyPara)</td>";
echo "<td >$strBasicInitial($moneyPara)</td>";
echo "<td >$strTariffRentCapFlag</td>";
echo "<td >Tier Level</td>";
echo "<td >Tier0 Unit</td>";
echo "<td >$strBasicFee</td>";
echo "<td >$strBasicLongDistance</td>";
echo "<td >Tier1 Unit</td>";
echo "<td >$strBasicFee</td>";
echo "<td >$strBasicLongDistance</td>";
echo "<td >Tier2 Unit</td>";
echo "<td >$strBasicFee</td>";
echo "<td >$strBasicLongDistance</td>";
echo "</tr>";
do{
echo "<tr>";
echo "<td><a href=\"./tariffBasicEdit.php?id=$rows[bill_id]&tariffID=$rows[tariff_id]&mode=$arr_mode[0]\">$rows[bill_id]</a></td>";
echo "<td>$rows[area]&nbsp</td>";
if($rows[call_type]==0)
echo "<td>Local call out</td>";
elseif($rows[call_type]==1)
echo "<td>NDD</td>";
elseif($rows[call_type]==2)
echo "<td>IDD</td>";
else
echo "<td align=\"right\">---</td>";
echo "<td align=\"right\">$rows[discount_id]</td>";
echo "<td align=\"right\">$rows[unit_time]</td>";
echo "<td align=\"right\">$rows[free_time]</td>";
echo "<td align=\"right\">$rows[mini_time]</td>";
//echo "<td align=\"right\">$rows[base_fee]</td>";
//echo "<td align=\"right\">$rows[long_distance_fee]</td>";
echo "<td align=\"right\">$rows[adjustment]</td>";
echo "<td align=\"right\">{$call_cap_flag_label[$rows[cap_flag]]}</td>";
echo "<td align=\"right\">$rows[tier_level]</td>";
echo "<td align=\"right\">$rows[tier_unit_0]</td>";
echo "<td align=\"right\">$rows[base_fee_0]</td>";
echo "<td align=\"right\">$rows[long_distance_fee_0]</td>";
echo "<td align=\"right\">$rows[tier_unit_1]</td>";
echo "<td align=\"right\">$rows[base_fee_1]</td>";
echo "<td align=\"right\">$rows[long_distance_fee_1]</td>";
echo "<td align=\"right\">$rows[tier_unit_2]</td>";
echo "<td align=\"right\">$rows[base_fee_2]</td>";
echo "<td align=\"right\">$rows[long_distance_fee_2]</td>";
/* $base_fee=$rows[base_fee]/$moneyPara;
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>",$base_fee);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>",$base_fee);
}
else{
printf("<td align=\"right\">%5.2f</td>",$base_fee);
}
$long_distance_fee=$rows[long_distance_fee]/$moneyPara;
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>", $long_distance_fee);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>", $long_distance_fee);
}
else{
printf("<td align=\"right\">%5.2f</td>", $long_distance_fee);
}
$adjustment_fee=$rows[adjustment]/$moneyPara;
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>", $adjustment_fee);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>", $adjustment_fee);
}
else{
printf("<td align=\"right\">%5.2f</td>", $adjustment_fee);
}*/
echo "</tr>";
}while($rows = mysqli_fetch_array($result));
}
?>
</table>
</form>
<!-- Rent -->
<?php
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$db='PPS_DB';
$table_name='pre_rent';
$arr_mode=array("edit","add");
//编辑后保持对应tariff_id的页面
if ($keep_id != 1){
$tariff_id=isset($tariff_id)?$tariff_id:'00';
}
else {
$tariff_id=$return_tariff_id;
}
if($DEBUG) echo "<br>keep_id=$keep_id<br>tariff_id=$return_tariff_id<br>";
$sql="SELECT id,description,rent_type,charge_date,rent_amount
FROM $table_name
WHERE tariff_id=$tariff_id
ORDER by id";
//echo $sql,$bill_db;
$result=@mysqli_query($srcDataConn,$sql);
$rows=@mysqli_fetch_array($result);
echo mysqli_error($srcDataConn);
echo "<table border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td>";
echo "<b>Rent</b>";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "<p></p>";
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<?php
echo "<td align=\"center\">$strTariffRentID</td>";
echo "<td align=\"center\">$strDescription</td>";
echo "<td align=\"center\">$strTariffRentChargeType</td>";
echo "<td align=\"center\">$strTariffRentChargeDate</td>";
echo "<td align=\"center\">$strTariffRentChargeAmount($moneyPara)</td>";
?>
</tr>
<?php
$i=0;
if($rows && $result){
do{
$i++;
$showi=$i;
if ($rows[description] == ''){
echo "<tr>";
echo "<td align=\"center\"><a href=\"./tariffRentEdit.php?id=$showi&mode=$arr_mode[0]&tariffID=$tariff_id\">$showi</a></td>";
echo "<td align=\"center\">--</td>";
echo "<td align=\"center\">--</td>";
echo "<td align=\"center\">--</td>";
echo "<td align=\"right\">--</td>";
echo "</tr>";
}
else{
echo "<tr>";
echo "<td align=\"center\"><a href=\"./tariffRentEdit.php?id=$showi&mode=$arr_mode[0]&tariffID=$tariff_id\">$showi</a></td>";
echo "<td align=\"center\">$rows[description]</td>";
echo "<td align=\"center\">";
if($rows[rent_type]=='00'){
echo "$strTariffRentAccordingToDate";
}else{
echo "$strTariffRentAccordingToPeriod";
}
echo "</td>";
echo "<td align=\"center\">";
if($rows[rent_type]=='01'){
echo "$rows[charge_date]";
}else{
echo "--";
}
echo "</td>";
echo "<td align=\"right\">$rows[rent_amount]";
echo "</td>";
/*$rows[rent_amount] = $rows[rent_amount]/$moneyPara;
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>", $rows[rent_amount]);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>", $rows[rent_amount]);
}
else{
printf("<td align=\"right\">%5.2f</td>", $rows[rent_amount]);
}*/
echo "</tr>";
}
}while($rows=mysqli_fetch_array($result));
}
?>
</table>
<!-- SMS -->
<?php
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$db='PPS_DB';
$table_name='pre_bill_sms';
$arr_mode=array("edit","add");
//编辑后保持对应tariff_id的页面
if ($keep_id != 1){
$tariff_id=isset($tariff_id)?$tariff_id:'00';
}
else {$tariff_id=$return_tariff_id;}
if($DEBUG) {echo "<br>keep_id=$keep_id<br>tariff_id=$return_tariff_id<br>";}
$sql="SELECT id,prefix,call_type,area,discount_id,charge_amount,cap_flag
FROM $table_name
WHERE tariff_id=$tariff_id
ORDER by id";
//echo $sql,$bill_db;
$result=@mysqli_query($srcDataConn,$sql);
$rows=@mysqli_fetch_array($result);
echo mysqli_error($srcDataConn);
?>
<p></p>
<?php
echo "<table border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td>";
echo "<b>SMS</b>";
echo "</td>";
echo "</tr>"; echo "</table>";
echo "<p></p>";
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<?php
echo "<td align=\"center\">$strTariffRentID</td>";
echo "<td align=\"center\">$strChargingPrefix</td>";
echo "<td align=\"center\">Call type</td>";
echo "<td align=\"center\">$strCountryDistrict</td>";
echo "<td align=\"center\">$strDiscountID</td>";
echo "<td align=\"center\">$strTariffRentChargeAmount($moneyPara)</td>";
echo "<td align=\"center\">$strTariffRentCapFlag</td>";
?>
</tr>
<?php
$i=0;
if($rows && $result){
do{
$i++;
echo "<tr>";
echo "<td align=\"center\"><a href=\"./tariffSmsEdit.php?id=$i&mode=$arr_mode[0]&tariffID=$tariff_id\">$i</a></td>";
if("" == $rows[prefix]){
$rows[prefix]="--";
}
echo "<td align=\"center\">&nbsp;$rows[prefix]</td>";
if($rows[call_type]==0)
echo "<td align=\"center\">Local call out</td>";
elseif($rows[call_type]==1)
echo "<td align=\"center\">NDD</td>";
elseif($rows[call_type]==2)
echo "<td align=\"center\">IDD</td>";
else
echo "<td align=\"right\">---</td>";
if ($rows[area] == ''){
$rows[area]='--';
}
echo "<td align=\"center\">&nbsp;$rows[area]</td>";
echo "<td align=\"center\">$rows[discount_id]</td>";
echo "</td>";
echo "<td align=\"center\">$rows[charge_amount]</td>";
echo "<td align=\"center\">{$sm_cap_flag_label[$rows[cap_flag]]}</td>";
/*$rows[charge_amount ] = $rows[charge_amount ]/$moneyPara;
if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>", $rows[charge_amount]);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>", $rows[charge_amount]);
}
else{
printf("<td align=\"right\">%5.2f</td>", $rows[charge_amount]);
}*/
echo "</tr>";
}while($rows=mysqli_fetch_array($result));
}
?>
</table>
<!-- GPRS -->
<?php
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$db='PPS_DB';
$table_name='pre_gprs_tariff';
$arr_mode=array("edit","add");
//编辑后保持对应tariff_id的页面
if ($keep_id != 1){
$tariff_id=isset($tariff_id)?$tariff_id:'00';
}
else {$tariff_id=$return_tariff_id;}
if($DEBUG) {echo "<br>keep_id=$keep_id<br>tariff_id=$return_tariff_id<br>";}
$sql="SELECT record_id,dest_ip,charge_unit,basic_fee,min_charge_unit,initial_adjustment,cap_flag,discount_id
FROM $table_name
WHERE tariff_id=$tariff_id
ORDER by record_id";
//echo $sql,$bill_db;
$result=@mysqli_query($srcDataConn,$sql);
$rows=@mysqli_fetch_array($result);
echo mysqli_error($srcDataConn);
?>
<p></p>
<?php
echo "<table border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td>";
echo "<b>GPRS</b>";
echo "</td>";
echo "</tr>"; echo "</table>";
echo "<p></p>";
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<?php
echo "<td align=\"center\">ID</td>";
echo "<td align=\"center\">Dest IP</td>";
echo "<td align=\"center\">Charge unit(KB)</td>";
echo "<td align=\"center\">Basic fee</td>";
echo "<td align=\"center\">Minimun charge unit</td>";
echo "<td align=\"center\">Initial adjustment</td>";
echo "<td align=\"center\">Cap Flag</td>";
echo "<td align=\"center\">Discount ID</td>";
?>
</tr>
<?php
$i=0;
$gprs_cap_flag_label=array(0=>"Disable",1=>"Enable");
if($rows && $result){
do{
$i++;
echo "<tr>";
echo "<td align=\"center\"><a href=\"./gprsEdit.php?record_id={$rows[record_id]}&mode=$arr_mode[0]&tariffID=$tariff_id\">{$rows[record_id]}</a></td>";
echo "<td align=\"center\">{$rows[dest_ip]}&nbsp;</td>";
echo "<td align=\"center\">{$rows[charge_unit]}&nbsp;</td>";
echo "<td align=\"center\">{$rows[basic_fee]}&nbsp;</td>";
echo "<td align=\"center\">{$rows[min_charge_unit]}&nbsp;</td>";
echo "<td align=\"center\">{$rows[initial_adjustment]}&nbsp;</td>";
echo "<td align=\"center\">{$gprs_cap_flag_label[$rows[cap_flag]]}&nbsp;</td>";
echo "<td align=\"center\">{$rows[discount_id]}&nbsp;</td>";
echo "</tr>";
}while($rows=mysqli_fetch_array($result));
}
?>
</table>
<!-- MMS Send -->
<?php
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$db='PPS_DB';
$table_name='pre_vas_mms_send_tariff';
$arr_mode=array("edit","add");
//编辑后保持对应tariff_id的页面
if ($keep_id != 1){
$tariff_id=isset($tariff_id)?$tariff_id:'00';
}
else {$tariff_id=$return_tariff_id;}
if($DEBUG) {echo "<br>keep_id=$keep_id<br>tariff_id=$return_tariff_id<br>";}
$sql="SELECT mms_send_id,mms_type,prefix,call_type,dest_name,discount_id,charge_fee,cap_flag
FROM $table_name
WHERE tariff_id=$tariff_id
ORDER by mms_send_id";
//echo $sql,$bill_db;
$result=@mysqli_query($srcDataConn,$sql);
$rows=@mysqli_fetch_array($result);
echo mysqli_error($srcDataConn);
?>
<p></p>
<?php
echo "<table border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td>";
echo "<b>MMS Send</b>";
echo "</td>";
echo "</tr>"; echo "</table>";
echo "<p></p>";
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<?php
echo "<td align=\"center\">ID</td>";
echo "<td align=\"center\">MMS type</td>";
echo "<td align=\"center\">Prefix</td>";
echo "<td align=\"center\">Call type</td>";
echo "<td align=\"center\">Dest name</td>";
echo "<td align=\"center\">Discount ID</td>";
echo "<td align=\"center\">Charge fee</td>";
echo "<td align=\"center\">Cap flag</td>";
?>
</tr>
<?php
$i=0;
$mms_send_cap_flag_label=array(0=>"Disable",1=>"Enable");
$mms_type_label=array(1=>"To mobile",2=>"To email");
if($rows && $result){
do{
$i++;
echo "<tr>";
echo "<td align=\"center\"><a href=\"./mmsSendEdit.php?record_id={$rows[mms_send_id]}&mode=$arr_mode[0]&tariffID=$tariff_id\">{$rows[mms_send_id]}</a></td>";
echo "<td align=\"center\">{$mms_type_label[$rows[mms_type]]}&nbsp;</td>";
if(trim($rows[prefix])=="")
echo "<td align=\"center\">--</td>";
else
echo "<td align=\"center\">{$rows[prefix]}&nbsp;</td>";
if($rows[call_type]==0)
echo "<td align=\"center\">Local call out</td>";
elseif($rows[call_type]==1)
echo "<td align=\"center\">NDD</td>";
elseif($rows[call_type]==2)
echo "<td align=\"center\">IDD</td>";
else
echo "<td align=\"right\">---</td>";
if(trim($rows[dest_name])=="")
echo "<td align=\"center\">--</td>";
else
echo "<td align=\"center\">{$rows[dest_name]}&nbsp;</td>";
echo "<td align=\"center\">{$rows[discount_id]}&nbsp;</td>";
echo "<td align=\"center\">{$rows[charge_fee]}&nbsp;</td>";
echo "<td align=\"center\">{$mms_send_cap_flag_label[$rows[cap_flag]]}&nbsp;</td>";
echo "</tr>";
}while($rows=mysqli_fetch_array($result));
}
echo "</table>";
?>
<!-- Service tariff -->
<?php
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$db='PPS_DB';
$tableName='pre_comm_tariff';
//编辑后保持对应tariff_id的页面
if ($keep_id != 1){
$tariff_id=isset($tariff_id)?$tariff_id:'00';
}
else {$tariff_id=$return_tariff_id;}
if($DEBUG) {echo "<br>keep_id=$keep_id<br>tariff_id=$return_tariff_id<br>";}
//
$where=" WHERE tariff_id=$tariff_id ";
$sql="SELECT * FROM $tableName".$where;
//echo $sql,$bill_db;
$result=@mysqli_query($srcDataConn,$sql);
$rows=@mysqli_fetch_array($result);
echo mysqli_error($srcDataConn);
?>
<?php
//没有纪录时,显示无记录提示
if(!$rows){
$setSql="INSERT INTO $tableName
(tariff_id,cf_charge_unit,cf_charge_amount,roaming_charge_unit,roaming_charge_amount,cc_charge_unit,cc_charge_amount,cug_charge_unit,cug_charge_amount,fav_change_charge,fav_charge_unit,fav_charge_amount )
VALUES
('$tariff_id','','','','','','','','','','','')";
if($DEBUG) echo "<br>setSql=$setSql";
mysqli_query($srcDataConn,$setSql);
}
echo "<table border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td>";
echo "<b><br>Supplementary tariff</b>";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "<p></p>";
?>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<?php
echo "<tr bgcolor=\"#E6E6E6\">";
echo "<td width=\"40%\">$strDescription</td>";
echo "<td align =\"right\" width=\"30%\">$strTariffRentChargeAmount($moneyPara)</td>";
echo "<td align =\"right\" width=\"30%\">$strUnitChargingTimeSecond</td>";
echo "</tr>";
/*
$arr_editfieldAmount = array("cf_charge_amount","roaming_charge_amount","cc_charge_amount","cug_charge_amount","fav_charge_amount","fav_change_charge","cf_cug_charge_amount","cf_fav_charge_amount","cug_fav_charge_amount","cf_cug_fav_charge_amount");
$arr_editfieldUnit = array("cf_charge_unit","roaming_charge_unit","cc_charge_unit","cug_charge_unit","fav_charge_unit","","cf_cug_charge_unit","cf_fav_charge_unit","cug_fav_charge_unit","cf_cug_fav_charge_unit");
$arr_description = array($strCallForwrd,$strRoaming,$strConferenceCall,$strCloseUserGroup,$strFav_call,$strFav_listedtion,$strCf_Cug_call,$strCf_Fav_call,$strCug_Fav_call,$strCf_Cug_Fav_call);
$arr_amount = array($rows[cf_charge_amount],$rows[roaming_charge_amount],$rows[cc_charge_amount],$rows[cug_charge_amount],$rows[fav_charge_amount],$rows[fav_change_charge],$rows[cf_cug_charge_amount],$rows[cf_fav_charge_amount],$rows[cug_fav_charge_amount],$rows[cf_cug_fav_charge_amount]);
$arr_unit = array($rows[cf_charge_unit],$rows[roaming_charge_unit],$rows[cc_charge_unit],$rows[cug_charge_unit],$rows[fav_charge_unit],"----",$rows[cf_cug_charge_unit],$rows[cf_fav_charge_unit],$rows[cug_fav_charge_unit],$rows[cf_cug_fav_charge_unit]);
*/
$arr_editfieldAmount = array("cf_charge_amount","roaming_charge_amount","cc_charge_amount","cug_charge_amount","fav_charge_amount","fav_change_charge","cf_cug_charge_amount","cf_fav_charge_amount","cug_fav_charge_amount","cf_cug_fav_charge_amount","pool_account_change_charge","pool_call_amount","act_free_sms_charge","deact_free_sms_charge");
$arr_editfieldUnit = array("cf_charge_unit","roaming_charge_unit","cc_charge_unit","cug_charge_unit","fav_charge_unit","","cf_cug_charge_unit","cf_fav_charge_unit","cug_fav_charge_unit","cf_cug_fav_charge_unit","","pool_call_unit","","");
$arr_description = array($strCallForwrd,$strRoaming,$strConferenceCall,$strCloseUserGroup,$strFav_call,"Friends and family number change fee",$strCf_Cug_call,$strCf_Fav_call,$strCug_Fav_call,$strCf_Cug_Fav_call,"Pool account change fee","Pool call","Active free SMS charge","Deactive free SMS charge");
$arr_amount = array($rows[cf_charge_amount],$rows[roaming_charge_amount],$rows[cc_charge_amount],$rows[cug_charge_amount],$rows[fav_charge_amount],$rows[fav_change_charge],$rows[cf_cug_charge_amount],$rows[cf_fav_charge_amount],$rows[cug_fav_charge_amount],$rows[cf_cug_fav_charge_amount],$rows[pool_account_change_charge],$rows[pool_call_amount],$rows[act_free_sms_charge],$rows[deact_free_sms_charge]);
$arr_unit = array($rows[cf_charge_unit],$rows[roaming_charge_unit],$rows[cc_charge_unit],$rows[cug_charge_unit],$rows[fav_charge_unit],"----",$rows[cf_cug_charge_unit],$rows[cf_fav_charge_unit],$rows[cug_fav_charge_unit],$rows[cf_cug_fav_charge_unit],"----",$rows[pool_call_unit],"----","----");
for ($i=0;$i<14;$i++){
echo "<tr>";
echo "<td><a href=\"./tariffServicesEdit.php?description=$arr_description[$i]&arr_editfieldAmount=$arr_editfieldAmount[$i]&arr_editfieldUnit=$arr_editfieldUnit[$i]&tariffID=$tariff_id\" target=\"_self\">$arr_description[$i]</a></td>";
echo "<td align=\"right\">$arr_amount[$i]</td>";
/*if($moneyPara < 10){
printf("<td align=\"right\">%5.0f</td>", $arr_amount[$i]/$moneyPara);
}
elseif($moneyPara < 100){
printf("<td align=\"right\">%5.1f</td>", $arr_amount[$i]/$moneyPara);
}
else{
printf("<td align=\"right\">%5.2f</td>", $arr_amount[$i]/$moneyPara);
}*/
echo "<td align =\"right\">&nbsp;$arr_unit[$i]</td>";
echo "</tr>";
echo $tariffID;
}
?>
</table>
<?php
adjust_content_tail();
?>
</body>
</html>
+576
View File
@@ -0,0 +1,576 @@
<?php
/*********************************************************
程序说明:
功能说明:列表显示计费号码信息
调用关系:调用: header.inc
被调用:
变量说明
作者:
修改注释:
NO.1
姓名:崔体存
时间: 2004-4-13
修改说明: OMC 7.0 增加了可通过选择不同的tariff_id来修改不同
tariff_id得费率
*********************************************************/
require("../../inc/header.inc");
?>
<base>
<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();
$ppsDb='PPS_DB';
$tableName='pre_mo_tariff';
$id=$_REQUEST['id'];
$tariffID=$_REQUEST['tariffID'];
$tariff_id=$_REQUEST['tariff_id'];//必填
$mode=$_REQUEST['mode'];
$number_of_records=$_REQUEST['number_of_records'];
//添加修改所需的参数
$DistrictID=$_REQUEST['DistrictID'];//必填
$District=$_REQUEST['District'];//必填
$call_type=isset($_REQUEST['call_type']) ?$_REQUEST['call_type']:'DEFAULT';
$discount_id=$_REQUEST['discount_id']?$_REQUEST['discount_id']:'DEFAULT';
$Unit_time=$_REQUEST['Unit_time']?$_REQUEST['Unit_time']:'DEFAULT';
$Free_time=$_REQUEST['Free_time']?$_REQUEST['Free_time']:'DEFAULT';
$Min_unit=$_REQUEST['Min_unit']?$_REQUEST['Min_unit']:'DEFAULT';
$adjustment=$_REQUEST['adjustment']?$_REQUEST['adjustment']:'DEFAULT';
$cap_flag=isset($_REQUEST['cap_flag']) ?$_REQUEST['cap_flag']:'DEFAULT';
$tier_level=$_REQUEST['tier_level']?$_REQUEST['tier_level']:'DEFAULT';
$tier_unit_0=$_REQUEST['tier_unit_0']?$_REQUEST['tier_unit_0']:'DEFAULT';
$base_fee_0=$_REQUEST['base_fee_0']?$_REQUEST['base_fee_0']:'DEFAULT';
$long_distance_fee_0=$_REQUEST['long_distance_fee_0']?$_REQUEST['long_distance_fee_0']:'DEFAULT';
$tier_unit_1=$_REQUEST['tier_unit_1']?$_REQUEST['tier_unit_1']:'DEFAULT';
$base_fee_1=$_REQUEST['base_fee_1']?$_REQUEST['base_fee_1']:'DEFAULT';
$long_distance_fee_1=$_REQUEST['long_distance_fee_1']?$_REQUEST['long_distance_fee_1']:'DEFAULT';
$tier_unit_2=$_REQUEST['tier_unit_2']?$_REQUEST['tier_unit_2']:'DEFAULT';
$base_fee_2=$_REQUEST['base_fee_2']?$_REQUEST['base_fee_2']:'DEFAULT';
$long_distance_fee_2=$_REQUEST['long_distance_fee_2']?$_REQUEST['long_distance_fee_2']:'DEFAULT';
global $pubConn,$OMC_server;
$srcDataConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], $ppsDb);
$DEBUG = 1;
$listPageURL = 'tariffBasic.php?keep_id=1&return_tariff_id='.$tariff_id;
$strThisPage=$strTitleAdvanced.$strTitleSpace."Tariff plan".$strTitleSpace."MO tariff";
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strThisPage";
echo "</td>";
echo "<td width=\"50%\" align=\"right\">&nbsp;";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=\"left\"><br>";
?>
<a href="./tariffBasic.php" target="_self"><img align=absBottom border="0" src="../../images/list.gif" width="16" height="16">List</a>
<?php
echo "</td>";
echo "<td align=\"right\">&nbsp;";
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
echo "<br>";
$arr_mode=array("edit","add");
$maxMoPrefixNumCosSql = " SELECT pubVarValue FROM OMC_PUB.omcPubVarConf WHERE pubVarName = 'maxMoPrefixNumPerCOS' ";
$maxMoPrefixNumCosRes = @mysqli_query($pubConn,$maxMoPrefixNumCosSql);
$maxMoPrefixNumCosRow = @mysqli_fetch_array($maxMoPrefixNumCosRes);
$maxMoPrefixNumCosNum = $maxMoPrefixNumCosRow[pubVarValue];
//echo "maxMoPrefixNumCosNum=$maxMoPrefixNumCosNum<br>";
if($mode == "add"){
if($number_of_records>=$maxMoPrefixNumCosNum){
echo "<SCRIPT LANGUAGE=\"JavaScript\">";
echo "alert(\"The number of MO tariff is full. \")";
echo "</SCRIPT>";
echo " <meta http-equiv=\"refresh\" content=\"0; url=tariffBasic.php?tariff_id=$tariff_id&mode=$mode\"> ";
exit();
}
}
if($mode == "add"){
$tableTitle = "Add MO tariff";
}
elseif($mode == "edit"){
$tableTitle = "Edit MO tariff";
}
if(!$sort_field){
$sort_field = 'bill_id'; //排序所依赖的字段名
}
$sort_direction = 'ASC '; //排序顺序
$moneyPara = getMoneyPara(); //显示的货币单位是最小货币单位的倍数
$call_cap_flag_label=array(0=>"Disable",1=>"Home PLMN Call",2=>"Other Network Call");
//==========================================================
//输入变量
//==========================================================
if($DEBUG) echo "<br>";
//==========================================================
//数据处理
//==========================================================
//保存修改的变量
if(strlen($_REQUEST['set']) > 0){
if($mode=="edit"){
$setSql="UPDATE $tableName
SET area = '$District',
call_type='$call_type',
discount_id = $discount_id,
unit_time = $Unit_time,
free_time = $Free_time,
mini_time = $Min_unit,
adjustment = $adjustment,
cap_flag = $cap_flag,
tier_level = $tier_level,
tier_unit_0 = $tier_unit_0,
base_fee_0 = $base_fee_0,
long_distance_fee_0 = $long_distance_fee_0,
tier_unit_1 = $tier_unit_1,
base_fee_1 = $base_fee_1,
long_distance_fee_1 = $long_distance_fee_1,
tier_unit_2 = $tier_unit_2,
base_fee_2 = $base_fee_2,
long_distance_fee_2 = $long_distance_fee_2
WHERE bill_id='$id' AND tariff_id='$tariffID'";
if($DEBUG) echo "<br>$setSql";
$result= @mysqli_query($srcDataConn,$setSql);
echo mysqli_error($srcDataConn);
if($DEBUG) echo "<br>$listPageURL";
echo " <meta http-equiv=\"refresh\" content=\"0; url=$listPageURL\"> ";
}
if($mode=="add"){
//检查区号和地区名是否输入
if (strlen($DistrictID) < 1){
echo "<SCRIPT LANGUAGE=\"JavaScript\">";
echo "alert(\"Please input prefix\")";
echo "</SCRIPT>";
echo " <meta http-equiv=\"refresh\" content=\"0; url=tariffBasicEdit.php?tariff_id=$tariff_id&mode=$mode\"> ";
exit();
}
if (!$District){
echo "<SCRIPT LANGUAGE=\"JavaScript\">";
echo "alert(\"Please input Country/District\")";
echo "</SCRIPT>";
echo " <meta http-equiv=\"refresh\" content=\"0; url=tariffBasicEdit.php?tariff_id=$tariff_id&mode=$mode\"> ";
exit();
}
for($count=0;$count<strlen($DistrictID);$count++){
if($DistrictID[$count]<'0'||$DistrictID[$count]>'9'){
if($DistrictID[$count]!='A'&&$DistrictID[$count]!='a'&&$DistrictID[$count]!='B'&&$DistrictID[$count]!='b'&&$DistrictID[$count]!='C'&&$DistrictID[$count]!='c'){
echo "<SCRIPT LANGUAGE=\"JavaScript\">";
echo "alert(\"The prefix is error\")";
echo "</SCRIPT>";
echo " <meta http-equiv=\"refresh\" content=\"0; url=tariffBasicEdit.php?tariff_id=$tariff_id&mode=$mode\"> ";
exit();
}
}
}
$setSql="INSERT INTO $tableName
(bill_id,tariff_id,area,call_type,discount_id,unit_time,free_time,mini_time,adjustment,cap_flag,tier_level,tier_unit_0,base_fee_0,long_distance_fee_0,tier_unit_1,base_fee_1,long_distance_fee_1,tier_unit_2,base_fee_2,long_distance_fee_2)
VALUES
('$DistrictID','$tariff_id','$District','$call_type',$discount_id,$Unit_time,$Free_time,$Min_unit,$adjustment,$cap_flag,$tier_level,$tier_unit_0,$base_fee_0,$long_distance_fee_0,$tier_unit_1,$base_fee_1,$long_distance_fee_1,$tier_unit_2,$base_fee_2,$long_distance_fee_2)";
if($DEBUG) echo "<br>setSql=$setSql";
$result= @mysqli_query($srcDataConn,$setSql);
echo mysqli_error($srcDataConn);
echo " <meta http-equiv=\"refresh\" content=\"0; url=$listPageURL\"> ";
}
}
if(strlen($_REQUEST['delete']) > 0){
$deleteSql="DELETE FROM $tableName
WHERE bill_id='$id' AND tariff_id='$tariffID'";
if($DEBUG) echo "<br>$deleteSql";
$result= @mysqli_query($srcDataConn,$deleteSql);
echo mysqli_error($srcDataConn);
echo " <meta http-equiv=\"refresh\" content=\"0; url=$listPageURL\"> ";
}
//==========================================================
//输出并显示数据
//==========================================================
$sel_sql ="SELECT *
FROM $tableName
WHERE bill_id='$id' AND tariff_id='$tariffID'";
//echo "<br>sel_sql=$sel_sql";
$result = @mysqli_query($srcDataConn,$sel_sql);
$rows = @mysqli_fetch_array($result);
echo mysqli_error($srcDataConn);
// echo "<pre>";
// echo print_r($rows);
// echo "</pre>";
echo mysqli_error($srcDataConn);
?>
<script LANGUAGE="JavaScript">
function selectType(){
var base_url,url_add,url;
base_url='<?php echo "$PHP_SELF?edit=1&id=$id&tariffID=$tariffID&mode=$mode&call_type=";?>';
url_add=document.editform.call_type.options[document.editform.call_type.selectedIndex].value;
url=base_url+url_add;
window.location=url;
}
</script>
<form name="editform" action="<?php echo"$PHP_SELF?id=$id&mode=$mode"; ?>" method="POST">
<form method="POST" name="editform" action="<?php echo"$PHP_SELF?id=$id&tariffID=$tariffID&mode=$mode"; ?>">
<table border="1" width="400" cellpadding="1" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
<tr>
<td colspan="2" bgcolor="#E6E6E6">
<?php echo $tableTitle; ?>
</td>
</tr>
<?php
if ($mode == "edit"){
echo "<tr>";
echo "<td width=\"40%\">$strResideZone</td>";
echo "<td>$rows[tariff_id]<input type=\"hidden\" name=\"tariff_id\" value=\"$rows[tariff_id]\" size=\"25\"></td>";
$return_tariff_id = $rows[tariff_id]; //定义返回时的页面
echo "</tr>";
echo "<tr>";
echo "<td>$strChargingPrefix</td>";
echo "<td>$rows[bill_id]</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strCountryDistrict</td>";
echo "<td><input type=\"text\" name=\"District\" value=\"$rows[area]\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strCallType</td>";
$arr_CallType = array("Local call out","NDD","IDD");
$length = sizeof($arr_CallType);
echo "<td>";
echo "<select onChange=\"javascript:selectType();\" name=\"call_type\">";
//检查是否处于编辑状态
if($edit != 1){
$call_type = $rows[call_type];
}
else {
$call_type=$call_type;
}
for ($i=0;$i<$length;$i++)
{
echo "<option value=\"$i\" ";
if ($i == $call_type)
{
echo "selected";
}
echo ">$arr_CallType[$i]</option>";
}
echo "</select>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strDiscountID</td>";
echo "<td><input type=\"text\" name=\"discount_id\" value=\"$rows[discount_id]\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "</tr>";
echo "<tr>";
echo "<td>$strUnitChargingTimeSecond</td>";
echo "<td><input type=\"text\" name=\"Unit_time\" value=\"$rows[unit_time]\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strFreeChargeUnit</td>";
echo "<td><input type=\"text\" name=\"Free_time\" value=\"$rows[free_time]\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strMinimumChargingUnit</td>";
echo "<td><input type=\"text\" name=\"Min_unit\" value=\"$rows[mini_time]\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicInitial</td>";
echo "<td><input type=\"text\" name=\"adjustment\" value=\"$rows[adjustment]\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strTariffRentCapFlag</td>";
echo "<td>";
echo "<select name=\"cap_flag\">";
//检查是否处于编辑状态
if($edit != 1){
$call_type = $rows[call_type];
}
else {
$call_type=$call_type;
}
for ($i=0;$i<sizeof($call_cap_flag_label);$i++)
{
echo "<option value=\"$i\" ";
if ($i == $rows[cap_flag])
{
echo "selected";
}
echo ">$call_cap_flag_label[$i]</option>";
}
echo "</select>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Tier Level</td>";
echo "<td><input type=\"text\" name=\"tier_level\" value=\"$rows[tier_level]\" size=\"25\" class=\"text\">&nbsp;&nbsp;(0-2)</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Tier0 Units</td>";
echo "<td><input type=\"text\" name=\"tier_unit_0\" value=\"$rows[tier_unit_0]\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicFee</td>";
echo "<td><input type=\"text\" name=\"base_fee_0\" value=\"$rows[base_fee_0]\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicLongDistance</td>";
echo "<td><input type=\"text\" name=\"long_distance_fee_0\" value=\"$rows[long_distance_fee_0]\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Tier1 Units</td>";
echo "<td><input type=\"text\" name=\"tier_unit_1\" value=\"$rows[tier_unit_1]\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicFee</td>";
echo "<td><input type=\"text\" name=\"base_fee_1\" value=\"$rows[base_fee_1]\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicLongDistance</td>";
echo "<td><input type=\"text\" name=\"long_distance_fee_1\" value=\"$rows[long_distance_fee_1]\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Tier2 Units</td>";
echo "<td><input type=\"text\" name=\"tier_unit_2\" value=\"$rows[tier_unit_2]\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicFee</td>";
echo "<td><input type=\"text\" name=\"base_fee_2\" value=\"$rows[base_fee_2]\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicLongDistance</td>";
echo "<td><input type=\"text\" name=\"long_distance_fee_2\" value=\"$rows[long_distance_fee_2]\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
}
elseif ($mode == "add"){
echo "<tr>";
echo "<td width=\"40%\">$strResideZone</td>";
echo "<td>$tariff_id";
/*
echo "<select size=\"1\" name=\"tariff_id\">";
for ($i=0;$i<16;$i++){
$m=($i<10?"0":"").$i;
if($m != $tariff_id){
echo "<option value=\"$m\">$m</option>";
}else{
echo "<option value=\"$m\" selected>$m</option>";
}
}
echo "</select>";
*/
$return_tariff_id = $tariff_id; //定义返回时的页面
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strChargingPrefix</td>";
echo "<td><input type=\"text\" name=\"DistrictID\" value=\"\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strCountryDistrict</td>";
echo "<td><input type=\"text\" name=\"District\" value=\"\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strCallType</td>";
$arr_CallType = array("Local call out","NDD","IDD");
$length = sizeof($arr_CallType);
echo "<td>";
echo "<select size=\"1\" name=\"call_type\">";
for ($i=0;$i<$length;$i++){
if($i != $call_type){
echo "<option value=\"$i\">$arr_CallType[$i]</option>";
}else{
echo "<option value=\"$i\" selected>$arr_CallType[$i]</option>";
}
}
echo "</select>";
$call_type = $call_type;
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strDiscountID</td>";
echo "<td><input type=\"text\" name=\"discount_id\" value=\"\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strUnitChargingTimeSecond</td>";
echo "<td><input type=\"text\" name=\"Unit_time\" value=\"\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strFreeChargeUnit</td>";
echo "<td><input type=\"text\" name=\"Free_time\" value=\"\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strMinimumChargingUnit</td>";
echo "<td><input type=\"text\" name=\"Min_unit\" value=\"\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicInitial</td>";
echo "<td><input type=\"text\" name=\"adjustment\" value=\"\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strTariffRentCapFlag</td>";
echo "<td>";
echo "<select name=\"cap_flag\">";
//检查是否处于编辑状态
if($edit != 1){
$call_type = $rows[call_type];
}
else {
$call_type=$call_type;
}
for ($i=0;$i<sizeof($call_cap_flag_label);$i++)
{
echo "<option value=\"$i\" ";
if ($i == $rows[cap_flag])
{
echo "selected";
}
echo ">$call_cap_flag_label[$i]</option>";
}
echo "</select>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Tier Level</td>";
echo "<td><input type=\"text\" name=\"tier_level\" value=\"\" size=\"25\" class=\"text\">&nbsp;&nbsp;(0-2)</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Tier0 Units</td>";
echo "<td><input type=\"text\" name=\"tier_unit_0\" value=\"\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicFee</td>";
echo "<td><input type=\"text\" name=\"base_fee_0\" value=\"\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicLongDistance</td>";
echo "<td><input type=\"text\" name=\"long_distance_fee_0\" value=\"\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Tier1 Units</td>";
echo "<td><input type=\"text\" name=\"tier_unit_1\" value=\"\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicFee</td>";
echo "<td><input type=\"text\" name=\"base_fee_1\" value=\"\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicLongDistance</td>";
echo "<td><input type=\"text\" name=\"long_distance_fee_1\" value=\"\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Tier2 Units</td>";
echo "<td><input type=\"text\" name=\"tier_unit_2\" value=\"\" size=\"25\" class=\"text\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicFee</td>";
echo "<td><input type=\"text\" name=\"base_fee_2\" value=\"\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
echo "<tr>";
echo "<td>$strBasicLongDistance</td>";
echo "<td><input type=\"text\" name=\"long_distance_fee_2\" value=\"\" size=\"25\" class=\"text\">&nbsp;&nbsp;$moneyPara</td>";
echo "</tr>";
}
else {
exit();
}
?>
</table>
<table width="400">
<tr>
<td>
<input type="submit" name="set" value="Set" style="width:40" class="button">&nbsp;
<input type="reset" name="reset" value="Reset" class="button">&nbsp;
<?php
echo "<input type=\"button\" name=\"return\" value=\"Return\" onclick=jacascript:location.href=\"./tariffBasic.php?keep_id=1&return_tariff_id=$return_tariff_id\" class=\"button\">&nbsp;";
?>
<?php
if ($mode == "edit"){
echo "<input type=\"submit\" name=\"delete\" value=\"Delete\" class=\"button\">";
echo "<input type=\"hidden\" name=\"tariffID\" value=\"$tariffID\">";
}
else
{
echo "<input type=\"hidden\" name=\"tariff_id\" value=\"$tariff_id\">";
}
?>
</td>
</tr>
</table>
</form>
<?php
adjust_content_tail();
?>
</body>
</html>
+156
View File
@@ -0,0 +1,156 @@
<?php
/*********************************************************
程序说明:
功能说明:列表显示折扣表信息
调用关系:调用: header.inc
被调用:
变量说明:
作者:
修改注释:
NO.1
姓名: Lilong
时间:2004-4-13
修改说明: support 16 discount ID.
*********************************************************/
require("../../inc/header.inc");
?>
<base>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<form method="POST" action="$PHP_SELF" name="selectform">
<?php
adjust_head();
adjust_title_head();
$helpId = "2.2.3.3";
$DEBUG = 0;
$ppsDb='PPS_DB';
$tbName='pre_bill_discount';
$strThisPage=$strTitleAdvanced.$strTitleSpace.$strTariffPlan.$strTitleSpace.$strDiscount;
$order="hours"; //排序
if($DEBUG) echo "discount_id=$discount_id<br>";
if( FALSE == isset($discount_id) ){
$discount_id = 00;
}
/*
//insert discount to table while the time segment is NULL
$countSql = "SELECT count(*) as total FROM $tbName WHERE discount_id=$discount_id";
if($DEBUG) echo "countSql=$countSql<br>";
$countRes = mysqli_query($pubConn,$countSql);
$countRows = mysqli_fetch_array($countRes);
echo "countRows[total]=$countRows[total]<br>";
if($countRows[total]<24){
}
exit();
*/
//select current discount id details from TABLE "pre_bill_discount"
$selSql = "SELECT * FROM $tbName WHERE discount_id=$discount_id ORDER BY $order";
if($DEBUG) echo "selSql=$selSql<br>";
$selRes = mysqli_query($pubConn,$selSql);
$selRows = mysqli_fetch_array($selRes);
?>
<?php
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\" align=\"left\">";
echo "$strThisPage";
echo "</td>";
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td align=\"left\">";
echo "&nbsp;";
echo "</td>";
echo "<td align=\"right\">";
echo "Discount ID:&nbsp;";
echo "<select size=\"1\" name=\"discount_id\" onChange=\"javascript:selectTitle()\">";
for($i=0;$i<32;$i++){
$m=($i<10?"0":"").$i;
if($m != $discount_id){
echo "<option value=\"$m\">$m</option>";
}else{
echo "<option value=\"$m\" selected>$m</option>";
}
}
echo "</select>";
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
echo "<br>";
?>
<script LANGUAGE="JavaScript">
function selectTitle(){
var base_url,url_add,url;
base_url='<?php echo "$PHP_SELF?discount_id=";?>';
url_add=document.selectform.discount_id.value;
url=base_url+url_add;
window.location=url;
}
</script>
</form>
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tr bgcolor="#E6E6E6">
<td align="center"><?php echo "$strTariffDiscountTimeSection"; ?></td>
<td align="center"><?php echo $strMonday; ?></td>
<td align="center"><?php echo $strTuesday; ?></td>
<td align="center"><?php echo $strWednesday; ?></td>
<td align="center"><?php echo $strThursday; ?></td>
<td align="center"><?php echo $strFriday; ?></td>
<td align="center"><?php echo $strSaturday; ?></td>
<td align="center"><?php echo $strSunday; ?></td>
<td align="center"><?php echo $strSpecialDay; ?></td>
</tr>
<?php
do{
echo "<tr>";
$hours=$selRows[hours];
if(strlen($hours) < 2) $hours='0'.$hours;
if(strlen($hours+1) < 2){
$next_hours='0'.($hours+1);
}else{
$next_hours=$hours+1;
}
$mon=change2point($selRows[mon]/100);
$tue=change2point($selRows[tue]/100);
$wed=change2point($selRows[wed]/100);
$thu=change2point($selRows[thu]/100);
$fri=change2point($selRows[fri]/100);
$sat=change2point($selRows[sat]/100);
$sun=change2point($selRows[sun]/100);
$holiday=change2point($selRows[holiday]/100);
echo "<td align=center><a href=\"./tariffDiscountEdit.php?hours=$hours&discount_id=$discount_id\">$hours:00:00 - $next_hours:00:00</a></td>";
echo "<td align=center>$mon</td>";
echo "<td align=center>$tue</td>";
echo "<td align=center>$wed</td>";
echo "<td align=center>$thu</td>";
echo "<td align=center>$fri</td>";
echo "<td align=center>$sat</td>";
echo "<td align=center>$sun</td>";
echo "<td align=center>$holiday</td>";
echo "</tr>";
}while($selRows = @mysqli_fetch_array($selRes));
?>
</table>
<?php
adjust_content_tail();
?>
</body>
</html>
+148
View File
@@ -0,0 +1,148 @@
<?php
/*********************************************************
程序说明:
功能说明:列表显示折扣表信息
调用关系:调用: header.inc
被调用:
变量说明:
作者:
修改注释:
NO.1
姓名: Lilong
时间:2004-4-13
修改说明: support 16 discount ID.
*********************************************************/
require("../../inc/header.inc");
?>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?
adjust_head();
adjust_title_head();
$DEBUG = 0;
$ppsDb='PPS_DB';
$tableName='pre_bill_discount';
$listPageURL = "tariffDiscount.php?discount_id=$discount_id";
$strThisPage=$strTitleAdvanced.$strTitleSpace."Tariff plan".$strTitleSpace."Discount";
//==========================================================
//数据处理
//==========================================================
//保存修改的变量
if(strlen($set)>0){
$setSql="UPDATE $tableName
SET mon = '$mon',
tue = '$tue',
wed = '$wed',
thu = '$thu',
fri = '$fri',
sat = '$sat',
sun = '$sun',
holiday = '$holiday'
WHERE hours = '$hours' AND discount_id='$discount_id'";
if($DEBUG) echo "<br>$setSql";
$result= @mysqli_query($pubConn,$setSql);
echo mysqli_error($pubConn);
echo " <meta http-equiv=\"refresh\" content=\"0; url=$listPageURL\"> ";
}
//==========================================================
//输出并显示数据
//==========================================================
$getSql = "SELECT *
FROM $tableName
WHERE hours='$hours' AND discount_id='$discount_id'";
if($DEBUG) echo "getSql=$getSql<br>";
$result=mysqli_query($pubConn,$getSql);
$rows = mysqli_fetch_array($result);
?>
<?php
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strThisPage";
echo "</td>";
echo "<td width=\"50%\" align=\"right\">&nbsp;";
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
echo "<br>";
?>
<form name="editform" action="<?php echo"$PHP_SELF?hours=$hours&discount_id=$discount_id"; ?>" method="POST">
<table border="1" width="100%" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
<tbody>
<tr bgcolor="#E6E6E6">
<td align="center" colspan="9">
<?php echo "Edit Discount ( ID: $discount_id ) "; ?>
</td>
</tr>
<tr bgcolor="#E6E6E6">
<td align="center"><?php echo "$strTariffDiscountTimeSection"; ?></td>
<td align="center"><?php echo $strMonday; ?></td>
<td align="center"><?php echo $strTuesday; ?></td>
<td align="center"><?php echo $strWednesday; ?></td>
<td align="center"><?php echo $strThursday; ?></td>
<td align="center"><?php echo $strFriday; ?></td>
<td align="center"><?php echo $strSaturday; ?></td>
<td align="center"><?php echo $strSunday; ?></td>
<td align="center"><?php echo $strSpecialDay; ?></td>
</tr>
<?php
do
{
echo "<tr>";
// $discount_id=$rows[discount_id];
$hours=$rows[hours];
if(strlen($hours) < 2) $hours='0'.$hours;
if(strlen($hours+1) < 2)
{
$next_hours='0'.($hours+1);
}
else
{
$next_hours=$hours+1;
}
$holiday=change2point($rows[holiday]/100);
echo "<td align=center>$hours:00:00 - $next_hours:00:00</td>";
echo "<td><input type=\"text\" name=\"mon\" size=\"3\" value=\"$rows[mon]\" class=\"text\" style=\"text-align: right;\">&nbsp;/100&nbsp;</td>";
echo "<td><input type=\"text\" name=\"tue\" size=\"3\" value=\"$rows[tue]\" class=\"text\" style=\"text-align: right;\">&nbsp;/100&nbsp;</td>";
echo "<td><input type=\"text\" name=\"wed\" size=\"3\" value=\"$rows[wed]\" class=\"text\" style=\"text-align: right;\">&nbsp;/100&nbsp;</td>";
echo "<td><input type=\"text\" name=\"thu\" size=\"3\" value=\"$rows[thu]\" class=\"text\" style=\"text-align: right;\">&nbsp;/100&nbsp;</td>";
echo "<td><input type=\"text\" name=\"fri\" size=\"3\" value=\"$rows[fri]\" class=\"text\" style=\"text-align: right;\">&nbsp;/100&nbsp;</td>";
echo "<td><input type=\"text\" name=\"sat\" size=\"3\" value=\"$rows[sat]\" class=\"text\" style=\"text-align: right;\">&nbsp;/100&nbsp;</td>";
echo "<td><input type=\"text\" name=\"sun\" size=\"3\" value=\"$rows[sun]\" class=\"text\" style=\"text-align: right;\">&nbsp;/100&nbsp;</td>";
echo "<td><input type=\"text\" name=\"holiday\" size=\"3\" value=\"$rows[holiday]\" class=\"text\" style=\"text-align: right;\">&nbsp;/100&nbsp;</td>";
echo "</tr>";
}
while($rows = @mysqli_fetch_array($result));
?>
</tbody>
</table>
<table width="400">
<tr>
<td>
<input type="submit" name="set" value="Set" style="width:40" class="button">&nbsp;
<input type="reset" name="reset" value="Reset" class="button">&nbsp;
<input type="button" name="return" value="Return" onclick=jacascript:location.href="./tariffDiscount.php?discount_id=<?php echo "$discount_id"; ?>" class="button">&nbsp;
</td>
</tr>
</table>
</form>
<?php
adjust_content_tail();
?>
</body>
</html>
+103
View File
@@ -0,0 +1,103 @@
<?php
/*********************************************************
文件说明:
功能说明:节假日列表
调用关系:调用:header.inc
被调用:实现各个功能模块的页面
变量说明:
作者:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
?>
<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();
$helpId = "2.2.3.4";
$ppsDb='PPS_DB';
$tableName='pre_bill_holiday';
$arr_mode=array("edit","add");
$strThisPage=$strTitleAdvanced.$strTitleSpace.$strTariffPlan.$strTitleSpace.$strHoliday;
$sql="SELECT *
FROM $tableName
ORDER BY 'month','day'";
$result=mysqli_query($pubConn,$sql);
$rows=mysqli_fetch_array($result);
?>
<?php
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strThisPage";
echo "</td>";
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "</table>";
adjust_title_tail();
adjust_content_head();
echo "<br>";
/*
//没有纪录时,显示无记录提示
if(!$rows){
echo "$strNotFindRecord";
exit();
}
*/
?>
<table border="0" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" width="100%">
<tr>
<td valign="middle" width="12%"><a href="tariffHoliday.php" target="_self"><img align=absBottom border="0" src="../../images/list.gif" width="16" height="16"><?php echo "$strList"; ?></a>&nbsp;&nbsp;&nbsp;
</td>
<td valign="middle" width="12%">
<?php
echo "<a href=\"tariffHolidayEdit.php?mode=$arr_mode[1]\" target=\"_self\">";
?>
<img align="absBottom" border="0" src="../../images/add.gif" width="16" height="16"><?php echo "$strAdd"; ?></a>&nbsp;&nbsp;&nbsp;
</td>
<td>
&nbsp;
</td>
</tr>
</table>
<table border="1" width="400" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF">
<tr bgcolor="#E6E6E6">
<td align="center" width="40%"><?php echo $strDate; ?>(mm-dd)</td>
<td align="center" width="60%"><?php echo $strDescription; ?></td>
</tr>
<?php
$i=0;
do
{
echo "<tr>";
$id=$rows[id];
$month=omc_keep_length($rows[month],0,2);
$day=omc_keep_length($rows[day],0,2);
$showDate=$month."-".$day;
$rows[name]=$rows[name]?$rows[name]:'--';
echo "<td align=\"center\"><a href=\"./tariffHolidayEdit.php?month=$month&day=$day&mode=$arr_mode[0]\">$showDate</a></td>";
echo "<td align=\"center\">$rows[name]</td>";
echo "</tr>";
$i++;
}while($rows=mysqli_fetch_array($result));
?>
</table>
<?php
adjust_content_tail();
?>
</body>
</html>
Loaded 100 of 4263 files, more files were not shown because too many files have changed in this diff. Show more