Unsupported PHP app for analysing and displaying stats for Team Fortress 2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

awards.php 546B

123456789101112131415161718192021
  1. <?PHP
  2. function getAwardDescription($type, $field) {
  3. switch($type) {
  4. case 'weaponclass':
  5. return 'Most kills with a ' . $field . ' weapon';
  6. case 'weapon':
  7. $sql = 'SELECT weapon_displayname FROM weapons WHERE weapon_id = ' .$field;
  8. $res = mysql_query($sql);
  9. return 'Most ' . mysql_result($res, 0) . ' kills';
  10. case 'event':
  11. $words = explode(' ', $field);
  12. $title = array_shift($words) . 's';
  13. $title .= ' ' . implode(' ', $words);
  14. return 'Most ' . trim($title);
  15. default:
  16. return 'Unknown';
  17. }
  18. }
  19. ?>