你看看我的源文件把!谢谢~!
<!--#include file="conn.asp"-->
<!--#include file="function.asp"-->
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
body {
background-image: url(image/bg.jpg);
}
.STYLE4 {
font-size: 36pt;
font-family: "楷体_GB2312";
color: #993300;
}
.STYLE6 {font-size: 12px}
-->
</style><table width="850" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="844" height="140" valign="top"><span class="STYLE4">枫的季节</span></td>
</tr>
</table>
<table width="850" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="639" height="37" valign="top"><!--DWLayoutEmptyCell--> </td>
<td width="66" valign="top">
<div align="center">首页</div></td>
<td width="66" valign="top">
<div align="center">最新文章</div></td>
<td width="61" valign="top">
<div align="center" ><a href="landing.asp"> 登陆</a></div></td>
</tr>
</table>
<table width="850" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="162" height="436" valign="top"><table width="162" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="162" height="24"><span class="STYLE6">文章分类</span></td>
</tr>
</table>
<table width="161" border="0" cellpadding="0" cellspacing="0">
<%
set rs=server.CreateObject("ADODB.Recordset")
sql="select * from Diary_List"
rs.open sql,conn,1,1
%>
<% do while not rs.eof %>
<tr>
<td width="161" height="27"><a href="diary.asp?Diary_List_Id=<%=rs("Diary_List_Id")%>"><%=title(rs("Diary_List_Title"))%></a></td>
</tr>
<% rs.movenext
loop
%>
</table>
<% if session("People_Name")<>"" then %>
<table width="162" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="162" height="22">用户面板</td>
</tr>
<tr>
<td height="136" valign="top">
<p align="center">用户登陆:<%=session("People_Name")%></p>
<p align="center"><a href="user_news.asp?People_Id=<%=session("People_Id")%>">修改资料:</p>
<p align="center"><a href="goout.asp">推出登陆:</p>
</tr>
</table>
<% end if %>
<table width="163" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="163" height="27">最新日志</td>
</tr>
</table>
<table width="163" border="0" cellpadding="0" cellspacing="0">
<%
set rst=server.CreateObject("ADODB.Recordset")
sqt="select * from Diary order by Diary_Time desc"
rst.open sqt,conn,1,3
%>
<%
m=1
do while not rst.eof
if m>7 then
exit do
end if
%>
<tr>
<td width="163" height="30"> <a href="article.asp?Diary_Id=<%=rst("Diary_Id")%>"><%=title(rst("Diary_Title"))%></a></td>
</tr>
<%
m=m+1
rst.movenext
loop
%>
</table>
<table width="163" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="163" height="28">最新评论</td>
</tr>
</table>
<table width="163" border="0" cellpadding="0" cellspacing="0">
<%
set rsx=server.CreateObject("ADODB.Recordset")
sqx="select * from Review order by Review_Time desc"
rsx.open sqx,conn,1,3
%>
<%
x=1
do while not rsx.eof
if x>7 then
exit do
end if
%>
<tr>
<td width="163" height="28"> <a href="article.asp?Diary_Id=<%=rsx("Diary_Id")%>"><%=title(rsx("Review_Content"))%></a></td>
</tr>
<%
x=x+1
rsx.movenext
loop
%>
</table>
<table width="160" border="0" cellpadding="0" cellspacing="0">
<%
set rsw=server.CreateObject("ADODB.Recordset")
sqlw="select count(*) as counts from Diary"
rsw.open sqlw,conn,1,1 %>
<%
set rsc=server.CreateObject("ADODB.Recordset")
sqlc="select count(*) as counts from Review"
rsc.open sqlc,conn,1,1 %>
<%
set rsp=server.CreateObject("ADODB.Recordset")
sqlp="select count(*) as counts from People"
rsp.open sqlp,conn,1,1 %>
<tr>
<td height="21">用户统计</td>
</tr>
<tr>
<td height="29">日志; <%=rsw("counts")%></td>
</tr>
<tr>
<td height="32">评论; <%=rsc("counts")%></td>
</tr>
<tr>
<td height="31"> <a href="user.asp">用户; <%=rsp("counts")%></a></td>
</tr>
</table></td>
<td width="651" valign="top"><table width="660" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="660" height="24"> </td>
</tr>
</table>
<table width="658" border="0" cellpadding="0" cellspacing="0">
<%
set rss=server.CreateObject("ADODB.Recordset")
sqll="select * from Diary_People order by Diary_Time desc"
'sqll="select * from diary"
rss.open sqll,conn,1,3
rss.pagesize=20
if rss.eof then
rss_total=0
else
rss_total=rss.recordcount
end if
dim pageno
maxpage=rss.pagecount
getpageno=(request.QueryString("pageno"))
if request.QueryString("pageno")="" then
pageno=1
else
if request.QueryString("pageno")>rss_total then
pageno=rss_total
end if
pageno=getpageno
end if
if not rss.eof then
rss.absolutepage=pageno
end if
%>
<tr>
<td width="658" height="26"><%for i=1 to maxpage%>
<a href="liuyan.asp?pageno=<%=i%>"><%=i%></a>
<% next %> </td>
</tr>
</table>
<table width="658" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="4"> </td>
</tr>
<% i=1
do while not rss.eof
if i>rss.pagesize then
exit do
end if
%>
<tr>
<td width="112" height="30"><a href="diary.asp?Diary_List_Id=<%=rss("Diary_List_Id")%>"><%=rss("Diary_List_Title")%></a></td>
<td width="320"> <a href="article.asp?Diary_Id=<%=rss("Diary_Id")%>"><%=title(rss("Diary_Title"))%></a></td>
<td width="97"> <a href="user_news.asp?People_Id=<%=rss("People_Id")%>"><%=rss("People_Name")%></a></td>
<td width="129"> <%=rss("Diary_Time")%></td>
</tr>
<%
i=i+1
rss.movenext
loop
%>
</table></td>
<td width="37" valign="top"><!--DWLayoutEmptyCell--> </td>
</tr>
</table>