急急急……帮忙解释以下代码的含义!!!!谢谢……
setcn=server.CreateObject("ADODB.Connection")setrs=server.CreateObject("ADODB.Records...
set cn=server.CreateObject("ADODB.Connection")
set rs=server.CreateObject("ADODB.Recordset")
set rs2=server.CreateObject("ADODB.Recordset")
set rs3=server.CreateObject("ADODB.Recordset")
cn.Open mycnstr
myurl="tourmate.asp"
mode=Request("mode")
sm=Request.QueryString("sm")
title=trim(Request.Form("title"))
destination=trim(Request.Form("destination"))
if trim(Request.Form("godate"))="" then
godate=""
else
godate=Cdate(trim(Request.Form("godate")))
end if
'response.Write godate
keyid=Request.QueryString("key")
if keyid="" or not isnumeric(keyid) then keyid=0
key=keyid
%>
<%
'add record
if mode="add" then
sqltext="select * from tourmate "
rs.Open sqltext,cn,1,2
rs.AddNew
rs("id")=getkeyid("tourmate","id")
rs("title")=trim(Request("title"))
rs("destination")=trim(Request("destination"))
rs("godate")=Request("godate")
rs("startplace")=trim(Request("startplace"))
rs("detail")=trim(Request("detail"))
rs("age")=trim(Request("age"))
rs("selfinfo")=trim(Request("selfinfo"))
rs("count")=Request("count")
rs("claim")=trim(Request("claim"))
rs("contact")=Request("contact")
rs("userid")=Request.Cookies("userid")
rs("hitcount")=0
rs("replycount")=0
rs("flag")=0
rs("creatdate")=now()
rs("editdate")=now()
rs.Update
rs.Close
'response.redirect "success02.asp"
'session("fkfk")=minute(now)
response.write "<script language=javascript>alert('添加结伴同游信息成功!');window.location.href='tourmate.asp';</script>"
end if 展开
set rs=server.CreateObject("ADODB.Recordset")
set rs2=server.CreateObject("ADODB.Recordset")
set rs3=server.CreateObject("ADODB.Recordset")
cn.Open mycnstr
myurl="tourmate.asp"
mode=Request("mode")
sm=Request.QueryString("sm")
title=trim(Request.Form("title"))
destination=trim(Request.Form("destination"))
if trim(Request.Form("godate"))="" then
godate=""
else
godate=Cdate(trim(Request.Form("godate")))
end if
'response.Write godate
keyid=Request.QueryString("key")
if keyid="" or not isnumeric(keyid) then keyid=0
key=keyid
%>
<%
'add record
if mode="add" then
sqltext="select * from tourmate "
rs.Open sqltext,cn,1,2
rs.AddNew
rs("id")=getkeyid("tourmate","id")
rs("title")=trim(Request("title"))
rs("destination")=trim(Request("destination"))
rs("godate")=Request("godate")
rs("startplace")=trim(Request("startplace"))
rs("detail")=trim(Request("detail"))
rs("age")=trim(Request("age"))
rs("selfinfo")=trim(Request("selfinfo"))
rs("count")=Request("count")
rs("claim")=trim(Request("claim"))
rs("contact")=Request("contact")
rs("userid")=Request.Cookies("userid")
rs("hitcount")=0
rs("replycount")=0
rs("flag")=0
rs("creatdate")=now()
rs("editdate")=now()
rs.Update
rs.Close
'response.redirect "success02.asp"
'session("fkfk")=minute(now)
response.write "<script language=javascript>alert('添加结伴同游信息成功!');window.location.href='tourmate.asp';</script>"
end if 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询