<div class="tabbed">
	<div class="clear"></div>
	<ul class="tab-headers">
		{{if !isset( $_GET.sPhrase )}}
			<li><a href="#admins">{{$lang.Admins}}</a></li>
			<li><a href="#admin_actions">{{$lang.Admin_actions}}</a></li>
		{{else}}
			<li><a href="#admin_actions">{{$lang.Admin_actions}}</a></li>
			<li><a href="#admins">{{$lang.Admins}}</a></li>
		{{/if}}
	</ul>
	<h1>{{$lang.Admins}}</h1>
	<div class="tab" id="admins">
		<h2>{{$lang.Admins}}</h2>
		<a href="?p=admins-form" class="new_element">{{$lang.New_admin}}</a>
		<table class="list">
			<thead>
				<tr>
					<th class="id">{{$lang.Id}}</th><th class="name">{{$lang.Firstname_surname}}</th><th class="login">{{$lang.Login}}</th><th class="mail">{{$lang.Email}}</th><th class="actions">{{$lang.Actions}}</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td></td><td class="name"><a href="?p=settings-admin">{{$lang.Main_administrator}}</a></td><td class="login">{{$config.login}}</td><td class="email"></td>
					<td class="actions">
						<a href="?p=settings-admin"><img src="{{$config.dir_templates}}admin/images/ico/edit.png" alt="{{$lang.Edit}}" title="{{$lang.Edit}}" /></a>
					</td>
				</tr>
				{{if count( $aAdmins ) > 0}}
					{{foreach from=$aAdmins item=aAdmin}}
						<tr>
							<td>{{$aAdmin.iAdmin}}</td>
							<td class="name"><a href="?p={{$aActions.f}}-form&amp;iAdmin={{$aAdmin.iAdmin}}">{{$aAdmin.sName}}</a></td>
							<td class="login">{{$aAdmin.sLogin}}</td>
							<td class="mail">{{$aAdmin.sEmail}}</td>
							<td class="actions">
								<a href="?p={{$aActions.f}}-form&amp;iAdmin={{$aAdmin.iAdmin}}"><img src="{{$config.dir_templates}}admin/images/ico/edit.png" alt="{{$lang.Edit}}" title="{{$lang.Edit}}" /></a>
								<a href="?p={{$aActions.f}}-delete&amp;iAdmin={{$aAdmin.iAdmin}}" class="delete" onclick="return del( );"><img src="{{$config.dir_templates}}admin/images/ico/delete.png" alt="{{$lang.Delete}}" title="{{$lang.Delete}}"/></a>  
							</td>
						</tr>
					{{/foreach}}
				{{/if}}
			</tbody>
		</table>
	</div>
	<div class="tab" id="admin_actions">
		{{if $_SESSION.iAdminId != -1}}
			<div class="msg" id="error">
				<img src="{{$config.dir_templates}}admin/images/ico/msg_error.png" class="imgv" alt="" /> {{$lang.Only_main_administrator_access}}
			</div>
		{{else}}
			<div class="filter">
				<form action="" method="get">
					<fieldset>
						<input type="hidden" name="p" value="{{$_GET.p}}" />
						<label for="stats-date-from">{{$lang.Date_from}}</label><input id="stats-date-from" type="text" name="sDateFrom" value="{{$aLogInfo.sDateFrom}}" class="input date" maxlength="10" />
						<label for="stats-date-to">{{$lang.Date_to}}</label><input id="stats-date-to" type="text" name="sDateTo" value="{{$aLogInfo.sDateTo}}" class="input date" maxlength="10" />
						<label>{{$lang.Admin}} <select name="iAdmin"><option value="">{{$lang.Select}}</option><option value="-1" {{if $_GET.iAdmin == -1}}selected="selected"{{/if}}>{{$lang.Main_administrator}}</option>{{foreach from=$aAdmins item=sAdmin}}<option value="{{$sAdmin@key}}" {{if $_GET.iAdmin == $sAdmin@key}}selected="selected"{{/if}}>{{$sAdmin.sLogin}}</option>{{/foreach}}</select></label>
						<label>{{$lang.search}} <input name="sPhrase" type="text" class="input" value="{{$_GET.sPhrase}}" /></label>
						<input type="submit" value="{{$lang.search}} &raquo;" class="submit" />
					</fieldset>
				</form>
			</div>
			{{if !empty( $aAdminActions )}}
				<table class="list">
					{{foreach from=$aAdminActions item=aAction}}
						<tr><td>{{if $aAction.iAdmin == -1}}{{$lang.Main_administrator}}{{else}}{{$aAdmins[$aAction.iAdmin].sLogin}}{{/if}}</td><td>{{date( 'Y-m-d H:i:s', $aAction.iTime )}}</td><td>{{htmlspecialchars( $aAction.sGet )}}</td><td>{{if !empty( $aAction.sPost )}}<a href="#" class="post">POST</a>{{/if}}</td></tr>
						{{if !empty( $aAction.sPost )}}<tr class="post"><td colspan="4">{{htmlspecialchars( $aAction.sPost )}}</td></tr>{{/if}}
					{{/foreach}}
				</table>
			{{/if}}
		{{/if}}
	</div>
	<div class="clear"></div>
</div>