<!--#include file="../conn/conn2.asp" -->
<!--#include file="../conn/function.asp" -->
<%
O_id=request("O_id")
genkey=request("genkey")

if O_id="" and genkey="" then
response.end()
else
if O_id<>"" then
sql="select * from SL_orders where O_id="&O_id
set rs=Server.CreateObject("ADODB.RecordSet")
		rs.open sql,conn,1,1
		if not rs.eof then
		O_state=rs("O_state")
		end if
		rs.close
		set rs=nothing
response.Write O_state
end if

if genkey<>"" then
sql="select * from SL_member where M_genkey='"&genkey&"'"
set rs=Server.CreateObject("ADODB.RecordSet")
		rs.open sql,conn,1,1
		if not rs.eof then
		session("M_login")=rs("M_login")
		session("M_pwd")=rs("M_pwd")
		session("M_id")=rs("M_id")
		response.Write 1
		else
		response.Write 0
		end if
		rs.close
		set rs=nothing

end if
end if

%>