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

<section>

<div class="content-border">
<div class="heading_solid">
<h3><?php echo $tl["menu"]["m5"];?></h3>
</div>
<?php if ($errors) { ?>
<div class="status-failure"><?php echo $errors["e"].$errors["e1"].$errors["e2"].$errors["e3"].$errors["e4"].$errors["e5"].$errors["e6"].$errors["e7"];?></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["general"]["g15"];?></td>
</tr>
<tr>
	<td class="go"><h3><?php echo $tl["general"]["g16"];?></h3></td>
	<td><input type="text" name="jak_title" class="inputbig" value="<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'title') { echo $v["value"]; } } ?>" placeholder="<?php echo $tl["general"]["g16"];?>" /></td>
</tr>
<tr>
	<td class="go"><h3><?php echo $tl["login"]["l5"];?></h3><?php echo $tl["help"]["h"];?></td>
	<td><input type="text" name="jak_email" class="inputbig<?php if ($errors["e1"]) { ?> error<?php } ?>" value="<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'email') { echo $v["value"]; } } ?>" placeholder="<?php echo $tl["login"]["l5"];?>" /></td>
</tr>
<tr>
	<td class="go"><h3><?php echo $tl["general"]["g20"].'/'.$tl["general"]["g21"];?></h3></td>
	<td><input type="radio" name="jak_shttp" value="0"<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'sitehttps' && $v["value"] == '0') { ?> checked="checked"<?php } } ?> /> <?php echo $tl["general"]["g20"];?> <input type="radio" name="jak_shttp" value="1"<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'sitehttps' && $v["value"] == '1') { ?> checked="checked"<?php } } ?> /> <?php echo $tl["general"]["g21"];?></td>
</tr>
<tr>
	<td class="go"><h3><?php echo $tl["general"]["g22"];?></h3></td>
	<td><select name="jak_lang" size="1" class="input_field">
	<?php if (isset($lang_files) && is_array($lang_files)) foreach($lang_files as $lf) { ?><option value="<?php echo $lf;?>"<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'lang' && $v["value"] == $lf) { ?> selected="selected"<?php } } ?>><?php echo ucwords($lf);?></option><?php } ?>
	</select></td>
</tr>
<tr>
	<td class="go"><h3><?php echo $tl["general"]["g23"];?></h3></td>
	<td><input<?php if ($errors["e2"]) { ?> class="error"<?php } ?> type="text" name="jak_date" value="<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'dateformat') { echo $v["value"]; } } ?>" /></td>
</tr>
<tr>
	<td class="go"><h3><?php echo $tl["general"]["g24"];?></h3></td>
	<td><input<?php if ($errors["e3"]) { ?> class="error"<?php } ?> type="text" name="jak_time" value="<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'timeformat') { echo $v["value"]; } } ?>" /></td>
</tr>
<tr>
	<td class="go"><h3><?php echo $tl["general"]["g25"];?></h3></td>
	<td><select name="jak_timezone_server" size="1" class="input_field">
	<?php include_once "timezoneserver.php";?>
	</select></td>
</tr>
<tr>
	<td class="go"><h3><?php echo $tl["general"]["g119"];?></h3></td>
	<td><input type="text" name="jak_analytic" class="inputbig" value="<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'analyticsid') { echo $v["value"]; } } ?>" placeholder="UA-62169-4" /></td>
</tr>
<tr>
	<td class="go"><h3><?php echo $tl["general"]["g120"];?></h3></td>
	<td><input type="text" name="jak_facebook" class="inputbig" value="<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'facebooklike') { echo $v["value"]; } } ?>" placeholder="http://www.facebook.com/pages/..." /></td>
</tr>
<!-- <tr>
	<td class="go"><h3><?php echo $tl["general"]["g105"];?></h3></td>
	<td><input type="text" name="jak_twitter" class="inputbig" value="<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'twittername') { echo $v["value"]; } } ?>" placeholder="jakweb" /></td>
</tr> -->
</table>
<table class="table">
<tr>
<td class="content-title" colspan="2"><?php echo $tl["general"]["g32"];?></td>
</tr>
<tr>
	<td class="go"><h3><?php echo $tl["general"]["g36"];?></h3></td>
	<td><textarea name="welcome_message" cols="60" rows="5" class="input_field jakeditor"><?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'welcome_message') { echo $v["value"]; } } ?></textarea></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["m5"];?></td>
	<td><textarea class="input_field jakeditor" cols="60" rows="5" name="thankyou_message"><?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'thankyou_message') { echo $v["value"]; } } ?></textarea></td>
</tr>
</table>
<table class="table">
<tr>
<td class="content-title" colspan="2"><?php echo $tl["general"]["g37"];?></td>
</tr>
<tr>
	<td valign="top" class="go"><?php echo $tl["shop"]["m58"].' '.$tl["shop"]["m37"];?></td>
	<td><textarea class="input_field jakeditor" cols="60" rows="5" name="jak_address"><?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'shop_address') { echo $v["value"]; } } ?></textarea></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["general"]["g122"];?></td>
	<td><input type="radio" name="jak_shopsearch" value="1"<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'shopsearch' && $v["value"] == '1') { ?> checked="checked"<?php } } ?> /> <?php echo $tl["general"]["g19"];?> <input type="radio" name="jak_shopsearch" value="0"<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'shopsearch' && $v["value"] == '0') { ?> checked="checked"<?php } } ?> /> <?php echo $tl["general"]["g18"];?></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["m17"];?></td>
	<td><input type="radio" name="jak_shopurl" value="1"<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'shopurl' && $v["value"] == '1') { ?> checked="checked"<?php } } ?> /> <?php echo $tl["general"]["g19"];?> <input type="radio" name="jak_shopurl" value="0"<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'shopurl' && $v["value"] == '0') { ?> checked="checked"<?php } } ?> /> <?php echo $tl["general"]["g18"];?></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["m69"];?></td>
	<td><input type="radio" name="jak_itemopen" value="1"<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'productopen' && $v["value"] == '1') { ?> checked="checked"<?php } } ?> /> <?php echo $tl["general"]["g19"];?> <input type="radio" name="jak_itemopen" value="0"<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'productopen' && $v["value"] == '0') { ?> checked="checked"<?php } } ?> /> <?php echo $tl["general"]["g18"];?></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["m93"];?></td>
	<td><input type="radio" name="jak_quantity" value="1"<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'shopquantity' && $v["value"] == '1') { ?> checked="checked"<?php } } ?> /> <?php echo $tl["shop"]["m94"];?> <input type="radio" name="jak_quantity" value="0"<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'shopquantity' && $v["value"] == '0') { ?> checked="checked"<?php } } ?> /> <?php echo $tl["general"]["g19"];?>/<?php echo $tl["general"]["g18"];?></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["general"]["g17"];?></td>
	<td><input<?php if ($errors["e7"]) { ?> class="error"<?php } ?> type="text" name="jak_rssitem" value="<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'shoprss') { echo $v["value"]; } } ?>" maxlength="2" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["m53"];?></td>
	<td>
	<input class="inputbig" type="text" name="jak_license" value="<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'agreement') { echo $v["value"]; } } ?>" />
	</td>
</tr>
<tr>
	<td class="go"><?php echo $tl["general"]["g70"];?></td>
	<td>
	<input class="inputbig" type="text" name="jak_copyright" value="<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'copyright') { echo $v["value"]; } } ?>" />
	</td>
</tr>
</table>
<table class="table">
<tr>
<td class="content-title" colspan="2"><?php echo $tl["shop"]["m8"];?></td>
</tr>
<tr>
	<td valign="top" class="go"><?php echo $tl["shop"]["m20"];?></td>
	<td><input type="text" name="jak_taxes" value="<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'taxes') { echo $v["value"]; } } ?>" /> %</td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["m60"];?></td>
	<td><select name="jak_country" size="1">
	<option value="0"<?php if (!$JAK_PAGE1) { ?> selected="selected"<?php } ?>><?php echo $tl["general"]["g93"];?></option>
	<?php echo $JAK_COUNTRY;?>
	</select></td>
</tr>
<tr>
	<td valign="top" class="go"><?php echo $tl["shop"]["m11"];?></td>
	<td><input type="text" name="jak_currency" value="<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'currency') { echo $v["value"]; } } ?>" /></td>
</tr>
<tr>
	<td valign="top" class="go"><?php echo $tl["shop"]["m12"];?></td>
	<td><input type="text" name="jak_currency1" value="<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'currency1') { echo $v["value"]; } } ?>" />&nbsp;<?php echo $tl["shop"]["m13"];?></td>
</tr>
<tr>
	<td valign="top" class="go"><?php echo $tl["shop"]["m12"];?></td>
	<td><input type="text" name="jak_currency2" value="<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'currency2') { echo $v["value"]; } } ?>" />&nbsp;<?php echo $tl["shop"]["m13"];?></td>
</tr>
</table>
<table class="table">
<tr>
<td class="content-title" colspan="2"><?php echo $tl["general"]["g57"];?></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["general"]["g6"];?></td>
	<td><input<?php if ($errors["e5"]) { ?> class="error"<?php } ?> type="text" name="jak_mid" value="<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'shoppagemid') { echo $v["value"]; } } ?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["general"]["g7"];?></td>
	<td><input<?php if ($errors["e5"]) { ?> class="error"<?php } ?> type="text" name="jak_item" value="<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'shoppageitem') { echo $v["value"]; } } ?>" /></td>
</tr>
</table>
<table class="table">
<tr>
<td class="content-title"><?php echo $tl["general"]["g90"];?></td>
</tr>
<tr>
	<td>
	
	<ul class="work">
		<?php if (isset($site_style_files) && is_array($site_style_files)) foreach($site_style_files as $l) { ?>
			
			<li>
				<img src="<?php echo BASE_URL_ORIG;?>template/<?php echo $l;?>/preview.jpg" alt="<?php echo $l;?>" width="80" height="80" />
				<p>
				<input type="radio" name="jak_sitestyle" value="<?php echo $l;?>"<?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'sitestyle' && $v["value"] == $l) { ?> checked="checked"<?php } } ?> /> <?php echo $l;?>
				</p>
			</li>
		<?php } ?>
	 </ul>
	
	</td>
</tr>
</table>
<table class="table">
<tr>
<td class="content-title" colspan="2"><?php echo $tl["general"]["g97"];?></td>
</tr>
<tr>
	<td class="go"><h3><?php echo $tl["general"]["g95"];?></h3><?php echo $tl["help"]["h1"];?></td>
	<td><textarea name="ip_block" cols="60" rows="5" class="input_field"><?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'ip_block') { echo $v["value"]; } } ?></textarea></td>
</tr>
<tr>
	<td class="go"><h3><?php echo $tl["general"]["g96"];?></h3><?php echo $tl["help"]["h2"];?></td>
	<td><textarea name="email_block" cols="60" rows="5" class="input_field"><?php if (isset($JAK_SETTING) && is_array($JAK_SETTING)) foreach($JAK_SETTING as $v) { if ($v["varname"] == 'email_block') { echo $v["value"]; } } ?></textarea></td>
</tr>
</table>

<div class="ustatus">
<button type="submit" name="save" class="button"><?php echo $tl["general"]["g38"];?></button>
</div>
<div class="clear"></div>
</form>
</div>		
</section>

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

<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;?>";
</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';?>