<!--#include file=conn.asp-->
<!--#include file=config.asp-->
<!--#include file=const.asp-->
<!--#include file=char.asp-->
<% '=========================================================
' File: Usertj.asp
' Version:3.0
' Date: 2005-10-29
' 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 action
action=checkStr(Request("action"))
response.buffer=true
stats="首页之星推荐"
if Cint(GroupSetting(188))=0 then
  	errmsg=errmsg+"<br>"+"<li>对不起，您没有首页之星推荐的权限</a>。"
	founderr=true
end if
call nav()
if founderr then
	call head_var("","")
	call Mslove_error()
else
	call head_var("","")
	if action="active" then''表单
	call main()
	else
	call gotj()''保存
	end if
if founderr then call Mslove_error()
end if
call activeonline()
call footer()

sub main()%>
  <table width="100%" align=center cellpadding=3 cellspacing=1 class=tableborder1>
  <form action="?action=gotj" method=POST name="theForm">
    <tr align="left"> 
      <th width="60%" height="28" align="center"  class=tablebody1>首页之星推荐</th>
    </tr>
    <tr align="center"> 
      <td width="100%" height="52"  class=tablebody1>在这里你将可以自我推荐，将显示在首页之星的醒目位置上，提高人气及魅力值！<br>
        请注意本系统将对你进行分值操作：<font color=red>（金币：<%=GroupSetting(189)&GroupSetting(190)%> 经验：<%=GroupSetting(191)&GroupSetting(192)%> 魅力：<%=GroupSetting(193)&GroupSetting(194)%>）</font> <br>
        您现在的分值情况金币：<%=mymoney%> 经验：<%=myuserep%> 魅力：<%=myusercp%></td>
    </tr>
    <tr align="center"> 
      <td width="100%" height="24" align="center"  class=tablebody1><input type="submit" name="Submit" value="提交"></td>
    </tr>
	</form>
  </table>
<%
end sub

sub gotj()''保存推荐
sql="select Istop from [Ms_user] where Username='"&trim(membername)&"'"
set rs=conn.execute(sql)
If Rs.eof or Rs.bof then
	errmsg=errmsg+"<br>"+"<li>对不起没有找到该用户，或者您没有登录。"
	founderr=true
else
if Rs(0)=1 then
	errmsg=errmsg+"<br>"+"<li>您已经是首页之星，请不要重复推荐。"
	founderr=true
end if
end if
if Chkvalue(1,GroupSetting(189),Cint(GroupSetting(190)))=false then
	errmsg=errmsg+"<br>"+"<li>对不起，您的金币不够请确认。"
	founderr=true
end if
if Chkvalue(2,GroupSetting(191),Cint(GroupSetting(192)))=false then
	errmsg=errmsg+"<br>"+"<li>对不起，您的魅力值不够请确认。"
	founderr=true
end if
if Chkvalue(3,GroupSetting(193),Cint(GroupSetting(194)))=false then
	errmsg=errmsg+"<br>"+"<li>对不起，您的经验值不够请确认。"
	founderr=true
end if
if founderr=true then exit sub
conn.execute("update Ms_user set Istop=1,Topdate=Now(),UserWealth=UserWealth "&GroupSetting(189)&Cint(GroupSetting(190))&",UserEP=UserEP "&GroupSetting(191)&Cint(GroupSetting(192))&",UserCP=UserCP "&GroupSetting(193)&Cint(GroupSetting(194))&" where Username='"&trim(membername)&"'")
	sucmsg=sucmsg+"<br>"+"<li>您已成功成为首页之星。"
	call Mslove_suc()
end sub
%>