<!--#include file="../Inc.asp"-->
<!--#include file="../../md5.asp"-->
<%Dim urls,urlsid
urls=Request.Querystring("url")
If urls="" Then urls="index.asp"
If instr(urls,"@@")>0 or instr(urls,"?")>0 Then
urlsid="@@sid="
Else
urlsid="?sid="
End if
dim sid,TP,Action
sid=request("sid")
Action=request("Action")
if Action="ok" then

dim wapgo
wapgo=Request.QueryString("wapgo")
wapgo=replace(wapgo,"@@","&amp;")

dim user,pass,sql
user=request("user")
pass=request("pass")
if user="" or pass="" then
  Call Error("<card title=""出错""><p>各项不能为空！")
  end if
set rs=Server.CreateObject("ADODB.Recordset")
  rs.open"select * from Users where sjhm='"&user&"'",conn,1,2
if rs.eof then
rs.close
set rs=nothing

set rs=Server.CreateObject("ADODB.Recordset")
  rs.open"select * from Users where id="&user&"",conn,1,2
if rs.eof then
  Call Error("<card title=""出错""><p>没有该会员注册信息！")
  end if
end if


if pass<>rs("mm") then
  Call Error("<card title=""出错""><p>密码错误！")
  end if
'更新时间和IP

rs("loginIP")=PassIP

rs("tjj")=now()
rs.update
Response.write "<card title=""社区登陆"" ontimer="""&replace(wapgo,"&amp;o=&amp;sid=","&amp;sid=")&""&rs("sid")&""">"
Response.write "<timer value=""20""/><p>"
response.write " 登录成功！正在返回..<br/>"
response.write "<a href='"&replace(wapgo,"&amp;o=&amp;sid=","&amp;sid=")&""&rs("sid")&"'>手动进入</a><br/>"
response.write "----------<br/>"
response.write "<a href=""/bbs/show.asp?sid="&rs("sid")&""">我的空间</a>"
response.write "<br/><a href=""/bbs/index.asp?sid="&rs("sid")&""">社区首页</a>"
response.write "<br/><a href=""/index.asp?sid="&rs("sid")&""">网站首页</a>"
rs.close
set rs=nothing
conn.close
set conn=nothing
else
Response.Write "<card title=""社区登陆""><p>"
dim act
act=trim(request.querystring("act"))
if act<>"" then
Response.Write "您的IP与上次IP不符请重新登录<br/>"
end if
Response.Write "输入ID或手机号码:<br/>"
Response.Write "<input name=""user"" title=""输入ID或手机号码"" type=""text"" format=""*N"" emptyok=""true"" maxlength=""500""  value=""""/><br/>"
Response.Write "密码:<br/>"
Response.Write "<input name=""pass"" type=""password"" format=""*M"" emptyok=""true"" maxlength=""500"" value=""""/><br/>"
Response.write "<anchor title=""确认提交"">确认提交"
	Response.write "<go href=""login.asp?Action=ok&amp;wapgo="&urls&urlsid&""" method=""post"">"
	Response.write "<postfield name=""user"" value=""$(user)"" />"
	Response.write "<postfield name=""pass"" value=""$(pass)"" />"
	Response.write "</go></anchor><br/>"
Response.write "<a href=""../reg.asp"">还没有注册?</a><br/>"
Response.write "-----------"
Response.write "<br/><a href=""../getmm.asp"">找回密码</a>"
Response.write "<br/><a href=""../index.asp"">社区首页</a>"
Response.write "<br/><a href=""/index.asp"">网站首页</a><br/>"
end if
response.write "</p></card></wml>"
%>
