init web ems all
This commit is contained in:
159
wxc2_omc/account/tariffPlan/tariffServicesEdit.php
Executable file
159
wxc2_omc/account/tariffPlan/tariffServicesEdit.php
Executable file
@@ -0,0 +1,159 @@
|
||||
<?php
|
||||
/*********************************************************
|
||||
<20>ļ<EFBFBD>˵<EFBFBD><CBB5>:
|
||||
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:<3A><EFBFBD>Service<63><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><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>:
|
||||
NO.1
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ʱ<EFBFBD>䣺2004-4-13
|
||||
<EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>OMC 7.0 <20><><EFBFBD><EFBFBD><EFBFBD>˿<EFBFBD>ͨ<EFBFBD><CDA8>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC>tariff_id<69><64><EFBFBD>IJ<DEB8>ͬ
|
||||
tariff_id<69>÷<EFBFBD><C3B7><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;">
|
||||
|
||||
<?php
|
||||
$DEBUG=0;
|
||||
adjust_head();
|
||||
adjust_title_head();
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
$moneyPara = getMoneyPara(); //<2F><>ʾ<EFBFBD>Ļ<EFBFBD><C4BB>ҵ<EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>С<EFBFBD><D0A1><EFBFBD>ҵ<EFBFBD>λ<EFBFBD>ı<EFBFBD><C4B1><EFBFBD>
|
||||
$ppsDb='PPS_DB';
|
||||
|
||||
$description=$_REQUEST['description'];
|
||||
$arr_editfieldAmount=$_REQUEST['arr_editfieldAmount'];
|
||||
$arr_editfieldUnit=$_REQUEST['arr_editfieldUnit'];
|
||||
$tariffID=$_REQUEST['tariffID'];
|
||||
|
||||
$amount=$_REQUEST['amount'];
|
||||
$unit=$_REQUEST['unit'];
|
||||
|
||||
|
||||
global $OMC_server;
|
||||
$srcDataConn = mysqli_connect($OMC_server[0]['host'],$OMC_server[0]['user'],$OMC_server[0]['password'], $ppsDb);
|
||||
|
||||
$tableName='pre_comm_tariff';
|
||||
$listPageURL= "tariffBasic.php?keep_id=1&return_tariff_id=$tariffID";
|
||||
if($DEBUG) echo "url=$listPageURL<br>";
|
||||
|
||||
$strPageTitle=$strTitleAdvanced.$strTitleSpace."PPS".$strTitleSpace.$strCurrentTariff.$strTitleSpace."Multiple services";
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵı<C4B5><C4B1><EFBFBD>
|
||||
if(strlen($_POST['set']) > 0){
|
||||
if (strlen($arr_editfieldUnit)>0){
|
||||
$strSqlUpdate = $arr_editfieldAmount."='$amount',".$arr_editfieldUnit."='$unit'";
|
||||
}
|
||||
else{
|
||||
$strSqlUpdate = $arr_editfieldAmount."='$amount'";
|
||||
}
|
||||
if ($DEBUG) echo "<br>strSqlUpdate:$strSqlUpdate";
|
||||
if ($DEBUG) echo "<br>arr_editfieldUnit:$arr_editfieldUnit";
|
||||
$where =" WHERE tariff_id=$tariffID";
|
||||
$selSql ="Select count(*) FROM $tableName".$where;
|
||||
if($DEBUG) echo "<br>$selSql";
|
||||
$result = @mysqli_query($srcDataConn,$selSql);
|
||||
$rows =mysqli_fetch_array($result);
|
||||
$rowsNum=$rows[0];
|
||||
if($DEBUG) echo "<br>rowsNum=$rows[0]";
|
||||
if($rowsNum){
|
||||
$setSql="UPDATE $tableName
|
||||
SET $strSqlUpdate $where";
|
||||
}else{
|
||||
$setSql="REPLACE $tableName
|
||||
SET $strSqlUpdate $where";
|
||||
}
|
||||
if($DEBUG) echo "<br>setSql=$setSql<br>";
|
||||
$result= @mysqli_query($srcDataConn,$setSql);
|
||||
echo mysqli_error($srcDataConn);
|
||||
if(!$DEBUG){
|
||||
echo " <meta http-equiv=\"refresh\" content=\"0; url=$listPageURL\"> ";
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
//==========================================================
|
||||
$getSql="SELECT * FROM $tableName WHERE tariff_id='$tariffID'";
|
||||
//echo $getSql;
|
||||
$result=mysqli_query($srcDataConn,$getSql);
|
||||
$rows=mysqli_fetch_array($result);
|
||||
echo mysqli_error($srcDataConn);
|
||||
?>
|
||||
|
||||
|
||||
<?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>";
|
||||
|
||||
?>
|
||||
|
||||
<form name="editform" action="
|
||||
<?php echo"$PHP_SELF?description=$description&arr_editfieldAmount=$arr_editfieldAmount&arr_editfieldUnit=$arr_editfieldUnit"; ?>
|
||||
" method="POST">
|
||||
<table border="1" width="400" cellpadding="2" cellspacing="0" bordercolor="#666666" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" >
|
||||
<?php
|
||||
echo "<tr>";
|
||||
echo "<td bgcolor=\"#E6E6E6\" colspan=\"2\">Edit services</td>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td width=\"40%\">$strDescription</td>";
|
||||
echo "<td width=\"60%\">$description</td>";
|
||||
$return_tariff_id = $rows[tariff_id]; //<2F><><EFBFBD>巵<EFBFBD><E5B7B5>ʱ<EFBFBD><CAB1>ҳ<EFBFBD><D2B3>
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td>$strTariffRentChargeAmount</td>";
|
||||
echo "<td><input type=\"text\" name=\"amount\" size=\"5\" value=\"$rows[$arr_editfieldAmount]\" class=\"text\" style=\"text-align: right;\"> $moneyPara</td>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td>$strUnitChargingTimeSecond</td>";
|
||||
if (strlen($arr_editfieldUnit)>0){
|
||||
echo "<td><input type=\"text\" name=\"unit\" size=\"5\" value=\"$rows[$arr_editfieldUnit]\" class=\"text\" style=\"text-align: right;\"></td>";
|
||||
}
|
||||
else{
|
||||
echo "<td>--</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>
|
||||
<?php
|
||||
adjust_content_tail();
|
||||
?>
|
||||
</body>
|
||||
</form>
|
||||
</html>
|
||||
Reference in New Issue
Block a user