-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvereins.php
131 lines (108 loc) · 3.26 KB
/
vereins.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?php
session_start();
/**
* Created by PhpStorm.
* User: paddy.
* Date: 2019-01-17
* Time: 20:06
*/
include('Html.php');
require "models/User.php";
require "models/Discipline.php";
require "models/Round.php";
require "models/Team.php";
require "models/Verein.php";
//Worker::deleteCredentialsFromSession();
//print_r($_SESSION['user']);
//echo Worker::getCredentialsFromSession()->getEmail();
//print_r(Project::getDuration());
if(isset($_SESSION['user'])) {
$user = User::getCredentialsFromSession();
//die($worker->getEmail());
if ($user->isLoggedIn())
{
//
}
else
{
header("Location: login.php");
//Worker::deleteCredentialsFromSession();
exit();
}
}
else
{
header("Location: login.php");
//Worker::deleteCredentialsFromSession();
exit();
}
if(isset($_SESSION['saison']))
{
$saison = $_SESSION['saison'];
}
if(isset($_GET['disciplineId']))
{
$disciplineId = $_GET['disciplineId'];
}
if(isset($_GET['roundId']))
{
$roundId = $_GET['roundId'];
}
$discrictId = substr($user->getUsrCode(), 0, 3);
echo '<html>';
renderHeader("Verein");
echo '<body>';
$discipline = Discipline::get($disciplineId);
?>
<section class="container-fluid">
<div class="row justify-content-center ">
<div class="col-11 rounded border shadow p-11 mb-11 bg-white " id="col-Login" >
<?php
headLine("Verein");
userLine($user);
crumbBar(3, $user->getRight()>0, $disciplineId,$roundId);
$round = Round::get($roundId);
seasonSelector($discipline);
infoTableStart();
infoTableRow("Saison", $saison);
infoTableRow("DISZIPLIN", $discipline->getName());
infoTableRow("RUNDE", $round->getRound());
infoTableRow("Eingabe", getRoundRange($round, $user));
infoTableEnd();
?>
<div class="form-group">
<table class="table table-striped">
<?php
$vereins = Verein::getByDistrictId($discrictId . "00");
if(count($vereins)>0){
echo "<tr>";
echo "<th class='colID'>ID</th>";
echo "<th>Name</th>";
echo "<th class='colSelect'>Auswählen</th>";
echo "</tr>";
foreach ($vereins as $verein)
{
echo "<tr>";
echo "<td>" . $verein->getId() ."</td>";
echo "<td>" . utf8_convert($verein->getName()) ."</td>";
echo "<td>";
echo '<a class="btn btn-success" href="teams.php?disciplineId='.$disciplineId.'&roundId='.$roundId.'&verein=' . $verein->getId() . '"><i class="fa fa-x fa-pincel"></i>Select</a>';
echo " ";
echo "</td>";
echo "</tr>";
}
}
else{
echo "Keine Vereine gefunden";
}
echo "</table>";
backButton("rounds.php?disciplineId=".$disciplineId);
?>
</div>
</div>
</section>
<?php
renderLogoutSection();
echo '</body>';
echo '</html>';
?>