<?php include_once APP_PATH.'admin/template/header.php';?>

<section>

<div class="content-border">

<?php if ($errors) { ?>

<div class="status-failure"><?php echo $errors["e"].$errors["e1"].$errors["e2"].$errors["e3"];?></div>

<?php } ?>

<form class="jak_form" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
<table class="table">
<tr>
<td class="content-title" colspan="2"><?php echo $tl["menu"]["m9"];?></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["general"]["g45"];?></td>
	<td><select name="jak_catid" size="1">
	<option value="0"<?php if ($JAK_FORM_DATA["catid"] == '0') { ?> selected="selected"<?php } ?>><?php echo $tl["general"]["g45"];?></option>
	<?php if (isset($JAK_CAT) && is_array($JAK_CAT)) foreach($JAK_CAT as $z) { ?><option value="<?php echo $z["id"];?>" <?php if ($z["id"] == $JAK_FORM_DATA["catid"]) { ?>selected="selected"<?php } ?>><?php echo $z["name"];?></option><?php } ?>
	</select></td>
</tr>
</table>
<table class="table">
<tr>
<td class="content-title" colspan="2"><?php echo $tl["general"]["g49"];?></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["general"]["g9"];?></td>
	<td><input class="inputbig<?php if ($errors["e1"]) { echo ' error'; } ?>" type="text" name="jak_title" value="<?php echo $JAK_FORM_DATA["title"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["general"]["g121"];?></td>
	<td><input type="radio" name="jak_showhome" value="1"<?php if ($JAK_FORM_DATA["product_home"] == '1') { ?> checked="checked"<?php } ?> /> <?php echo $tl["general"]["g19"];?> <input type="radio" name="jak_showhome" value="0"<?php if ($JAK_FORM_DATA["product_home"] == '0') { ?> checked="checked"<?php } ?> /> <?php echo $tl["general"]["g18"];?></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["general"]["g8"];?></td>
	<td><input type="radio" name="jak_showdate" value="1"<?php if ($JAK_FORM_DATA["showdate"] == '1') { ?> checked="checked"<?php } ?> /> <?php echo $tl["general"]["g19"];?> <input type="radio" name="jak_showdate" value="0"<?php if ($JAK_FORM_DATA["showdate"] == '0') { ?> checked="checked"<?php } ?> /> <?php echo $tl["general"]["g18"];?></td>
</tr>
<tr>
	<td valign="top" class="go"><?php echo $tl["general"]["g87"];?></td>
	<td><input type="text" name="jak_img" id="jak_img" class="inputbig" value="<?php echo $JAK_FORM_DATA["previmg"];?>" />
	<a href="js/editor/plugins/filemanager/dialog.php?type=1&subfolder=&editor=mce_0&lang=eng&fldr=&field_id=jak_img" class="ifManager"><?php echo $tl["general"]["g69"];?></a>
	</td>
</tr>
<tr>
	<td valign="top" class="go"><?php echo $tl["general"]["g87"];?></td>
	<td><input type="text" name="jak_mimg" id="jak_mimg" class="inputbig" value="<?php echo $JAK_FORM_DATA["img"];?>" />
	<a href="js/editor/plugins/filemanager/dialog.php?type=1&subfolder=&editor=mce_0&lang=eng&fldr=&field_id=jak_mimg" class="ifManager"><?php echo $tl["general"]["g69"];?></a>
	</td>
</tr>
<tr>
	<td valign="top" class="go"><?php echo $tl["shop"]["m9"];?></td>
	<td><input type="text" name="jak_file" id="jak_file" class="inputbig" value="<?php echo $JAK_FORM_DATA["digital_file"];?>" />
	<a href="js/editor/plugins/filemanager/dialog.php?type=2&subfolder=&editor=mce_0&lang=eng&fldr=&field_id=jak_file" class="ifManager"><?php echo $tl["general"]["g69"];?></a>
	</td>
</tr>
<tr>
	<td class="go"><?php echo $tl["general"]["g104"];?></td>
	<td><input type="checkbox" name="jak_update_time" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["general"]["g100"];?></td>
	<td><input type="checkbox" name="jak_delete_hits" /></td>
</tr>
</table>

<table class="table">
<tr>
<td class="content-title" colspan="2"><?php echo $tl["shop"]["m14"];?></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["m15"];?></td>
	<td><input<?php if ($errors["e2"]) { ?> class="error"<?php } ?> type="text" name="jak_price" value="<?php echo $JAK_FORM_DATA["price"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["m46"];?></td>
	<td><input type="text" name="jak_sale" value="<?php echo $JAK_FORM_DATA["sale"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["m10"];?></td>
	<td><input type="text" name="jak_weight" value="<?php echo $JAK_FORM_DATA["product_weight"];?>" /> <?php echo $tl["shop"]["m70"];?></td>
</tr>
<?php if (JAK_SHOPQUANTITY) { ?>
<tr>
	<td class="go"><?php echo $tl["shop"]["m94"];?></td>
	<td><input type="text" name="jak_stock" value="<?php echo $JAK_FORM_DATA["stock"];?>" /></td>
</tr>
<?php } else { ?>
<tr>
	<td class="go"><?php echo $tl["shop"]["m43"];?></td>
	<td><input type="radio" name="jak_stock" value="1"<?php if ($JAK_FORM_DATA["stock"] == 1) echo ' checked="checked"';?> /> <?php echo $tl["general"]["g19"];?> <input type="radio" name="jak_stock" value="0"<?php if ($JAK_FORM_DATA["stock"] == 0) echo ' checked="checked"';?> /> <?php echo $tl["general"]["g18"];?></td>
</tr>
<?php } ?>
<tr>
	<td class="go"><?php echo $tl["shop"]["m45"];?></td>
	<td><input type="text" class="inputbig" name="jak_poption" value="<?php echo $JAK_FORM_DATA["product_options"]; ?>" /> <?php echo $tl["shop"]["m68"];?></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["m45"];?> (2)</td>
	<td><input type="text" class="inputbig" name="jak_poption1" value="<?php echo $JAK_FORM_DATA["product_options1"]; ?>" /> <?php echo $tl["shop"]["m68"];?></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["m45"];?> (3)</td>
	<td><input type="text" class="inputbig" name="jak_poption2" value="<?php echo $JAK_FORM_DATA["product_options2"]; ?>" /> <?php echo $tl["shop"]["m68"];?></td>
</tr>
</table>

<table class="table">
<tr>
<td class="content-title" colspan="2"><?php echo $tl["general"]["g2"];?></td>
</tr>
<tr>
	<td><textarea name="jak_content" class="input_field grid-mb jakeditor" cols="60" rows="15"><?php echo $JAK_FORM_DATA["content"];?></textarea></td>
</tr>
</table>

<div class="ustatus">
<a href="" class="button"><?php echo $tl["general"]["g103"];?></a>
<button type="submit" name="save" class="button"><?php echo $tl["general"]["g38"];?></button>
</div>

<div class="clear"></div>

</form>
</div>		
</section>

<script type="text/javascript" src="js/editor/jakimage/jakimage.js"></script>
<script type="text/javascript" src="js/editor/jakfile/jakfile.js"></script>

<script type="text/javascript">
	jakCMS.main_url = "<?php echo BASE_URL;?>";
	jakCMS.main_lang = "<?php echo JAK_LANG;?>";
	jakCMS.jakrequest_uri = "<?php echo JAK_PARSE_REQUEST;?>";
	jakCMS.jakcms_url_orig = "<?php echo BASE_URL;?>";
	
	$(".ifManager").colorbox({
		iframe: true,
		width: 900,
		height: 630
	});
	
</script>

<script type="text/javascript" src="js/editor/tinymce.min.js"></script>
<script type="text/javascript" src="js/editor.js"></script>
		
<?php include_once APP_PATH.'admin/template/footer.php';?>