-
Notifications
You must be signed in to change notification settings - Fork 0
/
scores.php
90 lines (77 loc) · 1.96 KB
/
scores.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
<?php
$pagetitle = "Fierceboard Bracket Contest";
$root = $_SERVER['DOCUMENT_ROOT'];
include $root . '/worldsbracket/header.php';
$bracketId = 0;
if(isset($_GET['id']))
{
$bracketId = $_GET['id'];
$bracket = $BRACKET_DATA_BO->getBracket($bracketId);
$pagetitle = $bracket['MatchName'] . ' Bracket Scores';
}
?>
<style type="text/css">
.score-table td {
vertical-align:middle !important;
}
.user {
border: none !important;
}
</style>
<div id="users">
<div id="content">
<div class="menubar">
<div class="sidebar-toggler visible-xs">
<i class="ion-navicon"></i>
</div>
<div class="page-title">
<?php echo $pagetitle ?>
</div>
</div>
<div class="content-wrapper">
<div class="users-list">
<div class="row user">
<?php
$scores = $USER_DATA_BO->rankBracketScores($bracketId, 0);
?>
<div>
<div class="barchart">
<table class="table score-table">
<tr>
<th></th>
<th></th>
<th>User</th>
<th>Score</th>
<th>Tie Break 1</th>
<th>Tie Break 2</th>
</tr>
<?php
foreach($scores as $s)
{
?>
<tr>
<td><?php echo $s['Rank'] . "." ?></td>
<td><div class="avatar"><img class="avatar" src="<?php echo $USER_DATA_BO->getUserAvatar($s['UserId']) ?>" /></div></td>
<td>
<a href="<?php echo 'score-breakdown.php?userId=' . $s['UserId'] . '&matchId=' . $bracketId ?>">
<?php echo $s['UserName'] ?>
</a>
</td>
<td><?php echo $s['Score'] ?></td>
<td><?php echo $s['TieBreak1Score'] ?></td>
<td><?php echo $s['TieBreak2Score'] ?></td>
</tr>
<?php
}
?>
</table>
</div>
</div>
</div>
</div>
<?php
?>
</div>
</div>
</div>
<?php include $root . '/worldsbracket/footer.php'; ?>