?? chkcancel.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="xuanke.asp" -->
<!--#include file="include/exit.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>取消預約</title>
<style type="text/css">
<!--
@import url("style.css");
body {
background-image: url(image/back.jpg);
}
-->
</style>
</head>
<%
dim preengage_id,rs_cancel,rs_del
'接收表單數據------------------
preengage_id=request("preengage_id")
'未提交表單數據提示錯誤------------------
if preengage_id="" then
response.Redirect("error.asp")
response.End()
end if
'沒有用戶或管理員登陸提示錯誤------------------
if session("id_no")="" then
response.Redirect("error.asp")
response.End()
end if
'檢查預約是否存在------------------
set rs_cancel=server.CreateObject("adodb.recordset")
sql = "select * from preengage where preengage_id=" & preengage_id
'如果是用戶操作怎檢查預約ID與用戶的對應關系------------------
if session("id_no") <> "" then
sql = sql & "and p_id_no = '" & session("id_no") &"'"
end if
rs_cancel.open sql,xuanke_conn,3,2
'如果預約不存在則提示錯誤信息------------------
if rs_cancel.eof or rs_cancel.bof then
response.Redirect("error.asp")
response.End()
end if
rs_cancel.close
'開始刪除----------------------
set rs_del=server.CreateObject("adodb.recordset")
sql = "delete from preengage where preengage_id=" & preengage_id
rs_del.open sql,xuanke_conn,3,2
%>
<body>
<div align="center">
<table width="706" height="281" border="0" class="table_big">
<tr>
<td valign="top"><div align="center">
<!--#include file="include/head.asp" -->
<br>
<table width="401" border="0" class="table_small">
<tr>
<td> </td>
</tr>
<tr>
<td class="text_title"><div align="left">取消成功!</div></td>
</tr>
<tr>
<td class="table_title"> </td>
</tr>
<tr>
<td class="text"><div align="left">您已經成功取消</div></td>
</tr>
<tr>
<td class="text"> </td>
</tr>
</table>
</br>
<!--#include file="include/foot.asp" -->
<br>
</div></td>
</tr>
</table>
</div>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -