courseware.asp

来自「数值计算方法网络课件系统是浙江大学过程装备与控制工程专业2001级本科生毕业设计」· ASP 代码 · 共 103 行

ASP
103
字号
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/func.asp"-->
<!--#include file="inc/md5.asp"-->
<!--#include file="inc/sqlin.asp"-->

<%
'**************** 用户注册页面 *************
'* File: register.asp V1.0 2005.05.07
'* Author: wwxbei
'*******************************************

dim examTxt
	examTxt = FSOFileRead("html/courseware.txt")
	examTxt = replace(examTxt, "{ChapterNum}", Trim(Request.QueryString("chapter")))

if Trim(Request.QueryString("chapter"))="" then
	GoError "错误的参数!请点击相应链接进入本页面。"	
	response.End
end if

dim temp,temp2,tempStr

Call DBConnBegin()
sql="select * from courseware where filetype <> 'CCODE' and chapter="&Cint(Trim(Request.QueryString("chapter")))
rs.open sql,conn,1,1
if Rs.BOF and RS.EOF then
	examTxt=replace(examTxt, "{theCourseWare}", "没有本章课件!")
else
	temp=""
	do while not rs.EOF
		tempStr = "<li><a href='courseview.asp?id={theID}'>{theTitle}</a></li>"
		tempStr = replace(tempStr, "{theID}", rs("id"))
		tempStr = replace(tempStr, "{theTitle}", rs("title"))
		temp = temp & tempStr
		rs.movenext
	loop
	temp= "<ul>"& temp &"</ul>"
	examTxt=replace(examTxt, "{theCourseWare}", temp)
end if
Call DBConnEnd()

DBConnBegin()
sql="select * from courseware where filetype = 'CCODE' and chapter="&Cint(Trim(Request.QueryString("chapter")))
rs.open sql,conn,1,1
if Rs.BOF and RS.EOF then
	examTxt=replace(examTxt, "{theCcode}", "没有本章程序!")
else
	temp=""
	do while not rs.EOF
		tempStr = "<li><a href='courseview.asp?id={theID}'>{theTitle}</a></li>"
		tempStr = replace(tempStr, "{theID}", rs("id"))
		tempStr = replace(tempStr, "{theTitle}", rs("title"))
		temp = temp & tempStr
		rs.movenext
	loop
	temp= "<ul>"& temp &"</ul>"
	examTxt=replace(examTxt, "{theCcode}", temp)
end if
Call DBConnEnd()

Call DBConnBegin()
sql="select * from notice where cupid = 1 and chapter="&Cint(Trim(Request.QueryString("chapter")))
rs.open sql,conn,1,1
if Rs.BOF and RS.EOF then
	examTxt=replace(examTxt, "{theHomeWork}", "尚未布置作业!")
else
	temp=""
	do while not rs.EOF
		tempStr = "<li><a href='notice.asp?id={theID}'>{theTitle}</a></li>"
		tempStr = replace(tempStr, "{theID}", rs("id"))
		tempStr = replace(tempStr, "{theTitle}", rs("title"))
		temp = temp & tempStr
		rs.movenext
	loop
	temp= "<ul>"& temp &"</ul>"
	examTxt=replace(examTxt, "{theHomeWork}", temp)
end if
Call DBConnEnd()

Call DBConnBegin()
sql="select * from notice where cupid = 2 and chapter="&Cint(Trim(Request.QueryString("chapter")))
rs.open sql,conn,1,1
if Rs.BOF and RS.EOF then
	examTxt=replace(examTxt, "{theExample}", "尚未添加实例分析!")
else
	temp=""
	do while not rs.EOF
		tempStr = "<li><a href='notice.asp?id={theID}'>{theTitle}</a></li>"
		tempStr = replace(tempStr, "{theID}", rs("id"))
		tempStr = replace(tempStr, "{theTitle}", rs("title"))
		temp = temp & tempStr
		rs.movenext
	loop
	temp= "<ul>"& temp &"</ul>"
	examTxt=replace(examTxt, "{theExample}", temp)
end if
Call DBConnEnd()


Response.write examTxt


%>

⌨️ 快捷键说明

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