📄 questiondetail.asp
字号:
<%
id=Request("id")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("CSTUDY.mdb")
set rs= server.createobject("adodb.recordset")
sql="select * from question where ID="&id
Set rs= conn.Execute(sql)
%>
<HTML>
<HEAD>
<TITLE><%=title%></TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<link rel="stylesheet" type="text/css" href="css/index1.css">
<link rel="stylesheet" type="text/css" href="css/toolbar2.css">
<META content="Microsoft FrontPage 4.0" name=GENERATOR>
<base target="_self">
</HEAD>
<BODY background="image/A-bg.gif" leftMargin=0 topMargin=0>
<p> </p>
<TABLE border="1" width="510" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="5" bgcolor="#A4D1FF" height="282">
<TR>
<TD align=center width="137" height="9">
<font color="#FF0000">
提问人:</font></TD>
<TD align=center width="94" height="9">
<%
sql1="select * from user where ID="&rs("id1")&""
set rs1=conn.execute(sql1)
%>
<a href="viewuser.asp?userid=<%=rs1("ID")%>" title="点击查看用户信息" target="_blank"><%=rs1("name")%></a>
</TD>
<TD align=center width="83" height="9"><font color="#FF0000">提问时间:</font></TD>
<TD align=center width="146" height="9"><%=rs("refer")%></TD>
</TR>
<TR>
<TD align=center width="137" height="21">
<font color="#FF0000">
标题:</font></TD>
<TD align=center width="323" height="21" colspan="3">
<%dim x,str_title
x=rs("title")
if len(x)>25 then
str_title=left(x,25)&"…"
else
str_title=rs("title")
end if%>
<%=str_title%></TD>
</TR>
<TR>
<TD align=center width="137" height="11">
<font color="#FF0000">
所属章节:</font></TD>
<TD align=center width="323" height="11" colspan="3">
<%sql2="select * from tutorial where ID="&rs("id2")&""
set rs2=conn.execute(sql2)
%>
<%=rs2("rule")%> <%=rs2("title")%>
</TD>
</TR>
<tr>
<TD align=center width="137" height="160">
<font color="#FF0000">
内容:</font></TD>
<TD align=left width="323" height="160" colspan="3" valign="top">
<textarea rows="10" name="content" cols="54" class="td1" readonly>
<%=rs("content")%>
</textarea>
</TD>
</tr>
<%if rs("or")="是" then%>
<tr>
<TD align=center width="396" height="6" colspan="4"><a href="answer.asp?questionid=<%=rs("ID")%>&userid=<%=rs("id1")%>">查看该问题的所有回答</a></TD>
</tr>
<%end if%>
<tr>
<TD align=center width="396" height="6" colspan="4"><a href="viewquestion.asp?userid=<%=rs("id1")%>" target="_blank">查看该用户所有问题</a></TD>
</tr>
<tr>
<TD align=center width="396" height="9" colspan="4"><a href="viewquestion.asp?chapterid=<%=rs("id2")%>" target="_blank">查看该章节所有问题</a></TD>
</tr>
<%if session("login")<>"" and session("identity")="teacher" then
sql3="select * from teacher where IDname='"&session("login")&"'"
set rs3=conn.execute(sql3)
if rs("id3")=rs3("ID") then%>
<tr>
<TD align=center width="396" height="9" colspan="4"><a href="answerquestion.asp?questionid=<%=rs("ID")%>&teacherid=<%=rs("id3")%>">回答该问题</a></TD>
</tr>
<%
end if
end if%>
</TABLE>
<%set rs=nothing
conn.close
set conn=nothing
%>
<br clear=all>
<p>
<center><a href="javascript:onClick= window.close()">关闭窗口</a></center>
</p>
</form>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -