<!-- INCLUDE ucp_header.html -->

<!-- IF not PROMPT -->
	<!-- INCLUDE ucp_pm_message_header.html -->
<!-- ENDIF -->

<!-- IF PROMPT -->
	<h2>{L_EXPORT_AS_CSV}</h2>
	<form id="viewfolder" method="post" action="{S_PM_ACTION}">
	<div class="panel">
		<div class="inner">
		<h3>{L_OPTIONS}</h3>
		<fieldset>
			<dl>
				<dt><label for="delimiter">{L_DELIMITER}{L_COLON}</label></dt>
				<dd><input class="inputbox" type="text" id="delimiter" name="delimiter" value="," /></dd>
			</dl>
			<dl>
				<dt><label for="enclosure">{L_ENCLOSURE}{L_COLON}</label></dt>
				<dd><input class="inputbox" type="text" id="enclosure" name="enclosure" value="&#034;" /></dd>
			</dl>
		</fieldset>
		</div>
	</div>
	<fieldset class="submit-buttons">
		<input type="hidden" name="export_option" value="CSV" />
		<input class="button1 button button-form" type="submit" name="submit_export" value="{L_EXPORT_FOLDER}" />&nbsp;
		<input class="button1 button button-form-bold" type="reset" value="{L_RESET}" name="reset" />&nbsp;
		{S_FORM_TOKEN}
	</fieldset>
	</form>

<!-- ELSE -->

	<!-- IF NUM_REMOVED -->
		<div class="notice">
			<p>{RULE_REMOVED_MESSAGES}</p>
		</div>
	<!-- ENDIF -->

	<!-- IF NUM_NOT_MOVED -->
		<div class="notice">
			<p>{NOT_MOVED_MESSAGES}<br />{RELEASE_MESSAGE_INFO}</p>
		</div>
	<!-- ENDIF -->

	<!-- IF .messagerow -->
		<ul class="topiclist two-columns">
			<li class="header">
				<dl>
					<dt><div class="list-inner">{L_MESSAGE}</div></dt>
					<dd class="mark">{L_MARK}</dd>
				</dl>
			</li>
		</ul>
		<ul class="topiclist cplist pmlist responsive-show-all <!-- IF S_SHOW_RECIPIENTS -->missing-column<!-- ELSE -->two-columns<!-- ENDIF -->">

		<!-- BEGIN messagerow -->
			<li class="row<!-- IF messagerow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF messagerow.PM_CLASS --> {messagerow.PM_CLASS}<!-- ENDIF -->">
				<dl class="row-item">
					<dt>
						<a class="row-item-link{% if messagerow.S_PM_UNREAD %} unread{% else %} read{% endif %}" href="{messagerow.U_VIEW_PM}">
							{{ Icon('svg', 'comment-text-outline', '', true, 'c-forum-row-icon') }}
						</a>
						{% if messagerow.PM_ICON_URL and S_PM_ICONS %}
							<img class="row-item-sub" src="{messagerow.PM_ICON_URL}" alt="">
						{% endif %}
						<div class="list-inner">

						<!-- IF messagerow.S_PM_DELETED -->
							<a href="{messagerow.U_REMOVE_PM}" class="topictitle">{L_DELETE_MESSAGE}</a><br />
							<span class="error">{L_MESSAGE_REMOVED_FROM_OUTBOX}</span>
						<!-- ELSE -->
							<a href="{messagerow.U_VIEW_PM}" class="topictitle">{messagerow.SUBJECT}</a>
						<!-- ENDIF -->
						<!-- IF messagerow.S_AUTHOR_DELETED -->
							<br /><em class="small">{L_PM_FROM_REMOVED_AUTHOR}</em>
						<!-- ENDIF -->
						<!-- IF messagerow.S_PM_REPORTED -->
							<a href="{messagerow.U_MCP_REPORT}">
								{{ Icon('font', 'triangle-exclamation', PM_REPORTED, true, 'fas c-topic-reported-icon') }}
							</a>
						<!-- ENDIF --> <!-- IF messagerow.ATTACH_ICON_IMG -->{{ Icon('font', 'paperclip', '', true) }} <!-- ENDIF --><br />
						<!-- IF S_SHOW_RECIPIENTS -->{L_MESSAGE_TO} {messagerow.RECIPIENTS}<!-- ELSE -->{L_MESSAGE_BY_AUTHOR} {messagerow.MESSAGE_AUTHOR_FULL} &raquo; {messagerow.SENT_TIME}<!-- ENDIF -->

						</div>
					</dt>
					<!-- IF S_SHOW_RECIPIENTS --><dd class="info"><span>{L_SENT_AT}{L_COLON} {messagerow.SENT_TIME}</span></dd><!-- ENDIF -->
					<!-- IF S_UNREAD --><dd class="info"><!-- IF messagerow.FOLDER --><a href="{messagerow.U_FOLDER}">{messagerow.FOLDER}</a><!-- ELSE -->{L_UNKNOWN_FOLDER}<!-- ENDIF --></dd><!-- ENDIF -->
					<dd class="mark"><input type="checkbox" name="marked_msg_id[]" value="{messagerow.MESSAGE_ID}" /></dd>
				</dl>
			</li>
		<!-- END messagerow -->

		</ul>
	<!-- ELSE -->
		<p><strong>
			<!-- IF S_COMPOSE_PM_VIEW and S_NO_AUTH_SEND_MESSAGE -->
				<!-- IF S_USER_NEW -->{L_USER_NEW_PERMISSION_DISALLOWED}<!-- ELSE -->{L_NO_AUTH_SEND_MESSAGE}<!-- ENDIF -->
			<!-- ELSE -->
				{L_NO_MESSAGES}
			<!-- ENDIF -->
		</strong></p>
	<!-- ENDIF -->

	<!-- IF FOLDER_CUR_MESSAGES neq 0 -->
		<fieldset class="display-actions">
			<div class="left-box"><label for="export_option">{L_EXPORT_FOLDER}{L_COLON} <select name="export_option" id="export_option"><option value="CSV">{L_EXPORT_AS_CSV}</option><option value="CSV_EXCEL">{L_EXPORT_AS_CSV_EXCEL}</option><option value="XML">{L_EXPORT_AS_XML}</option></select></label> <input class="button1 button button-form-bold" type="submit" name="submit_export" value="{L_GO}" /><br /></div>
			<select name="mark_option">{S_MARK_OPTIONS}{S_MOVE_MARKED_OPTIONS}</select> <input class="button1 button button-form-bold" type="submit" name="submit_mark" value="{L_GO}" />
			<div><a href="#" onclick="marklist('viewfolder', 'marked_msg', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('viewfolder', 'marked_msg', false); return false;">{L_UNMARK_ALL}</a></div>
		</fieldset>

		<hr />

		<div class="action-bar bottom">
			<!-- INCLUDE display_options.html -->
			<input type="hidden" name="cur_folder_id" value="{CUR_FOLDER_ID}" />

			<div class="pagination">
				{TOTAL_MESSAGES}
				<!-- IF .pagination -->
					<!-- INCLUDE pagination.html -->
				<!-- ELSE -->
					 &bull; {PAGE_NUMBER}
				<!-- ENDIF -->
			</div>
		</div>
	<!-- ENDIF -->

		</div>
	</div>

	<!-- INCLUDE ucp_pm_message_footer.html -->
<!-- ENDIF -->
<!-- INCLUDE ucp_footer.html -->
