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

📄 assort.asp

📁 问吧程序 问吧程序 问吧程序 问吧程序
💻 ASP
📖 第 1 页 / 共 2 页
字号:
		end if
		if p<>1 then
		rs.move (p-1)*rs.pagesize
		end if
		for i=1 to rs.pagesize%>
  <tr>
          <td>□<a href=showquestion.asp?id=<%=rs("id")%>><%=rs("title")%></a>
		  <br>发表人:<a href=showperson.asp?name=<%=rs("sender")%>><%=rs("sender")%></a><br>发表时间:<font color=green><%=rs("sendtime")%></font><br>浏览数:<font color=red><%=rs("views")%></font><br>回复数:<font color=red><%=rs("replys")%></font><br>问题主题:<a href=assort.asp?topic=<%=rs("topic")%>><%=rs("topic")%></a><hr size=1 color=cccccc></td>
  </tr>
		<%rs.movenext
		if rs.eof then exit for
		next%><tr>
          <td>问题数:<font color=red><%=maxnum%></font> | 每页数:<font color=green><%=rs.pagesize%></font> | 总页数:<font color=green><%=maxpage%></font> | 当前页:<font color=red><%=p%></font>
		  <a href=assort.asp?style=<%=request("style")%>&p=1&topic=<%=topic%>>首页</a> 
		  <a href=assort.asp?style=<%=request("style")%>&p=<%=p-1%>&topic=<%=topic%>>上页</a> 
		  <a href=assort.asp?style=<%=request("style")%>&p=<%=p+1%>&topic=<%=topic%>>下页</a> 
		  <a href=assort.asp?style=<%=request("style")%>&p=<%=maxpage%>&topic=<%=topic%>>尾页</a></td>
        </tr></table>
		<%end if
		rs.close
		end if%>
		<%if request("style")="list" then%>
      <table width="100%"  border="0" cellspacing="1" cellpadding="0" id="table24">
	  <tr bgcolor="#FFFFFF">
          <td height="34" align="center">标题</td>
          <td height="34" align="center">浏览数</td>
          <td height="34" align="center">回复数</td>
          <td height="34" align="center">主题</td>
          <td height="34" align="center">发表人</td>
          <td height="34" align="center">发表时间</td>
        </tr>
	  <%rs.open"select * from question where topic='"&topic&"' order by id desc",conn,1,1
	  if rs.eof then%>
        <tr>
          <td height="34" colspan=6>暂时没有问题!</td>
</tr></table>
		<%else
		rs.pagesize=20
		maxnum=rs.recordcount
		maxpage=rs.pagecount
		if request("p")="" then
		p=1
		else
		p=cint(request("p"))
		end if
		if p>maxpage then
		p=maxpage
		end if
		if p=0 then
		p=1
		end if
		if p<>1 then
		rs.move (p-1)*rs.pagesize
		end if
		for i=1 to rs.pagesize%>
		<tr bgcolor="ffffff">
          <td height="25" width="50%"><a href=showquestion.asp?id=<%=rs("id")%>><%if len(rs("title"))>30 then%><%=left(rs("title"),30)&"..."%><%else%><%=rs("title")%><%end if%></a></td>
		  <td width="6%"><font color=red><%=rs("views")%></font></td>
		  <td><font color=red><%=rs("replys")%></font></td>
		  <td width="10%"><a href=assort.asp?topic=<%=rs("topic")%>><%=rs("topic")%></a></td>
		  <td width="10%"><a href=showperson.asp?name=<%=rs("sender")%>><%=rs("sender")%></a></td>
		  <td width="18%" ><font color=green><%=rs("sendtime")%></font></td>
        </tr>
		<%rs.movenext
		if rs.eof then exit for
		next%><tr>
          <td colspan=6>问题数:<font color=red><%=maxnum%></font> | 每页数:<font color=green><%=rs.pagesize%></font> | 总页数:<font color=green><%=maxpage%></font> | 当前页:<font color=red><%=p%></font>
		  <a href=assort.asp?style=<%=request("style")%>&p=1&topic=<%=topic%>>首页</a> 
		  <a href=assort.asp?style=<%=request("style")%>&p=<%=p-1%>&topic=<%=topic%>>上页</a> 
		  <a href=assort.asp?style=<%=request("style")%>&p=<%=p+1%>&topic=<%=topic%>>下页</a> 
		  <a href=assort.asp?style=<%=request("style")%>&p=<%=maxpage%>&topic=<%=topic%>>尾页</a></td>
        </tr></table>
		<%end if
		rs.close
		end if%>
		<%if request("style")="sumary" then%>
      <table width="100%"  border="0" cellspacing="1" cellpadding="0" id="table25">
	  <%rs.open"select * from question where topic='"&topic&"' order by id desc",conn,1,1
	  if rs.eof then%>
        <tr>
          <td height="34">暂时没有问题!</td>
        </tr></table>
		<%else
		rs.pagesize=10
		maxnum=rs.recordcount
		maxpage=rs.pagecount
		if request("p")="" then
		p=1
		else
		p=cint(request("p"))
		end if
		if p>maxpage then
		p=maxpage
		end if
		if p=0 then
		p=1
		end if
		if p<>1 then
		rs.move (p-1)*rs.pagesize
		end if
		for i=1 to rs.pagesize%>
		<tr bgcolor="eeeeee">
          <td height="25">●<a href=showquestion.asp?id=<%=rs("id")%>><%=rs("title")%></a></td></tr>
		  <tr><td bgcolor=ffffff><%if len(rs("content"))>200 then%><%=left(rs("content"),200)&"......"%><%else%><%=rs("content")%><%end if%></td></tr>
		  <tr><td bgcolor="#FFFFFF">浏览数:<font color=red><%=rs("views")%></font>
		  回复数:<font color=red><%=rs("replys")%></font>
		  主题:<a href=question.asp?topic=<%=rs("topic")%>><%=rs("topic")%></a>
		  发布者:<a href=showperson.asp?name=<%=rs("sender")%>><%=rs("sender")%></a>
		  发布时间:<font color=green><%=rs("sendtime")%></font></td>
        </tr>
		<%rs.movenext
		if rs.eof then exit for
		next%><tr>
          <td colspan=6>问题数:<font color=red><%=maxnum%></font> | 每页数:<font color=green><%=rs.pagesize%></font> | 总页数:<font color=green><%=maxpage%></font> | 当前页:<font color=red><%=p%></font>
		  <a href=assort.asp?style=<%=request("style")%>&p=1&topic=<%=topic%>>首页</a> 
		  <a href=assort.asp?style=<%=request("style")%>&p=<%=p-1%>&topic=<%=topic%>>上页</a> 
		  <a href=assort.asp?style=<%=request("style")%>&p=<%=p+1%>&topic=<%=topic%>>下页</a> 
		  <a href=assort.asp?style=<%=request("style")%>&p=<%=maxpage%>&topic=<%=topic%>>尾页</a></td>
        </tr></table>
		<%end if
		rs.close
		end if%>
		<%if request("style")="rnd" or request("style")="" then
		randomize
		rndnum=cint(rnd()*2)
		if rndnum=0 then
		response.redirect"assort.asp?style=title&topic="&topic
		elseif rndnum=1 then
		response.redirect"assort.asp?style=list&topic="&topic
		elseif rndnum=2 then
		response.redirect"assort.asp?style=sumary&topic="&topic
		end if
		end if%>
		<%if request("style")="new" then%>
		<table width="100%"  border="0" cellspacing="1" cellpadding="0" id="table26">
		<%rs.open"select * from question where topic='"&topic&"' order by id desc",conn,1,1
		if rs.eof then%>
		<tr><td>暂时没有问题!</td></tr></table>
		<%else
		maxnum=rs.recordcount
		rs.pagesize=20
		maxpage=rs.pagecount
		if request("p")="" then
		p=1
		else
		p=cint(request("p"))
		end if
		if p>maxpage then
		p=maxpage
		end if
		if p=0 then
		p=1
		end if
		if p<>1 then
		rs.move (p-1)*rs.pagesize
		end if
		for i=1 to rs.pagesize%>
		<tr><td height=30 style="border-bottom:1pt dotted aaaaaa"><a href=showquestion.asp?id=<%=rs("id")%>><%=rs("title")%></a><font color=green>(<%=rs("sendtime")%>)</font></td></tr>
		<%rs.movenext
		if rs.eof then exit for
		next%>
		<tr><td>分页:<font style="font-size:16px "><%for j=1 to maxpage%><a href=assort.asp?style=new&p=<%=j%>&topic=<%=topic%>><%if p=j then%><font color=red><%=j%></font><%else%><%=j%><%end if%></a> | <%next%></td></tr></table>
		
		<%end if
		rs.close
		end if%>
		<%if request("style")="rnd" then
		randomize
		rndnum=cint(rnd()*2)
		if rndnum=0 then
		response.redirect"assort.asp?style=title&topic="&topic
		elseif rndnum=1 then
		response.redirect"assort.asp?style=list&topic="&topic
		elseif rndnum=2 then
		response.redirect"assort.asp?style=sumary&topic="&topic
		end if
		end if%>
		<%if request("style")="views" then%>
		<table width="100%"  border="0" cellspacing="1" cellpadding="0" id="table27">
		<%rs.open"select * from question where topic='"&topic&"' order by views desc",conn,1,1
		if rs.eof then%>
		<tr><td>暂时没有问题!</td></tr></table>
		<%else
		maxnum=rs.recordcount
		rs.pagesize=20
		maxpage=rs.pagecount
		if request("p")="" then
		p=1
		else
		p=cint(request("p"))
		end if
		if p>maxpage then
		p=maxpage
		end if
		if p=0 then
		p=1
		end if
		if p<>1 then
		rs.move (p-1)*rs.pagesize
		end if
		for i=1 to rs.pagesize%>
		<tr><td height=30 style="border-bottom:1pt dotted aaaaaa"><a href=showquestion.asp?id=<%=rs("id")%>><%=rs("title")%></a>(查看<font color=red><%=rs("views")%></font>次)</td></tr>
		<%rs.movenext
		if rs.eof then exit for
		next%>
		<tr><td>分页:<%for j=1 to maxpage%><a href=assort.asp?style=new&p=<%=j%>&topic=<%=topic%>><%if p=j then%><font color=red><%=j%></font><%else%><%=j%><%end if%></a> | <%next%></td></tr></table>
		
		<%end if
		rs.close
		end if%>
		<%end if%>
		
		
		
		
        </td>
    <td width="20%" valign="top" bgcolor="eeeeee">
				<table width="100%" height="96"  border="0" cellpadding="0" cellspacing="0" id="table28">
      <%if request("login")="登陆" then
	  if request("name")="" then
	  response.write"<script>alert('用户名不能为空!');history.back();</script>"
	  elseif request("pwd")="" then
	  response.write"<script>alert('密码不能为空!');history.back();</script>"
	  else
	  name=request("name")
	  pwd=request("pwd")
	  rs.open"select * from person where name='"&name&"' and pwd='"&pwd&"'",conn,1,1
	  if rs.eof then
	  response.write"<script>alert('用户名或密码错误!');history.back();</script>"
	  else
	  session("person")=name
	  %>
	  <%end if
	  end if
	  end if%>
	  <%if session("person")<>"" then%>
	  <%end if%>
	  <%if session("person")="" then%>
      <tr><form method=post action=index.asp>
        <td align="center" valign="top" style="border-bottom:1pt dotted;border-color: 6699ff "> </td></form>
      </tr><%end if%>
    </table>
      			</td>
  </tr>
</table>

				</tr></table></table>
	</div>
</div>
</body>
</html>

⌨️ 快捷键说明

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