function notifyUsers($time = 604800) { $database = new Database(); foreach ($database->getAllUsers() as $user) { $matches = $database->getUnbetMatches($user->getId(), $time); $message = '<p>Dear ' . $user->getUserName() . ', you haven\'t yet placed any bets for the following upcoming events. Don\'t forget to take your chance!</p>' . matchesToString($matches) . '<p>Greetings, the ZeeJong team.</p>'; sendMail('ZeeJong - Upcoming Events', $user->getMail(), '*****@*****.**', $message); } }
?> <!-- Main --> <div class="container center"> <br> <h2>Registered Users</h2> <table class="table table-striped table-admin" id="tblGrid"> <thead> <tr> <th class="text-center">User</th> <th class="text-center">Role</th> </tr> </thead> <tbody> <?php $users = $database->getAllUsers(); for ($i = 0; $i < count($users); $i++) { echo '<tr><td class="text-center">' . $users[$i]["user_id"] . '</td><td class="text-center">' . $users[$i]["role"] . '</td>'; } ?> </tbody> </table> <br> <h2>Leaderboard</h2> <table class="table table-striped table-admin" id="tblGrid"> <thead> <tr> <th class="text-center">Graph ID</th> <th class="text-center">Name</th> <th class="text-center">Matches</th> <th class="text-center">Score</th>