<?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"];?></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["shop"]["m2"];?></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["m41"];?></td>
	<td><input type="text" name="jak_ordernr" value="<?php echo $JAK_FORM_DATA["ordernumber"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["m71"];?></td>
	<td>
	
	<select name="jak_payment">
		<option value="0"<?php if ($JAK_FORM_DATA["paid_method"] == 0) { ?> selected="selected"<?php } ?>><?php echo $tl['general']['g59'];?></option>
		<?php if (isset($JAK_PAYMENT_ALL) && is_array($JAK_PAYMENT_ALL)) foreach($JAK_PAYMENT_ALL as $v) { ?>
		<option value="<?php echo $v["id"];?>"<?php if ($v["id"] == $JAK_FORM_DATA["paid_method"]) { ?> selected="selected"<?php } ?>><?php echo $v["title"];?></option>
	<?php } ?>
	</select>
	
	</td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["m15"];?></td>
	<td><input class="inputbig<?php if ($errors["e2"]) { echo ' error'; } ?>" type="text" name="jak_price" value="<?php echo $JAK_FORM_DATA["total_price"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["m55"];?></td>
	<td><input type="text" name="jak_tax" value="<?php echo $JAK_FORM_DATA["tax"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["m56"];?></td>
	<td><input type="text" name="jak_shipping" value="<?php echo $JAK_FORM_DATA["shipping"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["m81"];?></td>
	<td><select name="jak_freeshipping" size="1"><option value="1"<?php if ($JAK_FORM_DATA["freeshipping"] == 1) { ?> selected="selected"<?php } ?>> <?php echo $tl["general"]["g19"];?></option><option value="0"<?php if ($JAK_FORM_DATA["freeshipping"] == 0) { ?> selected="selected"<?php } ?>><?php echo $tl["general"]["g18"];?></option></select></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["m11"];?></td>
	<td><input type="text" name="jak_currency" value="<?php echo $JAK_FORM_DATA["currency"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["a"];?></td>
	<td><input type="text" class="inputbig" name="jak_company" value="<?php echo $JAK_FORM_DATA["company"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["a1"];?></td>
	<td><input type="text" class="inputbig" name="jak_name" value="<?php echo $JAK_FORM_DATA["name"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["a2"];?></td>
	<td><input type="text" class="inputbig" name="jak_address" value="<?php echo $JAK_FORM_DATA["address"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["a3"];?></td>
	<td><input type="text" class="inputbig" name="jak_city" value="<?php echo $JAK_FORM_DATA["city"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["a4"];?></td>
	<td><input type="text" name="jak_zip" value="<?php echo $JAK_FORM_DATA["zip_code"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["a5"];?></td>
	<td><select name="jak_sh_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 class="go"><?php echo $tl["shop"]["a6"];?></td>
	<td><input type="text" class="inputbig" name="jak_phone" value="<?php echo $JAK_FORM_DATA["phone"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["a7"];?></td>
	<td><input type="text" class="inputbig" name="jak_email" value="<?php echo $JAK_FORM_DATA["email"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["a8"].$tl["shop"]["a"];?></td>
	<td><input type="text" class="inputbig" name="jak_sh_company" value="<?php echo $JAK_FORM_DATA["sh_company"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["a8"].$tl["shop"]["a1"];?></td>
	<td><input type="text" class="inputbig" name="jak_sh_name" value="<?php echo $JAK_FORM_DATA["sh_name"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["a8"].$tl["shop"]["a2"];?></td>
	<td><input type="text" class="inputbig" name="jak_sh_address" value="<?php echo $JAK_FORM_DATA["sh_address"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["a8"].$tl["shop"]["a3"];?></td>
	<td><input type="text" class="inputbig" name="jak_sh_city" value="<?php echo $JAK_FORM_DATA["sh_city"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["a8"].$tl["shop"]["a4"];?></td>
	<td><input type="text" name="jak_sh_zip" value="<?php echo $JAK_FORM_DATA["sh_zip_code"];?>" /></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["a8"].$tl["shop"]["a5"];?></td>
	<td><select name="jak_sh_country" size="1">
	<option value="0"<?php if (!$JAK_PAGE1) { ?> selected="selected"<?php } ?>><?php echo $tl["general"]["g93"];?></option>
	<?php echo $JAK_SHCOUNTRY;?>
	</select></td>
</tr>
<tr>
	<td class="go"><?php echo $tl["shop"]["a8"].$tl["shop"]["a6"];?></td>
	<td><input type="text" class="inputbig" name="jak_sh_phone" value="<?php echo $JAK_FORM_DATA["sh_phone"];?>" /></td>
</tr>
</table>

<table class="table">

<tr>
<td class="content-title" colspan="2"><?php echo $tl["shop"]["m31"];?></td>
</tr>

<?php if (isset($jak_ordered) && is_array($jak_ordered)) foreach($jak_ordered as $jo) { ?>

<tr><td><?php echo $jo["total_item"];?> x <?php echo $jo["title"].' '.$jo["product_option"];?> <span><strong><?php echo $tl['shop']['m15'].'</strong>: '.$jo["price"];?>&nbsp;<?php echo $JAK_FORM_DATA["currency"]; if ($jo["coupon_price"] != "0.00" && $jo["price"] != $jo["coupon_price"]) { echo ' ('.$tl["shop"]["m86"].$jo["coupon_price"].'&nbsp;'.$JAK_FORM_DATA["currency"].')';}?></span></td></tr>
<?php } ?>

</table>

<div class="ustatus">
<a href="index.php?p=shop&amp;sp=orders" 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">
		$(document).ready(function()
		{
			$('#jak_tags').tagsInput({
			   defaultText:'<?php echo $tl["general"]["g83"];?>',
			   taglimit: 10
			});
			$('#jak_tags_tag').alphanumeric({nocaps:true});
		});
</script>
		
<?php include_once APP_PATH.'admin/template/footer.php';?>