//Include Config include "inc/config.php"; // Include database class include 'inc/database.class.php'; // Instantiate database. $database = new Database(); $database->query('SELECT * FROM playerlog WHERE auth = :id'); $database->bind(':id', $_GET['id']); $player = $database->resultset(); foreach ($player as $player) { foreach ($player as $key => $value) { $player[$key] = $value; } } $communityID = SteamTo64($player['auth']); $database->query('SELECT * FROM profiles WHERE communityid = :id'); $database->bind(':id', $communityID); $profile = $database->single(); if (!$profile || $profile['time'] < strtotime("-1 week")) { $info = GetPlayerInformation($communityID); $database->query('INSERT INTO profiles SET communityid = :id, avatar = :avatar, time = UNIX_TIMESTAMP() ON DUPLICATE KEY UPDATE avatar = :avatar, time = UNIX_TIMESTAMP()'); $database->bind(':id', $communityID); $database->bind(':avatar', $info['avatarfull']); $database->execute(); $database->query('SELECT * FROM profiles WHERE communityid = :id'); $database->bind(':id', $communityID); $profile = $database->single(); } $url = "http://steamcommunity.com/profiles/" . $communityID; include "inc/nav.php";
<?php if (empty($_SERVER['HTTP_X_REQUESTED_WITH']) || !strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') { header("Location: ../index.php?error=" . urlencode("Direct access not allowed.")); die; } //Database Info include 'config.php'; // Include database class include 'database.class.php'; // Instantiate database. $database = new Database(); $database->query('SELECT * FROM (SELECT * FROM `player_analytics` WHERE `auth` = :id ORDER BY `connect_time` DESC) AS a'); $database->bind(':id', $_GET['id']); $info = $database->resultset(); $profile = GetPlayerInformation(SteamTo64($_GET['id'])); ?> <div class="row"> <div class="col-lg-12"> <h1 class="page-header"><?php echo htmlentities($profile['personaname']); ?> <strong class="pull-right refresh"><i id="getplayerinfo" class="fa fa-refresh fa-fw"></i></strong> </h1> </div><!-- /.col-lg-12 --> </div><!-- /.row --> <div class="row"> <div class="col-lg-3"> <div class="panel panel-default"> <div class="panel-heading">