-
Notifications
You must be signed in to change notification settings - Fork 0
/
startseite.php
141 lines (85 loc) · 2.96 KB
/
startseite.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
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html>
<html lang="de">
<head>
<link rel="stylesheet" href="stylesheet2.css">
<meta charset="utf-8">
<title>10. NRW-Cup 2018, Anmeldung BETA v0.1</title>
</head>
<nav>
<ul>
<li><a href="http://192.168.3.243/nennung/index.php">Home</a></li>
<li><a href="http://192.168.3.243/nennung/abfrage.php">Teilnehmerliste</a></li>
<li><a href="http://192.168.3.243/nennung/abfrage_h.php">Klasse Hobby</a></li>
<li><a href="http://192.168.3.243/nennung/abfrage_t.php">Klasse Top</a></li>
<li><a href="http://192.168.3.243/nennung/admin.php">Admin</a></li>
<li><a href="http://192.168.3.243/nennung/export.php">RCM Export</a></li>
</ul>
</nav>
<body>
<p style="text-align:center">
<b>Nennsytem für RC-Car Rennen</b>
</p>
<p style="text-align:center">Die Startgebühr ist <b>VOR</b> dem Wettkampftag zu entrichten.</br>
Dazu bitte die Ausschreibung des jeweiligen Vereines beachten!</p>
<?php include ("connect.php");?>
<body>
<table align=center>
<caption>Aktive Veranstaltungen</caption>
<tbody>
<tr>
<th>Datum</th>
<th>Veranstaltung</th>
<th>Teilnehmer max.</th>
<th>Meldungen</th>
</tr>
<?php
$sql = "SELECT * FROM veranstaltungen WHERE aktiv = 1 ORDER BY datum";
foreach ($pdo->query($sql) as $row) : ?>
<tr id="row">
<?php
//Geburtstag zerlegen! Result = 28.08.1964 Input = 2017-09-27
//$_POST["datum"] Geburtsdatum (2017-09-27
$datum = $row['datum']; // Geburtsdatum
$array = explode("-",$datum); //Datum zerlegen (2013-08-22)
$erg = $array[2].'.'.$array[1].'.'.$array[0];
?>
<td><?=$erg?></td>
<td><?=$row['veranstaltung']?></td>
<td><?=$row['teilnehmer_max']?></td>
<td><?=$row['teilnehmer']?></td>
<?php endforeach;?>
</tbody>
</table>
<p></p>
<table align=center>
<caption>Passive Veranstaltungen</caption>
<tbody>
<tr>
<th>Datum</th>
<th>Veranstaltung</th>
<th>Teilnehmer max.</th>
<th>Meldungen</th>
</tr>
<?php
$sql = "SELECT * FROM veranstaltungen WHERE aktiv= 0 ORDER BY datum";
foreach ($pdo->query($sql) as $row) : ?>
<tr>
<?php
//Geburtstag zerlegen! Result = 28.08.1964 Input = 2017-09-27
//$_POST["datum"] Geburtsdatum (2017-09-27
$datum = $row['datum']; // Geburtsdatum
$array = explode("-",$datum); //Datum zerlegen (2013-08-22)
$erg = $array[2].'.'.$array[1].'.'.$array[0];
?>
<td><?=$erg?></td>
<td><?=$row['veranstaltung']?></td>
<td><?=$row['teilnehmer_max']?></td>
<td><?=$row['teilnehmer']?></td>
</tr>
<?php endforeach;
// Die Verbindung wie folgt schließen
$pdo = null; ?>
</tbody>
</table>
</main>
</html>