<?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>   
