📄 ask.asp
字号:
<!--#include file="dataconn.asp"-->
<!--#include file="ADOVBS.INC"-->
<%
Function HtmlEncode(str)
If Trim(Str)="" Or IsNull(str) Then Exit Function
str=Replace(str,">",">")
str=Replace(str,"<","<")
str=Replace(str,Chr(32)," ")
str=Replace(str,Chr(9)," ")
str=Replace(str,Chr(34),""")
str=Replace(str,Chr(39),"'")
str=Replace(str,Chr(13),"")
str=Replace(str,Chr(10) & Chr(10), "</p><p>")
str=Replace(str,Chr(10),"<br> ")
HtmlEncode=str
End Function
%>
<%
recordsperpage=5
sql="select * from question where ifanswer=true order by id desc"
set rscat=server.createobject("adodb.recordset")
rscat.CursorLocation=adUseClient
rscat.open sql,conn,2,3
if request("pn")<>"" then
intpagenum=cint(request("pn"))
else
intpagenum=1
end if
rscat.pagesize=recordsperpage
%>
<html>
<head>
<style type="text/css">
<!--
p{font-size:9pt};
td{font-size:9pt};
li{font-size:9pt};
select{font-size:9pt};
.forms {
BORDER-RIGHT: #254b03 1px solid; BORDER-TOP: #254b03 1px solid; MARGIN-TOP: auto; MARGIN-BOTTOM: auto; BORDER-LEFT: #254b03 1px solid; WIDTH: 80px; BORDER-BOTTOM: #254b03 1px solid; HEIGHT: 14px; BACKGROUND-COLOR: #ffffff
}
a {color:#5f5f5f;font-size: 9pt ;text-decoration:none; line-height:13.5pt}
a:hover {text-decoration:none; color:#000000;text-decoration: underline}
-->
.a10 { font-size: 10.5pt}
.bg {
background-repeat: no-repeat;
}
.t3 { color: #000000;
background-color: #eaf1fb;
border: 1px solid #3d5a83;
font-size: 12px;
font-family: "楷体_GB2312";
}
.t4 { color: #000000;
background-color: #eaf1fb;
border: 1px solid #3d5a83;
font-size: 16px;
font-family: "楷体_GB2312";
}
.text {font-size: 12px; color: #000000}
.ee {
background-color: #CEDAE0;
}
</style>
<script language="JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<title>在线答疑</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body background="../images/untitled/bg.gif" leftmargin="0" topmargin="0">
<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>
<form name="form" method="post" action="find.asp" onSubmit="return Check()">
<div align="center">
<table width="685" cellpadding="0" cellspacing="0">
<% if rscat.eof then %>
<tr>
<td height="20" class="text" colspan="2"><div align="center">暂无被解答的问题</div></td>
</tr>
<% else %>
<%
rscat.AbsolutePage=intpagenum
for intcount =1 to rscat.pagesize
%>
<tr>
<td height="20" class="text" colspan="2"></td>
</tr>
<tr>
<td height="20" class="text" width="27"><img src="help_icon.gif" width="18" height="13"></td>
<td height="20" class="text" width="656"><font color="#CC0000"><%=rscat("student_name")%>:</font><font color="#663399"><%=rscat("q_content")%></font></td>
</tr>
<tr>
<td height="20" class="text" colspan="2"><table width="390" border="0" cellspacing="0" cellpadding="0" class="text">
<tr>
<td height="20" width="18" valign="top">└</td>
<td height="20" width="21" valign="top"><img src="user.gif" width="21" height="18"></td>
<td height="20" width="351"><font color="#990000">回复</font>:</td>
</tr>
</table></td>
</tr>
<tr>
<td height="20" class="text" colspan="2"><%=htmlencode(rscat("a_content"))%> </td>
</tr>
<%
rscat.movenext
if rscat.eof then EXIT for
next
%>
<tr>
<td height="20" class="text" colspan="2">
<%
i=intpagenum
if intpagenum<>1 then
response.write " <a href="""&Request.ServerVariables("SCRIPT_NAME")&"?pn=1"">[第一页]</a> "
response.write " <a href="""&Request.ServerVariables("SCRIPT_NAME")&"?pn="&i-1&""">[上一页]</a> "
else
response.write " <font color=""#999999"">[上一页]</font></a> "
response.write " <font color=""#999999"">[第一页]</font></a> "
end if
if intpagenum<>rscat.pagecount then
response.write " <a href="""&Request.ServerVariables("SCRIPT_NAME")&"?pn="&i+1&""">[下一页]</a> "
response.write " <a href="""&Request.ServerVariables("SCRIPT_NAME")&"?pn="&rscat.pagecount&""">[最后页]</a> "
else
response.write " <font color=""#999999"">[下一页]</font></a> "
response.write " <font color=""#999999"">[最后页]</font></a> "
end if
%>
</td>
</tr>
<tr>
<td height="20" class="text" colspan="2"><div align="left">每页有2条资料,总共有<%=rscat.pagecount%>页,这是第<%=intpagenum%>页</div></td>
</tr>
<% end if %>
<tr>
<td height="20" class="text" colspan="2"> <font color="#990000">请输入您要提问的问题:</font></td>
</tr>
<tr>
<td height="20" colspan="2" valign="top" class="text"><div align="center">
<textarea name="q_content" cols="80" rows="5" class="ee"></textarea>
</div></td>
</tr>
<tr>
<td height="20" class="text" colspan="2"> </td>
</tr>
<tr align="center">
<td height="20" colspan="2"><input type="submit" name="Submit" value="开始解答" class="t3">
<input type="reset" name="Submit2" value="重新填写" class="t3">
</td>
</tr>
</table>
</div>
</form>
<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 + -