"|", "["=>"{", "]"=>"}", "~"=>"^"); $usernameCanonical = strtr($username, $ircLowerSymbols); $usernameCanonical = strtolower($usernameCanonical); } function emptyResult() { $result = array(); $result['usrname'] = "Not found"; $result['count'] = 0; $result['score'] = 0; $result['points'] = 0; $result['q_asked'] = 0; $result['num_e'] = 0; $result['num_e_accepted'] = 0; $result['num_q'] = 0; $result['num_q_accepted'] = 0; $result['num_r'] = 0; return $result; } $userProfile = emptyResult(); if ($username != '') { try { $profileResult = $storage->getUserProfileInformation($usernameCanonical); $storage->close(); if(sizeOf($profileResult) > 0) { if(array_key_exists('usrname', $profileResult[0])) { if(!is_null($profileResult[0]['usrname'])) { $userProfile = $profileResult[0]; } } } } catch(StorageException $e) { } } ?> <?php echo $userProfile['usrname']; ?> · TriviaTime

Profile and stats.

Averages

'; echo ''; echo ''; echo ''; } ?>
Average Time/Question* Average Points/Question*
' . number_format($userProfile['count'],2) . '' . number_format($userProfile['score'],2) . '

Totals

'; echo ''; echo ''; echo ''; } ?>
Total Points Number Answered*
' . number_format($userProfile['points'],0) . '' . number_format($userProfile['q_asked'],0) . '

Contributions

'; echo ''; echo ''; echo ''; echo ''; } ?>
Reports Made Edits (Made/Accepted) Questions (Made/Accepted)
' . number_format($userProfile['num_r'],0) . '' . number_format($userProfile['num_e'],0) . '/' . number_format($userProfile['num_e_accepted'],0) . '' . number_format($userProfile['num_q'],0) . '/' . number_format($userProfile['num_q_accepted'],0) . '

* These stats do not include KAOS