{if(is_auth())}
	<div class="serv_mon">
		<div class="block bt-n pd-3">
			<img class="w100 b-r-3-3" src="{map_img}" alt="{map_name}">
			<div class="info">
				<font>
					<span>Серв:&nbsp</span>

					{if('{rcon}' == '1' && count($commands) > 0 && is_auth() && is_worthy_specifically("v", {id}))}
						<span class="c-p" data-toggle="modal" data-target="#server-management-modal{id}">
							⚙️
						</span>
					{/if}

					<a class="c-fff" href="steam://connect/{address}">{name}</a>
				</font>
				<br>
				<font class="c-fff"><span>Игра:&nbsp</span> {game}</font><br>
				<font><span>Игроки:&nbsp</span> <a onclick="get_players({id});" class="c-p c-fff" data-toggle="modal" data-target="#server-players-modal{id}">{now}/{max}</a></font><br>
				<font><span>Карта:&nbsp</span> <a class="c-fff">{map_name}</a></font><br>
				<font><span>Адрес:&nbsp</span> <a class="c-fff" href="steam://connect/{address}">{address}</a></font><br>
			</div>
			<center>
				<div class="btn-group w-100" role="group">
					<a type="button" class="btn btn-default w-33" href="../admins?server={id}">Админы</a>
					<a type="button" class="btn btn-default w-33" href="../banlist?server={id}">Баны</a>
					<a type="button" class="btn btn-default w-33" href="../bans/?server={id}">Заявки</a>
				</div>
			</center>
		</div>
	</div>

	<div id="server-players-modal{id}" class="modal fade">
		<div class="modal-dialog modal-lg">
			<div class="modal-content">
				<div class="modal-header">
					<h4 class="modal-title">Игроки</h4>
				</div>
				<div class="modal-body">
					<div class="table-responsive mb-0">
						<table class="table table-bordered">
							<thead>
								<tr>
									<td>#</td>
									<td>Ник</td>
									<td>Убийств</td>
									<td>Время</td>
									{if('{rcon}' == '1' && is_auth() && is_worthy_specifically("s", {id}))}
									<td>Действие</td>
									{/if}
								</tr>
							</thead>
							<tbody id="server-players{id}" class="server_players">
								<tr><td colspan="10"><center><img src="{site_host}templates/{template}/img/loader.gif?v={cache}"></center></td></tr>
							</tbody>
						</table>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">Закрыть</button>
				</div>
			</div>
		</div>
	</div>

	{if('{rcon}' == '1' && count($commands) > 0 && is_auth() && is_worthy_specifically("v", {id}))}
		<div id="server-management-modal{id}" class="modal fade" style="text-align: left">
			<div class="modal-dialog modal-lg">
				<div class="modal-content">
					<div class="modal-header">
						<h4 class="modal-title">Управление сервером</h4>
					</div>
					<div class="modal-body">
						<div class="input-group">
							<span class="input-group-btn">
								<button
										class="btn btn-default"
										type="button"
										onclick='doRconCommandOnServer(
												$("#server-management-command-id{id}").val(),
												$("#server-management-command-id{id} option:selected").attr("data-command-params"),
										{id}
												);'
								>
									Выполнить
								</button>
							</span>
							<span class="input-group-btn w-100">
								<select id="server-management-command-id{id}" class="form-control">
									{for($l = 0; $l < count($commands); $l++)}
										<option value="{{$commands[$l]->id}}" data-command-params='{{$commands[$l]->params}}'>
											{{$commands[$l]->title}}
										</option>
									{/for}
								</select>
							</span>
						</div>

						<pre class="mt-10" id="server-management-command-sending-result{id}" style="display: none"></pre>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">Закрыть</button>
					</div>
				</div>
			</div>
		</div>
	{/if}
{else}
	<tr class="server_line">
		<td>{i}</td>
		<td>{name}</td>
		<td>
			<div class="progress online_line">
				<div class="progress-bar progress-bar-{color}" role="progressbar" style="width: {percentage}%;"></div>
				<div class="players_val">{now}/{max}</div>
			</div>
		</td>
		<td>{map_name}</td>
		<td><a href="steam://connect/{address}">{address}</a></td>
	</tr>
{/if}