<?php
// Icons from https://icon-icons.com/fr/pack/BigMug-Line-icons/935

global $account;
$periods = Period::LoadPendingPeriods();
$nbPeriods = count($periods);

?><!DOCTYPE html5><html><head>
<link rel="stylesheet" href="public/css/bootstrap.min.css" />
<link rel="stylesheet" href="public/css/style.css" />
</head><body>
<div class="row">
<h3>Pending periods</h3>
<ul class="container">
<?php foreach ($periods as $i) echo '<a href="#" onclick="setPeriodStart(\'' .$i->getStart() .'\')"><li>' .$i->getLabel() .' (from ' .$i->getStart() .')</li></a>'; ?>
</ul>
<h3>Past periods</h3>
<ul class="container">
<?php
$past = Period::LoadPastPeriods();
foreach ($past as $i) echo '<a href="#" onclick="setPeriodId(\'' .$i->getId() .'\')"><li>' .$i->getLabel() .' (from ' .$i->getStart() .' to ' .$i->getEnd() .')</li></a>'; ?>
</ul>
</div>
<script src="public/js/jquery-3.3.1.slim.min.js"></script>
<script src="public/js/popper.min.js"></script>
<script src="public/js/bootstrap.min.js"></script>
</body></html>
