3000首FLASH源程序

源代码在线查看: newslist.asp

软件大小: 743 K
上传用户: hslhsl123
关键词: FLASH 3000 源程序
下载地址: 免注册下载 普通下载 VIP

相关代码

				
				
								MaxPerPageCount=MaxPerPage*3
				typeid=request("typeid")
				if not isempty(request("page")) then
					currentPage=cint(request("page"))
				else
					currentPage=1
				end if
				%>
				
				   
				    
				      
				         
				          热 点
				        
				         
				          
				        
				      
				    
				     
				      					sql="select * from announce where type="&typeid&" order by id desc"
					rs.open sql,conn,1,1
					if rs.eof and rs.bof then 
						response.write "暂时没有收集" 
					else 
						totalPut=rs.recordcount
						PageUrl="newslist.asp?typeid="&typeid
					if currentpage					if (currentpage-1)*MaxPerPageCount>totalput then 
						if (totalPut mod MaxPerPageCount)=0 then 
							currentpage= totalPut \ MaxPerPageCount 
						else 
							currentpage= totalPut \ MaxPerPageCount + 1 
						end if 
					end if 
					if currentPage=1 then 
						showpage totalput,MaxPerPageCount,PageUrl
						showcontent
						showpage totalput,MaxPerPageCount,PageUrl
					else 
						if (currentPage-1)*MaxPerPageCount							rs.move  (currentPage-1)*MaxPerPageCount 
							dim bookmark 
							bookmark=rs.bookmark 
							showpage totalput,MaxPerPageCount,PageUrl
								showcontent
							showpage totalput,MaxPerPageCount,PageUrl
						else 
							currentPage=1 
							showpage totalput,MaxPerPageCount,PageUrl
								showcontent
							showpage totalput,MaxPerPageCount,PageUrl
						end if 
					end if 
				end if 
				rs.close 
				
				sub showContent 
				i=0 
				response.write ""
				do while not rs.eof
				i=i+1
				response.write ""&rs("title")&" ["&rs("author")&"]"
				if right(rs("DateAndTime"),2)=right(date(),2) then
				response.write " "
				else
				response.write " "
				end if
				response.write rs("DateAndTime")&""
				if i mod 2=0 and i>1 then response.write""
				if i>=MaxPerPageCount then exit do
				rs.movenext
				loop
				response.write ""
				end sub
				
				function showpage(totalnumber,MaxPerPageCount,filename)
				 dim n
				if totalnumber mod MaxPerPageCount=0 then
					n= totalnumber \ MaxPerPageCount
				else
					n= totalnumber \ MaxPerPageCount+1
				end if
				response.write ""&_
								"共找到"&totalnumber&"项记录" 
				if CurrentPage				response.write " 首页 上一页 "
				else
				response.write " 首页 上一页 " 
				end if
				if n-currentpage				response.write "下一页 末页 "
				else
				response.write "下一页 "&_
				                "末页" 
				end if
				response.write " 页次:"&CurrentPage&"/"&n&"页  转到:"
				               for i = 1 to n
				response.write "				 				if cint(CurrentPage)=cint(i) then response.write " selected "
				response.write ">第"&i&"页"
				                next
				response.write ""     
				end function
				%>
				    
				  
				
				
				
				
								set rs=nothing
				conn.close
				set conn=nothing
				%>			

相关资源