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

📄 item.asp

📁 一个ASP网站博克程序
💻 ASP
📖 第 1 页 / 共 2 页
字号:
			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") %> &nbsp;|&nbsp; 作者:<% = objDBMS.objRSET("MemberUID") %> &nbsp;|&nbsp; 阅读:<% = objDBMS.objRSET("ItemNUM") %> &nbsp;|&nbsp; 评论:<% 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>&nbsp;<br><a href="Item.asp?id=<% = objDBMS.objRSET("ItemID") %>">阅读全部内容...</a></td><%
					%></tr><%
					%></table><%
					%><br>&nbsp;<br><%
					objDBMS.objRSET.MoveNext
				Next
				If intPage > 1 Then
					%><a href="Month.asp?page=1&year=<% = intYear %>&month=<% = intMonth %>">首页</a>&nbsp; <a href="Month.asp?page=<% = intPage - 1 %>&year=<% = intYear %>&month=<% = intMonth %>">上一页</a>&nbsp; <%
				Else
					%>首页&nbsp; 上一页&nbsp; <%
				End If
				If intPage > 6 Then
					%>...&nbsp; <%
				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>&nbsp; <%
					End If
				Next 
				If intPage < objDBMS.objRSET.PageCount - 5 Then
					%>...&nbsp; <%
				End If
				If intPage < objDBMS.objRSET.PageCount Then
					%><a href="Month.asp?page=<% = intPage + 1 %>&year=<% = intYear %>&month=<% = intMonth %>">下一页</a>&nbsp; <a href="Month.asp?page=<% = objDBMS.objRSET.PageCount %>&year=<% = intYear %>&month=<% = intMonth %>">尾页</a><%
				Else
					%>下一页&nbsp; 尾页<%
				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") %> &nbsp;|&nbsp; 作者:<% = objDBMS.objRSET("MemberUID") %> &nbsp;|&nbsp; 阅读:<% = objDBMS.objRSET("ItemNUM") %> &nbsp;|&nbsp; 评论:<% 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>&nbsp;<br><a href="Item.asp?id=<% = objDBMS.objRSET("ItemID") %>">阅读全部内容...</a></td><%
					%></tr><%
					%></table><%
					%><br>&nbsp;<br><%
					objDBMS.objRSET.MoveNext
				Next
				If intPage > 1 Then
					%><a href="Category.asp?id=<% = intCat %>&page=1">首页</a>&nbsp; <a href="Category.asp?id=<% = intCat %>&page=<% = intPage - 1 %>">上一页</a>&nbsp; <%
				Else
					%>首页&nbsp; 上一页&nbsp; <%
				End If
				If intPage > 6 Then
					%>...&nbsp; <%
				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>&nbsp; <%
					End If
				Next 
				If intPage < objDBMS.objRSET.PageCount - 5 Then
					%>...&nbsp; <%
				End If
				If intPage < objDBMS.objRSET.PageCount Then
					%><a href="Category.asp?id=<% = intCat %>&page=<% = intPage + 1 %>">下一页</a>&nbsp; <a href="Category.asp?id=<% = intCat %>&page=<% = objDBMS.objRSET.PageCount %>">尾页</a><%
				Else
					%>下一页&nbsp; 尾页<%
				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") %> &nbsp;|&nbsp; 作者:<% = objDBMS.objRSET("MemberUID") %> &nbsp;|&nbsp; 阅读:<% = objDBMS.objRSET("ItemNUM") %> &nbsp;|&nbsp; 评论:<% 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>&nbsp;<br><a href="Item.asp?id=<% = objDBMS.objRSET("ItemID") %>">阅读全部内容...</a></td><%
					%></tr><%
					%></table><%
					%><br>&nbsp;<br><%
					objDBMS.objRSET.MoveNext
				Next
				If intPage > 1 Then
					%><a href="Search.asp?keyword=<% = strKey %>&page=1">首页</a>&nbsp; <a href="Search.asp?keyword=<% = strKey %>&page=<% = intPage - 1 %>">上一页</a>&nbsp; <%
				Else
					%>首页&nbsp; 上一页&nbsp; <%
				End If
				If intPage > 6 Then
					%>...&nbsp; <%
				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>&nbsp; <%
					End If
				Next 
				If intPage < objDBMS.objRSET.PageCount - 5 Then
					%>...&nbsp; <%
				End If
				If intPage < objDBMS.objRSET.PageCount Then
					%><a href="Search.asp?keyword=<% = strKey %>&page=<% = intPage + 1 %>">下一页</a>&nbsp; <a href="Search.asp?keyword=<% = strKey %>&page=<% = objDBMS.objRSET.PageCount %>">尾页</a><%
				Else
					%>下一页&nbsp; 尾页<%
				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") %> &nbsp;|&nbsp; 作者:<% = objDBMS.objRSET("MemberUID") %> &nbsp;|&nbsp; 阅读:<% = objDBMS.objRSET("ItemNUM") %> &nbsp;|&nbsp; 评论:<% 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>&nbsp;<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 + -