{if check_login_bool()}
<div class="fancy-purchase-panel box box-radius-3x" style="display: none">
  <div class="inner-boundary">
    <div class="inner-border">
      <div class="buycen">

        <div class="box-header">
          <h2>支付方式</h2>
          <small>在线购买{$item.name}</small>
        </div>
        <div class="box-tool" style="top: 24px;">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span class="text-lt" aria-hidden="true">
              <i class="icon-cross2 text-lg"></i>
            </span>
          </button>
        </div>
        <div class="text-center b-t">
          <div class="row-col">
            <div class="row-cell p-x p-y-md">
              <div class="inline m-b">
                <a class="btn btn-icon btn-social w-64 rounded btn-social-colored orange-700" title="支付宝在线支付">
                  <i class="icon-zfb text-lg blue-400" style="vertical-align: -4px;"></i>
                  <i class="icon-zfb text-lg skin"></i>
                </a>
              </div>
              <div class="buynow">
                <h3 class="m-b"><a href="#" class="buynow-submit">在线支付</a></h3>
                <p>使用在线支付工具支付{$currency.symbol}<strong class="buynow-figure price text-danger" style="vertical-align: 0;">{$item.price|string_format:"%.0f"}</strong></p>
                <form id="buynow-form" action="/{$languageURL}items/{$item.id}/" method="post">
                  <input type="hidden" name="licence" id="licence" value="regular" />
                  <input type="hidden" name="pay_method" value="paymethod" />
                  <input class="none" type="submit" name="buy" value="{$lang.purchase}"/>
                </form>
                <h3>
                  <a href="#" class="buynow-submit btn btn-sm btn-outline b-skin text-skin">在线支付</a>
                </h3>
              </div>
            </div>
            <div class="row-cell p-x p-y-md dker">
              <div class="inline m-b">
                <a class="btn btn-icon btn-social w-64 rounded btn-social-colored" title="使用账户余额支付">
                  <i class="icon-yueee text-lg orange-600"></i>
                  <i class="icon-yueee text-lg red"></i>
                </a>
              </div>
              <div class="prepaid">
                <h3 class="m-b">
                  <a href="#" class="prepaid-submit pos-rlt">{assign var=foo value=$item.your_profit|string_format:"%.0f"}
                  余额支付
                    <b class="label text-xs rounded danger up m-l-xs" style="position: absolute; top:6px;">优惠</b>
                  </a>
                </h3>
                <p>使用您的余额{$currency.symbol}
                  <strong class="price" style="vertical-align: 0;">{$smarty.session.user.total|string_format:"%.2f"}</strong>
                  支付{$currency.symbol}
                  <strong class="buynow-figure price text-danger" style="vertical-align: 0;">{$item.prepaid_price|string_format:"%.0f"}</strong>
                </p>
                <form id="prepaid-form" action="/{$languageURL}items/{$item.id}/" method="post">
                  <input id="stored-item-name" type="hidden" value="{$item.name|escape}">
                  <input id="stored-item-category" type="hidden" value="{foreach from=$item.categories item=e}{foreach from=$e item=c name=foo}{if !$smarty.foreach.foo.last}{$categories[$c].name}{/if}{/foreach}{/foreach}">
                  <input type="hidden" name="licence" id="licence" value="regular" />
                  <input type="hidden" name="pay_method" value="deposit" />
                  <input class="none" type="submit" name="buy" value="{$lang.purchase}"/>
                </form>
                <h3>
                  <a href="#" class="prepaid-submit btn btn-sm btn-outline b-skin text-skin">{assign var=foo value=$item.your_profit|string_format:"%.0f"}
                    余额支付
                  </a>
                </h3>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
{else}
<div class="modal-content">
  <div class="modal-header no-borders">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
      <span class="text-lt" aria-hidden="true">
        &times;
      </span>
    </button>
  </div>
  <div class="modal-body p-b-lg">

    <div class="row">

      <h2 class="text-center text-black m-b-lg m-t-none h2-xs">
        请登录之后才能继续操作
      </h2>

      <div class="col-xs-5 col-xs-offset-1">
        <a href="/{$languageURL}sign_up/" class="btn btn-outline b-skin text-skin btn-lg btn-index btn-block">创建账号</a>

      </div>

      <div class="col-xs-5">
        <!--<form id="licence" action="/{$languageURL}items/{$item.id}/" method="post">
          <input type="hidden" name="licence" id="licence" value="regular" />
          <a href="javascript:;" onclick="document.getElementById('licence').submit();" class="btn btn-outline text-danger b-danger btn-lg btn-index btn-block">登录</a>
        </form>-->
        <a href="/{$languageURL}sign_in/" class="btn btn-outline text-danger b-danger btn-lg btn-index btn-block">登录</a>
      </div>

    </div>

  </div>
</div>
{/if}