<%
if issession=0 then
username=Replace_Text(request.Cookies("Yxmember"))
gsid=Replace_Text(request.Cookies("Yxmemberid"))
else
username=session("user")
gsid=session("id")
end if
if username<>"" or gsid<>"" then
response.Redirect(HOPE_InstallDir&"member/index.asp")
end if
%>
<%
if Replace_Text(Request("Websen_Action"))="Websen_Add" then
%>
<%
if issession=0 then
safecode=Replace_Text(request.Cookies("safecode"))
else
safecode=Session("SafeCode")
end if
url=request.ServerVariables("HTTP_REFERER")
verifycodes= Replace_Text(request("Verifycode"))
if verifycodes="" then
verifycodes=1
end if
if cstr(verifycodes)<>cstr(safecode) then
Response.Write ""
else
dim UsernameGet,PasswordGet
UsernameGet=Replace_Text(Request("UsernameGet"))
PasswordGet=Replace_Text(Request("PasswordGet"))
if UsernameGet<>"" and PasswordGet<>"" and cstr(verifycodes)=cstr(safecode) then
sql="select * from Websen_corporation where [Users]='"&UsernameGet&"' and Pass='"&PasswordGet&"'"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof then
Response.Write ""
end if
if not rs.eof then
if isSession=1 then
session("Email")=rs("Email")
session("id")=rs("id")
session("user")=rs("users")
session("yxFlag")=rs("Flag")
session("gradeid")=rs("gradeid")
session.Timeout=45
else
Response.Cookies("Yxmember")=rs("users")
Response.Cookies("Yxmemberid")=rs("id")
Response.Cookies("Yxmemberlist")=md5(rs("Pass"),16)
Response.Cookies("Yxmemberip")=md5(Request.ServerVariables("REMOTE_ADDR"),16)
Response.Cookies("gradeid")=rs("gradeid")
Response.Cookies("yxFlag")=rs("Flag")
Response.Cookies("Email")=rs("Email")
Response.Cookies("Yxtime")=now()
Response.Cookies("Yxmember").Expires=dateadd("n",time_score,now())
Response.Cookies("Yxmemberid").Expires=dateadd("n",time_score,now())
Response.Cookies("Yxmemberlist").Expires=dateadd("n",time_score,now())
Response.Cookies("Yxmemberip").Expires=dateadd("n",time_score,now())
Response.Cookies("gradeid").Expires=dateadd("n",time_score,now())
Response.Cookies("yxFlag").Expires=dateadd("n",time_score,now())
Response.Cookies("Email").Expires=dateadd("n",time_score,now())
Response.Cookies("Yxtime").Expires=dateadd("n",time_score,now())
end if
Response.Redirect(HOPE_InstallDir&"member/index.asp")
end if
rs.close
set rs=nothing
end if
end if
if issession=0 then
response.Cookies("safecode")=""
else
Session("SafeCode")=""
end if
%>
<%
end if
%>
<%
conn.close
set conn=nothing
Function noHtml(str)
Dim re
Set re=New RegExp
re.IgnoreCase =True
re.Global=True
re.Pattern="(\<.*?\>)"
str=re.Replace(str,"")
re.Pattern="(\<\/.*?\>)"
str=re.Replace(str,"")
noHtml=str
End Function
%>