public function getProfileUrl($bLang = true) { // load config $oGPCConfig = GPCConfig::getInstance('get'); // get selected id $sID = $oGPCConfig->getString('id', null); if ($sID == null) { throw new Exception('No profile ID assigned'); } $oSteamID = new SteamID($sID); $sXmlUrl = 'http://steamcommunity.com/'; // choose if we got a numeric id or an alias if (!$oSteamID->isValid()) { // complain about invalid characters, if found if (!preg_match('/^[a-zA-Z0-9-_]+$/', $sID)) { throw new Exception("Invalid profile alias: {$sID}"); } $sXmlUrl .= 'id/' . $sID; } else { $sXmlUrl .= 'profiles/' . $oSteamID->getSteamID64(); } // add xml parameter so we get xml data (hopefully) $sXmlUrl .= '?xml=1'; // get language setting $sLang = $oGPCConfig->getString('lang', null); if (!$bLang || $sLang == null) { // we're done here return $sXmlUrl; } $sLang = strtolower($sLang); if (in_array($sLang, self::$aValidLang)) { // add language parameter $sXmlUrl .= '&l=' . $sLang; } return $sXmlUrl; }
$ReplaceText = str_replace("^7", "</span><span style='color:lightblue'>", $ReplaceText); $ReplaceText = str_replace("^8", "</span><span style='color:gray'>", $ReplaceText); $GetName = $ReplaceText . "</span>"; } if ($row['online'] == "false") { $GetStatus = ""; } else { $GetStatus = "<span style='color:green'>Online</span>"; } if ($row['country'] == "") { $SetCountry = "00"; } else { $SetCountry = $row['country']; } $oSteamID = new SteamID($row['authid']); $oSteamURL = "http://steamcommunity.com/profiles/" . $oSteamID->getSteamID64(); echo "<img src='images/flags/{$SetCountry}.png' title='{$country[$SetCountry]}' height='11' width='16'> <a href='{$oSteamURL}' target='_blank'>" . $GetName . "</a> " . $GetStatus; ?> </td> <td class="row1" align="center" nowrap="" width="220"> <span class="row2"> <table cellpadding="5"> <tbody> <tr> <td align="center"> <?php echo get_lastseen($row['date']); ?> </td> </tr> </tbody>