<?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);
		pjUtil::printNotice(@$titles[$_GET['err']], @$bodies[$_GET['err']]);
	}
	include_once PJ_VIEWS_PATH . 'pjLayouts/elements/optmenu.php';
	?>
	<form id="frmNotification" name="frmNotification" action="<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjAdminOptions&amp;action=pjActionUpdate" method="post" class="pj-form form">
		<input type="hidden" name="options_update" value="1" />
		<input type="hidden" name="next_action" value="pjActionNotifications" />
		
		<div id="tabs">
			<ul>
				<li><a href="#tabs-1"><?php __('tabToUsers'); ?></a></li>
				<li><a href="#tabs-2"><?php __('tabToAdministrators'); ?></a></li>
			</ul>
			<div id="tabs-1">	
				<?php pjUtil::printNotice(__('infoUsersEmailTitle', true), __('infoUsersEmailDesc', true), false); ?>
				<fieldset class="fieldset white">
					<legend><?php __('lblNewAccountConfirmation'); ?></legend>
					<p>
						<label class="title"><?php __('lblSubject'); ?></label>
						<input type="text" name="value-string-o_email_register_subject" class="pj-form-field w500" value="<?php echo htmlspecialchars(stripslashes($tpl['o_arr']['o_email_register_subject'])); ?>" />
					</p>
					<p>
						<label class="title"><?php __('lblMessage'); ?><br/><br/><?php echo nl2br(__('lblRegistrationTokens', true))?></label>
						<span class="inline_block">
							<textarea name="value-text-o_email_register_message" class="pj-form-field mceEditor"><?php echo stripslashes($tpl['o_arr']['o_email_register_message']); ?></textarea>
						</span>
					</p>
					<p>
						<label class="title">&nbsp;</label>
						<input type="submit" value="<?php __('btnSave'); ?>" class="pj-button" />
					</p>
				</fieldset>
				<fieldset class="fieldset white">
					<legend><?php __('lblForgotPasswordNotifiation'); ?></legend>
					<p>
						<label class="title"><?php __('lblSubject'); ?></label>
						<input type="text" name="value-string-o_email_forgot_subject" class="pj-form-field w500" value="<?php echo htmlspecialchars(stripslashes($tpl['o_arr']['o_email_forgot_subject'])); ?>" />
					</p>
					<p>
						<label class="title"><?php __('lblMessage'); ?><br/><br/><?php echo nl2br(__('lblPasswordTokens', true))?></label>
						<span class="inline_block">
							<textarea name="value-text-o_email_forgot_message" class="pj-form-field mceEditor"><?php echo stripslashes($tpl['o_arr']['o_email_forgot_message']); ?></textarea>
						</span>
					</p>
					<p>
						<label class="title">&nbsp;</label>
						<input type="submit" value="<?php __('btnSave'); ?>" class="pj-button" />
					</p>
				</fieldset>
			</div><!-- tab-1 -->
			<div id="tabs-2">
				<?php pjUtil::printNotice(__('infoAdminsEmailTitle', true), __('infoAdminsEmailDesc', true), false); ?>
				<fieldset class="fieldset white">
					<legend><?php __('lblNewAccountNotification'); ?></legend>
					<p>
						<label class="title"><?php __('lblSubject'); ?></label>
						<input type="text" name="value-string-o_admin_email_register_subject" class="pj-form-field w500" value="<?php echo htmlspecialchars(stripslashes($tpl['o_arr']['o_admin_email_register_subject'])); ?>" />
					</p>
					<p>
						<label class="title"><?php __('lblMessage'); ?><br/><br/><?php echo nl2br(__('lblRegistrationTokens', true))?></label>
						<span class="inline_block">
							<textarea name="value-text-o_admin_email_register_message" class="pj-form-field mceEditor"><?php echo stripslashes($tpl['o_arr']['o_admin_email_register_message']); ?></textarea>
						</span>
					</p>
					<p>
						<label class="title">&nbsp;</label>
						<input type="submit" value="<?php __('btnSave'); ?>" class="pj-button" />
					</p>
				</fieldset>
				<fieldset class="fieldset white">
					<legend><?php __('lblQuestionApprovalNotifiation'); ?></legend>
					<p>
						<label class="title"><?php __('lblSubject'); ?></label>
						<input type="text" name="value-string-o_admin_email_question_approval_subject" class="pj-form-field w500" value="<?php echo htmlspecialchars(stripslashes($tpl['o_arr']['o_admin_email_question_approval_subject'])); ?>" />
					</p>
					<p>
						<label class="title"><?php __('lblMessage'); ?><br/><br/><?php echo nl2br(__('lblQuestionApprovalTokens', true))?></label>
						<span class="inline_block">
							<textarea name="value-text-o_admin_email_question_approval_message" class="pj-form-field mceEditor"><?php echo stripslashes($tpl['o_arr']['o_admin_email_question_approval_message']); ?></textarea>
						</span>
					</p>
					<p>
						<label class="title">&nbsp;</label>
						<input type="submit" value="<?php __('btnSave'); ?>" class="pj-button" />
					</p>
				</fieldset>
				<fieldset class="fieldset white">
					<legend><?php __('lblReplyApprovalSubject'); ?></legend>
					<p>
						<label class="title"><?php __('lblSubject'); ?></label>
						<input type="text" name="value-string-o_admin_email_reply_approval_subject" class="pj-form-field w500" value="<?php echo htmlspecialchars(stripslashes($tpl['o_arr']['o_admin_email_reply_approval_subject'])); ?>" />
					</p>
					<p>
						<label class="title"><?php __('lblMessage'); ?><br/><br/><?php echo nl2br(__('lblReplyApprovalTokens', true))?></label>
						<span class="inline_block">
							<textarea name="value-text-o_admin_email_reply_approval_message" class="pj-form-field mceEditor"><?php echo stripslashes($tpl['o_arr']['o_admin_email_reply_approval_message']); ?></textarea>
						</span>
					</p>
					<p>
						<label class="title">&nbsp;</label>
						<input type="submit" value="<?php __('btnSave'); ?>" class="pj-button" />
					</p>
				</fieldset>
				<fieldset class="fieldset white">
					<legend><?php __('lblReportEmail'); ?></legend>
					<p>
						<label class="title"><?php __('lblSubject'); ?></label>
						<input type="text" name="value-string-o_admin_email_report_subject" class="pj-form-field w500" value="<?php echo htmlspecialchars(stripslashes($tpl['o_arr']['o_admin_email_report_subject'])); ?>" />
					</p>
					<p>
						<label class="title"><?php __('lblMessage'); ?><br/><br/><?php echo nl2br(__('lblReplyReportTokens', true))?></label>
						<span class="inline_block">
							<textarea name="value-text-o_admin_email_report_message" class="pj-form-field mceEditor"><?php echo stripslashes($tpl['o_arr']['o_admin_email_report_message']); ?></textarea>
						</span>
					</p>
					<p>
						<label class="title">&nbsp;</label>
						<input type="submit" value="<?php __('btnSave'); ?>" class="pj-button" />
					</p>
				</fieldset>
			</div>
		</div>
	</form>
	<?php
}
?>