<?

/*
FlexCMS (http://www.flexcms.com)
Flexible, Powerful, Affordable.

Contents of this file are protected by the copyright
notice found at http://www.flexcms.com/flex/pages/copyright.html,
and its usage is subject to the terms of the licensing agreement 
available at http://www.flexcms.com/flex/pages/license.html
*/



	// ========================================================================================
	
	// ========================================================================================
	
	$PageTitle = '<img src="'.$ImagesURL.'/admin/admincp_ecom.gif" width="20" height="21" align="middle"> '.$MsgText[9][184];
	$BrowserTitle = $MsgText[9][184];
	$LocationBar = '<a href="'.$IndexURL.'">'.$MsgText[0][1].'</a> > <a href="' . $MainURL . '/options.html">'.$MsgText[0][4].'</a> > <a href="'.$MainURL.'/admin/store-orders.html">'.$MsgText[9][174].'</a> > '.$MsgText[9][184];
	
	if ($LoggedIn == 'y') {
		
		ReadPermissions();
		Global $Permissions;
		
		if ($Permissions[905] == 'y') {
		
			
			$query = "select * from `".$Settings['DBPrefix']."ec-Settings`";
			$result = mysql_query($query) or die (mysql_error());
			while ($row = mysql_fetch_array($result)) {
				$ecSettings[$row['Name']] = $row['Value'];
			}
			
			
			
			
			
	
	if ($ecSettings['HighlightColor'] != '') {
		$HighlightColor = $ecSettings['HighlightColor'];
	}
	else {
		$HighlightColor = '#ff0000';
	}
	
	
	$InStock = '';
	if ($ecSettings['ShowInStock'] != 'n') {
		if ($ecSettings['ShowInStockOther'] != '') {
			$InStock = $ecSettings['ShowInStockOther'];
		}
		else {
			$InStock = $MsgText[9][158];
		}
	}
		
	$SoldOut = '';
	if ($ecSettings['ShowSoldOut'] != 'n') {
		if ($ecSettings['ShowSoldOutOther'] != '') {
			$SoldOut = $ecSettings['ShowSoldOutOther'];
		}
		else {
			$SoldOut = $MsgText[9][162];
		}
	}
	
	
	
	if ($ecSettings['CurrencyLocation'] == '' || $ecSettings['CurrencyLocation'] == 'b') {
		if ($ecSettings['Currency'] == '') {
			$CurrencyBefore = '$';
		}
		else {
			$CurrencyBefore = $ecSettings['Currency'];
		}
	}
	else {
		if ($ecSettings['Currency'] == '') {
			$CurrencyAfter = '$';
		}
		else {
			$CurrencyAfter = $ecSettings['Currency'];
		}
	}
	
	
	
	if ($ecSettings['PriceDecimals'] == '') {
		$ecSettings['PriceDecimals'] = 2;
	}
	
	
	if ($ecSettings['DecimalSymbol'] == '') {
		$ecSettings['DecimalSymbol'] = '.';
	}
	
	
	if ($ecSettings['ThousandsSep'] == '') {
		$ecSettings['ThousandsSep'] = ',';
	}
	
	
	
	if ($ecSettings['WeightUnits'] == '' || $ecSettings['WeightUnits'] == 'lbs') {
		$WeightUnits = 'Lbs.';
	}
	else {
		$WeightUnits = 'Kg';
	}
	
	
	if ($ecSettings['CurrencyCode'] != '') {
		$CurrencyCode = $ecSettings['CurrencyCode'];
	}
	else {
		$CurrencyCode = 'USD';
	}
	
			
			
			
			
			
			
			if ($ecSettings['ShippingAndHandling'] != 'n') {
				$SHTitle = $MsgText[9][187];
			}
			else {
				$SHTitle = $MsgText[9][186];
			}
			
		
					
			$PaymentMethods[1] = $MsgText[9][176];
			$PaymentMethods[2] = $MsgText[9][177];
			$PaymentMethods[3] = $MsgText[9][178];
			$PaymentMethods[4] = $MsgText[9][364];
			
			
			
						
			
			$query = "select * from `".$Settings['DBPrefix']."ec-Orders` where RecordNumber='".intval($Arguments3)."' limit 1";
			$result = mysql_query($query) or die (mysql_error());
			if (mysql_num_rows($result) > 0) {
				$row = mysql_fetch_array($result);
			
				$query2 = "select * from `".$Settings['DBPrefix']."ec-Addresses` where RecordNumber=".$row['BillingAddress']."  limit 1";
				$result2 = mysql_query($query2) or die (mysql_error());
				$row2 = mysql_fetch_array($result2);
				
				if ($row2['OrganizationCompany'] != '') {
					$row2['OrganizationCompany'] .= '<br>';
				}
					
				if ($row2['Address2'] != '') {
					$row2['Address1'] .= '<br>'.$row2['Address2'];
				}
				if ($row2['Address3'] != '') {
					$row2['Address1'] .= '<br>'.$row2['Address3'];
				}
				if ($row2['Address4'] != '') {
					$row2['Address1'] .= '<br>'.$row2['Address4'];
				}
				
				if ($row2['Country'] != $Settings['SiteCountry']) {
					$query5 = "select * from `".$Settings['DBPrefix']."core-Countries` where Code='".$row2['Country']."' limit 1";
					$result5 = mysql_query($query5) or die (mysql_error());
					$row5 = mysql_fetch_array($result5);
					
					$Country = '<br>'.$row5['Name'];
				}
					
				$BillingAddress = $row2['FirstName'].' '.$row2['LastName'].'<br>'.$row2['OrganizationCompany'].$row2['Address1'].'<br>' . $row2['City'].', '.$row2['StateProvince'].'<br>'.$row2['ZipPostal'].$Country.'<br><br>'.$MsgText[9][242].': '.$row2['Phone'];
				
				
				$query4 = "select * from `".$Settings['DBPrefix']."ec-Addresses` where RecordNumber=".$row['ShippingAddress']."  limit 1";
				$result4 = mysql_query($query4) or die (mysql_error());
				$row4 = mysql_fetch_array($result4);
				
				$Country = '';
				
				if ($row4['OrganizationCompany'] != '') {
					$row4['OrganizationCompany'] .= '<br>';
				}
					
				if ($row4['Address2'] != '') {
					$row4['Address1'] .= '<br>'.$row4['Address2'];
				}
				if ($row4['Address3'] != '') {
					$row4['Address1'] .= '<br>'.$row4['Address3'];
				}
				if ($row4['Address4'] != '') {
					$row4['Address1'] .= '<br>'.$row4['Address4'];
				}
				
				if ($row4['Country'] != $Settings['SiteCountry']) {
					$query5 = "select * from `".$Settings['DBPrefix']."core-Countries` where Code='".$row4['Country']."' limit 1";
					$result5 = mysql_query($query5) or die (mysql_error());
					$row5 = mysql_fetch_array($result5);
					
					$Country = '<br>'.$row5['Name'];
				}
					
				$ShippingAddress = $row4['FirstName'].' '.$row4['LastName'].'<br>'.$row4['OrganizationCompany'].$row4['Address1'].'<br>' . $row4['City'].', '.$row4['StateProvince'].'<br>'.$row4['ZipPostal'].$Country.'<br><br>'.$MsgText[9][242].': '.$row4['Phone'];
				
				
				
				$query3 = "select * from `".$Settings['DBPrefix']."core-Users` where RecordNumber=".$row['Account']."  limit 1";
				$result3 = mysql_query($query3) or die (mysql_error());
				$row3 = mysql_fetch_array($result3);
				
				$UsernamePrint = $row3['Username'];
				if ($row3['DisplayName'] != '') {					
					$row3['Username'] .= ' ('.$row3['DisplayName'].')';					
				}
			
				
				$CustomerInfo = $row2['FirstName'].' '.$row2['LastName'].'<br>'.$row3['Email'];
			
					
				if ($row['PaymentReceived'] > 0) {
					
					if ($row['PaymentDetails'] != '') {
						if ($row['PaymentDetails2'] != '') {
							$row['PaymentDetails'] .= '<br>'.$row['PaymentDetails2'];
						}
						$row['PaymentDetails'] = '<br>'.$row['PaymentDetails'];
					}
					
					$Paid = '<b><font color="#008800">'.$MsgText[0][118].'</font></b><br><br><b>'.$MsgText[9][243].':</b><br>'.date('M j, Y @ g:ia',$row['PaymentReceived']).$row['PaymentDetails'];
					
				}
				else {
					$Paid = '<b><font color="#ff0000">'.$MsgText[0][119].'</font></b><br><br><a href="'.$MainURL.'/admin/store-orders-modify/'.$row['RecordNumber'].'/record_payment.html">'.$MsgText[9][210].'</a>';
				}
				
				
				if ($row['ShippedDate'] > 0) {
				
					if ($row['ShippingDetails'] != '') {
						if ($row['ShippingDetails2'] != '') {
							$row['ShippingDetails'] .= '<br>'.$row['ShippingDetails2'];
						}
						$row['ShippingDetails'] = '<br>'.$row['ShippingDetails'];
					}
				
					$Shipped = '<b><font color="#008800">'.$MsgText[0][118].'</font></b><br><br><b>'.$MsgText[9][243].':</b><br>'.date('M j, Y @ g:ia',$row['ShippedDate']).$row['ShippingDetails'];
				}
				else {
					$Shipped = '<b><font color="#ff0000">'.$MsgText[0][119].'</font></b><br><br><a href="'.$MainURL.'/admin/store-orders-modify/'.$row['RecordNumber'].'/mark_shipped.html">'.$MsgText[9][222].'</a>';
				}
				
				
				
				
				$PageContents .= '<br><a href="'.$MainURL.'/admin/store-deleteorder/'.$row['RecordNumber'].'.html"><b>'.$MsgText[9][16].'</b></a><br><br><br><b>'.$MsgText[9][196].':</b> '.$row['RecordNumber'].'-'.$row['OrderID'].'<br><br><b>'.$MsgText[9][197].': </b> '.date('M j, Y',$row['DateCode']).' @ '.date('g:ia',$row['DateCode']).'<br><br><b>'.$MsgText[9][244].':</b> <a href="'.$MainURL.'/profile/'.$UsernamePrint.'.html" target="_blank">'.$row3['Username'].'</a> - '.$row3['Email'].'<br><br><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td bgcolor="'.$Colors['Text'].'"><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="1" alt="" border="0"></td></tr></table><br><table width="90%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td valign="top"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$MsgText[9][245].':</b><br>'.$BillingAddress.'</font></td>
      <td><font face="'.$FontFace.'" size="'.$FontSize.'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></td>
      <td valign="top"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$MsgText[9][246].':</b><br>'.$ShippingAddress.'</font></td>
    </tr>
</table><br>';
				
				
				
					$ItemsList = explode(',',$row['Items']);
					$ItemFound = false;
				
					for ($i = 0; $i < (count($ItemsList)-1); $i++) {
						$ItemPriceStored = '';
					
						list ($ItemNumA, $Qty) = explode('x',$ItemsList[$i]);
						list ($Qty, $ItemPriceStored) = explode('@',$Qty);
						$ItemsQty += $Qty;
						
						list ($ItemNum, $Incentive) = explode('-', $ItemNumA);
						
						
						$query3 = "select * from `".$Settings['DBPrefix']."ec-Items` where RecordNumber='".$ItemNum."' limit 1";
						$result3 = mysql_query($query3) or die (mysql_error());
						$row3 = mysql_fetch_array($result3);
						
						$ShippingWeight += ($row3['ShippingWeight']*$Qty);
						
						$query4 = "select * from `".$Settings['DBPrefix']."ec-Products` where RecordNumber='".$row3['Product']."' limit 1";
						$result4 = mysql_query($query4) or die (mysql_error());
						$row4 = mysql_fetch_array($result4);
						
						
						if ($row3['Option2'] != '') {
							$row4['Name'] .= ' ('.$row3['Option1'].', '.$row3['Option2'].')';
							}
						else if ($row3['Option1'] != '') {
							$row4['Name'] .= ' ('.$row3['Option1'].')';
						}
						
						
						if ($Incentive == '') {
						
													
							$PricingLevel = 1;
							for ($k = 1; $k <= 10; $k++) {
								if ($row3['PriceQty'.$k] > 0 && $Qty >= $row3['PriceQty'.$k]) {
									$PricingLevel = $k;
								}
							}
							
							
							if ($ItemPriceStored != '') {
								$ItemPrice = $ItemPriceStored;
							}
							else {
								$ItemPrice = $row3['Price'.$PricingLevel];
							}
				
							$Subtotal = ($ItemPrice*$Qty);
							
							$ItemsTotal += $Subtotal;
							
						
							$ContentsPrint .= '<tr><td align="center"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$Qty.'</b></font></td><td><font face="'.$FontFace.'" size="'.$FontSize.'"><a href="'.$MainURL.'/store/details/'.$row4['ProductID'].'.html" target="_blank">'.$row4['Name'].'</a></font></td><td align="right"><font face="'.$FontFace.'" size="'.$FontSize.'">'.$CurrencyBefore.number_format($ItemPrice,$ecSettings['PriceDecimals'], $ecSettings['DecimalSymbol'], $ecSettings['ThousandsSep']).$CurrencyAfter.'</font></td><td align="right"><font face="'.$FontFace.'" size="'.$FontSize.'">'.$CurrencyBefore.number_format($Subtotal,$ecSettings['PriceDecimals'], $ecSettings['DecimalSymbol'], $ecSettings['ThousandsSep']).$CurrencyAfter.'</font></td></tr>';

						
						} // end if not incentive
						else {
					
							$query7 = "select * from `".$Settings['DBPrefix']."ec-Incentives` where RecordNumber='".$Incentive."' and Active=1 limit 1";
							$result7 = mysql_query($query7) or die (mysql_error());
							if (mysql_num_rows($result7) != 0) {
								$row7 = mysql_fetch_array($result7);
								
								if ($Qty > $row7['Arguments3']) {
									$Qty = $row7['Arguments3'];
								}
							
	
								if ($row7['Arguments6'] != '') {
									$row7['Arguments6'] = '<br><b>'.$row7['Arguments6'].'</b>';						
								}
							
						
								
								if ($ItemPriceStored != '') {
									$ItemPrice = $ItemPriceStored;
								}
								else {
    									$ItemPrice = $row7['Arguments5'];
								}
								
			
								$Subtotal = ($ItemPrice*$Qty);
							
								$ItemsTotal += $Subtotal;
								
							
								$ContentsPrint .= '<tr><td align="center"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$Qty.'</b></font></td><td><font face="'.$FontFace.'" size="'.$FontSize.'"><a href="'.$MainURL.'/store/details/'.$row4['ProductID'].'.html" target="_blank">'.$row4['Name'].$row7['Arguments6'].'</a></font></td><td align="right"><font face="'.$FontFace.'" size="'.$FontSize.'">'.$CurrencyBefore.number_format($ItemPrice,$ecSettings['PriceDecimals'], $ecSettings['DecimalSymbol'], $ecSettings['ThousandsSep']).$CurrencyAfter.'</font></td><td align="right"><font face="'.$FontFace.'" size="'.$FontSize.'">'.$CurrencyBefore.number_format($Subtotal,$ecSettings['PriceDecimals'], $ecSettings['DecimalSymbol'], $ecSettings['ThousandsSep']).$CurrencyAfter.'</font></td></tr>';
						
																		
							}
							
						} // end if incentive
					
					}
				
								
					$Total = ($ItemsTotal + $TotalTaxes);
													
				
					
					// check to see if there are any active discounts to apply to this order
																				
					$query24 = "select * from `".$Settings['DBPrefix']."ec-Discounts`";
					$result24 = mysql_query($query24) or die (mysql_error());
					while ($row24 = mysql_fetch_array($result24)) {
						$DiscountNames[$row24['RecordNumber']] = $row24['Name'];
					}
										
										
					if ($row['Discounts'] != '') {
					
						list ($row['Discounts'], $Trash) = explode(',', $row['Discounts']);
						list ($DiscountID, $DiscountAmount) = explode('-', $row['Discounts']);								
								
						$DiscountsSection .= '<tr><td colspan="3" align="right"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$DiscountNames[$DiscountID].'</b></font></td><td align="right"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>- '.$CurrencyBefore.number_format($DiscountAmount,$ecSettings['PriceDecimals'], $ecSettings['DecimalSymbol'], $ecSettings['ThousandsSep']).$CurrencyAfter.'</b></font></td></tr>';
						
						
						$ItemsTotal = ($ItemsTotal - $DiscountAmount);				
						$Total = ($Total - $DiscountAmount);
					}
			
					
					// end discounts portion
						
				
				
				
				$query6 = "select * from `".$Settings['DBPrefix']."ec-Shipping` where RecordNumber='".$row['ShippingType']."' limit 1";
				$result6 = mysql_query($query6) or die (mysql_error());
				$row6 = mysql_fetch_array($result6);
							
				$ShippingName = $row6['Description'];
				
				$ShippingPrice = $row['ShippingAmount'];
						
				
				
				
				$query69 = "select * from `".$Settings['DBPrefix']."ec-Taxes` where ((Type='N' and Arguments1='".$row2['Country']."') or (Type='S' and Arguments1='".$row2['Country']."' and Arguments2='".$row2['StateProvince']."')) and Active=1 order by Type asc";
				$result69 = mysql_query($query69);
				while ($row69 = mysql_fetch_array($result69)) {
					if ($row69['Number'] != '') {
						$row69['Number'] = ' ('.$row69['Number'].')';
					}
					
					$TaxAmount = number_format(($Total*($row69['Rate']/100)),2);
				
					$TaxesSection .= '<tr><td colspan="3" align="right"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$row69['Title'].$row69['Number'].' '.$row69['Description'].' ('.(($row69['Rate']+1)-1).'%)</b></font></td><td align="right"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$CurrencyBefore.number_format($TaxAmount,$ecSettings['PriceDecimals'], $ecSettings['DecimalSymbol'], $ecSettings['ThousandsSep']).$CurrencyAfter.'</b></font></td></tr>';
					$TaxesTotal += $TaxAmount;
				}
				
				
				$LocalTaxesList = explode(',',$row2['Taxes']);
				
				for ($z = 0; $z < (count($LocalTaxesList)-1); $z++) {
				
					$query69 = "select * from `".$Settings['DBPrefix']."ec-Taxes` where Type='L' and Arguments1='".$row2['Country']."' and Arguments2='".$row2['StateProvince']."' and Active=1 and RecordNumber=".$LocalTaxesList[$z]." limit 1";
					$result69 = mysql_query($query69);
					if (mysql_num_rows($result69) > 0) {
						$row69 = mysql_fetch_array($result69);
					
						if ($row69['Number'] != '') {
							$row69['Number'] = ' ('.$row69['Number'].')';
						}
					
						$TaxAmount = number_format(($Total*($row69['Rate']/100)),2);
				
						$TaxesSection .= '<tr><td colspan="3" align="right"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$row69['Title'].$row69['Number'].' '.$row69['Description'].' ('.(($row69['Rate']+1)-1).'%)</b></font></td><td align="right"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$CurrencyBefore.number_format($TaxAmount,$ecSettings['PriceDecimals'], $ecSettings['DecimalSymbol'], $ecSettings['ThousandsSep']).$CurrencyAfter.'</b></font></td></tr>';
						$TaxesTotal += $TaxAmount;
					}
					
				}
				
				
				
				
			
				$PageContents .= '<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td bgcolor="'.$Colors['Text'].'"><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="1" alt="" border="0"></td></tr></table><br><b>'.$MsgText[9][247].':</b><br><table width="90%" cellpadding="4" cellspacing="0" border="0"><tr><td align="center"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$MsgText[9][248].'</b></font></td><td><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$MsgText[9][249].'</b></font></td><td align="right"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$MsgText[9][250].'</b></font></td><td align="right"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$MsgText[9][251].'</b></font></td></tr>'.$ContentsPrint.'<tr><td colspan="4"><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="5" alt="" border="0"></td></tr>'.$DiscountsSection.'<tr><td colspan="4"><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="5" alt="" border="0"></td></tr><tr><td colspan="2"><font face="'.$FontFace.'" size="'.$FontSize.'">&nbsp;</font></td><td align="right"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$MsgText[9][252].'</b></font></td><td align="right"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$CurrencyBefore.number_format($ItemsTotal,$ecSettings['PriceDecimals'], $ecSettings['DecimalSymbol'], $ecSettings['ThousandsSep']).$CurrencyAfter.'</b></font></td></tr>'.$TaxesSection.'<tr><td colspan="3" align="right"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$SHTitle.'</b></font></td><td align="right"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$CurrencyBefore.number_format($ShippingPrice,$ecSettings['PriceDecimals'], $ecSettings['DecimalSymbol'], $ecSettings['ThousandsSep']).$CurrencyAfter.'</b></font></td></tr><tr><td colspan="3" align="right"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$MsgText[9][253].'</b></font></td><td align="right"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$CurrencyBefore.number_format(($Total+$ShippingPrice+$TaxesTotal),$ecSettings['PriceDecimals'], $ecSettings['DecimalSymbol'], $ecSettings['ThousandsSep']).$CurrencyAfter.'</b></font></td></tr></table>';
				
				if ($row['NotesComments'] != '') {
					$PageContents .= '<br><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td bgcolor="'.$Colors['Text'].'"><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="1" alt="" border="0"></td></tr></table><br><b>'.$MsgText[9][254].':</b><br>'.str_replace("\n",'<br>',$row['NotesComments']).'<br>';
				}
				
				
				$query16 = "select * from `".$Settings['DBPrefix']."ec-StatusMessages` where OrderNum='".$row['RecordNumber']."' order by DateCode asc";
				$result16 = mysql_query($query16) or die (mysql_error());
				if (mysql_num_rows($result16) > 0) {
					while ($row16 = mysql_fetch_array($result16)) {
						$MessagesList .= '<br><b>'.$row16['Title'].' ('.date('M j, Y @ g:ia',$row16['DateCode']).')</b><br>'.str_replace("\n",'<br>',$row16['Text']).'<br><br>';
					}
				
					$MessagesPart = '<b>'.$MsgText[9][255].':</b><br>'.$MessagesList.'<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td bgcolor="'.$Colors['Text'].'"><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="1" alt="" border="0"></td></tr></table>';
				}
				
				
				$PageContents .= '<br><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td bgcolor="'.$Colors['Text'].'"><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="1" alt="" border="0"></td></tr></table><br><b>'.$MsgText[9][211].':</b> '.$PaymentMethods[$row['PaymentMethod']].'<br><br><b>'.$MsgText[9][256].':</b> '.$Paid.'<br><br><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td bgcolor="'.$Colors['Text'].'"><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="1" alt="" border="0"></td></tr></table><br><b>'.$MsgText[9][257].':</b> '.$ShippingName.' ('.$CurrencyBefore.number_format($ShippingPrice,$ecSettings['PriceDecimals'], $ecSettings['DecimalSymbol'], $ecSettings['ThousandsSep']).$CurrencyAfter.')<br><br><b>'.$MsgText[9][199].':</b> '.$Shipped.'<br><br><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td bgcolor="'.$Colors['Text'].'"><img src="'.$ImagesURL.'/admin/spacer.gif" width="1" height="1" alt="" border="0"></td></tr></table><br>'.$MessagesPart.'<br>';
			
		
			} // end if row found
			else {
				$PageContents = '<br><br>'.$MsgText[9][258];
			}
		
		
		}
		else {
		
			$PageContents = $MsgText[0][97];
		
		}

	}
	else {
	
		RedirectToLogin();
	
	}

	// ========================================================================================




?>
