<!--#include file=conn.asp-->
<!--#include file=config.asp-->
<!--#include file=const.asp-->
<!--#include file=char.asp-->
<%
 '=========================================================
' File: activepower.asp
' Version:3.0
' Date: 2005-10-20
' Script Written by xmrxw
'=========================================================
' Copyright (C) 2004,2005 Xmrxw.Com All rights reserved.
' Web: http://www.xmrxw.com,http://www.xmzxw.com
' Email: info@mssky.com,super@mssky.com
' QQ：10689579　Msn：zdlmicr@hotmail.com
'=========================================================
dim username
response.buffer=true
stats="激活帐号"
username=Checkstr(Request("username"))
if username="" then
	ErrMsg=ErrMsg+"<Br>"+"<li>参数错误，请把地址包括username姓名也一并复制在地址栏中输入回车。"
	FoundErr=True
end if
call nav()
if founderr then
	call head_var("","")
	call Mslove_error()
else
	call head_var("激活帐号","activepower.asp")
	call main()
end if
call activeonline()
call footer()

sub main()
dim Useractive
set rs=server.createobject("adodb.recordset")'检查用户存在性
sql="select Useractive from [Ms_user] where username='"&username&"'"
set rs=conn.execute(sql)
if not (rs.eof and rs.bof) then
Useractive=Rs(0)
else
	ErrMsg=ErrMsg+"<Br>"+"<li>系统找不到相应用户，请检查是否正确。"
	FoundErr=True
end if
Rs.close:Set Rs=Nothing
if Useractive=1 then
	ErrMsg=ErrMsg+"<Br>"+"<li>您已经激活过，请不要重复激活。"
	FoundErr=True
end if
dim Userattrs,usermoney
	Userattrs=split(Userattr,"|")
	if Cint(Userattrs(0))=1 then
	usermoney=Cint(Userattrs(1))
	else
	ErrMsg=ErrMsg+"<Br>"+"<li>系统未开放赠送金币活动。"
	FoundErr=True
	end if
if FoundErr=True then exit sub
conn.execute("Update Ms_user Set UserWealth=UserWealth+"&usermoney&",Useractive=1 where username='"&username&"'")
%>
  <table width="100%" align=center cellpadding=3 cellspacing=1 class=tableborder1>
    <tr align="left"> 
      
    <th width="60%" height="28" align="center"  class=tablebody1><%=stats%></th>
    </tr>
    <tr align="center"> 
    <td width="100%" height="45"  class=tablebody1>恭喜您！您获得<%=webname%>交友中心赠送的金币数：<b><font color="red"><%=usermoney%></font></b> 个。<br>
      <a href="index.asp">现在进入交友中心 </a></td>
    </tr>
    <tr align="center"> 
      
    <td width="100%"  class=tablebody1 align="center">欢迎您使用本交友系统！</td>
    </tr>
  </table>
<%
end sub
%>   
</body>
</html> 