<div class="post">
	<div class="postinfotop">
		<h2>{{ lang['pm:pm'] }}</h2>
	</div>
	<div class="accsection">
		<div class="topwrap">
			<form name="form" method="POST" action="{{ php_self }}?action=delete" style="display: inline;">
			<table class="table table-striped table-bordered">
				<tr align="center">
					<td colspan="5">
						<a href="{{ pm_inbox_link }}">{{ lang['pm:inbox'] }}</a> | <a href="{{ pm_outbox_link }}">{{ lang['pm:outbox'] }}</a> | <a href="{{ pm_set_link }}">{{ lang['pm:set'] }}</a>
					</td>
				</tr>
				{% if max_messages > 0 %}
					<tr>
						<td colspan="5">
							<div class="pm_progress_bar" title="{{ lang.theme.pm_current_messages }}: {{ current_messages }}%"><span style="width: {{ current_messages }}%">{{ current_messages }}%</span></div>
							{{ current_messages }}% / ({{ max_messages }} {{ lang.theme.pm_max_messages }})
						</td>
					</tr>
				{% endif %}
				<tr align="center">
					<td width="20%">{{ lang['pm:date'] }}</td>
					<td width="40%">{{ lang['pm:subject'] }}</td>
					<td width="25%">{{ lang['pm:from'] }}</td>
					<td width="10%">{{ lang['pm:state'] }}</td>
					<td width="5%"><input type="checkbox" name="master_box" title="{{ lang['pm:checkall'] }}" onclick="javascript:check_uncheck_all(form)"></td>
				</tr>
				{% for entry in entries %}
					<tr align="center">
						<td>{{ entry.pmdate|date('Y-m-d H:i') }}</td>
						<td><a href="{{ php_self }}?action=read&pmid={{ entry.pmid }}&location=inbox">{{ entry.subject }}</a></td>
						<td>{{ entry.link }}</td>
						<td>{% if (entry.viewed == 1) %}<i class="fa fa-folder-open"></i>{% else %}<i class="fa fa-folder"></i>{% endif %}</td>
						<td><input name="selected_pm[]" value="{{ entry.pmid }}" type="checkbox"/></td>
					</tr>
				{% endfor %}
			</table>
			{% if pagination %}
				<ul class="paginationforum">
					{{ pagination }}
				</ul>
				<div class="clearfix"></div>
			{% endif %}
			<div class="postinfobot">
				<div class="pull-right">
					<div class="pull-left">
						<button class="btn btn-danger" type="submit">{{ lang['pm:delete'] }}</button></form>
						<form name="pm" method="POST" action="{{ php_self }}?action=write" style="display: inline;">
							<button class="btn btn-primary" type="submit">{{ lang['pm:write'] }}</button>
						</form>
					</div>
					<div class="clearfix"></div>
				</div>
				<div class="clearfix"></div>
			</div>
		</div>
	</div>
</div>