init web ems all
This commit is contained in:
255
wxc2_omc/account/tariffPlan/tariffSmsEdit.php
Executable file
255
wxc2_omc/account/tariffPlan/tariffSmsEdit.php
Executable file
@@ -0,0 +1,255 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20>ļ<EFBFBD>˵<EFBFBD><CBB5>:
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:<3A>Ķ<DEB8><C4B6><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
||||
|
||||
<20><><EFBFBD>ù<EFBFBD>ϵ:<3A><><EFBFBD><EFBFBD>:header.inc
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:ʵ<>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD>ҳ<EFBFBD><D2B3>
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2004-04-13
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ʱ<EFBFBD>䣺
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*********************************************************/
|
||||
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?id=".$_REQUEST['id']."&mode=".$_REQUEST['mode'] ?>" method="POST">
|
||||
|
||||
<?php
|
||||
$DEBUG =0;
|
||||
adjust_head();
|
||||
adjust_title_head();
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
$ppsDb ='PPS_DB';
|
||||
|
||||
$id=$_REQUEST['id'];
|
||||
$tariffID=$_REQUEST['tariffID'];
|
||||
$tariff_id=$_REQUEST['tariff_id'];
|
||||
$mode=$_REQUEST['mode'];
|
||||
|
||||
|
||||
$prefix=$_REQUEST['prefix'];
|
||||
$call_type=$_REQUEST['call_type'];
|
||||
$area=$_REQUEST['area'];
|
||||
$discount_id=$_REQUEST['discount_id'];
|
||||
$charge_amount=$_REQUEST['charge_amount'];
|
||||
$cap_flag=$_REQUEST['cap_flag'];
|
||||
$charge_amount=$_REQUEST['charge_amount'];
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>
|
||||
|
||||
$rent_type=$_REQUEST['rent_type'];
|
||||
|
||||
|
||||
|
||||
$charge_amount=$_REQUEST['charge_amount'];
|
||||
|
||||
$tableName ='pre_bill_sms';
|
||||
global $OMC_server;
|
||||
$srcDataConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], $ppsDb);
|
||||
|
||||
$listPageURL = "tariffBasic.php?keep_id=1&return_tariff_id=$tariffID";
|
||||
$moneyPara = getMoneyPara(); //<2F><>ʾ<EFBFBD>Ļ<EFBFBD><C4BB>ҵ<EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>С<EFBFBD><D0A1><EFBFBD>ҵ<EFBFBD>λ<EFBFBD>ı<EFBFBD><C4B1><EFBFBD>
|
||||
$strPageTitle=$strTitleAdvanced.$strTitleSpace."PPS".$strTitleSpace."Tariff plan".$strTitleSpace."SMS";
|
||||
$arr_mode=array("edit","add");
|
||||
if($mode == "add"){
|
||||
$tableTitle = "Add SMS";
|
||||
}
|
||||
elseif($mode == "edit"){
|
||||
$tableTitle = "Edit SMS";
|
||||
}
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
if($DEBUG) echo "<br>id=$id";
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵı<C4B5><C4B1><EFBFBD>
|
||||
if(strlen($_POST['set']) > 0){
|
||||
echo "$mode";
|
||||
if ($mode == "edit"){
|
||||
$setSql="UPDATE $tableName
|
||||
SET prefix= '$prefix',
|
||||
call_type= '$call_type',
|
||||
area= '$area',
|
||||
discount_id= '$discount_id',
|
||||
charge_amount = '$charge_amount',
|
||||
cap_flag = '$cap_flag'
|
||||
WHERE id='$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\"> ";
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
$getEditSql="SELECT id,prefix,call_type,area,discount_id,charge_amount,cap_flag
|
||||
FROM $tableName
|
||||
WHERE id='$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($srcDataConn,$getAddSql);
|
||||
$rowsAdd= @mysqli_fetch_array($resultAdd);
|
||||
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&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\"> ";
|
||||
|
||||
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%\">$strTariffRentID</td>";
|
||||
echo "<td width=\"60%\">$id</td>";
|
||||
echo "<input type=\"hidden\" name=\"tariff_id\" value=\"$rows[tariff_id]\" size=\"25\">";
|
||||
$return_tariff_id = $rows[tariff_id]; //<2F><><EFBFBD>巵<EFBFBD><E5B7B5>ʱ<EFBFBD><CAB1>ҳ<EFBFBD><D2B3>
|
||||
echo "</tr>";
|
||||
|
||||
if(1 == $id){
|
||||
echo "<tr>";
|
||||
echo "<td>$strChargingPrefix</td>";
|
||||
echo "<td><input disabled type=\"text\" name=\"prefix\" size=\"10\" value=\"$rows[prefix]\"></td>";
|
||||
echo "<td><input type=\"hidden\" name=\"prefix\" size=\"10\" value=\"$rows[prefix]\"></td>";
|
||||
echo "</tr>";
|
||||
|
||||
$arr_CallType = array("Local call out","NDD","IDD");
|
||||
echo "<tr>";
|
||||
echo "<td>Call type</td>";
|
||||
echo "<td><input disabled type=\"text\" name=\"call_type\" size=\"10\" value=\"{$arr_CallType[$rows[call_type]]}\"></td>";
|
||||
echo "<td><input type=\"hidden\" name=\"call_type\" size=\"10\" value=\"$rows[call_type]\"></td>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td>$strCountryDistrict</td>";
|
||||
echo "<td><input disabled type=\"text\" name=\"area\" size=\"10\" value=\"$rows[area]\"></td>";
|
||||
echo "<td><input type=\"hidden\" name=\"area\" size=\"10\" value=\"$rows[area]\"></td>";
|
||||
echo "</tr>";
|
||||
}else{
|
||||
echo "<tr>";
|
||||
echo "<td>$strChargingPrefix</td>";
|
||||
echo "<td><input type=\"text\" name=\"prefix\" size=\"10\" value=\"$rows[prefix]\"></td>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td>Call type</td>";
|
||||
$call_type=$rows[call_type]-0;
|
||||
$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>";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td>$strCountryDistrict</td>";
|
||||
echo "<td><input type=\"text\" name=\"area\" size=\"10\" value=\"$rows[area]\"></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td>$strDiscountID</td>";
|
||||
echo "<td><input type=\"text\" name=\"discount_id\" size=\"10\" value=\"$rows[discount_id]\"></td>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td>$strTariffRentChargeAmount</td>";
|
||||
echo "<td><input type=\"text\" name=\"charge_amount\" size=\"10\" value=\"$rows[charge_amount]\" class=\"text\"> $moneyPara </td>";
|
||||
echo "</tr>";
|
||||
|
||||
$cap_flag_value=$rows[cap_flag]+0;
|
||||
$cap_flag_label=array(0=>"Disable",1=>"Home PLMN SM",2=>"Other Network SM");
|
||||
echo "<tr>";
|
||||
echo "<td>$strTariffRentCapFlag</td>";
|
||||
echo "<td>";
|
||||
echo "<select name=\"cap_flag\" size=1>";
|
||||
for($i=0;$i<3;$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>";
|
||||
|
||||
}
|
||||
?>
|
||||
</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">
|
||||
<input type="reset" name="reset" value="Reset" class="button">
|
||||
<input type="button" name="return" value="Return" onclick=jacascript:location.href="./tariffBasic.php" class="button">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
adjust_content_tail();
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user