<? if (!defined('ROOT')) exit('Can\'t Access !'); ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title><?=$this->title?></title>
<meta name="keywords" content="<?=$this->keywords?>" />
<meta name="description" content="<?=$this->description?>" />
<link rel="stylesheet" href="<?=$this->tempdir?>images/header.css" type="text/css" />
<link rel="stylesheet" href="<?=$this->tempdir?>images/member.css" type="text/css" />
<script type="text/javascript" src="<?=$this->tempdir?>images/member.js" ></script>
<script type="text/javascript" src="<?=$this->appdir?>jquery.js" ></script>
<script type="text/javascript" src="<?=$this->appdir?>public.js" ></script>
<link rel="stylesheet" href="<?=$this->appdir?>thickbox/style.css" type="text/css" />
<script type="text/javascript" src="<?=$this->appdir?>thickbox/thickbox.js" ></script>
</head>
<body>
<? include template('member_header','wjgw/member'); ?>
<div id="container" class="win1000">
  <div class="wraper-border"></div>
  <div id="wraper" class="clearfix"> 
<? include template('member_left','wjgw/member'); ?>
    <div id="right-con-user" class="right">
    <? if($this->user->isrepass()) { ?>
     <div class="title clearfix">
        <h2 class="balance-h2">我要提现</h2>
        <div class="cashier-nav">
          <ol>
            <li class="current">1、选择提现账户 →</li>
            <li>2、确认提现金额 →</li>
            <li>3、提交提现申请 →</li>
            <li class="last">4、提现成功</li>
          </ol>
        </div>
      </div>
      <br />
      <form id="subform" name="subform" method="post" enctype="multipart/form-data" action="" onsubmit="return moneyform()">
        <input type="hidden"  value="money" name="bigin"/>
        <div class="uppwd" style="padding-left:30px;">
         <div class="to-cash">
          <div class="to-cash-tit"><span>选择提现账户</span>
          <? if(5-count($this->bank)>0) { ?>  <div class="add-banks"> 
          <a href="<?=Purl("?mod=member&act=addbank"); ?>&keepThis=true&TB_iframe=true&height=315&width=480" title="添加收款账户" class="thickbox">添加银行卡</a>（还可以添加 <font color="#c92707" id="varableNum"><?=5-count($this->bank); ?></font> 个） </div><? } ?>
          </div>
          <table cellpadding="0" cellspacing="0" border="0">
            <tbody>
              <tr>
                <th width="200px"><div style="text-align:left; padding-left:21px;">银行名称</div></th>
                <th width="200px">银行卡号</th>
                <th width="200px">开户地址</th>
                <th width="108px">操作</th>
              </tr>
            </tbody>
            
            <? if(!is_array($this->bank)) { ?>
            <tbody id="hasSetBanks">
              <tr id="noSetTr">
                <td colspan="4" align="center" id='nobank'>您还没有设置用于提现的银行账户！<a href="<?=Purl("?mod=member&act=addbank"); ?>&keepThis=true&TB_iframe=true&height=315&width=480" title="添加收款账户" class="thickbox">添加银行卡</a></td>
              </tr>
            </tbody>
            <? } ?>
            
            
            <tbody>
            <? $i=1; ?>       <? if(is_array($this->bank)) { foreach($this->bank as $v) { ?>              <tr>
                <td width="200px" style="padding-left:20px;" id='nobank'>
                <input name="bankid" type="radio" value="<?=$v['id']?>" <? if($i==1) { ?>checked<? } ?>/> <?=$v['bankname']?>
                </td>
                <td width="200px"><?=$v['bankcard']?></td>
                <td width="200px"><?=$v['bankadd']?></td>
                <td width="108px">
                  <a href="<?=Purl("?mod=member&act=addbank&id=".$v['id']); ?>&keepThis=true&TB_iframe=true&height=315&width=480" title="编辑收款账户" class="thickbox">编辑</a> 
                  <a href="<?=Purl("?mod=member&act=addbank&get=del&id=".$v['id']); ?>" onclick="return remind();">删除</a>
                </td>
              </tr>
              <? $i++; ?>       <? } } ?>                                  
            </tbody>
            
            
           </table>
          
          </div>
          
          
         <div class="to-cash">
          <div class="to-cash-tit"><span>确认提现金额</span>
          </div>
          
          <dl class="clearfix" style="padding-top:35px;">
            <dt>可提现金额：</dt>
            <dd><span style="color:#c92707;font-size:20px;"><?=fnum($this->member['keti']); ?></span> <span style="font-size:12px;">元</span></font>
            <span id="banktip"></span>
            </dd>
          </dl>
          
          
          <dl class="clearfix">
            <dt><span class="red">*</span>&nbsp;请输入提现金额</dt>
            <dd>
              <input type="text" class="inw inp" style="width:80px" id="howmoney" name="howmoney" onblur="checkmoney()">
              元 <span id="moneytip"></span>
            </dd>
          </dl>
          <dl class="clearfix">
            <dt>&nbsp;</dt>
            <dd>
             <? if($this->moatm!='') { ?> <span style="color:#F00; font-size:12px;"><?=$this->moatm; ?></span>  <? } else { ?> <label class="butt" id="butt"> <?=config::form('submit','确认提现','submit','','class=\'btns\'');?> </label><? } ?>
            </dd>
          </dl>
          </div>
          
          

        </div>
      </form>
    <? } else { ?>
     <div class="title clearfix">
        <h2 class="balance-h2">二次验证提现密码</h2>
      </div>
      <form id="subform" name="subform" method="post" enctype="multipart/form-data" action="" onsubmit="return repassform()">
            <input type="hidden"  value="repass" name="bigin"/>
      <br />
      <br />
        <div class="uppwd">
          <dl class="clearfix">
            <dt>您的用户名</dt>
            <dd><strong><?=$this->member['username']?></strong> <font style="font-size:12px; color:#F60">(如果没有修改过提现密码，初始化提现密码为第一次注册密码！)</font></dd>
          </dl>
          <dl class="clearfix">
            <dt><span class="red">*</span>&nbsp;输入提现密码验证</dt>
            <dd>
              <input type="password" class="inw inp" id="repass" name="repass" onblur="checkloginrepass()"> <span id="repasstip"></span></dd>
          </dl>
          <dl class="clearfix">
            <dt>&nbsp;</dt>
            <dd>
              <label class="butt" id="butt"> <?=config::form('submit','马上验证','submit','','class=\'btns\'');?> </label>
            </dd>
          </dl>
        </div>
      </form>
    <? } ?>
    </div>
  </div>
  <div class="wraper-border"></div>
</div>
<? include template('member_footer','wjgw/member'); ?>
<script language="javascript">
$("document").ready(function(){
  $("#<?=$this->action?>").addClass('open');
});
</script>
</body></html>