<form name="form" method="POST" action="{{ php_self }}?action=delete" style="display: inline;">
<div class="pm-page">
	<header class="sub-title"><h1>{{ lang['pm:pm'] }}</h1></header>
	<ul class="pm-menu">
		<li><a href="{{ pm_inbox_link }}">{{ lang['pm:inbox'] }}</a></li>
		<li><a href="{{ pm_outbox_link }}">{{ lang['pm:outbox'] }}</a></li>
		<li><a href="{{ pm_set_link }}">{{ lang['pm:set'] }}</a></li>
	</ul>
	{% if max_messages > 0 %}
		<div class="pm_progress_bar" title="{{ lang.theme.pm_current_messages }}: {{ current_messages }}%"><span style="width: {{ current_messages }}%">{{ current_messages }}%</span></div>
		<div>{{ current_messages }}% / ({{ max_messages }} {{ lang.theme.pm_max_messages }})</div>
	{% endif %}
	<div class="table-resp">
		<table class="pm" width="100%">
			<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) %}<img src="/engine/plugins/pm/img/viewed.yes.gif" />{% else %}<img src="/engine/plugins/pm/img/viewed.no.gif" />{% endif %}</td>
					<td><input name="selected_pm[]" value="{{ entry.pmid }}" type="checkbox"/></td>
				</tr>
			{% endfor %}
		</table>
	</div>
	{% if pagination %}
		<div class="bottom-nav clr ignore-select">
			<div class="pagi-nav clearfix">
				<span class="pprev"></span>
				<span class="navigation">{{ pagination }}</span>
				<span class="pnext"></span>
			</div>
		</div>
	{% endif %}
	<div class="form-submit" {% if not pagination %}style="margin-top: 10px;"{% endif %}>
		<button type="submit">{{ lang['pm:delete'] }}</button></form>
		<form name="pm" method="POST" action="{{ php_self }}?action=write" style="display: inline;">
			<button type="submit">{{ lang['pm:write'] }}</button>
		</form>
	</div>
</div>