pagestart
dim action
action=trim(request("action"))
select case action
case "login"
login
case "logout"
logout
case "look"
userlook
case "del"
del
case else
closeconn
response.Redirect("error.asp?errormsg=错误的传递参数!请确定你有有效链接进入!")
end select
sub login
dim username,usertel
username=replace(trim(request("username")),"'","")
usertel=replace(trim(request("usertel")),"'","")
if not isnumeric(usertel) then
closeconn
response.Redirect("error.asp?errormsg=预订人电话错误!正确的电话应全部为数字!")
end if
set rs=conn.execute("select m_name,m_phone from giveme where m_name='"&username&"' and m_phone='"&usertel&"'")
if rs.eof and rs.bof then
closers(rs)
closeconn
response.Redirect("error.asp?errormsg=错误的预订人姓名、或电话号码!您可能没有预订过,或是您的预订资料已被删除!")
end if
session("user")=username
session("tel")=usertel
closers(rs)
closeconn
response.Redirect("?action=look&username="&angelic(username)&"")
end sub
sub userlook
if session("user")="" or session("tel")="" then
closeconn
response.Redirect("error.asp?errormsg=非法的身份登录或您的登录信息已超时!请从有效的链接进入!")
end if
%>
您好: 您在我社的预订记录已经在下面例出,你可以在我社未做处理前对它进行删除等操作:
安全退出
sql="select m_id,id,m_xianlu_name,m_daoyou,m_renshuo,m_pingchuan,m_yudingtime,m_laiyoutime,m_huanchengtime,m_show from giveme where m_name='"&session("user")&"' and m_phone='"&session("tel")&"' order by m_show desc"
set rs=conn.execute(sql)
%>
线路ID/名称
返程日期
预订时间
来游日期
人数
拼团
导游
状态
X
while not rs.eof
mm=trim(rs("m_xianlu_name"))
%>
if len(mm) response.write(mm)
else
response.write (left(mm,16))
response.write("..")
end if
%>
if rs("m_show") then response.write("已") else response.write("未") end if
%>
if rs("m_show") then
response.write("")
else
response.write("")
end if
%>
rs.movenext
wend
closers(rs)
%>
end sub
sub logout
session.Contents.remove "user"
session.Contents.remove "tel"
response.Redirect("ok.asp?msg=成功安全退出!感谢您对我社的支持!")
end sub
sub del
dim id
id=trim(request("id"))
if not isNumeric(id) then
closeconn
response.Redirect("error.asp?errormsg=传递参数错误!请确定你从有效链接进入!")
end if
conn.execute("delete from giveme where id="&id)
closeconn
response.Redirect("ok.asp?msg=成功删除您所选定的预订!如还需查看自己的预订,直接点击我的预订即可!")
end sub
pageend
%>