693 lines
22 KiB
PHP
Executable File
693 lines
22 KiB
PHP
Executable File
<?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: ";
|
||
$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] </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\"> $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\"> $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\"> $rows[dest_ip]</td>";
|
||
echo "<td align=\"center\"> $rows[charge_unit]</td>";
|
||
echo "<td align=\"center\"> $rows[basic_fee]</td>";
|
||
echo "<td align=\"center\"> $rows[min_charge_unit]</td>";
|
||
echo "<td align=\"center\"> $rows[initial_adjustment]</td>";
|
||
$cap_flag_value=$gprs_cap_flag_label[$rows[cap_flag]+0];
|
||
echo "<td align=\"center\"> $cap_flag_value</td>";
|
||
echo "<td align=\"center\"> $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\"> {$mms_type_label[$rows[mms_type]]}</td>";
|
||
if(trim($rows[prefix])=="")
|
||
echo "<td align=\"center\">--</td>";
|
||
else
|
||
echo "<td align=\"center\"> $rows[prefix]</td>";
|
||
echo "<td align=\"center\"> {$call_type_label[$rows[call_type]]}</td>";
|
||
|
||
if(trim($rows[dest_name])=="")
|
||
echo "<td align=\"center\">--</td>";
|
||
else
|
||
echo "<td align=\"center\"> $rows[dest_name]</td>";
|
||
echo "<td align=\"center\"> $rows[discount_id]</td>";
|
||
echo "<td align=\"center\"> $rows[charge_fee]</td>";
|
||
$cap_flag_value=$gprs_cap_flag_label[$rows[cap_flag]+0];
|
||
echo "<td align=\"center\"> $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\"> $arr_unit[$i]</td>";
|
||
echo "</tr>";
|
||
echo $tariffID;
|
||
}
|
||
?>
|
||
</table>
|
||
<?php
|
||
adjust_content_tail();
|
||
?>
|
||
</body>
|
||
</html>
|