-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmatchOutput.php
72 lines (56 loc) · 2.12 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
<html>
<?php session_start();
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("databaseName.php");
$con= mysql_connect($servername, $username, $password, $dbname);
if (!$con){
die('Could not connect: ' . mysql_error());
}
mysql_select_db($dbname, $con);
$result = mysql_query('select * from '.$matchScoutTable.'');
if (!$result){
die('Query failed: ' . mysql_error());
}
$i=0;
echo('<div style="border:1px solid black;overflow-y:hidden;overflow-x:scroll;"><table class="sortable table table-hover" id="RawData" border="1">');
while ($row = mysql_fetch_array($result)){
if($i==0){
echo("<tr>");
foreach ($row as $key => $value){
if(!is_numeric($key)){
echo("<td>".$key."</td>");
}
}
$i++;
echo("</tr>");
}
echo("<tr>");
foreach ($row as $key => $value){
if(!is_numeric($key)){
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>