<!--#include file="inc/conn.asp"-->
<!--#include file=usercookies.asp-->
<!--#include file="inc/inc.asp"-->
<%dim djzh
djzh=trim(request("djzh"))
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=title%>-会员管理中心-道具转换</title>
</head>
<body topmargin="0">
<%call t()%>
<div align="center">
<table width="755" id="table1" bgcolor="#FFFFFF" style="border-left:1px solid #999999; border-right:1px solid #999999; padding:1px; border-top-width:1px; border-bottom-width:1px" cellspacing="1">
<tr>
<td width="158" height="25" class=td1>
<p align="center">会员管理系统</td>
<td width="1" height="139" rowspan="2">　</td>
<td width="594" height="25" class=td1>
<p align="center">会员管理中心</font>-道具转换</td>
</tr>
<tr>
<td width="157" height="113" bgcolor="#F6F6F6" valign="top"><!--#include file=userleft.asp--></td>
<td valign="top" bgcolor="#F6F6F6">
<%if djzh="" then%>
<table border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<%
dim jf,hb,g_s
i=1
username=request.cookies("cnmai")("username")
set rs=server.createobject("adodb.recordset")
sql = "select jf,a,b,c,d from [jle_user] where username='"&username&"'"
rs.open sql,conn,1,1
jf=rs("jf")
a=trim(rs("a"))
b=trim(rs("b"))
c=trim(rs("c"))
d=trim(rs("d"))
rs.close
set rs=nothing
closedb
%>
<tr>
<td width="99%" height="25" colspan="5" bgcolor="#FFECD9">  &nbsp;  此操作将你的道具转换为虚拟货币，方便你购买其他道具！</td>
</tr>
<tr>
<td height="25" class=td4 colspan="5">
<p align="left">&nbsp;&nbsp;&nbsp; 道具转换</td>
</tr>
<form method="POST" action="u_djzh.asp?cnmai=1">
<tr>
<td width="3%" height="25" align="center">
<p align="left">　</td>
<td width="21%" height="25" align="center">
我有<font color="#800000">标题变色道具</font></td>
<td width="15%" height="25" align="center">
<select name="a">
<option value="0">转换数量</option>
<%for i=1 to int(a)%>
<option value="<%=i%>"><%=i%>个</option>
<%next%>
</select></td>
<td width="36%" height="100" align="center" rowspan="4">
<p align="center">
<img border="0" src="image/point03.gif" width="38" height="85">虚拟货币</td>
<td width="24%" height="25" align="center">
　</td>
</tr>
<tr>
<td width="3%" height="25" align="center">
<p align="left">　</td>
<td width="21%" height="25" align="center">
我有<font color="#800000">信息置顶道具</font></td>
<td width="15%" height="25" align="center">
<select name="b">
<option value="0">转换数量</option>
<%for i=1 to int(b)%>
<option value="<%=i%>"><%=i%>个</option>
<%next%>
</select></td>
<td width="24%" height="25" align="center">
　</td>
</tr>
<tr>
<td width="3%" height="25" align="center">
<p align="left">　</td>
<td width="21%" height="25" align="center">
我有<font color="#800000">内容贴图道具</font></td>
<td width="15%" height="25" align="center">
<select name="c">
<option value="0">转换数量</option>
<%for i=1 to c%>
<option value="<%=i%>"><%=i%>个</option>
<%next%>
</select></td>
<td width="24%" height="25" align="center">
<input type="submit" value="我要转换" name="djzh"></td>
</tr>
<tr>
<td width="3%" height="25">　</td>
<td width="21%" height="25" align="center">
<p align="center">我有<font color="#800000">通过验证道具</font></td>
<td width="15%" height="25">
<p align="center">
<select name="d">
<option value="0">转换数量</option>
<%for i=1 to d%>
<option value="<%=i%>"><%=i%>个</option>
<%next%>
</select></td>
<td width="24%" height="25">
<p align="center">　</td>
</tr>
</form>
<tr>
<td width="99%" height="25" class=td4 colspan="5">&nbsp;&nbsp;&nbsp; 积分转换&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
只要您天天登陆本站,就可以不断增加您的积分哟</td>
</tr>
<tr>
<td width="99%" height="23" colspan="5">当前我的积分是：<font color="#FF0000"><%=jf%></font></td>
</tr>
<tr>
<td width="99%" height="23" colspan="5">本站可以用 <font color="#FF0000"> <%=jf_hb%></font> 积分转换  
<font color="#FF0000">1</font> 个虚拟货币</td>
</tr>
<tr>
<td width="99%" height="23" colspan="5">我的积分可以转换 <font color="#FF0000"><%=int(jf/jf_hb)%></font> 
个虚拟货币，剩余的积分我们将予以保留。</td>
</tr>
<form method="POST" action="u_djzh.asp?cnmai=2">
<tr>
<td width="99%" height="23" colspan="5">是否要转换虚拟货币：<input type="hidden" name="jf" size="7" value="<%=jf%>"><input type="submit" value="我要转换" name="djzh"></td>
</tr>
</form>
</table>
<%else
username=request.cookies("cnmai")("username")
sub cnmai_1()
i=1
a=trim(request("a"))
b=trim(request("b"))
c=trim(request("c"))
d=trim(request("d"))
set rs=server.createobject("adodb.recordset")
sql = "select a,b,c,d,hb from [jle_user] where username='"&username&"'"
rs.open sql,conn,1,3
if rs("a")<int(request("a")) then
response.write "<li>参数错误！"
response.end
end if
if rs("b")<int(request("b")) then
response.write "<li>参数错误！"
response.end
end if
if rs("c")<int(request("c")) then
response.write "<li>参数错误！"
response.end
end if
if rs("d")<int(request("d")) then
response.write "<li>参数错误！"
response.end
end if
hb=a*g_a+b*g_b+c*g_c+d*g_d
rs("a")=rs("a")-int(a)
rs("b")=rs("b")-int(b)
rs("c")=rs("c")-int(c)
rs("d")=rs("d")-int(d)
rs("hb")=rs("hb")+int(hb)
rs.update
rs.close
set rs=nothing
response.write "<li>转换成功！"
response.write "<meta http-equiv=refresh content=""1;URL=u_djzh.asp"">"
end sub
sub cnmai_2()
set rs1=server.createobject("adodb.recordset")
sql1 = "select jf,hb from [jle_user] where username='"&username&"'"
rs1.open sql1,conn,1,3
if rs1("jf")<int(request("jf")) then
response.write "<li>参数错误！"
response.end
end if
g_s=int(rs1("jf")/jf_hb)
rs1("jf")=rs1("jf")-int(g_s*jf_hb)
rs1("hb")=rs1("hb")+g_s
rs1.update
rs1.close
set rs1=nothing
response.write "<li>转换成功！"
response.write "<meta http-equiv=refresh content=""1;URL=u_djzh.asp"">"
end sub
%>
<%
if request("cnmai")="1" then
cnmai_1()
end if
if request("cnmai")="2" then
cnmai_2()
end if
%>
<%closedb%>
<%end if%>
</td>
</tr>
</table>
</div>
<!--#include file="foot.asp"-->
</body>
</html>