怎么样能让用户免费登陆,请高手指点

来源:百度知道 编辑:UC知道 时间:2024/05/27 17:44:21
我想让用户免费注册,免费登陆,把VIP的拿掉
<%
dim cookiepath
cookiepath="/"
founderr=false
UserIP=Request.ServerVariables("REMOTE_ADDR")
if request("username")="" then
errmsg=errmsg+""+"请输入您的用户名。"
founderr=true
else
username=Checkin(trim(request("username")))
end if
if request("password")="" then
errmsg=errmsg+""+"请输入您的密码。"
founderr=true
else
password=md5(Checkin(trim(request("password"))))
end if
set rs=server.createobject("adodb.recordset")
sql="select username,password,loginIP,vipdate,Adddate,loginDate,lockuser,id from [user] where username='"&username&"' and lockuser=false"
rs.open sql,conn,1,3

if rs.bof and rs.eof then
errmsg=errmsg+""+"您输入的用户名并不存在或你的VIP资格尚未审核通过。<br><br><a href='reg.asp&

删除掉

if rs.bof and rs.eof then
errmsg=errmsg+""+"您输入的用户名并不存在或你的VIP资格尚未审核通过。<br><br><a href='reg.asp'>请先注册或续费</a>"
founderr=true

else
if rs("password")<>password then
errmsg=errmsg+""+"您输入的密码不正确。"
founderr=true
else
dim isvip,usercookies
isvip=cint(rs("vipdate")-datediff("d",rs("Adddate"),now()))
if isvip<=0 then
errmsg=errmsg+""+"你的VIP资格已经到期,请续费之后联系我们,我们马上帮你开通帐号!<br><br>"
rs("vipdate")=0
rs("lockuser")=1
rs("loginDate")=NOW()
rs("loginIP")=Request.ServerVariables("REMOTE_ADDR")
rs.update
founderr=true
else