<!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 content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>{%$lngpack.sitename%}</title>
<meta name="keywords" content="{%$lngpack.keyword%}" />
<meta name="description" content="{%$lngpack.description%}" />
<script type="text/javascript" src="{%$rootdir%}js/jquery.js"></script>
<script type="text/javascript" src="{%$rootdir%}js/basicrun.js"></script>
<script type="text/javascript" src="{%$rootdir%}js/jquery.Slide.js"></script>
<script type="text/javascript" src="{%$rootdir%}js/ajax_city.js"></script>
<link href="{%$rootpath%}css/espcms_v5div.css" rel="stylesheet" type="text/css" />
<link href="{%$rootpath%}css/espcms_public.css" rel="stylesheet" type="text/css" />
<link href="{%$rootpath%}css/espcms_page.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
	$(window).load(function() {
		$("#clickmenubotton li span").hover(function() {
			$(this).addClass("menuhover");
			$(this).parent().find("ul.subnav").slideDown('fast').show();
			$(this).parent().hover(function() {
			}, function() {
				$(this).parent().find("ul.subnav").fadeOut('fast');
				$(this).parent().find("span").removeClass("menuhover");
			});
		});
	});
</script>
</head>

<body>
{%link file="public/head.html"%}
<div class="espcms_page_bannpic"><img src="{%$rootpath%}images/bann/type_pic.jpg"/></div>
<div class="espcms_page">
	{%if $out=='buylist'%}
	<script type="text/javascript">
		var order_amout_err = "{%$lngpack.order_amout_err%}";
	</script>
	<div class="pb10 pt20 tc"><img src="{%$rootpath%}images/a1.jpg"/></div>
	<div class="espcms_member_login_center espcms_formwidth_c">
		{% if count($array) > 0 %}
		<div class="title mb20"><div class="messageicon3"></div><div class="messtitle">Shopping Cart</div></div>
		<form name="mainform" method="post" action="{%$mlink.orderupdae%}">
		<table class="tablelist" width="99%" style="margin:0 auto;">
			<tr>
				<td class="td01">Cart Items</td>
				<td class="td01">Photo</td>
				<td class="td01">Product ID</td>
				<td class="td01">Item Price</td>
				<td class="td01">Qty</td>
				<td class="td01">Item Total</td>
				<td class="td01">Remove</td>
			</tr>
			{%forlist from=$array key=i%}
			<tr>
				<td class="td02"><a target="_blank" class="infolink01" href="{%$array[i].link%}">{%$array[i].title%}</a></td>
				<td class="td02"><img src="{%$array[i].pic|zoom(90,90)%}"></td>
				<td class="td02">{%$array[i].tsn%}</td>
				<td class="td03">
					{%$moneytype%}{%$array[i].bprice%}
					<input type="hidden" name="bprice[]" value="{%$array[i].bprice%}"/>
					<input type="hidden" name="did[]" value="{%$array[i].did%}"/>
				</td>
				<td class="td02">
					<input type="text" name="amount[]" id="amount{%$array[i].did%}" value="{%$array[i].amount%}" onBlur="javascript:orderamount({%$array[i].did%});" size="2" maxlength="5" class="infoInput"/>
				</td>
				<td class="td03">
					{%$moneytype%}{%$array[i].countprice%}
					<input type="hidden" name="countprice[]" id="countprice" value="{%$array[i].countprice%}">
				</td>
				<td class="td02"><a class="button red" href="javascript:if (confirm('Are you sure you want to remove it?')) location.href='{%$array[i].dellink%}';">Remove</a></td>
			</tr>
			{%/forlist%}
			<tr>
				<td colspan="16" class="td03"><span class="f14 colorgreg strong">Items:{%$moneytype%}{%$ordertotal%}</span></td>
			</tr>
			<tr>
				<td colspan="16" class="td03">
					<input type="submit" class="button" name="Submit" value="Update"/>&nbsp;
					<input name="addch" class="button" type="button" value="Delete" onclick="javascript:if (confirm('Are you sure you want to empty it?')) location.href='{%$mlink.clearcart%}';"/>
				</td>
			</tr>
			<tr>
				<td colspan="10" class="td03">
					<table class="tablelist" width="100%" style="margin:0 auto;">
						<tr>
							<td class="left"><input name="addch" class="button blue" type="button" value="Continue shopping" onclick="javascript:location.href='{%$homelink%}';"/></td>
							<td class="right"><input name="addch" class="button orange" type="button" value="Settlement" onclick="javascript:location.href='{%$mlink.orderpay%}';"/></td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		</form>
		{%else%}
		<div class="title mb10"><div class="messageicon2"></div><div class="messtitle">Reminder</div></div>
		<div class="espcms_form_group tc f14 pt15">You have not choose goods!</div>
		{%/if%}
	</div>
	{%elseif $out=='buyedit'%}

	<script type="text/javascript">
	{%if $mem_isaddress==1%}
	$(function() {
	    sec_cityone('{%$member.country%}','{%$member.province%}');
	    sec_citytwo('{%$member.province%}','{%$member.city%}');
	    sec_district('{%$member.city%}','{%$member.district%}');
	});
	{%/if%}
	var citytwo_title = "Province";
	var citythree_title = "City";
	var district_title = "Area";
	var address_title = "{%$lngpack.address_title%}";
	var zipcode_empty = "{%$lngpack.zipcode_empty%}";
	var alias_empty = "{%$lngpack.alias_empty%}";
	var email_err = "{%$lngpack.email_err%}";
	var tel_empty = "{%$lngpack.tel_empty%}";
	</script>
	<div class="pb10 pt20 tc"><a href="{%$mlink.buylist%}"><img src="{%$rootpath%}images/a2.jpg"/></a></div>
	<div class="espcms_member_login_center espcms_formwidth_c">
		{% if count($array) > 0 %}
		<div class="title mb10"><div class="messageicon3"></div><div class="messtitle">Products List</div></div>
		<form name="ordersaveform" method="post" action="{%$mlink.ordersave%}" onsubmit="return ordersave()">
		<input type="hidden" name="userid" value="{%$member.userid%}"/>
		<input type="hidden" name="productmoney" value="{%$productmoney%}"/>
		<input type="hidden" name="discount_productmoney" value="{%$discount_productmoney%}"/>
		<input type="hidden" name="discountmoney" value="{%$discountmoney%}"/>
		<input type="hidden" name="tokenkey" value="{%$tokenkey.token_key%}"/>
			<table class="tablelist" width="99%" style="margin:0 auto;">
				<tr>
					<td class="td01">Cart Items</td>
					<td class="td01">Photo</td>
					<td class="td01">Product ID</td>
					<td class="td01">Item Price</td>
					<td class="td01">Qty</td>
					<td class="td01">Item Total</td>
				</tr>
				{%forlist from=$array key=i%}
				<tr>
					<td class="td02">
						<input type="hidden" name="ptitle[]" value="{%$array[i].title%}">
						<a target="_blank" class="infolink01" href="{%$array[i].link%}">{%$array[i].title%}</a>
					</td>
					<td class="td02"><img src="{%$array[i].pic|zoom(90,90)%}"></td>
					<td class="td02"><input type="hidden" name="tsn[]" value="{%$array[i].tsn%}">{%$array[i].tsn%}</td>
					<td class="td02">
						{%$moneytype%}{%$array[i].bprice%}
						<input type="hidden" name="bprice[]" value="{%$array[i].bprice%}">
						<input type="hidden" name="oprice[]" value="{%$array[i].oprice%}">
						<input type="hidden" name="did[]" value="{%$array[i].did%}">
					</td>
					<td class="td02">{%$array[i].amount%}<input type="hidden" name="amount[]" id="orderhow" value="{%$array[i].amount%}"></td>
					<td class="td03">{%$moneytype%}{%$array[i].countprice%}<input type="hidden" name="countprice[]" id="countprice" value="{%$array[i].countprice%}"></td>
				</tr>
				{%/forlist%}
				<tr>
					<td colspan="6" class="pt10 pb10 tr"><span class="f14 colorgreg strong">Price:{%$moneytype%}{%$productmoney_f%} - Discount {%$moneytype%}{%$discountmoney%} = {%$moneytype%}{%$discount_productmoney_f%}</span></td>
				</tr>
			</table>

			<div class="title mb20 mt20"><div class="messageicon3"></div><div class="messtitle">Distribution</div></div>
			<table class="tablelist" width="99%" style="margin:0 auto;">
				{% if count($shipplug) > 0 %}
				{%forlist from=$shipplug key=i%}
				<tr>
					<td class="td03" width="20%">{%$shipplug[i].title%}</td>
					<td class="td04">
						<input type="radio" name="osid" value="{%$shipplug[i].osid%}"{%if key=>i==1%} checked{%/if%}>
						{%if $shipplug[i].price>0%}Freight：{%$moneytype%}{%$shipplug[i].price%} {%/if%}{%$shipplug[i].content%}
					</td>
				</tr>
				{%/forlist%}
				{%else%}
				<tr>
					<td class="center">No shipping method</td>
				</tr>
				{%/if%}
			</table>

			<div class="title mb20 mt20"><div class="messageicon3"></div><div class="messtitle">Payment term</div></div>
			<table class="tablelist" width="99%" style="margin:0 auto;">
				{% if count($payplug) > 0 %}
				{%forlist from=$payplug key=i%}
				<tr>
					<td class="td03" width="20%">{%$payplug[i].payname%}</td>
					<td class="td04">
						<input type="radio" name="opid" value="{%$payplug[i].opid%}" {%if key=>i==1%} checked{%/if%}>
						{%if $shipplug[i].payis>0%}Fee：{%$payplug[i].payis%}%{%/if%} {%$payplug[i].paycontent%}
					</td>
				</tr>
				{%/forlist%}
				{%else%}
				<tr>
					<td class="tc">No payment</td>
				</tr>
				{%/if%}
			</table>

			<div class="title mb20 mt20"><div class="messageicon3"></div><div class="messtitle">Modify the receipt information</div></div>
			<div class="espcms_form_group">
				<label for="title" class="control_label16">CONSIGNEE </label>
				<div class="control_required20">
					<input type="text" name="alias" value="{%$member.alias%}" class="col4 infoInput" size="20" maxlength="50"/>
					<span class="form_message">Enter real name</span>
				</div>
			</div>
			<div class="espcms_form_group">
				<label for="title" class="control_label16">Sex</label>
				<div class="control_required20 f14">
					<input type="radio" value="1" name="sex" {%if $member.sex==1%}checked{%/if%} /> Man&nbsp;
					<input type="radio" value="0" name="sex" {%if $member.sex==0%}checked{%/if%} /> Woman
				</div>
			</div>
			<div class="espcms_form_group">
				<label for="title" class="control_label16">E-mail</label>
				<div class="control_required20 f14"><input type="text" name="email" value="{%$member.email%}" maxlength="100" size="50" class="col5 infoInput" /></div>
			</div>
			<div class="espcms_form_group">
				<label for="title" class="control_label16">Tel</label>
				<div class="control_required20 f14"><input type="text" name="tel" value="{%$member.tel%}" maxlength="50" size="50" class="col4 infoInput" /></div>
			</div>
			<div class="espcms_form_group">
				<label for="title" class="control_label16">Mobile</label>
				<div class="control_required20 f14"><input type="text" name="mobile" value="{%$member.mobile%}" maxlength="50" size="50" class="col4 infoInput" /> </div>
			</div>
			{%if $mem_isaddress==1%}
			<div class="espcms_form_group">
				<label for="title" class="control_label16">District</label>
				<div class="control_required20 f14">
					<select size="1" name="cityone" class="infoInput" id="cityone">
						<option value="0" {%if $member.country==0%}selected{%/if%}>Country</option>
						<option value="1" {%if $member.country==1%}selected{%/if%}>China</option>
					</select>
					<select size="1" name="citytwo" class="infoInput" id="citytwo">
						<option selected value="0">Province</option>
					</select>
					<select size="1" name="citythree" class="infoInput" id="citythree">
						<option selected value="0">City</option>
					</select>
					<select size="1" name="district" class="infoInput" id="district">
						<option selected value="0">Area</option>
					</select>
					<span id="loading">Loading</span>
				</div>
			</div>
			{%/if%}
			<div class="espcms_form_group">
				<label for="title" class="control_label16">Address</label>
				<div class="control_required20 f14"><input type="text" name="address" value="{%$member.address%}" maxlength="200" size="80" class="col6 infoInput" /> <span class="form_message">请输入真实的收件地址</span></div>
			</div>
			<div class="espcms_form_group">
				<label for="title" class="control_label16">Zipcode</label>
				<div class="control_required20 f14"><input type="text" name="zipcode" value="{%$member.zipcode%}" maxlength="10" size="10" class="col3 infoInput" /></div>
			</div>
			<div class="espcms_form_group">
				<label for="title" class="control_label16">Delivery Time</label>
				<div class="control_required20 f14">
					<select size="1" name="sendtime" class="infoInput">
						<option value="1">Working day, weekend and holiday delivery available</option>
						<option value="2">Only weekends, holidays and delivery (working days do not send)</option>
						<option value="3">Only working days delivery (weekends, holidays do not send)</option>
						<option value="4">Try to arrange delivery time, please Remarks</option>
					</select>
				</div>
			</div>
			<div class="espcms_form_group">
				<label for="title" class="control_label16">Remarks</label>
				<div class="control_required20 f14"><textarea name="content" rows="5" cols="60" class="col10 infoInput"></textarea></div>
			</div>
			<div class="espcms_form_group">
				<label for="title" class="control_label16">Invoice Title</label>
				<div class="control_required20 f14"><input type="text" name="invpayee" maxlength="100" class="col6 infoInput" /></div>
			</div>
			<div class="espcms_form_group">
				<label for="title" class="control_label16">Invoice</label>
				<div class="control_required20 f14"><input type="text" name="invcontent" maxlength="100" class="col6 infoInput" /></div>
			</div>
			<div class="espcms_form_group">
				<label class="control_label16"> </label>
				<div class="control_required20">
					<input type="submit" id="submit" class="button blue2" value="Submit"/>
				</div>
			</div>
		</form>
		{%else%}
		<div class="title mb10"><div class="messageicon2"></div><div class="messtitle">Reminder</div></div>
		<div class="espcms_form_group tc f14 pt15">You have not choose goods</div>
		{%/if%}
	</div>
	{%elseif $out=='buyok'%}
	<div class="pb10 pt20 tc"><img src="{%$rootpath%}images/a3.jpg"/></div>
	<div class="espcms_member_login_center espcms_formwidth_c">
		<div class="title mb30"><div class="messageicon3"></div><div class="messtitle">Order submitted successfully</div></div>
		<div class="espcms_form_group tc f14">Thanks for Your Order!Order No.:<span class="oninage b">{%$ordersn%}</span></div>
		<div class="espcms_form_group tc f14 pt15">Goods together{%$moneytype%}{%$discount%} + Postage{%$moneytype%}{%$shipprice%} + Commission{%$moneytype%}{%$payprice%} = <span class="oninage">{%$moneytype%}{%$orderamount%}</span></div>
		<div class="espcms_form_group tc pt15">{%$orderonline%}</div>
		{%if $order_ismember%}
		<div class="espcms_form_group tc pt15">
			<a class="button blue2" href="{%$mlink.center%}">My Account</a>  <a class="button blue2" href="{%$homelink%}">Home</a>
		</div>
		{%/if%}
	</div>
	{%/if%}
</div>
{%link file="public/footer.html"%}
</body>
</html>
