📄 default.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<%
dim rs,sql
dim classid
dim classname
classid=request("classid")
set rs1=server.createobject("adodb.recordset")
call getConst()
%>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<meta HTTP-EQUIV="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="<%=NetName%>,<%=NetUrl%>">
<LINK href="style.css" rel=stylesheet>
<title><%=NetName%>|<%=NetUrl%></title>
<script src="alt.js"></script>
<script src="popwin2.js"></script>
</head>
<body <%=BodyVar%>>
<table width="95%" border="0" align=center>
<tr>
<td width="26%"><%=Logo%></td>
<td width="56%"><%=ads%></td>
<td width="18%" align="center" valign="middle">
<table width="100%" border="0">
<tr>
<td valign="middle"><img src="pic/open.gif" width="14" height="15" align="absmiddle">
<a href="javascript:window.external.AddFavorite('<%=NetUrl%>',%20'<%=NetName%>')">添加收藏</a>
</td>
</tr>
<tr>
<td valign="middle"><img src="pic/home.gif" width="16" height="16" align="absmiddle">
<a href="#" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('<%=NetUrl%>');">设为首页</a>
</td>
</tr>
<tr>
<td valign="middle"><img src="pic/mail.gif" width="14" height="15" align="absmiddle">
<a href="mailto:<%=Email%>">联系方式</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<TABLE cellSpacing=0 cellPadding=0 width="95%" border=0 align=center>
<TBODY>
<TR>
<TD bgColor="<%=Tablebackcolor%>">
<TABLE cellSpacing=1 cellPadding=4 width="100%" border=0>
<TR>
<TD bgColor="<%=Tablebodycolor%>">
<%
sql="select class,classid from Aclass"
Set rs=conn.execute (sql)
if rs.eof and rs.bof then
response.write "还没有任何栏目"
else
GetUnid = rs(1)
do while not rs.eof
%>| <a href="default.asp?classid=<%=rs("classid")%>"><%if cint(rs("classid"))=cint(classid) then%><font color=red><%=rs("class")%></font><%else%><%=rs("class")%><%end if%></a> |
<%
rs.movenext
loop
end if
rs.close
%>
</TD></TR>
<TR>
<TD bgColor="<%=Tablebody1color%>">
<%
if GetUnid<>"" then
if classid<>"" then
sql = "select Nclass,Nclassid from ANclass where classID="&classid
else
sql = "select Nclass,Nclassid from ANclass where classID="&GetUnid
end if
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "还没有任何栏目"
else
do while not rs.eof
%><a href="index.asp?classid=<%=classid%>&Nclassid=<%=rs("Nclassid")%>"><%=rs("Nclass")%></a>
<%
rs.movenext
loop
end if
rs.close
else
response.write "还没有任何栏目"
end if
%>
</TD></TR>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<div align="center">
<table border="0" width=95% align=center cellspacing="0" cellpadding="1">
<tr>
<td valign="top" width="25%">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 align=center>
<TBODY>
<TR>
<TD bgColor="<%=Tablebackcolor%>">
<TABLE cellSpacing=1 cellPadding=4 width="100%" border=0>
<TR>
<TD bgColor="<%=Tablebodycolor%>"><b>近期热门文章</b>
</TD></TR>
<TR>
<TD bgColor="<%=Tablebody1color%>">
<font style=line-height:150%>
<%
sql="SELECT top 10 * FROM article order by hits desc"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.write "无更新文章"
else
do while not rs.eof
%>
<font face=Wingdings color=<%=Tablebodycolor%> size=2>v</font> <a href="list.asp?id=<%=rs("articleid")%>" onmouseover="showPopupText" alt="<%=rs("title")%>" target=_top><%if len(rs("title"))>16 then%><%=left(rs("title"),16)%>...<%else%><%=rs("title")%><%end if%></a>[<font color=red><%=rs("hits")%></font>]<br>
<%
rs.movenext
loop
end if
rs.close
%>
</font>
</TD></TR>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top" width="2%">
</td>
<td width="71%" valign="top">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 align=center>
<TBODY>
<TR>
<TD bgColor="<%=Tablebackcolor%>">
<TABLE cellSpacing=1 cellPadding=4 width="100%" border=0>
<TR>
<TD bgColor="<%=Tablebodycolor%>"><B>最新文章</B> </TD>
</TR>
<TR>
<TD bgColor="<%=Tablebody1color%>">
<font style=line-height:150%>
<%
if classid<>"" then
sql = "SELECT top 10 [article].[articleid], [article].[title], [article].[dateandtime], [article].[hits], [article].[classid], [article].[Nclassid], [ANclass].[Nclass] FROM ANclass INNER JOIN article ON [ANclass].[Nclassid]=[article].[Nclassid] where article.classid = " & Classid & " ORDER BY [article].[articleid] DESC"
else
sql = "SELECT top 10 [article].[articleid], [article].[title], [article].[dateandtime], [article].[hits], [article].[classid], [article].[Nclassid], [ANclass].[Nclass] FROM ANclass INNER JOIN article ON [ANclass].[Nclassid]=[article].[Nclassid] WHERE [article].[Nclassid]=[ANclass].[Nclassid] ORDER BY [article].[articleid] DESC"
end if
rs.open sql,conn,1,1
if rs.eof and rs.bof then
%>
没有或没有找到任何文章
<%else%>
<%do while not rs.eof%>
<font face=Wingdings color=<%=Tablebodycolor%>>v</font>[<a href='index.asp?classid=<%=rs("classid")%>&Nclassid=<%=rs("Nclassid")%>'><%=rs("Nclass")%></a>]
<a href="list.asp?id=<%=rs("articleid")%>" onmouseover="showPopupText" title="<%=rs("title")%>"><%=rs("title")%></a>
(<%if rs("dateandtime")=date() then%><font color=red><%=month(rs("dateandtime"))%>月<%=day(rs("dateandtime"))%>日</font><%else%><font color='#999999'><%=month(rs("dateandtime"))%>月<%=day(rs("dateandtime"))%>日</font><%end if%>,<font color=green><%=rs("hits")%></font>)
<br>
<%
rs.movenext
loop
end if
rs.close
%>
</font>
</TD></TR>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 align=center>
<TBODY>
<TR>
<TD bgColor="<%=Tablebackcolor%>">
<TABLE cellSpacing=1 cellPadding=4 width="100%" border=0>
<TR>
<TD bgColor="<%=Tablebodycolor%>"><B>栏目分类导航</B>
</TD></TR>
<TR>
<TD bgColor="<%=Tablebody1color%>">
<font style=line-height:150%>
<%
sql="select class,classid from Aclass"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.write "没有任何分类"
else
do while not rs.eof
%>
<a href="default.asp?classid=<%=rs("classid")%>"><%=rs("class")%></a><br>
<%
sql1="select Nclass,Nclassid,classid from ANclass where classid="&rs("classid")
rs1.open sql1,conn,1,1
do while not rs1.eof
%><a href="index.asp?classid=<%=rs1("classid")%>&Nclassid=<%=rs1("Nclassid")%>"><%=rs1("Nclass")%></a>
<%
rs1.movenext
loop
rs1.close
%>
<br><br>
<%
rs.movenext
loop
end if
rs.close
conn.close
set conn=nothing
%>
</font>
</TD></TR>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</div>
<!--#include file="copyright.inc" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -