📄 item.asp
字号:
<%
Class Items
'内容搜索界面
Public Sub ItemSearch()
%><table width="190" cellpadding="0" cellspacing="0" border="0"><%
%><caption class="guider"><li type="square">搜索引擎</li></caption><%
%><form name="search" action="Search.asp" method="get" onsubmit="return (search.keyword.value!='');"><%
%><tr align="left" valign="middle"><%
%><td width="100%" class="guider">关键字(必填):</td><%
%></tr><%
%><tr align="left" valign="middle"><%
%><td width="100%" class="guider"><input type="text" name="keyword" size="20" maxlength="50"></td><%
%></tr><%
%><tr align="left" valign="middle"><%
%><td width="100%" class="guider"><input type="submit" value="搜索" class="button"></td><%
%></tr><%
%></form><%
%></table><%
End Sub
'日志显示列表
Public Sub ItemList(strSQL, intPage)
Dim objDBMS
Dim objComment
Dim intCount
Set objDBMS = New LarrixDBMS
objDBMS.Open strSQL, 1
If objDBMS.objRSET.BOF And objDBMS.objRSET.EOF Then
%><table width="580" cellpadding="0" cellspacing="0" border="0"><%
%><tr align="left" valign="middle"><%
%><td width="100%" class="ground">当前还没有任何日志!</td><%
%></tr><%
%></table><%
Else
objDBMS.objRSET.PageSize = 25
If Trim(Request.QueryString("page")) = "" Or IsNumeric(Trim(Request.QueryString("page"))) = False Then
intPage = 1
Else
intPage = CInt(Trim(Request.QueryString("page")))
If intPage < 1 Then
intPage = 1
End If
If intPage > objDBMS.objRSET.PageCount Then
intPage = objDBMS.objRSET.PageCount
End If
End If
objDBMS.objRSET.AbsolutePage = intPage
For intCount = 1 To objDBMS.objRSET.PageSize
If objDBMS.objRSET.EOF Then
Exit For
End If
%><table width="580" cellpadding="0" cellspacing="0" border="0"><%
%><tr align="left" valign="middle"><%
%><td width="100%" class="weblog"><% = objDBMS.objRSET("ItemDTM") %>:<% = objDBMS.objRSET("ItemLAB") %></td><%
%></tr><%
%><tr align="left" valign="middle"><%
%><td width="100%" class="ground">分类:<% = objDBMS.objRSET("CategoryLAB") %> | 作者:<% = objDBMS.objRSET("MemberUID") %> | 阅读:<% = objDBMS.objRSET("ItemNUM") %> | 评论:<% Set objComment = New Comment %><% = objComment.CommentCount(objDBMS.objRSET("ItemID")) %><% Set objComment = Nothing %></td><%
%></tr><%
%><tr align="left" valign="middle"><%
%><td width="100%" class="ground"><% = Left(objDBMS.objRSET("ItemVAL"), 250) %><br> <br><a href="Item.asp?id=<% = objDBMS.objRSET("ItemID") %>">阅读全部内容...</a></td><%
%></tr><%
%></table><%
%><br> <br><%
objDBMS.objRSET.MoveNext
Next
If intPage > 1 Then
%><a href="Default.asp?page=1">首页</a> <a href="Default.asp?page=<% = intPage - 1 %>">上一页</a> <%
Else
%>首页 上一页 <%
End If
If intPage > 6 Then
%>... <%
End If
For intCount = intPage - 5 To intPage + 5
If intCount >= 1 And intCount <= objDBMS.objRSET.PageCount Then
%><a href="Default.asp?page=<% = intCount %>"><% = intCount %></a> <%
End If
Next
If intPage < objDBMS.objRSET.PageCount - 5 Then
%>... <%
End If
If intPage < objDBMS.objRSET.PageCount Then
%><a href="Default.asp?page=<% = intPage + 1 %>">下一页</a> <a href="Default.asp?page=<% = objDBMS.objRSET.PageCount %>">尾页</a><%
Else
%>下一页 尾页<%
End If
End If
objDBMS.Close
Set objDBMS = Nothing
End Sub
'日至订阅列表
Public Sub RSS1(strSQL, intPage)
Dim objDBMS
Dim intCount
Response.CharSet = "gb2312"
Response.ContentType = "text/xml"
%><?xml version="1.0" encoding="gb2312" ?><%
%><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns="http://purl.org/rss/1.0/"><%
%><channel rdf:about="http://www.larry.net.cn/"><%
%><title>欢迎光临 Larrix BLOG 官方网站</title><%
%><description>Larrix BLOG 官方网站 日志订阅列表</description><%
%><link>http://www.larry.net.cn/</link><%
%><dc:language>zh-cn</dc:language><%
%><dc:creator>Larry Studio</dc:creator><%
%><items><%
%><rdf:Seq><%
Set objDBMS = New LarrixDBMS
objDBMS.Open strSQL, 1
If Not (objDBMS.objRSET.BOF And objDBMS.objRSET.EOF) Then
objDBMS.objRSET.PageSize = 25
If Trim(Request.QueryString("page")) = "" Or IsNumeric(Trim(Request.QueryString("page"))) = False Then
intPage = 1
Else
intPage = CInt(Trim(Request.QueryString("page")))
If intPage < 1 Then
intPage = 1
End If
If intPage > objDBMS.objRSET.PageCount Then
intPage = objDBMS.objRSET.PageCount
End If
End If
objDBMS.objRSET.AbsolutePage = intPage
For intCount = 1 To objDBMS.objRSET.PageSize
If objDBMS.objRSET.EOF Then
Exit For
End If
%><item rdf:about="http://www.larry.net.cn/Item.asp?id=<% = objDBMS.objRSET("ItemID") %>"><%
%><title><% = objDBMS.objRSET("ItemLAB") %></title><%
%><dc:pubdate><% = objDBMS.objRSET("ItemDTM") %></dc:pubdate><%
%><dc:category><% = objDBMS.objRSET("CategoryLAB") %></dc:category><%
%><dc:author><% = objDBMS.objRSET("MemberUID") %></dc:author><%
%><link>http://www.larry.net.cn/Item.asp?id=<% = objDBMS.objRSET("ItemID") %></link><%
%></item><%
objDBMS.objRSET.MoveNext
Next
End If
objDBMS.Close
Set objDBMS = Nothing
%></rdf:Seq><%
%></items><%
%></channel><%
%></rdf:RDF><%
End Sub
'日至订阅列表
Public Sub RSS2(strSQL, intPage)
Dim objDBMS
Dim intCount
Response.CharSet = "gb2312"
Response.ContentType = "text/xml"
%><?xml version="1.0" encoding="gb2312" ?><%
%><rss version="2.0"><%
%><channel><%
%><title>欢迎光临 Larrix BLOG 官方网站</title><%
%><description>Larrix BLOG 官方网站 日志订阅列表</description><%
%><link>http://www.larry.net.cn/</link><%
%><language>zh-cn</language><%
%><docs>Larrix BLOG 官方网站 日志列表订阅中心</docs><%
%><generator>Larry Studio 设计制作</generator><%
Set objDBMS = New LarrixDBMS
objDBMS.Open strSQL, 1
If Not (objDBMS.objRSET.BOF And objDBMS.objRSET.EOF) Then
objDBMS.objRSET.PageSize = 25
If Trim(Request.QueryString("page")) = "" Or IsNumeric(Trim(Request.QueryString("page"))) = False Then
intPage = 1
Else
intPage = CInt(Trim(Request.QueryString("page")))
If intPage < 1 Then
intPage = 1
End If
If intPage > objDBMS.objRSET.PageCount Then
intPage = objDBMS.objRSET.PageCount
End If
End If
objDBMS.objRSET.AbsolutePage = intPage
For intCount = 1 To objDBMS.objRSET.PageSize
If objDBMS.objRSET.EOF Then
Exit For
End If
%><item><%
%><title><% = objDBMS.objRSET("ItemLAB") %></title><%
%><pubdate><% = objDBMS.objRSET("ItemDTM") %></pubdate><%
%><category><% = objDBMS.objRSET("CategoryLAB") %></category><%
%><author><% = objDBMS.objRSET("MemberUID") %></author><%
%><link>http://www.larry.net.cn/Item.asp?id=<% = objDBMS.objRSET("ItemID") %></link><%
%></item><%
objDBMS.objRSET.MoveNext
Next
End If
objDBMS.Close
Set objDBMS = Nothing
%></channel><%
%></rss><%
End Sub
'日志按天显示列表
Public Sub ItemDay(strSQL, intPage, intYear, intMonth, intDay)
Dim objDBMS
Dim objComment
Dim intCount
Set objDBMS = New LarrixDBMS
objDBMS.Open strSQL, 1
If objDBMS.objRSET.BOF And objDBMS.objRSET.EOF Then
%><table width="580" cellpadding="0" cellspacing="0" border="0"><%
%><tr align="left" valign="middle"><%
%><td width="100%" class="ground">当前还没有任何日志!</td><%
%></tr><%
%></table><%
Else
objDBMS.objRSET.PageSize = 25
If Trim(Request.QueryString("page")) = "" Or IsNumeric(Trim(Request.QueryString("page"))) = False Then
intPage = 1
Else
intPage = CInt(Trim(Request.QueryString("page")))
If intPage < 1 Then
intPage = 1
End If
If intPage > objDBMS.objRSET.PageCount Then
intPage = objDBMS.objRSET.PageCount
End If
End If
objDBMS.objRSET.AbsolutePage = intPage
For intCount = 1 To objDBMS.objRSET.PageSize
If objDBMS.objRSET.EOF Then
Exit For
End If
%><table width="580" cellpadding="0" cellspacing="0" border="0"><%
%><tr align="left" valign="middle"><%
%><td width="100%" class="weblog"><% = objDBMS.objRSET("ItemDTM") %>:<% = objDBMS.objRSET("ItemLAB") %></td><%
%></tr><%
%><tr align="left" valign="middle"><%
%><td width="100%" class="ground">分类:<% = objDBMS.objRSET("CategoryLAB") %> | 作者:<% = objDBMS.objRSET("MemberUID") %> | 阅读:<% = objDBMS.objRSET("ItemNUM") %> | 评论:<% Set objComment = New Comment %><% = objComment.CommentCount(objDBMS.objRSET("ItemID")) %><% Set objComment = Nothing %></td><%
%></tr><%
%><tr align="left" valign="middle"><%
%><td width="100%" class="ground"><% = Left(objDBMS.objRSET("ItemVAL"), 250) %><br> <br><a href="Item.asp?id=<% = objDBMS.objRSET("ItemID") %>">阅读全部内容...</a></td><%
%></tr><%
%></table><%
%><br> <br><%
objDBMS.objRSET.MoveNext
Next
If intPage > 1 Then
%><a href="Day.asp?page=1&year=<% = intYear %>&month=<% = intMonth %>&day=<% = intDay %>">首页</a> <a href="Day.asp?page=<% = intPage - 1 %>&year=<% = intYear %>&month=<% = intMonth %>&day=<% = intDay %>">上一页</a> <%
Else
%>首页 上一页 <%
End If
If intPage > 6 Then
%>... <%
End If
For intCount = intPage - 5 To intPage + 5
If intCount >= 1 And intCount <= objDBMS.objRSET.PageCount Then
%><a href="Day.asp?page=<% = intCount %>&year=<% = intYear %>&month=<% = intMonth %>&day=<% = intDay %>"><% = intCount %></a> <%
End If
Next
If intPage < objDBMS.objRSET.PageCount - 5 Then
%>... <%
End If
If intPage < objDBMS.objRSET.PageCount Then
%><a href="Day.asp?page=<% = intPage + 1 %>&year=<% = intYear %>&month=<% = intMonth %>&day=<% = intDay %>">下一页</a> <a href="Day.asp?page=<% = objDBMS.objRSET.PageCount %>&year=<% = intYear %>&month=<% = intMonth %>&day=<% = intDay %>">尾页</a><%
Else
%>下一页 尾页<%
End If
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -