<?
## ORIGINAL:
# ### LOGO IS (USUALLY NOT HERE!!!!!
# ### LOOK IN: START_TABLE_II
# 
# if(!$logo_status) $logo_status = "OFF";  // UNUSED ?!?!?!  WWHAT IS THIS ??
# 
# if(strtoupper($logo_status) != "OFF") {  
# 
# 	if($left_logo) $logo_left = $left_logo; // legacy
# 	if($logo_to_use) $logo_right = $logo_to_use; // legacy
# 	
# 	if(empty($logo_left)) $logo_left = $_SESSION['template']['company']['logo_topleft'];
# 	if(empty($logo_center)) $logo_center = $_SESSION['template']['company']['logo_topcenter'];
# 	if(empty($logo_right)) $logo_right = $_SESSION['template']['company']['logo_topright'];
# 	
# 	////test("logo_left",$logo_left);
# 	////test("logo_center",$logo_center);
# 	////test("logo_right",$logo_right);
# 	
# 	  echo "
# 	<!-- START TABLE III. (LOGO) -->
# 	<table class='TABLE_III_table'>        
# 		<tr>
# 			<td align='left' valign='top' style='width:40%; padding-left:5px;'>
# 				<img src='" . image("local",$logo_left) . "' border='0'>
# 			</td>  
# 	 
# 			<td align='middle' valign='top' style='width:20%;'>
# 				<img src='" . image("local",$logo_center) . "' border='0'>
# 			</td>                                                    
# 	
# 			<td align='right' valign='top' style='width:40%; padding-right:5px;'>";
# 				
# 				if((strstr($_SESSION['route'],"HIDE SECRETS"))) $logo_right = "secured_with_patented_technology.png";
# 				
# 				echo "
# 				<img src='" . image("local",$logo_right) . "' border='0'>
# 			</td>                                                                   
# 	
# 		</tr>
# 	
# 		<!-- spacer -->
# 		</tr>
# 	
# 		<tr>
# 			<td height='7' colspan='3'></td>
# 		</tr>
# 	
# 	</table>
# 	<!-- END TABLE III. (LOGO) -->";
# }
# 
# unset($logo_status);
# unset($left_logo);
# unset($logo_to_use);
# 


?>
<style>
.TABLE_II_toptightfooter_td_3 {
	width:auto;
	height:0px;
	/* background-color:#FFFFFF; */
	
	border-spacing:0px;
	border-width:0px;
	border-collapse:collapse;
	border-style:solid;
	border-color:#000088;	

	/* sets secured net6work logo in uper right coerner */
	padding-top:0px;
	padding-bottom:0px;
	padding-left:0px;
	padding-right:5px;
	
	margin-left:0px;
	margin-right:0px;
	margin-top:0px;
	margin-bottom:0px;
	
	font-family:verdana,arial,helvetica,sans-serif;
	font-weight:bold;
	font-size:11px;
	color:#847300;
	vertical-align:middle;
	text-align:right;	
}
</style>

<?

if(stristr($_SERVER['HTTP_HOST'],"PUNTINGPAL")) {
    ////test("2 _SERVER['SCRIPT_URI']",$_SERVER['SCRIPT_URI']);
    
    if(
    (stristr($_SERVER['SCRIPT_FILENAME'],"details")) ||
    (stristr($_SERVER['SCRIPT_FILENAME'],".auth")) ||
    (stristr($_SERVER['SCRIPT_FILENAME'],".support"))
    ) {
    	$left_logo = NULL;
    	$text_logo_left = "<span style='font-size:18px; font-family:helvetica; color:#990000; font-weight:bold;'>Punting</span>";
    	$text_logo_left .= "<span style='font-size:18px; font-family:helvetica; color:#666666; font-weight:bold;'>Pal</span>";
    	$text_logo_left .= "<span style='font-size:18px; font-family:helvetica; color:#990000; font-weight:bold;'>.com</span>";
    
    ### NORMAL
    } else {
    	$left_logo = $_SESSION['template']['company']['logo_topleft'];
    }
    
### EVERYONE ELSE 
} else if($_SESSION['whitelabel_client_account_details']) {
	
	$left_logo = $_SESSION['whitelabel_client_account_details']['url_to_whitelabel_icon_500x500'];
	
} else {
	
    $left_logo = $_SESSION['template']['company']['logo_topleft'];
}

//test("left_logo",$left_logo);

if(!$css_logo_width) $css_logo_width = "auto";
if(!$css_left_logo) $css_left_logo  = " style='width:" . $css_logo_width . ";'";

### clear this for vocapass
if(stristr($_SESSION['template']['company']['client'],"vocaone")) $css_left_logo = "''";




if(
(stristr($_SERVER['SCRIPT_FILENAME'],"details")) ||
(stristr($_SERVER['SCRIPT_FILENAME'],".auth")) ||
(stristr($_SERVER['SCRIPT_FILENAME'],".support"))
) {
	$TABLE_II_background_color = "#FFFFFF";
} else {
	////test("_SESSION['template']['company']['background_color']",$_SESSION['template']['company']['background_color']);
	$TABLE_II_background_color = $_SESSION['template']['company']['background_color'];
}
 
    //$TABLE_II_background_color = "#FF0000";


if(empty($logo_space_height)) $logo_space_height = "40px";



echo "
<table class='TABLE_II_toptightfooter_table' style='width:100%; background-color:".$TABLE_II_background_color."; border-width:0px; border-style:solid; border-color:#FF0000;'>

	<tr>

		<td class='TABLE_II_toptightfooter_td_1'" . $css_text_logo_left . " style='vertical-align:top; border-width:0px; border-style:solid; border-color:#000000;'>";
			// if(
			// (stristr($_SERVER['SCRIPT_URL'],"@")) &&
			// ($_SESSION['payme']['business']['account']['payment_page_business_logo']) 
			// ) {
			// 	echo "<img src='" . image("local",$_SESSION['template']['company']['logo_topleft_BW']) . "' border='0'>";
			// } else {
			
			
			### COMPANY BRANDS TECH PRECIDENT:
			if(
			(is_array($_SESSION['voice_authorization_api'])) &&
			(stristr($_SERVER['HTTP_HOST'],"AUTHORIZATIONS."))
			) {
					
				////test("2. _SESSION['voice_authorization_api']",$_SESSION['voice_authorization_api']);
				
				if(!empty($_SESSION['2_factor_verification_api']['business_account_details'])){
                	$left_logo = $_SESSION['2_factor_verification_api']['business_account_details']['vocasign']['gateway_authorization_logo'];
                
                } else if(!empty($_SESSION['voice_authorization_api']['business_account_details']['vocasign']['gateway_authorization_logo'])) {
				    $left_logo = $_SESSION['voice_authorization_api']['business_account_details']['vocasign']['gateway_authorization_logo'];
				}

####################
### START: LEFT LOGO:
####################
					
				////test("left_logo",$left_logo);
				echo "<img src='" . image("local",$left_logo) . "' border='0'" . $css_left_logo . " height='$logo_space_height'>";
				
			
			} else {
				
				if(
				(empty($left_logo)) &&
				(!empty($_SESSION['template']['company']['html_logo']))
				) {
					

					### STANDARD PLATFORM HTML LOGO
					echo $text_logo_left = "&nbsp;&nbsp;".$_SESSION['template']['company']['html_logo'];
					
				} else {

	
					if(stristr($_SESSION['template']['company']['client'],"VOCAONE")) { 
					
						/// SPECIAL
						//echo "<img src='" . image("local",$left_logo) . "' border='0' style='height:70px;' " . $css_left_logo . ">";
					
					/// NORMAL
					} else { 
						
						//test("left_logo",$left_logo);
						if(stristr($left_logo,"http")) {
							$image_size = getimagesize($left_logo);
						} else {
							$image_size = getimagesize("./link_images/".$left_logo);
						}
						
						//test("image_size",$image_size);
						
						$img_width = $image_size[0];
						$img_height = $image_size[1];
						
						if($img_width >= $img_height) {
							$image_height = "";
							$image_width = "160px";
						}
						
						if($img_width < $img_height) {
							$image_height = "30px";
							$image_width = "";
						}
						
						
						if(
						($logo_link) &&
						!empty($logo_link)
						) {
							
							//test(1,0);
							echo "<a href='". $logo_link . "' border='0'>";
						}
						
						if($image_size[0]) {
							
							//test(1,2);
							
							if(stristr($left_logo,"http")) {
							
								echo "<img src='$left_logo' border='0' style='height:$image_height; width:$image_width;' " . $css_left_logo . ">";
								
							} else {
								echo "<img src='" . image("local",$left_logo) . "' border='0' style='height:$image_height; width:$image_width;' " . $css_left_logo . ">";
							}
							
						}
						
						
						
						
						if(
						($logo_link) &&
						!empty($logo_link)
						) {
							echo "</a>";
						}
						
						
						
					
					}
					
####################
### END: LEFT LOGO
####################
					
	

					if(isset($_SESSION['voice_authorization_api']['business_account_details'])) {
						
						
						////test("2. _SESSION['voice_authorization_api']",$_SESSION['voice_authorization_api']);
                    	if(!empty($_SESSION['2_factor_verification_api']['business_account_details'])){
                    	    $left_logo = $_SESSION['2_factor_verification_api']['business_account_details']['vocasign']['gateway_authorization_logo'];
                    	}
                    	
                    	
                    	
						else if(!empty($_SESSION['voice_authorization_api']['business_account_details']['vocasign']['gateway_authorization_logo'])) {
								$left_logo = $_SESSION['voice_authorization_api']['business_account_details']['vocasign']['gateway_authorization_logo'];
						}		
						
						
					}


				
				}
			}
				

			



echo "
       </td>  
       
       <td class='TABLE_II_toptightfooter_td_2'>";
          
          ####################
          ### MIDDLE LOGO:
          ####################
          if(stristr($_SESSION['template']['company']['client'],"vocaONE")) {
          	echo "<img src='" . image("local",$left_logo) . "' border='0' style='height:70px;' " . $css_left_logo . ">";
          } else {
	          echo "<img src='" . image("local",$_SESSION['template']['company']['logo_topcenter']) . "' border='0'>";
          }
          
          ####################
          ####################

echo "
       </td>                                                    
    
       <td class='TABLE_II_toptightfooter_td_3' style='height:".$logo_space_height."; vertical-align:middle; padding-bottom:0px; padding-right:6px;'" . $css_text_logo_right . ">";
			
			### change the biometric logo as necessary
			
			### change the biometric logo as necessary
			//if(!$logo_to_use) $logo_to_use = $_SESSION['template']['company']['logo_topright']; // DEFAULT // BIOMETRICALLY SECURED
			//if( ($master_config_domain == "paybysepa.com") || (!stristr($_SESSION['route'],"SHOW SECRETS")) ) 
			
			////test("_SERVER['SCRIPT_URI']",$_SERVER['HTTP_HOST']);
			
			### if(stristr($_SERVER['HTTP_HOST'],"PUNTINGPAL")) {
			### 	////test("2 _SERVER['SCRIPT_URI']",$_SERVER['SCRIPT_URI']);
			### 	
			### 	if(
			### 	(stristr($_SERVER['SCRIPT_FILENAME'],"details")) ||
			### 	(stristr($_SERVER['SCRIPT_FILENAME'],".auth")) ||
			### 	(stristr($_SERVER['SCRIPT_FILENAME'],".support"))
			### 	) {
			### 		$right_logo = NULL;
			### 		$text_logo_right = "<span style='font-size:14px; color:#990000; font-weight:bold;'>Super</span>";
			### 		$text_logo_right .= "<span style='font-size:14px; color:#990000; font-weight:bold;'> </span>";
			### 		$text_logo_right .= "<span style='font-size:14px; color:#444444; font-weight:bold;'>Competitive!</span>";
			### 	} else {
			### 		$right_logo = $_SESSION['template']['company']['logo_topright'];
			### 	}
			### 
			### ### EVERYTHING ELSE
			### } else 
			if(empty($right_logo)) {
			
				if(
				(stristr($_SERVER['SCRIPT_FILENAME'],"details")) ||
				(stristr($_SERVER['SCRIPT_FILENAME'],".auth"))
				) {
					$right_logo = "exclusive_and_patented_y.png";
				} else {
					//$right_logo = "exclusive_and_patented_9px.png";
					$right_logo = $_SESSION['template']['company']['logo_topright'];
					$right_logo_css_style = "padding-bottom:20px;";
					//test("0. right_logo_css_style",$right_logo_css_style);	
				}
				
				
				//$right_logo = "biometrically_secured_2.png";
				
				if(
				(stristr($_SERVER['HTTP_HOST'],"AUTHORIZATIONS.")) &&
				(!empty($_SESSION['voice_authorization_api']['business_account_details']['vocasign']['gateway_authorization_logo']))
				) {
					//test("_SESSION['voice_authorization_api']['business_account_details']",$_SESSION['voice_authorization_api']['business_account_details']);
				
					if(
					(stristr($_SERVER['HTTP_HOST'],"vocapass.com")) &&
					(!stristr($_SESSION['voice_authorization_api']['business_account_details']['accountname'],"vocaPASS"))
					) {
						$right_logo = "biometrically_secured_2.png";
						$right_logo_css_style = "padding-bottom:20px;";
						//test("1. right_logo_css_style",$right_logo_css_style);						
					}

					if(
					(stristr($_SERVER['HTTP_HOST'],"vocasign.com")) &&
					(!stristr($_SESSION['voice_authorization_api']['business_account_details']['accountname'],"vocaPASS"))
					) {
						$right_logo = "powered_by_vocaSIGN.png";
						$right_logo_css_style = "padding-bottom:20px;";
						//test("2. right_logo_css_style",$right_logo_css_style);						
					}		
					
				}

			}
				
			//test("right_logo",$right_logo);



			if(!$css_right_logo) {
				$css_right_logo = "";
			}
			
			////test("_SERVER['PHP_SELF']",$_SERVER['PHP_SELF']);
            if(!stristr($_SERVER['PHP_SELF'],".auth")) {
                        
                        
            	# if(stristr($_SESSION['template']['company']['client'],"vocaone")){
                # 	$text_logo_right = '
				# 	<nav class="menu slide-menu-right">
				# 	    <ul>
				# 	        <li><button class="close-menu">Close →</button></li>
				# 	        <li><a href="https://vocaONE.com">vocaONE LLC</a></li>
				# 	        <li><a href="https://vocaPASS.com">vocaPASS.com</a></li>
				# 	        <li><a href="https://vocaSIGN.com">vocaSIGN.com</a></li>
				# 	        <li><a href="https://vocaMATCH.org">vocaMATCH.org</a></li>
				# 	        <li><a href="https://support.'. $_SESSION['template']['company']['domain'] .'">Resolution Center</a></li>
				# 	        
				# 	    </ul>
				# 	</nav>
				# 	<div class="topnav">
				# 	   <img alt="" class="top" src="https://images.vocaone.com/vocaone/resources/icon_voca.png"><a href="contact.html"><img alt="" class="top" src="https://images.vocaone.com/vocaone/resources/icon_phone.png"></a><a class="nav-toggler toggle-slide-right"><img alt="" class="top" src="https://images.vocaone.com/vocaone/resources/icon_burger.png"></a>
				# 	</div>
				# 	';
                # }
            }

			if(empty($text_logo_right)) {
				//$logo_to_use = "exclusive_and_patented_y.png";
				//echo "<a href='javascript:openSUPPORT(61);' border='0'><img src='" . image("local",$right_logo) . "' border='0'" . $css_right_logo . "></a>";
				////test("css_right_logo",$css_right_logo);
				//test("right_logo_css_style",$right_logo_css_style);
				
				####################
				### RIGHT LOGO:
				####################
				if(stristr($_SESSION['template']['company']['client'],"vocaONE")) {
					echo "<!-- empty -->";
				} else {
					echo "<img src='" . image("local",$right_logo) . "' border='0'" . $css_right_logo . " style='$right_logo_css_style'>";
				}
				
				####################
				####################
				
				
			} else {
				echo $text_logo_right;
			}


if(!$logo_bottom_buffer) $logo_bottom_buffer = "0px";     

echo "</td>  
	</tr>
	
	<tr><td style='height:$logo_bottom_buffer;'></td></tr>
	
	</table>";

unset($left_logo);
unset($right_logo);
unset($logo_to_use);
unset($text_logo_left);
unset($css_logo_width);
unset($css_left_logo);
unset($css_text_logo_right);
unset($css_text_logo_left);
?>

<?
////test("_SERVER['PHP_SELF']",$_SERVER['PHP_SELF']);
# if(!stristr($_SERVER['PHP_SELF'],".auth")) {
# 
#     if(stristr($_SESSION['template']['company']['client'],"vocaone")){
# 		echo "
# 		<link rel='stylesheet' href='https://images.vocaone.com/vocaone/signaturecard/font-awesome.min.css'>
# 		<link rel='stylesheet' href='https://images.vocaone.com/vocaone/signaturecard/xoverlay.css'>
# 
# 		<link rel='stylesheet' href='https://images.vocaone.com/vocaone/signaturecard/slidestyle.css'>
# 
# 		<script type='text/javascript' src='https://images.vocaone.com/vocaone/resources/classie.js'></script>
# 		<script type='text/javascript' src='https://images.vocaone.com/vocaone/resources/nav.js'></script>";
#     }
# }
?>    