?? pay_edit.asp
字號:
<!--#include file="Conn.asp"-->
<!--#include file="Check.asp"-->
<!--#include file ="Inc/Date.asp"-->
<%
Dim payid
Dim rs,ID,ListID,Payer,PayType,Money,Project,Menu,Times,InOut
payid = Request("id")
Set rs=Conn.Execute("Select ID,ListID,Payer,PayType,Money,Project,Menu,Time,InOut From [PayList] Where ID="&payid)
ID = rs(0)
ListID = rs(1)
Payer = rs(2)
PayType = rs(3)
Money = rs(4)
Project = rs(5)
Menu = rs(6)
Times = rs(7)
InOut = rs(8)
rs.Close
Set rs=Nothing
%>
<html>
<head>
<title>管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="Image/style.css" type=text/css rel=stylesheet>
<script language="JavaScript" src="Image/js.js"></SCRIPT>
</head>
<%
If Request.QueryString("action")="update" Then
Call PaySave
Else
%>
<script language="JavaScript">
<!--
function change(obj,i) {
he=parseInt(obj.style.height);
if (he>=80&&he<=400)
obj.style.height=he+i+'px';
else
obj.style.height='80px';
}
function chk(theForm){
if (theForm.listid.value == ""){
alert("請輸入單號!");
theForm.listid.focus();
return (false);
}
if (theForm.money.value == ""){
alert("請輸入金額!");
theForm.money.focus();
return (false);
}
if (theForm.pjna.value == ""){
alert("請輸入項目名稱!");
theForm.pjna.focus();
return (false);
}
if (theForm.message.value == ""){
alert("請輸入說明!");
theForm.message.focus();
return (false);
}
}
function CheckNum(){
if((event.keyCode<48||event.keyCode>57)&&event.keyCode!=46) event.returnValue=false;
}
//-->
</script>
<body text="#000000">
<table cellpadding="2" cellspacing="1" border="0" width="95%" class="tableBorder" align=center>
<form action="Pay_Edit2.asp?id=<%=ID%>&action=add" method=post id=form1 name=form1 onSubmit="return chk(this)">
<tr bgcolor=ffffff>
<th height=25 colspan=5 align="center"> 費用信息修改</th>
</tr>
<tr bgcolor=ffffff>
<td width="28%" class=forumrow><div align="right">單號:</div></td>
<td width="7%" class=forumrow> <input name="listid" type="text" id="listid" onkeypress="javascript:CheckNum();" value="<%=ListID%>" size="10" maxlength="10"></td>
<td width="10%" class=forumrow><div align="right">日期:</div></td>
<td colspan="2" class=forumrow><input name="adddate" type="text" id="adddate" value="<%=Times%>" size="12" maxlength="12" readonly>
<input onclick="popUpCalendar(this, form1.adddate, 'yyyy-mm-dd')" type="button" value="請選擇日期"></td>
</tr>
<tr bgcolor=ffffff>
<td width="28%" class=forumrow><div align="right">報銷人:</div></td>
<td colspan="4" class=forumrow><select name="selpayer" id="selpayer">
<option value="<%=Payer%>"><%=Payer%></option>
<%
Dim pa
Set pa=Conn.Execute("Select Payer From [Payer] Where Payer<>'"&Payer&"'")
Do While Not pa.Eof
Response.write "<option value='" & pa(0) & "'>" & pa(0) & "</option>"
pa.MoveNext
Loop
pa.Close
Set pa=Nothing
%>
</select></td>
</tr>
<tr bgcolor=ffffff>
<td class=forumrow><div align="right">費用類型:</div></td>
<td colspan="4" class=forumrow><select name="seltype" id="seltype">
<option value="<%=PayType%>"><%=PayType%></option>
<%
Dim pt
Set pt=Conn.Execute("Select PayType From [PayType] Where PayType<>'"&PayType&"'")
Do While Not pt.Eof
Response.write "<option value='" & pt(0) & "'>" & pt(0) & "</option>"
pt.MoveNext
Loop
pt.Close
Set pt=Nothing
%>
</select></td>
</tr>
<tr bgcolor=ffffff>
<td class=forumrow><div align="right">收入/支出:</div></td>
<td colspan="4" class=forumrow><select name="selInOut">
<%
If InOut=1 Then
Response.Write "<option value='1'>收入</option>"
Response.Write "<option value='0'>支出</option>"
Else
Response.Write "<option value='0'>支出</option>"
Response.Write "<option value='1'>收入</option>"
End if
%>
</select></td>
</tr>
<tr bgcolor=ffffff>
<td class=forumrow><div align="right">金額:</div></td>
<td colspan="4" class=forumrow> <input name="mon" type="text" id="mon" onkeypress="javascript:CheckNum();" value="<%=Money%>" size="10" maxlength="10"></td>
</tr>
<tr bgcolor=ffffff>
<td class=forumrow><div align="right">項目名稱:</div></td>
<td colspan="4" class=forumrow> <input name="pjna" type="text" id="pjna" value="<%=Project%>" size="50" maxlength="50"></td>
</tr>
<tr bgcolor=ffffff>
<td rowspan="2" class=forumrow><div align="right">說明:</div></td>
<td colspan="4" class=forumrow><textarea name="message" cols="50" rows="8" id="message"><%=Menu%></textarea>
</td>
</tr>
<tr bgcolor=ffffff>
<td colspan="3" class=forumrow> </td>
<td width="43%" class=forumrow><a href="javascript:change(document.all.message,-50)"><img src="Image/minus.gif" alt="縮小文本框" width="20" height="20" border="0"></a>
<a href="javascript:change(document.all.message,50)"><img src="Image/plus.gif" alt="放大文本框" width="20" height="20" border="0"></a></td>
</tr>
<tr bgcolor=ffffff>
<td colspan="5" align="center" class=forumrow><input type="submit" name="Submit" value="修 改"></td>
</tr>
</form>
</table>
<%End if%>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -