<table border="0" cellpadding="0" cellspacing="0" width="100%">
	<tr>
		<td style="width: 17px"></td>
		<td>
			<div style="text-align:center"><h2>Ranking for {{ skillName }}{% if vocation is not null %} ({{ vocation }}){% endif %} on {{ config.lua.serverName }}</h2></div><br/>
			<table border="0" cellpadding="4" cellspacing="1" width="100%">
				<tr>
					<td>Filters</td>
					<td>
						<label for="skillFilter">Choose a Skill</label>
						<select onchange="location = this.value;" id="skillFilter">
							{% for link, name in types %}
								<option value="{{ getLink('highscores') }}/{{ link|urlencode }}{% if vocation is not null %}/{{ vocation|lower|urlencode }}{% endif %}" class="size_xs" {% if list is not null and list == link %}selected{% endif %}>{{ name }}</option>
							{% endfor %}
						</select>
					</td>
					<td>
						<label for="vocationFilter">Choose a vocation</label>
						<select onchange="location = this.value;" id="vocationFilter">
							<option value="{{ getLink('highscores') }}/{{ list|urlencode }}" class="size_xs">[ALL]</option>
							{% for i in baseVocations %}
								<option value="{{ getLink('highscores') }}/{{ list|urlencode }}/{{ config.vocations[i]|lower|urlencode }}" class="size_xs" {% if vocationId is not null and vocationId == i %}selected{% endif %}>{{ config.vocations[i]}}</option>
							{% endfor %}
						</select>
					</td>
				</tr>
			</table>
			<table border="0" cellpadding="4" cellspacing="1" width="100%">
				<tr bgcolor="{{ config.vdarkborder }}">
					{% if setting('core.account_country') %}
					<td style="width: 11px" class="white">#</td>
					{% endif %}

					<td style="width: 10%" class="white"><b>Rank</b></td>

					{% if setting('core.highscores_outfit') %}
					<td class="white"><b>Outfit</b></td>
					{% endif %}

					<td width="75%" class="white"><b>Name</b></td>

					<td width="15%" class="white"><b>{{ levelName }}</b></td>

					{% if skill == constant('POT::SKILL__LEVEL') %}
					<td class="white"><b>Points</b></td>
					{% endif %}
				</tr>

				{% if highscores|length < 1 %}
				<tr bgcolor="{{ config('darkborder') }}"><td colspan="100%">No records yet.</td></tr>
				{% else %}
					{% set row = 0 %}
					{% for player in highscores %}
					<tr bgcolor="{{ getStyle(row) }}">
						{% set row = row + 1 %}

						{% if setting('core.account_country') %}
						<td>{{ player.flag|raw }}</td>
						{% endif %}

						<td>{{ player.rank }}.</td>

						{% if setting('core.highscores_outfit') %}
						<td>{{ player.outfit|raw }}</td>
						{% endif %}

						<td>
							<a href="{{ player.link }}">
								<span {% if setting('core.highscores_online_status') %}style="color: {% if player.online > 0 %}green{% else %}red{% endif %}"{% endif %}>{{ player.name }}</span>
							</a>
							{% if setting('core.highscores_vocation') %}
							<br/><small>{{ player.vocation }}</small>
							{% endif %}
						</td>

						<td>
							<div style="text-align:center">{{ player.value }}</div>
						</td>

						{% if skill == constant('POT::SKILL__LEVEL') %}
							<td><div style="text-align:center">{{ player.experience }}</div></td>
						{% endif %}
					</tr>
					{% endfor %}
				{% endif %}
			</table>
			<table border="0" cellpadding="4" cellspacing="1" width="100%">
				{% if linkPreviousPage|length > 0 %}
					<tr><td style="width: 100%" align="right" valign="bottom"><a href="{{ linkPreviousPage }}" class="size_xxs">Previous Page</a></td></tr>
				{% endif %}

				{% if linkNextPage|length > 0 %}
					<tr><td style="width: 100%" align="right" valign="bottom"><a href="{{ linkNextPage }}" class="size_xxs">Next Page</a></td></tr>
				{% endif %}
			</table>
		</td>
		{% if setting('core.highscores_skills_box') or setting('core.highscores_vocation_box') %}
		<td width="5%"></td>
		<td width="15%" valign="top" align="right">
			{% if setting('core.highscores_skills_box') %}
			<table style="border: 0; width: 100%" cellpadding="4" cellspacing="1">
				<tr bgcolor="{{ config.vdarkborder }}">
					<td class="white"><B>Choose a skill</B></TD>
				</tr>
				<tr bgcolor="{{ config.lightborder }}">
					<td>
						{% for link, name in types %}
							<a href="{{ getLink('highscores') }}/{{ link|urlencode }}{% if vocation is not null %}/{{ vocation|urlencode }}{% endif %}" class="size_xs">{{ name }}</a><br/>
						{% endfor %}
					</td>
				</tr>
			</table>
			<br/>
			{% endif %}
			{% if setting('core.highscores_vocation_box') %}
			<table border="0" width="100%" cellpadding="4" cellspacing="1">
				<tr bgcolor="{{ config.vdarkborder }}">
					<td class="white"><b>Choose a vocation</b></td>
				</tr>
				<tr bgcolor="{{ config.lightborder }}">
					<td>
						<a href="{{ getLink('highscores') }}/{{ list|urlencode }}" class="size_xs">[ALL]</a><br/>
						{% for i in baseVocations %}
							<a href="{{ getLink('highscores') }}/{{ list|urlencode }}/{{ config.vocations[i]|lower|urlencode }}" class="size_xs">{{ config.vocations[i]}}</a><br/>
						{% endfor %}
					</td>
				</tr>
			</table>
			{% endif %}
		</td>
		<td style="width: 18px"></td>
		{% endif %}
	</tr>
</table>
