Warning: Undefined array key "STEAMID" in
/home/container/public_html/ttt_stats/search.php on line
16
Warning: Undefined array key "stype" in
/home/container/public_html/ttt_stats/search.php on line
17
Search for your TTT stats!
SteamID |
Nickname |
Playtime (hours, minutes, seconds) |
Rounds Played |
Times Innocent |
Times Detective |
Times Traitor |
Total Deaths |
Total Kills |
K/D Ratio |
Total Head-Shots |
Total Points |
Highest Score |
First Joined |
Last Seen |
if(isset($inputPlayer)){
$multiResult = mysqli_num_rows($player);
while($playerarray = mysqli_fetch_array( $player )) {
$playerSteamid = $playerarray['steamid'];
$playerNickname = $playerarray['nickname'];
$playerPlaytime = $playerarray['playtime'];
$playerRoundsplayed = $playerarray['roundsplayed'];
$playerInnocenttimes = $playerarray['innocenttimes'];
$playerDetectivetimes = $playerarray['detectivetimes'];
$playerTraitortimes = $playerarray['traitortimes'];
$playerDeaths = $playerarray['deaths'];
$playerKills = $playerarray['kills'];
$playerHeadshots = $playerarray['headshots'];
$playerPoints = $playerarray['points'];
$playerMaxfrags = $playerarray['maxfrags'];
$playerFirstjoined = $playerarray['first_joined'];
$playerLastSeen = $playerarray['last_seen'];
$sb_search_string = $sb_search_build . $playerSteamid . "&Submit=";
if ($playerKills and $playerDeaths != 0){
$playerKDRTrun = $playerKills / $playerDeaths;
$playerKDR = round($playerKDRTrun, 2); //rounding to numbers such as 0.12 rather then 0.1259848797 etc. We don't need that many decimal points in our output, no one cares for that level of accuracy.
}
else {
$playerKDR = "N/A";
}
$seconds = $playerPlaytime;
//start of math for hourse, minues and seconds
$hours = floor($seconds / (60 * 60));
// extract minutes
$divisor_for_minutes = $seconds % (60 * 60);
$minutes = floor($divisor_for_minutes / 60);
// extract the remaining seconds
$divisor_for_seconds = $divisor_for_minutes % 60;
$seconds = ceil($divisor_for_seconds);
if ($sb_enabled == true){
include("./includes/config_sb.php");
$banned = mysqli_query($connect, "SELECT * FROM sb_bans WHERE authid = '$playerSteamid'");
$bannedTotal = mysqli_num_rows($banned);
}
echo "";
echo "" . $playerSteamid . " | ";
echo "" . $playerNickname . " | ";
echo " H:" . $hours . " M:" . $minutes . " S:" . $seconds . " | ";
echo "" . $playerRoundsplayed . " | ";
echo "" . $playerInnocenttimes . " | ";
echo "" . $playerDetectivetimes . " | ";
echo "" . $playerTraitortimes . " | ";
echo "" . $playerDeaths . " | ";
echo "" . $playerKills . " | ";
echo "" . $playerKDR . " | ";
echo "" . $playerHeadshots . " | ";
echo "" . $playerPoints . " | ";
echo "" . $playerMaxfrags . " | ";
echo "" . $playerFirstjoined . " | ";
echo "" . $playerLastSeen . " | ";
if ($sb_enabled == true){
echo " " . $bannedTotal . " | ";
}
echo "
";
}
}
echo "
";
?>
if ($multiResult == 1){
echo "
";
}
else if ($multiResult == 0 && isset($inputPlayer)){
echo "
No user found under that name.
";
}
?>
include("./includes/footer.php");
?>