Current File : /home/users/barii/public_html/finansenl.com.pl/wodki/application/views/order/index.phpOLD
<script>
	function validateForm_NoRegister() {

		var error = 0;
		var form = document.forms['form_no_register'];

	
		if( 1 == 1 ) {

			f = "#_firstname";
			$(f).removeClass('input_error');
			$('.input_error_text').remove();
			
			if( $(f).val() == "" ) {

				$(f).addClass('input_error');
				error++;
			} 
			
			f = "#_email_";
			$(f).removeClass('input_error');
			$('.input_error_text').remove();
			
			if( $(f).val() == "" ) {

				$(f).addClass('input_error');
				error++;
			} 

			f = "#_re-email_";
			$(f).removeClass('input_error');
			$('.input_error_text').remove();
			
			if( $(f).val() == "" ) {

				$(f).addClass('input_error');
				error++;
			} 
			
			f = "#_lastname";
			$(f).removeClass('input_error');
			$('.input_error_text').remove();
			
			if( $(f).val() == "" ) {

				$(f).addClass('input_error');
				error++;
			} 
			
			f = "#_city";
			$(f).removeClass('input_error');
			$('.input_error_text').remove();
			
			if( $(f).val() == "" ) {

				$(f).addClass('input_error');
				error++;
			} 
			
			f = "#_address";
			$(f).removeClass('input_error');
			$('.input_error_text').remove();
			
			if( $(f).val() == "" ) {

				$(f).addClass('input_error');
				error++;
			} 
			
			f = "#_postcode";
			$(f).removeClass('input_error');
			$('.input_error_text').remove();
			
			if( $(f).val() == "" ) {

				$(f).addClass('input_error');
				error++;
			} 
		} 

		if( error === 0 ) {
			form.submit();
		} else {
			alert('<?php echo __t('Błędnie wypełniony formularz'); ?>');
		}
	}
	function validateForm_Register() {

		var error = 0;
		var form = document.forms['form_register'];

	
		if( 1 == 1 ) {

			f = "#_username";
			$(f).removeClass('input_error');
			$('.input_error_text').remove();
			
			if( $(f).val() == "" ) {

				$(f).addClass('input_error');
				error++;
			} 
			
			f = "#_email";
			$(f).removeClass('input_error');
			$('.input_error_text').remove();
			
			if( $(f).val() == "" ) {

				$(f).addClass('input_error');
				error++;
			} 

			f = "#_re-email";
			$(f).removeClass('input_error');
			$('.input_error_text').remove();
			
			if( $(f).val() == "" ) {

				$(f).addClass('input_error');
				error++;
			} 
			
			f = "#_password";
			$(f).removeClass('input_error');
			$('.input_error_text').remove();
			
			if( $(f).val() == "" ) {

				$(f).addClass('input_error');
				error++;
			} 
			
			f = "#_re-password";
			$(f).removeClass('input_error');
			$('.input_error_text').remove();
			
			if( $(f).val() == "" ) {

				$(f).addClass('input_error');
				error++;
			} 
		} 

		if( error === 0 ) {
			form.submit();
		} else {
			alert('<?php echo __t('Błędnie wypełniony formularz'); ?>');
		}
	}
</script>

	<div id="header">
		<div class="slider_i"><a href="/"><img src="html/images/artpiece_13_.png" alt=""/></a></div>
		<div class="slogan1"><span>Otwórz się na sztukę<br/> i zaproś ją do swojego domu!</span></div>		
		<div class="slogan2"><span>ZOBACZ GALERIE NASZYCH ARTYSTÓW</span></div>	
	    <div class="slogan3"><span>LUB</span></div>
		<div class="slogan4"><span>DOŁĄCZ DO NAS I SPRZEDAWAJ SWOJE PRACE</span></div>		
	</div>
			<?php if (isset($message)):?>
					<div id="message-red" >
						<table border="0" width="100%" cellpadding="0" cellspacing="0">
							<tr>
								<td class="red-left">
									<?php echo $message;?><br/>
									<?php echo sprintf(__t('Pozostała liczba prób logowania %s'), $trial_left); ?>
								</td>
								<td class="red-right"><a class="close-red"><?php echo HTML::image('static/images/table/icon_close_red.gif');?></a></td>
							</tr>
						</table>
					</div>
			<?php endif;?>	
			<?php echo Message::render(); ?>
			
			<div class="container">
		<?php echo aurora::partial('frontend_sider'); ?>
		
		<div id="content">
			<h2>Zamówienie <span>Dane szczegółowe</span></h2>
			
		<?php if(!Auth::instance()->logged_in() ) : ?>
		<p>Czy chcesz założyć konto?<br/> Dzięki temu będziesz mógł śledzić na bieżąco aktualności oraz korzystać z rabatów na zakupy.</p>
		
		<div class="col_50">
			<h2><span>MAM</span> KONTO</h2>	
			<form name="login_form_order" action="Login/index" method="post">
				<fieldset class="forms">
				<label for="f">Nazwa użytkownika:</label>
				<input type="text" name="login_login" placeholder="Nazwa użytkownika"/><br style="clear: both;"/>
				<label for="f">Hasło użytkownika:</label>
				<input type="password" name="login_password" placeholder="******"/>
				<input type="submit" class="submit" value="Zaloguj"/>
				</fieldset>
			</form>
			
			<h2><span>CHCĘ ZAŁOŻYĆ</span> KONTO</h2>
			<form name="form_register" action="Register/customer" method="post">
				<fieldset class="forms">
							<select name="profile_id">
								<option value="1">Artysta</option>
								<option value="2">Galeria</option>
								<option value="3">Konto konsumpcyjne</option>
							</select>
							<br style="clear: both;"/>
							<label for="f">Nazwa użytkownika:</label>
							<input type="text" placeholder="Nazwa użytkownika" id="_username" name="username" value="<?php echo @$data['username']; ?>"/>
							<br style="clear: both;"/>
							<label for="f">E-mail:</label>
							<input type="text" placeholder="E-mail" id="_email" name="email" value="<?php echo @$data['email']; ?>"/>
							<br style="clear: both;"/>
							<label for="f">Powtórz e-mail:</label>
							<input type="text" placeholder="Powtórz e-mail" id="_re-email" name="re-email" value="<?php echo @$data['re-email']; ?>"/>
							<br style="clear: both;"/>
							<label for="f">Hasło:</label>
							<input id="_password" value="*******" type="password" name="password"/>
							<br style="clear: both;"/>
							<label for="f">Powtórz hasło:</label>
							<input id="_re-password" value="********" type="password"/>
							<br style="clear: both;"/>					
							<input type="hidden" id="fv" name="fv" value="0" />					
							<input type="hidden" id="regulations" name="regulations" value="1" />
							<input type="submit" onclick="validateForm_Register(); return false;" id="register_button" value="Zarejestruj"/>
							
					</fieldset>
			</form>
			
		</div>
		
		<div class="col_50">
			<h2><span>ZAMÓWIENIE </span> BEZ REJESTRACJI</h2>
			<form name="form_no_register" action="Order/no_register" method="post">
				<fieldset class="forms">
					<label for="f">Imię:</label>
						<input type="text" placeholder="Imię" id="_firstname" name="firstname" value=""/>
						<br style="clear: both;"/>
					<label for="f">Nazwisko:</label>
						<input type="text" placeholder="Nazwisko" id="_lastname" name="lastname" value=""/>
						<br style="clear: both;"/>
					<label for="f">E-mail:</label>
						<input type="text" placeholder="E-mail" id="_email_" name="email" value=""/>
						<br style="clear: both;"/>
					<label for="f">Powtórz e-mail:</label>
						<input type="text" placeholder="Powtórz e-mail" id="_re-email_" name="re-email" value=""/>
						
						<br style="clear: both;"/>
					<label for="f">Adres:</label>
						<input type="text" placeholder="Adres" id="_address" name="address" value=""/>
						<br style="clear: both;"/>
					<label for="f">Miejscowość:</label>
						<input type="text" placeholder="Miejscowość" id="_city" name="city" value=""/>
						<br style="clear: both;"/>
					<label for="f">Kod pocztowy:</label>
						<input type="text" placeholder="Kod pocztowy" id="_postcode" name="postcode" value=""/>
											
						<input type="hidden" id="fv" name="fv" value="0" />					
						<input type="hidden" id="regulations" name="regulations" value="1" />
						<input type="submit" onclick="validateForm_NoRegister(); return false;" id="register_button2" value="Zamów bez rejestracji"/>
							
					</fieldset>
			</form>
		</div>
		<?php else: ?>
		
			<p>Poniżej znajdują się dane dotyczące zamówienia.<br/> Proszę sprawdzić ich poprawność a następnie zatwierdzić proces zamówienia klikając Zamów.</p>
			
			<table class="cart">
			<thead>
				<tr>
					<th align="center">Lp.</th>
					<th align="center">Zdjęcie produktu</th>
					<th align="center">Nazwa produktu</th>
					<th align="center">Ilość</th>
					<th align="center">Wysyłka</th>
					<th align="center">Netto</th>
					<th align="center">Brutto</th>
				</tr>
			</thead>
			<tbody>
				<?php $i=0; foreach( $cart_session as $val ) : $i++; ?>
				<?php $product = ORM::Factory('item', $val['id']);  ?>
				<tr>
					<td align="center"><?php echo $i; ?>.</td>
					<td align="center"><img width="80" src="/image.php/image-name.jpg?width=80&amp;height=80&amp;cropratio=1:1&amp;image=/<?php echo $product->thumb; ?>" alt=""/></td>
					<td align="center"><?php echo $product->title; ?></td>
					<td align="center">1 szt.</td>
					<td align="center"><?php echo $product->shipping_cost; ?>zł</td>
					<td align="center"><?php echo round($product->price/1.23, 2); ?>zł</td>
					<td align="center"><?php echo $product->price; ?>zł</td>
					
				</tr>
				<?php endforeach; ?>
			</tbody>
			<tfoot>
				<tr>
					<td colspan="7"><a href="Order/index?action=finalize" class="button roRight">Zamów</a></td>
				</tr>
			</tfoot>
		</table>
		
		<?php endif; ?>
		
		</div>
	</div>