<?php
if (isset($tpl['status']))
{
	$status = __('status', true);
	switch ($tpl['status'])
	{
		case 2:
			pjUtil::printNotice(NULL, $status[2]);
			break;
	}
} else {
	if (isset($_GET['err']))
	{
		$titles = __('error_titles', true);
		$bodies = __('error_bodies', true);
		$bodies_text = str_replace("{SIZE}", ini_get('post_max_size'), @$bodies[$_GET['err']]);
		pjUtil::printNotice(@$titles[$_GET['err']], $bodies_text);
	}
	$filter = __('filter', true, false);
	
	pjUtil::printNotice(__('infoMassEmailTitle', true, false), __('infoMassEmailDesc', true, false) . '<br/><br/><label>{Name}</label><label>{Email}</label>', false);
	?>
	<form action="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminEmails&amp;action=pjActionIndex" method="post" id="frmSendEmail" class="form pj-form" autocomplete="off">
		<input type="hidden" name="send_email" value="1" />
		
		<p>
			<label class="title"><?php __('lblSendTo'); ?></label>
			<span class="block float_left">
				<label class="block t5"><input type="checkbox" name="confirmed" value="1" class="pjNcbSendTo block float_left r5"/><?php __('lblClientsConfirmed');?></label>
				<label class="block t5"><input type="checkbox" name="pending" value="1" class="pjNcbSendTo block float_left r5"/><?php __('lblClientsPending');?></label>
				<label class="block t5"><input type="checkbox" name="cancelled" value="1" class="pjNcbSendTo block float_left r5"/><?php __('lblClientsCancelled');?></label>
				<label class="block t5"><input type="checkbox" name="admin" value="1" class="pjNcbSendTo block float_left r5"/><?php __('lblAdministrator');?></label>
			</span>
		</p>
		<p>
			<label class="title"><?php __('lblTotalClients'); ?></label>
			<span class="block">
				<label id="pjNcbTotalClients" class="block t5">0</label>
				<input type="hidden" name="total_clients" value="" class="required" data-msg-required="<?php __('lblValueGreaterThan0');?>"/>
			</span>
		</p>
		<p>
			<label class="title"><?php __('lblEmailSubject'); ?></label>
			<span class="inline_block">
				<input type="text" name="subject" id="subject" class="pj-form-field required w400" data-msg-required="<?php __('pj_field_required');?>"/>
			</span>
		</p>
		<p>
			<label class="title"><?php __('lblEmailMessage'); ?></label>
			<span class="inline_block">
				<textarea id="message" name="message" class="pj-form-field required mceEditor" style="height: 300px;" data-msg-required="<?php __('pj_field_required');?>"></textarea>
			</span>
		</p>
		<p>
			<label class="title">&nbsp;</label>
			<input type="submit" value="<?php __('btnSend', false, true); ?>" class="pj-button" />
		</p>
	</form>
	<script type="text/javascript">
	var myLabel = myLabel || {};
	</script>
	<?php
}
?>