init web ems all
This commit is contained in:
390
wxc2_omc/account/tariffList/mtTariffList.php
Executable file
390
wxc2_omc/account/tariffList/mtTariffList.php
Executable file
@@ -0,0 +1,390 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><D0B1><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD>мƷѺ<C6B7><D1BA><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: header.inc
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
|
||||
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2004-04-13
|
||||
|
||||
<EFBFBD><EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ʱ<EFBFBD><EFBFBD>:
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*********************************************************/
|
||||
$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'; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD>
|
||||
}
|
||||
$sort_direction = 'ASC '; //<2F><><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>
|
||||
$moneyPara = getMoneyPara(); //<2F><>ʾ<EFBFBD>Ļ<EFBFBD><C4BB>ҵ<EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>С<EFBFBD><D0A1><EFBFBD>ҵ<EFBFBD>λ<EFBFBD>ı<EFBFBD><C4B1><EFBFBD>
|
||||
|
||||
//echo "<br>moneyPara = $moneyPara";
|
||||
|
||||
if($add_area){
|
||||
echo " <meta http-equiv=\"refresh\" content=\"0; url=./rate_modify.php?add_area=1\"> ";
|
||||
exit();
|
||||
}
|
||||
|
||||
//<2F>༭<EFBFBD>ֶ<F3B1A3B3>Ӧtariff_id<69><64>ҳ<EFBFBD><D2B3>
|
||||
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 $strDisplayRecords:<FONT color=blue> $number_of_records</FONT>";
|
||||
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
|
||||
//û<>м<EFBFBD>¼ʱ<C2BC><CAB1><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>¼<EFBFBD><C2BC>ʾ
|
||||
if(!$rows)
|
||||
{
|
||||
echo "<br> ";
|
||||
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] </td>";
|
||||
echo "<td>$rows[area] </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]]} ";
|
||||
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]} ";
|
||||
echo "</td>";
|
||||
|
||||
//Charge fee
|
||||
echo "<td align=\"center\">";
|
||||
echo "{$row[charge_fee]} ";
|
||||
echo "</td>";
|
||||
|
||||
//Cap flag
|
||||
echo "<td align=\"center\">";
|
||||
echo "{$mms_retrieve_cap_flag_label[$row[cap_flag]]} ";
|
||||
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]]} ";
|
||||
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]} ";
|
||||
echo "</td>";
|
||||
|
||||
//Charge fee
|
||||
echo "<td align=\"center\">";
|
||||
echo "{$row[charge_fee]} ";
|
||||
echo "</td>";
|
||||
|
||||
//Cap flag
|
||||
echo "<td align=\"center\">";
|
||||
echo "{$email_cap_flag_label[$row[cap_flag]]} ";
|
||||
echo "</td>";
|
||||
|
||||
echo "</tr>";
|
||||
}
|
||||
//echo "tariff_id=$tariff_id<br>";
|
||||
echo "</table>";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
<?php
|
||||
adjust_content_tail();
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user