<!DOCTYPE html>
<html>
<head>
  <meta charset="<?php echo $cfg_soft_lang; ?>">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <script src="<?php echo $cfg_cmsurl; ?>/static/web/js/jquery.min.js"></script>
  <link rel="stylesheet" href="<?php echo $cfg_cmsurl; ?>/static/web/css/bootstrap.min.css">
  <link href="<?php echo $cfg_cmsurl; ?>/static/web/font/css/font-awesome.min.css" rel="stylesheet">
  <link rel="stylesheet" href="<?php echo $cfg_cmsurl; ?>/static/web/css/style.css">
  <link rel="stylesheet" href="<?php echo $cfg_cmsurl; ?>/static/web/css/member.css">
  <title>钱包积分 - 会员中心 - <?php echo $cfg_webname; ?></title>
</head>
<body>
  <?php include(DEDEMEMBER."/templets/top_login.htm"); ?>
  <main class="member">
    <div class="container-fluid pannel">
      <div class="container">
        <div class="row">
          <div class="pannel-main col-md-12 mt-3 mb-3">
            <div class="pannel-main-container">
              <nav class="navbar navbar-expand-lg">
                <ol class="breadcrumb mb-0 mr-auto">
                  <li class="breadcrumb-item"><a href="<?php echo $cfg_memberurl;?>/">会员中心</a></li>
                  <li class="breadcrumb-item">钱包积分</li>
                  </li>
                </ol>
                <span class="navbar-text">
                  <a href="javascript:history.back(-1);" class="btn btn-sm">返回</a>
                </span>
              </nav>
              <div id="mainCp">
                <div class="alert alert-success" role="alert">
                  <?php echo $cfg_ml->GetSta($dsql); ?>
                </div>
                <!--内容消息提示 -->
                <?php
                  if($cfg_money_scores > 0) {
                ?>
                <div class="postForm">
                  <?php
                   $canCav = floor($cfg_ml->fields['scores'] / $cfg_money_scores);
                ?>
                  <span>用积分兑换金币 &nbsp;(<?php echo "兑换价格：{$cfg_money_scores} 积分/个，您目前可兑换金币数量：{$canCav} 个"; ?>)</span>
                  <form name="formrank" action="index_do.php?dopost=money2s&fmdo=user" method="post">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
                      <tbody>
                        <tr>
                          <td width="15%" align="right" valign="top">兑换数量：</td>
                          <td width="35%">
                            <input name="money" type="text" id="money" size="38" class="form-control" value="<?php echo $canCav; ?>" /></td>
                          <td align='left'><button class="btn btn-success" type="submit">兑换</button></td>
                        </tr>
                      </tbody>
                    </table>
                  </form>
                </div>
                <?php } ?>
                <div class="postForm">
                  <span class="meTitle">用点卡充值</span>
                  <form name="formrank" action="check_card.php" method="post">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
                      <tbody>
                        <tr>
                          <td width="15%" align="right" valign="top">点卡密码：</td>
                          <td><input name="cardid" type="text" id="cardid" size="38" class="form-control" style="width:200px" /></td>
                        </tr>
                        <tr>
                          <td align="right" valign="top">验证码：</td>
                          <td><input name="vdcode" type="text" id="vdcode" size="8" class="intxt" style='width:50px;text-transform:uppercase;' />
                            <img src="../apps/vdimgck.php" alt="看不清点击更换" align="absmiddle" style="cursor:pointer" onclick="this.src=this.src+'?'" />
                          </td>
                        </tr>
                      </tbody>
                      <tfoot>
                        <tr>
                          <td align="right" valign="top"></td>
                          <td><button class="btn btn-success" type="submit">充值</button></td>
                        </tr>
                      </tfoot>
                    </table>
                  </form>
                </div>
                <div class="postForm">
                  <span class="meTitle">购买新点卡:</span>
                  <form name="f1" action="buy_action.php" method="post">
                    <input type="hidden" name="product" value="card" />
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
                      <tr style='height:28px;background:#F9FEE9;'>
                        <th width="10%">选择</th>
                        <th>点卡类型</th>
                        <th width="15%">金币数量</th>
                        <th width="15%">购买价格</th>
                      </tr>
                      <tbody>
                        <?php echo $moneycards;?>
                      </tbody>
                    </table>
                    <button class="btn btn-success" type="submit">购买</button>
                  </form>
                </div>
                <div class="postForm mt-3">
                  <span class="meTitle">会员升级</span>
                  <form name="f1" action="buy_action.php" method="post">
                    <input type="hidden" name="product" value="member" />
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
                      <thead>
                        <tr>
                          <th colspan='5' style='text-align:left;padding-left:10px;height:24px;line-height:24px;'>会员升级:
                          </th>
                        </tr>
                      </thead>
                      <tr style='height:28px;background:#F9FEE9;'>
                        <th width="10%">选择</th>
                        <th>产品名称</th>
                        <th width="12%">会员类型</th>
                        <th width="12%">时限(天)</th>
                        <th width="10%">价格</th>
                      </tr>
                      <tbody>
                        <?php echo $membertypes?>
                      </tbody>
                    </table>
                    <button class="btn btn-success" type="submit">购买</button>
                  </form>
                </div>
              </div>
              <!--主操作区域 -->
            </div>
          </div>
        </div>
      </div>
    </div>
  </main>
  <?php include(DEDEMEMBER."/templets/footer.htm"); ?>
</body>
</html>