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

📄 course.asp

📁 本系统分两个子功能: 一:学生事务 统计学生的入学
💻 ASP
字号:
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>课程管理</title>
</head>

<body>
<%
 dim conn,connstr
     connstr="Driver={sql server};UID=sa;PWD=sa;database=zikao;server=BILLGATES"
     set conn=server.createobject("ADODB.CONNECTION")
     conn.open connstr
     set rs=Server.CreateObject("ADODB.Recordset")
     
   
%>
<table border="1" width="694" height="402">
	<tr>
		<td height="72" width="684" colspan="8">
		<p align="center"><b><font size="6">课程管理</font></b></td>
	</tr>
	<form action="course.asp" method="post">
	<tr>
		<td height="49" width="83">
		
		<p><select size="1" name="D1">
		<option value="教师编号">教师编号</option>
		<option value="课程编号">课程编号</option>
		</select></td>
		<td height="49" width="595" colspan="7">
		<p align="center">查询值:<input type="text" name="T1" size="20">
					<input type="submit" value="提交" name="B1"><input type="reset" value="重置" name="B2"></td>
	</tr>
	</form>
	<tr>
		<td height="35" width="684" colspan="8">
		<p align="center"><b>查询结果</b></td>

	</tr>
	
	<tr>
		<%
	 if request.form("B1")="提交" then
	  strid=request.form("T1")
	 if request.form("D1")="教师编号" then
	  sql="select * from course where coursetecid='"&strid&"'"
	 else
	  sql="select * from course where courseno= '"&strid&"'"
	 end if
	 if strid="" then
	 response.write "<td height='35' width='684' colspan='8'><p align='center'><b>请输入查询值</b></td>"
	 else
	 rs.open sql,conn
	 if rs.eof then
      response.write "<td height='35' width='684' colspan='8'><p align='center'><b>查询值不存在</b></td>"
     
     else
     
     while not rs.eof 
	%>
		<td height="34" width="83">课程编号</td>
		<td height="34" width="141">课程名称</td>
		<td height="34" width="96">上课地点</td>
		<td height="34" width="96">上课时间</td>
		<td height="34" width="74">教师编号</td>
		<td height="34" width="68">课程学时</td>
		<td height="34" width="90" colspan="2">
		<p align="center">操作</td>
	</tr>
	<tr>
		<td height="23" width="83"><%=rs(0)%> </td>
		<td height="23" width="141"><%=rs(1)%>  </td>
		<td height="23" width="96"> <%=rs(2)%> </td>
		<td height="23" width="96"> <%=rs(3)%> </td>
		<td height="23" width="74"><%=rs(5)%>  </td>
		<td height="23" width="68"><%=rs(6)%>  </td>
		<td height="23" width="46"><a href="coursechangp.asp?tno=<%=rs(5)%>&cno=<%=rs(0)%>">修改</a></td>
		<td height="23" width="38"><a href="coursechangd.asp?tno=<%=rs(5)%>&cno=<%=rs(0)%>">删除</a></td>
	</tr>
    <%
    rs.movenext()
    wend
	  end if
	  rs.close
	 set rs=nothing
	  conn.close
	  set conn=nothing
	 end if
	end if 
	%>
</table>

</body>

</html>

⌨️ 快捷键说明

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