{if check_login_bool()}
<div class="fancy-purchase-panel panel shadowed" style="display: none">
  <div class="inner-boundary">
    <div class="inner-border clr">
      <div class="buycen clr">
        <div class="buynow">
          <h2 class="underlined"><a href="#" class="buynow-submit">在线支付</a></h2>
          <p>使用在线支付工具支付{$currency.symbol}<strong class="buynow-figure">{$item.price|string_format:"%.0f"}</strong>。<br /></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 type="submit" name="buy" value="{$lang.purchase}"/>
          </form>
        </div>
        <span class="or">or</span>
        <div class="prepaid">
          <h2 class="underlined"><a href="#" class="prepaid-submit">{assign var=foo value=$item.your_profit|string_format:"%.0f"}
          余额支付</a></h2>
          <p>使用您的余额{$currency.symbol}<strong>{$smarty.session.user.total|string_format:"%.2f"}</strong>支付{$currency.symbol}<strong class="buynow-figure">{$item.prepaid_price|string_format:"%.0f"}</strong>。(<a href="/{$languageURL}deposit/">点击充值</a>)
          </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 type="submit" name="buy" value="{$lang.purchase}"/>
          </form>
        </div>
      </div>
      <a class="close-panel" href="#">关闭</a>
    </div>
  </div>
</div>
{else}
<div class="account-required panel shadowed" style="display: none">
  <div class="inner-boundary clr">
    <h2>你必须登录之后才能购买作品</h2>
    <div class="choices clr">
      <div class="choicescen clr">
        <a href="/{$languageURL}sign_up/" class="btntheme2 cenobj">创建账号</a>
        <span class="cenobj">or</span>
        <form class="cenobj" 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="btntheme2">登录</a>
        </form>
      </div>
    </div>
    <a class="close-panel" href="#">关闭</a>
  </div>
</div>
{/if} 