<% if Request.form("UserName")<>"" or Session("LoginSuccess")<>"" then user=session("loginsuccess") Name = Request.form("UserName") Name=replace(Name,"'","") Name=replace(Name,",","") Name=replace(Name,"&","") Name=replace(Name,"\","") Pwd = Request.form("UserPass") Pwd=replace(Pwd,"'","") Pwd=UCase(MD5(Pwd,32)) newsurl=trim(request("newsurl")) newsname=trim(request("newsname")) Loginsql="select * from RegUser where UserId='"&Name&"'and PassWD='"&Pwd&"'" if Session("LoginSuccess")<>"" then Loginsql="select * from RegUser where UserId='"&Session("LoginSuccess")&"'" end if set LoginRs = Server.CreateObject("ADODB.recordset") LoginRs.open LoginSql,conn,1,1 IF LoginRs.RecordCount >=1 then gga=LoginRs("Name") Session("LoginSuccess")=Loginrs("UserId") Session("UserName")=Loginrs("Name") Session("Id")=Loginrs("Id") userid=Loginrs("UserId") pass=Loginrs("PassWD") end if LoginRs.close set LoginRs=nothing if Session("LoginSuccess")<>"" then sql="insert into user_fav(fav_title,fav_url,user_name,type) values('"&newsname&"','"&newsurl&"','"&Session("LoginSuccess")&"','1')"' 插入值 conn.execute(sql) end if 'conn.close 'set conn=nothing 'response.write session("loginsuccess") response.write "已经添加到您的收藏夹了,以后可以进入会员中心查看" end if %> <% if session("loginsuccess")="" then response.write "请先登录后才能操作!
" %>
"> ">
会员登录--
会员帐号:
会员密码:
<% end if %>