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

📄 list33.asp

📁 学生评教系统,可以实现学生评教,教师查分功能.
💻 ASP
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!-- #include file="inc/char.asp" -->
<html>
<head>
<title>教务评教系统论坛</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<link rel="stylesheet" type="text/css" href="forum.css">
<script language="javascript">
     function viewPage2(ipage){
        document.frmList2.Page.value=ipage
        document.frmList2.submit()        
     }
</script>
<script language="javascript">
     function viewPage1(ipage){
        document.frmList2.Page.value=ipage
        document.frmList2.submit()        
     }
</script>
</head>
<script language="JavaScript">
function shutwin()
{window.close();
return;
}
</script>
<body bgcolor="#006699">
<div align="center">
<center>
<table border="0" bgcolor="#FFFFFF" cellspacing="0" width="100%" cellpadding="0" height="110">
<tr>
<td width="100%" colspan="3" height="34">
<p align="center"><img border="0" src="IMAGES/ani1.gif">
</td>
</tr>
</center>
<tr align="center">
<td width="100%" colspan="3" height="14">
</td>
</tr>
<center>
<tr>
<td width="3%" height="36">
 
</td>
<td width="94%" height="36">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr>
    <td width="100%">
      <p align="center"><br>

<%
    	Rem ----------------------
    	Rem ------主程序开始------
    	Rem ----------------------
   	dim sql,rs
	dim Ers,Esql
   	dim boardtype
   	dim boardmaster,boardmaster1,boardmaster2
   	dim username,cname
    	dim foundErr 
    	dim ErrMsg
    	dim bBoardEmpty
	dim boardid
	dim timeLimited,limitime,tl
	dim totalrec
	dim n,i,RowCount
	dim p
	dim currentpage
    	dim announceIDRange1
    	dim announceIDRange2
	dim skin
	dim tableback
	dim tabletitle
	dim tablebody
	dim atablebody
	dim tablefont
	dim tablecontent
	dim alertfont
    	foundErr = false
    	ErrMsg = ""
    	selStr = "()"

    	Rem ------获取参数(get or post的)------
    	Rem ------包括版面的ID和页次------
	set rs=server.createobject("adodb.recordset")
	set iprs=server.createobject("adodb.recordset")
    	Call getInput()
    	call chkInput()
	'显示版头
	call activeuser()
	call boardinfo()
    	if foundErr then
		call error()
	else
		if skin=0 then
%>
<!--#include file="inc/boardskin0.asp"-->   
<%    
			call AnnounceList0()
			if bBoardEmpty <> true then
				if foundErr = true then
					call error()
				else
					call showPageList0()
					if founderr=true then call error()
				end if
			end if
			call boardlist()
		elseif skin=1 then
%>
<!--#include file="inc/boardskin1.asp"-->   
<%    
			call AnnounceList1()
			call listPages3()
			call boardlist()
			if founderr=true then call error()
		end if
	if err.number<>0 then err.clear
	end if

	REM 显示版面信息---Headinfo
	sub boardinfo()
  	sql="select boardtype,lockboard,boardmaster,boardmaster1,boardmaster2,boardskin,Tableback,Tabletitle,Tablebody,aTablebody,TableFont,TableContent,AlertFont from board where boardID="&cstr(boardid)
 	rs.open sql,conn,1,1
 	if not(rs.bof and rs.eof) then
    		boardtype=rs("boardtype")
		if request("skin")="" then
			skin=rs("boardskin")
		elseif not isInteger(request("skin")) then
			skin=0
		elseif request("skin")=0 then
			skin=0
		elseif request("skin")=1 then
			skin=1
		else
			skin=0
		end if
		lockboard=rs("lockboard")
		Tableback=trim(rs("Tableback"))
		Tabletitle=trim(rs("Tabletitle"))
		Tablebody=trim(rs("Tablebody"))
		aTablebody=trim(rs("aTablebody"))
		TableFont=trim(rs("TableFont"))
		TableContent=trim(rs("TableContent"))
		AlertFont=trim(rs("AlertFont"))
		if trim(rs("boardmaster"))<>"" then
		boardmaster="<a href=javascript:openScript('dispuser.asp?name="&htmlencode(rs("boardmaster"))&"',350,300)>"&rs("boardmaster")&"</a>&nbsp;"
		else
		response.write "无版主"
		end if
		if trim(rs("boardmaster1"))<>"" then
    		boardmaster=boardmaster&"<a href=javascript:openScript('dispuser.asp?name="&htmlencode(rs("boardmaster1"))&"',350,300)>"&rs("boardmaster1")&"</a>&nbsp;"
		end if
		if trim(rs("boardmaster2"))<>"" then
    		boardmaster=boardmaster&"<a href=javascript:openScript('dispuser.asp?name="&htmlencode(rs("boardmaster2"))&"',350,300)>"&rs("boardmaster2")&"</a>"
		end if
	else
		founderr=true
		Errmsg=Errmsg+"<br>"+"<li>您选择的版面不存在。"
		exit sub
	end if
	rs.close
%>

<% 
	end sub

	sub boardlist()
%>

<% 
	end sub

	sub onlineuser()
	guests="客人"
	url=Request.ServerVariables("SCRIPT_NAME")&"?boardid="&boardid
	sql="select username,startime,lastimebk,ip,stats,userclass,browser from online where stats='"&url&"' and username<>'"&guests&"'"
	rs.open sql,conn,1,1
	do while not rs.eof
	sip=rs("ip")
	str1=left(sip,instr(sip,".")-1)
	sip=mid(sip,instr(sip,".")+1)
	str2=left(sip,instr(sip,".")-1)
	sip=mid(sip,instr(sip,".")+1)
	str3=left(sip,instr(sip,".")-1)
	str4=mid(sip,instr(sip,".")+1)
if isNumeric(str1)=0 or isNumeric(str2)=0 or isNumeric(str3)=0 or isNumeric(str4)=0 then

else
	num=cint(str1)*256*256*256+cint(str2)*256*256+cint(str3)*256+cint(str4)-1
	ipsql="select Top 1 country,city from address where ip1 <="&num&" and ip2 >="&num&""
	iprs.open ipsql,conn,1,1
	if not iprs.eof then 
		country=iprs("country")
		city=iprs("city")
	else
		country="亚洲"
		city=""
	end if
	iprs.close
end if
	if rs("userclass")="版主" or rs("userclass")="管理员" then
%>
<img src=<%=picurl%>ao.gif alt="特殊人物"><a href="javascript:openScript('dispuser.asp?name=<%=htmlencode(rs("username"))%>',350,300)"> 
<ACRONYM TITLE="目前位置:<%=iwhere(rs("stats"))%>&#13;&#10;来访时间:<%=rs("startime")%>&#13;&#10;活动时间:<%=rs("lastimebk")%>&#13;&#10;<%=system(rs("browser"))%>&#13;&#10;<%=browser(rs("browser"))%>&#13;&#10;IP地址:<%if IpFlag=0 then%>已设置保密<%else%><%=rs("ip")%><%end if%>&#13;&#10;来源鉴定:<%if FromFlag=0 then%>已设置保密<%else%><%=country%><%=city%><%end if%>"><%=rs("username")%></ACRONYM></a> 
<%   
	elseif rs("userclass")="贵宾" then
%>
<img src=<%=picurl%>gb(1).gif alt="贵宾"><a href="javascript:openScript('dispuser.asp?name=<%=htmlencode(rs("username"))%>',350,300)">   
<ACRONYM TITLE="目前位置:<%=iwhere(rs("stats"))%>&#13;&#10;来访时间:<%=rs("startime")%>&#13;&#10;活动时间:<%=rs("lastimebk")%>&#13;&#10;<%=system(rs("browser"))%>&#13;&#10;<%=browser(rs("browser"))%>&#13;&#10;IP地址:<%if IpFlag=0 then%>已设置保密<%else%><%=rs("ip")%><%end if%>&#13;&#10;来源鉴定:<%if FromFlag=0 then%>已设置保密<%else%><%=country%><%=city%><%end if%>"><%=rs("username")%></ACRONYM></a> 
<%   
	else
%>
<img src=<%=picurl%>messages1.gif><a href="javascript:openScript('dispuser.asp?name=<%=htmlencode(rs("username"))%>',350,300)">   
<ACRONYM TITLE="目前位置:<%=iwhere(rs("stats"))%>&#13;&#10;来访时间:<%=rs("startime")%>&#13;&#10;活动时间:<%=rs("lastimebk")%>&#13;&#10;<%=system(rs("browser"))%>&#13;&#10;<%=browser(rs("browser"))%>&#13;&#10;IP地址:<%if IpFlag=0 then%>已设置保密<%else%><%=rs("ip")%><%end if%>&#13;&#10;来源鉴定:<%if FromFlag=0 then%>已设置保密<%else%><%=country%><%=city%><%end if%>"><%=rs("username")%></ACRONYM></a> 
<%   
	end if
          rs.movenext
        loop
	rs.close
	if guestuser=1 then
	sql="select username,startime,lastimebk,ip,stats,userclass,browser from online where stats='"&url&"' and username='"&guests&"'"
	rs.open sql,conn,1,1
	do while not rs.eof
%>
<img src=<%=picurl%>messages2.gif><a href="">   
<ACRONYM TITLE="目前位置:<%=iwhere(rs("stats"))%>&#13;&#10;来访时间:<%=rs("startime")%>&#13;&#10;活动时间:<%=rs("lastimebk")%>&#13;&#10;<%=system(rs("browser"))%>&#13;&#10;<%=browser(rs("browser"))%>&#13;&#10;IP地址:<%if IpFlag=0 then%>已设置保密<%else%><%=rs("ip")%><%end if%>"><%=rs("username")%></ACRONYM></a> 
 <%  
	  rs.movenext
	loop
	rs.close
	end if
	end sub

	REM 统计贴子总数量
	function allarticle()
    	tmprs=conn.execute("Select count(announceid) from bbs1 where boardid="&boardid&" "&tl&" ")
    		allarticle=tmprs(0)
		set tmprs=nothing
		if isnull(allarticle) then allarticle=0
	end function

	function online()
	guests="客人"
    	tmprs=conn.execute("Select count(id) from online where username<>'"&guests&"'") 
    	online=tmprs(0) 
	set tmprs=nothing 
	if isnull(online) then online=0
	end function 

	function guest()
	guests="客人"
    	tmprs=conn.execute("Select count(id) from online where username='"&guests&"'") 
    	guest=tmprs(0) 
	set tmprs=nothing 
	if isnull(guest) then guest=0
	end function 

	Sub getInput()
        	'On Error Resume Next
        	Rem ------获取版面ID------
        	BoardID = Request("BoardID")
        	Rem ------获取页次------
        	currentPage=request("page")
    	End Sub
    
    	sub chkInput
		'on error resume next
		if BoardID="" then
			BoardID=1
		elseif not isInteger(BoardID) then
			BoardID=1
		else
			BoardID=clng(BoardID)
			if err then
				BoardID=1
				err.clear
			end if
		end if
		if currentpage="" then
			currentpage=1
		elseif not isInteger(currentpage) then
			currentpage=1
		else
			currentpage=clng(currentpage)
			if err then
				currentpage=1
				err.clear
			end if
		end if
		if request("selTimeLimit")="all" then
			tl=""
		elseif request("selTimeLimit")="" then
			tl=""
		else
			limitime=request("selTimeLimit")
			tl=" and dateandtime>=#"&cstr(cdate(now()-limitime))&"# "
		end if
    	end sub

	sub activeuser()
	dim rsactiveusers,activeuser,url
	url=Request.ServerVariables("SCRIPT_NAME")&"?boardid="&boardid
	set rsactiveusers=server.createobject("adodb.recordset")
	if session.contents("username")="" then
		if session("userid")="" then
		activeuser="select * from online"
		else
		activeuser="select * from online where id="&cstr(session("userid"))
		end if
		rsactiveusers.open activeuser,conn,1,3
		if rsactiveusers.eof and rsactiveusers.bof then
			rsactiveusers.addnew
			rsactiveusers("id")=Session.SessionID
			rsactiveusers("username")="客人"
			rsactiveusers("userclass")="客人"
			rsactiveusers("ip")=Request.ServerVariables("REMOTE_HOST")
			rsactiveusers("startime")=Now()
			rsactiveusers("lastimebk")=Now()
			rsactiveusers("lastime")=DateToStr(Now())
			rsactiveusers("browser")=Request.ServerVariables("HTTP_USER_AGENT")
			rsactiveusers("stats")=url
			rsactiveusers.update
			session("userid")=Session.SessionID
		else
			rsactiveusers("lastimebk")=Now()
			rsactiveusers("lastime")=DateToStr(Now())
			rsactiveusers("stats")=url
			rsactiveusers.update
			session("userid")=Session.SessionID
		end if
	else
		activeuser="select * from online where username='"&session.contents("username")&"'"
		rsactiveusers.open activeuser,conn,1,3
		if rsactiveusers.eof and rsactiveusers.bof then
			rsactiveusers.addnew
			rsactiveusers("id")=Session.SessionID
			rsactiveusers("username")=session.contents("username")
			rsactiveusers("userclass")=session("userclass")
			rsactiveusers("ip")=Request.ServerVariables("REMOTE_HOST")
			rsactiveusers("startime")=Now()
			rsactiveusers("lastimebk")=Now()
			rsactiveusers("lastime")=DateToStr(Now())
			rsactiveusers("browser")=Request.ServerVariables("HTTP_USER_AGENT")
			rsactiveusers("stats")=url
			rsactiveusers.update
		else
			rsactiveusers("lastimebk")=Now()
			rsactiveusers("lastime")=DateToStr(Now())
			rsactiveusers("stats")=url
			rsactiveusers.update
		end if
		session("userid")=""
	end if
	'设置用户不活动超时时间--660秒
	dim strOnlineTimedOut,strOnlineCheckInTime
	strOnlineCheckInTime = DateToStr(Now())
	strOnlineTimedOut = strOnlineCheckInTime - 1200
	activeuser="delete from online where lastime<'" & strOnlineTimedOut & "'"
	Conn.Execute activeuser
	rsactiveusers.close
	set rsactiveusers=nothing
	end sub
	set rs=nothing
	Call endConnection
%>
</td>
  </tr>
</table>
</td>
<td width="3%" height="36">
 
</td>
</tr>
<tr>
<td width="100%" colspan="3" height="26">
<div align="center">

<br>
|<a href="javascript:shutwin();"
class="p9">关闭窗口</a>| </div>
</td>
</tr>
</table>
<p>&nbsp; </p>
</center>
</div>
</body>
</html>

⌨️ 快捷键说明

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