query = $query; $this->type = $type; $this->game = $game; if (MODE == "LAN") { $this->uniqueid_string = "IP Address"; $this->uniqueid_string_plural = "IP Addresses"; } } function drawForm ($getvars=array(), $searchtypes=-1) { global $g_options, $db; if (!is_array($searchtypes)) { $searchtypes = array( "player"=>"Player names", "uniqueid"=>"Player " . $this->uniqueid_string_plural, "clan"=>"Clan names" ); } ?>
 /downarrow.gif" width=9 height=6 border=0 align="middle" alt="downarrow.gif"> Find a Player or Clan

"> $value) { echo "\n"; } ?>
  ">
">Search For: ">" class="textbox">
">In: "> type ); ?>
">Game: "> query("SELECT code, name FROM hlstats_Games WHERE hidden='0' ORDER BY name"); while ($db->fetch_row()) { $games[$db->rowdata[0]] = $db->rowdata[1]; } echo getSelect("game", $games, $this->game); ?>
">

 /downarrow.gif" width=9 height=6 border=0 align="middle" alt="downarrow.gif"> Search Results

query); $sr_query = htmlentities(strip_tags($sr_query), ENT_NOQUOTES, "UTF-8"); if ($this->type == "player") { $table = new Table( array( new TableColumn( "playerId", "ID", "width=5align=right" ), new TableColumn( "name", "Name", "width=65&icon=player&link=" . urlencode($link_player) ), new TableColumn( "gamename", "Game", "width=30" ) ), "playerId", "name", "playerId", false, 50, "page", "sort", "sortorder", "results", "asc" ); if ($this->game) $andgame = "AND hlstats_Players.game='" . $this->game . "'"; else $andgame = ""; $result = $db->query(" SELECT hlstats_PlayerNames.playerId, hlstats_PlayerNames.name, hlstats_Games.name AS gamename FROM hlstats_PlayerNames LEFT JOIN hlstats_Players ON hlstats_Players.playerId = hlstats_PlayerNames.playerId LEFT JOIN hlstats_Games ON hlstats_Games.code = hlstats_Players.game WHERE hlstats_Games.hidden='0' AND hlstats_PlayerNames.name LIKE '%$sr_query%' $andgame ORDER BY $table->sort $table->sortorder, $table->sort2 $table->sortorder LIMIT $table->startitem,$table->numperpage "); $resultCount = $db->query(" SELECT COUNT(*) FROM hlstats_PlayerNames LEFT JOIN hlstats_Players ON hlstats_Players.playerId = hlstats_PlayerNames.playerId WHERE hlstats_PlayerNames.name LIKE '%$sr_query%' $andgame "); list($numitems) = $db->fetch_row($resultCount); $table->draw($result, $numitems, 90); } elseif ($this->type == "uniqueid") { $table = new Table( array( new TableColumn( "uniqueId", $this->uniqueid_string, "width=15&align=right" ), new TableColumn( "lastName", "Name", "width=50&icon=player&link=" . urlencode($link_player) ), new TableColumn( "gamename", "Game", "width=30" ), new TableColumn( "playerId", "ID", "width=5&align=right" ) ), "playerId", "lastName", "uniqueId", false, 50, "page", "sort", "sortorder", "results", "asc" ); if ($this->game) $andgame = "AND hlstats_PlayerUniqueIds.game='" . $this->game . "'"; else $andgame = ""; $result = $db->query(" SELECT hlstats_PlayerUniqueIds.uniqueId, hlstats_PlayerUniqueIds.playerId, hlstats_Players.lastName, hlstats_Games.name AS gamename FROM hlstats_PlayerUniqueIds LEFT JOIN hlstats_Players ON hlstats_Players.playerId = hlstats_PlayerUniqueIds.playerId LEFT JOIN hlstats_Games ON hlstats_Games.code = hlstats_PlayerUniqueIds.game WHERE hlstats_Games.hidden='0' AND hlstats_PlayerUniqueIds.uniqueId LIKE '%$sr_query%' $andgame ORDER BY $table->sort $table->sortorder, $table->sort2 $table->sortorder LIMIT $table->startitem,$table->numperpage "); $resultCount = $db->query(" SELECT COUNT(*) FROM hlstats_PlayerUniqueIds LEFT JOIN hlstats_Players ON hlstats_Players.playerId = hlstats_PlayerUniqueIds.playerId WHERE hlstats_PlayerUniqueIds.uniqueId LIKE '%$sr_query%' $andgame "); list($numitems) = $db->fetch_row($resultCount); $table->draw($result, $numitems, 90); } elseif ($this->type == "clan") { $table = new Table( array( new TableColumn( "tag", "Tag", "width=15" ), new TableColumn( "name", "Name", "width=50&icon=clan&link=" . urlencode($link_clan) ), new TableColumn( "gamename", "Game", "width=30" ), new TableColumn( "clanId", "ID", "width=5&align=right" ) ), "clanId", "name", "tag", false, 50, "page", "sort", "sortorder", "results", "asc" ); if ($this->game) $andgame = "AND hlstats_Clans.game='" . $this->game . "'"; else $andgame = ""; $result = $db->query(" SELECT hlstats_Clans.clanId, hlstats_Clans.tag, hlstats_Clans.name, hlstats_Games.name AS gamename FROM hlstats_Clans LEFT JOIN hlstats_Games ON hlstats_Games.code = hlstats_Clans.game WHERE hlstats_Games.hidden='0' AND ( hlstats_Clans.tag LIKE '%$sr_query%' OR hlstats_Clans.name LIKE '%$sr_query%' ) $andgame ORDER BY $table->sort $table->sortorder, $table->sort2 $table->sortorder LIMIT $table->startitem,$table->numperpage "); $resultCount = $db->query(" SELECT COUNT(*) FROM hlstats_Clans WHERE ( tag LIKE '%$sr_query%' OR name LIKE '%$sr_query%' ) $andgame "); list($numitems) = $db->fetch_row($resultCount); $table->draw($result, $numitems, 90); } echo "

" . $g_options["font_normal"] . "Search results: $numitems items matching \"" . htmlentities(strip_tags($sr_query), ENT_NOQUOTES, "UTF-8") . "\"." . $g_options["fontend_normal"] . "
"; } } ?>