Uname: Linux sv2.orange-thailand.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Software: Apache/2
PHP version: 7.3.33 [ PHP INFO ] PHP os: Linux
Server Ip: 43.229.78.102
Your Ip: 3.135.193.186
User: huskies (1019) | Group: huskies (1021)
Safe Mode: OFF
Disable Function:
NONE

name : newstemplatemail2.php
<?php
    require 'connect_database.php';
    require 'PHPMailer-master/class.phpmailer.php';
	require 'PHPMailer-master/PHPMailerAutoload.php';
	require 'sql/function.php';
	$datenow = date("Y-m-d");

	$selectdata = "SELECT * FROM `tb_news` WHERE `id_news` =35 ";
	$objdata = mysqli_query($myConn,$selectdata);
	$resultdata = mysqli_fetch_array($objdata);
	
	$url = "https://www.huskiesbags.com/product_banner.php?id=".$resultdata['idb'];

	$selectbanner = "SELECT * FROM `tb_banner_tab1` WHERE `idb` ='".$resultdata['idb']."' ";
	$objbanner = mysqli_query($myConn,$selectbanner);
	$resultbanner = mysqli_fetch_array($objbanner);	

	$sqlProduct = "SELECT * FROM `tb_sub_news` where `id_news` =35 ";
	$objProduct = mysqli_query($myConn,$sqlProduct);
	while ($resultProduct = mysqli_fetch_array($objProduct)) {
		$arraypv[] = $resultProduct['id_product'];
	}	
	
	$ids = join("','",$arraypv);   
	$sqlpv = "SELECT * FROM tb_product WHERE id_product IN ('$ids')";
	$objpv = mysqli_query($myConn,$sqlpv);
	$numpv = mysqli_num_rows($objpv);
	while ($resultpv = mysqli_fetch_array($objpv)) {
		$idr[] = $resultpv['id_product'];
		$item[] = $resultpv['productcode']." ".$resultpv['name_product'];
		
		// Cover Images
		$img = "SELECT * FROM `tb_product_images` WHERE `id_product` = '".$resultpv['id_product']."' and `st`= 1 ";
		$objimg = mysqli_query($myConn,$img);
		$rsultimg = mysqli_fetch_array($objimg);
		$numimg = mysqli_num_rows($objimg);
		$coverimg[] = $rsultimg['images'];

		// SALE
		$price[] = $resultpv['price'];
		$pricesale[] = saleitem($resultpv['id_product']);
	}

	$textproduct = '<table data-module="module-7" data-thumb="thumbnails/img-07.jpg" class="main-table" width="100%" cellpadding="0" cellspacing="0">
		<tr>
			<td data-bgcolor="bg-module" bgcolor="#ffffff">
				<table class="flexible" width="600" align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
					<tr>
					<td data-bgcolor="bg-block" data-color="title" data-size="size title" data-min="10" data-max="46" data-link-color="link title color" data-link-style="text-decoration:underline; color:#242424;" class="pb-15" bgcolor="#ffffff" align="center" style="padding:24px 0 31px;    font-family: Poppins, Prompt, sans-serif;
					font-size: x-large; color:#242424;">
							Products
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>';

	$item1 = '<table data-module="module-9" data-thumb="thumbnails/img-09.jpg" class="main-table" width="100%" cellpadding="0" cellspacing="0">
		<tr>
			<td data-bgcolor="bg-module" bgcolor="#ffffff" class="plr-15" >
				<table class="flexible" width="600" align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
					<tr>
						<td data-bgcolor="bg-block" class="pb-20" bgcolor="#ffffff" style="padding:0 0 50px; border-top:1px solid #dedede;">
							<table width="100%" cellpadding="0" cellspacing="0">
								<tr>
									<th class="flex" width="299" align="left" style="vertical-align:top;">
										<table width="100%" cellpadding="0" cellspacing="0">
											<tr>
												<td class="p-20" style="padding:36px 30px 40px;">
													<table width="100%" cellpadding="0" cellspacing="0">
														<tr>
															<td valign="bottom" align="center">
																<img src="https://www.huskiesbags.com/backoffice/'.$coverimg[0].'" style="vertical-align:top;height: 350px;" alt="" />
															</td>
														</tr>
														<tr>
															<td data-color="product-text" data-size="size product-text" data-min="10" data-max="26" data-link-color="link product-text color" data-link-style="text-decoration:underline; color:#311c1c;" align="center" style="padding:25px 0 10px;font-family: Poppins, Prompt, sans-serif;
															font-size: medium; color:#311c1c;">
															<b>'.$item[0].'</b><br />
																<span data-color="product-price" data-size="size product-price" data-min="10" data-max="26" data-link-color="link product-price color" data-link-style="text-decoration:underline; color:#fa5151;" style="color:#fa5151;">'.$pricesale[0].' ฿</span>
																<br><span style=" text-decoration: line-through; ">'.$price[0].' ฿</span>
															</td>
														</tr>
														<tr>
															<td>
																<table align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
																	<tr>
																		<td data-bgcolor="bg-button" data-size="size button" data-min="10" data-max="16" class="active-t" bgcolor="#ffffff" align="center" style="mso-padding-alt:12px 30px; font:700 14px/16px Arial, Helvetica, sans-serif; text-transform:uppercase; border:2px solid #fa5151; border-radius:22px;">
																			<a style="padding:12px 30px; color:#fa5151; text-decoration:none; display:block;" href="https://www.huskiesbags.com/product_inside.php?list='.$idr[0].'">
																				Shop Now
																			</a>
																		</td>
																	</tr>
																</table>
															</td>
														</tr>
													</table>
												</td>
											</tr>
										</table>
									</th>
									
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>';

	$item2 = '<table data-module="module-8" data-thumb="thumbnails/img-08.jpg" class="main-table" width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td data-bgcolor="bg-module" bgcolor="#ffffff" class="plr-15">
		<table data-bgcolor="bg-block" class="flexible" bgcolor="#ffffff" width="600" align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
		<tr>
		<th class="flex" width="299" align="left" style="vertical-align:top;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td class="p-20" style="padding:36px 30px 40px;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td height="123" align="center">
		<img src="https://www.huskiesbags.com/backoffice/'.$coverimg[0].'" style="vertical-align:top;height: 350px;" alt="" />
		</td>
		</tr>
		<tr>
		<td data-color="product-text" data-size="size product-text" data-min="10" data-max="26" data-link-color="link product-text color" data-link-style="text-decoration:underline; color:#311c1c;" align="center" style="padding:25px 0 10px; font-family: Poppins, Prompt, sans-serif;
		font-size: medium; color:#311c1c;">
		<b>'.$item[0].'</b><br />
		<span data-color="product-price" data-size="size product-price" data-min="10" data-max="26" data-link-color="link product-price color" data-link-style="text-decoration:underline; color:#fa5151;" style="color:#fa5151;">'.$pricesale[0].' ฿</span>
		<br><span style=" text-decoration: line-through; ">'.$price[0].' ฿</span>
		</td>
		</tr>
		<tr>
		<td>
		<table align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
		<tr>
		<td data-bgcolor="bg-button-03" data-size="size button" data-min="10" data-max="26" class="active-t" bgcolor="#ffffff" align="center" style="mso-padding-alt:12px 30px; font:700 14px/16px Arial, Helvetica, sans-serif; text-transform:uppercase; border:2px solid #fa5151; border-radius:22px;">
		<a style="padding:12px 30px; color:#fa5151; text-decoration:none; display:block;" href="https://www.huskiesbags.com/product_inside.php?list='.$idr[0].'">
		Shop Now
		</a>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</th>
		<th class="flex" bgcolor="#dedede" width="1" height="1"></th>
		<th class="flex" width="300" align="left" style="vertical-align:top;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td class="p-20" style="padding:36px 30px 40px;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td height="123" align="center">
		<img src="https://www.huskiesbags.com/backoffice/'.$coverimg[1].'" style="vertical-align:top;height: 350px;" alt="" />
		</td>
		</tr>
		<tr>
		<td data-color="product-text" data-size="size product-text" data-min="10" data-max="26" data-link-color="link product-text color" data-link-style="text-decoration:underline; color:#311c1c;" align="center" style="padding:25px 0 10px;font-family: Poppins, Prompt, sans-serif;
		font-size: medium; color:#311c1c;">
		<b>'.$item[1].'</b><br />
		<span data-color="product-price" data-size="size product-price" data-min="10" data-max="26" data-link-color="link product-price color" data-link-style="text-decoration:underline; color:#fa5151;" style="color:#fa5151;">'.$pricesale[1].' ฿</span>
		<br><span style=" text-decoration: line-through; ">'.$price[1].' ฿</span>
		</td>
		</tr>
		<tr>
		<td>
		<table align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
		<tr>
		<td data-bgcolor="bg-button" data-size="size button" data-min="10" data-max="16" class="active-t" bgcolor="#ffffff" align="center" style="mso-padding-alt:12px 30px; font:700 14px/16px Arial, Helvetica, sans-serif; text-transform:uppercase; border:2px solid #fa5151; border-radius:22px;">
		<a style="padding:12px 30px; color:#fa5151; text-decoration:none; display:block;" href="https://www.huskiesbags.com/product_inside.php?list='.$idr[1].'">
		Shop Now
		</a>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</th>
		</tr>
		</table>
		</td>
		</tr>
	</table>';

	$item3 = '<table data-module="module-8" data-thumb="thumbnails/img-08.jpg" class="main-table" width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td data-bgcolor="bg-module" bgcolor="#ffffff" class="plr-15">
		<table data-bgcolor="bg-block" class="flexible" bgcolor="#ffffff" width="600" align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
		<tr>
		<th class="flex" width="299" align="left" style="vertical-align:top;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td class="p-20" style="padding:36px 30px 40px;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td height="123" align="center">
		<img src="https://www.huskiesbags.com/backoffice/images/'.$coverimg[0].'" style="vertical-align:top;height: 350px;" alt="" />
		</td>
		</tr>
		<tr>
		<td data-color="product-text" data-size="size product-text" data-min="10" data-max="26" data-link-color="link product-text color" data-link-style="text-decoration:underline; color:#311c1c;" align="center" style="padding:25px 0 10px; font-family: Poppins, Prompt, sans-serif;
		font-size: medium; color:#311c1c;">
		<b>'.$item[0].'</b><br />
		<span data-color="product-price" data-size="size product-price" data-min="10" data-max="26" data-link-color="link product-price color" data-link-style="text-decoration:underline; color:#fa5151;" style="color:#fa5151;">'.$pricesale[0].' ฿</span>
		<br><span style=" text-decoration: line-through; ">'.$price[0].' ฿</span>
		</td>
		</tr>
		<tr>
		<td>
		<table align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
		<tr>
		<td data-bgcolor="bg-button-03" data-size="size button" data-min="10" data-max="26" class="active-t" bgcolor="#ffffff" align="center" style="mso-padding-alt:12px 30px; font:700 14px/16px Arial, Helvetica, sans-serif; text-transform:uppercase; border:2px solid #fa5151; border-radius:22px;">
		<a style="padding:12px 30px; color:#fa5151; text-decoration:none; display:block;" href="https://www.huskiesbags.com/product_inside.php?list='.$idr[0].'">
		Shop Now
		</a>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</th>
		<th class="flex" bgcolor="#dedede" width="1" height="1"></th>
		<th class="flex" width="299" align="left" style="vertical-align:top;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td class="p-20" style="padding:36px 30px 40px;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td height="123" align="center">
		<img src="https://www.huskiesbags.com/backoffice/'.$coverimg[1].'" style="vertical-align:top;height: 350px;" alt="" />
		</td>
		</tr>
		<tr>
		<td data-color="product-text" data-size="size product-text" data-min="10" data-max="26" data-link-color="link product-text color" data-link-style="text-decoration:underline; color:#311c1c;" align="center" style="padding:25px 0 10px; font-family: Poppins, Prompt, sans-serif;
		font-size: medium; color:#311c1c;">
		<b>'.$item[1].'</b><br />
		<span data-color="product-price" data-size="size product-price" data-min="10" data-max="26" data-link-color="link product-price color" data-link-style="text-decoration:underline; color:#fa5151;" style="color:#fa5151;">'.$pricesale[1].' ฿</span>
		<br><span style=" text-decoration: line-through; ">'.$price[1].' ฿</span>
		</td>
		</tr>
		<tr>
		<td>
		<table align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
		<tr>
		<td data-bgcolor="bg-button-03" data-size="size button" data-min="10" data-max="26" class="active-t" bgcolor="#ffffff" align="center" style="mso-padding-alt:12px 30px; font:700 14px/16px Arial, Helvetica, sans-serif; text-transform:uppercase; border:2px solid #fa5151; border-radius:22px;">
		<a style="padding:12px 30px; color:#fa5151; text-decoration:none; display:block;" href="https://www.huskiesbags.com/product_inside.php?list='.$idr[1].'">
		Shop Now
		</a>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</th>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		
		<table data-module="module-9" data-thumb="thumbnails/img-09.jpg" class="main-table" width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td data-bgcolor="bg-module" bgcolor="#ffffff" class="plr-15" >
		<table class="flexible" width="600" align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
		<tr>
		<td data-bgcolor="bg-block" class="pb-20" bgcolor="#ffffff" style="padding:0 0 50px; border-top:1px solid #dedede;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<th class="flex" width="299" align="left" style="vertical-align:top;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td class="p-20" style="padding:36px 30px 40px;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td valign="bottom" align="center">
		<img src="https://www.huskiesbags.com/backoffice/'.$coverimg[2].'" style="vertical-align:top;height: 350px;" alt="" />
		</td>
		</tr>
		<tr>
		<td data-color="product-text" data-size="size product-text" data-min="10" data-max="26" data-link-color="link product-text color" data-link-style="text-decoration:underline; color:#311c1c;" align="center" style="padding:25px 0 10px;font-family: Poppins, Prompt, sans-serif;
		font-size: medium; color:#311c1c;">
		<b>'.$item[2].'</b><br />
		<span data-color="product-price" data-size="size product-price" data-min="10" data-max="26" data-link-color="link product-price color" data-link-style="text-decoration:underline; color:#fa5151;" style="color:#fa5151;">'.$pricesale[2].' ฿</span>
		<br><span style=" text-decoration: line-through; ">'.$price[2].' ฿</span>
		</td>
		</tr>
		<tr>
		<td>
		<table align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
		<tr>
		<td data-bgcolor="bg-button" data-size="size button" data-min="10" data-max="16" class="active-t" bgcolor="#ffffff" align="center" style="mso-padding-alt:12px 30px; font:700 14px/16px Arial, Helvetica, sans-serif; text-transform:uppercase; border:2px solid #fa5151; border-radius:22px;">
		<a style="padding:12px 30px; color:#fa5151; text-decoration:none; display:block;" href="https://www.huskiesbags.com/product_inside.php?list='.$idr[2].'">
		Shop Now
		</a>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</th>
		<th class="flex" bgcolor="#dedede" width="1" height="1"></th>
		<th class="flex" width="300" align="left" style="vertical-align:top;">
		</th>
		
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</td>
		</tr>
	</table>';

	$item4 = '<table data-module="module-8" data-thumb="thumbnails/img-08.jpg" class="main-table" width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td data-bgcolor="bg-module" bgcolor="#ffffff" class="plr-15">
		<table data-bgcolor="bg-block" class="flexible" bgcolor="#ffffff" width="600" align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
		<tr>
		<th class="flex" width="299" align="left" style="vertical-align:top;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td class="p-20" style="padding:36px 30px 40px;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td height="123" align="center">
		<img src="https://www.huskiesbags.com/backoffice/'.$coverimg[0].'" style="vertical-align:top;height: 350px;" alt="" />
		</td>
		</tr>
		<tr>
		<td data-color="product-text" data-size="size product-text" data-min="10" data-max="26" data-link-color="link product-text color" data-link-style="text-decoration:underline; color:#311c1c;" align="center" style="padding:25px 0 10px; font-family: Poppins, Prompt, sans-serif;
		font-size: medium; color:#311c1c;">
		<b>'.$item[0].'</b><br />
		<span data-color="product-price" data-size="size product-price" data-min="10" data-max="26" data-link-color="link product-price color" data-link-style="text-decoration:underline; color:#fa5151;" style="color:#fa5151;">'.$pricesale[0].' ฿</span>
		<br><span style=" text-decoration: line-through; ">'.$price[0].' ฿</span>

		</td>
		</tr>
		<tr>
		<td>
		<table align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
		<tr>
		<td data-bgcolor="bg-button-03" data-size="size button" data-min="10" data-max="26" class="active-t" bgcolor="#ffffff" align="center" style="mso-padding-alt:12px 30px; font:700 14px/16px Arial, Helvetica, sans-serif; text-transform:uppercase; border:2px solid #fa5151; border-radius:22px;">
		<a style="padding:12px 30px; color:#fa5151; text-decoration:none; display:block;" href="https://www.huskiesbags.com/product_inside.php?list='.$idr[0].'">
		Shop Now
		</a>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</th>
		<th class="flex" bgcolor="#dedede" width="1" height="1"></th>
		<th class="flex" width="300" align="left" style="vertical-align:top;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td class="p-20" style="padding:36px 30px 40px;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td height="123" align="center">
		<img src="https://www.huskiesbags.com/backoffice/'.$coverimg[1].'" style="vertical-align:top;height: 350px;" alt="" />
		</td>
		</tr>
		<tr>
		<td data-color="product-text" data-size="size product-text" data-min="10" data-max="26" data-link-color="link product-text color" data-link-style="text-decoration:underline; color:#311c1c;" align="center" style="padding:25px 0 10px;font-family: Poppins, Prompt, sans-serif;
		font-size: medium; color:#311c1c;">
		<b>'.$item[1].'</b><br />
		<span data-color="product-price" data-size="size product-price" data-min="10" data-max="26" data-link-color="link product-price color" data-link-style="text-decoration:underline; color:#fa5151;" style="color:#fa5151;">'.$pricesale[1].' ฿</span>
		<br><span style=" text-decoration: line-through; ">'.$price[1].' ฿</span>
		</td>
		</tr>
		<tr>
		<td>
		<table align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
		<tr>
		<td data-bgcolor="bg-button" data-size="size button" data-min="10" data-max="16" class="active-t" bgcolor="#ffffff" align="center" style="mso-padding-alt:12px 30px; font:700 14px/16px Arial, Helvetica, sans-serif; text-transform:uppercase; border:2px solid #fa5151; border-radius:22px;">
		<a style="padding:12px 30px; color:#fa5151; text-decoration:none; display:block;" href="https://www.huskiesbags.com/product_inside.php?list='.$idr[1].'">
		Shop Now
		</a>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</th>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		
		<table data-module="module-9" data-thumb="thumbnails/img-09.jpg" class="main-table" width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td data-bgcolor="bg-module" bgcolor="#ffffff" class="plr-15" >
		<table class="flexible" width="600" align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
		<tr>
		<td data-bgcolor="bg-block" class="pb-20" bgcolor="#ffffff" style="padding:0 0 50px; border-top:1px solid #dedede;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<th class="flex" width="299" align="left" style="vertical-align:top;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td class="p-20" style="padding:36px 30px 40px;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td valign="bottom" align="center">
		<img src="https://www.huskiesbags.com/backoffice/'.$coverimg[2].'" style="vertical-align:top;height: 350px;" alt="" />
		</td>
		</tr>
		<tr>
		<td data-color="product-text" data-size="size product-text" data-min="10" data-max="26" data-link-color="link product-text color" data-link-style="text-decoration:underline; color:#311c1c;" align="center" style="padding:25px 0 10px;font-family: Poppins, Prompt, sans-serif;
		font-size: medium; color:#311c1c;">
		<b>'.$item[2].'</b><br />
		<span data-color="product-price" data-size="size product-price" data-min="10" data-max="26" data-link-color="link product-price color" data-link-style="text-decoration:underline; color:#fa5151;" style="color:#fa5151;">'.$pricesale[2].' ฿</span>
		<br><span style=" text-decoration: line-through; ">'.$price[2].' ฿</span>
		</td>
		</tr>
		<tr>
		<td>
		<table align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
		<tr>
		<td data-bgcolor="bg-button" data-size="size button" data-min="10" data-max="16" class="active-t" bgcolor="#ffffff" align="center" style="mso-padding-alt:12px 30px; font:700 14px/16px Arial, Helvetica, sans-serif; text-transform:uppercase; border:2px solid #fa5151; border-radius:22px;">
		<a style="padding:12px 30px; color:#fa5151; text-decoration:none; display:block;" href="https://www.huskiesbags.com/product_inside.php?list='.$idr[2].'">
		Shop Now
		</a>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</th>
		<th class="flex" bgcolor="#dedede" width="1" height="1"></th>
		<th class="flex" width="300" align="left" style="vertical-align:top;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td class="p-20" style="padding:36px 30px 40px;">
		<table width="100%" cellpadding="0" cellspacing="0">
		<tr>
		<td align="center">
		<img src="https://www.huskiesbags.com/backoffice/'.$coverimg[3].'" style="vertical-align:top;height: 350px;" alt="" />
		</td>
		</tr>
		<tr>
		<td data-color="product-text" data-size="size product-text" data-min="10" data-max="26" data-link-color="link product-text color" data-link-style="text-decoration:underline; color:#311c1c;" align="center" style="padding:25px 0 10px;font-family: Poppins, Prompt, sans-serif;
		font-size: medium; color:#311c1c;">
		<b>'.$item[3].'</b><br />
		<span data-color="product-price" data-size="size product-price" data-min="10" data-max="26" data-link-color="link product-price color" data-link-style="text-decoration:underline; color:#fa5151;" style="color:#fa5151;">'.$pricesale[3].' ฿</span>
		<br><span style=" text-decoration: line-through; ">'.$price[3].' ฿</span>
		</td>
		</tr>
		<tr>
		<td>
		<table align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
		<tr>
		<td data-bgcolor="bg-button" data-size="size button" data-min="10" data-max="16" class="active-t" bgcolor="#ffffff" align="center" style="mso-padding-alt:12px 30px; font:700 14px/16px Arial, Helvetica, sans-serif; text-transform:uppercase; border:2px solid #fa5151; border-radius:22px;">
		<a style="padding:12px 30px; color:#fa5151; text-decoration:none; display:block;" href="https://www.huskiesbags.com/product_inside.php?list='.$idr[3].'">
		Shop Now
		</a>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</th>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		</td>
		</tr>
	</table>';		

	if ($numpv>0) {
		if($numpv==1){
			$timepv = $item1; 
		   }elseif ($numpv==2) {
			   $timepv = $item2; 
			   }elseif($numpv==3){
				   $timepv = $item3; }
					else{
					   $timepv = $item4; }
	} else {
		$timepv = '';
	}
	
$body = '<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
	<head>
		<!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]-->
		<title>Huskies</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<style type="text/css">
			a{
				outline:none;
				color:#fa5151;
				text-decoration:underline;
			}
			a:hover{text-decoration:none !important;}
			.h-u a{text-decoration:none;}
			.h-u a:hover{text-decoration:underline !important;}
			a[x-apple-data-detectors]{color:inherit !important; text-decoration:none !important;}
			a[href^="tel"]:hover{text-decoration:none !important;}
			.active-i a:hover,
			.active-t:hover{opacity:0.8;}
			.active-i a,
			.active-t{transition:all 0.3s ease;}
			a img{border:none;}
			th{padding:0;}
			table td{mso-line-height-rule:exactly;}
			[owa] div button{display:block; font-size:1px; line-height:1px;}
			[owa] .main-table div{display:block !important; font-size:1px; line-height:1px;}
			.l-white a{color:#fff;}
			@media only screen and (max-width:375px) and (min-width:374px) {.gmail-fix{min-width:374px !important;}}
			@media only screen and (max-width:414px) and (min-width:413px) {.gmail-fix{min-width:413px !important;}}
			@media only screen and (max-width:500px) {
				/* default style */
				.flexible{width:100% !important;}
				.img-flex img{width:100% !important; height:auto !important;}
				.table-holder{display:table !important; width:100% !important;}
				.thead{display:table-header-group !important; width:100% !important;}
				.tfoot{display:table-footer-group !important; width:100% !important;}
				.flex{display:block !important; width:100% !important;}
				.hide{display:none !important; width:0 !important; height:0 !important; padding:0 !important; font-size:0 !important; line-height:0 !important;}
				.p-0{padding:0 !important;}
				.p-20{padding:20px !important;}
				.p-25{padding:25px !important;}
				.p-30{padding:30px !important;}
				.plr-15{padding-left:15px !important; padding-right:15px !important;}
				.plr-20{padding-left:20px !important; padding-right:20px !important;}
				.pt-20{padding-top:20px !important;}
				.pt-25{padding-top:25px !important;}
				.pb-15{padding-bottom:15px !important;}
				.pb-20{padding-bottom:20px !important;}
				.pb-25{padding-bottom:25px !important;}
				.fs-24{font-size:24px !important;}
				.lh-28{line-height:28px !important;}
				/* custom style */
				.pt-10p{padding-top:10%;}
				.plr-9p{padding-left:9%; padding-right:9%;}
				.pb-8p{padding-bottom:8%;}
				.social-icons img{width:85% !important;}
			}
		</style>
	</head>
	<body bgcolor="#ffffff" style="margin:0; padding:0; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%;">
		<table class="gmail-fix" bgcolor="#ffffff" width="100%" style="min-width:320px;" cellspacing="0" cellpadding="0">
			<tr>
				<td style="display:none; font-size:0; line-height:0;">
					<!-- Preheader -->
				</td>
			</tr>
			<tr>
				<td>
					
					<!-- module -->
					<table data-module="module-2" data-thumb="thumbnails/img-02.jpg" class="main-table" width="100%" cellpadding="0" cellspacing="0">
						<tr>
							<td data-bgcolor="bg-module" bgcolor="#ffffff">
								<table class="flexible" width="600" align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
									<tr>
										<td class="img-flex" align="center">
											<a href="'.$url.'"><img src="https://www.huskiesbags.com/backoffice/'.$resultdata['picture'].'" style="font:40px/44px Arial, Helvetica, sans-serif; color:#000; vertical-align:top;"  />
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
					<!-- module -->
					<table data-module="module-3" data-thumb="thumbnails/img-03.jpg" class="main-table" width="100%" cellpadding="0" cellspacing="0">
						<tr>
							<td data-bgcolor="bg-module" bgcolor="#ffffff">
								<table class="flexible" width="600" align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
									<tr>
										<td data-bgcolor="bg-block-02" class="l-white p-25" bgcolor="#ffffff" style="padding: 50px 52px 60px;">
											<table width="100%" cellpadding="0" cellspacing="0">
												<tr>
													<td data-color="title-with-bg" data-size="size title-with-bg" data-min="10" data-max="46" data-link-color="link title-with-bg color" data-link-style="text-decoration:underline; color:#000;" align="center" style="padding:0 0 9px; font-family: Poppins, Prompt, sans-serif; font-size: x-large;; color:#000;">
                                                    '.$resultdata['title'].'
													</td>
												</tr>
												<tr>
													<td data-color="text-with-bg" data-size="size text" data-min="10" data-max="46" data-link-color="link text-with-bg color" data-link-style="text-decoration:underline; color:#000;" align="center" style="padding:0 0 20px;     font-family: Poppins, Prompt, sans-serif;
                                                    font-size: small; color:#000;">
                                                    '.$resultdata['subtitle'].' 
													</td>
												</tr>
												<tr>
													<td>
														<table align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
															<tr>
																<td data-bgcolor="bg-button-01" data-size="size button" data-min="10" data-max="26" class="active-t" bgcolor="#ffffff" align="center" style="mso-padding-alt:14px 30px; font:700 14px/16px Arial, Helvetica, sans-serif; text-transform:uppercase; border-radius:22px;">
																	<a style="padding:14px 30px; color:#fa5151; text-decoration:none; display:block;" href="https://www.huskiesbags.com/news_inside.php?news='.$resultdata['id_news'].'">
																		More Details
																	</a>
																</td>
															</tr>
														</table>
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
					<!-- module -->
					'.(($numpv>0) ? $textproduct : '').'
					'.$timepv.'
					<!-- module -->
					<table data-module="module-11" data-thumb="thumbnails/img-11.jpg" class="main-table" width="100%" cellpadding="0" cellspacing="0">
						<tr>
							<td data-bgcolor="bg-module" bgcolor="#ffffff">
								<table class="flexible" width="600" align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
									<tr>
										<td data-bgcolor="bg-block" class="p-30 p-20" bgcolor="#ffffff" style="padding:50px 30px 30px;">
											<table width="100%" cellpadding="0" cellspacing="0">
												<tr>
													<td class="social-icons" style="padding:0 0 22px;">
														<table align="center" style="margin:0 auto;" cellpadding="0" cellspacing="0">
															<tr>
																<td class="active-i" style="line-height:12px; font-size:1px; mso-line-height-rule:at-least;">
																	<a href="https://www.facebook.com/Huskiesbag/"><img src="https://www.huskiesbags.com/images/social-footer_07.png" style="font:10px/12px Arial, Helvetica, sans-serif; color:#fa5151; vertical-align:top;" alt="fb" /></a>
																</td>
																<td width="29"></td>
																<td class="active-i" style="line-height:12px; font-size:1px; mso-line-height-rule:at-least;">
																<a href="https://www.instagram.com/huskiesbags/"><img src="https://www.huskiesbags.com/images/social-footer_09.png" style="font:10px/12px Arial, Helvetica, sans-serif; color:#fa5151; vertical-align:top;" alt="ig" /></a>
																</td>
																<td width="29"></td>
																<td class="active-i" style="line-height:12px; font-size:1px; mso-line-height-rule:at-least;">
																<a href="http://line.me/ti/p/~@huskiesbags"><img src="https://www.huskiesbags.com/images/social-footer_11.png" style="font:10px/12px Arial, Helvetica, sans-serif; color:#fa5151; vertical-align:top;" alt="in" /></a>
																</td>
															</tr>
														</table>
													</td>
												</tr>
												<tr>
													<td data-color="text" data-size="size text" data-min="10" data-max="26" data-link-color="link text color" data-link-style="text-decoration:underline; color:#fa5151;" align="center" style="font:13px/22px Arial, Helvetica, sans-serif; color:#242424;">
														 &copy; 2019 Huskiesbags. All Rights Reserved
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
					<!-- module -->
				</td>
			</tr>
		</table>
	</body>
</html>';

echo $body;

// $sends = 0;       
// $countarr  = count($arraymail);

// $mail = new PHPMailer;
// $typetxt =  $resultdata['title'];
// $Username="postmaster@mail.huskiesbags.com"; // เมล์ส่ง
// $Password="d4faaa4657b5cad2efa210284e65e6d2-73ae490d-bec09811";

// $mail->CharSet = "utf-8";
// $mail->IsSMTP();
// $mail->SMTPDebug = 0;
// $mail->SMTPAuth = true;
// $mail->Host = "smtp.mailgun.org"; // SMTP server//mail.gmail.com
// $mail->Port = 587; 
// $mail->SMTPSecure = 'tsl';  
// $mail->Username = $Username; // account SMTP
// $mail->Password = $Password; // รหัสผ่าน SMTP

// $mail->SetFrom($Username,"Huskies Bags");
// $mail->Subject = $typetxt;
// $mail->MsgHTML($body);
// $mail->AddAddress('jirotommy@gmail.com','TEST'); 
// $mail->Send();  


// if( $countarr==$sends) {
// echo "<script type='text/javascript'>";
//   echo  "alert('กรุณาลองใหม่ ');";
// 	echo "window.location.href = 'form_news.php';";
//   echo "</script>";
// }else{
// echo "<script type='text/javascript'>";
// 	echo  "alert('การทำจัดส่งอีเมล์สำเร็จ');";
// 	echo "window.location.href = 'form_news.php';";
// 	echo "</script>";
// }

?>
© 2024 UnknownSec