<?php
if (isset($tpl['status']))
{
	$status = __('status', true);
	switch ($tpl['status'])
	{
		case 2:
			pjUtil::printNotice(NULL, $status[2]);
			break;
	}
} else {
	$desc = __('infoAddFloorplanDesc', true);
	$desc = str_replace("{MAXSIZE}", ini_get('post_max_size'), __('infoAddFloorplanDesc', true));
	pjUtil::printNotice(__('infoAddFloorplanTitle', true), $desc);
	?>
	
	<form action="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminFloorplans&amp;action=pjActionCreate" method="post" id="frmCreateFloorplan" class="pj-form form" autocomplete="off" enctype="multipart/form-data">
		<input type="hidden" name="floorplan_create" value="1" />
		
		<div class="clear_both">
			<p>
				<label class="title"><?php __('lblTitle'); ?></label>
				<span class="inline_block">
					<input type="text" name="title" id="title" class="pj-form-field w250 required" data-msg-required="<?php __('lblFieldRequired');?>"/>
				</span>
			</p>
			<p>
				<label class="title"><?php __('lblFloorplan'); ?></label>
				<span class="inline_block">
					<input type="file" name="image" id="image" class="pj-form-field w250 required" data-msg-required="<?php __('lblFieldRequired');?>"/>
				</span>
			</p>
			<p>
				<label class="title"><?php __('lblStatus'); ?></label>
				<span class="inline_block">
					<select name="status" id="status" class="pj-form-field required" data-msg-required="<?php __('lblFieldRequired');?>">
						<option value="">-- <?php __('lblChoose'); ?>--</option>
						<?php
						foreach (__('u_statarr', true) as $k => $v)
						{
							?><option value="<?php echo $k; ?>"<?php echo $k == 'T' ? ' selected="selected"' : NULL;?>><?php echo $v; ?></option><?php
						}
						?>
					</select>
				</span>
			</p>
			<p>
				<label class="title">&nbsp;</label>
				<input type="submit" value="<?php __('btnSave'); ?>" class="pj-button" />
				<input type="button" value="<?php __('btnCancel'); ?>" class="pj-button" onclick="window.location.href='<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjAdminFloorplans&action=pjActionIndex';" />
			</p>
		</div>
	</form>
	<?php
}
?>