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

📄 jiaoliou.asp

📁 本系统适用于选择题(单选和多选)的练习和考试.主要有七大模块:学习信息、经验交流、学生练习、学生考试、试卷管理、题库操作、身份 资料、成绩查询、系统帮助。超级管理员还可进行系统设置
💻 ASP
字号:
<!--#include file="open.asp" -->
<!--#include file="inc/md5.inc" -->
<%self_name="jiaoliou.asp"%>
<%
  doing=request.querystring("doing")
  if doing="login" then  '用户登录
      user_id=trim(request.form("user_id"))
	  pass=trim(request.form("pass"))
	  if user_id<>"" and pass<>"" and instr(user_id,"'")=0 and instr(user_id,"&")=0 then
	      pass=ucase(md5(pass))
		  str="select * from user_teacher where teacher_user='"&user_id&"' and teacher_pass='"&pass&"'"
		  set rs=conn.execute(str)
		  if not rs.eof then
		      session("zzteacher")=true
			  session("name")=rs("teacher_name")
			  if rs("teacher_class")="超级管理员" then session("zzadmin")=true end if
		  else
		      str="select * from user_student where 学籍号='"&user_id&"' and 密码='"&pass&"'"
		      set rs=conn.execute(str)
			  if not rs.eof then
			     session("zzstudent")=true
				 session("student_id")=user_id
				 session("name")=rs("姓名")
				 session("student_bj")=rs("班级")
			  end if
		  end if
	  end if
  end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><!--#include file="inc/css.css" -->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>留溪在线考试(学习经验交流)</title>
</head>

<body topmargin="1">
<!--#include file="top.asp" -->
<!--#include file="menu.asp" -->
<table width="770" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#ff99cc" bgcolor="#edebdb">
<%if session("zzteacher")=true or session("zzstudent")=true then%>
  <tr> 
    <td height="20" class="unnamed12"><div align="center">用户已登录 用户类别:
	<%if session("zzstudent")=true then%>学生 学籍号:<%=session("student_id")%> 姓名:<%=session("name")%> 班级:<%=session("student_bj")%><%end if%>
	<%if session("zzteacher")=true then%>教师 姓名:<%=session("name")%><%end if%>
	 <%if session("zzadmin")=true then%><a href=system_setup.asp>系统设置</a><%end if%>
		 <a href="quit.asp?back=<%=self_name%>">退出</a></div></td>
  </tr>
<%else%>
  <tr> 
    <td height="20" class="unnamed12"> <form name="form1" method="post" action="<%=self_name%>?doing=login">
        <div align="center">用户登录 输入学籍号或用户名: 
          <input name="user_id" type="text" id="user_id" value=<%=id_disp%> size="20">
           密码: 
          <input name="pass" type="password" id="pass" size="16">
            
          <input type="submit" name="Submit" class="unnamed12" value="登录">
            
          <input type="reset" name="Submit2" class="unnamed12" value="重填">
            <a href="reg.asp?back=<%=self_name%>">注册</a> <a href="rereg.asp">忘记密码</a></div>
      </td></form>
  </tr>
<%end if%>
</table>
<table width="770" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="unnamed4"> </td>
  </tr>
</table>

<table width="770" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#ff99cc" bgcolor="#edebdb">
  <tr>
    <td valign="top">
<div align="center" class="unnamed14h20"> <span class="unnamed12H"><font color="#FF0000"><marquee direction="left" scrolldelay="200">
        <font color="#0000FF">此处为大家交流学习经验而设。如果发表与学习无关的话题,一经发现立即删除。</font>
        </marquee>
        </font></span> </div></td>
  </tr>
</table>

<table width="770" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td class="unnamed4"> </td>
  </tr>
</table>
<table width="770" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#ff99cc" bgcolor="#edebdb">
  <tr> 
    <td valign="top">
      <%if session("zzteacher")=true or session("zzstudent")=true then%>
      <span class="unnamed14">   <a href="jiaoliou_send.asp">发表文章</a> </span><br> 
      <%end if%>

      <table width="768" border="1" cellspacing="0" cellpadding="0">
        <tr class="unnamed14"> 
          <td width="30" height="20" valign="middle" background="images/jybg01.gif"> 
            <div align="center">状态</div></td>
          <td width="410" height="20" background="images/jybg01.gif"> <div align="center">主  题</div></td>
          <td width="65" height="20" background="images/jybg01.gif"> <div align="center">作者</div></td>
          <td width="35" height="20" background="images/jybg01.gif"> <div align="center">回复</div></td>
          <td width="35" height="20" background="images/jybg01.gif"> <div align="center">人气</div></td>
          <td height="20" colspan="2" background="images/jybg01.gif"> <div align="center">最 
              后 更 新</div></td>
        </tr>
        <% str="select id from jiaoliou"
   set rs=conn.execute(str)
   if rs.eof then%>
        
        <tr class="unnamed12"> 
          <td height="20" colspan="7"><div align="center" class="unnamed14"><font color="#FF0000">现 
              在 没 有 任 何 文 章</font></div></td>
        </tr>
        <%else%>
        <%conn.close%>
        <!--#include file="open.asp" -->
        <%
  str="select * from jiaoliou  where 是否主题=1 order by 置顶 desc,回应日期 desc,回应时间 desc"
  rs.open str,conn,3,2
   rs.pagesize=25
   pageno=1
   doing=request.querystring("doing")
   if doing="quer" then
       pageno=cint(request.querystring("pageno"))
       if pageno="" or pageno=0 then
          pageno=1
       end if
   end if
   if doing="former" then
       pageno=int(trim(request.form("pageno")))
	   if isnumeric(pageno)=false or pageno<1 or pageno>rs.pagecount then
	       pageno=1
	   end if
   end if
  %>
        <%m=0
   rs.absolutepage=pageno
   for n=1 to rs.pagesize%><%m=m+1%>
        <tr class="unnamed12"> 
          <td width="30" height="20"> <div align="center"> 
              <%if rs("置顶")=1 then%>
              <img src="images/top.gif" alt="该留言置顶" width="12" height="16"> 
              <%else%>
               <%response.write m%>
              <%end if%>
            </div></td>
          <td width="410" height="20"> <a href=jiaoliou_disp.asp?disp_id=<%=rs("id")%>  class=unnamed12wu><font color=<%if rs("回应日期")=date then%>#FF0000<%end if%><%if rs("回应日期")=date-1 then%>#0000ff<%end if%><%if rs("回应日期")=date-2 then%>#660033<%end if%>><%=left(rs("标题"),30)%> 
            <%if len(rs("标题"))>30 then%>
            …… 
            <%end if%>
            </font></a></td>
          <td width="65" height="20"> <div align="center"><%=rs("发表人")%></div></td>
          <td width="35" height="20"> <div align="center"><%=rs("回应数")%></div></td>
          <td width="35" height="20"> <div align="center"><%=rs("浏览数")%></div></td>
          <td width="120" height="20"> <div align="center"><%=rs("回应日期")&" "&rs("回应时间")%></div></td>
          <td width="65" height="20"> <div align="center"><%=rs("回应人")%></div></td>
        </tr>
        <%  rs.movenext
    if rs.eof then exit for
    next%>
        <%end if%>
        
      </table>
      <table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td>  
            <%if pageno>1 then%> <a href=jiaoliou.asp?doing=quer&pageno=<%=pageno-1%> class="unnamed12">上一页</a> 
            <%end if%> <%if pageno=1 then%> <a href=jiaoliou.asp?doing=quer&pageno=<%=rs.pagecount%> class="unnamed12">上一页</a> 
            <%end if%> <% if rs.pagecount<=9 then
			        for p=1 to rs.pagecount
                      response.write "<a href=jiaoliou.asp?doing=quer&pageno="&p&" class=unnamed12>["&p&"]</a> "
                    next
				 else
			        for p=1 to 9
                      response.write "<a href=jiaoliou.asp?doing=quer&pageno="&p&" class=unnamed12>["&p&"]</a> "
                    next
                      response.write "…… <a href=jiaoliou.asp?doing=quer&pageno="&rs.pagecount&" class=unnamed12>["&rs.pagecount&"]</a> "
				 end if%> <%if pageno<rs.pagecount then%> <a href=jiaoliou.asp?doing=quer&pageno=<%=pageno+1%> class="unnamed12">下一页</a> 
            <%end if%> <%if pageno>=rs.pagecount then%> <a href=jiaoliou.asp?doing=quer&pageno=1 class="unnamed12">下一页</a> 
            <%end if%>
          </td>
          <td width="130" class="unnamed12"> <form name="form1" method="post" action="jiaoliou.asp?doing=former">
              转到第 
              <input name="pageno" type="text" id="pageno" size="3">
              <input type="submit" name="Submit3" value="GO">
            </td></form>
        </tr>
      </table></td>
  </tr>
</table>
<!--#include file="inc/bottom.asp" -->
<%conn.close%>
</body>
</html>

⌨️ 快捷键说明

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