zeg1jeux/header.php

48 lines
1.1 KiB
PHP

<?php
$webpageTitle = isset($webpageTitle) ? $webpageTitle : DEFAULT_WEBPAGE_TITLE;
?><!DOCTYPE html>
<html>
<head>
<title><?php echo $webpageTitle; ?></title>
<?php
if (isset($_SESSION['gameId']) and ((isset($bodyIds) and strpos($bodyIds, 'startpage') === false)) or (!isset($bodyIds))) {
$themeCSSDir = 'themes/'. $_SESSION['gameId'] . '/css';
$files = scandir($themeCSSDir);
$files = array_slice($files, 2);
foreach ($files as $f) {
echo '
<link rel="stylesheet" type="text/css" href="'. $themeCSSDir . '/' . $f .'" title="'. $games[$_SESSION['gameId']]['title'] .'" />';
}
}
?>
<link rel="stylesheet" type="text/css" href="themes/layout.css" />
<link rel="stylesheet" type="text/css" href="themes/deco.css" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<?php
foreach ($javascripts['header'] as $js) {
echo '
<script src="'. $js . '"></script>
';
}
?>
</head>
<?php
$bodyIds = !isset($bodyIds) ? '' : ' id="'. $bodyIds .'"';
?>
<body<?php echo $bodyIds; ?>>
<!--
<h1>La bureautique</h1>
-->
<main>