{{/*### Include=clanmembers.html */}} {{ define "tpl" }}
{{ if .ClanID }} {{ $gqm := .Gin.Query "mode" }} {{ $global := . }} {{ $favouritemode := $gqm }} {{ range (.Get "clans?id=%d" .ClanID).clans }}
{{ if .icon }}
icon
{{ end }}

{{ $global.T "%s" .name | html }}

{{ $global.T "(%s)" (.tag | htmlescaper) | html }}
{{ $global.T "%s" (.description | htmlescaper) | html }} {{ end }}

{{ with (.Get "clans/stats?id=%d&m=%d" .ClanID (.Gin.Query "mode"))}} {{end}} {{ range (.Get "clans?id=%d" .ClanID).clans }}
{{ $global.T "Global Rank" }} #{{ humanize .rank }}
{{ $global.T "PP" }} {{ humanize .chosen_mode.pp }}
{{ $global.T "Ranked Score" }} {{ humanize .chosen_mode.ranked_score }}
{{ $global.T "Total Score" }} {{ humanize .chosen_mode.total_score }}
{{ $global.T "Total Playcount" }} {{ humanize .chosen_mode.playcount }}
{{ $global.T "Total Replays Watched" }} {{ humanize .chosen_mode.replays_watched }}
{{ $global.T "Total Hits" }} {{ humanize .chosen_mode.total_hits }}
{{ end }}
{{ if $global.Context.User.ID }} {{ $d := qb "SELECT user, clan, perms FROM user_clans WHERE user = ? LIMIT 1" .Context.User.ID }} {{ $p := qb "SELECT user, clan, perms FROM user_clans WHERE user = ? AND perms = 8 LIMIT 1" .Context.User.ID }} {{ $tc := qb "SELECT user, clan, perms FROM user_clans WHERE user = ? AND clan = ? LIMIT 1" .Context.User.ID .ClanID }} {{ $uc := or $d.clan.Int -1 }} {{ if $d }} {{ if $tc }} {{ if $p }}
{{ ieForm .Gin }}
{{ else }}
{{ ieForm .Gin }}
{{ end }} {{ else }} {{end}} {{ else }} {{ end }} {{ else }} {{ end }}

{{ .T "Clan Owner" }}

{{ .T "The leader of the clan." }}

{{ template "clan_members" (.Get "clans/members?id=%d&r=%d" .ClanID 8) }}

{{ .T "Members" }}

{{ .T "The members of the clan." }}

{{ template "clan_members" (.Get "clans/members?id=%d&r=%d" .ClanID 1) }}
{{ end }}
{{ end }}