<?php
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
include('code/db.php');
if (isset($_GET['referral_id'])) {
	$referral_id = $_GET['referral_id'] ? base64_decode($_GET['referral_id']) : '';
	$query = $db->query("select * from wp_referral_form where id = '$referral_id' ");
	$data = $query->fetch();
	$results = !empty($data['form_data']) ? unserialize(html_entity_decode($data['form_data'])) : [];
	$first_name = isset($results['first_name']) ? $results['first_name'] : '';
	$last_name = isset($results['last_name']) ? $results['last_name'] : '';
	$patient_phone_number = isset($results['patient_phone_number']) ? $results['patient_phone_number'] : '';
	$date_of_birth = isset($results['date_of_birth']) ? $results['date_of_birth'] : '';	
	$date_of_xray = isset($results['date_of_xray']) ? $results['date_of_xray'] : '';	
	$referring_doctor_first_name = isset($results['referring_doctor_first_name']) ? $results['referring_doctor_first_name'] : '';
	$referring_doctor_last_name = isset($results['referring_doctor_last_name']) ? $results['referring_doctor_last_name'] : '';
	$referring_doctor_phone_number = isset($results['referring_doctor_phone_number']) ? $results['referring_doctor_phone_number'] : '';
	$is_3rd_moral_evaluation = isset($results['is_3rd_moral_evaluation']) ? $results['is_3rd_moral_evaluation'] : '';
	$is_fill_arch_solution = isset($results['is_fill_arch_solution']) ? $results['is_fill_arch_solution'] : '';
	$is_implant_evaluation = isset($results['is_implant_evaluation']) ? $results['is_implant_evaluation'] : '';
	$is_extractions_only = isset($results['is_extractions_only']) ? $results['is_extractions_only'] : '';
	$is_expose_bond = isset($results['is_expose_bond']) ? $results['is_expose_bond'] : '';
	$is_evaluate_for_grafting = isset($results['is_evaluate_for_grafting']) ? $results['is_evaluate_for_grafting'] : '';
	$is_pathology_evaluation = isset($results['is_pathology_evaluation']) ? $results['is_pathology_evaluation'] : '';
	$comments = isset($results['comments']) ? $results['comments'] : '';
	$diagnosis = isset($results['diagnosis']) ? $results['diagnosis'] : '';
	$diagnosis_other = isset($results['diagnosis_other']) ? $results['diagnosis_other'] : '';
	$permanent_teeth = isset($results['permanent_teeth']) ? $results['permanent_teeth'] : [];
	$primary_teeth = isset($results['primary_teeth']) ? $results['primary_teeth'] : [];
} else {
	$first_name = $last_name = $patient_phone_number = $date_of_birth = $date_of_xray = $referring_doctor_first_name = $referring_doctor_last_name = $referring_doctor_phone_number = $is_3rd_moral_evaluation = $is_fill_arch_solution = $is_implant_evaluation = $is_extractions_only = $is_expose_bond = $is_evaluate_for_grafting = $is_pathology_evaluation = $comments = $diagnosis = $diagnosis_other = '';
	$permanent_teeth = $primary_teeth = [];
}
$contact_name = $first_name .' '. $last_name;
$referring_doctor_name = $referring_doctor_first_name .' '. $referring_doctor_last_name;
function url()
{
	return sprintf(
		"%s://%s",
		isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http',
		$_SERVER['SERVER_NAME']
	);
}
$html = '';
$html .= '
<style>
	@page{
		// size: 1230px 12.5in;
		margin: 20px 30px 0;
	}
</style>
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td width="100%" align="center" cellpadding="0" cellspacing="0">
			<img src="' . url() . '/lp-asset/lp-images/header_logo.png" alt=" Header Logo">
		</td>
	</tr>
</table>

<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td width="100%" cellpadding="0" cellspacing="0"><h3 style="font-size: 20px;line-height: 37.5px;color: #3b598a;padding: 20px 0 0;margin: 0 0 10px;">Demographic Information</h3></td>
	</tr>
	<tr>
		<td width="100%" cellpadding="0" cellspacing="0">
			<table width="100%" cellpadding="0" cellspacing="0" style="box-shadow: 4px 4px 25px rgb(0 0 0 / 10%);">
				<tr>
					<td width="100%" cellpadding="0" cellspacing="0" style="font-size: 16px;line-height: 21.6px;color: #fff;padding: 9px 15px;background: #3b598a; font-weight: 600;">Patient Information</td>
				</tr>
				<tr>
					<td width="100%" style="padding: 0 22px 15px 0;">
						<table width="100%" cellpadding="0" cellspacing="0">
							<tr>
								<td width="25%" style="padding: 10px 0;border-bottom: 1px dashed #efefef;">
									<label style="font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0 0;display: inline-block;" class="input-main-label">Patient Name:</label>
								</td>
								<td width="33.33%" style="padding: 10px 0;border-bottom: 1px dashed #efefef;">
									<input type="text" style="border: 1px solid #6E717C;padding: 8px 10px;line-height: 21px;width: 100%;font-size: 14px;color: #000;height: 21px;" value="' . $first_name . '">
								</td>
								<td width="41.66%" style="padding: 10px 0;border-bottom: 1px dashed #efefef;padding-left: 5px;">
									<input type="text" style="border: 1px solid #6E717C;padding: 8px 10px;line-height: 21px;width: 100%;font-size: 14px;color: #000;height: 21px;" value="' . $last_name . '">
								</td>
							</tr>
						</table>
						<table width="100%" cellpadding="0" cellspacing="0">
							<tr>
								<td width="25%" style="padding: 10px 0;border-bottom: 1px dashed #efefef;">
									<label style="font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0;display: inline-block;" class="input-main-label">Cell Phone Number:</label>
								</td>
								<td width="75%" style="padding: 10px 0;border-bottom: 1px dashed #efefef;">
									<input type="text" style="border: 1px solid #6E717C;padding: 8px 10px;line-height: 21px;width: 100%;font-size: 14px;color: #000;height: 21px;margin: 0;" value="' . $patient_phone_number . '">
									<label style="font-size: 14px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 0px 0;display: inline-block;" class="input-main-label">Please provide your patient’s cell phone number so we can initiate the concierge process.</label>
								</td>
							</tr>
						</table>
						<table width="100%" cellpadding="0" cellspacing="0">
							<tr>
								<td width="25%" style="padding: 10px 0;border-bottom: 1px dashed #efefef;">
									<label style="font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0;display: inline-block;" class="input-main-label">Date of Birth:</label>
								</td>
								<td width="75%" style="padding: 10px 0;border-bottom: 1px dashed #efefef;">
									<input type="text" style="border: 1px solid #6E717C;padding: 8px 10px;line-height: 21px;width: 100%;font-size: 14px;color: #000;height: 21px;margin: 0;" value="' . $date_of_birth . '">
								</td>
							</tr>
						</table>
						<table width="100%" cellpadding="0" cellspacing="0">
							<tr>
								<td width="25%" style="padding: 10px 0;border-bottom: 1px dashed #efefef;">
									<label style="font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0;display: inline-block;" class="input-main-label">Date of X-Ray:</label>
								</td>
								<td width="75%" style="padding: 10px 0;border-bottom: 1px dashed #efefef;">
									<input type="text" style="border: 1px solid #6E717C;padding: 8px 10px;line-height: 21px;width: 100%;font-size: 14px;color: #000;height: 21px;margin: 0;" value="' . $date_of_xray . '">
									<label style="font-size: 14px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 0px 0;display: inline-block;" class="input-main-label">Upload x-rays, imaging, or other documentation on the next page.</label>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>

<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td width="100%" cellpadding="0" cellspacing="0"><h3 style="font-size: 20px;line-height: 37.5px;color: #3b598a;margin: 0 0 10px;">Referring Information</h3></td>
	</tr>
	<tr>
		<td width="100%" cellpadding="0" cellspacing="0">
			<table width="100%" cellpadding="0" cellspacing="0" style="box-shadow: 4px 4px 25px rgb(0 0 0 / 10%);">
				<tr>
					<td width="100%" cellpadding="0" cellspacing="0" style="font-size: 16px;line-height: 21.6px;color: #fff;padding: 9px 15px;background: #3b598a; font-weight: 600;">Referring Doctor Information</td>
				</tr>
				<tr>
					<td width="100%" style="padding: 0 22px 15px 0;">
						<table width="100%" cellpadding="0" cellspacing="0">
							<tr>
								<td width="25%" style="padding: 10px 0;border-bottom: 1px dashed #efefef;">
									<label style="font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0 0;display: inline-block;" class="input-main-label">Referring Doctor:</label>
								</td>
								<td width="33.33%" style="padding: 10px 0;border-bottom: 1px dashed #efefef;">
									<input type="text" style="border: 1px solid #6E717C;padding: 8px 10px;line-height: 21px;width: 100%;font-size: 14px;color: #000;height: 21px;" value="' . $referring_doctor_first_name . '">
								</td>
								<td width="41.66%" style="padding: 10px 0;border-bottom: 1px dashed #efefef;padding-left: 5px;">
									<input type="text" style="border: 1px solid #6E717C;padding: 8px 10px;line-height: 21px;width: 100%;font-size: 14px;color: #000;height: 21px;" value="' . $referring_doctor_last_name . '">
								</td>
							</tr>
						</table>
						<table width="100%" cellpadding="0" cellspacing="0">
							<tr>
								<td width="25%" style="padding: 0px 0;border-bottom: 1px dashed #efefef;">
									<label style="font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0;display: inline-block;" class="input-main-label">Referring Doctor Phone Number:</label>
								</td>
								<td width="75%" style="padding: 0px 0 10px;border-bottom: 1px dashed #efefef;">
									<input type="text" style="border: 1px solid #6E717C;padding: 8px 10px;line-height: 21px;width: 100%;font-size: 14px;color: #000;height: 21px;margin: 0;" value="' . $referring_doctor_phone_number . '">
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>

<table width="100%" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td width="100%" cellpadding="0" cellspacing="0"><h3 style="font-size: 20px;line-height: 37.5px;color: #3b598a;margin: 0 0 10px;">Treatment Information</h3></td>
	</tr>
	<tr>
		<td width="100%" style="box-shadow: 4px 4px 25px rgb(0 0 0 / 10%);">
			<table width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td width="100%" cellpadding="0" cellspacing="0">
						<table width="100%" cellpadding="0" cellspacing="0">
							<tr>
								<td width="100%" cellpadding="0" cellspacing="0" style="font-size: 16px;line-height: 21.6px;color: #fff;padding: 9px 15px;background: #3b598a; font-weight: 600;">Diagnosis</td>
							</tr>
						</table>
						<table width="100%" cellpadding="0" cellspacing="0" style="margin: 10px 0;">
							<tr>
								<td width="25%">
									<label style="font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0;display: inline-block;" class="input-main-label">Diagnosis:</label>
								</td>
								<td width="75%" cellpadding="0" cellspacing="0" style="border: 1px solid #6E717C;padding: 8px 10px;line-height: 21px;width: 100%;font-size: 14px;color: #000;height: 21px;margin: 0;">
									' . $diagnosis . '
								</td>
							</tr>
						</table>';
						if (!empty($diagnosis_other)) {
							$html .= '
							<table width="100%" cellpadding="0" cellspacing="0" style="margin: 10px 0;">
								<tr>
									<td width="100%" cellpadding="0" cellspacing="0" style="padding: 10px;border: 1px solid #6E717C;height: 50px;vertical-align: top;">
										' . $diagnosis_other . '
									</td>
								</tr>
							</table>';
						}
						$html .= '
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>

<table width="100%" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td width="100%" cellpadding="0" cellspacing="0">
			<table width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td width="100%" cellpadding="0" cellspacing="0" style="font-size: 16px;line-height: 21.6px;color: #fff;padding: 9px 15px;background: #3b598a; font-weight: 600;">Permanent:</td>
				</tr>
						
				<tr style="page-break-after: always;">
					<td width="100%" align="center" cellpadding="0" cellspacing="0" style="padding: 10px 0;border-bottom: 1px dashed #efefef;">
						<table width="550" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<td cellpadding="0" cellspacing="0" style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">right</td>
								<td cellpadding="0" cellspacing="0">
									<table width="452" align="center" cellpadding="0" cellspacing="0">
										<tr>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 40px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d1.png" alt="d1">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("1", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("1", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("1", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">1</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 44px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d2.png" alt="d2">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("2", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("2", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("2", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">2</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 48px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d3.png" alt="d3">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("3", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("3", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("3", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">3</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 29px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d4.png" alt="d4">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("4", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("4", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("4", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">4</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 32px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d5.png" alt="d5">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("5", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("5", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("5", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">5</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 32px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d6.png" alt="d6">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("6", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("6", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("6", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">6</div>
											</td>
											<td valign="bottom" align="center" cellpadding="" cellspacing="0">
												<img width="100%" style="max-width: 30px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d7.png" alt="d7">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("7", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("7", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("7", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">7</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 38px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d8.png" alt="d8">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("8", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("8", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("8", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">8</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 37px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d9.png" alt="d9">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("9", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("9", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("9", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">9</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 30px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d10.png" alt="d10">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("10", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("10", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("10", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">10</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 32px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d11.png" alt="d11">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("11", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("11", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("11", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">11</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 32px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d12.png" alt="d12">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("12", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("12", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("12", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">12</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 29px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d13.png" alt="d13">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("13", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("13", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("13", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">13</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 49px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d14.png" alt="d14">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("14", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("14", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("14", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">14</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 43px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d15.png" alt="d15">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("15", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("15", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("15", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">15</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 41px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d16.png" alt="d16">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("16", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("16", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("16", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">16</div>
											</td>
										</tr>
										<tr>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">32</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("32", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("32", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("32", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 45px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d32.png" alt="d32">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">31</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("31", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("31", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("31", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 47px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d31.png" alt="d31">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">30</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("30", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("30", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("30", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 52px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d30.png" alt="d30">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">29</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("29", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("29", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("29", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 34px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d29.png" alt="d29">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">28</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("28", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("28", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("28", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 31px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d28.png" alt="d28">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">27</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("27", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("27", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("27", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 31px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d27.png" alt="d27">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">26</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("26", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("26", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("26", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 27px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d26.png" alt="d26">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">25</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("25", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("25", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("25", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 26px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d25.png" alt="d25">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">24</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("24", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("24", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("24", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 26px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d24.png" alt="d24">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">23</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("23", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("23", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("23", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 26px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d23.png" alt="d23">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">22</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("22", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("22", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("22", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 31px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d22.png" alt="d22">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">21</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("21", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("21", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("21", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 31px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d21.png" alt="d21">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">20</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("20", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("20", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("20", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 34px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d20.png" alt="d20">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">19</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("19", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("19", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("19", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 53px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d19.png" alt="d19">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">18</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("18", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("18", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("18", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 46px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d18.png" alt="d18">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;">17</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("17", $permanent_teeth) ? '#3b598a' : '#000') . ';' . (in_array("17", $permanent_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("17", $permanent_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 46px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/d17.png" alt="d17">
											</td>
										</tr>
									</table>
								</td>
								<td cellpadding="0" cellspacing="0" style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">left</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>

<table width="100%" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td width="100%" cellpadding="0" cellspacing="0">
			<table width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td width="100%" cellpadding="0" cellspacing="0" style="font-size: 16px;line-height: 21.6px;color: #fff;padding: 9px 15px;background: #3b598a; font-weight: 600;">Deciduous:</td>
				</tr>
				<tr>
					<td width="100%" align="center" cellpadding="0" cellspacing="0" style="padding: 10px 0;border-bottom: 1px dashed #efefef;">
						<table width="400" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<td cellpadding="0" cellspacing="0" style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">right</td>
								<td cellpadding="0" cellspacing="0">
									<table width="300" align="center" cellpadding="0" cellspacing="0">
										<tr>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 38px; filter: grayscale(1) brightness(0.8);" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/da.png" alt="da">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("a", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("a", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("a", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">a</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 34px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/db.png" alt="db">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("b", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("b", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("b", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">b</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 26px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/dc.png" alt="dc">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("c", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("c", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("c", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">c</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 17px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/dd.png" alt="dd">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("d", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("d", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("d", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">d</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 27px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/de.png" alt="de">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("e", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("e", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("e", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">e</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 27px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/df.png" alt="df">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("f", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("f", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("f", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">f</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 17px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/dg.png" alt="dg">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("g", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("g", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("g", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">g</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 26px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/dh.png" alt="dh">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("h", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("h", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("h", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">h</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 34px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/di.png" alt="di">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("i", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("i", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("i", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">i</div>
											</td>
											<td valign="bottom" align="center" cellpadding="0" cellspacing="0">
												<img width="100%" style="max-width: 38px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/dj.png" alt="dj">
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 5px auto 3px;border: 1px solid ' . (in_array("j", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("j", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("j", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">j</div>
											</td>
										</tr>
										<tr>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">t</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("t", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("t", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("t", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 36px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/dt.png" alt="dt">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">s</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("s", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("s", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("s", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 28px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/ds.png" alt="ds">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">r</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("r", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("r", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("r", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 20px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/dr.png" alt="dr">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">q</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("q", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("q", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("q", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 20px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/dq.png" alt="dq">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">p</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("p", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("p", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("p", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 18px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/dp.png" alt="dp">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">o</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("o", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("o", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("o", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 18px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/do.png" alt="do">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">n</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("n", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("n", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("n", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 20px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/dn.png" alt="dn">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">m</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("m", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("m", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("m", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 20px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/dm.png" alt="dm">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">l</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("l", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("l", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("l", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 28px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/dl.png" alt="dl">
											</td>
											<td valign="top" align="center" cellpadding="0" cellspacing="0">
												<div style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">k</div>
												<span style="width: 12px;height: 12px;display:block;position: relative;margin: 3px auto 5px;border: 1px solid ' . (in_array("k", $primary_teeth) ? '#3b598a' : '#000') . ';' . (in_array("k", $primary_teeth) ? 'background: #3b598a;' : '') . '"><span style="position: absolute;top: 0px;left: 4px;width: 4px;height: 8px;border: solid #fff;border-width: 0 2px 2px 0;transform: rotate(45deg);display: ' . (in_array("k", $primary_teeth) ? 'inline-block' : 'none') . ';"></span></span>
												<img width="100%" style="max-width: 36px;" src="https://niagaraoms.mydentalconsult.com/lp-asset/lp-images/referral-page-image/dk.png" alt="dk">
											</td>
										</tr>
									</table>
								</td>
								<td cellpadding="0" cellspacing="0" style="text-align: center;font-size: 15px;line-height: 22.5px;font-weight: 600;color: #6E717C;text-transform: uppercase;">left</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>

<table width="100%" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td width="100%" cellpadding="0" cellspacing="0">
			<table width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td width="100%" valign="top" cellpadding="0" cellspacing="0" style="padding: 0 5px 0 0">
						<table width="100%" cellpadding="0" cellspacing="0" style="box-shadow: 4px 4px 35px rgb(0 0 0 / 10%);background-color: #fbfbfb;">
							<tr>
								<td width="100%" cellpadding="0" cellspacing="0" style="padding: 0 15px 15px;">
									<table width="100%" cellpadding="0" cellspacing="0" style="border-bottom: 1px dashed #efefef;">
										<tr>
											<td width="58.33%" cellpadding="0" cellspacing="0" style="padding: 10px 0;">
												<label style="font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0;display: inline-block;" class="input-main-label">3rd Molar Evaluation</label>
											</td>
											<td width="41.67%" cellpadding="0" cellspacing="0" style="padding: 10px 0;">
												<table align="right" cellpadding="0" cellspacing="0">
													<tr>
														<td align="left" cellpadding="0" cellspacing="0" >
															<div style="background: ' . ($is_3rd_moral_evaluation == 'Yes' ? '#373c4e' : '#3b598a') . ';padding: 9px 15px 8px 18px;border-radius: 3px;">
																<input type="radio" style="display: none" value="">
																<label style="line-height: 16px;font-size: 14px;color: #fff;margin: 0;font-weight: 600;display: inline-block;">Yes</label>
																<span style="display: ' . ($is_3rd_moral_evaluation == 'Yes' ? 'inline-block' : 'none') . '; width: 16px;text-align: left;"><img width="16" src="' . url() . '/lp-asset/lp-images/check-solid.png" alt="check-solid" style="margin: 0 0 0 5px;"></span>
															</div>
														</td>
														<td align="left" cellpadding="0" cellspacing="0" >
															<div style="background: ' . ($is_3rd_moral_evaluation == 'No' ? '#373c4e' : '#3b598a') . ';padding: 9px 15px 8px 18px;border-radius: 3px;margin: 0 0 0 5px;">
																<input type="radio" style="display: none" value="">
																<label style="line-height: 16px;font-size: 14px;color: #fff;margin: 0;font-weight: 600;display: inline-block;">No</label>
																<span style="display: ' . ($is_3rd_moral_evaluation == 'No' ? 'inline-block' : 'none') . '; width: 16px;text-align: left;"><img width="16" src="' . url() . '/lp-asset/lp-images/check-solid.png" alt="check-solid" style="margin: 0 0 0 5px;"></span>
															</div>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
									<table width="100%" cellpadding="0" cellspacing="0" style="border-bottom: 1px dashed #efefef;">
										<tr>
											<td width="58.33%" cellpadding="0" cellspacing="0" style="padding: 10px 0;">
												<label style="font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0;display: inline-block;" class="input-main-label">Expose & Bond</label>
											</td>
											<td width="41.67%" cellpadding="0" cellspacing="0" style="padding: 10px 0;">
												<table align="right" cellpadding="0" cellspacing="0">
													<tr>
														<td align="left" cellpadding="0" cellspacing="0" >
															<div style="background: ' . ($is_expose_bond == 'Yes' ? '#373c4e' : '#3b598a') . ';padding: 9px 15px 8px 18px;border-radius: 3px;">
																<input type="radio" style="display: none" value="">
																<label style="line-height: 16px;font-size: 14px;color: #fff;margin: 0;font-weight: 600;display: inline-block;">Yes</label>
																<span style="display: ' . ($is_expose_bond == 'Yes' ? 'inline-block' : 'none') . '; width: 16px;text-align: left;"><img width="16" src="' . url() . '/lp-asset/lp-images/check-solid.png" alt="check-solid" style="margin: 0 0 0 5px;"></span>
															</div>
														</td>
														<td align="left" cellpadding="0" cellspacing="0" >
															<div style="background: ' . ($is_expose_bond == 'No' ? '#373c4e' : '#3b598a') . ';padding: 9px 15px 8px 18px;border-radius: 3px;margin: 0 0 0 5px;">
																<input type="radio" style="display: none" value="">
																<label style="line-height: 16px;font-size: 14px;color: #fff;margin: 0;font-weight: 600;display: inline-block;">No</label>
																<span style="display: ' . ($is_expose_bond == 'No' ? 'inline-block' : 'none') . '; width: 16px;text-align: left;"><img width="16" src="' . url() . '/lp-asset/lp-images/check-solid.png" alt="check-solid" style="margin: 0 0 0 5px;"></span>
															</div>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
									<table width="100%" cellpadding="0" cellspacing="0" style="border-bottom: 1px dashed #efefef;">
										<tr>
											<td width="58.33%" cellpadding="0" cellspacing="0" style="padding: 10px 0;">
												<label style="font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0;display: inline-block;" class="input-main-label">Extractions</label>
											</td>
											<td width="41.67%" cellpadding="0" cellspacing="0" style="padding: 10px 0;">
												<table align="right" cellpadding="0" cellspacing="0">
													<tr>
														<td align="left" cellpadding="0" cellspacing="0" >
															<div style="background: ' . ($is_extractions_only == 'Yes' ? '#373c4e' : '#3b598a') . ';padding: 9px 15px 8px 18px;border-radius: 3px;">
																<input type="radio" style="display: none" value="">
																<label style="line-height: 16px;font-size: 14px;color: #fff;margin: 0;font-weight: 600;display: inline-block;">Yes</label>
																<span style="display: ' . ($is_extractions_only == 'Yes' ? 'inline-block' : 'none') . '; width: 16px;text-align: left;"><img width="16" src="' . url() . '/lp-asset/lp-images/check-solid.png" alt="check-solid" style="margin: 0 0 0 5px;"></span>
															</div>
														</td>
														<td align="left" cellpadding="0" cellspacing="0" >
															<div style="background: ' . ($is_extractions_only == 'No' ? '#373c4e' : '#3b598a') . ';padding: 9px 15px 8px 18px;border-radius: 3px;margin: 0 0 0 5px;">
																<input type="radio" style="display: none" value="">
																<label style="line-height: 16px;font-size: 14px;color: #fff;margin: 0;font-weight: 600;display: inline-block;">No</label>
																<span style="display: ' . ($is_extractions_only == 'No' ? 'inline-block' : 'none') . '; width: 16px;text-align: left;"><img width="16" src="' . url() . '/lp-asset/lp-images/check-solid.png" alt="check-solid" style="margin: 0 0 0 5px;"></span>
															</div>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
									<table width="100%" cellpadding="0" cellspacing="0" style="border-bottom: 1px dashed #efefef;">
										<tr>
											<td width="58.33%" cellpadding="0" cellspacing="0" style="padding: 10px 0;">
												<label style="font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0;display: inline-block;" class="input-main-label">Full Arch Solution*</label>
											</td>
											<td width="41.67%" cellpadding="0" cellspacing="0" style="padding: 10px 0;">
												<table align="right" cellpadding="0" cellspacing="0">
													<tr>
														<td align="left" cellpadding="0" cellspacing="0" >
															<div style="background: ' . ($is_fill_arch_solution == 'Yes' ? '#373c4e' : '#3b598a') . ';padding: 9px 15px 8px 18px;border-radius: 3px;">
																<input type="radio" style="display: none" value="">
																<label style="line-height: 16px;font-size: 14px;color: #fff;margin: 0;font-weight: 600;display: inline-block;">Yes</label>
																<span style="display: ' . ($is_fill_arch_solution == 'Yes' ? 'inline-block' : 'none') . '; width: 16px;text-align: left;"><img width="16" src="' . url() . '/lp-asset/lp-images/check-solid.png" alt="check-solid" style="margin: 0 0 0 5px;"></span>
															</div>
														</td>
														<td align="left" cellpadding="0" cellspacing="0" >
															<div style="background: ' . ($is_fill_arch_solution == 'No' ? '#373c4e' : '#3b598a') . ';padding: 9px 15px 8px 18px;border-radius: 3px;margin: 0 0 0 5px;">
																<input type="radio" style="display: none" value="">
																<label style="line-height: 16px;font-size: 14px;color: #fff;margin: 0;font-weight: 600;display: inline-block;">No</label>
																<span style="display: ' . ($is_fill_arch_solution == 'No' ? 'inline-block' : 'none') . '; width: 16px;text-align: left;"><img width="16" src="' . url() . '/lp-asset/lp-images/check-solid.png" alt="check-solid" style="margin: 0 0 0 5px;"></span>
															</div>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
									<table width="100%" cellpadding="0" cellspacing="0" style="border-bottom: 1px dashed #efefef;">
										<tr>
											<td width="58.33%" cellpadding="0" cellspacing="0" style="padding: 10px 0;">
												<label style="font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0;display: inline-block;" class="input-main-label">Implant Evaluation</label>
											</td>
											<td width="41.67%" cellpadding="0" cellspacing="0" style="padding: 10px 0;">
												<table align="right" cellpadding="0" cellspacing="0">
													<tr>
														<td align="left" cellpadding="0" cellspacing="0" >
															<div style="background: ' . ($is_implant_evaluation == 'Yes' ? '#373c4e' : '#3b598a') . ';padding: 9px 15px 8px 18px;border-radius: 3px;">
																<input type="radio" style="display: none" value="">
																<label style="line-height: 16px;font-size: 14px;color: #fff;margin: 0;font-weight: 600;display: inline-block;">Yes</label>
																<span style="display: ' . ($is_implant_evaluation == 'Yes' ? 'inline-block' : 'none') . '; width: 16px;text-align: left;"><img width="16" src="' . url() . '/lp-asset/lp-images/check-solid.png" alt="check-solid" style="margin: 0 0 0 5px;"></span>
															</div>
														</td>
														<td align="left" cellpadding="0" cellspacing="0" >
															<div style="background: ' . ($is_implant_evaluation == 'No' ? '#373c4e' : '#3b598a') . ';padding: 9px 15px 8px 18px;border-radius: 3px;margin: 0 0 0 5px;">
																<input type="radio" style="display: none" value="">
																<label style="line-height: 16px;font-size: 14px;color: #fff;margin: 0;font-weight: 600;display: inline-block;">No</label>
																<span style="display: ' . ($is_implant_evaluation == 'No' ? 'inline-block' : 'none') . '; width: 16px;text-align: left;"><img width="16" src="' . url() . '/lp-asset/lp-images/check-solid.png" alt="check-solid" style="margin: 0 0 0 5px;"></span>
															</div>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>	
</table>

<table width="100%" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td width="100%" cellpadding="0" cellspacing="0">
			<table width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td width="100%" valign="top" cellpadding="0" cellspacing="0" style="padding: 0 5px 0 0">
						<table width="100%" cellpadding="0" cellspacing="0" style="box-shadow: 4px 4px 35px rgb(0 0 0 / 10%);background-color: #fbfbfb;">
							<tr>
								<td width="100%" cellpadding="0" cellspacing="0" style="padding: 0 15px 15px;">									
									
									<table width="100%" cellpadding="0" cellspacing="0" style="border-bottom: 1px dashed #efefef;">
										<tr>
											<td width="58.33%" cellpadding="0" cellspacing="0" style="padding: 10px 0;">
												<label style="font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0;display: inline-block;" class="input-main-label">Evaluate for Grafting</label>
											</td>
											<td width="41.67%" cellpadding="0" cellspacing="0" style="padding: 10px 0;">
												<table align="right" cellpadding="0" cellspacing="0">
													<tr>
														<td align="left" cellpadding="0" cellspacing="0" >
															<div style="background: ' . ($is_evaluate_for_grafting == 'Yes' ? '#373c4e' : '#3b598a') . ';padding: 9px 15px 8px 18px;border-radius: 3px;">
																<input type="radio" style="display: none" value="">
																<label style="line-height: 16px;font-size: 14px;color: #fff;margin: 0;font-weight: 600;display: inline-block;">Yes</label>
																<span style="display: ' . ($is_evaluate_for_grafting == 'Yes' ? 'inline-block' : 'none') . '; width: 16px;text-align: left;"><img width="16" src="' . url() . '/lp-asset/lp-images/check-solid.png" alt="check-solid" style="margin: 0 0 0 5px;"></span>
															</div>
														</td>
														<td align="left" cellpadding="0" cellspacing="0" >
															<div style="background: ' . ($is_evaluate_for_grafting == 'No' ? '#373c4e' : '#3b598a') . ';padding: 9px 15px 8px 18px;border-radius: 3px;margin: 0 0 0 5px;">
																<input type="radio" style="display: none" value="">
																<label style="line-height: 16px;font-size: 14px;color: #fff;margin: 0;font-weight: 600;display: inline-block;">No</label>
																<span style="display: ' . ($is_evaluate_for_grafting == 'No' ? 'inline-block' : 'none') . '; width: 16px;text-align: left;"><img width="16" src="' . url() . '/lp-asset/lp-images/check-solid.png" alt="check-solid" style="margin: 0 0 0 5px;"></span>
															</div>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>									
									<table width="100%" cellpadding="0" cellspacing="0" style="border-bottom: 1px dashed #efefef;">
										<tr>
											<td width="58.33%" cellpadding="0" cellspacing="0" style="padding: 10px 0;">
												<label style="font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0;display: inline-block;" class="input-main-label">Pathology Evaluation</label>
											</td>
											<td width="41.67%" cellpadding="0" cellspacing="0" style="padding: 10px 0;">
												<table align="right" cellpadding="0" cellspacing="0">
													<tr>
														<td align="left" cellpadding="0" cellspacing="0" >
															<div style="background: ' . ($is_pathology_evaluation == 'Yes' ? '#373c4e' : '#3b598a') . ';padding: 9px 15px 8px 18px;border-radius: 3px;">
																<input type="radio" style="display: none" value="">
																<label style="line-height: 16px;font-size: 14px;color: #fff;margin: 0;font-weight: 600;display: inline-block;">Yes</label>
																<span style="display: ' . ($is_pathology_evaluation == 'Yes' ? 'inline-block' : 'none') . '; width: 16px;text-align: left;"><img width="16" src="' . url() . '/lp-asset/lp-images/check-solid.png" alt="check-solid" style="margin: 0 0 0 5px;"></span>
															</div>
														</td>
														<td align="left" cellpadding="0" cellspacing="0" >
															<div style="background: ' . ($is_pathology_evaluation == 'No' ? '#373c4e' : '#3b598a') . ';padding: 9px 15px 8px 18px;border-radius: 3px;margin: 0 0 0 5px;">
																<input type="radio" style="display: none" value="">
																<label style="line-height: 16px;font-size: 14px;color: #fff;margin: 0;font-weight: 600;display: inline-block;">No</label>
																<span style="display: ' . ($is_pathology_evaluation == 'No' ? 'inline-block' : 'none') . '; width: 16px;text-align: left;"><img width="16" src="' . url() . '/lp-asset/lp-images/check-solid.png" alt="check-solid" style="margin: 0 0 0 5px;"></span>
															</div>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
									<table width="100%" cellpadding="0" cellspacing="0" style="border-bottom: 1px dashed #efefef;">
										<tr>
											<td width="100%" cellpadding="0" cellspacing="0" style="padding: 10px 0;">
												<label style="font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0;display: inline-block;" class="input-main-label">*A full arch solution requires a conference between doctors.</label>
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>	
</table>

<table width="100%" align="center" cellpadding="0" cellspacing="0" style="box-shadow: 4px 4px 35px rgb(0 0 0 / 10%);margin: 20px 0 10px;">
	<tr>
		<td width="100%" cellpadding="0" cellspacing="0"><h3 style="font-size: 20px;line-height: 37.5px;color: #3b598a;padding: 10px 0 0;margin: 0 0 10px;">Conclusion</h3></td>
	</tr>
	<tr>
		<td width="100%" cellpadding="0" cellspacing="0">
			<table width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td width="100%" cellpadding="0" cellspacing="0" style="font-size: 16px;line-height: 21.6px;color: #fff;padding: 9px 15px;background: #3b598a; font-weight: 600;">Additional Notes / Comments</td>
				</tr>
			</table>
			<table width="100%" cellpadding="0" cellspacing="0" style="margin: 10px 0 0;">
				<tr>
					<td width="100%" cellpadding="0" cellspacing="0" style="padding: 10px;border: 1px solid #6E717C;height: 100px;">
						' . $comments . '
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>';

if (!empty($data['attachment'])) {
	$html .= '<table width="100%" cellpadding="0" cellspacing="0">
					<tr>
						<td style="font-size:16px; font-weight:400; color:#3b598a;"><a href="'. url() . $data['attachment'] .'" target="_blank" style="color: #3b598a; border:1px solid #3b598a; border-radius: 6px; padding: 10px 12px; text-decoration: none; display: inline-block; margin:6px 0 10px;">View X-ray</a></td>
					</tr>
				</table>';
}
$html .= '</td>
	</tr>
</table>';

if (empty($data['attachment'])) {
	$html .= '<table>
	<tbody>
		<tr>
			<td style="font-size:24px; font-weight:600; color:#6E717C; padding-bottom:20px;">Thank You For Your Referral</td>
		</tr>
		<tr>
			<td style="font-size:18px; font-weight:400; color:#6E717C; padding-bottom:8px;">Please email xrays to:</td>
		</tr>
		<tr>
			<td style="font-size:18px; font-weight:400; color:#3b598a; padding-bottom:8px;">info@niagaraoms.com</td>
		</tr>
		<tr>
			<td style="font-size:16px; font-weight:400; color:#3b598a;">Fax - (716) 276-3552</td>
		</tr>
	</tbody>
</table>';
}

$html .= '
    <table width="100%" align="center" cellpadding="0" cellspacing="0" style="box-shadow: 4px 4px 35px rgb(0 0 0 / 10%);margin: 10px 0 0;border-top: 1px dashed #efefef;">
    	<tr>
    		<td>
    			<label style="width: 100%;font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0;display: inline-block;" class="row-label">All patients must have a pre-surgical consultation with Dr. Nigalye before scheduling surgery.</label><br>
    			<label style="width: 100%;font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0;display: inline-block;" class="row-label">Please notify our office 72 hours in advance if you are unable to keep your appointment.</label><br>
    			<label style="width: 100%;font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0;display: inline-block;" class="row-label"><a style="color: #3b598a; text-decoration: none" href="https://maps.app.goo.gl/NE9SfbnjLK7JD3868" target="_blank">6490 Main Street, Suite 5, Williamsville, New York 14221</a></label>
    			<label style="width: 100%;font-size: 15px;line-height: 1.5;font-weight: 600;color: #6E717C;margin: 10px 0;display: inline-block;" class="row-label">Phone/SMS: <a style="color: #3b598a; text-decoration: none" href="tel:(716) 276-3553">(716) 276-3553</a> • Fax: <a style="color: #3b598a; text-decoration: none" href="fax:(716) 276-3552">(716) 276-3552</a> <br><a style="color: #3b598a; text-decoration: none" href="www.niagaraoms.com" target="_blank">www.niagaraoms.com</a></label>
    		</td>
    	</tr>
    </table>
';

// print_r($html);
// die;
$filename = "Referral - $contact_name by $referring_doctor_name";
$path = $_SERVER['DOCUMENT_ROOT'] . "/dompdf/autoload.inc.php";
require($path);
use Dompdf\Dompdf;
$dompdf = new Dompdf();
$dompdf->loadHtml($html);
$dompdf->set_option('isRemoteEnabled', true);
$dompdf->setPaper('A4', 'portrait');
$dompdf->render();
$dompdf->stream($filename, array("Attachment" => 0));