?? bank_edit.php
字號:
<?php
require(dirname(__FILE__)."/include/config_base.php");
require(dirname(__FILE__)."/include/config_rglobals.php");
if($id=='')
ShowMsg('非法參數,請正確執行此文件。','-1');
if($action=='save'){
if($b_name==''){
ShowMsg('請輸入賬戶名稱','-1');
exit();
}
if($b_default==1){
$sasql=New Dedesql(false);
$sasql->ExecuteNoneQuery("update #@__bank set bank_default=0");
$sasql->close();
}
$addsql="update #@__bank set bank_name='$b_name',bank_account='$b_account',bank_default='$b_default',bank_text='".$b_text."' where id='$id'";
$message= "修改銀行資料".$b_name."成功";
$loginip=getip();
$logindate=getdatetimemk(time());
$username=str_replace($cfg_cookie_encode,'',$_COOKIE["VioomaUserID"]);
WriteNote($message,$logindate,$loginip,$username);
$isql=new dedesql(false);
$isql->ExecuteNoneQuery($addsql);
$isql->close();
showmsg('成功修改了銀行賬戶資料','bank.php');
exit();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="style/main.css" rel="stylesheet" type="text/css" />
<title><?php echo $cfg_softname;?>銀行管理</title>
</head>
<body>
<?php
$esql=New Dedesql(false);
$query="select * from #@__bank where id='$id'";
$esql->SetQuery($query);
$esql->Execute();
if($esql->GetTotalRow()==0){
ShowMsg('非法調用參數,請重試','-1');
exit();
}
$row=$esql->GetOne($query);
$esql->close();
?>
<table width="100%" border="0" id="table_style_all" cellpadding="0" cellspacing="0">
<tr>
<td id="table_style" class="l_t"> </td>
<td> </td>
<td id="table_style" class="r_t"> </td>
</tr>
<tr>
<td> </td>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="2">
<tr>
<td><strong> 銀行資料修改</strong></td>
</tr>
<form action="bank_edit.php?action=save" method="post">
<tr>
<td bgcolor="#FFFFFF">
<table width="100%" cellspacing="0" cellpadding="0" border="0" id="table_border">
<tr>
<td id="row_style"> 銀行名稱:</td>
<td>
<input type="text" name="b_name" size="20" value="<?php echo $row['bank_name'] ?>" id="need"><input type="hidden" name="id" value="<?php echo $id; ?>">
</td>
</tr>
<tr>
<td id="row_style"> 金額:</td>
<td>
<input type="text" name="b_money" size="15" value="<?php echo $row['bank_money'] ?>" readonly> 元</td>
</tr>
<tr>
<td id="row_style"> 賬號:</td>
<td>
<input type="text" name="b_account" size="20" value="<?php echo $row['bank_account'] ?>"></td>
</tr>
<tr>
<td id="row_style"> 是否默認銀行:</td>
<td>
<?php
if ($row['bank_default']==0)
echo " <select name=\"b_default\"><option value=\"1\">是</option><option value=\"0\" selected>否</option></select> 只能保留一個默認銀行";
else
echo " <select name=\"b_default\"><option value=\"1\" selected>是</option><option value=\"0\">否</option></select> 只能保留一個默認銀行";
?>
</td>
</tr>
<tr>
<td id="row_style"> 備注:</td>
<td>
<textarea name="b_text" cols="40" rows="2"><?php echo $row['bank_text'] ?></textarea></td>
</tr>
<tr>
<td id="row_style"> </td>
<td> <input type="submit" name="submit" value=" 修改銀行資料 "></td>
</tr></form>
</table>
</td>
</tr>
</table>
</td>
<td> </td>
</tr>
<tr>
<td id="table_style" class="l_b"> </td>
<td> </td>
<td id="table_style" class="r_b"> </td>
</tr>
</table>
<?php
copyright();
?>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -