<?php
/*
 * Copyright (c) 2013, webvariants GbR, http://www.webvariants.de
 *
 * This file is released under the terms of the MIT license. You can find the
 * complete text in the attached LICENSE file or online at:
 *
 * http://www.opensource.org/licenses/mit-license.php
 */

if ($this->isTransitional):
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php else: ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php endif ?>
<html xmlns="http://www.w3.org/1999/xhtml"<?php echo !empty($this->language) ? ' xml:lang="'.$this->language.'" lang="'.$this->language.'"' : '' ?>>
<head><?php
	if (!empty($this->base)) {
		print "\n\t<base href=\"".$this->base."\" />";
	}

	print "\n\t<title>".sly_html(trim($this->title))."</title>\n";

	// notify old listeners
	sly_Core::dispatcher()->notify('PAGE_HEADER', $this);

	if ($this->favIcon !== null) {
		$this->addLink('shortcut icon', $this->favIcon, 'image/x-icon');
	}

	$this->printHttpMetas();
	$this->printMetas();
	$this->printLinks();
	$this->printCSSFiles();
	if (!$this->scriptsAtBottom) $this->printJavaScriptFiles();
	$this->printCSS();
	if (!$this->scriptsAtBottom) $this->printJavaScript();
?></head>
<body<?php print $this->printBodyAttrs() ?>>
