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

		<div class="content">
        
        
        <div class="content-right">
		
		<?php if (!PAGE_ACTIVE) { ?>
		<div class="status-failure"><?php echo $tl["errorpage"]["ep"];?></div>
		<?php } ?>
		
		<section class="topsection">
			
			<h2><?php echo $PAGE_TITLE;?></h2>
			
			<div class="entry-content"><?php echo $tl["shop"]["m50"];?></div>
			
			<?php if (isset($_SESSION['customer_selected'])) { ?>
				<div class="logout"><a href="<?php echo $shopClogout;?>"><?php echo $tl["shop"]["m73"];?></a></div>
			<?php } ?>
			
		</section>
		
		<?php if (!isset($_SESSION['customer_selected'])) { ?>
		
		<article class="post">
		
			<div class="grid-half"><h3><?php echo $tl["shop"]["m68"];?></h3>
			<p><?php echo $tl["shop"]["m70"];?></p>
			
			<div class="entry-content">
			<form method="post" action="<?php echo $_SERVER['REQUEST_URI'];?>">
			<p>
			<label class="required" for="email"><?php echo $tl["shop"]["m41"];?></label>
			<input type="text" name="email" id="email" class="inputbig<?php if ($ErrLogin) echo " error";?>" value="<?php echo $_POST["email"];?>" placeholder="<?php echo $tl["shop"]["m41"];?>" />
			
			<label class="required" for="password"><?php echo $tl["shop"]["m67"];?></label>
			<input type="text" name="password" id="password" class="inputbig<?php if ($ErrLogin) echo " error";?>" value="<?php echo $_POST["password"];?>" placeholder="<?php echo $tl["shop"]["m67"];?>" />
			</p>
			
			<input type="hidden" name="login-customer" value="1" />
			
			<p><input type="submit" class="button block big" value="<?php echo $tl["shop"]["m72"];?>" /></p>
			
			</form>
			</div>
			
			</div>
			
			<div class="grid-half"><h3><?php echo $tl["shop"]["m69"];?></h3>
			<p><?php echo $tl["shop"]["m71"];?></p>
			<form method="post" action="<?php echo $_SERVER['REQUEST_URI'];?>">
				<input type="hidden" name="new-customer" value="1" />
				<p><input type="submit" class="button block big" value="<?php echo $tl["shop"]["m69"];?>" /></p>
			</form>
			</div>
		
		</article>
		
		<?php } else { ?>
		
		<article class="post">
			
			<div class="entry-content">
			    
			    <div class="clear"></div>
			    
			    <form method="post" action="<?php echo $_SERVER['REQUEST_URI'];?>">
			    
			    <h4><?php echo $tl["shop"]["m36"];?></h4>
			    
			    <?php if (is_array($shipping_option)) { ?>
			    
			    <?php if ($errors["e8"]) { ?>
			    
			    <div class="status-failure"><?php echo $errors["e8"];?></div>
			    
			    <?php } ?>
			    
			    <p class="total-shipping">
			    
			    <select name="shipping_option" id="shipping-option">
			    
			    <option value="0" id="shipping-remove"><?php echo $tl["general"]["g21"];?></option>
			    
			    <?php foreach($shipping_option as $po) { echo $po["select"]; } ?>
			    
			    </select>
			    
			    </p>
			    
			    <p><?php echo $tl["shop"]["m37"];?></p>
			    
			    <?php } else { ?>
			    
			    <p class="status-ok"><?php echo $tl["shop"]["m48"];?></p>
			    
			    <?php } ?>
			    
			    <h4><?php echo $tl["shop"]["m1"];?></h4>
			    
			    <?php if ($errors["e1"] || $errors["e2"] || $errors["e3"] || $errors["e4"] || $errors["e5"] || $errors["e6"] || $errors["e11"]) { ?>
			    
			    <div class="status-failure"><?php echo $errors["e1"].$errors["e2"].$errors["e3"].$errors["e4"].$errors["e5"].$errors["e6"].$errors["e11"];?></div>
			    
			    <?php } ?>
			    
			    <p>
			    
			    <label for="company"><?php echo $tl["shop"]["m21"];?></label>
			    <input type="text" name="company" class="inputbig" value="<?php if (JAK_CUSTOMER_USERID) { echo $customerl->getVar("company"); } else { echo $_POST["company"];}?>" placeholder="<?php echo $tl["shop"]["m21"];?>" />
			    <label class="required" for="name"><?php echo $tl["shop"]["m39"];?></label>
			    <input type="text" name="name" class="inputbig" value="<?php if (JAK_CUSTOMER_USERID) { echo $customerl->getVar("name"); } else { echo $_POST["name"];}?>" placeholder="<?php echo $tl["shop"]["m39"];?>" />
			    <label class="required" for="phone"><?php echo $tl["shop"]["m40"];?></label>
			    <input type="text" name="phone" class="inputbig" value="<?php if (JAK_CUSTOMER_USERID) { echo $customerl->getVar("phone"); } else { echo $_POST["phone"];}?>" placeholder="<?php echo $tl["shop"]["m40"];?>" />
			    <label class="required" for="email"><?php echo $tl["shop"]["m41"];?></label>
			    <input type="text" name="email" class="inputbig" value="<?php if (JAK_CUSTOMER_USERID) { echo $customerl->getVar("email"); } else { echo $_POST["email"];}?>" placeholder="<?php echo $tl["shop"]["m41"];?>" />
			    <label class="required" for="address"><?php echo $tl["shop"]["m42"];?></label>
			    <input type="text" name="address" class="inputbig" value="<?php if (JAK_CUSTOMER_USERID) { echo $customerl->getVar("address"); } else { echo $_POST["address"];}?>" placeholder="<?php echo $tl["shop"]["m42"];?>" />
			    <label class="required" for="city"><?php echo $tl["shop"]["m43"].' / '.$tl["shop"]["m44"];?></label>
			    <input type="text" name="city" value="<?php if (JAK_CUSTOMER_USERID) { echo $customerl->getVar("city"); } else { echo $_POST["city"];}?>" placeholder="<?php echo $tl["shop"]["m43"];?>" /> <input type="text" name="postal" class="postal" value="<?php if (JAK_CUSTOMER_USERID) { echo $customerl->getVar("zip_code"); } else { echo $_POST["postal"];}?>" placeholder="<?php echo $tl["shop"]["m44"];?>" />
			    <label class="required" for="country"><?php echo $tl["shop"]["m45"];?></label>
			    <select name="country" id="country-tax">
			    <option value="0"><?php echo $tl["general"]["g21"];?></option>
			    <?php echo $getcountry;?>
			    </select>
			    
			    <?php if (!JAK_CUSTOMER_USERID) { ?>
			    <p>
			    <input type="checkbox" id="show-password" name="save-userdata" value="1"<?php if (isset($_POST['save-userdata'])) echo ' checked="checked"';?> /> <?php echo $tl["shop"]["m66"];?>
			    
			    <div id="customer-password">
			    		<label class="required" for="password"><?php echo $tl["shop"]["m67"];?></label>
			    		<input type="text" name="password" id="password" class="inputbig" value="<?php echo $_POST["password"];?>" placeholder="<?php echo $tl["shop"]["m67"];?>" />
			    	</div>
			    </p>
			    <?php } ?>
			    			
			    <p><strong><?php echo $tl["contact"]["n"];?></strong> <?php echo $tl["contact"]["n1"];?> <img src="img/cancel.png" title="required" width="14" height="14" /> <?php echo $tl["contact"]["n2"];?></p>
			    
			    </p>
			    
			    <h4><?php echo $tl["shop"]["m60"];?></h4>
			    
			    <?php if ($errors["e10"]) { ?>
			    
			    <div class="status-failure"><?php echo $errors["e10"];?></div>
			    
			    <?php } ?>
			    
			    <label for="jak_shcode"><?php echo $tl["shop"]["m61"];?></label>
			    <input class="shopinput" type="text" name="jak_shcode" id="jak_shcode" value="<?php echo $_REQUEST["jak_shcode"]; ?>" />
			    <button type="submit" name="checkC" id="jak_checkC" class="button"><?php echo $tl["shop"]["m62"];?></button> <span id="cLoading"><img src="<?php echo BASE_URL;?>img/loader.gif" alt="load" /></span>
			    <div class="statusC"></div>
			    
			    <h4><?php echo $tl["shop"]["m32"];?></h4>
			    
			    <p>
			    
			    <input type="checkbox" id="show-shipping" name="show-shipping" value="1" /> <?php echo $tl["shop"]["m33"];?>
			    
			    <div id="shipping-form" class="shipping-form">
			    
			    <label for="sh_company"><?php echo $tl["shop"]["m21"];?></label>
			    <input type="text" name="sh_company" class="inputbig" value="<?php echo $_POST["sh_company"];?>" placeholder="<?php echo $tl["shop"]["m21"];?>" />
			    <label class="required" for="sh_name"><?php echo $tl["shop"]["m39"];?></label>
			    <input type="text" name="sh_name" class="inputbig" value="<?php echo $_POST["sh_name"];?>" placeholder="<?php echo $tl["shop"]["m39"];?>" />
			    <label class="required" for="sh_phone"><?php echo $tl["shop"]["m40"];?></label>
			    <input type="text" name="sh_phone" class="inputbig" value="<?php echo $_POST["sh_phone"];?>" placeholder="<?php echo $tl["shop"]["m40"];?>" />
			    <label class="required" for="sh_address"><?php echo $tl["shop"]["m42"];?></label>
			    <input type="text" name="sh_address" class="inputbig" value="<?php echo $_POST["sh_address"];?>" placeholder="<?php echo $tl["shop"]["m42"];?>" />
			    <label class="required" for="sh_city"><?php echo $tl["shop"]["m43"].' / '.$tl["shop"]["m44"];?></label>
			    <input type="text" name="sh_city" value="<?php echo $_POST["sh_city"];?>" placeholder="<?php echo $tl["shop"]["m43"];?>" /> <input type="text" name="sh_postal" class="postal" value="<?php echo $_POST["sh_postal"];?>" placeholder="<?php echo $tl["shop"]["m44"];?>" />
			    <label class="required" for="sh_country"><?php echo $tl["shop"]["m45"];?></label>
			    <select name="sh_country">
			    <option value="0"><?php echo $tl["general"]["g21"];?></option>
			    <?php echo $getcountry;?>
			    </select>
			    
			    </div>
			    
			    </p>
			    
			    <h4><?php echo $tl["shop"]["m19"];?></h4>
			    
			    <?php if ($errors["e9"]) { ?>
			    
			    <div class="status-failure"><?php echo $errors["e9"];?></div>
			    
			    <?php } ?>
			    
			    <p class="total-shipping">
			    
			    <?php if (is_array($payment_option)) foreach($payment_option as $po) { echo $po["radio"]; } ?>
			    
			    </p>
			    
			    <h4><?php echo $tl["shop"]["m34"];?></h4>
				
				<?php if ($errors["e12"]) { ?>
				
				<div class="status-failure"><?php echo $errors["e12"];?></div>
				
				<?php } ?>
			    
			    <p class="total-shipping">
			    <p id="show-handling">
			    <strong><?php echo $tl["shop"]["m3"];?></strong><span id="shipping-handling"></span> <?php echo $JAK_CURRENCY;?>
			    </p>
			    <p id="show-delivery">
			    <strong><?php echo $tl["shop"]["m4"];?></strong><span id="shipping-time"></span> <?php echo $tl["shop"]["m38"];?>
			    </p>
			    <strong><?php echo $tl["shop"]["m2"];?></strong><span id="total-amount"></span> <?php echo $JAK_CURRENCY;?> <span id="show-tax">(<?php echo $tl["shop"]["m49"];?> <?php echo JAK_TAXES;?>%)</span>
			    </p>
			    
			    <p>
			    <?php echo $tl["shop"]["m22"];?> (<a href="<?php echo $AGREEMENT_URL;?>" rel="lightbox"><?php echo $AGREEMENT_NAME;?></a>) : <input type="checkbox" name="jak_agree" value="1" /> 
			    
			    </p>
			    <p><input type="submit" id="formsubmit" class="button block big" value="<?php echo $tl["shop"]["m35"];?>" />
			    </p>     
			    
			     <input type="hidden" name="checkout" value="1" />
			    
			    </form>
			    
		
			    
			</div>
		
		</article>
		<?php } ?>
        </div>
        
        <div class="content-left">
          <div class="shopping-cart drop-here" id="shopping-cart">
		
			<div class="inside">
			
				<h2><?php echo $tl["shop"]["m20"];?></h2>
							
						
				<?php if ($JAK_GO_PAY) { ?>
				
				<p><img src="<?php echo BASE_URL;?>img/loading.gif" alt="loading" /></p>
				<p><?php echo $tl["shop"]["m25"];?><p>
				<p>
				
				<script type="text/javascript">
				
				$(document).ready(function(){ 
					setTimeout(function(){
					             $('#gateway_form').submit(); 
					           }, 3000);
				
				});
				</script>
				
				<?php echo $JAK_GO_PAY;?>
				</p>
				
				<?php } else { ?>
				
				<div id="item-list"></div>
				
				<div class="clear">&nbsp;</div>
				
				<?php if ($CURRENCY_CHOOSE) { ?>
				<h2><?php echo $tl["shop"]["m24"];?></h2>
				<p>
				<form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
				
				<select name="currency">
				<?php if (isset($CURRENCY_CHOOSE) && is_array($CURRENCY_CHOOSE)) foreach($CURRENCY_CHOOSE as $c) { ?>
				<option value="<?php echo $c;?>"<?php if ($c == $JAK_CURRENCY) { ?> selected="selected"<?php } ?>><?php echo $c;?></option>
				<?php } ?>
				</select>
				
				<button type="submit" class="button"><?php echo $tl["general"]["g10"];?></button>
				</form>
				</p>
				<?php } } ?>	
						
			</div>
		  </div>       
		</div>
		
		</div><!-- #content -->
		
		<script type="text/javascript">
			jakCMS.jakcms_country = "<?php echo JAK_COUNTRY;?>";
			jakCMS.jakcms_msg_shop = "<?php echo $tl["shop"]["m63"];?>";
			jakCMS.jakcms_msg_shop1 = "<?php echo $tl["shop"]["m64"];?>";
			jakCMS.jakcms_msg_shop2 = "<?php echo $tl["shop"]["e8"];?>";
			jakCMS.jakcms_msg_shop3 = "<?php echo $tl["shop"]["m65"];?>";
		
		$(document).ready(function() {
		
			$("#inner_replace").addClass("gradient-down");
			
		});
		
		</script>

<?php include_once APP_PATH.'template/wood/footer.php';?>