<div class="col-lg-6"> <div class="panel panel-default"> <div class="panel-heading">Top Records</div> <div class="panel-body"> <div class="table-responsive"> <table class="table table-striped table-bordered table-hover" id="dataTables-example"> <thead> <tr> <th>Rank</th> <th>Map</th> <th>Time</th> <th>Style</th> <th>Track</th> </tr> </thead> <tbody> <?php $sql = "SELECT `rank`, `map`, `time`, `style`, `track` FROM `round` WHERE (`auth` = " . $ex . $steamid . $ex . " OR `auth` = " . $ex . $steamfix . $ex . ") ORDER BY `rank`, `time`, `map` LIMIT 10;"; $players = $link->query($sql); while ($array = mysqli_fetch_array($players)) { echo "<tr class=\"odd gradeX\">\n\t\t\t\t\t\t <td>" . $array[0] . "</td>\n\t\t\t\t\t\t <td>" . $array[1] . "</td>\n\t\t\t\t\t\t <td>" . timeFormat($array[2]) . "</td>\n\t\t\t\t\t\t <td>" . getKeyByArrayValue($array[3], $style_list) . "</td>\n\t\t\t\t\t\t <td>" . getKeyByArrayValue($array[4], $track_list) . "</td>\n\t\t\t\t\t\t </tr>"; } ?> </tbody> </table> </div> </div> </div> </div> </div>
} else { $query = $link->query("SELECT COUNT(*) FROM `round` WHERE `map` LIKE '" . $map . "' AND `track` = '" . $track . "' AND `style` = '" . $style . "'"); } } $array2 = mysqli_fetch_array($query); $totalplayers = $array2[0]; if ($style == -1) { if ($track == -1) { $sql = "SELECT `rank`, `name`, `auth`, `time`, `style`, `track`, `date` FROM `round` WHERE `map` LIKE '" . $map . "' ORDER BY `time` ASC LIMIT 25"; } else { $sql = "SELECT `rank`, `name`, `auth`, `time`, `style`, `track`, `date` FROM `round` WHERE `map` LIKE '" . $map . "' AND `track` = '" . $track . "' ORDER BY `time` ASC LIMIT 25"; } } else { if ($track == -1) { $sql = "SELECT `rank`, `name`, `auth`, `time`, `style`, `track`, `date` FROM `round` WHERE `map` LIKE '" . $map . "' AND `style` = '" . $style . "' ORDER BY `time` ASC LIMIT 25"; } else { $sql = "SELECT `rank`, `name`, `auth`, `time`, `style`, `track`, `date` FROM `round` WHERE `map` LIKE '" . $map . "' AND `track` = '" . $track . "' AND `style` = '" . $style . "' ORDER BY `time` ASC LIMIT 25"; } } $players = $link->query($sql); while ($array = mysqli_fetch_array($players)) { echo "<tr class=\"odd gradeX\">\n\t\t\t\t\t\t\t\t<td>" . $array[0] . "</td>\n\t\t\t\t\t\t\t\t<td><a href='index.php?site=player&auth=" . $array[2] . "'>" . $array[1] . "</a></td>\n\t\t\t\t\t\t\t\t<td>" . timeFormat($array[3]) . "</td>\n\t\t\t\t\t\t\t\t<td>" . getKeyByArrayValue($array[4], $style_list) . "</td>\n\t\t\t\t\t\t\t\t<td>" . getKeyByArrayValue($array[5], $track_list) . "</td>\n\t\t\t\t\t\t\t\t<td>" . $array[6] . "</td>\n\t\t\t\t\t\t\t\t</tr>"; } ?> </tbody> </table> </div> </div> </div> </div> </div>