<center><h2>Welcome to guild manager!</h2></center>
Here you can change names of ranks, delete and add ranks, pass leadership to other guild member and delete guild.
<br/><br/>
<table style="clear:both" border="0" cellpadding="0" cellspacing="0" width="100%">
	<tr bgcolor="{{ config.darkborder }}">
		<td width="170">
			<font color="red"><b>Option</b></font>
		</td>
		<td>
			<font color="red"><b>Description</b></font>
		</td>
	</tr>
	<tr bgcolor="{{ config.lightborder }}">
		<td width="170">
			<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=passleadership">Pass Leadership</a></b>
		</td>
		<td>
			<b>Pass leadership of guild to other guild member.</b>
		</td>
	</tr>
	<tr bgcolor="{{ config.darkborder }}">
		<td width="170">
			<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=deleteguild">Delete Guild</a></b>
		</td>
		<td>
			<b>Delete guild, kick all members.</b>
		</td>
	</tr>
	<tr bgcolor="{{ config.lightborder }}">
		<td width="170">
			<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=changedescription">Change Description</a></b>
		</td>
		<td>
			<b>Change description of guild.</b>
		</td>
	</tr>
	{% if constant('MOTD_EXISTS') %}
	<tr bgcolor="{{ config.darkborder }}">
		<td width="170">
			<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=changemotd">Change MOTD</a></b>
		</td>
		<td>
			<b>Change MOTD of guild.</b>
		</td>
	</tr>
	{% endif %}
	<tr bgcolor="{{ config.lightborder }}">
		<td width="170">
			<b><a href="?subtopic=guilds&guild={{ guild.getName() }}&action=changelogo">Change guild logo</a></b>
		</td>
		<td>
			<b>Upload new guild logo.</b>
		</td>
	</tr>
</table>
<br/>
<div class="TableContainer">
	<table class="Table1" cellpadding="0" cellspacing="0">
		<div class="CaptionContainer">
			<div class="CaptionInnerContainer">
				<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
				<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
				<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>        <span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
				<div class="Text" >Add new rank</div>
				<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
				<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>
				<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
				<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
			</div>
		</div>
		<tr>
			<td>
				<div class="InnerTableContainer">
					<table style="width:100%;">
						<tr>
							<td width="120" valign="top">New rank name:</td>
							<td>
								<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=addrank" method="post">
									<input type="text" name="rank_name" size="20"/>
									<input type="submit" value="Add"/>
								</form>
							</td>
						</tr>
					</table>
				</div>
			</td>
		</tr>
	</table>
</div>
<center><h3>Change rank names and levels</h3></center>
<form action="?subtopic=guilds&action=saveranks&guild={{ guild.getName() }}" method="post">
	<table style="clear:both" border="0" cellpadding="0" cellspacing="0" width="100%">
		<tr bgcolor="{{ config.vdarkborder }}">
			<td rowspan="2" width="120" align="center">
				<font color="white"><b>ID/Delete Rank</b></font>
			</td>
			<td rowspan="2" width="300">
				<font color="white"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name</b></font>
			</td>
			<td colspan="3" align="center">
				<font color="white"><b>Level of RANK in guild</b></font>
			</td>
		</tr>
		<tr bgcolor="{{ config.vdarkborder }}">
			<td align="center" bgcolor="red">
				<font color="white"><b>Leader (3)</b></font>
			</td>
			<td align="center" bgcolor="yellow">
				<font color="black"><b>Vice (2)</b></font>
			</td>
			<td align="center" bgcolor="green">
				<font color="white"><b>Member (1)</b></font>
			</td>
		</tr>
		{% set i = 0 %}
		{% for rank in rank_list %}
		<tr bgcolor="{{ getStyle(i) }}">
			<td align="center">{{ rank.getId() }} // <a href="?subtopic=guilds&guild={{ guild.getName() }}&action=deleterank&rankid={{ rank.getId() }}" border="0"><img src="{{ template_path }}/images/news/delete.png" border="0" alt="Delete Rank"></a>
			</td>
			<td>
				<input type="text" name="{{ rank.getId() }}_name" value="{{ rank.getName() }}" size="35"/>
			</td>
			<td align="center">
				<input type="radio" name="{{ rank.getId() }}_level" value="3"
				{% if rank.getLevel() == 3 %} checked="checked"{% endif %}/>
			</td>
			<td align="center">
				<input type="radio" name="{{ rank.getId() }}_level" value="2"
				{% if rank.getLevel() == 2 %} checked="checked"{% endif %}/>
			</td>
			<td align="center">
				<input type="radio" name="{{ rank.getId() }}_level" value="1"
				{% if rank.getLevel() == 1 %} checked="checked"{% endif %}/>
			</td>
		</tr>
			{% set i = i + 1 %}
		{% endfor %}
		<tr bgcolor="{{ config.vdarkborder }}">
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td colspan="3" align="center">
				<input type="submit" value="Save All"/>
			</td>
		</tr>
	</table>
</form>
<h3>Ranks info:</h3>
<b>0. Owner of guild</b> - it's highest rank, only one player in guild may has this rank. Player with this rank can:
<li>Invite/Cancel Invitation/Kick Player from guild</li>
<li>Change ranks of all players in guild</li>
<li>Delete guild or pass leadership to other guild member</li>
<li>Change names, levels (leader, vice, member), add and delete ranks</li>
<li>Change {% if constant('MOTD_EXISTS') %}MOTD, {% endif %}logo and description of guild</li>
<hr/>
<b>1. Leader</b> - it's second rank in guild. Player with this rank can:
<li>Invite/Cancel Invitation/Kick Player from guild (only with lower rank than his)
<li>Change ranks of players with lower rank level ("vice leader", "member") in guild<hr>
<b>2. Vice Leader</b> - it's third rank in guild. Player with this rank can:
<li>Invite/Cancel Invitation
<li>Change ranks of players with lower rank level ("member") in guild<hr>
<b>3. Member</b> - it's lowest rank in guild. Player with this rank can:
<li>Be a member of guild
<br/>
<center>
	<form action="?subtopic=guilds&action=show&guild={{ guild.getName() }}" method="post">
		<div class="BigButton" style="background-image:url({{ template_path }}/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url({{ template_path }}/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="{{ template_path }}/images/buttons/_sbutton_back.gif" ></div>
		</div>
	</form>
</center>