庐江二中

源代码在线查看: shownews.asp

软件大小: 1499 K
上传用户: hufei108
关键词:
下载地址: 免注册下载 普通下载 VIP

相关代码

								option explicit
				dim PageName
				PageName="shownews"%>
				
				
				
				
								dim newsID,Title,titleurl,about,Author,Original,AuthorR,OriginalR,UpdateTime,Content,hot,SpecialName,SmallClassName,click,image,username
				
				'NewsID=request("NewsID")
				if request("NewsID")"" and isnumeric(request("NewsID")) then
					NewsID=request("NewsID")
				sql="select * from News where checked=1 and NewsID=" & NewsID
				rs.open sql,conn,1,1
				if rs.eof then
							%>
							
							history.back()
							alert("本信息不存在或尚未通过审核!")
							
													Response.End 
				else	
					BigClassName=rs(1)
					SmallClassName=rs(2)
					SpecialName=rs(3)
					Title=rs(4)
					titleurl=rs(5)
					username=rs(6)
					Author=rs(8)
					if Author"" then AuthorR=" 作者:"
					Original=rs(9)
					if Original"" then OriginalR=" 来源:"
					image=rs(11)
					UpdateTime=rs(12)
					content=rs(13)
					about=rs(14)
					click=rs(15)
					hot=rs(16)
				end if
				rs.Close
				
				
				dim ReaderLevel,UserLevel
				sql="select ReaderLevel from SmallClass where BigClassName='"&BigClassName&"' and SmallClassName='"&SmallClassName&"'"
				rs.open sql,conn,1,1
				ReaderLevel=rs(0) 
				rs.close
				
				if ReaderLevel0 then
				if readfree=0 then  '如果不允许非会员浏览
				if (isnull(session("xpUser")) or isnull(session("xpPwd")) or session("xpUser")="" or session("xpPwd")="") and readFree=0 then
					conn.close 
					set conn=nothing
					Response.Redirect "userlogin.asp"
					Response.End 
				end if
				
				if not(isnull(session("xpUser")) or isnull(session("xpPwd")) or session("xpUser")="" or session("xpPwd")="") then
					sql="select UserLevel,lockuser,LimitPoint,readnews,UserPoint from Users where UserName='"&Session("xpUser")&"' and PassWord='"&Session("xpPwd")&"'"
					rs.Open sql,conn,1,3
					if rs.eof then
							%>
							
							history.back()
							alert("对不起,会员帐号或密码错误,请重新登陆。")
							
													Response.End 
					else
						dim rs1,theLimitPoint
						set rs1=conn.execute("SELECT LimitPoint FROM UserGrade where id="&rs(0)&"")
						theLimitPoint=rs1(0)
						rs1.close:set rs1=nothing	
						if rs(0)							%>
							
							history.back()
							alert("你的等级达不到本栏目所要求的级,请继续努力。")
							
														Response.End 
						elseif rs(1)=true then
							%>
							
							history.back()
							alert("你的帐号被锁定,请联系管理员。")
							
														Response.End 
						elseif rs(2)>=theLimitPoint then
							%>
							
							history.back()
							alert("你的阅读次数已超过限制次,请提高等级以获取更多次数。")
							
														Response.End 				
						else
							rs(3)=rs(3)+1
							rs(4)=rs(4)+1
							rs(2)=rs(2)+1
							if rs(0)							rs.Update
						end if
					end if
					rs.close
				end if
				end if
				end if
				
				conn.execute("update News Set Click=click+1 where NewsID=" & NewsID )
				
				if titleurl="" or isnull(titleurl) then
				
				sql="select * from News where username='"&username&"'"
				rs.open sql,conn,1,1
				dim InputCount
				InputCount=rs.RecordCount
				rs.Close
				%>
				
				
					//滚屏
					var currentpos,timer;	
					function initialize()
					{timer=setInterval("scrollwindow()",50);}
					function sc()
					{clearInterval(timer);}
					function scrollwindow()
					{currentpos=document.body.scrollTop;
					window.scroll(0,++currentpos);
					if (currentpos != document.body.scrollTop)
					sc();}
					document.onmousedown=sc
					document.ondblclick=initialize
				
				
				
				  
				    
				
				       
				        
				
				
				 
				
				
				
				
				      
				         
				          
				
				            发表时间:  点击 
				             次
				            
				          
				        
				      
				        
				           
				          
				        
				      
				      
				         
				           
				            录入: [共  篇]   
				        
				      
				      
				         
				           上一篇:
				            
				              下一篇:
				            
				          
				        
				      
				      
				         
				           
				            
				          
				           
				            
				          
				        
				      
								if ShowGBook=1 then
				dim cols
				if ShowNewsModelRight=1 then
				cols=86
				else
				cols=111
				end if
				%>
				
								end if
				%>
				
								if ShowNewsModelRight=1 then	'右栏开始
					Response.Write InTable("right")
					%>
					
					
					
					
					
					 
					
					
									end if	'右栏结束
				Response.Write OutTable("right")
				%>
				
				
								else
				set rs=nothing
				conn.close
				set conn=nothing
				Response.Redirect titleurl
				end if
				
				function thisspecial
					Response.Write " 所属专题:"
					if specialname"无" then Response.Write "" & specialname &""
					Response.Write ""		
					sql="select top 5 "& NoContent &" from News where (checked=1 and NewsID" & NewsID & " and SpecialName='" & SpecialName & "') order by NewsID DESC"
					rs.open sql,conn,1,1
					if SpecialName="无" or rs.EOF or rs.bof then
						Response.Write " 尚无信息"
					else
						while not rs.EOF
							Response.Write shownewf
							if ShowNewsModelRight=1 then 
								Response.Write showTitle("MainContentS",30)
							else
								Response.Write showTitle("MainContentS",44)
							end if
							Response.Write showImg
							Response.Write showTime
							Response.Write ""
							rs.MoveNext
						wend
						Response.Write ">>更多 "
					end if
					Response.write ""
					rs.Close
				end function
				
				function aboutnews
					sql="select top 5 "&NoContent&" from news where checked=1 and about like '%" & about & "%' and title not like '" & title & "' order by newsid desc"
					rs.open sql,conn,1,1
					Response.Write " 相关信息:"&about&""
					if not rs.EOF and about"" then
						do while not rs.eof	
							Response.Write shownewf
							if ShowNewsModelRight=1 then 
								Response.Write showTitle("MainContentS",30)
							else
								Response.Write showTitle("MainContentS",44)
							end if
						Response.write showImg
						Response.write showTime
						Response.Write ""
						rs.movenext
						loop
						Response.Write ">>更多 "
					else
						Response.Write " 尚无信息"
					end if
					Response.Write ""	
					rs.close
				end function
				
				function movenews(strmove)
					sql="select "& NoContent &" from News where checked=1 and NewsID=" & NewsID &strmove&"1"
					rs.open sql,conn,1,1
					if not rs.EOF then
						Response.write showTitle("MainContentS",70)
						Response.write showImg
						Response.write showTime
					else
						Response.write "已经没有了"
					end if
					rs.close
				end function
				
				set rs=nothing
				
				%>
				
				
								else %>
				
				history.back()
				alert("您采用了非法访问请求,该请求被拒绝")
				
							

相关资源