-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathinternal.php
49 lines (40 loc) · 1.01 KB
/
internal.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
session_start();
require_once("inc/config.inc.php");
require_once("inc/functions.inc.php");
//Überprüfe, dass der User eingeloggt ist
//Der Aufruf von check_user() muss in alle internen Seiten eingebaut sein
$user = check_user();
include("templates/header.inc.php");
?>
<div class="container main-container">
<h1>Herzlich Willkommen!</h1>
Hallo <?php echo htmlentities($user['vorname']); ?>,<br>
Herzlich Willkommen im internen Bereich!<br><br>
<div class="panel panel-default">
<table class="table">
<tr>
<th>#</th>
<th>Vorname</th>
<th>Nachname</th>
<th>E-Mail</th>
</tr>
<?php
$statement = $pdo->prepare("SELECT * FROM users ORDER BY id");
$result = $statement->execute();
$count = 1;
while($row = $statement->fetch()) {
echo "<tr>";
echo "<td>".$count++."</td>";
echo "<td>".$row['vorname']."</td>";
echo "<td>".$row['nachname']."</td>";
echo '<td><a href="mailto:'.$row['email'].'">'.$row['email'].'</a></td>';
echo "</tr>";
}
?>
</table>
</div>
</div>
<?php
include("templates/footer.inc.php")
?>