-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshooters.php
93 lines (73 loc) · 2.03 KB
/
shooters.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php
session_start();
/**
* Created by PhpStorm.
* User: paddy.
* Date: 2019-01-17
* Time: 20:06
*/
include('Html.php');
require "models/User.php";
require "models/Shooter.php";
//User::deleteCredentialsFromSession();
//print_r($_SESSION['user']);
//echo Worker::getCredentialsFromSession()->getEmail();
//print_r(Project::getDuration());
if(isset($_SESSION['user'])) {
$user = User::getCredentialsFromSession();
if ($user->isLoggedIn())
{
}
else
{
header("Location: login.php");
//Worker::deleteCredentialsFromSession();
exit();
}
}
else
{
header("Location: login.php");
//Worker::deleteCredentialsFromSession();
exit();
}
echo '<html>';
renderHeader("Schützen");
echo '<body>';
?>
<section class="container-fluid">
<div class="row justify-content-center ">
<div class="col-11 rounded border shadow p-3 mb-5 bg-white " id="col-Login" >
<p class="text-center"><strong>Schützen</strong></p>
<div class="form-group">
<table class="table table-striped">
<?php
$shooters = Shooter::getAllByPassNr($user->getUsrCode());
echo "<tr>";
echo "<th>PassNr</th>";
echo "<th>Name</th>";
echo "<th>Auswählen</th>";
echo "<th></th>";
echo "</tr>";
foreach ($shooters as $shooter)
{
echo "<tr>";
echo "<td>" . $shooter->getPassNr() ."</td>";
echo "<td>" . $shooter->getName() ."</td>";
echo "<td>";
echo '<a class="btn btn-info" href="view_shooter.php?id=' . $shooter->getId() . '"><i class="fa fa-x fa-eye"></i></a>';
echo " ";
echo "</td>";
echo "</tr>";
}
?>
</div>
</table>
</div>
</div>
</section>
<?php
renderLogoutSection();
echo '</body>';
echo '</html>';
?>