<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!-- #include file="inc/DvADChar.asp" -->
<%
Dvbbs.LoadTemplates("usermanager")
Dvbbs.stats="美容中心"
Dvbbs.nav()
Dvbbs.Head_var 2,0,template.Strings(0),"meirong.asp"
Dim ErrCodes
If Cint(Dvbbs.GroupSetting(16))=0 Then
	Dvbbs.AddErrCode(28)
	Dvbbs.Showerr()
End If

If Dvbbs.userid=0 Then
	Dvbbs.AddErrCode(6)
	Dvbbs.Showerr()
       
   else    
        main1()
        If ErrCodes<>"" Then Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"
	Dvbbs.Showerr()
End if
Dvbbs.ActiveOnline()
Dvbbs.Footer()
%>

<%sub main1()
'//判断男，女开始//
dim chklogin
chklogin=false
sql="select usersex from [Dv_user] where userid="&dvbbs.userid
set rs=conn.execute(sql)
if rs.eof and rs.bof then
chklogin=true
else
            if rs("usersex")=1 then
response.write "<table cellpadding=3 cellspacing=1 align=center class=tableborder1><tr><th valign=middle colspan=2 align=center height=25><b>"&Dvbbs.MemberName&"先生在美容院</b></td></tr><tr><td valign=middle class=tablebody1 height=100><CENTER>"
	    end if
	
            if rs("usersex")=0 then                        
response.write "<table cellpadding=3 cellspacing=1 align=center class=tableborder1><tr><th valign=middle colspan=2 align=center height=25><b>"&Dvbbs.MemberName&"小姐在美容院</b></td></tr><tr><td valign=middle class=tablebody1 height=100><CENTER>"
            end if    
End If
'//判断男，女结束//
%>
<%
dim r,mymoney
sql="Select * from [Dv_User] where userid="&Dvbbs.UserID
set rs=conn.execute(sql)
if rs.bof or rs.eof then
	Dvbbs.AddErrCode(12)
else
        mymoney=rs("userwealth")
	if rs("usercp")<1 or rs("userwealth")>1000 then
		randomize timer
		r=int(rnd*3)
		if r=1 then
			sql="update [Dv_user] set userwealth=userwealth-1000,usercp=usercp+30 where userid=" & Dvbbs.userid
			conn.execute sql
			conn.close
			response.write "经过美容院小姐的一番摆弄,你的魅力增加了30点,美容院小姐收取了你1000两银子!"
			response.end
		else
			sql="update [Dv_user] set userwealth=userwealth-100 where userid=" & Dvbbs.userid
			conn.execute sql
			conn.close
			response.write "由于美容院的学徒学艺不精,弄了半天也没有帮你增加魅力.白花了你100两服务费!"
			response.end
		end if
	else
		response.write "没钱也想扮靓?美容院小姐们一番讥讽把你轰出门口"
		conn.close
		response.end
	end if
%>

<%end if%>
<% 
response.write "</CENTER></td></tr></table>"   
end sub 
%> 