HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/molennooitgedagtbudel.nl/wwwroot/emailTemplatePhp.inc.php
<?php

$bericht_html = "";
$bericht_os = "";

$header_html = "<html><head><title>Bestelling Molen Nooit Gedagt Budel.nl</title></head><body><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#FFFFFF\">
<tr><td align=\"center\"><table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-family:Arial, Helvetica, sans-serif; font-size: 11px; line-height: 14px;\">
<tr><td align=\"left\"><table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-family:Arial, Helvetica, sans-serif;font-size: 11px; line-height: 14px;\">
<tr><td colspan=\"6\" align=\"center\"><img src=\"http://www.molennooitgedagtbudel.nl/img/logo.jpg\" alt=\"molennooitgedagtbudel.nl\" width=\"170\" height=\"170\"></td></tr><tr><td colspan=\"6\">";

$bericht_html .= $header_html;
$bericht_os .= $header_html;
$header_html = "";

$bericht_html .= "<span style=\"font-family:Arial, Helvetica, sans-serif; font-size: 13px; color:#000000; line-height:16px;\"><br><br>Geachte ".$aanhef." ".$achternaam_volledig.",</span>
<p style=\"font-family:Arial, Helvetica, sans-serif; font-size: 13px; color:#000000; line-height:16px;\">Hartelijk dank voor uw bestelling bij Molen Nooit Gedagt Budel.nl.
<br>Hieronder vindt u de gegevens met betrekking tot uw bestelling.<br><br><strong>Bestelnummer</strong>: ".$ordernummer."<br><br></p>";

$bericht_os .= "<span style=\"font-family:Arial, Helvetica, sans-serif; font-size: 13px; color:#000000; line-height:16px;\"><br><br>Beste Johan,</span>
<p style=\"font-family:Arial, Helvetica, sans-serif; font-size: 13px; color:#000000; line-height:16px;\">Er heeft iemand een bestelling geplaats via de webwinkel.
<br>Hieronder vind je de gegevens met betrekking tot de bestelling.<br><br><strong>Bestelnummer</strong>: ".$ordernummer."<br><br></p>";

$article_table = "</td></tr><tr><td colspan=\"6\" valign=\"top\"><hr style=\"border:0; width: 600px; color:#2B388F; background-color:#2B388F; height:2px;\">
<span style=\"font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; color: #2B388F; margin-top:10px; #2B388F; margin-bottom:10px; display:block;\">Besteld bij Molen Nooit Gedagt Budel.nl:</span>
</td></tr><tr><td colspan=\"1\" width=\"375\" valign=\"top\" style=\"padding-right:20px; padding-bottom:4px; padding-top:4px;\"><strong>Titel</strong></td>
<td colspan=\"1\" valign=\"top\" style=\"padding-right:20px; padding-bottom:4px; padding-top:4px;\"><strong>Aantal</strong></td>
<td colspan=\"2\" valign=\"top\" style=\"padding-right:20px; padding-bottom:4px; padding-top:4px;\"><strong>Prijs </strong></td>
<td colspan=\"2\" valign=\"top\" style=\"padding-right:20px; padding-bottom:4px; padding-top:4px;\"><STRONG>Totaal</STRONG></td>
</tr>";

$subtotaalprijs = 0;
$verzendkosten = 0;
$verzendGewicht = 0;
$aantalItemsBerekening = count($winkelwagenArray['artikelen']);
for ($berekeningNummer = 0; $berekeningNummer < $aantalItemsBerekening; $berekeningNummer++){ 
	$q_atikel = sprintf("SELECT kms_articles.article_id, kms_articles.naam, kms_articles.artikelnummer, kms_articles.prijs, kms_articles.gewicht FROM kms_articles WHERE kms_articles.article_id='%s'", checkData($winkelwagenArray['artikelen'][$berekeningNummer]));
	$r_atikel = mysql_query($q_atikel);
	$rec_atikel = mysql_fetch_assoc($r_atikel);
		
	$artikelPrijs = $rec_atikel['prijs'] * $winkelwagenArray['aantallen'][$berekeningNummer];
    $verzendGewicht = $verzendGewicht + ($rec_atikel['gewicht'] * $winkelwagenArray['aantallen'][$berekeningNummer]);
	
	$subtotaalprijs = $subtotaalprijs + $artikelPrijs;

	$artikelPrijs =  formatPrice($artikelPrijs); 

	$article_table .= "<tr>
					<td valign=\"top\" style=\"padding-right:20px; padding-bottom:4px; padding-top:4px;\">".html_entity_decode($rec_atikel['artikelnummer'])." - ".html_entity_decode($rec_atikel['naam'])." (".$rec_atikel['gewicht']." kg)</td>
					<td valign=\"top\" style=\"padding-right:20px; padding-bottom:4px; padding-top:4px;\">".$winkelwagenArray['aantallen'][$berekeningNummer]."</td>
					<td valign=\"top\" style=\"padding-bottom:4px; padding-top:4px; padding-right:8px; text-align:right\">&euro;</td>
					<td valign=\"top\" style=\"padding-right:20px; padding-bottom:4px; padding-top:4px; text-align:right\">".str_replace('.',',',$rec_atikel['prijs'])."</td>
					<td valign=\"top\" style=\"padding-right:8px; padding-bottom:4px; padding-top:4px; text-align:right\">&euro;</td>
					<td valign=\"top\" style=\"padding-right:20px; padding-bottom:4px; padding-top:4px; text-align:right;\">".str_replace('.',',',$artikelPrijs)."</td>
				 </tr>";
}

if(!empty($_SESSION['persoonsgegevens']['land'])){
	if(!empty($_SESSION['persoonsgegevens']['landBezorg'])){
		if($_SESSION['persoonsgegevens']['landBezorg'] == "Nederland"){
			$landCode = "NL";
			$pakketKosten = 6.90;	
		}else{
			$landCode = "BE";
			$pakketKosten = 8.75;	
		}
	}else{
		if($_SESSION['persoonsgegevens']['land'] == "Nederland"){
			$landCode = "NL";
			$pakketKosten = 6.90;	
		}else{
			$landCode = "BE";
			$pakketKosten = 8.75;	
		}
	}
}else{
	$landCode = "NL";
	$pakketKosten = $pakketKosten;
}

if($verzendGewicht <= 20){
	$verzendkosten =  $pakketKosten;
}else{

	$aantalPakketten = ceil($verzendGewicht / 20);
	$verzendGewichtBerekening = $verzendGewicht;

	for($i=1;$i<=$aantalPakketten;$i++){
		$verzendGewichtBerekening = $verzendGewichtBerekening - 20;
		$verzendkosten = $verzendkosten + $pakketKosten;
	}
}

if($rec_order_data['verzendwijze'] == "ophalen"){
    $verzendkosten = 0;
}

$totaalprijs = $subtotaalprijs + $verzendkosten;
$subtotaalprijs =  formatPrice($subtotaalprijs);
$verzendkosten =  formatPrice($verzendkosten);
$totaalprijs =  formatPrice($totaalprijs);


$article_table .= "<tr><td colspan=\"6\">&nbsp;</td></tr><tr><td colspan=\"6\" valign=\"top\"><hr style=\"border:0; width: 600px; color:#2B388F; background-color:#2B388F; height:2px;\"></td>
</tr><tr>
<td colspan=\"4\" valign=\"top\" style=\"padding-right:20px; padding-bottom:4px; padding-top:4px;\">Bestelbedrag</td>
<td valign=\"top\" style=\"padding-right:8px; padding-bottom:4px; padding-top:4px; text-align:right;\">&euro;</td>
<td valign=\"top\" style=\"padding-right:20px; padding-bottom:4px; padding-top:4px; text-align:right;\">".str_replace('.',',',$subtotaalprijs)."</td>
</tr><tr>
<td colspan=\"4\" valign=\"top\" style=\"padding-right:20px; padding-bottom:6px; padding-top:4px;\">Verzendkosten ".$landCode."</td>
<td valign=\"top\" style=\"padding-right:8px; padding-bottom:6px; padding-top:4px; text-align:right\">&euro;</td>
<td valign=\"top\" style=\"padding-right:20px; padding-bottom:6px; padding-top:4px; text-align:right;\">".str_replace('.',',',$verzendkosten)."</td>
</tr><tr>
<td colspan=\"4\" valign=\"top\" style=\"padding-right:20px; padding-bottom:4px; padding-top:4px; border-top:solid #2B388F 1px;\"><strong>Totaalbedrag</strong></td>
<td valign=\"top\" style=\"padding-right:8px; padding-bottom:4px; padding-top:4px; text-align:right; border-top:solid #2B388F 1px;\"><strong>&euro;</strong></td>
<td valign=\"top\" style=\"padding-right:20px; padding-bottom:4px; padding-top:4px; text-align:right; border-top:solid #2B388F 1px;\"><strong>".str_replace('.',',',$totaalprijs)."</strong></td>
</tr></table><br><span style=\"font-family:Arial, Helvetica, sans-serif; font-size: 11px; color:#000000; line-height:14px;\">";

$bericht_html .= $article_table;
$bericht_os .= $article_table;
$article_table = "";

$bericht_html .= "<strong>Betaalmethode:</strong> ".$payment->method." <br>U heeft de bestelling al betaald via ".$payment->method.".</span><br><br>";
$bericht_os .= "<strong>Betaalmethode:</strong> ".$payment->method." <br>Er is gekozen voor betaling via ".$payment->method.".</span><br><br>";

$adresgegevens .= "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#FFFFFF\">
<tr><td align=\"left\"><table width=\"400\" border=\"0\" cellspacing=\"0\" style=\"font-family: Arial, Helvetica, sans-serif;font-size: 11px; line-height: 14px;\">
			<tr>
				<td width=\"200\" valign=\"top\"><strong>Factuuradres</strong></td>
				<td width=\"200\" valign=\"top\"><strong>Bezorgadres</strong></td>
			</tr>
			<tr>
				<td valign=\"top\" style=\"padding-right:20px;\">";
				$factuuradres = "";
				if(!empty($bedrijfsnaam)){ $factuuradres .= $bedrijfsnaam."<br>"; }
				if($geslacht == "man"){ $aanheftTekst = "Dhr."; }else{ $aanheftTekst = "Mevr."; }
				$factuuradres .= $aanheftTekst." ".$voornaam." ".$achternaam_smallCap."<br>".$straatnaam." ".$huisnummer."".$toevoeging."<br>".$postcode." ".$woonplaats."<br>".$land."</td>";
				$adresgegevens .= $factuuradres;
				$adresgegevens .= "<td valign=\"top\">";
				if($bezorgadresWijktAf == "no"){
					$adresgegevens .= $factuuradres;
				}else{
					if(!empty($bedrijfsnaam)){ $adresgegevens .= $bedrijfsnaamBezorg."<br>"; }
					if($geslachtBezorg == "man"){ $aanheftTekstBezorg = "Dhr."; }else{ $aanheftTekstBezorg = "Mevr."; }
					$adresgegevens .= $aanheftTekstBezorg." ".$voornaamBezorg." ".$achternaam_smallCapBezorg."<br>".$straatnaamBezorg." ".$huisnummerBezorg."".$toevoegingBezorg."<br>".$postcodeBezorg." ".$woonplaatsBezorg."<br>".$landBezorg."</td>";
				}
									
$adresgegevens .= "</tr>
</table></td></tr></table>
<br><hr style=\"border:0; width: 600px; color:#2B388F; background-color:#2B388F; height:1px;\">
<p style=\"font-family:Arial, Helvetica, sans-serif; font-size: 13px; color:#000000; line-height:16px;\"><br>";

$bericht_html .= $adresgegevens;
$bericht_os .= $adresgegevens;
$adresgegevens = "";

if($rec_order_data['verzendwijze'] == "ophalen"){
	$bericht_html .= "<strong>Ophalen<br></strong> U heeft er voor gekozen om de bestelling op te komen halen. <br>Neem eventueel contact op om een datum in te plannen.<br><br></p>";
	$bericht_os .= "<strong>Ophalen<br></strong> Er is voor gekozen om de bestelling op te komen halen. Neem eventueel contact op om een datum in te plannen.<br><br></p>";
}else{
	$bericht_html .= "<strong>Bezorgdatum<br></strong> De verwachte bezorgdatum is 1 - 3 werkdagen na betaling.<br><br></p>";
	$bericht_os .= "<strong>Bezorgen<br></strong> Het artikel moet bezorgd worden.<br><br></p>";
}

$footer_html .= "<p style=\"font-family:Arial, Helvetica, sans-serif; font-size: 13px; color:#000000; line-height:16px;\">Met vriendelijke groet,<br>
<br>Molen Nooit Gedagt Budel<br><a href=\"http://www.molennooitgedagtbudel.nl\" target=\"_blank\" style=\"text-decoration:underline; color:#2B388F;\">www.molennooitgedagtbudel.nl</a><br><br></p>
<span style=\"font-family:Arial, Helvetica, sans-serif; font-size:11px; color:#666666; line-height:14px;\">Uw bestelling kan niet worden teruggestuurd</span><br><br>
</td></tr></table></td></tr></table></body></html>";

$bericht_html .= $footer_html;
$bericht_os .= $footer_html;
$footer_html = "";