<?php

/**
 * @copyright	The Joomla Templates
 * https://thejoomlatemplates.com/
 * Template made with the joomla component Template Creator CK - https://www.template-creator.com
 * sport4all
 * @license 
 * @version 
 * */

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

$wa    = $this->getWebAssetManager();
$app   = \Joomla\CMS\Factory::getApplication();
$input = $app->getInput();
$input = $app->input;
?>

<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >
<head>
	<jdoc:include type="metas" />
	<jdoc:include type="styles" />
	<jdoc:include type="scripts" />
	<?php if ($this->params->get('useresponsive','1')) { ?>
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<?php } ?>
		<?php \Joomla\CMS\HTML\HTMLHelper::_('bootstrap.framework'); ?>
	<?php $wa->registerAndUseStyle('bootstrap', 'media/vendor/bootstrap/css/bootstrap.min.css'); ?>
	<?php \Joomla\CMS\HTML\Helpers\Bootstrap::loadCss($includeMaincss = false, $this->direction); ?>
<?php 
	$wa->useScript('core');
	$wa->registerAndUseStyle('fontawesome', 'system/joomla-fontawesome.min.css');
	if ($this->direction == 'rtl') {
	$wa->registerAndUseStyle('template', 'templates/' . $this->template . '/css/template_rtl.css');
	} else {
	$wa->registerAndUseStyle('template', 'templates/' . $this->template . '/css/template.css');
	}
	$wa->registerAndUseStyle('template-dark', 'templates/' . $this->template . '/css/dark.css');
	$wa->registerAndUseStyle('template-mobile', 'templates/' . $this->template . '/css/mobile.css');
?>
<?php
// Detecting Active Variables
$option   = $input->getCmd('option', '');
$view     = $input->getCmd('view', '');
$layout   = $input->getCmd('layout', '');
$task     = $input->getCmd('task', '');
$itemid   = $input->getCmd('Itemid', '');
$pageid   = $input->getCmd('id', '');
$tckedition   = $input->getCmd('tckedition', '');
$tckeditionclass = $tckedition ? 'tck-edition' : '';

$menu = $app->getMenu()->getActive();
$pageclass = '';

if (is_object($menu))
	$pageclass = ' ' . $menu->getParams()->get('pageclass_sfx');
?><?php
$nbmodules7 = (bool)$this->countModules('news2', true) + (bool)$this->countModules('news3', true) + (bool)$this->countModules('news4', true);
?>
<?php
$nbmodules9 = (bool)$this->countModules('infos1', true) + (bool)$this->countModules('infos2', true) + (bool)$this->countModules('infos3', true) + (bool)$this->countModules('infos4', true);
?>
<?php
$mainclass = "";
if (!$this->countModules('position-7', true) && ! $tckedition) { $mainclass .= " noleft";}
if (!$this->countModules('position-6', true) && ! $tckedition) { $mainclass .= " noright";}
$mainclass = trim($mainclass); ?>

<?php if ($this->params->get('googleanalyticscode','')) { ?>
<script async src="https://www.googletagmanager.com/gtag/js?id=<?php echo $this->params->get('googleanalyticscode','G-xxxxxxxx-x') ?>"></script>
<script>
	window.dataLayer = window.dataLayer || [];
	function gtag(){dataLayer.push(arguments);}
	gtag('js', new Date());

	gtag('config', '<?php echo $this->params->get('googleanalyticscode','G-xxxxxxxx-x') ?>');
</script>
<?php } ?><?php
// Detecting Home
$menu = \Joomla\CMS\Factory::getApplication()->getMenu();
$lang = \Joomla\CMS\Factory::getLanguage();
if ($menu->getActive() == $menu->getDefault($lang->getTag())) {
	$siteHome = 1;
}else{
	$siteHome = 0;
}
?> 
<?php include('customheader.php'); ?>
	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/custom.css?ver=327746" type="text/css" />

	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/print.css?ver=327746" type="text/css" media="print" />
</head>
<body class="<?php echo $option
	. ' ' . $tckeditionclass . '-body'
	. ' view-' . $view
	. ($layout ? ' layout-' . $layout : ' no-layout')
	. ($task ? ' task-' . $task : ' no-task')
	. $pageclass
	. ($itemid ? ' itemid-' . $itemid : '')
	. ($siteHome === 1 ? ' homepage' : '')
	. ($pageid ? ' pageid-' . $pageid : '');
?> <?php echo $this->direction; ?> ">
<?php if($this->countModules('menu', true) || $tckedition) : ?>
<div id="wrapper1" class="tck-wrapper">
	<div class="inner  tck-container">

	<?php if ($this->countModules('menu', true) || $tckedition) : ?>
	<nav id="menu">
		<div class="inner <?php echo $tckeditionclass ?>" data-position="menu">
			<label for="menu-mobileck" class="mobileckhambuger_togglerlabel" style="display:none;">&#x2261;</label>
			<input id="menu-mobileck" class="mobileckhambuger_toggler" type="checkbox" style="display:none;"/>
			<jdoc:include type="modules" name="menu" style="htmlck" />
		</div>
	</nav>
	<?php endif; ?>

	</div>
</div>
<?php endif; ?>
<div id="wrapper2" class="tck-wrapper">
	<div class="inner ">

	<div id="logo1" class="tck-logo-center tck-logo">
		<div class="inner">
			<?php if ($this->params->get('logo1_logolink')) { ?>
			<a href="<?php echo htmlspecialchars($this->params->get('logo1_logolink')); ?>">
			<?php } ?>
				<img class="tck-logo-img" src="<?php echo \Joomla\CMS\Uri\Uri::root(true) . '/' .  trim('/' . $this->params->get('logo1_logoimgsrc', $this->baseurl . '/templates/' . $this->template . '/images/logo2.png'), '/') ?>" width="<?php echo $this->params->get('logo1_logowidth', '300px') ?>" height="<?php echo $this->params->get('logo1_logoheight', '100px') ?>" alt="<?php echo htmlspecialchars($this->params->get('logo1_logotitle',''));?>" />
			<?php if ($this->params->get('logo1_logolink')) { ?>
			</a>
			<?php } ?>
			<?php if ($this->params->get('logo1_logodescription')) { ?>
			<div class="bannerlogodesc">
				<div class="inner"><?php echo htmlspecialchars($this->params->get('logo1_logodescription'));?></div>
			</div>
			<?php } ?>
		</div>
	</div>

	</div>
</div>
<?php if($this->countModules('news1', true) || $tckedition) : ?>
<div id="wrapper3" class="tck-wrapper">
	<div class="inner  tck-container">

	<?php if ($this->countModules('news1', true) || $tckedition) : ?>
	<div id="news1" >
		<div class="inner <?php echo $tckeditionclass ?>" data-position="news1">
			<jdoc:include type="modules" name="news1" style="htmlck" />
		</div>
	</div>
	<?php endif; ?>

	</div>
</div>
<?php endif; ?>
<?php if($this->countModules('news2', true) || $this->countModules('news3', true) || $this->countModules('news4', true) || $tckedition) : ?>
<div id="wrapper4" class="tck-wrapper">
	<div class="inner  tck-container">

	<?php if ($nbmodules7 || $tckedition) : ?>
	<section id="modulestop"  class="tck-modules">
		<div class="inner tck-flip-module <?php echo 'n'.$nbmodules7 ?>">
			<?php if ($this->countModules('news2', true) || $tckedition) : ?>
			<div id="news2" class="flexiblemodule ">
				<div class="inner <?php echo $tckeditionclass ?>" data-position="news2">
					<jdoc:include type="modules" name="news2" style="htmlck" />
				</div>
			</div>
			<?php endif; ?>
			<?php if ($this->countModules('news3', true) || $tckedition) : ?>
			<div id="news3" class="flexiblemodule ">
				<div class="inner tck-flip-module <?php echo $tckeditionclass ?>" data-position="news3">
					<jdoc:include type="modules" name="news3" style="htmlck" />
				</div>
			</div>
			<?php endif; ?>
			<?php if ($this->countModules('news4', true) || $tckedition) : ?>
			<div id="news4" class="flexiblemodule ">
				<div class="inner tck-flip-module <?php echo $tckeditionclass ?>" data-position="news4">
					<jdoc:include type="modules" name="news4" style="htmlck" />
				</div>
			</div>
			<?php endif; ?>
		</div>
	</section>
	<?php endif; ?>


	</div>
</div>
<?php endif; ?>
<div id="wrapper" class="tck-wrapper">
	<div class="inner  tck-container">

	<?php if ($nbmodules9 || $tckedition) : ?>
	<section id="infos"  class="tck-modules">
		<div class="inner lightbox <?php echo 'n'.$nbmodules9 ?>">
			<?php if ($this->countModules('infos1', true) || $tckedition) : ?>
			<div id="infos1" class="flexiblemodule ">
				<div class="inner <?php echo $tckeditionclass ?>" data-position="infos1">
					<jdoc:include type="modules" name="infos1" style="htmlck" />
				</div>
			</div>
			<?php endif; ?>
			<?php if ($this->countModules('infos2', true) || $tckedition) : ?>
			<div id="infos2" class="flexiblemodule ">
				<div class="inner <?php echo $tckeditionclass ?>" data-position="infos2">
					<jdoc:include type="modules" name="infos2" style="htmlck" />
				</div>
			</div>
			<?php endif; ?>
			<?php if ($this->countModules('infos3', true) || $tckedition) : ?>
			<div id="infos3" class="flexiblemodule ">
				<div class="inner <?php echo $tckeditionclass ?>" data-position="infos3">
					<jdoc:include type="modules" name="infos3" style="htmlck" />
				</div>
			</div>
			<?php endif; ?>
			<?php if ($this->countModules('infos4', true) || $tckedition) : ?>
			<div id="infos4" class="flexiblemodule ">
				<div class="inner <?php echo $tckeditionclass ?>" data-position="infos4">
					<jdoc:include type="modules" name="infos4" style="htmlck" />
				</div>
			</div>
			<?php endif; ?>
		</div>
	</section>
	<?php endif; ?>


	<div id="maincontent" class="maincontent <?php echo $mainclass ?>">
		<div class="inner clearfix">
			<?php if ($this->countModules('position-7', true) || $tckedition) : ?>
			<aside id="left" class="column column1">
				<?php if ($this->countModules('position-7', true)) : ?>
				<div class="inner clearfix <?php echo $tckeditionclass ?>" data-position="position-7">
					<jdoc:include type="modules" name="position-7" style="htmlck" />
				</div>
				<?php endif; ?>
			</aside>
			<?php endif; ?>
			<div id="main" class="column main row-fluid">
				<div class="inner clearfix">
							<main id="center" class="column center ">
								<div class="inner">
											<jdoc:include type="message" />
											<jdoc:include type="component" />
								</div>
							</main>
							<?php if ($this->countModules('position-6', true) || $tckedition) : ?>
							<aside id="right" class="column column2">
								<?php if ($this->countModules('position-6', true) || $tckedition) : ?>
								<div class="inner <?php echo $tckeditionclass ?>" data-position="position-6">
									<jdoc:include type="modules" name="position-6" style="htmlck" />
								</div>
								<?php endif; ?>
							</aside>
							<?php endif; ?>

				</div>
			</div>
			<div class="clr"></div>
		</div>
	</div>

	</div>
</div>
<?php if($this->countModules('position-3', true) || $tckedition) : ?>
<div id="wrapper5" class="tck-wrapper">
	<div class="inner  tck-container">

	<?php if ($this->countModules('position-3', true) || $tckedition) : ?>
	<div id="footer" >
		<div class="inner <?php echo $tckeditionclass ?>" data-position="position-3">
			<jdoc:include type="modules" name="position-3" style="htmlck" />
		</div>
	</div>
	<?php endif; ?>

	</div>
</div>
<?php endif; ?>
<jdoc:include type="modules" name="debug" />
<?php include('customendbody.php'); ?>
</body>
</html>