<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
		<title>积分钱包-会员中心-<?php echo $cfg_webname;?></title>
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/web/font/css/font-awesome.min.css">
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/web/css/bootstrap.min.css">
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/web/css/style.css">
		<script src="<?php echo $cfg_cmsurl;?>/static/web/js/jquery.min.js"></script>
	</head>
	<body class="body-bg">
		<?php pasterTempletDiy('top.htm');?>
		<main class="container py-3">
			<div class="row">
				<?php include(DEDEMEMBER."/templets/menu.htm");?>
				<div class="col-md-9">
					<div class="pannel-main-container shadow-sm rounded">
						<nav class="navbar navbar-expand-lg p-0">
							<ul class="breadcrumb mr-auto">
								<li class="breadcrumb-item"><a href="<?php echo $cfg_memberurl;?>/">会员中心</a></li>
								<li class="breadcrumb-item">积分钱包</li></li>
							</ul>
							<span class="navbar-text"><a href="javascript:history.back(-1);" class="btn btn-outline-success btn-sm">返回</a></span>
						</nav>
						<div class="alert alert-success"><?php echo $cfg_ml->GetSta();?></div>
						<?php if ($cfg_money_scores > 0) {?>							
						<?php $canCav = floor($cfg_ml->fields['scores'] / $cfg_money_scores);?>
						<div class="pb-3">
							<p>积分兑换金币（<?php echo "兑换价格{$cfg_money_scores}积分/个，您目前可兑换金币{$canCav}";?>）</p>
							<form name="formrank" action="index_do.php?dopost=money2s&fmdo=user" method="post">
								<table class="table">
									<tbody>
										<tr>
											<td width="20%">兑换数量：</td>
											<td><input type="text" name="money" id="money" class="form-control w-25" value="<?php echo $canCav;?>"></td>
										</tr>
										<tr>
											<td></td>
											<td><button type="submit" class="btn btn-success btn-sm">兑换</button></td>
										</tr>
									</tbody>
								</table>
							</form>
						</div>
						<?php }?>
						<div class="pb-3">
							<h4 class="mb-3">积分充值</h4>
							<form name="formrank" action="check_card.php" method="post">
								<table class="table">
									<tbody>
										<tr>
											<td width="20%">积分密码：</td>
											<td><input type="text" name="cardid" id="cardid" class="form-control w-25"></td>
										</tr>
										<tr>
											<td>验证码</td>
											<td>
												<input type="text" name="vdcode" id="vdcode" class="form-control text-uppercase d-inline-block w-25">
												<img src="/apps/vdimgck.php" title="验证码" onclick="this.src=this.src+'?'">
											</td>
										</tr>
										<tr>
											<td></td>
											<td><button type="submit" class="btn btn-success btn-sm">充值</button></td>
										</tr>
									</tbody>
								</table>
							</form>
						</div>
						<div class="pb-3">
							<h4 class="mb-3">购买金币</h4>
							<form name="f1" action="buy_action.php" method="post">
								<input type="hidden" name="product" value="card">
								<table class="table">
									<tr>
										<th width="8%">选择</th>
										<th width="30%">产品名称</th>
										<th width="30%">金币数量（个）</th>
										<th>价格（元）</th>
									</tr>
									<tbody>
										<?php echo $moneycards;?>
									</tbody>
								</table>
								<div class="text-center"><button type="submit" class="btn btn-success btn-sm">购买</button></div>
							</form>
						</div>
						<div>
							<h4 class="mb-3">账号升级</h4>
							<form name="f1" action="buy_action.php" method="post">
								<input type="hidden" name="product" value="member">
								<table class="table">
									<tr>
										<th width="8%">选择</th>
										<th width="23%">产品名称</th>
										<th width="23%">会员类型</th>
										<th width="23%">时限（天）</th>
										<th>价格（元）</th>
									</tr>
									<tbody>
										<?php echo $membertypes?>
									</tbody>
								</table>
								<div class="text-center"><button type="submit" class="btn btn-success btn-sm">购买</button></div>
							</form>
						</div>
					</div>
				</div>
			</div>
		</main>
		<?php pasterTempletDiy('foot.htm');?>
	</body>
</html>