<%template _header%>
<!--header end-->

<!--TheCurrent start-->
<div id="foruminfo">
	<div class="userinfo">
		<h2><a href="{config.forumurl}" class="home">{config.forumtitle}</a> <span><a href="usercp.aspx">用户中心</a></span><strong>积分兑换</strong></h2>	</div>
	<div class="forumstats">
		<div id="search">
				<%template _quicksearch%>
		</div>
	</div>
</div>
<!--TheCurrent end-->

<!--主体-->
<div class="controlpannel">
   <%template _menu%>
	<div class="pannelcontent">
		<div class="pcontent">
			<div class="panneldetail">
				<%template _scoremenu%>	
				<div class="pannelbody">
					<div class="pannellist">
					<%if page_err==0%>
					{jscreditsratearray}
						<%if ispost%>
							<%template _msgbox%>
						<%else%>
						<form action="" method="post" ID="Form1">
						<ul>
							<li class="paychange"><strong>当前帐户</strong></li>
							<li class="paychange">
								<%if {score[1]}!=""%>
								{score[1]}: <em>{user.extcredits1}</em>&nbsp;&nbsp;
								<%/if%>
								<%if {score[2]}!=""%>
								{score[2]}: <em>{user.extcredits2}</em>&nbsp;&nbsp;
								<%/if%>
								<%if {score[3]}!=""%>
								{score[3]}: <em>{user.extcredits3}</em>&nbsp;&nbsp;
								<%/if%>
								<%if {score[4]}!=""%>
								{score[4]}: <em>{user.extcredits4}</em>&nbsp;&nbsp;
								<%/if%>
								<%if {score[5]}!=""%>
								{score[5]}: <em>{user.extcredits5}</em>&nbsp;&nbsp;
								<%/if%>
								<%if {score[6]}!=""%>
								{score[6]}: <em>{user.extcredits6}</em>&nbsp;&nbsp;
								<%/if%>
								<%if {score[7]}!=""%>
								{score[7]}: <em>{user.extcredits7}</em>&nbsp;&nbsp;
								<%/if%>
								<%if {score[8]}!=""%>
								{score[8]}: <em>{user.extcredits8}</em>&nbsp;&nbsp;
								<%/if%>
							</li>
						</ul>
						进行兑换操作: 将数量&nbsp;
						<input name="paynum" type="text" class="colorblue" id="paynum" onfocus="this.className='colorfocus';" onblur="this.className='colorblue';" value="100" size="10" />&nbsp;的&nbsp;
						<select name="extcredits1" id="extcredits1" style="width:120px;">
						<option value="0">请选择</option>
						<%loop extcredits extcreditspaylist%>
						<option value="{extcredits[id]}">{extcredits[name]}</option>
						<%/loop%>
						</select>&nbsp;转换为&nbsp;<select name="extcredits2" id="extcredits2"  style="width:120px;">
						<option value="">请选择</option>
						<%loop extcredits2 extcreditspaylist%>
						<option value="{extcredits2[id]}">{extcredits2[name]}</option>
						<%/loop%>
                        </select>
						<br/><br/>
						验证用户密码: <input name="password" type="password" id="password" size="20" class="colorblue" onfocus="this.className='colorfocus';" onblur="this.className='colorblue';" />
						<div class="hintinfo">充值时将根据论坛当前设置({creditstax})扣除交易税</div>
						<input type="submit" name="Submit" value="确定" class="sbutton" ID="Submit1"/>
						&nbsp;&nbsp;
						<input class="sbutton" type="button" name="Input" value=" 计 算 " onclick="if(this.form.extcredits1.options[this.form.extcredits1.selectedIndex].value != 0 && this.form.extcredits2.options[this.form.extcredits2.selectedIndex].value != 0){alert('接收者的所得为 '+this.form.extcredits2.options[this.form.extcredits2.selectedIndex].text + ':'+Math.round(this.form.paynum.value*(creditsrate[this.form.extcredits1.options[this.form.extcredits1.selectedIndex].value]/creditsrate[this.form.extcredits2.options[this.form.extcredits2.selectedIndex].value] *(1-{creditstax}))*100)/100)}else{alert('请完整填写和选择进行兑换的积分!')}"/>
						</form>
						<%/if%>
						</div>
					<%else%>
					<%template _usercperrmsgbox%>
					<%/if%>
			  </div>
			</div>
		</div>
	</div>
</div>
<!--主体-->
</div>
<%template _copyright%>
<%template _footer%>
