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

📄 coursemanage.asp

📁 一个基于ASP和SQL数据库的学生信息管理系统,可以方便的实现学生信息的添加修改和删除,成绩信息的管理和学生的在线选课.
💻 ASP
字号:
<!--#include file="..\inc\conn.asp"-->
<!--#include file="..\inc\SessionCheck.asp"-->
<%
Call DBConnBegin()
%>

<html><head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>学生信息管理网站</title>
<link rel="stylesheet" href="..\inc\style.css" type="text/css">
</head>

<body topmargin="0" leftmargin="0">
<!--#include file="..\CommonFile\pagehead.asp"-->
<table width="738" border="0"><tr><td align=left>
<table width="736" height="35" cellspacing="0" cellpadding="0">
  <td background="../images/top_1.jpg">&nbsp; <a href="doSelect.asp" class="link">选、退课处理</a>   
    | <a href="coursemanage.asp" class="link">课程信息处理</a>   
    | <a href="coursesearch.asp" class="link">选课信息查询</a></table>
<div align="center">
  <center><form  method="POST" action="addcourse.asp">
  <table border="0" width="700" cellspacing="0" cellpadding="0">
  <tr><td align="center"><font color="red">添加课程:</font>输入课程号<input type="text" name="cid" size="10" value="">&nbsp;课程名称<input type="text" name="cname" size="20" value="">&nbsp;<input type="submit" value="确认" name="B1"></td></tr></table></form>
  <table border="0" width="700" cellspacing="0" cellpadding="0">
<%
    sSql="select * from CourseInfo" 
    oRs.open sSql,oConn,3,2     
	if Not(oRs.bof and oRs.eof) then'判别数据表中是否为空记录
	     dim NumRecord,NumPage,NoncePage,i
			NumRecord=oRs.recordcount
			oRs.pagesize=10
			NumPage=oRs.Pagecount
			if request("page")=empty then 
			NoncePage=1
		else
		if Cint(request("page"))<1 then
			NoncePage=1
		else
			NoncePage=request("page")
		end if
		if Cint(Trim(request("page")))>Cint(NumPage) then NoncePage=NumPage
	end if
else
	NumRecord=0
	NumPage=0
	NoncePage=0
	end if
%>
        <table border="1" width="600" bordercolorlight="#000000" cellspacing="0" cellpadding="5" bordercolordark="#FFFFFF">
          <tr>
            <td width="100" bgcolor="#EBE9FE" align="center">课程号</td>
            <td width="460" bgcolor="#EBE9FE" align="center">课程名称</td>
            <td width="40" bgcolor="#EBE9FE" align="center">删除</td>             
          </tr>
            <%if Not(oRs.bof and oRs.eof) then
	oRs.move (Cint(NoncePage)-1)*10,1
	for i=1 to oRs.pagesize
%>

          <tr>
            <td width="100" align="center"><%=oRs("CID")%></td>
            <td width="460" align="left"><%=oRs("CName")%></td>
            <td width="40" align="center"><a href="delcourse.asp?cid=<%=oRs("CID")%>" class="link">删除</a></td>
          </tr>
           <%		 oRs.movenext
			   		if oRs.eof then exit for
					next
else
	response.write "<tr><td  colspan=3><marquee scrolldelay=120 behavior=alternate>没有找到任何记录!!!</marquee></td></tr>"
end if	

oRs.close
%>
        </table>
  </table><div align="center"> 
<table width="600" border="0">
  <tr><td height="17">
        <input type="hidden" name="page" value="<%=NoncePage%>">
              <%
if NoncePage>1 then
	response.write "|<a href=list.asp?page=1>首 页</a>| |<a href=list.asp?page="&NoncePage-1&">上一页</a>|&nbsp"
else
	response.write "|首 页| |上一页|&nbsp"
end if
if Cint(Trim(NoncePage))<Cint(Trim(NumPage)) then
	response.write "|<a href=list.asp?page="&NoncePage+1&">下一页</a>| |<a href=list.asp?page="&NumPage&">尾 页</a>|"
else
	response.write "|下一页| |尾 页|"
end if
%>
              &nbsp;页次:<font color="#0033CC"><%=NoncePage%></font>/<font color="#0033CC"><%=NumPage%></font> 
              共<font color="#0033CC"><%=NumRecord%></font>条记录&nbsp;                         
          </td></tr>
  </table></div>
  </center></div>
  </td></tr></table>
<%Call DBConnEnd()%>
<!--#include file="..\CommonFile\pagefoot.asp"-->
</body>
</html>

⌨️ 快捷键说明

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