<%@ Register TagPrefix="cc1" Namespace="PayPal.Web.Controls" Assembly="PayPal.Web.Controls" %>
<%@ Page language="c#" Codebehind="CheckoutSucc.aspx.cs" AutoEventWireup="false" Inherits="wqeshop.CheckoutSucc" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>Thank You For Your Ordering</title>
		<LINK href="inc/style.css" type="text/css" rel="stylesheet"></LINK>
		<SCRIPT language="JavaScript">
		function printPage() 
		{
			eval("printOrder" + ".style.display=\"none\";");
			window.print(); 
		}
		</SCRIPT>
		<SCRIPT language="JavaScript">
		function showButton() 
		{
			if(<%=payment.InterfaceID%> == 1)
			{
				eval("onlinePay" + ".style.display=\"none\";");
			}
			else
			{
				eval("onlinePay" + ".style.display=\"\";");
			}
		}
		</SCRIPT>
		<script language="JavaScript">
function GetDiv(sDiv)
{
	var div;
	if (document.getElementById)
		div = document.getElementById(sDiv);
	else if (document.all)
		div = eval("window." + sDiv);
	else if (document.layers)
		div = document.layers[sDiv];
	else
		div = null;

	return div;
}

function HideDiv(sDiv)
{
	d = GetDiv(sDiv);
	if (d)
	{
		if (document.layers) d.visibility = "hide";
		else d.style.visibility = "hidden";
	}
}

function PleaseWait(sDivButton, sDivMessage, sInnerHtml)
{
	HideDiv(sDivButton);
	var d = GetDiv(sDivMessage);
	if (d) d.innerHTML = sInnerHtml;
}
		</script>
	</HEAD>
	<body onLoad="showButton()">
		<form id="Form1" method="post" runat="server">
			<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
				<TBODY>
					<TR>
						<TD vAlign="middle" width="3%"><STRONG><BR>
							</STRONG>
						</TD>
						<TD vAlign="middle" align="center" width="30%">
							<%=config.SiteLogo%>
						</TD>
						<TD class="body-shoptitle" vAlign="middle" align="center" width="67%"><%=GetResourceString("ThankYouForYourOrdering")%><br>
							<%=GetResourceString("OrderNo")%>：<%=order.OrderNo%><br>
							<%=GetResourceString("OrderTime")%>：<%=order.OrderTime%> <%if(order.ShipTime!=""){%><BR>
							<%=GetResourceString("Date")%>：<%=order.ShipTime%><%}%>
						</TD>
					</TR>
				</TBODY></TABLE>
			<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
				<TBODY>
					<TR>
						<TD>&nbsp;</TD>
					</TR>
				</TBODY></TABLE>
			<TABLE cellSpacing="0" cellPadding="1" width="100%" border="0">
				<TBODY>
					<TR>
						<TD><STRONG><%=GetResourceString("OrderInfo")%></STRONG>
							<HR noShade SIZE="1">
						</TD>
					</TR>
				</TBODY></TABLE>
			<TABLE cellSpacing="3" cellPadding="3" width="100%" border="0">
				<TBODY>
					<TR>
						<TD align="center" width="64" height="26"><%=GetResourceString("ProductNo")%></TD>
						<TD align="left" width="284" height="26"><%=GetResourceString("ProductName")%><BR>
						</TD>
						<TD align="center" width="99" height="26"><%=GetResourceString("Quantity")%></TD>
						<TD align="center" width="98" height="26"><%=GetResourceString("Search_Price")%><BR>
						</TD>
						<TD align="center" width="98" height="26"><%=GetResourceString("FittingPrice")%><BR>
						</TD>
						<TD align="center" width="104" height="26"><%=GetResourceString("Total")%></TD>
						<td align="center" width="130"><%=GetResourceString("IsDiscount")%></td>
					</TR> <!-- BEGIN row --><asp:repeater id="rptOrderItems" Runat="server">
						<ItemTemplate>
							<TR>
								<TD noWrap align="center" width="64" height="20"><%# DataBinder.Eval(Container.DataItem, "ProductID") %></TD>
								<TD align="left" width="334" height="20"><%# DataBinder.Eval(Container.DataItem, "ProductName") %><br>
									<%# GetItemNames(DataBinder.Eval(Container.DataItem, "OrderProductID").ToString()) %>
								</TD>
								<TD align="center" width="99" height="20"><%# DataBinder.Eval(Container.DataItem, "Quantity") %></TD>
								<TD align="center" width="98" height="20"><%# DataBinder.Eval(Container.DataItem, "UnitPrice","{0:c2}") %></TD>
								<TD align="center" width="98" height="20"><%# DataBinder.Eval(Container.DataItem, "ItemsPrice","{0:c2}") %></TD>
								<TD align="center" width="104" height="20"><%# DataBinder.Eval(Container.DataItem, "SubPrice","{0:c2}") %></TD>
								<TD width="80" align="center"><%# DataBinder.Eval(Container.DataItem, "IsDiscount").ToString() == "1" ? "Yes" : "No" %></TD>
							</TR>
						</ItemTemplate>
					</asp:repeater>
					<TR>
						<TD align="center" width="64">&nbsp;</TD>
						<TD width="334">&nbsp;</TD>
						<TD width="98">&nbsp;</TD>
						<TD width="99">&nbsp;</TD>
						<TD width="104">&nbsp;</TD>
					</TR>
				</TBODY></TABLE>
			<TABLE cellSpacing="0" cellPadding="2" width="100%" border="0">
				<tr>
					<td vAlign="top" width="50%">
						<table width="100%">
							<tr>
								<td><%=GetResourceString("OrderStatus")%>：<%=orderStatus%></td>
							</tr>
							<tr>
								<td><%=GetResourceString("ShippingWay")%>：<%=GetShippingName(order.ShippingType)%></td>
							</tr>
							<tr>
								<td><%=GetResourceString("PaymentInfo")%>：<%=GetPaymentName(order.PaymentType)%></td>
							</tr>
						</table>
					</td>
					<td width="50%">
						<table width="100%">
							<tr>
								<td align="right" width="50%"><%=GetResourceString("ProductPrice")%>：</td>
								<td width="10%"></td>
								<td><%=string.Format("{0:c}",order.ProductPrice)%>
									(
									<%=order.Discount%>
									% )</td>
							</tr>
							<tr>
								<td align="right" width="50%"><%=GetResourceString("FittingPrice")%>：</td>
								<td width="10%"></td>
								<td><%=string.Format("{0:c}",order.CustomItemPrice)%></td>
							</tr>
							<tr>
								<td align="right" width="50%"><%=GetResourceString("ShippingPrice")%>：</td>
								<td width="10%"></td>
								<td><%=string.Format("{0:c}",order.ShipPrice)%></td>
							</tr>
							<tr>
								<td align="right" width="50%"><%=GetResourceString("TotalPrice")%>：</td>
								<td width="10%"></td>
								<td><%=string.Format("{0:c}",order.TotalPrice)%></td>
							</tr>
							<tr>
								<td align="right" width="50%"><%=GetResourceString("UseAdvancePayment")%>：</td>
								<td width="10%"></td>
								<td><%=string.Format("{0:c}",order.AdvancePayment)%></td>
							</tr>
							<tr>
								<td align="right" width="50%"><%=GetResourceString("TotalNotPayed")%>：</td>
								<td width="10%"></td>
								<td><font color="red"><%=GetPay()%></font></td>
							</tr>
						</table>
					</td>
				</tr>
			</TABLE>
			<TABLE cellSpacing="3" cellPadding="3" width="100%" border="0">
				<tr>
					<td><STRONG><%=GetResourceString("BuyerInfo")%></STRONG></td>
					<td><STRONG><%=GetResourceString("ReceiverInfo")%></STRONG></td>
				</tr>
				<tr>
					<td width="50%">
						<table>
							<tr>
								<td align="right"><%=GetResourceString("BuyerName")%>：</td>
								<td><%=order.BuyerName%></td>
							</tr>
							<tr>
								<td align="right"><%=GetResourceString("BuyerMemberName")%>：</td>
								<td><%=GetMemberName(order.MemberID)%></td>
							</tr>
							<tr>
								<td align="right"><%=GetResourceString("BuyerTelephone")%>：</td>
								<td><%=order.BuyerPhone%></td>
							</tr>
							<tr>
								<td align="right">Emai：</td>
								<td><%=order.BuyerEmail%></td>
							</tr>
							<tr>
								<td align="right"><%=GetResourceString("BuyerAddress")%>：</td>
								<td><%=order.BuyerAddress%></td>
							</tr>
							<tr>
								<td align="right"><%=GetResourceString("BuyerPostalcode")%>：</td>
								<td><%=order.BuyerPostalcode%></td>
							</tr>
						</table>
					</td>
					<td width="50%">
						<table>
							<tr>
								<td align="right"><%=GetResourceString("ReceiverName")%>：</td>
								<td><%=order.ReceiverName%></td>
							</tr>
							<tr>
								<td align="right"><%=GetResourceString("ReceiverTelephone")%>：</td>
								<td><%=order.ReceiverPhone%></td>
							</tr>
							<tr>
								<td align="right">Email：</td>
								<td><%=order.ReceiverEmail%></td>
							</tr>
							<tr>
								<td align="right"><%=GetResourceString("ReceiverAddress")%>：</td>
								<td><%=order.ReceiverAddress%></td>
							</tr>
							<tr>
								<td align="right"><%=GetResourceString("ReceiverPostalcode")%>：</td>
								<td><%=order.ReceiverPostalcode%></td>
							</tr>
							<tr>
								<td align="right"></td>
								<td></td>
							</tr>
						</table>
					</td>
				</tr>
			</TABLE>
			<table width="100%">
				<tr>
					<td><STRONG><%=GetResourceString("OrderComment")%></STRONG></td>
				</tr>
				<tr>
					<td><%=order.Remark%></td>
				</tr>
				<tr>
					<td vAlign="middle" align="center" height="20"><cc1:uploadcompletecartbutton id="UploadCompleteCartButton1" runat="server" Visible="False"></cc1:uploadcompletecartbutton><br>
						<br>
						<SPAN id="onlinePay">
						<%if(!IsMd5Pay_med()) {%>
							<input style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; WIDTH: 69px; BORDER-BOTTOM: #000000 1px solid; HEIGHT: 22px" onclick="frmPay.submit()" type="button" value="<%=GetResourceString("OrderPayOnline")%>">
						<%}else{%>
						<asp:literal id="ltrPayment1" Runat="server"></asp:literal>
						<%}%>
						</SPAN>
						<SPAN id="printOrder">
							<input style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; WIDTH: 69px; BORDER-BOTTOM: #000000 1px solid; HEIGHT: 22px"
								onclick="printPage()" type="button" value="<%=GetResourceString("OrderPrint")%>">
							<input style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; WIDTH: 69px; BORDER-BOTTOM: #000000 1px solid; HEIGHT: 22px"
								onclick="window.close();opener.focus();" type="button" value="<%=GetResourceString("OrderFinish")%>">
						</SPAN>
						<asp:Label id="lbHidden" runat="server" Visible="False">USD</asp:Label>
					</td>
				</tr>
			</table>
			<iframe style="VISIBILITY: hidden" border=0 src='Actions.aspx?Action=SendOrderEmail&amp;OrderID=<%=Request.QueryString["OrderID"]%>&amp;BEmail=<%=Request.QueryString["BEmail"]%>' width=0 height=0></iframe>
		</form>
		<asp:literal id="ltrPayment" Runat="server"></asp:literal>
	</body>
</HTML>
