site-accueil-insa/template.php

89 lines
3.1 KiB
PHP
Executable file

<?php
require_once 'classes/dao.php';
function get_total_points($team)
{
$dao = new Dao('');
$points = 0;
foreach ($dao->get_score_team($team) as $row) {
$points += $row['points'];
}
return $points;
}
$scoreUSA = get_total_points('usa');
$scoreURSS = get_total_points('urss');
if (!isset($customBackgroundId))
$customBackgroundId='';
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="width=device-width,maximum-scale=2">
<script defer src="https://use.fontawesome.com/releases/v5.0.13/js/all.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/style.css">
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/sidenav.css">
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/score.css">
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/hamburger.css">
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/hammer.js/2.0.8/hammer.js"></script>
<link href="https://fonts.googleapis.com/css?family=Montserrat|Raleway|Russo+One" rel="stylesheet">
<link rel="shortcut icon" href="favicon.ico">
<title><?= $pageTitle ?> | INSAT Accueil 2018</title>
<!-- Matomo -->
<script type="text/javascript">
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//etud.insa-toulouse.fr/~accueil_insa/analytics/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
</head>
<body id="main">
<div class="background" id="<?= $customBackgroundId?>"></div>
<div id="back-button" onclick="closeNav()"></div>
<?php
include("includes/top_bar.php");
include("includes/sidenav.html");
?>
<div id="header-wrap" class="outer">
<header class="inner">
<h1 id="title">Semaine d'Accueil 2018</h1>
<h3 id="timer">Chargement du compte à rebours...</h3>
</header>
</div>
<?php
$platformID = 'mobile-score';
include("includes/score_counter.php");
?>
<div id="main-fading-top-edge"></div>
<div id="main-content-wrap" class="outer">
<section id="main-content" class="inner">
<?= $pageContent // Display content defined in calling file ?>
</section>
</div>
<div id="main-fading-bottom-edge"></div>
<div id="footer-wrap" class="outer">
<footer class="inner">
<?php
include("includes/copyright.html");
?>
</footer>
</div>
</body>
<script src="assets/scripts/TimerScript.js"></script>
<script src="assets/scripts/sidenavScript.js"></script>
</html>