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

📄 index.asp

📁 结合了某度和AH的个人主页 功能比较完整
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
on error resume next
set rs = server.createobject("adodb.recordset")
sql = "select * from config"
rs.open sql,conn,1,1

ititle = rs("title")
ihomepage = rs("homepage")
iurl = rs("url")
imax = rs("max")
ipagesize = rs("pagesize")
itoday = rs("today")
idate = rs("date")
ibottom = rs("bottom")
iqqshow = rs("qqshow")

if date <> idate then
rs("today") = 0
end if
rs("date") = date
rs.update

rs.close

sql = "select * from content order by id desc"
rs.open sql,conn,1,1

ipage = 0

if rs.pagecount > 0 then
rs.pagesize = ipagesize
ipage = request("page")
if ( ipage - rs.pagecount ) > 0 then
ipage = rs.pagecount
elseif ipage = "" or ipage < 1 then
ipage = 1
end if
rs.absolutepage = ipage
end if
%>
<html>

<head>
<!--- The site is designed by Wind Song Studio --->
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet" type="text/css">
<title><%=ititle%></title>
<style type="text/css">
<!--
.style1 {color: #FCDFB5}
.a {
	font-family: Arial, Helvetica, sans-serif;
	color: #86540C;
	font-size: 12px;
	font-weight: normal;
	text-decoration: blink;
}
-->
</style>
</head>

<body bgcolor="#EEEEEE" topmargin="0" leftmargin="0" background="../img/dnacebg2.jpg">

<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="800">
    <tr>
      <td width="100"> </td>
      <td width="600" bgcolor="#cea772">
      <img border="0" src="images/main/top.jpg"></td>
      <td width="100"> </td>
    </tr>
  </table>
  </center>
</div>

<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="800" height="100%">
    <tr>
      <td width="100"> </td>
      <td width="600" bgcolor="#e4c59a" valign="top">
      <div align="center">
      <center>
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="580">
        <tr>
          <td width="100%" align="center" colspan="3">
          <table border="0" width="100%" cellspacing="0" cellpadding="0" height="34">
            <tr>
                        <td width="12%" align="center" height="34"><a href="../index.asp"><img border="0" src="../img/index.gif" align="absmiddle" width="50" height="20"></a></td>
                        <td width="12%" align="center" height="34"><a href="../diary/index.asp"><img border="0" src="../img/rj.gif" align="absmiddle" width="50" height="20"></a></td>
                        <td width="12%" align="center" height="34"><a href="../pic/index.asp"><img border="0" src="../img/xc.gif" align="absmiddle" width="50" height="20"></a></td>
                        <td width="12%" align="center" height="34"><a href="../music/index.asp"><img border="0" src="../img/y.gif" align="absmiddle" width="50" height="20"></a></td>
                        <td width="13%" align="center" height="34"><a href="../new/index.asp"><img src="../img/wen.jpg" width="50" height="20" border="0" align="absmiddle"></a></td>
                        <td width="13%" align="center" height="34"><a href="../down/index.asp"><img src="../img/xia.jpg" width="50" height="20" border="0" align="absmiddle"></a></td>
                        <td width="13%" align="center" height="34"><a href="index.asp"><img border="0" src="../img/gb.gif" align="absmiddle" width="50" height="20"></a></td>
                        <td width="13%" align="center" height="34"><a href="../link/index.asp"><img border="0" src="../img/link.gif" align="absmiddle" width="50" height="20"></a></td>
            </tr>
          </table>
          </td>
        </tr>
        <tr>
          <td width="100%" align="center">
          <img border="0" src="images/main/now.gif"></td>
          <td width="30%"><a href="new.asp"><img border="0" src="images/main/new.jpg"></a>
          </td>
          <td width="30%" align="center">
          <a href="new.asp">          </a>
          <a href="index.asp">
          <img border="0" src="images/main/list.jpg"></a>
          <a href="manage.asp">          </a></td>
          </tr>
      </table>
      </center>
      </div>
      <div align="center">
        <center>
      <table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="590">
        <tr>
          <td width="25%">
          <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#86540c" width="100%" height="20">
            <tr>
              <td width="33%" bgcolor="#cea772" align="center" bordercolor="#86540c"><%=rs.pagecount%>页</td>
              <td width="67%" bgcolor="#cea772" align="center" bordercolor="#86540c"><%=itoday%>新/<%=rs.recordcount%>条</td>
            </tr>
          </table>
          </td>
          <td width="40%">
<%
ifirst = ipage - 4
if ( rs.pagecount - ipage ) < 5 then ifirst = rs.pagecount - 9
if ( ipage - 5 ) < 0 then ifirst = 1
%>
          <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#86540c" width="240" height="20">
            <tr>
              <td bgcolor="#cea772" align="center" width="15" bordercolor="#86540c">
<%
if ipage <= 1 then
%>
              <img border="0" src="images/main/dislatest.gif">
<%
else
%>
              <a href="index.asp?page=<%=ipage - 1%>"><img border="0" src="images/main/latest.gif"></a>
<%
end if
%>
              </td>
<%
for i = 1 to 10
if ifirst = rs.pagecount + 1 then exit for
if ifirst - ipage = 0 then
%>
              <td width="20" bgcolor="#86540c" align="center" bordercolor="#86540c"><b><%=ifirst%></b> </td>
<%
else
%>
              <td width="20" bgcolor="#cea772" align="center" bordercolor="#86540c"><b><a href="index.asp?page=<%=ifirst%>"><%=ifirst%></a></b> </td>
<%
end if
ifirst = ifirst + 1
next
if i < 11 then
for j = i to 10
%>
              <td width="20" bgcolor="#cea772" align="center" bordercolor="#86540c"></td>
<%
next
end if
%>
              <td bgcolor="#cea772" align="center" width="15" bordercolor="#86540c">
<%
if ipage - rs.pagecount = 0 then
%>
              <img border="0" src="images/main/disearliest.gif">
<%
else
%>
              <a href="index.asp?page=<%=ipage + 1%>"><img border="0" src="images/main/earliest.gif"></a>
<%
end if
%>
              </td>
            </tr>
          </table>
          </td>
          <form method="post" action="index.asp" name="go">
          <td width="35%">跳转第 
          <input type="text" name="page" size="5" style="color: #cea772; height: 20; width: 20; background-color:#86540c"> 
          <input type="submit" value="GO" style="width: 20; height: 20; color: #86540c; font-size: 7pt; background-color: #cea772"></td></form>
        </tr>
      </table>
        </center>
      </div>
<%
i = 0
if not rs.eof then
do while not rs.eof
i = i + 1
if i > rs.pagesize then
exit do
end if
%>
      <div align="center">
        <center>
        <table border="0" cellpadding="2" cellspacing="1" style="border-collapse: collapse; border-style: solid; border-width: 1" bordercolor="#86540c" width="580" bgcolor="#cea772">
          <tr>
            <td width="25%" bgcolor="#86540c" align="center" bordercolor="#e4c59a"><%=rs("author")%></td>
            <td width="75%" bgcolor="#86540c" bordercolor="#e4c59a">
          <img border="0" src="images/main/now.gif"> <b class="style1">主题: <%=rs("title")%></b></td>  
          </tr>
          <tr>
            <td width="25%" bgcolor="#cea772" align="center" valign="top">
            <table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1" bgcolor="#cea772">
              <tr>
                <td width="100%" align="center" bgcolor="#e4c59a"><img border="0" src="images/face/<%=rs("face")%>.gif"></td>
              </tr>
              <tr>
                <td width="100%" align="center" bgcolor="#e4c59a">
<%
if rs("oicq") <> "" and rs("oicq") <> 0 then
%>
                <a href="http://search.tencent.com/cgi-bin/friend/user_show_info?ln=<%=rs("oicq")%>"><img border="0" src="images/main/oicq.gif"></a>
<%
else
%>
                <img border="0" src="images/main/oicq.gif">
<%
end if
%>
                </td>
              </tr>
              <tr>
                <td width="100%" align="center" bgcolor="#e4c59a">
<%
if rs("homepage") <> "" then
%>
                <a href="<%=rs("homepage")%>"><img border="0" src="images/main/homepage.gif"></a>
<%
else
%>
                <img border="0" src="images/main/homepage.gif">
<%
end if
%>
                </td>
              </tr>
              <tr>
                <td width="100%" align="center" bgcolor="#e4c59a">
<%
if rs("email") <> "" then
%>
                <a href="mailto:<%=rs("email")%>"><img border="0" src="images/main/email.gif"></a>
<%
else
%>
                <img border="0" src="images/main/email.gif">
<%
end if
%>
                </td>
              </tr>
<%
if session("admin") = "admin" then
%>
              <tr>
                <td width="100%" align="center" bgcolor="#e4c59a">
                <a href="reply.asp?id=<%=rs("id")%>"><img border="0" src="images/main/reply.gif"></a>
                </td>
              </tr>
              <tr>
                <td width="100%" align="center" bgcolor="#e4c59a">
                <a href="delete.asp?id=<%=rs("id")%>"><img border="0" src="images/main/delete.gif"></a>
                </td>
              </tr>
<%
end if
%> 

              <tr>
                <td width="100%" align="center" bgcolor="#e4c59a">
<%
if iqqshow = 1 then
if rs("oicq") <> "" and rs("oicq") <> 0 then
inumber = 9 - len(rs("oicq"))
for i = 1 to inumber
ishow = ishow & 0
next
ishow = ishow & rs("oicq")
%>
<table border="1" cellspacing="0" style="border-collapse: collapse" bordercolor="#86540c" width="140" id="AutoNumber2" height="227">
  <tr>
    <td width="100%" bgcolor="#cea772"><img border="0" src="http://qqshow-user.tencent.com/<%=ishow%>/10/00/"></td>
  </tr>
</table>
<%
end if
ishow = ""
end if
%>
                </td>
              </tr>
              </table>
            </td>
            <td width="75%" bgcolor="#cea772" valign="top">
            <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; table-layout: fixed" bordercolor="#111111" width="100%">
              <tr>
                <td width="5%" align="center" valign="top" rowspan="2" bgcolor="#fcdfb5">
                <img border="0" src="images/icon/<%=rs("icon")%>.gif"></td>
                <td width="95%" valign="top" bgcolor="#fcdfb5" class="a" ><%=rs("content")%><br>
                <font color="#86540c"><%=rs("time")%></font></td>
              </tr>
              <tr>
                <td width="95%" valign="top" bgcolor="#e4c59a" class="a">
<%
set rrs = server.createobject("adodb.recordset")
rsql = "select * from reply where topic = " & rs("id") & " order by id desc"
rrs.open rsql,conn,1,1
if not rrs.eof or rrs.bof then
do while not rrs.eof
%>
                <hr noshade color="#86540c" size="1" style="border-style: dotted; border-width: 1">
                <b>站长回复:</b><br>
                <%=rrs("content")%><br>
                <span class="a"><%=rrs("time")%></span>
<%  
rrs.movenext
loop
end if
rrs.close
set rrs = nothing
%>
                </td>
              </tr>
            </table>
            </td>
          </tr>
        </table>
        </center>
      </div>
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="10">
        <tr>
          <td width="100%"></td>
        </tr>
      </table>
<%
rs.movenext
loop
end if
%>
      </td>
      <td width="100"> </td>
    </tr>
  </table>
  </center>
</div>
<p align="center"> </p>
</body>

</html>
<%
rs.close
set rs = nothing
conn.close
set conn = nothing
%>

⌨️ 快捷键说明

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