-
Notifications
You must be signed in to change notification settings - Fork 0
/
fixtures.php
170 lines (162 loc) · 8.77 KB
/
fixtures.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<?php
//include header template
require('layout/header.php');
?>
<div id="score-board" class="general-section">
<div class="container">
<div class="sport-nav tabbable">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#cricket" aria-controls="cricket" role="tab" data-toggle="tab">Cricket</a></li>
<li role="presentation"><a href="#football" aria-controls="football" role="tab" data-toggle="tab">Football</a></li>
<li role="presentation"><a href="#hockey" aria-controls="hockey" role="tab" data-toggle="tab">Hockey</a></li>
<li role="presentation"><a href="#tennis" aria-controls="tennis" role="tab" data-toggle="tab">Tennis</a></li>
<li role="presentation"><a href="#vollyball" aria-controls="vollyball" role="tab" data-toggle="tab">Volly Ball</a></li>
</ul>
<div class="tab-content">
<!--Cricket container-->
<div role="tabpanel" class="tab-pane active fade in" id="cricket">
<?php
require_once 'includes/db_connect.php';
$query = "SELECT * FROM matches WHERE matchstatus='scheduled' AND g_id='1' ";
$query_run = mysqli_query($mysqli, $query);
if(!$query_run->num_rows){
?> <h4 class="alert alert-danger">No matches are scheduled for this game right now</h4>
<?php
}
if ($query_run){
?>
<div class="scorecard-header">
<h2>Scheduled</h2>
<h4>Total <?php echo $query_run->num_rows; ?> Cricket matches are Scheduled</h4>
</div>
<?php
while ($query_row = mysqli_fetch_assoc($query_run)) {
$team1_id = $query_row['team1_id'];
$team2_id = $query_row['team2_id'];
$match_date_time = $query_row['match_date_time'];
$location = $query_row['location'];
$matchstatus = $query_row['matchstatus'];
// echo $team1_id. 'VS'.$team2_id. 'AT'. $match_date_time. 'LIVE FROM'.$location;
?>
<div class="scorecard-container">
<div class="match-card general-section">
<span class="live"><?php echo $matchstatus; ?></span>
<h4>At <?php echo $location; ?></h4>
<div class="teams">
<h3><?php echo $team1_id; ?></h3> <h2>VS</h2> <h3><?php echo $team2_id; ?></h3>
</div>
<div class="match-time">
<h4>Scheduled <?php echo $match_date_time; ?> </h4>
</div>
<a class="btn btn-primary sp-cta">Live Scorecard <span class="glyphicon glyphicon-new-window"></span></a>
</div>
</div>
<?php
}
} else {
echo "mysql_error()";
}
?>
</div>
<!--Cricket container end-->
<!--Football Container-->
<div role="tabpanel" class="tab-pane fade in" id="football">
<?php
require_once 'includes/db_connect.php';
$query = "SELECT * FROM matches WHERE matchstatus='scheduled' AND g_id='2'";
$query_run = mysqli_query($mysqli, $query);
if(!$query_run->num_rows){
?> <h4 class="alert alert-danger">No matches are being played for this sport</h4>
<?php return;
}
if ($query_run){
?>
<div class="scorecard-header">
<h2>Live Now</h2>
<h4>Total <?php echo $query_run->num_rows; ?> Football matches are Scheduled</h4>
</div>
<?php
while ($query_row = mysqli_fetch_assoc($query_run)) {
$team1_id = $query_row['team1_id'];
$team2_id = $query_row['team2_id'];
$match_date_time = $query_row['match_date_time'];
$location = $query_row['location'];
$matchstatus = $query_row['matchstatus'];
// echo $team1_id. 'VS'.$team2_id. 'AT'. $match_date_time. 'LIVE FROM'.$location;
?>
<div class="scorecard-container">
<div class="match-card general-section">
<span class="live"><?php echo $matchstatus; ?></span>
<h4>At <?php echo $location; ?></h4>
<div class="teams">
<h3><?php echo $team1_id; ?></h3> <h2>VS</h2> <h3><?php echo $team2_id; ?></h3>
</div>
<div class="match-time">
<h4>Scheduled <?php echo $match_date_time; ?> </h4>
</div>
<a class="btn btn-primary sp-cta">Live Scorecard <span class="glyphicon glyphicon-new-window"></span></a>
</div>
</div>
<?php
}
} else {
echo "mysql_error()";
}
?>
</div>
<!--Football container end-->
<div role="tabpanel" class="tab-pane fade" id="hockey">
<?php for($i=1; $i<8; $i++){ ?>
<div class="scorecard-container">
<div class="match-card general-section">
<span class="live">Live</span>
<h4>Sep 25,2015- Qualifying round, 1st Semi-final at Rwp cricket stadium</h4>
<div class="teams">
<h3>BS(IT)</h3> <h2>VS</h2> <h3>BS(Phy)</h3>
</div>
<div class="match-time">
<h4>Scheduled at 16:00</h4>
</div>
<a class="btn btn-primary sp-cta">Live Scorecard <span class="glyphicon glyphicon-new-window"></span></a>
</div>
</div>
<?php } ?>
</div>
<!--Hockey container end-->
<div role="tabpanel" class="tab-pane fade" id="tennis">
<?php for($i=1; $i<4; $i++){ ?>
<div class="scorecard-container">
<div class="match-card general-section">
<span class="live">Live</span>
<h4>Sep 25,2015- Qualifying round, 1st Semi-final at Rwp cricket stadium</h4>
<div class="teams">
<h3>BS(IT)</h3> <h2>VS</h2> <h3>BS(Phy)</h3>
</div>
<div class="match-time">
<h4>Scheduled at 16:00</h4>
</div>
<a class="btn btn-primary sp-cta">Live Scorecard</a>
</div>
</div>
<?php } ?>
</div>
<!--Hockey container end-->
<div role="tabpanel" class="tab-pane fade" id="vollyball">
<div class="scorecard-header">
<h2>Live Now</h2>
<h4 class="alert alert-danger">No matches are being played for this sport</h4>
</div>
</div>
</div>
</div> <!-- tabbable -->
</div>
</div><!--score board end-->
<?php
//include header template
require('layout/footer.php');
?>
<script>
$( document ).ready(function() {
$('.sp-nav').find('#fixtures').addClass('active').children('a').removeAttr('href');
});
</script>