⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chkcancel.asp

📁 学生可根据自己喜欢的课程进行选课
💻 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>&nbsp;</td>
            </tr>
            <tr>
              <td class="text_title"><div align="left">取消成功!</div></td>
            </tr>
            <tr>
              <td class="table_title">&nbsp;</td>
            </tr>
            <tr>
              <td class="text"><div align="left">您已经成功取消</div></td>
            </tr>
            <tr>
              <td class="text">&nbsp;</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 + -