-
-
-real_escape_string($_POST['search-bar']);
- $sql = "SELECT DISTINCT sql_matches_scoretotal.match_id, sql_matches_scoretotal.map, sql_matches_scoretotal.team_2, sql_matches_scoretotal.team_3
- FROM sql_matches_scoretotal INNER JOIN sql_matches
- ON sql_matches_scoretotal.match_id = sql_matches.match_id
- WHERE sql_matches.name LIKE '%".$search."%' OR sql_matches.steamid64 = '".$search."' OR sql_matches_scoretotal.match_id = '".$search."' ORDER BY sql_matches_scoretotal.match_id DESC";
-
- } else {
- if (isset($_GET["page"])) {
- $page_number = $conn->real_escape_string($_GET["page"]);
- $offset = ($page_number - 1) * $limit;
- $sql = "SELECT * FROM sql_matches_scoretotal ORDER BY match_id DESC LIMIT $offset, $limit";
- } else {
- $page_number = 1;
- $sql = "SELECT * FROM sql_matches_scoretotal ORDER BY match_id DESC LIMIT $limit";
- }
- }
-
- $result = $conn->query($sql);
-
- if($result->num_rows > 0) {
- while($row = $result->fetch_assoc()) {
- $half = ($row["team_2"] + $row["team_3"]) / 2;
-
- if ($row["team_3"] > $half) {
- $image = 'ct_icon.png';
- } elseif ($row["team_2"] == $half && $row["team_3"] == $half) {
- $image = 'tie_icon.png';
- } else {
- $image = 't_icon.png';
- }
-
- $map_img = array_search($row["map"], $maps);
-
- echo '
-
- ![]()
-
-
'.$row['team_3'].':'.$row['team_2'].'

-
- ';
- }
- } else {
- echo '
No Results!
';
- }
-?>
-query($sql_pages);
- $row_pages = $result_pages->fetch_assoc();
-
- $total_pages = ceil($row_pages["COUNT(*)"] / $limit);
-
- echo '
-
';
- }
-?>
-
-real_escape_string($match_id);
-
- $sql = "SELECT sql_matches_scoretotal.*, sql_matches.*
- FROM sql_matches_scoretotal INNER JOIN sql_matches
- ON sql_matches_scoretotal.match_id = sql_matches.match_id
- WHERE sql_matches_scoretotal.match_id = '".$match_id."' ORDER BY sql_matches.score DESC";
-
- $result = $conn->query($sql);
-
- if ($result->num_rows > 0) {
- $t = '';
- $ct = '';
- while ($row = $result->fetch_assoc()) {
- if ($row["kills"] > 0 && $row["deaths"] > 0) {
- $kdr = round(($row["kills"] / $row["deaths"]), 2);
- } else {
- $kdr = 0;
- }
- if ($row["team"] == 2) {
- $t_score = $row["team_2"];
- $t_name = $row["teamname_1"];
- if ($t_name == NULL) {
- $t_name = "Terrorists";
- }
- $t .= '
-
- | '.unicode2html(htmlspecialchars(substr($row["name"],0,12))).' |
- '.$row["kills"].' |
- '.$row["assists"].' |
- '.$row["deaths"].' |
- '.$kdr.' |
- '.$row["mvps"].' |
- '.$row["score"].' |
- '.$row["ping"].' |
-
';
- } elseif ($row["team"] == 3) {
- $ct_score = $row["team_3"];
- $ct_name = $row["teamname_2"];
- if ($ct_name == NULL) {
- $ct_name = "Counter-Terrorists";
- }
- $ct .= '
-
- | '.unicode2html(htmlspecialchars(substr($row["name"],0,12))).' |
- '.$row["kills"].' |
- '.$row["assists"].' |
- '.$row["deaths"].' |
- '.$kdr.' |
- '.$row["mvps"].' |
- '.$row["score"].' |
- '.$row["ping"].' |
-
';
- }
- }
- if (!isset($ct)) {
- $ct = '
No Players Recorded!
';
- }
- if (!isset($t)) {
- $t = '
No Players Recorded!
';
- }
- echo '
-
-
-
-
-
-
'.$ct_name.'
-
-
-
-
-
- | Player |
- Kills |
- Assists |
- Deaths |
- KDR |
- MVPs |
- Score |
- Ping |
-
-
-
- '.$ct.'
-
-
-
-
-
-
-
-
-
-
'.$ct_score.':'.$t_score.'
-
-
-
-
-
-
-
-
'.$t_name.'
-
-
-
-
-
- | Player |
- Kills |
- Assists |
- Deaths |
- KDR |
- MVPs |
- Score |
- Ping |
-
-
-
- '.$t.'
-
-
-
-
-
-
-
';
- } else {
- echo '
No Match with that ID!
';
- }
-?>
-
Developed by DistrictNine.Host
-
-
-
-
-
-