<!--#include file="inc/conn.asp"--> 
<!--#include file=usercookies.asp-->
<!--#include file="config.asp"-->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="供求信息,二手网,二手商品,电子商务,供求网站,免费发布供求信息,商业信息,贸易网,求购,求购信息,出售，供应,供求信息网，招商投资 生活服务 家电家居  旅游出行 招聘求职  房产信息 
建材装饰 烟酒副食 电脑网络  餐饮酒店  医药保健  农林牧渔  安全防护  包装纸张 办公文教  电子通讯  
纺织皮革  服装服饰  工业机械 仪器仪表 交通运输 车及配件 工艺礼品 文化艺术 冶金矿产 出版印刷 能源动力 环境保护 
化工行业 玩具体育 园林绿化 广告服务 商务服务 分类广告 搜索引擎 企业行业黄页 分类信息网 集市">

<title>会员管理中心-购买道具-<%=title%></title>
</head>
<body topmargin="0">
<!--#include file="topcnmai.asp"-->
<%
dim rs,sql,username,i,i_1,i_2,i_3,i_4,hb,a,b,c,d,a_1,b_1,c_1,d_1,dhdj
dhdj=trim(request("dhdj"))
if request("hb")<>"" then
hb=trim(request("hb"))
end if
a=trim(request("a"))
b=trim(request("b"))
c=trim(request("c"))
d=trim(request("d"))
if a="" then
a=0
end if
if b="" then
b=0
end if
if c="" then
c=0
end if
if d="" then
d=0
end if
if request.cookies("a_1")="" then
Response.cookies("a_1")=0
else
Response.cookies("a_1")=int(request.cookies("a_1"))+int(a)
end if
if request.cookies("b_1")="" then
Response.cookies("b_1")=0
else
Response.cookies("b_1")=int(request.cookies("b_1"))+int(b)
end if
if request.cookies("c_1")="" then
Response.cookies("c_1")=0
else
Response.cookies("c_1")=int(request.cookies("c_1"))+int(c)
end if
if request.cookies("d_1")="" then
Response.cookies("d_1")=0
else
Response.cookies("d_1")=int(request.cookies("d_1"))+int(d)
end if
username=request.cookies("cnmai")("username")
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select hb from [com] where username='"&username&"'" 
rs.open sql,conn,1,1
if request("cnmai")="1" then
hb=hb-(a*g_a+b*g_b+c*g_c+d*g_d)
else
Response.cookies("a_1")=0
Response.cookies("b_1")=0
Response.cookies("c_1")=0
Response.cookies("d_1")=0
hb=rs("hb")
end if
%>
<div align="center">
<table width="760" id="table1" bgcolor="#FFFFFF" style="border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC; padding:1px; border-top-width:1px; border-bottom-width:1px" cellspacing="1">
<tr>
<td width="158" height="25" class=td2_muen>
<p align="center"><font color=white>会员管理系统</font></td>
<td width="1" height="170" rowspan="2">　</td>
<td width="594" height="25" class=td4_muen>
<p align="center">会员管理中心</font>-兑换道具</td>
</tr>
<tr>
<td width="157" height="144" bgcolor="#F6F6F6" valign="top"><!--#include file=com_userleft.asp--></td>
<td valign="top" bgcolor="#F6F6F6">
<%if dhdj="" then%>
<table border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="575" height="25" colspan="6" bgcolor="#FFEEDF">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0">&nbsp; 当前我的虚拟货币：<%=rs("hb")%> 
KB，兑换道具需要你有足够的虚拟货币才可以，可以通过以下两种方式获得:</p>
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0">&nbsp; ①<font color="#FF0000">1天1元,包月30元,联系本站申请为VIP会员即可享受无限发布</font></p>
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0">&nbsp; 
②通过账号登陆本站或通过账号发布信息获得积分→将积分转换成虚拟货币KB→用虚拟货币KB兑换道具→用道具发布您的个性信息（例如：信息置顶、推荐图片、标题变色）</td>
</tr>
<tr>
<td width="575" height="25" class=td_muen colspan="6">
<p align="left">&nbsp;&nbsp; <font color=white>兑换道具</font></td>
</tr>
<tr>
<td height="25" align="left" width="54">
<p align="right"><img src="image/point05.gif" width="9" height="12"></td>
<td width="115" height="25" align="left">
兑换<font color="#0000FF">标题变色</font>道具</td>
<td width="166" height="25" align="left" colspan="2">
<select name="a" onchange="if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}">
<option value="?">请选择兑换的数量</option>
<%
i_1=hb/g_a
for i=1 to int(i_1)
%>
<option value="?a=<%=i%>&cnmai=1&hb=<%=hb%>&a_1=<%=a_1%>"><%=i%>个</option>
<%next%>
</select>
</td>
<td width="150" height="25" align="right"><font color="#0000FF"><%=g_a%></font> 
KB（虚拟货币）/个</td>
<td width="90" height="25" align="left">　</td>
</tr>
<tr>
<td height="25" align="left" width="54">
<p align="right"><img src="image/point05.gif"></td>
<td width="115" height="25" align="left">
兑换<font color="#0000FF">信息置顶</font>道具</td>
<td width="166" height="25" align="left" colspan="2">
<select name="b" onchange="if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}">
<option value="?">请选择兑换的数量</option>
<%
			i_2=hb/g_b
			for i=1 to int(i_2)
			%>
<option value="?b=<%=i%>&cnmai=1&hb=<%=hb%>&b_1=<%=b_1%>"><%=i%>个</option>
<%next%>
</select>
</td>
<td width="150" height="25" align="right">
<font color="#0000FF"><%=g_b%></font> KB（虚拟货币）/个</td>
<td width="90" height="25" align="left">
　</td>
</tr>
<tr>
<td height="25" align="left" width="54">
<p align="right"><img src="image/point05.gif"></td>
<td width="115" height="25" align="left">
兑换<font color="#0000FF">内容贴图</font>道具</td>
<td width="166" height="25" align="left" colspan="2">
<select name="c" onchange="if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}">
<option value="?">请选择兑换的数量</option>
<%
			i_3=hb/g_c
			for i=1 to int(i_3)
			%>
<option value="?c=<%=i%>&cnmai=1&hb=<%=hb%>&c_1=<%=c_1%>"><%=i%>个</option>
<%next%>
</select></td>
<td width="150" height="25" align="right">
<font color="#0000FF"><%=g_c%></font> KB（虚拟货币）/个</td>
<td width="90" height="25" align="left">
　
</td>
</tr>
<tr>
<td height="25" align="left" width="54">
<p align="right"><img src="image/point05.gif"></td>
<td width="115" height="25" align="left">
兑换<font color="#0000FF">通过验证</font>道具</td>
<td width="166" height="25" align="left" colspan="2">
<select name="d" onchange="if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}">
<option value="?">请选择兑换的数量</option>
<%
			i_4=hb/g_d
			for i=1 to int(i_4)
			%>
<option value="?d=<%=i%>&cnmai=1&hb=<%=hb%>&d_1=<%=d_1%>"><%=i%>个</option>
<%next%>
</select></td>
<td width="150" height="25" align="right">
<font color="#0000FF"><%=g_d%></font> KB（虚拟货币）/个</td>
<td width="90" height="25" align="left">
　</td>
</tr>
<tr>
<td width="575" height="25" colspan="6">&nbsp; 当前我可以消费的虚拟货币为：<%=hb%> KB </td>
</tr>
<tr>
<td width="54" height="25" class="td_muen">
<p align="right"><img src="image/point05.gif"></td>
<td width="115" height="25" class="td_muen"><font color="#FFFFFF">当前
兑换的道具</font></td>
<td width="166" height="25" colspan="2" class="td_muen">
<p align="center"><img src="image/point05.gif"><a href="userdhdj.asp"><font color="#FFFFFF">重新兑换</font></a></td>
<td width="240" height="25" colspan="2" class="td_muen">　</td>
</tr>
<form action="com_userdhdj.asp" method="POST">
<tr>
<td width="54" height="25">　</td>
<td width="115" height="25">标题道具</td>
<td width="54" height="25" align="right" ><%=request.cookies("a_1")%><input type="hidden" name="a" size="6" value="<%=request.cookies("a_1")%>">　</td>
<td width="112" height="25" >&nbsp;个</td>
<td width="240" height="25" colspan="2">　</td>
</tr>
<tr>
<td width="54" height="25">　</td>
<td width="115" height="25">信息置顶</td>
<td width="54" height="25" align="right"><%=request.cookies("b_1")%><input type="hidden" name="b" size="6" value="<%=request.cookies("b_1")%>">　</td>
<td width="112" height="25">&nbsp;个</td>
<td width="240" height="25" colspan="2">　</td>
</tr>
<tr>
<td width="54" height="25">　</td>
<td width="115" height="25">内容贴图</td>
<td width="54" height="25" align="right"><%=request.cookies("c_1")%><input type="hidden" name="c" size="6" value="<%=request.cookies("c_1")%>">　</td>
<td width="112" height="25">&nbsp;个</td>
<td width="240" height="25" colspan="2">
<input type="submit" value="确定兑换" name="dhdj"></td>
</tr>
<tr>
<td width="54" height="25" style="border-bottom-style: solid; border-bottom-width: 1" bordercolor="#CCCCCC">　</td>
<td width="115" height="25" style="border-bottom-style: solid; border-bottom-width: 1" bordercolor="#CCCCCC">通过验证</td>
<td width="54" height="25" style="border-bottom-style: solid; border-bottom-width: 1" bordercolor="#CCCCCC" align="right"><%=request.cookies("d_1")%><input type="hidden" name="d" size="6" value="<%=request.cookies("d_1")%>">　</td>
<td width="112" height="25" style="border-bottom-style: solid; border-bottom-width: 1" bordercolor="#CCCCCC">&nbsp;个</td>
<td width="240" height="25" colspan="2" style="border-bottom-style: solid; border-bottom-width: 1" bordercolor="#CCCCCC">　</td>
</tr>
<tr>
<td width="575" height="25" style="border-top-style: solid; border-top-width: 1" colspan="6">
<font color="#FF0000">&nbsp; 注意：在该页兑换道具时不要重复刷新页面，否则会导致兑换道具的数量混乱，且支付会不成功。</font></td>
</tr>
</form>
</table>
<%else
dim hb_all
if request("a")="" or request("b")="" or request("c")="" or request("d")="" then
response.write "<li>参数错误！"
response.write "<meta http-equiv=refresh content=""1;URL=com_userdhdj.asp"">"
response.end
end if
username=request.cookies("cnmai")("username")
hb_all=a*g_a+b*g_b+c*g_c+d*g_d
set rs=server.createobject("adodb.recordset")
sql = "select hb,jf,a,b,c,d from [com] where username='"&username&"'"
rs.open sql,conn,1,3
if rs("hb")<hb_all then
response.write "<li>你的虚拟货币太少，无法购买这么多道具！"
response.write "<meta http-equiv=refresh content=""2;URL=com_userdhdj.asp"">"
response.end
else
rs("hb")=int(rs("hb")-hb_all)
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("jf")=int(rs("jf")+hb_all/jf_4)
rs.update
end if
response.write "<li>购买道具成功，你的积分同时增加！"
response.write "<meta http-equiv=refresh content=""2;URL=com_user.asp"">"
end if%></td>
</tr>
</table>
</div><!--#include file="endcnmai.asp"-->
</body>
</html>
<%
rs.close
set rs=nothing
closedb
%>

