-
Notifications
You must be signed in to change notification settings - Fork 1
/
databasesheet.php
101 lines (96 loc) · 2.46 KB
/
databasesheet.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
<?php
ob_start();
include "global.php";
?>
<style>
input[type=number] {
background-color: #000;
color: #fff;
padding-left:10px;
width: 100%;
height: 100%;
text-align: center;
}
input[type=button], input[type=number]{
border: 0;
}
#footer {
position: fixed;
bottom: 0;
width: 100%;
}
#footer {
background: #fff;
line-height: 2;
text-align: right;
color: #042E64;
font-size: 30px;
font-family: sans-serif;
font-weight: bold;
}
.red {
background-color: #990000;
}
.blue {
background-color: #0068b3;
}
</style>
</head>
<body>
<?php include "nav.php";
include "error.php";
include "php/userCheck.php";
checkUser(true);?>
<form action="remove" method="get">
<div id="content">
<br>
<?php
include 'php/dbDataConn.php';
include 'php/getScoutInfo.php';
$result = mysqli_query($dbDataConn, "SELECT * FROM " . $GLOBALS['DB']['TABLE']['MATCH_SCOUTING'] . " ORDER BY id DESC");
echo "<div class='container' style='width:90%'><table align='center' class='table table-striped'>
<thead>
<tr>
<th> </th>
<th>ID</th>
<th>Match</th>
<th>Team</th>
<th>Alliance</th>
<th>Scout</th>
<th>Comments</th>
</tr>
</thead><tbody>";
while($row = mysqli_fetch_array($result)) {
if ($row['isRed'] == 1) {
$alliance = "red";
} else {
$alliance = "blue";
}
echo "<tr>";
echo "<td><input type='radio' name='id' value='" . $row['id'] . "'></td>";
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . $row['matchNum'] . "</td>";
echo "<td>" . $row['teamNum'] . "</td>";
echo "<td class='" . $alliance . "'></td>";
echo "<td>" . getScoutName($row['userID']) . " (" . $row['userID'] . ")</td>";
echo "<td>" . $row['teleCap.notes'] . "</td>";
echo "</tr>";
}
echo "</tbody></table></div>";
$dbDataConn->close();
?>
</div>
<div id="footer">
<div class="row">
<div class="col-sm-6">
<button type='submit' class='btn btn-danger btn-lg btn-block' style='margin-bottom:5px; margin-right:5px;' name='action' value=0>Remove</button>
</div>
<div class="col-sm-6">
<button type='submit' class='btn btn-danger btn-lg btn-block' style='margin-bottom:5px; margin-right:5px;' name='action' value=1>Edit</button>
</div>
</div>
</div>
</form>
</body>
<?php ob_flush(); ?>
</html>