<?php
/**
 * Email Header
 *
 */

	if ( ! defined( 'ABSPATH' ) ) {
		exit; // Exit if accessed directly
	}


	global $fbbttm_settingdata;

	$logourl = '';
	if(!empty($fbbttm_settingdata))
	{
		if(!empty($fbbttm_settingdata) && isset($fbbttm_settingdata['fbbttm_email_header_image'])) 
			{
				$logourl =  esc_attr($fbbttm_settingdata['fbbttm_email_header_image']); 
			}
			else {
				$logourl = '';
			}
	}



?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
		<meta content="width=device-width, initial-scale=1.0" name="viewport">
		<title><?php echo esc_html(get_bloginfo( 'name', 'display' )); ?></title>
	</head>
	<body <?php echo is_rtl() ? 'rightmargin' : 'leftmargin'; ?>="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
		<table width="100%" id="outer_wrapper">
			<tr>
				<td><!-- Deliberately empty to support consistent sizing and layout across multiple email clients. --></td>
				<td width="750">
					<div id="wrapper" dir="<?php echo is_rtl() ? 'rtl' : 'ltr'; ?>">
						<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" style="background-color: #fafbff;">
							<tr>
								<td align="center" valign="top">
									<div id="template_header_image" style="background-color:#246dd6; padding:12px 10px 5px;">
										<?php
										

										if ( $logourl ) {
											echo '<p style="margin-top:0; margin-bottom:0;"><img width="70" height="70" src="' . esc_url( $logourl ) . '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" /></p>';
										}
										else
										{
											echo '<p style="margin-top:0; margin-bottom:0;"><img width="70" height="70" src="' . esc_url(FBBTTM_URL.'/assets/images/fbblogo.png'  ) . '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" /></p>';
										}
										?>
									</div>
									<table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_container">
										
										<tr>
											<td align="center" valign="top">
												<!-- Body -->
												<table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_body">
													<tr>
														<td valign="top" id="body_content">
															<!-- Content -->
															<table border="0" cellpadding="20" cellspacing="0" width="100%">
																<tr>
																	<td valign="top" style="padding-bottom: 10px;">
																		<div id="body_content_inner" style="font-size:16px; line-height:26px;">