<%@ Language=VBScript %>

<html>
<head><!--#include file="const.asp" -->
<title><%=rs("title")%>---<%=rs("lovetitle")%></title>
<meta NAME="GENERATOR" Content="Microsoft FrontPage 5.0">
<meta NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</head>
<body>
<p align="center"><object runat="server" id="conn1" progid="adodb.connection"></object>
<%application.Lock
conn1.Open Application("p_jyzx")
Application.UnLock
%>
<%
user_name=replace(Request("user_name")," ","~",1,-1,1)
password=trim(request("password"))

sql="select * from user where user_name='"&user_name&"'"
set rs=server.CreateObject ("ADODB.recordset")
 rs.Open sql,conn1,3
if rs.RecordCount =0 then
	rs.Close
    set rs=nothing
	Response.Redirect "error.asp?cause=0"  'cause=0 用户已有
elseif rs("passwd")<>password then
    rs.Close
    set rs=nothing
    Response.Redirect "error.asp?cause=1"  'cause=1 密码错
else
  sql="select * from vip_user where user_name='"&user_name&"'"
	set rs2=server.CreateObject ("ADODB.recordset")
	rs2.Open sql,conn1,3
	if rs2.RecordCount<>0 then
%>
 
<!--#include file="top.asp" -->
<TABLE WIDTH=80% BORDER=0 CELLSPACING=0 CELLPADDING=0  align=center >
	<TR>
		<TD><BR><BR><BR><BR><BR>
<p align="center"><font>对不起，您重复申请了VIP会员！</font></p>
<br><br>
<p align="center"><a href="../default.asp"><font color="red">返回首页</font></a></p>
</TD>
	</TR>
</TABLE>
<p>　</p>
<p>　</p>
<!--#include file="../copyright.asp" -->
<%	else
	'////////////////////////
	if session("from_intr")<>"__anonymous" then
	  Set rs = Server.CreateObject("ADODB.Recordset")
	 sql="select * from affiliate where user_name='"&session("from_intr")&"'"
	rs.Open sql,conn1,3,2
	if rs.RecordCount<>0 then
	'//纪录被介绍人信息
	  Set rs_join = Server.CreateObject("ADODB.Recordset")
	 rs_join.Open "affiliate_intro_vip",conn1,3,2
	rs_join.AddNew 
	rs_join("user_name")=session("from_intr")
	rs_join("introduced_user")=user_name
	rs_join("ip")=Request.ServerVariables("REMOTE_HOST")
	rs_join("time")=now()
	rs_join.Update 
		
	
	
    end if

end if

	
	
	Set rs1 = Server.CreateObject("ADODB.Recordset")
	rs1.Open "vip_user",conn1,3,2
	rs1.addnew
	rs1("user_name")=user_name
	rs1("last_time")=Request("last_time")
	rs1("checked")=0
	rs1("start_date")=date
	rs1("end_date")=date
	rs1.update
%>

<!--#include file="top.asp" -->
<TABLE WIDTH=80% BORDER=0 CELLSPACING=0 CELLPADDING=0  align=center>
	<TR>
		<TD>
		<BR><BR><BR><BR>
<p align=center><img border="0" src="../images/vip_ok.jpg"></p><p align=center>
        请您尽快通过以下方式将会员费用汇出，我们会在收到您的汇款的第一时间内开通您的VIP会员账号！</p>
<br><br>
<p align="center"><a href="../default.asp"><font color="red">返回首页</font></a></p>
</TD>
	</TR>
</TABLE>
</body>
</html>  	



<!--#include file="tailer.htm" -->
<%	
	end if
	
    
end if
%>