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

📄 choice.asp

📁 本系统基于WEB
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>选报题目结果|毕业设计选题系统</title>
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
</head>

<BODY leftMargin=0 topMargin=0 marginwidth="0">
  <!--#include file=../top.asp-->
  <!--#include file=top.asp-->
<div align="center"><td><table width="768" border="0" bgcolor="#FFFFFF"><tr><td><div align="left">
<%
Dim PWD
Dim ID
PWD = Request.Form("textfield1")
ID = Request.Form("hiddenField1")
Dim conn
Set conn=Server.CreateObject("ADODB.RecordSet")
conn.ActiveConnection = "DSN=hw;User ID=sa"
conn.Source = "select * from dbo.student where stu_id='"&session("student")&"'"
conn.CursorType = 0
conn.LockType = 1
conn.Open()
  if conn("stu_pass")=PWD then
    if conn("stu_works")="0" then
      Dim conn2
      Set conn2=Server.CreateObject("ADODB.RecordSet")
      conn2.ActiveConnection = "DSN=hw;User ID=sa"
      conn2.Source = "select * from dbo.works where works_id='"&ID&"'"
      conn2.CursorType = 0
      conn2.LockType = 1
      conn2.Open()
	    if conn2("works_state") = 2 then
        conn2.close()
		conn2.Source = "update dbo.works set works_state= 3 where works_id='"&ID&"'"
        conn2.CursorType = 1
        conn2.LockType = 3
        conn2.Open()
		conn.close()
		conn.Source = "update dbo.student set stu_works='"&ID&"' where stu_id='"&session("student")&"'"
        conn.CursorType = 1
        conn.LockType = 3
		conn.Open()
        Response.Write("选题成功,<a href='main.asp'>点击这里刷新您的信息</a>")

	    else
	    Response.Write("此课题已经被选报,您无法选报这个题目,<a href='list.asp'>点击此处浏览所有可选课题</a>")
	    end if
		Set conn2 = Nothing
	  else
	  Response.Write("您已经选报过题目,若要重新选题,请先放弃您原来选报的题目<br><a href='main.asp'>点击这里刷新您的信息</a>")
	  end if
  else
    Response.Write("密码输入错误,<a href='javascript:history.back()'>请返回重新输入</a><br>如果当前用户不是您,请勿为别人选题,请关闭浏览器重新登录")
  end if
Set conn = Nothing
%>
</div></td></tr></table></td></div>
  <!--#include file=botton.asp-->
  <!--#include file=../botton.asp-->
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -