📄 submit.asp
字号:
<% @LANGUAGE = VBScript %>
<!--#include file="adovbs.inc"-->
<%
if request.QueryString("ok")<>"y" then
%>
<%
dim fclass
dim fweek
dim fusername
dim fa1
dim fa2
dim fa3
dim fa4
dim fa5
dim fa6
dim fa7
dim fa8
dim fa9
dim fa10
dim fa11
dim fa12
dim fa13
dim fb1
dim fb2
dim fb3
dim fb4
dim fb5
dim fb6
dim fb7
dim fb8
dim fb9
dim fb10
dim fb11
dim fb12
dim fb13
dim fc1
dim fc2
dim fc3
dim fc4
dim fc5
dim fc6
dim fc7
dim fc8
dim fc9
dim fc10
dim fc11
dim fc12
dim fc13
dim fd1
dim fd2
dim fd3
dim fd4
dim fd5
dim fd6
dim fd7
dim fd8
dim fd9
dim fd10
dim fd11
dim fd12
dim fd13
dim fe1
dim fe2
dim fe3
dim fe4
dim fe5
dim fe6
dim fe7
dim fe8
dim fe9
dim fe10
dim fe11
dim fe12
dim fe13
dim ff1
dim ff2
dim ff3
dim ff4
dim ff5
dim ff6
dim ff7
dim ff8
dim ff9
dim ff10
dim ff11
dim ff12
dim ff13
fyear = request.Form("year")
fmonth = request.Form("month")
fclass=request.form("class")
fweek=request.form("week")
fusername=trim(request.form("username"))
fa1=request.form("fa1")
fa2=request.form("fa2")
fa3=request.form("fa3")
fa4=request.form("fa4")
fa5=request.form("fa5")
fa6=request.form("fa6")
fa7=request.form("fa7")
fa8=request.form("fa8")
fa9=request.form("fa9")
fa10=request.form("fa10")
fa11=request.form("fa11")
fa12=request.form("fa12")
fa13=request.form("fa13")
fb1=request.form("fb1")
fb2=request.form("fb2")
fb3=request.form("fb3")
fb4=request.form("fb4")
fb5=request.form("fb5")
fb6=request.form("fb6")
fb7=request.form("fb7")
fb8=request.form("fb8")
fb9=request.form("fb9")
fb10=request.form("fb10")
fb11=request.form("fb11")
fb12=request.form("fb12")
fb13=request.form("fb13")
fc1=request.form("fc1")
fc2=request.form("fc2")
fc3=request.form("fc3")
fc4=request.form("fc4")
fc5=request.form("fc5")
fc6=request.form("fc6")
fc7=request.form("fc7")
fc8=request.form("fc8")
fc9=request.form("fc9")
fc10=request.form("fc10")
fc11=request.form("fc11")
fc12=request.form("fc12")
fc13=request.form("fc13")
fd1=request.form("fd1")
fd2=request.form("fd2")
fd3=request.form("fd3")
fd4=request.form("fd4")
fd5=request.form("fd5")
fd6=request.form("fd6")
fd7=request.form("fd7")
fd8=request.form("fd8")
fd9=request.form("fd9")
fd10=request.form("fd10")
fd11=request.form("fd11")
fd12=request.form("fd12")
fd13=request.form("fd13")
fe1=request.form("fe1")
fe2=request.form("fe2")
fe3=request.form("fe3")
fe4=request.form("fe4")
fe5=request.form("fe5")
fe6=request.form("fe6")
fe7=request.form("fe7")
fe8=request.form("fe8")
fe9=request.form("fe9")
fe10=request.form("fe10")
fe11=request.form("fe11")
fe12=request.form("fe12")
fe13=request.form("fe13")
ff1=request.form("ff1")
ff2=request.form("ff2")
ff3=request.form("ff3")
ff4=request.form("ff4")
ff5=request.form("ff5")
ff6=request.form("ff6")
ff7=request.form("ff7")
ff8=request.form("ff8")
ff9=request.form("ff9")
ff10=request.form("ff10")
ff11=request.form("ff11")
ff12=request.form("ff12")
fe13=request.form("ff13")
Set conn = Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("classroom.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
Set rs = Server.CreateObject("ADODB.Recordset")
'rs.Open "userpwd", conn, adOpenDynamic, adLockPessimistic
'rs.movefirst
' while Not rs.EOF
' if rs("username")=fusername then
' if rs(fweek+1).value<12 then
' rs(fweek+1).value=rs(fweek+1).value+1
' rs.update
' else
' response.redirect "submiterr.htm"
' end if
' end if
' rs.movenext
' wend
connstr = "DBQ="+server.mappath("classroom.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;ImplicitCommitSync=Yes;MaxBufferSize=512;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UserCommitSync=Yes;"
Set Conn = Server.CreateObject("ADODB.Connection")
set rs=server.createobject("adodb.recordset")
conn.open connstr
sql="select * from "&trim(fclass)&" "
rs.open sql,Conn,1,2
rs.movefirst
for i=1 to rs.recordcount
if rs("week")=fweek and rs("month")=fmonth and rs("year")=fyear then
rs.update
if trim(rs("a1"))<>"" then
error=1
else
rs("a1")=trim(fa1)
end if
if trim(rs("a2"))<>"" then
error=1
else
rs("a2")=trim(fa2)
end if
if trim(rs("a3"))<>"" then
error=1
else
rs("a3")=trim(fa3)
end if
if trim(rs("a4"))<>"" then
error=1
else
rs("a4")=trim(fa4)
end if
if trim(rs("a5"))<>"" then
error=1
else
rs("a5")=trim(fa5)
end if
if trim(rs("a6"))<>"" then
error=1
else
rs("a6")=trim(fa6)
end if
if trim(rs("a7"))<>"" then
error=1
else
rs("a7")=trim(fa7)
end if
if trim(rs("a8"))<>"" then
error=1
else
rs("a8")=trim(fa8)
end if
if trim(rs("a9"))<>"" then
error=1
else
rs("a9")=trim(fa9)
end if
if trim(rs("a10"))<>"" then
error=1
else
rs("a10")=trim(fa10)
end if
if trim(rs("a11"))<>"" then
error=1
else
rs("a11")=trim(fa11)
end if
if trim(rs("a12"))<>"" then
error=1
else
rs("a12")=trim(fa12)
end if
if trim(rs("a13"))<>"" then
error=1
else
rs("a13")=trim(fa13)
end if
if trim(rs("b1"))<>"" then
error=1
else
rs("b1")=trim(fb1)
end if
if trim(rs("b2"))<>"" then
error=1
else
rs("b2")=trim(fb2)
end if
if trim(rs("b3"))<>"" then
error=1
else
rs("b3")=trim(fb3)
end if
if trim(rs("b4"))<>"" then
error=1
else
rs("b4")=trim(fb4)
end if
if trim(rs("b5"))<>"" then
error=1
else
rs("b5")=trim(fb5)
end if
if trim(rs("b6"))<>"" then
error=1
else
rs("b6")=trim(fb6)
end if
if trim(rs("b7"))<>"" then
error=1
else
rs("b7")=trim(fb7)
end if
if trim(rs("b8"))<>"" then
error=1
else
rs("b8")=trim(fb8)
end if
if trim(rs("b9"))<>"" then
error=1
else
rs("b9")=trim(fb9)
end if
if trim(rs("b10"))<>"" then
error=1
else
rs("b10")=trim(fb10)
end if
if trim(rs("b11"))<>"" then
error=1
else
rs("b11")=trim(fb11)
end if
if trim(rs("b12"))<>"" then
error=1
else
rs("b12")=trim(fb12)
end if
if trim(rs("b13"))<>"" then
error=1
else
rs("b13")=trim(fb13)
end if
if trim(rs("c1"))<>"" then
error=1
else
rs("c1")=trim(fc1)
end if
if trim(rs("c2"))<>"" then
error=1
else
rs("c2")=trim(fc2)
end if
if trim(rs("c3"))<>"" then
error=1
else
rs("c3")=trim(fc3)
end if
if trim(rs("c4"))<>"" then
error=1
else
rs("c4")=trim(fc4)
end if
if trim(rs("c5"))<>"" then
error=1
else
rs("c5")=trim(fc5)
end if
if trim(rs("c6"))<>"" then
error=1
else
rs("c6")=trim(fc6)
end if
if trim(rs("c7"))<>"" then
error=1
else
rs("c7")=trim(fc7)
end if
if trim(rs("c8"))<>"" then
error=1
else
rs("c8")=trim(fc8)
end if
if trim(rs("c9"))<>"" then
error=1
else
rs("c9")=trim(fc9)
end if
if trim(rs("c10"))<>"" then
error=1
else
rs("c10")=trim(fc10)
end if
if trim(rs("c11"))<>"" then
error=1
else
rs("c11")=trim(fc11)
end if
if trim(rs("c12"))<>"" then
error=1
else
rs("c12")=trim(fc12)
end if
if trim(rs("c13"))<>"" then
error=1
else
rs("c13")=trim(fc13)
end if
if trim(rs("d1"))<>"" then
error=1
else
rs("d1")=trim(fd1)
end if
if trim(rs("d2"))<>"" then
error=1
else
rs("d2")=trim(fd2)
end if
if trim(rs("d3"))<>"" then
error=1
else
rs("d3")=trim(fd3)
end if
if trim(rs("d4"))<>"" then
error=1
else
rs("d4")=trim(fd4)
end if
if trim(rs("d5"))<>"" then
error=1
else
rs("d5")=trim(fd5)
end if
if trim(rs("d6"))<>"" then
error=1
else
rs("d6")=trim(fd6)
end if
if trim(rs("d7"))<>"" then
error=1
else
rs("d7")=trim(fd7)
end if
if trim(rs("d8"))<>"" then
error=1
else
rs("d8")=trim(fd8)
end if
if trim(rs("d9"))<>"" then
error=1
else
rs("d9")=trim(fd9)
end if
if trim(rs("d10"))<>"" then
error=1
else
rs("d10")=trim(fd10)
end if
if trim(rs("d11"))<>"" then
error=1
else
rs("d11")=trim(fd11)
end if
if trim(rs("d12"))<>"" then
error=1
else
rs("d12")=trim(fd12)
end if
if trim(rs("d13"))<>"" then
error=1
else
rs("d13")=trim(fd13)
end if
if trim(rs("e1"))<>"" then
error=1
else
rs("e1")=trim(fe1)
end if
if trim(rs("e2"))<>"" then
error=1
else
rs("e2")=trim(fe2)
end if
if trim(rs("e3"))<>"" then
error=1
else
rs("e3")=trim(fe3)
end if
if trim(rs("e4"))<>"" then
error=1
else
rs("e4")=trim(fe4)
end if
if trim(rs("e5"))<>"" then
error=1
else
rs("e5")=trim(fe5)
end if
if trim(rs("e6"))<>"" then
error=1
else
rs("e6")=trim(fe6)
end if
if trim(rs("e7"))<>"" then
error=1
else
rs("e7")=trim(fe7)
end if
if trim(rs("e8"))<>"" then
error=1
else
rs("e8")=trim(fe8)
end if
if trim(rs("e9"))<>"" then
error=1
else
rs("e9")=trim(fe9)
end if
if trim(rs("e10"))<>"" then
error=1
else
rs("e10")=trim(fe10)
end if
if trim(rs("e11"))<>"" then
error=1
else
rs("e11")=trim(fe11)
end if
if trim(rs("e12"))<>"" then
error=1
else
rs("e12")=trim(fe12)
end if
if trim(rs("e13"))<>"" then
error=1
else
rs("e13")=trim(fe13)
end if
if trim(rs("f1"))<>"" then
error=1
else
rs("f1")=trim(ff1)
end if
if trim(rs("f2"))<>"" then
error=1
else
rs("f2")=trim(ff2)
end if
if trim(rs("f3"))<>"" then
error=1
else
rs("f3")=trim(ff3)
end if
if trim(rs("f4"))<>"" then
error=1
else
rs("f4")=trim(ff4)
end if
if trim(rs("f5"))<>"" then
error=1
else
rs("f5")=trim(ff5)
end if
if trim(rs("f6"))<>"" then
error=1
else
rs("f6")=trim(ff6)
end if
if trim(rs("f7"))<>"" then
error=1
else
rs("f7")=trim(ff7)
end if
if trim(rs("f8"))<>"" then
error=1
else
rs("f8")=trim(ff8)
end if
if trim(rs("f9"))<>"" then
error=1
else
rs("f9")=trim(ff9)
end if
if trim(rs("f10"))<>"" then
error=1
else
rs("f10")=trim(ff10)
end if
if trim(rs("f11"))<>"" then
error=1
else
rs("f11")=trim(ff11)
end if
if trim(rs("f12"))<>"" then
error=1
else
rs("f12")=trim(ff12)
end if
if trim(rs("f13"))<>"" then
error=1
else
rs("f13")=trim(ff13)
end if
'response.write rs("rs(fweek+1)")
response.write "<br><br><center> 恭喜,您已经预订成功了!</center><br><br>"
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>查询结果</title>
</head>
<body>
<form method="post" action="browse.asp" name="form1">
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> <input type="hidden" name="year" value="<%=fyear%>">
<input type="hidden" name="month" value="<%=fmonth%>">
<input type="hidden" name="week" value="<%=fweek%>">
<input type="hidden" name="class" value="<%=fclass%>">
<input type="submit" name="Submit" value="查看我的预约记录">
</td>
</tr>
</table>
</form>
</body>
</html>
<% end if
rs.movenext
next
response.write "<center><a href='BROWSE.HTM'>回到系统首页</a></center>"
Response.Write("<script LANGUAGE = JScript>window.document.URL='" + "SUBMIT.asp?ok=y&fweek="+fweek+"&fclass="+fclass + "&fmonth="+fmonth + "&fyear="+fyear +"';</script>")
response.end
rs=nothing
%>
<%
else
fyear=request.QueryString("fyear")
fmonth=request.QueryString("fmonth")
fweek=request.QueryString("fweek")
fclass=request.QueryString("fclass")
response.write "<br><br><center> 恭喜,您已经成功修改了信息!</center><br><br>"
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>查询结果</title>
</head>
<body>
<form method="post" action="browse.asp" name="form1">
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<input type="hidden" name="year" value="<%=fyear%>">
<input type="hidden" name="month" value="<%=fmonth%>">
<input type="hidden" name="week" value="<%=fweek%>">
<input type="hidden" name="class" value="<%=fclass%>">
<input type="submit" name="Submit" value="查看我的预约记录">
</td>
</tr>
</table>
</form>
</body>
</html>
<%
response.write "<center><a href='BROWSE.HTM'>返回系统首页</a></center>"
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -