<form class="standard" id="member_page_edit" action="<?php echo $tpl['current_url_pageless']; ?>" method="post" autocomplete="off">
	<h3 class="icon"><?php echo __('Options'); ?></h3>

<?php include(__DIR__ . '/report.tpl.php'); ?>

	<p class="field">
		<label for="lang"><?php echo __('Langue :'); ?></label>
		<select autofocus name="lang" id="lang">
<?php foreach ($tpl['langs'] as $i) : ?>
			<option<?php if ($i['selected']) : ?> selected<?php endif; ?> value="<?php echo $i['code']; ?>"><?php echo $i['code']; ?> - <?php echo $i['name']; ?></option>
<?php endforeach; ?>
		</select>
	</p>
	<p class="field">
		<label for="tz"><?php echo __('Fuseau horaire :'); ?></label>
		<select name="tz" id="tz">
<?php foreach ($tpl['tz_identifiers'] as $region => $list) : ?>
			<optgroup label="<?php echo $region; ?>">
<?php foreach ($list as $i) : ?>
				<option<?php if ($i == $tpl['user']['tz']) : ?> selected<?php endif; ?> value="<?php echo $i; ?>"><?php echo str_replace('_', ' ', $i); ?></option>
<?php endforeach; ?>
			</optgroup>
<?php endforeach; ?>
		</select>
	</p>
	<p class="field"><?php echo __('Notification par courriel pour :'); ?></p>
	<div class="field_sublvl">
<?php if ($tpl['config']('users_registration') && $tpl['member']['admin']) : ?>
		<p class="field">
			<input name="notification[_checkboxes][]" type="hidden" value="0">
			<input<?php if ($tpl['profile']['notification'][0]) : ?> checked<?php endif; ?> type="checkbox" name="notification[0]" id="notification_registration">
			<label for="notification_registration"><?php echo __('Inscriptions'); ?></label>
		</p>
<?php endif; ?>
<?php if ($tpl['config']('comments')) : ?>
<?php if ($tpl['member']['admin']) : ?>
		<p class="field">
			<input name="notification[_checkboxes][]" type="hidden" value="1">
			<input<?php if ($tpl['profile']['notification'][1]) : ?> checked<?php endif; ?> type="checkbox" name="notification[1]" id="notification_comments">
			<label for="notification_comments"><?php echo __('Nouveaux commentaires'); ?></label>
		</p>
		<p class="field">
			<input name="notification[_checkboxes][]" type="hidden" value="2">
			<input<?php if ($tpl['profile']['notification'][2]) : ?> checked<?php endif; ?> type="checkbox" name="notification[2]" id="notification_comments_pending">
			<label for="notification_comments_pending"><?php echo __('Commentaires en attente de validation'); ?></label>
		</p>
<?php endif; ?>
		<p class="field">
			<input name="notification[_checkboxes][]" type="hidden" value="5">
			<input<?php if ($tpl['profile']['notification'][5]) : ?> checked<?php endif; ?> type="checkbox" name="notification[5]" id="notification_comments_follow">
			<label for="notification_comments_follow"><?php echo __('Nouveaux commentaires sur les photos ou vidéos où j\'ai posté'); ?></label>
		</p>
<?php endif; ?>
		<p class="field">
			<input name="notification[_checkboxes][]" type="hidden" value="3">
			<input<?php if ($tpl['profile']['notification'][3]) : ?> checked<?php endif; ?> type="checkbox" name="notification[3]" id="notification_items">
			<label for="notification_items"><?php echo __('Nouvelles photos ou vidéos'); ?></label>
		</p>
<?php if ($tpl['member']['admin']) : ?>
		<p class="field">
			<input name="notification[_checkboxes][]" type="hidden" value="4">
			<input<?php if ($tpl['profile']['notification'][4]) : ?> checked<?php endif; ?> type="checkbox" name="notification[4]" id="notification_items_pending">
			<label for="notification_items_pending"><?php echo __('Photos ou vidéos en attente de validation'); ?></label>
		</p>
<?php endif; ?>
	</div>
	<br>
	<p id="submit">
		<input name="anticsrf" type="hidden" value="<?php echo $tpl['anticsrf'](); ?>">
		<input class="button" name="edit" type="submit" value="<?php echo __('Enregistrer'); ?>">
	</p>
</form>