<?php

/*
 * Header
 */

$sHTML = '';

$sHTML .=
'<!DOCTYPE html>
<html lang="nl">
	
	<head>
	
		<!-- Google tag (gtag.js) -->
		<script async src="https://www.googletagmanager.com/gtag/js?id=G-EY9YYZ3GN3"></script>
		<script>
		  window.dataLayer = window.dataLayer || [];
		  function gtag(){dataLayer.push(arguments);}
		  gtag(\'js\', new Date());

		  gtag(\'config\', \'G-EY9YYZ3GN3\');
		</script>
		
		<!-- title -->
		<title>Mijn OVIS</title>
		
		<!-- meta -->
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
		<meta name="format-detection" content="telephone=no" />
		<meta name="description" content="Beheer uw OVIS account" />
		<meta name="robots" content="' . ROBOTS . '" />
		
		<!-- favicon -->';	
		$sHTML .= '<link rel="apple-touch-icon" sizes="180x180" href="/assets/img/favicon/apple-touch-icon.png">';
		$sHTML .= '<link rel="icon" type="image/png" sizes="32x32" href="/assets/img/favicon/favicon-32x32.png">';
		$sHTML .= '<link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicon/favicon-16x16.png">';
		$sHTML .= '<link rel="manifest" href="/assets/img/favicon/site.webmanifest">';
		$sHTML .= '<link rel="shortcut icon" href="/assets/img/favicon/favicon.ico">';
		
		$sHTML .= '<meta name="msapplication-TileColor" content="#da532c">
		<meta name="msapplication-config" content="/assets/img/favicon/browserconfig.xml">
		<meta name="theme-color" content="#ffffff">

		<!-- base -->
		<base href="' . BASEURL . '">
		
		<!-- canonical -->
		<link rel="canonical" href="">
		
		<!-- font -->
		<link rel="stylesheet" href="https://use.typekit.net/drx8pio.css">
		
		<!-- css plugins -->';
		$sHTML .= '<link href="/assets/css/font-awesome.min.css" rel="stylesheet" type="text/css" media="screen" />';
		$sHTML .= '<link href="/assets/css/select2.min.css" rel="stylesheet" type="text/css" media="screen" />';
		$sHTML .= '<link href="/assets/css/slick.css" rel="stylesheet" type="text/css" media="screen" />';
		$sHTML .= '<link href="/assets/css/slick-theme.css" rel="stylesheet" type="text/css" media="screen" />';
		$sHTML .= '<link href="/assets/css/simpleLightbox.min.css" rel="stylesheet" type="text/css" media="screen" />';
		//$sHTML .= '<link href="/assets/css/uppy.min.css" rel="stylesheet" type="text/css" media="screen" />';
		$sHTML .= '<link href="https://releases.transloadit.com/uppy/v3.10.0/uppy.min.css" rel="stylesheet">';
		$sHTML .= '<link href="/assets/css/croppie.css" rel="stylesheet" type="text/css" media="screen" />';
		$sHTML .= '<link href="/assets/css/spectrum.css" rel="stylesheet" type="text/css" media="screen" />';
		$sHTML .= '<link href="/assets/css/jquery-ui.css" rel="stylesheet" type="text/css" media="screen" />';
			
		$sHTML .= '<!-- css admin -->';		
		$sHTML .= '<link href="/assets/css/normalize.css" rel="stylesheet" type="text/css" media="screen" />';
		$sHTML .= '<link href="/assets/css/form.css?v=' . ASSETS_VERSION . '" rel="stylesheet" type="text/css" media="screen" />';
		$sHTML .= '<link href="/assets/css/admin.css?v=' . ASSETS_VERSION . '" rel="stylesheet" type="text/css" media="screen" />';
		$sHTML .= '<link href="/assets/css/richtext.min.css?v=' . ASSETS_VERSION . '" rel="stylesheet" type="text/css" media="screen" />';
		
		if(in_array($sPage, $aAddEditPages)) {
			$sHTML .= '<link href="/assets/css/show_hide_based_on_class.css?v=' . ASSETS_VERSION . '" rel="stylesheet" type="text/css" media="screen" />';			
		}
			
	$sHTML .= '</head>';
	
	$sISNDebug = '';
	
	if($_SERVER['REMOTE_ADDR'] == '95.170.68.38' || $_SERVER['REMOTE_ADDR'] == '2a01:7c8:bb09:1d:5054:ff:fefe:ce4d'){
		$sISNDebug = ' isn-debug';		
	}
	
	$sHTML .= '<body class="' . (!empty($oMijnOVIS->parsedDetails->category) ? ' category-' . $oMijnOVIS->parsedDetails->category . ' category-set' : false) . (in_array($sPage, $aAddEditPages) ? (!$bIsAllowed ? ' content-page' : ' add-or-edit') : false) . (in_array($sPage, $aContentPages) ? ' content-page' : false) . $sISNDebug . '">
	
	<section class="header' . ($bFrontPage == true ? '' : ' sub') . '">

		<div class="center">';
		
			$sHTML .= '<div id="beta-container" class="beta-container">B&Egrave;TA</div>';
		
			if(!empty($bFrontPage)){
				
				$sHTML .= '<div id="welcome-container" class="welcome-container">
					<div id="welcome" class="welcome">Welkom '. (!empty($oMijnOVIS->_oUserData->companyName) ? $oMijnOVIS->_oUserData->companyName : false) .'</div>
				</div>';
				
				/*
				$sHTML .= '<div id="filters-container" class="filters-container">
					<div id="filters" class="filters">Filteren</div>
				</div>';
				
				$sHTML .= '<div id="step-back-container" class="step-back-container">
					<div id="step-back" class="step-back">Vorige</div>
				</div>';
				*/
				
			} else {				
				
				/*
				$sHTML .= '<div id="to-main-container" class="to-main-container">
					<a href="/" id="to-main" class="to-main">Terug naar overzicht</a>
				</div>';
				
				$sHTML .= '<div id="step-back-container" class="step-back-container">
					<div id="step-back" class="step-back">Vorige</div>
				</div>';
				*/				
				
				if(in_array($sPage, $aAddEditPages)){
					
					$sHTML .= '<div id="template-succes" class="template-succes">Template data ingeladen</div>';
					$sHTML .= '<div id="save-edit-succes" class="save-edit-succes">Opslaan succesvol</div>';
					
					if(!empty($oMijnOVIS->_bInvalidArticle)){					
						$sHTML .= '<div id="title-container" class="title-container active">Advertentie niet gevonden</div>';
					} elseif(!empty($oMijnOVIS->_bInvalidPage)){					
						$sHTML .= '<div id="title-container" class="title-container active">Pagina niet gevonden</div>';
					} elseif(!empty($sArticleId)){					
						$sHTML .= '<div id="title-container" class="title-container edit active">Advertentie bewerken</div>';
						$sHTML .= '<div id="sub-title-container" class="sub-title-container">'.$oMijnOVIS->parsedDetails->title .'</div>';
					} else {				
						$sHTML .= '<div id="title-container" class="title-container active">Advertentie aanmaken</div>';
					}
					
				} else {
					$sHTML .= '<div id="title-container" class="title-container active">'.$sPageName.'</div>';
				}
			}
			
			//$sHTML .= '<nav id="navigation">';				
				//$sHTML .= '<div id="mobile-button" class="mobile-button"></div>';				
			//$sHTML .= '</nav>';

		$sHTML .= '</div>

	</section>';
	
	$sHTML .= include dirname(__FILE__) .  '/../include/inc.sidebar.php';
	
	echo $sHTML;