-
Notifications
You must be signed in to change notification settings - Fork 0
/
scoreboard.php
141 lines (118 loc) · 4.19 KB
/
scoreboard.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?php
session_start();
$sesi_username = isset($_SESSION['user']) ? $_SESSION['user'] : NULL;
if ($sesi_username != NULL || !empty($sesi_username))
{
include_once "header.php";
include_once "part/menu.php";
?>
<!-- ============================================================== -->
<!-- Start right Content here -->
<!-- ============================================================== -->
<div class="content-page">
<!-- Start content -->
<div class="content">
<div class="container">
<div class="row">
<div class="col-sm-12">
<h4 class="pull-left page-title">Scoreboard !</h4>
</div>
</div>
<div class="row">
<div class="col-md-6v2">
<div class="panel panel-border panel-danger">
<div class="panel-heading">
<h3 class="panel-title"></h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<table class="table table-striped">
<thead>
<tr>
<th>Rank</th>
<th>Name</th>
<th>Team</th>
<th>Point</th>
<th>Time</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php
$check = mysql_query("SELECT * from player order by poin desc, waktu asc");
$m=1;
while ($score = mysql_fetch_array($check)) {
$dt = explode(" ", $score['waktu']);
$dt2 = explode("-", $dt['0']);
$tm = explode(":", $dt['1']);
$tm2 = $tm['0'].":".$tm['1'];
$mon = bln($dt2['1']);
$time = $dt2['2']." ".$mon." - ".$tm2;
if ($score['status'] == 1) {
$status = "Active";
$label = "label-success";
} else {
$status = "Banned";
$label = "label-danger";
}
?>
<tr>
<td><?php echo $m; ?></td>
<td><?php echo $score['nama_lengkap']; ?></td>
<td><?php echo $score['team']; ?></td>
<td><span class="badge badge-danger"> <?php echo $score['poin']; ?> </span></td>
<td><?php echo $time; ?></td>
<td><span class="label <?php echo $label; ?>"><?php echo $status; ?></span></td>
</tr>
<?php
$m++;
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div> <!-- End Row -->
</div> <!-- container -->
</div> <!-- content -->
<footer class="footer text-right">
2016 © Tenesys.
</footer>
</div>
</div>
<!-- END wrapper -->
<script>
var resizefunc = [];
</script>
<!-- jQuery -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/waves.js"></script>
<script src="js/wow.min.js"></script>
<script src="js/jquery.nicescroll.js" type="text/javascript"></script>
<script src="js/jquery.scrollTo.min.js"></script>
<script src="assets/jquery-detectmobile/detect.js"></script>
<script src="assets/fastclick/fastclick.js"></script>
<script src="assets/jquery-slimscroll/jquery.slimscroll.js"></script>
<script src="assets/jquery-blockui/jquery.blockUI.js"></script>
<!-- CUSTOM JS -->
<script src="js/jquery.app.js"></script>
<script src="assets/datatables/jquery.dataTables.min.js"></script>
<script src="assets/datatables/dataTables.bootstrap.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#datatable').dataTable();
} );
</script>
</body>
</html>
<?php
}else{
session_destroy();
header('Location:../../404.php');
}
?>