<!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 http-equiv="Content-Type" content="text/html; charset={$charset}" />
<title>{$seo['title']}</title>
<meta name="Keywords" content="{$seo['keywords']}">
<meta name="Description" content="{$seo['description']}">
<link href="templates/{$CFG[tplname]}/style/user.css" type="text/css" rel="stylesheet" />
</head>
<body>
<!--{template header}-->
<div class="wrapper">
	<!-- 主体 -->
    <!--{template member_left_com}-->
	<div class="col_main">
    <!--{template member_topmenu}-->
     <form name="post" method="post">
     <div class="post_li f14">
        <ul>  
        <li><h3>{$CFG['cardname']}号</h3><input name="card" type="text" size="10" id="card" class="inputs fb f16" value="{$card}" /> <input type="submit" name="button" id="btnSendCode" class="btn_1" value="验证" /></li>
        {if ($cardname>0)}
        <li><h3>手机号</h3>{$cardinfo[phone]}</li>
        <li><h3>到店消费</h3><font class="f3f">{$xf[xf1]}</font><span class="f99">次</span><span class="pad15">总计消费 <span class="pad5 f3f">￥{$xf[xf2]}</span></span></li>
        {/if}
        </ul>
     </div>
     </form>
     {if ($cardname>0)}
     <div class="post_li f14" style="padding-top:0;">
  <form name="post1" method="post" action="member.php?act=act_addpay">
        <li><h3>消费金额</h3><input name="money" type="text" size="10" id="money" class="inputs fb fe43 f16" onKeyUp="changeValue()" value="" /> 元</li>
        
        <li><h3>{$CFG['cardname']}折扣</h3><input name="zekou" type="text" size="10" id="zekou" value="0" class="inputs fb" disabled="disabled" />&nbsp;折</li>
        <li><h3>赠送积分</h3><input name="jifen" type="text" size="10" id="jifen" value="0" class="inputs fb" disabled="disabled" />&nbsp;分{if (strpos($cominfo['jf_day'][0],strval(",".$todays.","))!==false)}&nbsp;<span class="pad10 f12 f99">[<strong class="fe43">{$todays}</strong>]号{$CFG['cardname']}积分优惠日，可享受<strong class="fe43">{$cominfo['jf_day'][1]}</strong>倍积分</span>{/if}</li>
        <div class="clearfix h_15"></div>
        <li><h3 class="fe43">持卡会员价</h3><strong class="fe43 f22" id="siso">0</strong>&nbsp;元</li>
        <div class="clearfix"></div>
        <li class="t_c"><div class="clearfix h_15"></div>
           <input type="hidden" name="cardid" id="cardid" value="{$card}" />
<input type="submit" class="btn_1" name="buttonid" value="确认支付" id="buttonid" />
        </li>
      </ul>
  </form>
      </div>
      {/if}
      
        <!--{template member_right}-->　
    </div>
    </div>
	<!--{template footer}-->
    <script>
var input1pre;
		 var input2pre;
         function changeValue() {
             var val1 = document.getElementById('money').value;
             var val2 = document.getElementById('jifen').value;
			 var val3 = document.getElementById('zekou').value;
			 var val4 = document.getElementById('siso').innerText;
             if(typeof input1pre != 'undefined') {
                 val2 = val2.substring(0, val2.lastIndexOf(input1pre));
             }
			 {if (!empty($cominfo[jf_bl][0]) && !empty($cominfo[jf_bl][1]))}
			 document.getElementById('jifen').value = ((Math.floor(val1/parseInt({$cominfo[jf_bl][0]})))*parseInt({$cominfo[jf_bl][1]})).toFixed(0)+'{if (strpos($cominfo['jf_day'][0],strval(",".$todays.","))!==false)} × {$cominfo['jf_day'][1]}{/if}';
			 {else}
			 document.getElementById('jifen').value = 0;
			 {/if}
			 if(typeof input2pre != 'undefined') {
                 val3 = val3.substring(0, val3.lastIndexOf(input2pre));
             }
			 {loop $zk_list $key $val}
			 {if ($val[0]!=0)}
			 {if ($key==0)}
			  if(val1<{$val[0]}){
			   document.getElementById('zekou').value = '0';
			   document.getElementById('siso').innerText = (val1*1).toFixed(2);
			  }
			  {/if}
			  if(val1>={$val[0]}){
			   document.getElementById('zekou').value = ({$val[1]}).toFixed(0);
			   document.getElementById('siso').innerText = ((val1*(parseInt(document.getElementById('zekou').value)/100))).toFixed(2);
			  }
			  {else}
				   document.getElementById('zekou').value = '0';
			       document.getElementById('siso').innerText = (val1*1).toFixed(2);
				{/if}
			  {/loop}			 
         }
    </script>
</body>
</html>
