📄 questionlist.asp
字号:
<% ModuleCode="M0915" %>
<!--#include file="../../Include/Reference.asp"-->
<%
Call PrintPageHead
%>
<!--#include file="../../Include/connect.asp"-->
<!--#include file="QuestionMenu.asp"-->
<%
FromTime=Request("FromTime")
ToTime=Request("ToTime")
UQTitle=Request("UQTitle")
UQInfo=Request("UQInfo")
UQStat=Request("UQStat")
TypeCode=Request("TypeCode")
strSQL="Select * from v_Question where UQUserID=" & Session("UserID")
strQuery=""
if UQTitle<>"" then
strSQL = strSQL & " and UQTitle like '%" & UQTitle & "%'"
strQuery = strQuery & "&UQTitle=" & UQTitle
end if
if TypeCode<>"" then
strSQL = strSQL & " and TypeCode='" & TypeCode & "'"
strQuery = strQuery & "&TypeCode=" & TypeCode
end if
if UQStat<>"" then
strSQL = strSQL & " and UQStat='" & UQStat & "'"
strQuery = strQuery & "&UQStat=" & UQStat
end if
if UQInfo<>"" then
strSQL = strSQL & " and UQInfo like '%" & UQInfo & "%'"
strQuery = strQuery & "&UQInfo=" & UQInfo
end if
if FromTime<>"" then
strSQL = strSQL & " and UQTime >= '" & FromTime & " 00:00:00'"
strQuery = strQuery & "&FromTime=" & FromTime
end if
if ToTime<>"" then
strSQL = strSQL & " and UQTime <= '" & ToTime & " 23:59:59'"
strQuery = strQuery & "&ToTime=" & ToTime
end if
strSQL = strSQL & " order by UQTime desc"
'Response.Write strSQL
'Response.End
Set Rs= Server.CreateObject("ADODB.Recordset")
Rs.open strSQL,Cn,1,1
If Rs.Eof Then
Response.Write "<br><br><br><br><P align='center' class='titletext'>目前还没有此类问题!</p>"
else
Rs.PageSize=Opt_PageSize
pages=Rs.pagecount
records=Rs.recordcount
currentpage=request("currentpage")
if currentpage="" or currentpage<1 then currentpage=1
currentpage=cint(currentpage)
if currentpage>pages then currentpage=pages
Rs.absolutepage=currentpage
%>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td height="22" class="titletext"><font color="<%=Opt_Font_TitleColor%>"><strong>问题列表</strong></font></td>
<td align="right">共 <font color="red"><b><%=Records%></b></font> 个项目 页次:
<font color="red"><b><%=currentpage%></b></font> / <font color="red"><b><%=Pages%></b></font>
页
</td>
</tr>
</tbody>
</table>
<!------------------------------------------------------------------------------------->
<table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="<%=Opt_Table_BGColor%>">
<tr bgcolor="<%=Opt_TR_BGColor%>" height="24">
<td>问题标题</td>
<td>问题类型</td>
<td>提问时间</td>
<td width="60">状态</td>
</tr>
<%
linenumber=Rs.pagesize
do while (not Rs.eof) and (line<linenumber)
if line mod 2 =0 Then %>
<tr bgcolor="<%=Opt_TD_BGColor1%>" height="20">
<% else %>
<tr bgcolor="<%=Opt_TD_BGColor2%>" height="20">
<% end if %>
<td><a href="QuestionView.asp?UQID=<%=Rs("UQID")%>" class="a2"><%=Rs("UQTitle")%></a></td>
<td><%=Rs("TypeName")%></td>
<td><%=FormatDateTime(Rs("UQTime"),vbShortDate)%></td>
<td>
<%
Select Case Rs("UQStat")
Case "1"
Response.Write "正常"
Case "2"
Response.Write "<a href='QuestionEdt.asp?UQID=" & Rs("UQID") & "' class='a2'>尚未回复</a>"
Case "3"
Response.Write "<a href='QuestionView.asp?UQID=" & Rs("UQID") & "' class='a2'>已经答复</a>"
Case "4"
Response.Write "已经删除"
Case "5"
Response.Write "已经作废"
End Select
%>
</td>
</tr>
<%
Rs.MoveNext
line=line+1
Loop
%>
</table>
<!-------------------------------------分页导航--------------------------------------->
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<form name="pageform" method="Post" action="<%=Request("SCRIPT_NAME")%>?px=<%=px%><%=strQuery%>">
<tr height="26">
<td>
<%if currentpage>1 then%>
<a href="<%=Request("SCRIPT_NAME")%>?currentpage=1<%=strQuery%>" class="a2">首页</a> <a href="<%=Request("SCRIPT_NAME")%>?currentpage=<%=currentpage-1%><%=strQuery%>" class="a2">上一页</a>
<%end if%>
<%if currentpage<pages then%>
<a href="<%=Request("SCRIPT_NAME")%>?currentpage=<%=currentpage+1%><%=strQuery%>" class="a2">下一页</a> <a href="<%=Request("SCRIPT_NAME")%>?currentpage=<%=pages%><%=strQuery%>" class="a2">末页</a>
<%end if%>
</td>
<td align="right">
转到: <input type="text" name="currentpage" size="2" maxlength="6" class="input" value="<%=currentpage%>"> 页
</td></tr>
</form>
</tbody>
</table>
<%
end if
Rs.Close
Cn.Close
Set Rs=Nothing
Set Cn=Nothing
%>
<%
Call PrintPageBottom
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -