-
Notifications
You must be signed in to change notification settings - Fork 0
/
Turinfo.php
61 lines (55 loc) · 1.78 KB
/
Turinfo.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
<html>
<?php
$info = $_GET['INFO'];
$info = stripslashes($info);
$info = mysqli_real_escape_string($info);
echo "<h1>" . $info . "</h1>";
?>
<!-- Denne del står for information/descrpiton, venstre side af turnerings-informationssiden -->
<div id="indholdLeft">
<?php
$result = mysqli_query($db, "SELECT turtabel.Tid, turtabel.Dag , turtabel.Description "
. "FROM turtabel "
. "WHERE turtabel.TurneringsNavn = '$info' ");
while ($row = mysqli_fetch_array($result)) {
echo ("<div id='turDesc'>
<table class='turneringTable' style='width:80%; '>
<tr>
<td>" . $info . " </br> " . $row['Dag'] . " kl." . $row['Tid'] . "</td>
</tr>
<tr>
<td> ");
echo nl2br($row['Description']);
echo (" </td>
</tr>
</table>
</div>");
}
?>
</div>
<!-- Her vises den table der indeholder alle navne på deltagere til den valgte turnering -->
<div id="indholdRight">
<br>
<table class="turneringTable" style="width:100%; margin-top: -20px;">
<tr>
<td>Navn</td>
<td>Gamertag</td>
<td>BordID</td>
</tr>
<?php
$result = mysqli_query($db, "SELECT deltager.Navn, deltager.Gamertag, deltager.BordID "
. "FROM turtabel , deltager "
. "WHERE turtabel.TurneringsNavn = '$info' "
. "AND turtabel.TurneringsID = deltager.TurneringsID");
while ($row = mysqli_fetch_array($result)) {
echo "<tr><td>" . $row['Navn'] . "</td>"
. "<td> '" . $row['Gamertag'] . "' </td>"
. "<td>" . $row['BordID'] . "</td></tr>";
}
?>
</table>
</div>
<div id="back" >
<a href=turnering.php> <--- Back </a>
</div>
</html>