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

📄 index.asp

📁 鄂尔多斯建站网全站程序(冬季修正版)
💻 ASP
字号:
<!--#include file="config.asp"-->
<!--#include file="ubb.asp"-->
<!--#include file="pub.asp"-->
<!--#include file="header.asp"-->
<%
GetCookie
if notice<>"" then BzNotice
Response.Write "<TABLE class=table_out id=AutoNumber4 borderColor=#9cacd0 height=20 cellSpacing=0 cellPadding=0 width=740 border=1><TBODY><TR><TD height=158><CENTER>"
SqlType
IF Not Rs.Eof Then
IF Request("s")="" Then
ShowNum=Showlynum
Else
ShowNum=Request("s")
End IF
rs.pagesize=Showlynum
maxpage=rs.pagecount
totally=rs.recordcount

requestpage=clng(request("p"))

if requestpage="" or requestpage<1 then
   requestpage=1
end if
if requestpage>maxpage then
    requestpage=maxpage
end if

if not requestpage=1 then
rs.move (requestpage-1)*rs.pagesize
end if

for i=1 to rs.pagesize and not rs.bof

if ubbcode="1" then
cont=ubb(rs("content"))
else
cont=rs("content")
end if

LyType=Rs("type")
LyType1=left(LyType,2)
LyType2=Right(LyType,2)

LyTitle="&nbsp;"&Rs("title")
if Session("PRO"&LogPWD&"ADMIN")<>True then
 if LyType2="se" then
  if UserName<>rs("name") or UserPwd<>rs("psw") then
  LyTitle="【悄悄话】"
  else
  LyTitle="【悄】"&Rs("title")
  end if
 end if
 if LyType1="wa" then
 LyTitle="【留言等待版主审核】"
 end if
end if

dim j
if requestpage=1 then
j=i
else 
j=((requestpage-1)*Showlynum+i)
end if 

IF Session("PRO"&LogPWD&"ADMIN")<>True Then
 if LyType2="se" and (UserName<>rs("name") or UserPwd<>rs("psw")) then
 cont1="<b>你无法看到此条留言内容,原因:</b><li>此留言是给版主的悄悄话</li>"
 elseif LyType1="wa" then
 cont1="<b>你无法看到此条留言内容,原因:</b><li>此留言须等待版主的审核</li>"
 elseif LyType="no" then
 cont1="<b>你无法看到此条留言内容,原因:</b><li>留言未能通过版主的审核</li>"
 else
 cont1=cont
 end if
ELSE
 if LyType2="se" then
 cont1="<font color=#ff6666>[* * * 悄悄话 * * *]</font><BR>"&cont
 elseif LyType1="wa" then
 cont1="<font color=#ff6666>[= = = 未审核 = = =]</font><BR>"&cont
 elseif LyType="no" then
 cont1="<font color=#ff6666>[**留言被禁止显示**]</font><BR>"&cont
 else
 cont1=cont
 end if
End if

%>
 <TABLE id=showly borderColor=#9cacd0 height=64 cellSpacing=0 
      cellPadding=0 width=740 bgColor=#f5f7fb border=1>
        <TBODY>
        <TR>
          <TD background=images/Cent.gif bgColor=#f5f7fb colSpan=3 
          height=16></TD></TR>
        <TR>
          <TD width=135 background=images/d3.gif bgColor=#f5f7fb 
          height=22>
            <P align=center><FONT class=sd>【<%=Rs("name")%>】</FONT> </P></TD>
          <TD style="BORDER-RIGHT: medium none" width=474 
          background=images/d3.gif bgColor=#f5f7fb 
          height=16> <font color=#6C6C6C>
		  <%if rs("top")="9" then%><img src="images/top1.gif" alt="置顶"><%end if%>
		  <B><%=LyTitle%></B></font></TD>
          <TD style="BORDER-LEFT-STYLE: none" width=183 
          background=images/d3.gif bgColor=#f5f7fb 
          border-left-width:medium align=right>
		  <%IF Session("PRO"&LogPWD&"ADMIN")=True Then%>
		  <A href='edit.asp?edit=ture&id=<%=rs("id")%>'><IMG height=12 
            src="images/post.gif" width=12 border=0>管理</A> <A 
           href='index.asp?del=<%=Rs("id")%>' onclick="{if(confirm('留言删除后将无法再恢复,你真的要删除吗?')){return true;}return false;}"><IMG height=12 src="images/del.gif" border=0 width=12>删除</A><%End IF%>
			<%if rs("site")<>"" then%> <a href='<%=rs("site")%>' target="_blank"><img border=0 src="images/index.gif">主页</a><%end if%>
			<%if rs("mail")<>"" then%> <a href='mailto:<%=rs("mail")%>'><img border=0 src="images/post.gif">邮件</a><%end if%> </TD></TR>
        <TR>
          <TD vAlign=center width=135 bgColor=#f5f7fb height=1><BR>
            <P align=center><IMG src='images/face/<%=rs("head")%>.gif' border=0></P></TD>
          <TD onmouseover="javascript:this.bgColor='#ffffff'" 
          onmouseout="javascript:this.bgColor='#f5f7fb'" vAlign=top align=center
          bgColor=#f5f7fb colSpan=2 medium border-bottom-width: none>
         <br><p class=sd><table width='97%' style="table-layout:fixed;word-break:break-all"><tr><td style="table-layout:fixed;word-break:break-all">
<%=cont1%><!--BOOTU.COM BOOK1.3-->
</td></tr></table><p align=right><br>
<%
if rs("reply")<>"" then
%>
<HR color=#9cacd0 noShade SIZE=0>
<%
if Session("PRO"&LogPWD&"ADMIN")<>True and LyType2="se" then
if UserName<>rs("name") or UserPwd<>rs("psw") then
%>
&nbsp;&nbsp;版主已回复,请<a href="user_login.asp?url=index.asp?p=<%=requestpage%>">登陆查看回复</a><br>
<%else%>
<FONT class=sd2><P align=left>&nbsp;&nbsp;[<b>版主回复</b>&nbsp;回复时间:<%=Rs("bj")%>]</FONT>
<center><table width='95%' style="table-layout:fixed;word-break:break-all"><tr><td style="table-layout:fixed;word-break:break-all">
 <font class=sd><%=ubb(Rs("reply"))%><br><br>
</td></tr></table></center><P align=right>&nbsp;[-><a href="user_logout.asp" target="_top">知道了,我要退出</a><-]</FONT>
<%
end if
else%>
<FONT class=sd2><P align=left>&nbsp;&nbsp;[<b>版主回复</b>&nbsp;回复时间:<%=Rs("bj")%>]</FONT>
<center><table width='95%' style="table-layout:fixed;word-break:break-all"><tr><td style="table-layout:fixed;word-break:break-all">
 <font class=sd><%=ubb(Rs("reply"))%><br><br>
</td></tr></table></center>
<%
end if
end if%> 		
			</TD></TR>
        <TR>
          <TD width=135 background=images/d3.gif bgColor=#f5f7fb 
          height=19>
            <P align=center class=sd>留言NO:<%=j%></P></TD>
          <TD style="BORDER-RIGHT: medium none" width=350 
          background=images/d3.gif bgColor=#f5f7fb 
          height=16><FONT class=sd><IMG height=15 
            src="images/004.gif" width=30 alt="来自:<%
			IF rs("from")<>"" Then %><%=rs("from")%>
		<% else %>不告诉你<%end if%>"><IMG height=15 
            src="images/ip.gif" width=30 alt="IP:<%
			IF Session("PRO"&LogPWD&"ADMIN")=True Then %><%=rs("ip")%>
		<% else %>已记录<%end if%>"><IMG height=15 
            src="images/qq.gif" width=30 alt="<%
			IF rs("oicq")<>"" Then %>QQ号:<%=rs("oicq")%>
		<% else %>没留QQ号<%end if%>"></td><TD style="BORDER-LEFT-STYLE: none" width=257 
          background=images/d3.gif bgColor=#f5f7fb 
          border-left-width:medium align=left>&nbsp;留言时间:<%=rs("date")%></FONT></TD></TR>
        <TR>
          <TD background=images/Cent.gif bgColor=#f5f7fb colSpan=3 
          height=8> </TD></TR></TBODY></TABLE><br>
<%
Rs.MoveNext
if rs.eof then exit for
next
else
response.write "<font color=#FF9966>错误:没有找到任何记录</font><br><br>"
End IF
Rs.Close
Set Rs=Nothing
%>
      <DIV align=center>
      <CENTER>
      <TABLE id=cpr 
      style="BORDER-TOP-WIDTH: 0px; BORDER-COLLAPSE: collapse" 
      borderColor=#9cacd0 height=33 cellSpacing=0 cellPadding=0 width=740 
      border=1>
        <TBODY>
        <TR>
          <TD style="BORDER-TOP: medium none" 
          background=images/Cent.gif bgColor=#f5f7fb height=32>
            <P align=center class=sd>共有留言<%=totally%>条,共<font color=#4ea2e0><%=maxpage%></font>页 [ 
<%
PageJ
%>
]</TR></TBODY></TABLE></CENTER></DIV></CENTER></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER> 
<%
bottom
Function BzNotice
%>
<TABLE class=table_out id=tt borderColor=#9cacd0 height=15 
cellSpacing=0 cellPadding=0 width=740 border=1>
  <TBODY>
  <TR>
    <TD height=15>
  <TABLE id=Auto borderColor=#9cacd0 height=64 cellSpacing=0 
      cellPadding=0 width=740 bgColor=#f5f7fb border=1>
        <TBODY>
        <TR>
          <TD background="images/Cent.gif" bgColor=#f5f7fb colSpan=2 
          height=16></TD></TR>
        <TR>
          <TD background=images/d3.gif bgColor=#f5f7fb 
          height=22>
            <P align=center><FONT color=#FF3333>【版主通告】</FONT> </P></TD>
         </TR>
        <TR>
          <TD onmouseover="javascript:this.bgColor='#ffffff'" 
          onmouseout="javascript:this.bgColor='#f5f7fb'" vAlign=center 
          bgColor=#f5f7fb width="100%" colSpan=2 medium border-bottom-width: none;>
         <br>
		 <center>
         <table border="0" width="95%" cellspacing="0" cellpadding="0">
         <tr>
         <td width="100%">
		 <p class=sd><%=ubb(notice)%>
		 </td>
         </tr>
         </table>
         </center>
         <br><br>	
		</TD></TR>
        <TR>
          <TD width=135 background=images/d3.gif bgColor=#f5f7fb 
          height=19>
         </TD></TR>
        <TR>
          <TD background=images/Cent.gif bgColor=#f5f7fb colSpan=2 
          height=8> </TD></TR></TBODY></TABLE>
</DIV></CENTER></TD></TR></TBODY></TABLE><br>
<%END Function

Function PageJ
ii=requestpage-4
iii=requestpage+4
if ii < 1 then
ii=1
end if
if iii > maxpage then
iii=maxpage
end if

if requestpage > 5 then
if Request("search")="" then
Response.Write "<a href=index.asp?p=1>1</a> ... "
else
Response.Write "<a href=index.asp?p=1&snr="&snr&"&stype="&stype&"&search=ture>1</a> ... "
end if
end if

for ai=ii to iii
if ai<>requestpage then
if Request("search")="" then
Response.Write "<a href=index.asp?p="&ai&">"&ai&"</a> "
else
Response.Write "<a href=index.asp?p="&ai&"&snr="&snr&"&stype="&stype&"&search=ture>"&ai&"</a> "
end if
else
Response.Write "<font color=#FF6633>"&ai&"</font> "
end if
Next

if maxpage > requestpage+4 then
if Request("search")="" then
Response.Write "...<a href=index.asp?p="&maxpage&">"&maxpage&"</a> "
else
Response.Write "...<a href=index.asp?p="&maxpage&"&snr="&snr&"&stype="&stype&"&search=ture>"&maxpage&"</a> "
end if
end if
END Function

Function SqlType
if Request("search")="" then
Set Rs = Server.CreateObject("ADODB.Recordset")
Sql = "Select * From gb Order BY top desc, id DESC "
Rs.Open Sql,conn,1,1
else
snr=Request("snr")
stype=Request("stype")
   if snr="" then
     if Request("search")="myliuyan" then
	 response.write "<script language='javascript'>"
     response.write "alert('对不起,你没有留言或者Cookies过期!');"
     response.write "history.go(-1);"
     response.write "</script>"
     response.end
	 else
     response.write "<script language='javascript'>"
     response.write "alert('你没有输入任何搜索内容!');"
     response.write "history.go(-1);"
     response.write "</script>"
     response.end
	 end if
   end if
  if stype<>"" then
  Set Rs = Server.CreateObject("ADODB.Recordset")
  Sql = "Select * From gb where "&stype&" like '%" &snr& "%' Order BY top desc, id DESC "
  Rs.Open Sql,conn,1,1
  else
  Set Rs = Server.CreateObject("ADODB.Recordset")
  Sql = "Select * From gb where name like '%" &snr& "%' or content like '%" &snr& "%' or title like '%" &snr& "%' Order BY top desc, id DESC "
  Rs.Open Sql,conn,1,1
  end if
end if
End Function
%>

⌨️ 快捷键说明

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