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

📄 find.asp

📁 在线教育
💻 ASP
字号:
<!--#include file="dataconn.asp"-->

<!--#include file="ADOVBS.INC"-->
<%
sql="select * from question where q_content like '%"&request("q_content")&"%'"
Set rscat=Server.CreateObject("ADODB.RecordSet") 
rscat.CursorLocation=adUseClient  
rscat.Open sql,conn,3,2 
           if request("pn")<>"" then
                intpagenum=cint(request("pn"))
              else 
                intpagenum=1
           end if
           rscat.pagesize=recordsperpage 
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>自动答疑</title>
<style type="text/css">
<!--
body {
	
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.text {  font-size: 12px; color: #000000}
.t3 {
	color: #000000;
	background-color: #eaf1fb;
	border: 1px solid #3d5a83;
	font-size: 12px;
}
.t4 {  font-size: 12px; color: #FF0000}
.t5 {
	color: #000000;
	background-color: #eaf1fb;
	border: 1px solid #3d5a83;
	font-size: 16px;
}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
.eee {
	background-color: #DDE4E8;
}
-->
</style>
<script language="javascript">
<!--  
function popwin(url,id,width,height,resizable)
{		window.open(url+"?id="+id,"","height="+height+",width="+width+",resizable="+resizable+",scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}
//-->
</script>
<script language="jscript">
<!--
	function Check(maxpage)
	{ 
		var NotNull
		NotNull=true
                    	if (document.form.pn.value>maxpage)
			{
						window.alert("不能输入超过最大页的数!")
				         NotNull=false
                           return NotNull
			}
			{ 
		var NotNull
		NotNull=true
                    	if (document.form.pn.value<=0)
			{
						window.alert("不能输入0或者负数或者空值!")
				         NotNull=false
                           return NotNull
			}
			}
			return NotNull		
	}
	
//-->
</script>
<title>在线答疑</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>

<body background="../images/untitled/bg.gif">
<table width="760" cellpadding="0" cellspacing="0" border="0" align="center">
  <tr> 
      <td background="../images/untitled/top.gif" height="15">
      <div align="right"></div>
    </td>
  </tr>
</table>
  
<table width="760" border="0" cellpadding="0" cellspacing="0" align="center">
  <tr> 
      <td><img src="../images/untitled/dayi.gif" width="760" height="78"></td>
  </tr>
</table>
  
<table width="760" border="0" cellpadding="0" cellspacing="0" bordercolor="003366" align="center">
  <tr> 
      <td background="../images/untitled/top2.gif" height="32"> 
        <div align="right">
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr> 
            <td>
              <div align="center"><img src="../images/untitled/top3.gif" width="197" height="32"></div>
              <div align="right"></div></td>
          </tr>
        </table>
        
      </div>
      </td>
  </tr>
</table>
  
<table width="760" border="0" cellpadding="0" cellspacing="0" bordercolor="003366" align="center">
  <tr> 
      <td valign="top">
        <table width="100%" height="438" border="0" cellpadding="0" cellspacing="0">
          <tr> 
            <td height="438" align="center" valign="top" background="../images/untitled/b1.gif"><div align="center"></div>               
              
              <div align="left" class="bg">
                <div align="center"></div>
                <table width="100%" height="417"  border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td align="center" valign="top"><% if rscat.eof then 
		       sql2="select * from question"
			   set rs=server.createobject("adodb.recordset")
			   rs.open sql2,conn,2,3
			   rs.addnew
			   rs("student_id")=session("student_id")
			   rs("student_name")=session("user")
			   rs("q_content")=request("q_content")
			   rs("q_time")=now()
			   rs("ifanswer")=0
			   rs.update
			    response.write "<table width=98% ><tr><td>&nbsp;&nbsp;&nbsp; 对不起,暂时没有收集你的问题。<br>&nbsp;&nbsp;&nbsp;&nbsp;现在已经将问题保存,将请教师进行解答,请过一段时间再查看答案,谢谢!<br>请<a href='ask.asp'>返回</a></td></tr></table>"
		  %>
                        <% else %>
                        <table width="559" border="0" cellspacing="0" cellpadding="0" >
                          <tr>
                            <td height="24" colspan="2" align="center" valign="center"><div align="center" class="text">已有相关问题</div></td>
                            <td height="24" width="100"><div align="center" class="text">问题答案</div></td>
                            <td height="24" width="159" class="text"><div align="center">是否解答</div></td>
                          </tr>
                          <%    
          rscat.AbsolutePage=intpagenum
                y =1
          for intcount =1 to rscat.pagesize
              
%>
                          <tr>
                            <td width="25" height="39" align="left" valign="middle"><img src="../images/untitled/tp009.gif" width="15" height="15" align="middle"> </td>
                            <td width="275" align="left" valign="middle" class="text"><%=rscat("q_content")%> <br></td>
                            <td height="39" width="100"><div align="center" class="text"><a href="viewanswer.asp?id=<%=rscat("id")%>">查看答案</a></div></td>
                            <td height="39" width="159"><div align="center" class="text">
                                <% 
		  if rscat("ifanswer") then
		  response.write"已解答"
		  else
		  response.write"暂未解答"
		  
		  end if
		  %>
                            </div></td>
                          </tr>
                          <%         y=y + 1
         rscat.movenext
     if rscat.eof then EXIT for
   next
    
%>
                          <tr>
                            <td height="35" colspan="5" class="text"><div align="center">
                                <%  
		    i=intpagenum
		 if intpagenum<>1 then
		    response.write "&nbsp;<a href="""&Request.ServerVariables("SCRIPT_NAME")&"?pn=1"">[第一页]</a>&nbsp;"
			response.write "&nbsp;<a href="""&Request.ServerVariables("SCRIPT_NAME")&"?pn="&i-1&"&q_content="&request("q_content")&""">[上一页]</a>&nbsp;"
		  else 
			 response.write "&nbsp;<font color=""#999999"">[上一页]</font></a>&nbsp;"
			 response.write "&nbsp;<font color=""#999999"">[第一页]</font></a>&nbsp;"
		 end if
		 if intpagenum<>rscat.pagecount then 
		    response.write "&nbsp;<a href="""&Request.ServerVariables("SCRIPT_NAME")&"?pn="&i+1&"&q_content="&request("q_content")&""">[下一页]</a>&nbsp;"
			 response.write "&nbsp;<a href="""&Request.ServerVariables("SCRIPT_NAME")&"?pn="&rscat.pagecount&"&q_content="&request("q_content")&""">[最后页]</a>&nbsp;"
		  else 
			 response.write "&nbsp;<font color=""#999999"">[下一页]</font></a>&nbsp;"
			 response.write "&nbsp;<font color=""#999999"">[最后页]</font></a>&nbsp;"
		end if 
         %>
                            </div></td>
                          </tr>
                          <tr>
                            <form name="form" method="post" action="find.asp" onSubmit="return Check(<%=rscat.pagecount%>)">
                              <td height="40" colspan="5" class="text"><div align="center"> 每页有2条资料,总共有<span class="a1"><%=rscat.pagecount%></span>页,这是第<span class="a1"><%=intpagenum%></span>页,跳转到
                                      <input name="pn" type="text" class="eee"
style="ime-mode:Disabled" onKeyPress="return event.keyCode>=48&&event.keyCode<=57||event.keyCode==46" size="4" maxlength="4"
onpaste="return !clipboardData.getData('text').match(/\D/)"
ondragenter="return false">
                /<span class="a1"><%=rscat.pagecount%></span> 页
                <input type="submit" name="Submit" value="跳转">
                                </div>
                                  <input type="hidden" name="q_content" value="<%=request("q_content")%>">
                              </td>
                            </form>
                          </tr>
                      </table></td>
                  </tr>
                  <tr>
                    <td height="27"><div align="left"><font color="#FF0000"  class="t4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如果上面没有你要问的问题,请将问题保存到数据库中等待教师回答。你的问题是:</font></div></td>
                  </tr>
                  <tr>
                    <td align="center"><form name="form" method="post" action="savequestion.asp">
                        <table width="592" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="592" height="20" valign="top"><div align="center">
                                <textarea name="q_content" cols="70" rows="6" class="eee"><%=Trim(Request("q_content"))%></textarea>
                            </div></td>
                          </tr>
                          <tr>
                            <td height="2"></td>
                          </tr>
                          <tr>
                            <td height="20">              
                                <input type="submit" name="Submit2" value="保存问题" class="t31">
                            </td>
                          </tr>
                        </table>
                    </form></td>
                    <% end if %>
                  </tr>
                </table>
                <div align="center"><br class="bg">
                </div>
            </div></td>
          </tr>
        </table>
      </td>
  </tr>
</table>
  
<table width="760" border="0" cellpadding="0" cellspacing="0" height="24" bordercolor="003366" align="center">
  <tr> 
      <td background="../images/untitled/botton-bg.gif">
      <div align="center" class="text">CopyRight @ 2005 东北师范大学网络学院</div>
    </td>
  </tr>
</table>

⌨️ 快捷键说明

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