-
Notifications
You must be signed in to change notification settings - Fork 1
/
matchOutput.php
86 lines (79 loc) · 3.4 KB
/
matchOutput.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
<html>
<?php
include("header.php");
include("navBar.php");?>
<body>
<script src="Chart.js"></script>
<script src="jquery.js"></script>
<div id="content">
<div class="container row-offcanvas row-offcanvas-left">
<div class="well column col-lg-112 col-sm-12 col-xs-12" id="content">
<h1>Match Scout Raw Data</h1>
<?php
include("databaseLibrary.php");
$result = getAllMatchData();
if ($result != null){
echo('<div style="border:1px solid black;overflow-y:hidden;overflow-x:scroll;"><table class="sortable table table-hover" id="RawData" border="1">');
foreach ($result as $row_key => $row){
if($i==0){
echo("<tr>");
foreach ($row as $key => $value){
if(!is_numeric($key) && $key != "autoPath"){
echo("<td>".$key."</td>");
}
}
$i++;
echo("</tr>");
}
echo("<tr>");
foreach ($row as $key => $value){
if(!is_numeric($key) && $key != "autoPath"){
if($key == "teamNum"){
$value= '<a href="teamData.php?team='.$value.'">'.$value.'</a>';
}
if($key == "matchNum"){
$value= '<a href="matchData.php?match='.$value.'">'.$value.'</a>';
}
echo("<td align='center'>".$value."</td>");
}
}
echo("</tr>");
}
echo("</table>");
} else{
$result = getAllPrimaryMatchData();
echo('<div style="border:1px solid black;overflow-y:hidden;overflow-x:scroll;"><table class="sortable table table-hover" id="RawData" border="1">');
foreach ($result as $row_key => $row){
if($i==0){
echo("<tr>");
foreach ($row as $key => $value){
if(!is_numeric($key) && $key != "cycleNumber"){
echo("<td>".$key."</td>");
}
}
$i++;
echo("</tr>");
}
echo("<tr>");
foreach ($row as $key => $value){
if(!is_numeric($key) && $key != "cycleNumber"){
if($key == "teamNum"){
$value= '<a href="teamData.php?team='.$value.'">'.$value.'</a>';
}
if($key == "matchNum"){
$value= '<a href="matchData.php?match='.$value.'">'.$value.'</a>';
}
echo("<td align='center'>".$value."</td>");
}
}
echo("</tr>");
}
echo("</table>");
}
?>
</div>
</div>
</div>
</body>
</html>
<?php include("footer.php"); ?>