Server : Apache
System : Linux iZ2vcgyutqttsd1p850kl8Z 3.10.0-1160.92.1.el7.x86_64 #1 SMP Tue Jun 20 11:48:01 UTC 2023 x86_64
User : www ( 1000)
PHP Version : 5.6.40
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Directory :  /www/wwwroot/saimikebio.com/themes/lingshi/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : /www/wwwroot/saimikebio.com/themes/lingshi/flow_jm.dwt
<!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=utf-8" />
<meta name="Keywords" content="{$keywords}" />
<meta name="Description" content="{$description}" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>{$page_title}</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
<link rel="shortcut icon" href="favicon.ico" />
<link rel="icon" href="animated_favicon.gif" type="image/gif" />
<link rel="stylesheet" type="text/css" href="themes/68ecshopcom_360buy/css/68ecshop_commin.css" />
<link rel="stylesheet" type="text/css" href="themes/68ecshopcom_360buy/css/style_jm.css" />
<script>
var pay_balance_id = {$pay_balance_id};//保存余额支付的id做为js全局变量
</script>
{insert_scripts files='jquery-1.6.2.min.js '}
{insert_scripts files='jquery.json.js,transport.js'}
{* 包含脚本文件 *}
{insert_scripts files='common.js,shopping_flow.js'}
</head>
<body>

<!--弹窗start-->
<div id="popup_window" style="position:fixed;display:none;z-index:9999;">
<label>请输入余额支付密码:</label>
<input id="surplus_password_input" class='inputBg' type="password" />
<input type="button" onclick="end_input_surplus()" value="确定" class='bnt_blue_1 btn_pay1' />
<input type="button" onclick="cancel_input_surplus()" value="取消" class='bnt_blue_1 btn_pay2' />
</div>
<!--余额额支付密码_添加_END-->
<div id="site-nav" style="position:relative;"> <!-- #BeginLibraryItem "/library/user_header.lbi" --><!-- #EndLibraryItem -->
  <div class="headerLayout" style="padding-top:15px; padding-bottom:5px;">
    <div class="headerCon ">
      <h1 id="mallLogo" style="padding-top:10px;"> <a href="index.php" class="header-logo"><img src="../images/header/logo.jpg" /></a></h1>
      <div class="header-extra"> </div>
    </div>
  </div>
  <div class="blank"></div>
  <div class="block_jm">
  <!-- {if $step eq "cart"} -->
  <div id="A_Stepbar" class="flowstep">
    <ol class="flowstep-5">
      <li class="step-first">
        <div class="step-done">
          <div class="step-name">查看购物车</div>
          <div class="step-no"></div>
        </div>
      </li>
      <li>
        <div class="step-name">拍下商品</div>
        <div class="step-no">2</div>
      </li>
      <li>
        <div class="step-name">付款</div>
        <div class="step-no">3</div>
      </li>
      <li>
        <div class="step-name">确认收货</div>
        <div class="step-no">4</div>
      </li>
      <li class="step-last">
        <div class="step-name">评价</div>
        <div class="step-no">5</div>
      </li>
    </ol>
  </div>
  <!-- 购物车内容 --> 
  {* 包含脚本文件 *}
  {insert_scripts files='showdiv.js'} 
  <script type="text/javascript">
  {foreach from=$lang.password_js item=item key=key}
    var {$key} = "{$item}";
  {/foreach}
  </script>
  <div class="blank5"></div>
  <div class="flowBox_jm" style="margin-top:10px;">
    <div class="title_jm" >
      <table cellpadding=0 cellspacing=0 width="100%" border=0>
        <tr>
          <td width="8%" align=center><input type="checkbox" autocomplete="off" id="chkAll" name="chkAll" checked=true  onclick="return chkAll_onclick()" style="height:28px;vertical-align:middle;" >
            全选</td>

          <td width="37%" align=center>产品</td>
          <td width="15%" align=center>数量</td>
          <td width="15%" align=center>本店价</td>
          <td width="15%" align=center>小计</td>
          <td width="10%" align=center>操作</td>
        </tr>
      </table>
    </div>
    <form id="formCart1" name="formCart" method="post" action="flow.php">
      <!-- #BeginLibraryItem "/library/cart_supplier_goods.lbi" --><!-- #EndLibraryItem -->
      <input type="hidden" name="step" id="actname" value="update_cart" />
    </form>
    <table width="100%" align="center" border="0" cellpadding="5" cellspacing="6"  style="border-top:1px solid #ddd;">
      <tr>
        <td width="150"><a href="./" class="continue_buy">继续购物</a></td>
        <td align="right" width="80"><a href="flow.php?step=clear" class="jmclear"><font color=#aaaaaa>清空购物车 </font></a></td>
        <td align="right" id='cart_money_info'> 应付总额: <span>{$shopping_money}</span><!-- {if $show_marketprice} -->,{$market_price_desc}<!-- {/if} --></td>
        <td align="right" width="150"><a href="javascript:void(0);" onclick="return selcart_submit();" class="jmcheckout" style="color:#ffffff">去结算</a></td>
      </tr>
    </table>

    <script type="text/javascript" charset="utf-8">
	function chkAll_onclick() 
	{
		var obj = document.getElementById('chkAll');
		var obj_cartgoods = document.getElementsByName("sel_cartgoods[]");
		for (var i=0;i<obj_cartgoods.length;i++)
		{
			var e = obj_cartgoods[i];
			
			if (e.name != 'chkAll'){
				e.checked = obj.checked;
			}
		}
		select_cart_goods();
	}
	function select_cart_goods()
	{
	      var sel_goods = new Array();
	      var obj_cartgoods = document.getElementsByName("sel_cartgoods[]");
	      var suppid = document.getElementById('supplierid');
	      var j=0;
	      var c = true;
	      for (i=0;i<obj_cartgoods.length;i++)
	      {
			if(obj_cartgoods[i].checked == true)
			{	
				sel_goods[j] = obj_cartgoods[i].value;
				j++;
			}else{
				c = false;
			}
	      }
	      document.getElementById('chkAll').checked = c;
	      Ajax.call('flow.php', 'act=selcart&sel_goods=' + sel_goods + '&suppid=' + suppid, selcartResponse, 'GET', 'JSON');
	}
	function selcartResponse(res)
	{
	  if (res.err_msg.length > 0)
	  {
            alert(res.err_msg);
	  }
	  else
	  {
	     document.getElementById('cart_money_info').innerHTML = res.result;
		 if(document.getElementById('zk_'+res.suppid)){
	     	document.getElementById('zk_'+res.suppid).innerHTML = res.your_discount;
		 }
	  }
	}
	function selcart_submit()
	{
	      var obj_cartgoods = document.getElementsByName("sel_cartgoods[]");
	      var formobj = document.getElementById('formCart1');
	      var j=0;
	      for (i=0;i<obj_cartgoods.length;i++)
	      {
			if(obj_cartgoods[i].checked == true)
			{	
				j++;
			}
	      }
	      if (j>0)
	      {
		
			formobj.action='flow.php?step=checkout';
			document.getElementById('actname').value='checkout';
			formobj.submit();
			return true;
	     }
	     else
	     {		
			alert('您还没有选择商品哦!');
			return false;
	     }
	}
	</script> 


    <script>
	function add_num(rec_id,goods_id,supp_id,is_package)
	 {
		 
		document.getElementById("goods_number_"+rec_id+"").value++;
		var sel_goods = new Array();
		var obj_cartgoods = document.getElementsByName("sel_cartgoods[]");
		var j=0;
	      for (i=0;i<obj_cartgoods.length;i++)
	      {
			if(obj_cartgoods[i].checked == true)
			{	
				sel_goods[j] = obj_cartgoods[i].value;
				j++;
			}
	      }
		var number = document.getElementById("goods_number_"+rec_id+"").value;
		Ajax.call('flow.php', 'step=update_group_cart&sel_goods='+ sel_goods +'&rec_id=' + rec_id +'&number=' + number+'&goods_id=' + goods_id + '&suppid=' + supp_id + '&is_package=' + is_package, changePriceResponse, 'GET', 'JSON');
	 }

	function minus_num(rec_id,goods_id,supp_id,is_package)
	{
		if (document.getElementById("goods_number_"+rec_id+"").value>1)
		{
			document.getElementById("goods_number_"+rec_id+"").value--;
		}
		var sel_goods = new Array();
		var obj_cartgoods = document.getElementsByName("sel_cartgoods[]");
		var j=0;
	      for (i=0;i<obj_cartgoods.length;i++)
	      {
			if(obj_cartgoods[i].checked == true)
			{	
				sel_goods[j] = obj_cartgoods[i].value;
				j++;
			}
	      }
		var number = document.getElementById("goods_number_"+rec_id+"").value;
		Ajax.call('flow.php', 'step=update_group_cart&sel_goods='+ sel_goods +'&rec_id=' + rec_id +'&number=' + number+'&goods_id=' + goods_id + '&suppid=' + supp_id + '&is_package=' + is_package, changePriceResponse, 'GET', 'JSON');
	}

function change_price(rec_id,goods_id,is_package)
{	
	var r = /^[1-9]+[0-9]*]*$/;
	var number = document.getElementById("goods_number_"+rec_id+"").value;
	if (!r.test(number))
	{
		alert("您输入的格式不正确!");
		document.getElementById("goods_number_"+rec_id+"").value=document.getElementById("hidden_"+rec_id+"").value;
	}
	else
	{	
		var sel_goods = new Array();
		var obj_cartgoods = document.getElementsByName("sel_cartgoods[]");
		var j=0;
	      for (i=0;i<obj_cartgoods.length;i++)
	      {
			if(obj_cartgoods[i].checked == true)
			{	
				sel_goods[j] = obj_cartgoods[i].value;
				j++;
			}
	      }
		Ajax.call('flow.php','step=update_group_cart&sel_goods='+ sel_goods +'&rec_id=' + rec_id +'&number=' + number+'&goods_id=' + goods_id + '&is_package=' + is_package, changePriceResponse, 'GET', 'JSON');
	}
}

function changePriceResponse(result)
{
if(result.error == 1)
{
	alert(result.content);
	document.getElementById("goods_number_"+result.rec_id+"").value =result.number;
	document.getElementById("hidden_"+result.rec_id+"").value =result.number;
}
else if (result.error == 999 )
{
	if (confirm(result.message))
	{
		location.href = 'user.php';
	}
}
else if (result.error == 888 )
{
	alert(result.message);
	document.getElementById("goods_number_"+result.rec_id+"").value =result.number;
	document.getElementById("hidden_"+result.rec_id+"").value =result.number;
}
else
{
	document.getElementById("sel_cartgoods_"+result.rec_id).checked = true;//被操作商品选中
	document.getElementById("hidden_"+result.rec_id+"").value =result.number;
	document.getElementById("goods_price_"+result.rec_id).innerHTML = result.goods_price;//商品价格
	document.getElementById('subtotal_'+result.rec_id).innerHTML = result.subtotal;//商品总价
	document.getElementById('cart_money_info').innerHTML = result.market_amount_desc;//购物车商品总价说明
	document.getElementById('zk_'+result.suppid).innerHTML = result.your_discount;//折扣活动说明
	show_div_text = "恭喜您! 商品数量修改成功! ";
	showdiv(document.getElementById("goods_number_"+result.rec_id));
}

}
</script> 

    <!-- {if $smarty.session.user_id gt 0} --> 
    {insert_scripts files='transport.js'} 
    <script type="text/javascript" charset="utf-8">
        function collect_to_flow(goodsId)
        {
          var goods        = new Object();
          var spec_arr     = new Array();
          var fittings_arr = new Array();
          var number       = 1;
          goods.spec     = spec_arr;
          goods.goods_id = goodsId;
          goods.number   = number;
          goods.parent   = 0;
          Ajax.call('flow.php?step=add_to_cart', 'goods=' + goods.toJSONString(), collect_to_flow_response, 'POST', 'JSON');
        }
        function collect_to_flow_response(result)
        {
          if (result.error > 0)
          {
            // 如果需要缺货登记,跳转
            if (result.error == 2)
            {
              if (confirm(result.message))
              {
                location.href = 'user.php?act=add_booking&id=' + result.goods_id;
              }
            }
            else if (result.error == 6)
            {
              openSpeDiv(result.message, result.goods_id);
            }
            else
            {
              alert(result.message);
            }
          }
          else
          {
            location.href = 'flow.php';
          }
        }
      </script> 
    <!-- {/if} --> 
  </div>
  <div class="blank"></div>
  {* 购买的用户还买了 *}
  <div class="flowBox_jm">
    <div class="title_jm">
      <ul id="HotBoxTit">
        <li class="curr">购买的还买了</li>
        <li >今日最受欢迎</li>
        <!-- {if $collection_goods} -->
        <li >我的收藏</li>
        <!-- {/if} --> 
        <!-- {if $fittings_list} 商品配件 -->
        <li>商品配件</li>
        <!-- {/if} -->
      </ul>
    </div>
    <div class="flowHot" id="HotBox" >
      <ul class="curr clearfix">
        {if $bestgoods_list}
        {foreach from=$bestgoods_list item=bestgoods}
        <li>
          <p class="pic"><a href="{$bestgoods.url}" target="_blank" ><img src="{$bestgoods.goods_thumb}" ></a></p>
          <p class="name"><a href="{$bestgoods.url}" target="_blank" >{$bestgoods.goods_name}</a></p>
          <p class="price"><del style="color:#999">{$bestgoods.market_price}</del></p>
          <p><font class="price">{$bestgoods.shop_price}</font></p>
          <a class="j_AddCart" href="javascript:addToCart({$bestgoods.goods_id})"></a> </li>
        {/foreach}
        {/if}
      </ul>
      <ul class="clearfix">
        {if $hotgoods_list}
        {foreach from=$hotgoods_list item=hotgoods}
        <li>
          <p class="pic"><a href="{$hotgoods.url}" target="_blank" ><img src="{$hotgoods.goods_thumb}" ></a></p>
          <p class="name"><a href="{$hotgoods.url}" target="_blank" >{$hotgoods.goods_name}</a></p>
          <p class="price"><del style="color:#999">{$hotgoods.market_price}</del></p>
          <p><font class="price">{$hotgoods.shop_price}</font></p>
          <a class="j_AddCart" href="javascript:addToCart({$hotgoods.goods_id})"></a> </li>
        {/foreach}
        {/if}
      </ul>
      <!-- {if $collection_goods} -->
      <ul class="clearfix">
        {foreach from=$collection_goods item=goods}
        <li>
          <p class="pic"><a href="goods.php?id={$goods.goods_id}" target="_blank" ><img src="{$goods.thumb}" ></a></p>
          <p class="name"><a href="goods.php?id={$goods.goods_id}" target="_blank" >{$goods.goods_name}</a></p>
          <p class="price"><del style="color:#999">{$goods.market_price}</del></p>
          <p><font class="price">{$goods.shop_price}</font></p>
          <a class="j_AddCart" href="javascript:addToCart({$goods.goods_id})"></a> </li>
        {/foreach}
      </ul>
      <!-- {/if} --> 
      <!-- {if $fittings_list} 商品配件 --> 
      {insert_scripts files='transport.js'} 
      <script type="text/javascript" charset="utf-8">
  function fittings_to_flow(goodsId,parentId)
  {
    var goods        = new Object();
    var spec_arr     = new Array();
    var number       = 1;
    goods.spec     = spec_arr;
    goods.goods_id = goodsId;
    goods.number   = number;
    goods.parent   = parentId;
    Ajax.call('flow.php?step=add_to_cart', 'goods=' + $.toJSON(goods), fittings_to_flow_response, 'POST', 'JSON');
  }
  function fittings_to_flow_response(result)
  {
    if (result.error > 0)
    {
      // 如果需要缺货登记,跳转
      if (result.error == 2)
      {
        if (confirm(result.message))
        {
          location.href = 'user.php?act=add_booking&id=' + result.goods_id;
        }
      }
      else if (result.error == 6)
      {
        openSpeDiv(result.message, result.goods_id, result.parent);
      }
      else
      {
        alert(result.message);
      }
    }
    else
    {
      location.href = 'flow.php';
    }
  }
  </script>
      <form action="flow.php" method="post">
        <ul class="clearfix">
          {foreach from=$fittings_list item=fittings}
          <li>
            <p class="pic"><a href="{$fittings.url}" target="_blank" ><img src="{$fittings.goods_thumb}" alt="{$fittings.name|escape:html}" ></a></p>
            <p class="name"><a href="{$fittings.url}" target="_blank" title="{$fittings.goods_name|escape:html}">{$fittings.short_name|escape:html}</a></p>
            <p class="price"><del style="color:#999">{$fittings.shop_price}</del></p>
            <p><font class="price">{$fittings.fittings_price}</font></p>
            <a class="j_AddCart" href="javascript:fittings_to_flow({$fittings.goods_id},{$fittings.parent_id})"></a> </li>
          {/foreach}
        </ul>
      </form>
      <!-- {/if} --> 
    </div>
  </div>
  <script type="text/javascript">
	var hotboxtit = document.getElementById("HotBoxTit");
	var hotbox = document.getElementById("HotBox");
	var hottlist = hotboxtit.getElementsByTagName("li");
	var hotlist = hotbox.getElementsByTagName("ul");
	var hottlen = hottlist.length;
	for(var i = 0; i < hottlen; i++)
	{ 
		hottlist[i].pai=i;
		hottlist[i].onmouseover = function(){	
		for(var j=0; j < hottlen; j++){
				var _hott = hottlist[j];
				var _hot =  hotlist[j];
				var ison  =  j==this.pai;
				_hott.className=(ison ? "curr" : "");
				_hot.className= (ison  ?  "curr" : "");
		}
		}
	}
	</script> 
  <!-- {/if} --> 
  
  <!-- {if $step eq "consignee"} --> 
  
  <!-- 开始收货人信息填写界面 --> 
  {insert_scripts files='region.js,utils.js'} 
  <script type="text/javascript">
          region.isAdmin = false;
          {foreach from=$lang.flow_js item=item key=key}
          var {$key} = "{$item}";
          {/foreach}

          {literal}
          onload = function() {
            if (!document.all)
            {
              document.forms['theForm'].reset();
            }
          }
          {/literal}
        </script> 
  <!-- 如果有收货地址,循环显示用户的收获地址 --> 
  <!-- {foreach from=$consignee_list item=consignee key=sn} -->
  <form action="flow.php" method="post" name="theForm" id="theForm" onsubmit="return checkConsignee(this)">
    <!-- #BeginLibraryItem "/Library/consignee.lbi" --><!-- #EndLibraryItem -->
  </form>
  <!-- {/foreach} --> 
  <!-- {/if} --> 
  
  <!-- {if $step eq "checkout"} 开始订单确认界面 -->
  <div id="A_Stepbar" class="flowstep">
    <ol class="flowstep-5">
      <li class="step-first">
        <div class="step-done">
          <div class="step-name">查看购物车</div>
          <div class="step-no"></div>
        </div>
      </li>
      <li>
        <div class="step-done">
          <div class="step-name">拍下商品</div>
          <div class="step-no"></div>
        </div>
      </li>
      <li>
        <div class="step-name">付款</div>
        <div class="step-no">3</div>
      </li>
      <li>
        <div class="step-name">确认收货</div>
        <div class="step-no">4</div>
      </li>
      <li class="step-last">
        <div class="step-name">评价</div>
        <div class="step-no">5</div>
      </li>
    </ol>
  </div>
  <div id="bg" class="bg" style="display:none;"></div>
  {insert_scripts files='region.js,utils.js'}
  <form action="flow.php" method="post" name="theForm" id="theForm" onsubmit="return checkOrderForm(this)">
    <script type="text/javascript">
        var flow_no_payment = "{$lang.flow_no_payment}";
        var flow_no_shipping = "{$lang.flow_no_shipping}";
    </script>
    <div class="blank10"></div>
    <div class="checkBox_jm clearfix" >
      <div class="title">1 地址选择</div>
      <div class="address_jm" id="AddressList" > <!-- #BeginLibraryItem "/library/address_list.lbi" --><!-- #EndLibraryItem --> </div>
      <div id="popDiv" class="mydiv" style="display:none;">
        <div class="mydiv-l" id="PopAddressTitle">使用新地址</div>
        <div class="mydiv-r" onclick="javascript:closePopDiv()" ></div>
        <div id="PopAddressCon"></div>
      </div>
    </div>
    <script type="text/javascript">
	{literal}
	function AddressEdit(aid)
	{	
		if (aid)
		{
			document.getElementById('PopAddressTitle').innerHTML='修改地址';
		}
		else
		{
			document.getElementById('PopAddressTitle').innerHTML='使用新地址';
		}
		Ajax.call('flow.php?act=EditAddress', 'address_id=' + aid, AddressEdit_Response, 'GET', 'JSON');
	}
	function AddressEdit_Response(result)
	{
		var PopAddressCon=document.getElementById('PopAddressCon');
		PopAddressCon.innerHTML= result.content;
		document.getElementById('popDiv').style.display='block';
		document.getElementById('bg').style.display='block';
	}

	function showPopDiv()
	{
		document.getElementById('popDiv').style.display='block';
		document.getElementById('bg').style.display='block';
	}
	function closePopDiv()
	{
		document.getElementById('popDiv').style.display='none';
		document.getElementById('bg').style.display='none';
	}

	function showAddressEdit(obj)
	{
		if (obj.className!='curr')
		{
			obj.className = obj.className == 'xxxxxx' ? '' : 'xxxxxx';
		}
	}
	function selAddress(obj, address_id)
	{
		var addrParent = obj.parentNode;
		var addrYeye = addrParent.parentNode;
		var addrList = addrYeye.getElementsByTagName('li');
		for (i=0;i<addrList.length;i++)
		{
			addrList[i].className='';
		}
		addrParent.className='curr';
		Ajax.call('flow.php?act=selAddress', 'address_id=' + address_id, selAddress_response, 'GET', 'JSON');
	}
	function selAddress_response(result)
	{
		top.location.href = top.location.href;
	}

	function del_Address(address_id)
	{
		Ajax.call('flow.php?act=delAddress', 'address_id=' + address_id, delAddressResponse, 'GET', 'JSON');
	}
	function delAddressResponse(result)
	{
		 if (result.message)
		{
			alert(result.message);
		}

		if (result.error == 0)
		{
			 var layer = document.getElementById('AddressList');

			if (layer)
			{
				layer.innerHTML = result.content;
			}
			if(result.content2)
			{
				document.getElementById("shippingBox").innerHTML='<font color="#ff3300">&nbsp;&nbsp;&nbsp;正在重新导入配送区域,请稍候。。。</font>';
				document.getElementById("shippingBox").innerHTML= '<font style="color:#ff3300">配送区域已经变化,请重新选择物流<br><br></font>'+result.content2;
			}
			document.forms['theForm'].elements['have_consignee'].value=result.have_consignee;
		}
	}

        /**
	* 提交地址信息
	*/
	function submitAddress()
	{
	var frm = document.forms['theForm'];
	var cmt = new Object;
	cmt.address_id       = frm.elements['address_id'].value;
	cmt.consignee       = frm.elements['consignee'].value;
	cmt.address         = frm.elements['address'].value;
	cmt.email           = frm.elements['email'].value;
	cmt.zipcode           = frm.elements['zipcode'].value;
	cmt.country              = 1;//frm.elements['country'].value;
	cmt.province           = frm.elements['province'].value;
	cmt.city         =      frm.elements['city'].value;
	cmt.district         =      frm.elements['district'].value;
	cmt.tel           =  frm.elements['tel_01'].value + "-" + frm.elements['tel_02'].value + (Utils.isEmpty(frm.elements['tel_03'].value) ? "" :  "-" + frm.elements['tel_03'].value);
	cmt.mobile         =      frm.elements['mobile'].value;
	cmt.closediv	   = frm.elements['closediv'].value;
	cmt.shipping_bian	   = frm.elements['shipping_bian'].value;
  	cmt.optionlength = frm.elements['district'].length;

  if (cmt.consignee.length == 0)
   {
	alert('收件人不能为空!');
	return false;
   }
   if(cmt.optionlength > 1)
   {
	   if (cmt.province == '0' ||  cmt.city == '0'  || cmt.district == '0' )
	   {
		alert('所在地区不完整!');
		return false;
	   }
   }
   else
   {
	   if (cmt.province == '0' ||  cmt.city == '0' )
	   {
		alert('所在地区不完整!');
		return false;
	   }

   }
   /* 邮箱不是必填项
   if (cmt.email.length == 0)
   {
		alert('邮箱地址不能为空');
		return false;
   }
   */
   if (cmt.email.length > 0 && (!Utils.isEmail(cmt.email)))
   {
		alert('邮箱地址不正确');
		return false;
   }
   if (cmt.address.length == 0)
   {
	alert('详细地址不能为空!');
	return false;
   }
   
   if (cmt.mobile.length == 0 && (cmt.tel.length == 0 || cmt.tel == '--' || cmt.tel == '-'))
   {
	alert('手机号码和固定电话必须填写至少一项!');
	return false;
   }
   if (cmt.mobile.length>0)
  {
    var reg = /^1[34578][0-9]\d{8}$/;
    if (!Utils.isMobile(cmt.mobile))
    {
	alert('手机号码格式不正确!');
	return false;
    }
  }
  if (cmt.tel.length>0 && cmt.tel != '--' && cmt.tel != '-')
  {
    var reg = /^[\d|\-|\s]+$/;
    if (!Utils.isTel(cmt.tel))
    {
        alert('固定电话格式不正确!');
	return false;
    }
  }

   Ajax.call('flow.php?act=saveAddress', 'address=' + $.toJSON(cmt), addressResponse, 'POST', 'JSON');
   
}

/* 处理提交地址的反馈信息  */
  function addressResponse(result)
  {
    if (result.message)
    {
      alert(result.message);
    }else{
	top.location.href = top.location.href;
    }
    /*
    if (result.error == 0)
    {
	var layer = document.getElementById('AddressList');
	if (layer)
	{
		layer.innerHTML = result.content;
	}
	if(result.content2)
	{
		document.getElementById("shippingBox").innerHTML='<font color="#ff3300">&nbsp;&nbsp;&nbsp;正在重新导入配送区域,请稍候。。。</font>';
		document.getElementById("shippingBox").innerHTML= '<font style="color:#ff3300">配送区域已经变化,请重新选择物流<br><br></font>'+result.content2;
	}
	document.forms['theForm'].elements['have_consignee'].value='1';
	if (result.closediv == '1')
	{
		closePopDiv();
	}
    }*/

  }
	{/literal}
	</script> 
    {* 送货时间 *}
    <div class="checkBox_jm">
      <div class="title">2 送货时间 <span class="songhuo">送货时间仅作参考,快递公司会尽量满足您的要求</span></div>
      <div class="timebox">
        <ul>
          <li class="curr" id="time_id_1" onClick="javascript:setTimeSh('1');">
            <input id="time_delivery1" type="radio" name="best_time" value="仅工作日送货" checked=checked>
            <label for="time_delivery1">仅工作日送货</label>
          </li>
          <li id="time_id_2" onClick="javascript:setTimeSh('2');">
            <input id="time_delivery2" type="radio" name="best_time" value="仅周末送货" >
            <label for="time_delivery2">仅周末送货</label>
          </li>
          <li id="time_id_3" onClick="javascript:setTimeSh('3')" >
            <input id="time_delivery3" type="radio" name="best_time" value="工作日/周末/假日均可" >
            <label for="time_delivery3">工作日/周末/假日均可</label>
          </li>
          <li id="time_id_4" style="position:relative;" onmouseover="if(this.className=='curr' || this.className=='curr2'){this.className='curr';}else{this.className='cur2';}"  onmouseout="if(this.className=='curr'){this.className='curr2';}else{this.className='cur';}" onClick="javascript:setTimeSh('4')" >
            <input type="radio" name="best_time" value="" id="definetime_input" >
            <label for="definetime_input" id="definetime">指定送货时间</label>
            <div class="seltimebox" id="seltimebox">
              <table cellpadding=5 cellspacing=0 width="100%" >
                <tr bgcolor=#ffffff>
                  <td style="padding-left:10px">时间段</td>
                  {foreach from= $week_list item=week}
                  <td align=center>{$week.name}<br>
                    {$week.week}</td>
                  {/foreach} </tr>
                <tr bgcolor=#ffffff>
                  <td style="padding-left:10px">9:00--15:00</td>
                  {foreach from=$week_list item=week}
                  <td align=center>{if $week.time1}<a href="javascript:void(0);" name="{$week.name} {$week.week} 9:00--15:00" onclick="selTimeSh(this)" >可选</a>{else}&nbsp;{/if}</td>
                  {/foreach} </tr>
                <tr bgcolor=#ffffff>
                  <td style="padding-left:10px">15:00--19:00</td>
                  {foreach from=$week_list item=week}
                  <td align=center>{if $week.time2}<a href="javascript:void(0);" name="{$week.name} {$week.week} 15:00--19:00" onclick="selTimeSh(this)" >可选</a>{else}&nbsp;{/if}</td>
                  {/foreach} </tr>
                <tr bgcolor=#ffffff>
                  <td style="padding-left:10px">19:00--22:00</td>
                  {foreach from=$week_list item=week}
                  <td align=center>{if $week.time3}<a href="javascript:void(0);" name="{$week.name} {$week.week} 19:00--22:00" onclick="selTimeSh(this)" >可选</a>{else}&nbsp;{/if}</td>
                  {/foreach} </tr>
              </table>
            </div>
          </li>
        </ul>
      </div>
      <div class="blank"></div>
    </div>
    {* 商品清单 *}
    <div class="checkBox_jm">
      <div class="title">3 商品清单</div>
      	<table border=0 cellpadding=0 cellspacing=0 width="100%" class="checkgoods">
        <tr>
          <th width='50%' align=left class="tdone">商品</th>
          <th>数量</th>
          <th>单价</th>
          <th>小计</th>
        </tr>
        <!-- {foreach from=$goods_list item=goodsinfo name=glist key=key} -->
        <tr>
            <td colspan=4 style="background:#FAFAFA; border-top:2px solid #d9d9d9; font-weight:bold; padding:5px 10px;" > {$goodsinfo.goodlist[0].seller}</td>
        </tr>
        <!-- {foreach from=$goodsinfo.goodlist item=goods name=name} -->
        <tr>
          <td width='50%' {if $smarty.foreach.name.first}style="border-top:none;"{/if}><!-- {if $goods.goods_id gt 0 && $goods.extension_code neq 'package_buy'} 商品 -->
            
            <div class="thumb_name">
              <dl >
                <dt> <a href="goods.php?id={$goods.goods_id}" target="_blank"><img src="{$goods.goods_thumb}" style="border:1px solid #ddd;" title="{$goods.goods_name|escape:html}" /></a> </dt>
                <dd> <a href="goods.php?id={$goods.goods_id}" target="_blank" class="f6">{$goods.goods_name}</a> <br>
                  <font class="attrname">{$goods.goods_attr|nl2br}</font> 
                  <!-- {if $goods.parent_id gt 0} 配件 --> 
                  <span >{$lang.accessories}</span> 
                  <!-- {/if} --> 
                  <!-- {if $goods.is_gift gt 0} 赠品 --> 
                  <span>{$lang.largess}</span> 
                  <!-- {/if} --> 
                </dd>
              </dl>
            </div>
            
            <!-- {elseif $goods.goods_id gt 0 && $goods.extension_code eq 'package_buy'} -->
            
            <div class="thumb_name">
              <dl >
                <dt><img src="themes/{$template_dir}/images/jmpic/ico_cart_package.gif" border="0" title="{$goods.goods_name|escape:html}" /></dt>
                <dd> {$goods.goods_name}<font style="color:#FF0000;">({$lang.remark_package})</font>
                  <div style="display:block;position:relative;"> <a  href="javascript:void(0)" onclick="setSuitShow({$goods.goods_id})" ><span class="package">商品明细</span></a>
                    <div id="suit_{$goods.goods_id}" style="float:left;position:absolute;background:#fff;width:500px;top:25px;left:0;border:1px solid #31c8e3;padding:10px 0;display:none;">
                      <table cellpadding=10 cellspacing=5 width="100%"  style="padding:0;margin:0;">
                        <!-- {foreach from=$goods.package_goods_list name="package_goods_list" item=package_goods_list} -->
                        <tr >
                          <td width="60px" {if !$smarty.foreach.package_goods_list.last}style="border-bottom:1px dashed #bbb;"{/if}><img src="{$package_goods_list.goods_thumb}" width="40" height="40"></td>
                          <td {if !$smarty.foreach.package_goods_list.last}style="border-bottom:1px dashed #bbb;"{/if}><a href="goods.php?id={$package_goods_list.goods_id}" target="_blank" class="fpack">{$package_goods_list.goods_name|truncate:20}</a></td>
                          <td {if !$smarty.foreach.package_goods_list.last}style="border-bottom:1px dashed #bbb;"{/if}><div style="float:left;border:1px solid #bbb;background:#ddd;width:20px;text-align:center;padding:5px 10px;">{$package_goods_list.goods_number}</div></td>
                          <td align="center" {if !$smarty.foreach.package_goods_list.last}style="border-bottom:1px dashed #bbb;"{/if}>{$package_goods_list.shop_price}</td>
                        </tr>
                        <!-- {/foreach} -->
                      </table>
                    </div>
                  </div>
                </dd>
              </dl>
            </div>
            
            <!-- {else} 优惠活动 --> 
            {$goods.goods_name} 
            <!-- {/if} --></td>
          <td align=center {if $smarty.foreach.name.first}style="border-top:none;"{/if}>{$goods.goods_number}</td>
          <td  align=center class="price_font" {if $smarty.foreach.name.first}style="border-top:none;"{/if}>{$goods.formated_goods_price}</td>
          <td  align=center class="price_font" {if $smarty.foreach.name.first}style="border-top:none;"{/if}>{$goods.formated_subtotal}</td>
        </tr>
        <!-- {/foreach} --> 
        <!-- {if $goodsinfo.zhekou} 优惠活动 -->
        <tr>
            <td colspan="4" bgcolor="#ffffff" align=right style="padding:12px 15px 12px 0;"><!-- {if $goodsinfo.zhekou} -->{$goodsinfo.zhekou.your_discount}<!-- {/if} --></td>
        </tr>
        <!-- {/if} --> 
		{if $goodsinfo.shipping_html}
        <tr>
			<td colspan=4 bgcolor="#ffffff" align="left" class="shipping_type">
			{$goodsinfo.shipping_html}
			<!--如果有自提点 star-->
			<span id='picktxt{$key}'>
			
			</span>   
			<!--如果有自提点 end-->
			<p class="shipping_desc" id="desc_{$key}">您可以选择离您最近的自提点上门提货:运费5元,满99元免邮</p>
			<script>selectShipping($('#pay_ship_{$goodsinfo.goodlist[0].supplier_id}').val(),{$key});</script>
			</td>
		</tr>
		{/if}
        <!-- {if ($allow_use_bonus || $allow_use_integral) && $goodsinfo.goodlist } 是否使用红包或者积分 -->
        <tr>
            <td colspan="4" bgcolor="#ffffff" align=left style="padding:12px 0 12px 30px;"><div class="checkout_other"> <a class="jmbag" href="javascript:void(0);" onclick="showCheckoutOther(this);"><span>+</span>使用店铺优惠券</a>
              <table class="subbox_other sub_bonus" width="100%">
                <!-- {if $allow_use_bonus} 是否使用优惠券 -->
                <tr>
                  <td  align=right width="120">使用店铺优惠券:</td>
                  <td><select name="bonus[{$key}]" onchange="changeBonus(this.value,{$key})" id="ECS_BONUS_{$key}" class="otherinput">
                      <option value="0" {if $order.bonus_id eq 0}selected{/if}>{$lang.please_select}</option>
                      <!-- {foreach from=$goodsinfo.redbag item=bonus} -->
                      <option value="{$bonus.bonus_id}" {if $order.bonus_id_info[$key] eq $bonus.bonus_id}selected{/if}>{$bonus.type_name}[{$bonus.bonus_money_formated}]</option>
                      <!-- {/foreach} -->
                      
                    </select></td>
                  <td>&nbsp; 或 &nbsp;<a href="javascript:void(0);" onclick="javascript:document.getElementById('Bonus_span_{$key}').style.display='block';document.getElementById('Bonus_a_{$key}').style.display='none';" class="a_other1_h" id="Bonus_a_{$key}">直接输入优惠券号</a></td>
                  <td><label id="Bonus_span_{$key}" style="display:none;">
                      <input name="bonus_sn[{$key}]" id="bonus_sn_{$key}" type="text"  size="15" value="{if $order.bonus_sn_info[$key]}{$order.bonus_sn_info[$key]}{else}输入优惠券{/if}" onfocus="if (value =='输入优惠券'){value =''}" onblur="if (value ==''){value='输入优惠券'}" style="height:22px;" />
                      <input name="validate_bonus" type="button" value="使用" onclick="validateBonus(document.getElementById('bonus_sn_{$key}').value,{$key})" class="BonusButton" />
                    </label></td>
                </tr>
                <!-- {/if} --> 
                <!-- {if $allow_use_integral} 是否使用积分 -->
                <tr>
                  <td  align=right width="80">使用积分:</td>
                  <td ><input name="integral[{$key}]" type="text" class="otherinput2" id="ECS_INTEGRAL_{$key}" onblur="changeIntegral(this.value,{$key})" value="{$order.integral_info[$key]|default:0}<?php echo $order['integral_info'][0];?>"  /></td>
                  <td colspan=2><span id="ECS_INTEGRAL_NOTICE_{$key}" class="notice"></span></td>
                </tr>
                <!-- {/if} -->
              </table>
            </div></td>
        </tr>
        <!-- {/if} --> 
        <!-- {/foreach} -->
        </table>
        <table border=0 cellpadding=0 cellspacing=0 width="100%" class="checkgoods">
		<!-- {if $inv_content_list} -->
          <tr>
            <td colspan=4 class="tdother2">
              <div class="checkout_other" > <a class="jmbag" href="javascript:void(0);" onclick="showCheckoutOther(this);"><span>+</span>开发票</a> 
                <!--增值税发票_更改_START_-->
                <table class="subbox_other" width="100%">
                  <!-- {if $inv_content_list} 能否开发票 -->
                  <tbody width="100%" cellpadding="5" cellspacing="0">
                    <tr>
                      <td align=right ><input name="need_inv" type="checkbox" id="ECS_NEEDINV" onclick="changeNeedInv()" value="1" class="checkbox" />
                        <label class="mar-b">开发票:</label></td>
                      <td align=left colspan="2"><select name="inv_type" id="ECS_INVTYPE" {if $order.need_inv neq 1}disabled="true"{/if} onchange="changeNeedInv()" style="width:145px;height:28px;">
              <option value="0">请选择发票类型</option>
              
{html_options options=$inv_type_list selected=$order.inv_type}

                        </select>
                        &nbsp;&nbsp;
                        <select name="inv_content" id="ECS_INVCONTENT" {if $order.need_inv neq 1}disabled="true"{/if}  onchange="changeNeedInv()" style="width:145px;height:28px;">
                          <option value="0">请选择发票内容</option>
                          
                
                    
				{html_options values=$inv_content_list output=$inv_content_list selected=$order.inv_content}
				
                  
              
                        </select></td>
                    </tr>
                  </tbody>
                  <!-- {/if} --> 
                  <!--增值税发票-->
                  <tbody id='vat_invoice_tbody' style='display:none;' width="100%" cellpadding="5" cellspacing="0" >
                    <tr>
                      <td colspan="3" align='left'><strong style='font-size:16px;'>公司信息</strong></td>
                    </tr>
                    <tr>
                      <td align=right><em style='color:#e4393c'>*</em>单位名称:</td>
                      <td colspan="2"><input name='vat_inv_company_name' type='text' class="otherinput2" /></td>
                    </tr>
                    <tr>
                      <td align=right><em style='color:#e4393c'>*</em>纳税人识别号:</td>
                      <td width="300" style="width:300px;"><input name='vat_inv_taxpayer_id' type='text'  onblur='javascript:check_taxpayer_id(this,"taxpayer_notice")' class="otherinput2" /></td>
                      <td>&nbsp;<span id='taxpayer_notice' style='font-size:12px;color:#f00;'></span></td>
                    </tr>
                    <tr>
                      <td align=right><em style='color:#e4393c'>*</em>注册地址:</td>
                      <td colspan="2"><input name='vat_inv_registration_address' type='text' class="otherinput2" /></td>
                    </tr>
                    <tr>
                      <td align=right><em style='color:#e4393c'>*</em>注册电话:</td>
                      <td colspan="2"><input name='vat_inv_registration_phone' type='text' class="otherinput2" /></td>
                    </tr>
                    <tr>
                      <td align=right><em style='color:#e4393c'>*</em>开户银行:</td>
                      <td colspan="2"><input name='vat_inv_deposit_bank' type='text' class="otherinput2" /></td>
                    </tr>
                    <tr>
                      <td align=right><em style='color:#e4393c'>*</em>银行账户:</td>
                      <td><input name='vat_inv_bank_account' type='text' onblur='javascript:check_bank_account(this,"bank_account_notice")' class="otherinput2" /></td>
                      <td>&nbsp;<span id='bank_account_notice' style='font-size:12px;color:#f00;'></span></td>
                    </tr>
                    <tr>
                      <td colspan="3" align='left' style="padding:10px 0px"><strong style='font-size:16px;'>收票人信息</strong></td>
                    </tr>
                    <tr>
                      <td align=right><em style='color:#e4393c'>*</em>收票人姓名:</td>
                      <td colspan="2"><input name='inv_consignee_name' type='text' class="otherinput2" /></td>
                    </tr>
                    <tr>
                      <td align=right><em style='color:#e4393c'>*</em>收票人手机:</td>
                      <td><input name='inv_consignee_phone' type='text' onblur='javascript:check_phone_number(this,"phone_number_notice")' class="otherinput2" /></td>
                      <td>&nbsp;<span id='phone_number_notice' style='font-size:12px;color:#f00;'></span></td>
          </tr>
          <tr>
            <td align=right><em style='color:#e4393c'>*</em>收票人省份:</td>
            <td colspan='2'><input type="hidden" name="country" value="1">
              <select name="inv_consignee_province" id="selProvinces" onchange="region.changed(this, 2, 'selCities');"  style="width:155px;height:25px;border:1px solid #ccc;">
                <option value="0">{$lang.please_select}{$name_of_region[1]}</option>
                <!-- {foreach from=$province_list item=province} -->
                <option value="{$province.region_id}" {if $address.province eq $province.region_id}selected{/if}>{$province.region_name}</option>
                <!-- {/foreach} -->
              </select>
              <select name="inv_consignee_city" id="selCities" style="border: 1px solid rgb(204, 204, 204); border-image: none; width: 70px; height: 25px;" onchange="region.changed(this, 3, 'selDistricts');">
                <option value="0">请选择</option>
              </select>
              <select name="inv_consignee_district" id="selDistricts" style="border: 1px solid rgb(204, 204, 204); border-image: none; width: 70px; height: 25px;display:none;">
                <option value="0">请选择</option>
              </select></td>
          </tr>
          <tr>
            <td align=right><em style='color:#e4393c'>*</em>详细地址:</td>
                      <td colspan='2'><input name='inv_consignee_address' type='text' class="otherinput2" /></td>
                    </tr>
                  </tbody>
                  <!--普通发票-->
                  <tbody id='normal_invoice_tbody' style='display:none'>
                    <tr>
                      <td align=right>发票抬头:</td>
                      <td colspan="2"><input id='individual_inv' type='radio' onclick='changeNeedInv()' name='inv_payee_type' value='individual' checked='true' style="vertical-align:middle"/>
                        <label for='individual_inv' style="vertical-align:middle">个人</label>
                        <input id='unit_inv' type='radio' onclick='changeNeedInv()' name='inv_payee_type' value='unit' style="vertical-align:middle"/>
                        <label for='unit_inv' style="vertical-align:middle">单位</label>
                        &nbsp;&nbsp;
                        <input id='ECS_INVPAYEE' name='inv_payee' class="otherinput2" style='display:none; vertical-align:middle' /></td>
                    </tr>
                  </tbody>
                </table>
              </div>
            </td>
          </tr>
          <!-- {/if} -->
          <!-- {if $how_oos_list} -->
          <tr>
            <td colspan=4 class="tdother2">
              <div class="checkout_other" > 
              	<a class="jmbag" href="javascript:void(0);" onclick="showCheckoutOther(this);"><span>+</span>缺货处理</a> 
                <table class="subbox_other" width="100%">
                	<!--缺货处理-->
                  <tbody width="100%" cellpadding="5" cellspacing="0">
                    <tr>
                      <td align=right width="100">缺货处理:</td>
                      <td colspan='4'><!-- {foreach from=$how_oos_list key=how_oos_id item=how_oos_name} -->
                        
                        <label>
                          <input name="how_oos" type="radio" value="{$how_oos_id}" {if $order.how_oos eq $how_oos_id}checked{/if} onclick="changeOOS(this)" />
                          {$how_oos_name}</label>
                        
                        <!-- {/foreach} --></td>
                    </tr>
                  </tbody>
                </table>
              </div>
            </td>
          </tr>
          <!-- {/if} -->
          <tr>
            <td colspan=4 class="tdother2"><div class="checkout_other" > <a class="jmbag" href="javascript:void(0);" onclick="showCheckoutOther(this);"><span>+</span>订单附言</a>
                <table class="subbox_other" width="100%">
                  <tbody width="100%" cellpadding="5" cellspacing="0">
                    <tr>
                      <td align=right width="100" valign=top>订单附言:</td>
                      <td colspan='4'><textarea name="postscript" cols="80" rows="3" id="postscript" style="border:1px solid #ccc;">{$order.postscript|escape}</textarea></td>
                    </tr>
                  </tbody>
                </table>
              </div></td>
          </tr>
          <script type="text/javascript">
		var fapiao_con = document.getElementById('ECS_INVCONTENT');
		if (fapiao_con.value=='0')
		{
			document.getElementById('ECS_INVPAYEE').disabled=true;
		}
		else
		{
			document.getElementById('ECS_INVPAYEE').disabled=false;
		}
		</script>
	{if $allow_use_surplus}
          <tr>
            <td colspan=4 class="tdother2">
            	<div class="allow_user_surplus">
        			<p>
                    	<input type="checkbox" id="issurplus" onclick="checkboxOnclick(this)" style="vertical-align:middle; cursor:pointer" />
                    	<span class="is_user_surplus">使用账户余额支付</span>
                    </p>
        			<div id="allow_user_surplus">
        				<span class="surplus_desc"><input name="surplus" type="text" class="surplus" id="ECS_SURPLUS"  value="0" onblur="changeSurplus(this.value);" />&nbsp;&nbsp;元</span>
            			您当前的可用余额为:<span class="your_surplus">{$your_surplus|default:0} </span>
                        <span id="ECS_SURPLUS_NOTICE_{$key}" class="notice"></span>
            			{if $is_surplus_open eq 0}<span class="open_surplus">点此<a href="security.php" target="_blank">开启余额安全支付</a></span>{/if}
        			</div>
				<script type="text/javascript">
				function checkboxOnclick(checkbox){ 
					var surplus = {$your_surplus|default:0};
					if ( checkbox.checked == true){
						document.getElementById("allow_user_surplus").style.display = "block";
						changeSurplus(surplus);
					}else{
						document.getElementById("allow_user_surplus").style.display = "none";
						changeSurplus(0);
					}
				}
				</script>
        	  </div>
            </td>
          </tr>
	{/if}
        </table>
        <div class="blank10"></div>
        <table cellpadding=0 cellspacing=0 width="100%" >
          <tr>
            <td align=right><!-- #BeginLibraryItem "/Library/order_total.lbi" --><!-- #EndLibraryItem --></td>
          </tr>
        </table>
      </div>
    <script type="text/javascript">
	{literal}
	function showCheckoutOther(obj)
	{
		var otherParent = obj.parentNode;
		otherParent.className = (otherParent.className=='checkout_other') ? 'checkout_other2' : 'checkout_other';
		var spanzi = obj.getElementsByTagName('span')[0];
		spanzi.innerHTML= spanzi.innerHTML == '+' ? '-' : '+';
	}
	{/literal}
      </script> 
    {* 支付方式 *}
    <div class="checkBox_jm" id="pay_div">
      <div class="title">4 支付方式</div>
      <ul class="payment_tab_jm" id="payment_tab">
        <!-- {foreach from=$payment_list name="payment_list" item=payment} --> 
        <!-- 预售订单不支持货到付款 -->
        {if $payment.pay_code eq 'alipay_bank' || ($payment.pay_code eq 'cod' && $is_pre_sale != 1) || $payment.pay_code eq 'pup'}
        <li  onclick="selPayment(this)" >
          <input type="radio" isCod="{$payment.is_cod}" isPickup="{$payment.is_pickup}" onclick="selectPayment(this)" {if $cod_disabled and $payment.is_cod eq "1"}disabled="true"{/if} {if $payment.pay_code eq 'alipay_bank'}id="alipay_bank_input"{/if} name="payment" value="{$payment.pay_id}" >
          <strong>{if $payment.pay_code eq $pickup_code and $has_pickup_point eq 0}({$lang.empty_pickup_point}){/if}</strong> {if $payment.pay_code eq 'alipay_bank'}支付宝网银直连{else}{$payment.pay_name}{/if}
          {if $payment.pay_code eq 'alipay_bank'}
          <div class="payment_subbox"> <!-- #BeginLibraryItem "/Library/alipay_bank.lbi" --><!-- #EndLibraryItem --> </div>
          {/if} </li>
        {/if} 
        <!-- {/foreach} -->
        <li  onclick="selPayment(this)">
          <input type="radio" onclick="selectPayment(this)" isCod="0" name="payment"  id="payment_other_input" value="0"  >
          &nbsp;支付宝/快钱/财付通/其他支付
          <div class="payment_subbox">
            <ul >
              <!-- {foreach from=$payment_list name="payment_list" item=payment} --> 
              {if $payment.pay_code neq 'alipay_bank' && $payment.pay_code neq 'cod' && $payment.pay_code neq 'pup' && $payment.pay_code neq 'balance'}
              <li>
                <input type="radio" name="payment_other" onclick="selectPayment(this);document.getElementById('payment_other_input').value=this.value;" value="{$payment.pay_id}" >
                <img align="absmiddle" src="images/jmpic/pay_{$payment.pay_code}.gif" alt="{$payment.pay_name}" /></li>
              {/if} 
              <!-- {/foreach} -->
            </ul>
          </div>
        </li>
      </ul>
    </div>
    <script type="text/javascript">
	{literal}
	function setTimeSh(id)
	{
	    for(i=1;i<=4;i++)
	    {
		document.getElementById('time_id_'+i).className='';
	    }
	    var timeid = document.getElementById('time_id_'+id);
	    timeid.className = 'curr';
	}
	function selTimeSh(obj)
	{
		document.getElementById('definetime_input').checked =true;
		document.getElementById('definetime').innerHTML = "指定送货时间 <font color=#ff3300>"+ obj.name +"</font>";
		document.getElementById('definetime_input').value = "指定送货时间 "+ obj.name ;
	}
	function selPayment(obj)
	{
		var con_country = document.forms['theForm'].elements['have_consignee'].value;
		if ( con_country=='0' )
		{
			alert('请先选择配送地址!');
			obj.checked= false;
			return ;
		}
		var paymentList = obj.getElementsByTagName('input');
		if (paymentList[0].disabled !=true)
		{
		var payParent = obj.parentNode;		
		var payList = payParent.getElementsByTagName('li');
		for(i=0;i<payList.length;i++)
		{
			payList[i].className='';
		}
		obj.className='seled';
		
		for (var i=0;i<paymentList.length;i++)
		{
			if (paymentList[i].name=='payment' && !paymentList[i].disabled)
			{
				paymentList[i].checked= true;
			}
		}
		}
	}
	{/literal}
	</script>
    <div class="flowBox_jm clearfix" style="border:none;padding-bottom:20px;">
      <div  style="float:left;width:40%;padding:8px 0; padding-left:5px;"> <a href="flow.php" class="continue_buy" style="padding:0;">返回修改购物车</a> </div>
      <div style="float:right;width:55%;text-align:right;padding:8px 20px;"> 
        <!--余额额支付密码_更改-->
        <input onclick="return check_before_submit()" type="image" src="images/jmpic/btn_done.gif" align="absmiddle" />
        <!--余额额支付密码_更改-->
        <input name="need_inv" style="display:none;" type="checkbox"  class="input" id="ECS_NEEDINV" onclick="changeNeedInv()" value="1" checked="true" />
        <input type="hidden" name="step" value="done" />
        <input type="hidden" name="have_consignee" value="{if $consignee_list}1{else}0{/if}" />
      </div>
    </div>
    <div class="blank10"></div>
  </form>
  <script>
  <!-- 初始化配送方式 -->
    if(document.getElementById('shipping_{$order.shipping_id}')){
	document.getElementById('shipping_{$order.shipping_id}').click();
    }
    </script> 
  <!-- {/if} --> 
  
  <!-- {if $step eq "done"} --> 
  <!-- 订单提交成功 -->
  <div id="A_Stepbar" class="flowstep">
    <ol class="flowstep-5">
      <li class="step-first">
        <div class="step-done">
          <div class="step-name">查看购物车</div>
          <div class="step-no"></div>
        </div>
      </li>
      <li>
        <div class="step-done">
          <div class="step-name">拍下商品</div>
          <div class="step-no"></div>
        </div>
      </li>
      <li>
        <div class="step-done">
          <div class="step-name">付款</div>
          <div class="step-no"></div>
        </div>
      </li>
      <li>
        <div class="step-name">确认收货</div>
        <div class="step-no">4</div>
      </li>
      <li class="step-last">
        <div class="step-name">评价</div>
        <div class="step-no">5</div>
      </li>
    </ol>
  </div>
  <div class="flowBox" style="margin:30px auto 70px auto;">
    <h6 style="text-align:center; height:30px; line-height:30px;">{$lang.remember_order_number}: <font style="color:red">{$order.order_sn}</font></h6>
    <table width="99%" align="center" border="0" cellpadding="15" cellspacing="0" bgcolor="#fff" style="border:1px solid #ddd; margin:20px auto;" >
      <tr>
        <td align="center" bgcolor="#FFFFFF"><!--{if $order.shipping_name}-->{$lang.select_shipping}: <strong>{$order.shipping_name}</strong>,<!--{/if}-->{$lang.select_payment}: <strong>{$order.pay_name}</strong>。{$lang.order_amount}: <strong>{$total.amount_formated}</strong></td>
      </tr>
      <tr>
        <td align="center" bgcolor="#FFFFFF">{$order.pay_desc}</td>
      </tr>
      <!-- {if $pay_online} --> 
      <!-- 如果是线上支付则显示支付按钮 -->
      <tr>
        <td align="center" bgcolor="#FFFFFF">{$pay_online}</td>
      </tr>
      <!-- {/if} -->
    </table>
    <!--{if $virtual_card}-->
    <div style="text-align:center;overflow:hidden;border:1px solid #E2C822;background:#FFF9D7;margin:10px;padding:10px 50px 30px;"> 
      <!--{foreach from=$virtual_card item=vgoods}-->
      <h3 style="color:#2359B1; font-size:12px;">{$vgoods.goods_name}</h3>
      <!--{foreach from=$vgoods.info item=card}-->
      <ul style="list-style:none;padding:0;margin:0;clear:both">
        <!--{if $card.card_sn}-->
        <li style="margin-right:50px;float:left;"> <strong>{$lang.card_sn}:</strong><span style="color:red;">{$card.card_sn}</span> </li>
        <!--{/if}--> 
        <!--{if $card.card_password}-->
        <li style="margin-right:50px;float:left;"> <strong>{$lang.card_password}:</strong><span style="color:red;">{$card.card_password}</span> </li>
        <!--{/if}--> 
        <!--{if $card.end_date}-->
        <li style="float:left;"> <strong>{$lang.end_date}:</strong>{$card.end_date} </li>
        <!--{/if}-->
      </ul>
      <!--{/foreach}--> 
      <!--{/foreach}--> 
    </div>
    <!--{/if}-->
    <p style="text-align:center; margin-bottom:20px;">{$order_submit_back}</p>
  </div>
  <!-- {/if} --> 
  <!-- {if $step eq "login"} --> 
  {insert_scripts files='utils.js,user.js'} 
  <script type="text/javascript">
        {foreach from=$lang.flow_login_register item=item key=key}
          var {$key} = "{$item}";
        {/foreach}

        {literal}
        function checkLoginForm(frm) {
          if (Utils.isEmpty(frm.elements['username'].value)) {
            alert(username_not_null);
            return false;
          }

          if (Utils.isEmpty(frm.elements['password'].value)) {
            alert(password_not_null);
            return false;
          }

          return true;
        }

        function checkSignupForm(frm) {
          if (Utils.isEmpty(frm.elements['username'].value)) {
            alert(username_not_null);
            return false;
          }

          if (Utils.trim(frm.elements['username'].value).match(/^\s*$|^c:\\con\\con$|[%,\'\*\"\s\t\<\>\&\\]/))
          {
            alert(username_invalid);
            return false;
          }

          if (Utils.isEmpty(frm.elements['email'].value)) {
            alert(email_not_null);
            return false;
          }

          if (!Utils.isEmail(frm.elements['email'].value)) {
            alert(email_invalid);
            return false;
          }

          if (Utils.isEmpty(frm.elements['password'].value)) {
            alert(password_not_null);
            return false;
          }

          if (frm.elements['password'].value.length < 6) {
            alert(password_lt_six);
            return false;
          }

          if (frm.elements['password'].value != frm.elements['confirm_password'].value) {
            alert(password_not_same);
            return false;
          }
          return true;
        }
        {/literal}
        </script> 
  <!-- 开始用户登录注册界面 -->
  <div class="flowBox">
    <table width="99%" align="center" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
      <tr>
        <td width="50%" valign="top" bgcolor="#ffffff"><h6><span>用户登录:</span></h6>
          <form action="flow.php?step=login" method="post" name="loginForm" id="loginForm" onsubmit="return checkLoginForm(this)">
            <table width="90%" border="0" cellpadding="8" cellspacing="1" bgcolor="#B0D8FF" class="table">
              <tr>
                <td bgcolor="#ffffff"><div align="right"><strong>{$lang.username}</strong></div></td>
                <td bgcolor="#ffffff"><input name="username" type="text" class="inputBg" id="username" /></td>
              </tr>
              <tr>
                <td bgcolor="#ffffff"><div align="right"><strong>{$lang.password}</strong></div></td>
                <td bgcolor="#ffffff"><input name="password" class="inputBg" type="password" /></td>
              </tr>
              <!-- 判断是否启用验证码{if $enabled_login_captcha} -->
              <tr>
                <td bgcolor="#ffffff"><div align="right"><strong>{$lang.comment_captcha}:</strong></div></td>
                <td bgcolor="#ffffff"><input type="text" size="8" name="captcha" class="inputBg" />
                  <img src="captcha.php?is_login=1&{$rand}" alt="captcha" style="vertical-align: middle;cursor: pointer;" onClick="this.src='captcha.php?is_login=1&'+Math.random()" /></td>
              </tr>
              <!--{/if}-->
              <tr>
                <td colspan="2"  bgcolor="#ffffff"><input type="checkbox" value="1" name="remember" id="remember" />
                  <label for="remember">{$lang.remember}</label></td>
              </tr>
              <tr>
                <td bgcolor="#ffffff" colspan="2" align="center"><a href="user.php?act=qpassword_name" class="f6">{$lang.get_password_by_question}</a>&nbsp;&nbsp;&nbsp;<a href="user.php?act=get_password" class="f6">{$lang.get_password_by_mail}</a></td>
              </tr>
              <tr>
                <td bgcolor="#ffffff" colspan="2"><div align="center">
                    <input type="submit" class="bnt_blue" name="login" value="{$lang.forthwith_login}" />
                    <!-- {if $anonymous_buy eq 1} 是否允许未登录用户购物 -->
                    <input type="button" class="bnt_blue_2" value="{$lang.direct_shopping}" onclick="location.href='flow.php?step=consignee&amp;direct_shopping=1'" />
                    <!-- {/if} -->
                    <input name="act" type="hidden" value="signin" />
                  </div></td>
              </tr>
            </table>
          </form></td>
        <td valign="top" bgcolor="#ffffff"><h6><span>用户注册:</span></h6>
          <form action="flow.php?step=login" method="post" name="formUser" id="registerForm" onsubmit="return checkSignupForm(this)">
            <table width="98%" border="0" cellpadding="8" cellspacing="1" bgcolor="#B0D8FF" class="table">
              <tr>
                <td bgcolor="#ffffff" align="right" width="25%"><strong>{$lang.username}</strong></td>
                <td bgcolor="#ffffff"><input name="username" type="text" class="inputBg" id="username" onblur="is_registered(this.value);" />
                  <br />
                  <span id="username_notice" style="color:#FF0000"></span></td>
              </tr>
              <tr>
                <td bgcolor="#ffffff" align="right"><strong>{$lang.email_address}</strong></td>
                <td bgcolor="#ffffff"><input name="email" type="text" class="inputBg" id="email" onblur="checkEmail(this.value);" />
                  <br />
                  <span id="email_notice" style="color:#FF0000"></span></td>
              </tr>
              <tr>
                <td bgcolor="#ffffff" align="right"><strong>{$lang.password}</strong></td>
                <td bgcolor="#ffffff"><input name="password" class="inputBg" type="password" id="password1" onblur="check_password(this.value);" onkeyup="checkIntensity(this.value)" />
                  <br />
                  <span style="color:#FF0000" id="password_notice"></span></td>
              </tr>
              <tr>
                <td bgcolor="#ffffff" align="right"><strong>{$lang.confirm_password}</strong></td>
                <td bgcolor="#ffffff"><input name="confirm_password" class="inputBg" type="password" id="confirm_password" onblur="check_conform_password(this.value);" />
                  <br />
                  <span style="color:#FF0000" id="conform_password_notice"></span></td>
              </tr>
              <!-- 判断是否启用验证码{if $enabled_register_captcha} -->
              <tr>
                <td bgcolor="#ffffff" align="right"><strong>{$lang.comment_captcha}:</strong></td>
                <td bgcolor="#ffffff"><input type="text" size="8" name="captcha" class="inputBg" />
                  <img src="captcha.php?{$rand}" alt="captcha" style="vertical-align: middle;cursor: pointer;" onClick="this.src='captcha.php?'+Math.random()" /></td>
              </tr>
              <!--{/if}-->
              <tr>
                <td colspan="2" bgcolor="#ffffff" align="center"><input type="submit" name="Submit" class="bnt_blue_1" value="{$lang.forthwith_register}" />
                  <input name="act" type="hidden" value="signup" /></td>
              </tr>
            </table>
          </form></td>
      </tr>
      {if $need_rechoose_gift}
      <tr>
        <td colspan="2" align="center" style="border-top:1px #ccc solid; padding:5px; color:red;">{$lang.gift_remainder}</td>
      </tr>
      {/if}
    </table>
  </div>
  <!-- 结束用户登录注册界面 --> 
  <!-- {/if} --> 
  
</div>
</div>
<!-- #BeginLibraryItem "/library/page_footer.lbi" --><!-- #EndLibraryItem --> <!-- #BeginLibraryItem "/library/site_bar.lbi" --><!-- #EndLibraryItem -->
</body>
<div id="pop" class="pop" style="display:none">
  					<div class="pop_head">选择自提点</div>
                    <a href="javascript:void(0);" onclick="hide('pop')" title="关闭"  class="pop_head_r"></a>
  					<div class="pop_body" id='pickcontent'></div>
				</div>
{insert_scripts files='order_pickpoint.js'}
<div class="choose" id="choose" style="display:none"></div>
<script type="text/javascript">
function closeCustomer(){
	$("#choose").hide();
	}
function choose_gift(suppid)
{
	var sel_goods = new Array();
	var obj_cartgoods = document.getElementsByName("sel_cartgoods[]");
	var j = 0;
	for (i=0;i<obj_cartgoods.length;i++)
	{
		if(obj_cartgoods[i].checked == true)
		{	
			sel_goods[j] = obj_cartgoods[i].value;
			j++;
		}
	}
	Ajax.call('flow.php', 'is_ajax=1&suppid=' + suppid + '&sel_goods='+sel_goods, selgiftResponse, 'GET', 'JSON');
}
function selgiftResponse(res)
{
	$('#choose').html(res.result).show();
}
</script>
<script type="text/javascript">
var process_request = "{$lang.process_request}";
{foreach from=$lang.passport_js item=item key=key}
var {$key} = "{$item}";
{/foreach}
var username_exist = "{$lang.username_exist}";
var compare_no_goods = "{$lang.compare_no_goods}";
var btn_buy = "{$lang.btn_buy}";
var is_cancel = "{$lang.is_cancel}";
var select_spe = "{$lang.select_spe}";
</script>
</html>