generated from iO-Academy/year-cohort-projectName
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
35 lines (32 loc) · 883 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
require_once "vendor/autoload.php";
use Icepace\UserHydrator;
$db = new PDO('mysql:host=db; dbname=icepace', 'root', 'password');
$users = UserHydrator::getAllUsers($db);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="index.css" />
<title>Icepace</title>
</head>
<body>
<nav>
<a class="homePageTitle" href="index.php">
<h1>Icepace</h1>
</a>
<a class="signUp" href="registrationPage.php">sign up</a>
</nav>
<div class="allUserCardsContainer">
<h2 class="user-header">All users</h2>
<?php
foreach ($users as $user){
echo $user->createUserCardHtml();
}
?>
</div>
</body>
</html>