"> =300){ echo ""; echo " "; 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 "
"; //========================================================== //数据处理 //========================================================== //保存修改的变量 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 "
$setSql"; $result= @mysqli_query($pubConn,$setSql); echo mysqli_error($pubConn); if($DEBUG) echo"
$listPageURL"; if(0 == $DEBUG) echo " "; } if($mode=="add"){ //检查区号和地区名是否输入 if (strlen($DistrictID) < 1){ echo ""; echo " "; exit(); } if (!$District){ echo ""; echo " "; exit(); } for($count=0;$count'9'){ if($DistrictID[$count]!='B'&&$DistrictID[$count]!='b'&&$DistrictID[$count]!='C'&&$DistrictID[$count]!='c'){ echo ""; echo " "; 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 "
setSql=$setSql"; $result= @mysqli_query($pubConn,$setSql); echo mysqli_error($pubConn); echo " "; } } if(strlen($delete) > 0){ $deleteSql="DELETE FROM $tableName WHERE bill_id='$id' AND tariff_id='$tariffID'"; if($DEBUG) echo "
$deleteSql"; $result= @mysqli_query($pubConn,$deleteSql); echo mysqli_error($pubConn); echo " "; } //========================================================== //输出并显示数据 //========================================================== $sel_sql ="SELECT * FROM $tableName WHERE bill_id='$id' AND tariff_id='$tariffID'"; //echo "
sel_sql=$sel_sql"; $result = @mysqli_query($pubConn,$sel_sql); $rows = @mysqli_fetch_array($result); echo mysqli_error($pubConn); ?> "; echo ""; echo ""; echo "$strThisPage"; echo ""; echo " "; echo ""; echo ""; echo ""; echo ""; echo "
"; ?> List "; echo " "; echo ""; echo ""; echo ""; adjust_title_tail(); adjust_content_head(); echo "
"; ?> "> "; echo ""; echo ""; $return_tariff_id = $rows[tariff_id]; //定义返回时的页面 echo ""; if('Default' == $rows[area]){ echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; }else{ echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo ""; echo ""; $arr_CallType = array("Local call in","Trunk call in"); $length = sizeof($arr_CallType); echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } elseif ($mode == "add"){ echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $arr_CallType = array("Local call in","Trunk call in"); $length = sizeof($arr_CallType); echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } else { exit(); } ?>
$strResideZone$rows[tariff_id]
$strChargingPrefix 
$strCountryDistrict
$strChargingPrefix$rows[bill_id]
$strCountryDistrict
$strCallType"; echo ""; echo "
$strDiscountID
$strUnitChargingTimeSecond
$strFreeChargeUnit
$strMinimumChargingUnit
$strBasicInitial  $moneyPara
Tier Level(0-2)
Tier0 Unit
$strBasicFee  $moneyPara
$strBasicLongDistance  $moneyPara
Tier1 Unit
$strBasicFee  $moneyPara
$strBasicLongDistance  $moneyPara
Tier2 Unit
$strBasicFee  $moneyPara
$strBasicLongDistance  $moneyPara
$strResideZone$tariff_id"; /* echo ""; */ $return_tariff_id = $tariff_id; //定义返回时的页面 echo "
$strChargingPrefix
$strCountryDistrict
$strCallType"; echo ""; $call_type = $call_type; echo "
$strDiscountID
$strUnitChargingTimeSecond
$strFreeChargeUnit
$strMinimumChargingUnit
$strBasicInitial  $moneyPara
Tier Level  (0-2)
Tier0 Unit
$strBasicFee  $moneyPara
$strBasicLongDistance  $moneyPara
Tier1 Unit
$strBasicFee  $moneyPara
$strBasicLongDistance  $moneyPara
Tier2 Unit
$strBasicFee  $moneyPara
$strBasicLongDistance  $moneyPara
     "; ?> "; echo ""; } else { echo ""; } }else echo ""; ?>