<?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']]);
	}
	
	pjUtil::printNotice(__('infoSubscritionFormTitle', true), __('infoSubscritionFormBody', true));
	?>
	<form action="" method="post" id="frmSubscriptionForm" class="form pj-form">
		<p>
			<label class="title"><?php __('lblSelectAList'); ?></label>
			<span class="inline_block">
				<select name="group_id" id="group_id" class="pj-form-field">
					<option value=""><?php __('lblLetChoose'); ?></option>
					<?php
					foreach ($tpl['group_arr'] as $k => $v)
					{
					    ?><option value="<?php echo $v['id']; ?>"<?php echo isset($_GET['group_id']) ? ($_GET['group_id'] == $v['id'] ? ' selected="selected"' : null) : null;?>><?php echo pjSanitize::html($v['group_title']); ?></option><?php
					}
					?>
				</select>
			</span>
		</p>
		<p>
			<label class="title"><?php __('opt_o_theme'); ?></label>
			<span class="inline_block">
				<select name="theme" id="theme" class="pj-form-field">
					<?php
					$option_themes = pjUtil::sortArrayByArray(__('option_themes', true), array('1', '2', '3', '4', '5', '6', '7', '8', '9', '10'));
					foreach ($option_themes as $k => $v)
					{
						?><option value="<?php echo $k; ?>"<?php $k == $tpl['option_arr']['o_theme'] ? ' selected="selected"' : null ;?>><?php echo $v; ?></option><?php
					}
					?>
				</select>
			</span>
		</p>
		<p>
			<label class="title">&nbsp;</label>
			<span class="inline_block">
				<input type="button" value="<?php __('btnPreviewForm'); ?>" class="pj-button nsPreviewForm"/>
			</span>
		</p>
		<textarea id="install_code" class="pj-form-field textarea_install" style="overflow: auto; height:130px; width:726px;"></textarea>
		<div id="install_clone" style="display:none;">&lt;link href="<?php echo PJ_INSTALL_URL.PJ_FRAMEWORK_LIBS_PATH . 'pj/css/'; ?>pj.bootstrap.min.css" type="text/css" rel="stylesheet" /&gt;
&lt;link href="<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjFront&amp;action=pjActionLoadCss{THEME}" type="text/css" rel="stylesheet" /&gt;
&lt;script type="text/javascript" src="<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjFront&amp;action=pjActionLoadForm{GROUP}{THEME}"&gt;&lt;/script&gt;</div>
	</form>
	<?php
		
}
?>