一个不错的asp程序

源代码在线查看: check1.asp

软件大小: 4049 K
上传用户: Jonson_zhu
关键词: asp 程序
下载地址: 免注册下载 普通下载 VIP

相关代码

				
								  if request("username")="" or request("password")="" then
				  	Response.Write "alert('请正确填写用户名和密码!');location.href = 'javascript:history.go(-1)';"
					Response.End
				  else
				  uname=request("username")
				  upass=request("password")
				  end if
				
				'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''  
				  if ErrMsg="" then'连接数据库成功
				  set rs=server.CreateObject ("adodb.recordset")
				      query="select * from Reg_User where UName='"&UName&"'"
				      rs.Open query,conn,1,1
				    if rs.RecordCount 				      	Response.Write "alert('你还不是会员,请注册!');location.href = 'javascript:history.go(-1)';"
						Response.End
					else
				          session("UName")=UName
						  session("UPass")=rs("UPass")   
						  session("UClass")=rs("UClass")
						  session("Scenes")=rs("Scenes")
						  session("EndTime")=rs("EndTime")
				
				      if session("UPass")UPass then
				        Response.Write "alert('你输入的密码不正确!');location.href = 'javascript:history.go(-1)';"
				      elseif session("endtime")				        Response.Write "alert('你的帐户已过期!');location.href = 'javascript:history.go(-1)';"
				      elseif session("scenes")				        Response.Write "alert('你的点值已用完!');location.href = 'javascript:history.go(-1)';"
						elseif session("uclass")"内幕会员" then
				        Response.Write "alert('你不是内幕会员!');location.href = 'javascript:history.go(-1)';"
				      end if      
				
					  '通过验证,正式登录
					  if session("Uclass")="内幕会员" and  session("UPass")=UPass and session("endtime")>now() and session("scenes")>0 then
				      dim sql
				      set rs2=server.CreateObject ("adodb.recordset")
				      sql="update Reg_User set scenes=scenes-1 where UName='"&UName&"'"
				      rs2.open sql,conn,1,1
				      set rs2=nothing	
				      response.redirect "mmlist.asp"
				      end if   
				
				
				    end if
				  rs.Close
				  set rs=nothing
				  end if
				
				%>
							

相关资源