{include file="$template_path/html/header.html"}
</head>
<body class="">
{include file="$template_path/html/user-header-self.html"}

<div class="space-items clear bg-lgray b-b" id="items">
  <div class="container">
    <div class="row">
      <div class="container m-b-md text-center">
        <ul class="nav navbar-nav space-nav ">
          {include file="$template_path/users/tabsy.html"}
        </ul>

      </div>
    </div>
  </div>
</div>

<section class="clearfix">
  <div class="container pos-rlt p-t-md m-t-sm m-b-lg m-xs-t-none m-xs-b-none">


    <div class="row">

      {$errorMessage}
      <div class="col-xs-12 col-sm-12 col-md-8">



        <div class="m-b-lg m-xs-b h3">
          <span class="font-thin h3-xs text-black">发起提现请求</span>
          <span class="badge bg-warning">提现不可低于100元，七个工作日内到账。</span>
        </div>

        <section class="panel b-a b-2x no-radius">
          <div class="panel-body">

            {if $checkWithdraw==0}
            <div class="sideblock" id="prinotip" style="display:none;">
              <span class="tiptxt">您的余额不足提现的最低额度（100元） 。</span>
            </div>
            <div class="sideblock" id="window">
              <form class="horizontal-form" action="" method="post">
                <fieldset>
                  <div class="form-group">
                    <label for="amount" class="block">提现金额</label>
                    <div class="clearfix">
                      <div class="radio i-checks pull-left">
                        <label>
                          <input checked="checked" id="maximum_at_period_end_false" name="maximum_at_period_end" value="false" type="radio">
                          <i></i>
                        </label>
                      </div>
                      <div class="col-xs-6 col-md-4">
                        <input class="form-control" id="amount" name="amount" value="{$user.earning|string_format:"%.2f"}" type="text">
                      </div>
                    </div>
                    <div class="block inputs radio i-checks">
                      <label for="maximum_at_period_end_true">
                        <input id="maximum_at_period_end_true" name="maximum_at_period_end" value="true" type="radio">
                        <i></i>
                        <strong class="strong">全部收入</strong>
                      </label>
                      <small>如果您选择了<strong>全部收入</strong>选项，申请提现数额不得低于100元，否则系统将不予处理。</small>
                    </div>
                  </div>
                  <div class="line line-dashed b-b line-lg pull-in"></div>
                  <div class="form-group">
                    <label for="service_paymethod">提现方式</label>
                    <div class="radio i-checks inputs">
                      <label for="service_alipay" class="block p-b-sm">
                        <input id="service_alipay" name="service" value="alipay" type="radio"><i></i>
                        支付宝(适用于中国大陆作者)
                        <small>最低￥100.00</small>
                      </label>
                      <label for="service_paypal" class="block p-b-sm">
                        <input id="service_paypal" name="service" value="paypal" type="radio"><i></i>
                        PayPal(适用于中国大陆以外作者)
                        <small>最低$100.00</small>
                      </label>
                      <label for="service_payoneer" class="block p-b-sm">
                        <input id="service_payoneer" name="service" value="payoneer" type="radio"><i></i>
                        银行转账（暂未开通）
                      </label>
                      <label for="service_swift" class="block p-b-sm">
                        <input id="service_swift" name="service" value="swift" type="radio"><i></i>
                        国际转账（暂未开通）
                        <small>需手续费￥200.00</small>
                      </label>
                    </div>
                  </div>
                  <div class="line line-dashed b-b line-lg pull-in"></div>
                  <div class="form-group hidden dependent paypal-alipay">
                    <label>地址或账号</label>
                    <div id="payment_email_address_field" class="inputs">
                      <input id="payment_email_address" class="form-control" name="payment_email_address" value="" type="text">
                    </div>
                  </div>
                  <div class="form-group hidden dependent paypal-alipay">
                    <label>确认地址或帐号</label>
                    <div class="inputs">
                      <input id="payment_email_address_confirmation" class="form-control" name="payment_email_address_confirmation" value="" type="text">
                    </div>
                  </div>
                  <div id="payoneer-notice" class="alert alert-warning alert-block payoneer form-group hidden dependent">
                    <button type="button" class="close" data-dismiss="alert">×</button>
                    <h4><i class="fa fa-bell-alt"></i>银行转账（暂未开通）!</h4>
                    <p>银行转账（暂未开通），欲知详情请<a href="/support/">联系我们</a></p>
                  </div>
                  <div class="form-group">
                    <label for="taxable_chinese_resident">中国大陆纳税者</label>
                    <div class="radio i-checks inputs">
                      <label for="taxable_chinese_resident" style="padding-left: 10px">
                        <input id="taxable_chinese_resident" name="taxable_chinese_resident" value="true" type="checkbox"><i></i>
                        <strong>我是中国大陆纳税主体</strong>
                      </label>
                      <div id="taxation-details" class="hidden dependent m-t-sm">
                        <label for="hobbyist_true">
                          <input checked="checked" id="hobbyist_true" name="hobbyist" value="true" type="radio" /><i></i>
                          设计开发是我的业余爱好
                        </label>
                        <label for="hobbyist_false">
                          <input id="hobbyist_false" name="hobbyist" value="false" type="radio"><i></i>
                          设计开发是我(们)的业务
                        </label>
                      </div>
                    </div>
                  </div>
                  <div class="line line-dashed b-b line-lg pull-in"></div>
                  <div class="tax-number form-group hidden dependent">
                    <label for="cbn">组织机构代码</label>
                    <div class="inputs">
                      <input id="cbn" name="cbn" value="" class="ipttheme" type="text">
                    </div>
                  </div>
                  <div class="tax-number form-group hidden dependent">
                    <label for="ccn">营业执照号码</label>
                    <div class="inputs">
                      <input id="ccn" name="ccn" value="" class="ipttheme" type="text">
                    </div>
                  </div>
                </fieldset>
                <div class="alert alert-warning alert-block swift-notice notice hidden dependent">
                  <button type="button" class="close" data-dismiss="alert">×</button>
                  <h4><i class="fa fa-bell-alt"></i>国际转账（暂未开通）!</h4>
                  <p><input id="swift-transaction-fee" value="35.00" type="hidden"><input id="max-withdrawal-amount-less-fee" value="-35.00" type="hidden">请注意国际转账由银行统一收取35美元手续费，折合人民币210元，{$domain}不收取任何附加费用，因费用高昂，我们不建议您使用此种方式，除非您确实有极其迫切的需求。</p>
                </div>
                <div class="form-submit"><input type="hidden" name="submit" value="submit" />
                  <button id="txbtn" type="submit" class="btn btn-success">提交提现请求</button>
                </div>
              </form>
            </div>
            {else}
            <div class="sideblock">
              <span class="tiptxt">你的上一次提现请求尚未处理完毕，暂时不能再次提现，若有疑问请联系你的专属小编[{$service.user_name}]，感谢配合。</span>
            </div>
            {/if}

          </div>
        </section>

        <script>{literal}
        seajs.use(["jq", "modules/pay"], function($, pay){
          var pri = "{/literal}{$user.earning|string_format:"%.2f"}{literal}";
          pri = parseInt(pri);
          if(pri < 100){
            $("#txbtn").attr("disabled", "disabled").addClass("disabled");
            $("#prinotip").show();
            $("#window").hide();
          }
          pay.init();
        });
        {/literal}</script>

      </div>



      <div class="col-xs-12 col-sm-12 col-md-4">



        <div class="m-b-lg m-xs-b h3">
          <a href="/index.php/deposit/" class="btn btn-ghost-danger btn-rounded btn-xs-xs pull-right hidden-xs hidden-sm">
            充值
          </a>
          <span class="font-thin h3-xs text-black">我的余额</span>
        </div>

        <section class="panel b-a b-2x no-radius">
          <div class="panel-body panel-shadow">
            <h4>您的账户余额: </h4>
            <h2 class="h2 text-black fm-sf"><small>￥</small>{$user.total|string_format:"%.2f"}</h2>
            <p class="block m-t-sm">（包括充值余额和收入余额，只能提现收入余额）。</p>
          </div>
          <footer class="panel-footer bg-success text-center">
            <div class="row pull-out">
              <div class="col-xs-6">
                <div class="padder-v">
                  <span class="m-b-xs h3 block text-white"><small class="text-white">{$currency.symbol}</small>{$user.deposit|string_format:"%.2f"}</span>
                  <small class="text-white">充值余额</small>
                </div>
              </div>
              <div class="col-xs-6 dk">
                <div class="padder-v">
                  <span class="m-b-xs h3 block text-white"><small class="text-white">{$currency.symbol}</small>{$user.earning|string_format:"%.2f"}</span>
                  <small class="text-white">收入余额</small>
                </div>
              </div>
            </div>
          </footer>
        </section>



      </div>



    </div>



  </div>
</section>

{include file="$template_path/html/user-footer.html"}
</body>
</html>