<%@ Register TagPrefix="cc1" Namespace="PayPal.Web.Controls" Assembly="PayPal.Web.Controls" %>
<%@ Page language="c#" Codebehind="CheckoutSucc.aspx.cs" AutoEventWireup="false" Inherits="XpShop.WebUI.CheckoutSucc" %>
<%@ Register TagPrefix="uc1" TagName="Footer" Src="Modules/Footer.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Helper" Src="Modules/Helper.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Modules/Header.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
	<HEAD>
		<!--#include file="../../inc/encoding.inc"-->
		<title>下订成功!</title>
		<!--#include file="../../inc/head.inc"-->
		<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()">
		<div id="container">
		        <uc1:Header id="Header1" runat="server"></uc1:Header>
		    <div style=" margin:0px auto; width:990px; background:#ffffff;">
			    <!--内容开始-->
			    <div id="CurrentStatus">
		            <div class="tl"><%=GetResourceString("ValidateOrders")%></div>
		            <div class="tr"></div>
		            <div class="tm"></div>
		        </div>    
			    <div class="checkout">
				    <div class="ml"></div>
				    <div class="mr"></div>
				    <div class="mmc">
				        
					    <form id="Form1" method="post" runat="server">
			                <TABLE cellSpacing="3" cellPadding="3" width="100%" border="0">
				                <TBODY><!-- BEGIN row --><asp:repeater id="rptOrderItems" Runat="server" Visible="false">
						                <ItemTemplate>
							                <TR>
								                <TD noWrap align="center" width="64" height="20"><%# DataBinder.Eval(Container.DataItem, "ProductID") %></TD>
								                <TD align="left" width="184" height="20"><%# DataBinder.Eval(Container.DataItem, "ProductName") %><br>
									                <%# GetItemNames(DataBinder.Eval(Container.DataItem, "OrderProductID").ToString()) %>
								                </TD>
								                <TD align="left" width="100" height="26"><%# bShow(DataBinder.Eval(Container.DataItem, "ProductSpecs"))%><BR></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:f2}") %></TD>
								                <TD align="center" width="98" height="20"><%# DataBinder.Eval(Container.DataItem, "ItemsPrice","{0:f2}") %></TD>
								                <TD align="center" width="104" height="20"><%# DataBinder.Eval(Container.DataItem, "SubPrice","{0:f2}") %></TD>
								                <TD width="80" align="center"><%# DataBinder.Eval(Container.DataItem, "IsDiscount").ToString() == "1" ? "Yes" : "No" %></TD>
							                </TR>
						                </ItemTemplate>
					                </asp:repeater>
				                </TBODY></TABLE>
			               
			                
			                <table width="100%">
				                <tr>
				                    <td style="color:#009944; font-weight:bold; line-height:26px; font-size:15px; vertical-align:middle;"><div class="checkoutsucc"></div><%=GetResourceString("ThankYouForYourOrdering")%></td>
				                </tr>
				                <tr>
					                <td style="padding-left:20px; color:#000000; font-weight:bold;"><div class="citems"></div><%=GetResourceString("OrderNo")%>：<%=order.OrderNo%></td>
				                </tr>
				                <tr>
					                <td style="padding-left:20px; color:#000000; font-weight:bold;"><div class="citems"></div><%=GetResourceString("TotalPrice")%>：<font color="#f20000"><%=GetCurrency()%><%=string.Format("{0:f}",order.TotalPrice)%></font></td>
				                </tr>
				                <%if(!(order.PayStatus > 0)){%>
				                <tr>
				                    <td style="padding-left:35px;"> <SPAN id="onlinePay"><%=GetResourceString("CheckoutSucc1")%>&nbsp;&nbsp;<%=GetPaymentName(order.PaymentType)%>&nbsp;&nbsp;<%=GetResourceString("CheckoutSucc2")%><font color="#ff936b"><%=string.Format("{0:f}",order.TotalPrice)%><%=GetResourceString("Yuan")%></font>，<font color="#ff7314" size="2"><b><%=GetResourceString("CheckoutSucc3")%>：</b></font>
				                        <br><br />
						                <%if (!IsMd5Pay_med() && order.PaymentType != 0){%>
						               
							                <input class="payonline" onclick="frmPay.submit()" type="button" value="<%=GetResourceString("OrderPayOnline")%>">
						                    <div class="checkoutsucctip2"><%=XpShop.WebUI.WebUtils.GetAD(42)%></div>
						                <%}else{%>
						                <asp:literal id="ltrPayment1" Runat="server"></asp:literal>
						                <%}%>
						                </SPAN>
				                    </td>
				                </tr>
				                <%}else{%>
				                <tr>
					                <td vAlign="middle" align="center" height="20"><cc1:uploadcompletecartbutton id="UploadCompleteCartButton1" runat="server" Visible="False"></cc1:uploadcompletecartbutton><br>
						                
						                <%--<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 class="payonline" 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>
			                <div class="checkoutsucctip1">
			                    <%=XpShop.WebUI.WebUtils.GetAD(43)%> 
			                </div>
			                <div class="checkoutsucctip">
			                   <%=XpShop.WebUI.WebUtils.GetAD(44)%> 
			                </div>
			                    <%=XpShop.WebUI.WebUtils.GetAD(45)%>
			                <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>
				    </div>
				    <div class="bl"></div>
				    <div class="br"></div>
				    <div class="bm"></div>
			    </div>
			    <!--内容结束--> 
			</div>
			    <uc1:Helper id="Helper1" runat="server"></uc1:Helper>
			    <uc1:Footer id="Footer1" runat="server"></uc1:Footer>
		</div>
	</body>
</HTML>
