just one user

This commit is contained in:
marko
2022-10-27 10:36:20 +02:00
parent 32d809f5a0
commit 3e60b97050
6 changed files with 168 additions and 112 deletions

View File

@@ -7,6 +7,10 @@ require_once 'config/participo.php';
require_once './lib/api.php'; // should be replaced
require_once 'participoLib/participo.php';
require_once 'participoLib/planer.php';
require_once("config/phpcount.config.php");
require_once("phpcount/phpcount.php");
PHPCount::AddHit("participo");
dbConnector::connect(
$cwsvJudoConfig['db']['host'],
@@ -17,7 +21,6 @@ require_once 'config/participo.php';
eventPlaner::setDbConnection(dbConnector::getDbConnection());
participo::authentificate();
$userData = getUserData(dbConnector::getDbConnection(), $_SESSION['user']['userId']);
?>
<!DOCTYPE html>
<html>
@@ -203,6 +206,20 @@ if (participo::isUserAdmin($userData['id'])) {
])->htmlCode() .
'</div>'
);
echo("<h2 id=\"commingStarts\">Aktuelle Einschreibungen</h2>");
$eventList = participo::getEventStarter("2022-01-01");
$htmlTable = null;
if($eventList){
$htmlTable = "<table>"
."<thead><tr><th>Datum</th><th>Veranstaltung</th><th>Starter</th></tr></thead>"
."<tbody>";
foreach($eventList as $event){
$htmlTable .= "<tr><td>".$event['eventDate']."</td><td>".$event['eventName']."</td><td>".$event['userName'].", ".$event['userFirstname']."</td></tr>";
}
$htmlTable .= "</tbody></table>";
}
echo($eventList?$htmlTable:"<div>Keine Meldungen zu bevorstehenden Events");
} ?>
</main>
<?php