<!--#include file="head.asp"-->
<style>body{background-color: #fff;}</style>

<%
response.Write "该功能已关闭"
response.End()

Const stringmodarr = "0123456789"
dim randarr2,strlength
strlength = Len(stringmodarr)
Randomize timer
For i = 1 To 16 
randarr2 = randarr2&Mid(stringmodarr,Int(Rnd * strlength + 1),1)  
Next 
randarr =randarr2 & Right(("00" & Second(Now())),2)

c=SafeRequest("c")


if c="tc" then
tid=SafeRequest("tid")
if tid="" then call PopErr("参数有误")
sql="select * from aytaocan where aytcid="&tid&"" 
rs.open sql,conn,1,1
if rs.bof and rs.eof then
call PopErr("套餐信息有误")
else
aytcjin=rs("aytcjin")
aytcname=rs("aytcname")
aytcid=rs("aytcid")
aytczong=rs("aytczong")
aytcsj=rs("aytcsj")
end if
rs.close

sql="select * from ayname where aynameid="&request.Cookies("aynameid")&""
rs.open sql,conn,1,3
if ccur(rs("ayyue"))<ccur(aytcjin) then call PopErr2("账户余额不足，请先充值","/pay/chong.asp?c=tc&tid="&tid)
rs("ayyue")=ccur(rs("ayyue"))-ccur(aytcjin)
rs.update
rs.close

sql="select * from aytaocanlog where aytcuid="&request.Cookies("aynameid")&" and aytczt=0" 
rs.open sql,conn,1,3
if rs.bof and rs.eof then
rs.addnew
rs("aytcuid")=request.Cookies("aynameid")
rs("aytcname")=trim(aytcname)
rs("aytcjin")=trim(aytcjin)
rs("aytczong")=trim(aytczong)
rs("aytcsheng")=trim(aytczong)
rs("aytcsj")=trim(aytcsj)
rs.update
else
	rs.addnew
	rs("aytcuid")=request.Cookies("aynameid")
	rs("aytcname")=trim(aytcname)
	rs("aytcjin")=trim(aytcjin)
	rs("aytczong")=trim(aytczong)
	rs("aytcsheng")=trim(aytczong)
	rs("aytcsj")=trim(aytcsj)
	rs("aytczt")=2
	rs.update
end if
rs.close

conn.Execute("Insert Into "&request.Cookies("cwku")&"(aycaiwuleibie,aycaiwuuser,aycaiwudingdan,aycaiwudate,aycailiushui,aycaiwujine,aycaiwuzhifu,aycwfsjin,aycwinjin,aycaiwubody) values('5','"&request.Cookies("aynameid")&"','"&randarr&"','"&now()&"','"&randarr&"','"&Formatnumber(aytcjin,3,true,-1,0)&"','99','"&Formatnumber(aytcjin,3,true,-1,0)&"','"&Formatnumber(aytcjin,3,true,-1,0)&"','购买套餐-"&tid&"')")

call logadd(request.Cookies("aynameid"),"购买套餐"&left(tid,10),0,0)

call PopErr2("购买套餐操作成功","mytaocan")

end if


%>


<main>
<div  class="container">
<div class="ui-lrctnei">
<%call userleft()%>
<div class="r"> 
<div class="ui-content">
                        
					
                            
<div class="neiye">

                   
                                                     
            <!-------------------------------------- 开始 -------------------------------------->									
            <div class="neibiaoti"></div>
            <div class="neibiaoti2">我的引荐</div>
           	<div class="gexian20"></div>
                	<div class="neitable">
                    <form action="" method="post" name="myform" id="myform">
					<table>
                        <tr class="hd">
                            <td>商家ID</td>
                            <td>商家名称</td>
                            <td>注册时间</td>
                            <td>成交笔数</td>
                            <td>联系邮箱</td>
                        </tr>
						<%
                        sql="select * from ayname where ayapiyinjian='"&request.Cookies("aynameid")&"'" 
                        rs.open sql,conn,1,1
                        if not(rs.bof and rs.eof) then
                        do while not rs.eof
						%>
                  		<tr onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                            <td><%=rs("aynameid")%></td>
                            <td><%=rs("aytrueuser")%></td>
                            <td><%=rs("aydata")%></td>
                            <td><%=rs("aychengjiao")%></td>
                            <td><%=rs("aymail")%></td>
                        </tr>
						<%
                        rs.movenext  
                        loop
                        end if
                        rs.close
						%>
                 		<!--<tr><td colspan="5"></td></tr>-->
                        
                    </table>
                    </form>
            		</div>
            <!-------------------------------------- 结束 -------------------------------------->


			<%
			rs.open "select shangjiabao from ayquanju",conn,1,1
			%>
            <div class="gexian20"></div><br><br><br>
            <div class="mzsmbox2" style="padding-top:20px;">
            推广引荐：<a href="mylink">[查看我的推广链接]</a> <%if cint(rs("ayisyinjian"))=0 then response.Write "[平台推荐功能已关闭]"%><br>
            使用说明：通过推广链接成功注册的商家，便自动成为你的推广商家！<br>
            推广原则：推广引荐应公平真实，使用其他方式手段，一人多号的将不享受推广分成！<br>
            推广分成：当推广商家累计结算满500元，获得分成15元。<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;当推广商家累计结算满1000元，获得分成30元。<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;当推广商家累计结算满3000元，获得分成90元。<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;当推广商家累计结算满8000元，获得分成240元。<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;当推广商家累计结算满15000元，获得分成450元。<br>
            </div>
         	<%rs.close%>
        <div class="clearfix"></div>

</div>








</div>
</div>
</div>
</div>
</main>


<footer>
<div class="container">
</div>
</footer>

</body>
</html>