"; echo ""; echo ""; echo "$strPageTitle"; echo ""; echo " "; echo ""; echo ""; echo ""; adjust_title_tail(); adjust_content_head(); echo "
"; //========================================================== //输入变量 //========================================================== if($DEBUG) echo "
id=$id"; //========================================================== //数据处理 //========================================================== //保存修改的变量 if(strlen($_REQUEST['set']) > 0){ if ($mode == "edit"){ $setSql="UPDATE $tableName SET description = '$description', rent_type = '$rent_type', charge_date = '$rent_day', rent_amount = '$Charge_amount' WHERE id = '$id' AND tariff_id='$tariffID'"; if(1) echo "
$setSql"; $result= @mysqli_query($srcDataConn,$setSql); echo mysqli_error($srcDataConn); if($DEBUG) exit(); echo " "; } if ($mode == "add"){ $setSql="INSERT INTO $tableName (id,description,rent_type,charge_date,rent_amount) VALUES ('$rent_id','$description','$rent_type','$rent_day','$charge_amount')"; if($DEBUG) echo "
setSql=$setSql"; $result= @mysqli_query($srcDataConn,$setSql); echo mysqli_error($srcDataConn); if($DEBUG) exit(); echo " "; } } //========================================================== //输出并显示数据 //========================================================== $getEditSql="SELECT id,description, rent_type, charge_date,rent_amount FROM $tableName WHERE id = '$id' AND tariff_id='$tariffID'"; if($DEBUG) echo "
$getEditSql"; $resultEdit= @mysqli_query($srcDataConn,$getEditSql); $rows= @mysqli_fetch_array($resultEdit); echo mysqli_error($srcDataConn); $getAddSql="SELECT id FROM $tableName"; //if($DEBUG) echo "
$getEditSql"; $resultAdd= @mysqli_query($srcDataConn,$getAddSql); $rowsAdd= @mysqli_fetch_array($resultAdd); echo mysqli_error($srcDataConn); ?> "; echo ""; echo ""; echo ""; $return_tariff_id = $rows[tariff_id]; //定义返回时的页面 echo ""; echo ""; echo ""; if(1==$id){ echo ""; echo ""; } else echo ""; echo ""; echo ""; echo ""; $arr_RentType = array("Every day","Every month"); $length = sizeof($arr_RentType); echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } elseif ($mode == "add"){ echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $arr_RentType = array("Every day","Every month"); $length = sizeof($arr_RentType); echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } ?>
$strTariffRentID$id
$strDescription$rows[description]
$strTariffRentChargeType"; echo ""; echo "
$strTariffRentChargeDate"; if ($rent_type =='1') { echo ""; } elseif ($rent_type == '0'){ echo "--"; } echo "
$strTariffRentChargeAmount $moneyPara 
$strTariffRentID$id
$strTariffRentChargeType"; echo ""; echo "
$strTariffRentChargeDate"; if ($rent_type=='1'){ echo ""; } elseif ($rent_type=='0'){ echo "--"; } else {echo "--";} echo "
$strDescription
$strTariffRentChargeAmount $moneyPara