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

📄 index.asp

📁 树形论坛
💻 ASP
字号:
<!-- #include file="function.asp" -->
<%
myfilename="index.asp"
if action="setpage" then
if int(Request("pagesetup"))<>empty or int(Request("pagesetup"))<>0 then
Response.Cookies("pagesetup")=int(Request("pagesetup"))
else
Response.Cookies("pagesetup")=""
end if
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=forumname%></title>
<style type="text/css">
<!--
a:visited{text-decoration:none;color: #0000ff;}
A:hover{TEXT-DECORATION:underline overline;color: #0000ff;}
A:link{text-decoration:none;color: #0000ff;}
BODY{font-size:10pt;color: #000000;}
TD{font-size:10pt;color: #000000;}
-->
</style>
</head>

<body background="images/bg.gif">
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td id="wmbbstopads">广告数据加载中</td>
  </tr>
</table>
<table width="752"  border="0" align="center" cellpadding="0" cellspacing="0" height="1">
   <tr>
    <td height="1" align="center" width="760">
      <br>
      <a href="http://data.datall.com">
      返回首页</a> | <a href="newadd.asp">发表知识</a> | <a href="reg.asp">用户注册</a>      
      | <a href="ulogin.asp">用户登陆</a> | <a href="?good=goodtopic">精华主题</a>      
      | <a href="javascript:location.reload()">刷新该页</a>  |    
      <hr align="left" width="752" color="#0066CC" SIZE="1">
	</td>
  </tr>

</table>
<!--
'┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓'
'┃                   DATALL 知识库asp版 v2.0                              ┃'
'┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫'
'┃                   homepage:http://www.datall.com                       ┃'
'┃                            http://www.datall.net                       ┃'
'┃                   Q Q  NO.:194088                                      ┃'
'┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫'
'┃                          DATALL出品                                    ┃'
'┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛'
-->
<%
if affichemsg=empty then affichemsg="<marquee width=500 scrollamount=3>暂时没有公告</marquee>"
%>
<table width="754"  border="0" align="center" cellpadding="0" cellspacing="0" height="53">
<tr><td width="752"><ul>
<%
dim topsql, pagesetup, count, TotalPage, PageCount, newtopic, rs2, sql2, replydata
dim wheresearch, goodsearch
set rs=server.createobject("ADODB.Recordset")
searchkey=HTMLEncode(Request("searchkey"))
wheresearch=""
if searchkey<>empty then wheresearch=" and txttitle like '%"&searchkey&"%' or username='"&searchkey&"'"
goodsearch=""
if Request("good")="goodtopic" then goodsearch=" and goodtopic=1"
if Request.Cookies("pagesetup")=empty then
pagesetup=perpage
else
pagesetup=int(Request.Cookies("pagesetup"))
if pagesetup > 150 then pagesetup=perpage
end if
topsql="where upid=0"&goodsearch&wheresearch&""
count=conn.execute("Select count(id) from [list] "&topsql&"")(0)
TotalPage=cint(count/pagesetup)
if TotalPage < count/pagesetup then TotalPage=TotalPage+1
PageCount = cint(Request.QueryString("P"))
if PageCount < 1 or PageCount = empty then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
sql="select * from [list] "&topsql&" order by toptopic Desc,lasttime Desc"
if PageCount>100 then
rs.Open sql,Conn,1
else
Set Rs=Conn.Execute(sql)
end if
if TotalPage>1 then RS.Move (PageCount-1) * pagesetup
i=0
Do While Not RS.EOF and i<pagesetup
i=i+1
if Not Response.IsClientConnected then responseend
list=list & RS("topictype") & ","
RS.MoveNext
loop
RS.Close
outmsg=""
if list<>empty then
	sql="select id,upid,icon,txttitle,username,posttime,count,topictype,goodtopic,toptopic from [list] where topictype in ("&list&") order by toptopic desc,lasttime desc,orderu"
	rs.open sql,conn,1,1
	Do while (rs.eof=false)
	newtopic=""
	if rs("posttime")+1/24>now() then newtopic="<img src=images/new.gif>"
	if rs("goodtopic")=1 then
		topicimg="<img src=images/jinghua.gif>"
	elseif rs("toptopic")=1 then
		topicimg="<img src=images/top.gif>"
	else
		topicimg="<img src=images/icon/"&rs("icon")&".gif>"
	end if
	if rs("upid")=0 then
	response.write "</ul></td></tr>"&vbCrlf&"<tr><td><ul><li>"&topicimg&"<a href=html/"&rs("id")&"/"&rs("id")&wmhtmlkzn&" target=_blank>"&rs("txttitle")&"</a> "&newtopic&"<font color=red>【</font><font color=000080><b>"&rs("username")&"</b></FONT><font color=red>】</FONT>发表时间:<font size=1>"&rs("posttime")&"</font> 点击:<font color=red>1"&rs("count")&"</font>"&vbCrlf&""
	else
	response.write "<ul><li><a href=html/"&rs("upid")&"/"&rs("id")&wmhtmlkzn&" target=_blank>"&rs("txttitle")&"</a> "&newtopic&"<font color=red>【</font><font color=000080><b>"&rs("username")&"</b></FONT><font color=red>】</FONT>发表时间:<font size=1>"&rs("posttime")&"</font> 点击:<font color=red>1"&rs("count")&"</font></li></ul>"&vbCrlf&""
	end if
	rs.MoveNext
	loop
	rs.Close
end if
%>
<%=outmsg%>
</ul></td></tr>
</table>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
<td bgcolor="#0066CC" width="20%">
<font color="#000000">
<%
dim pageselect, selectpagesetup
selectpagesetup=Request.Cookies("pagesetup")
if selectpagesetup=empty then selectpagesetup=0
pageselect="<option value=?action=setpage&pagesetup=30>30</option><option value=?action=setpage&pagesetup=10>10</option><option value=?action=setpage&pagesetup=30>30</option><option value=?action=setpage&pagesetup=40>40</option><option value=?action=setpage&pagesetup=50>50</option><option value=?action=setpage&pagesetup=80>80</option>"
pageselect=replace(pageselect,"pagesetup="&selectpagesetup,"pagesetup="&selectpagesetup&" selected")
%>
</font><font color="#FFFFFF">
每页显示</font><font color="#000000"><select class="inputa" name=admnewstype size=1 onChange="if(this.value!='no'){location.href=this.value}">
<%=pageselect%> 
</select></font><font color="#FFFFFF">条主题</font></td> 
    <form name="form" action="<%=myfilename%>" method="post"><td width="35%" align="right" bgcolor="#0066CC"><font color="#FFFFFF"><b>搜索知识:</b></font><font color="#000000"><input name="searchkey" size="20" value="<%=Request("searchkey")%>" class="inputa" style="width: 135; height: 16">&nbsp;<input type="submit" value="搜索" name="submit" class="inputb" style="width: 40; height: 23">&nbsp;&nbsp;</font></td></form>    <td height="25" bgcolor="#0066CC" width="26%" align="right"><font color="#FFFFFF">&nbsp;&nbsp;    
  本知识库共有 <%=TotalPage%> 页                            
[<b>
<script> 
TotalPage=<%=TotalPage%>
PageCount=<%=PageCount%>
for (var i=1; i <= TotalPage; i++) {
if (i <= PageCount+3 && i >= PageCount-3 || i==1 || i==TotalPage){
if (i > PageCount+4 || i < PageCount-2 && i!=1 && i!=2 ){document.write(" ... ");}
if (PageCount==i){document.write(" "+ i +" ");}
else{
document.write("<a href=?p="+i+"&good=<%=Request("good")%>&searchkey=<%=Request("searchkey")%>><font color=#ffffff>"+ i +"</font></a> ");
}
}
}
</script>
</b>]</font> 
</td>
    </form>
  </tr>
</table>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td id="wmbbsbottomads">数据加载中</td>
  </tr>
</table>
<script language="JavaScript" src="images/topads.js"></script>
<script language="JavaScript" src="images/bottomads.js"></script>
</body>

⌨️ 快捷键说明

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