add 12NächteChallenge2021
This commit is contained in:
@@ -52,6 +52,26 @@ processPostData($dbConnection, $_POST);
|
||||
<body>
|
||||
<?php include("lib/machs/sidenav.php");?>
|
||||
|
||||
<?php // Für die 12-Nächte-Challenge
|
||||
$now = new DateTime();
|
||||
$promoStart = new DateTime("2021-11-24");
|
||||
$promoEnd = new DateTime("2022-02-06");
|
||||
$from = new DateTime("2021-12-24");
|
||||
|
||||
if($promoStart <= $now && $now <= $promoEnd) {
|
||||
echo("<h1 style=\"font-size:1.5rem;\">12-Nächte-Challenge</h1>");
|
||||
if($now < $from) echo("<p>Die 12-Nächte-Challenge geht vom 24.12.2021--06.01.2022. Ziel ist es möglichts an allen Tagen ein Achievement zu erhalten. Sobald es losgeht, wird hier die aktuelle Rangliste stehen.");
|
||||
record::setDbConnection($dbConnection);
|
||||
$zwölfer = record::getTopAchievers(array('from'=>"2021-12-24", 'to'=>"2022-01-06"));
|
||||
echo("<table>");
|
||||
record::setDbConnection($dbConnection);
|
||||
foreach( record::getTopAchievers(array('from'=>"2021-12-24", 'to'=>"2022-01-06")) as $t ){
|
||||
echo("<tr><td>".$t['vorname']."</td><td>".$t['name']."</td><td>".$t['COUNT(*)']."</td></tr>");
|
||||
}
|
||||
echo("</table>");
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if( hasUserAttribute($dbConnection, $_SESSION['user']['userId'], "inTraining" ) ){
|
||||
echo( "<h2>Eigene Achievements</h2>" );
|
||||
|
||||
Reference in New Issue
Block a user