📄 item.asp
字号:
End If
objDBMS.Close
Set objDBMS = Nothing
End Sub
'日志按月显示列表
Public Sub ItemMonth(strSQL, intPage, intYear, intMonth)
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="Month.asp?page=1&year=<% = intYear %>&month=<% = intMonth %>">首页</a> <a href="Month.asp?page=<% = intPage - 1 %>&year=<% = intYear %>&month=<% = intMonth %>">上一页</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="Month.asp?page=<% = intCount %>&year=<% = intYear %>&month=<% = intMonth %>"><% = intCount %></a> <%
End If
Next
If intPage < objDBMS.objRSET.PageCount - 5 Then
%>... <%
End If
If intPage < objDBMS.objRSET.PageCount Then
%><a href="Month.asp?page=<% = intPage + 1 %>&year=<% = intYear %>&month=<% = intMonth %>">下一页</a> <a href="Month.asp?page=<% = objDBMS.objRSET.PageCount %>&year=<% = intYear %>&month=<% = intMonth %>">尾页</a><%
Else
%>下一页 尾页<%
End If
End If
objDBMS.Close
Set objDBMS = Nothing
End Sub
'日志分类显示列表
Public Sub ItemCategory(strSQL, intCat, 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="Category.asp?id=<% = intCat %>&page=1">首页</a> <a href="Category.asp?id=<% = intCat %>&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="Category.asp?id=<% = intCat %>&page=<% = intCount %>"><% = intCount %></a> <%
End If
Next
If intPage < objDBMS.objRSET.PageCount - 5 Then
%>... <%
End If
If intPage < objDBMS.objRSET.PageCount Then
%><a href="Category.asp?id=<% = intCat %>&page=<% = intPage + 1 %>">下一页</a> <a href="Category.asp?id=<% = intCat %>&page=<% = objDBMS.objRSET.PageCount %>">尾页</a><%
Else
%>下一页 尾页<%
End If
End If
objDBMS.Close
Set objDBMS = Nothing
End Sub
'日志搜索显示列表
Public Sub ItemResult(strSQL, strKey, 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="Search.asp?keyword=<% = strKey %>&page=1">首页</a> <a href="Search.asp?keyword=<% = strKey %>&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="Search.asp?keyword=<% = strKey %>&page=<% = intCount %>"><% = intCount %></a> <%
End If
Next
If intPage < objDBMS.objRSET.PageCount - 5 Then
%>... <%
End If
If intPage < objDBMS.objRSET.PageCount Then
%><a href="Search.asp?keyword=<% = strKey %>&page=<% = intPage + 1 %>">下一页</a> <a href="Search.asp?keyword=<% = strKey %>&page=<% = objDBMS.objRSET.PageCount %>">尾页</a><%
Else
%>下一页 尾页<%
End If
End If
objDBMS.Close
Set objDBMS = Nothing
End Sub
'阅读统计
Public Sub ItemCount(intItem)
Dim objDBMS
Set objDBMS = New LarrixDBMS
objDBMS.Open "SELECT [ItemNUM] FROM [Items] WHERE [ItemID]=" & intItem, 3
If Not (objDBMS.objRSET.BOF And objDBMS.objRSET.EOF) Then
objDBMS.objRSET("ItemNUM").Value = objDBMS.objRSET("ItemNUM") + 1
objDBMS.objRSET.Update
End If
objDBMS.Close
Set objDBMS = Nothing
End Sub
'阅读日志
Public Sub ItemSelect(intItem)
Dim objDBMS
Dim objComment
Set objDBMS = New LarrixDBMS
objDBMS.Open "SELECT [Items].*,[Members].[MemberUID],[Categories].[CategoryLAB] FROM [Items],[Members],[Categories] WHERE [Items].[MemberID]=[Members].[MemberID] AND [Items].[CategoryID]=[Categories].[CategoryID] AND [ItemID]=" & intItem & " AND [ItemHID]=0", 1
If Not (objDBMS.objRSET.BOF And objDBMS.objRSET.EOF) Then
objItem.ItemCount objDBMS.objRSET("ItemID")
%><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"><% = objDBMS.objRSET("ItemVAL") %></td><%
%></tr><%
%></table><%
If objDBMS.objRSET("ItemLOC") = False Then
%><br> <br><%
Set objComment = New Comment
objComment.Comment Trim(Request.QueryString("id"))
Set objComment = Nothing
End If
End If
Set objDBMS = Nothing
End Sub
End Class
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -