<?if( $this->uri->segment(2) != "galeria" || !is_numeric($this->uri->segment(3)) ):?>

<?
	$user = $this->phpsession->get('fuser');
	$feltolto = $this->phpsession->get('feltolto');
	
	if($user)
		$login = $user['name'];
	elseif($feltolto)
		$login = $feltolto['name'];
?>
<div class="fweltop"></div>

<div class="fwel">
<?if( !$user && !$feltolto ):?>
		<script type="text/javascript">
			function urit(mezo,mirol){
				if(mezo.value==mirol) mezo.value = "";
			}
			function jelszova(mezo){
				mezo.type = "password"; mezo.value = "";
			}
			function vissza(mezo,mire){
				if(mezo.value==""){ mezo.type = "text"; mezo.value = mire; }
			}
			function passit(ip){
				var np=ip.cloneNode(true);
				np.type='password';
				np.value='';
				ip.parentNode.replaceChild(np,ip);
				np.focus();
			}function vissza2(ip,mire){
				if(ip.value==""){
					var np=ip.cloneNode(true);
					np.type='text';
					np.value=mire;
					ip.parentNode.replaceChild(np,ip);
				}
			}
			function valtogat(xx,mire){
				var jsztext = document.getElementById('jsztext');
				var jszpw = document.getElementById('jszpw');
				if(xx == "be"){
					jsztext.style.display = "none";
					jszpw.style.display = "inline";
					jszpw.value = "";
					jszpw.focus();
				}else if(jszpw.value==""){
					jsztext.style.display = "inline";
					jszpw.style.display = "none";
					jsztext.value = mire;
				}
			}
			function belepes(nevalap,jszalap){
				var oname = document.getElementById('name');
				var opasswd = document.getElementById('jszpw');
				var opasswdtext = document.getElementById('jsztext');
				var error = "";
				if( oname.value == nevalap || oname.value == "" ){
					error += "\n";
					oname.style.background = '#F9D3D3';
				}else oname.style.background = '#FFFFFF';
				if( opasswd.value == jszalap || opasswd.value == "" ){
					error += "\n";
					opasswdtext.style.background = '#F9D3D3';
					opasswd.style.background = '#F9D3D3';
				}else{ opasswdtext.style.background = '#FFFFFF'; opasswd.style.background = '#FFFFFF'; }
				if( error == "" ){ var belep = document.getElementById('belep'); belep.submit();}
			}
			function submitenter(myfield,e){
				var keycode;
				if (window.event) keycode = window.event.keyCode;
				else if (e) keycode = e.which;
				else return true;
				if (keycode == 13){
					belepes("<?=lang('name')?>","<?=lang('collec_jelszo')?>"); return false;
				}
				else return true;
			}
		</script>

	<form action="/forum/login" method="post" name="belep" id="belep">
	<div style="float: left; width: auto;">
	<strong>Login:</strong>
	<input type="text" style="width: 200px; margin-left: 8px; margin-right: 5px;" name="name" id="name" value="<?=lang('name')?>" onfocus="urit(this,'<?=lang('name')?>')" onblur="vissza(this,'<?=lang('name')?>')"  />
	
	<input  type="text" style="width: 200px; margin-right: 5px;" name="passwdxx" id="jsztext" value="<?=lang('collec_jelszo')?>" onfocus="valtogat('be');" />
	
	<input  type="password" style="width: 200px; margin-right: 5px; display: none;" name="passwd" id="jszpw" value="<?=lang('collec_jelszo')?>" onblur="valtogat('ki','<?=lang('collec_jelszo')?>');" onkeypress="return submitenter(this,event)" />
	
	<input type="button" value="OK" class="ngomb" onclick="belepes('<?=lang('name')?>','<?=lang('collec_jelszo')?>')" style="width: 120px; position: relative; top: 2px;" />
	</div>
	<div style="float: right; width: auto; text-align: right; margin-top: 7px;">
	<a href="/forum/ujjelszo">
		<?=lang('forum_jszeml')?><img src="/public/img/link_arrow.png" style="margin: 0px;" alt="" />
	</a>
	</div>
	</form>
	<div class="clear"></div>
	
	




<?else:?>

	<div style="float: left; width: 520px;">
		<strong><?=lang('forum_belepve')?>:</strong> <?=$login?>
	</div>
	<div style="float: right; width: 150px; text-align: right;">
	<a href="/forum/logout">
		<?=lang('forum_kilep')?><img src="/public/img/link_arrow.png" style="margin: 0px;" />
	</a>
	</div>
	<div class="clear"></div>
	

<?endif;?>

</div>

<div class="fwelbottom"></div>


<?if(isset($error)):?>
	<div class="loginerrortop"></div>
	<div class="loginerror">
		<table>
			<tr>
				<td valign="middle">
					<img src="/public/img/forum/stilus/msg_bubble_error_icon.png" style="float: left;" />
				</td>
				<td valign="middle">
					<?if( is_array($error) ):?>
						<?$hibak = lang('forum_hibak');?>
						<?foreach($error as $hiba):?>
							<?=$hibak[$hiba]?>
						<?endforeach;?>
					<?else:?>
						<?=$error?>
					<?endif;?>
				</td>
			</tr>
		</table>
		
	</div>
	<div class="loginerrorbottom"></div>
<?endif;?>


<?
$xxx2 = $this->phpsession->get('fhiba');
unset($_SESSION['default']['fhiba']);
?>
<?if($xxx2 != ""):?>
	<div class="loginerrortopalap"></div>
	<div class="loginerror">
		<table>
			<tr>
				<td valign="middle">
					<img src="/public/img/forum/stilus/msg_bubble_error_icon.png" style="float: left;" />
				</td>
				<td valign="middle">
					<?if( is_array($xxx2) ):?>
						<?$hibak = lang('forum_hibak');?>
						<?foreach($xxx2 as $hiba):?>
							<?=$hibak[$hiba]?>
						<?endforeach;?>
					<?else:?>
						<?=$xxx2?>
					<?endif;?>
				</td>
			</tr>
		</table>
	</div>
	<div class="loginerrorbottom"></div>
<?endif;?>




<?if(isset($infok)):?>
	<div class="logininfotop"></div>
	<div class="logininfo">
		<?if( is_array($infok) ):?>
			<?$infoklang = lang('forum_infok');?>
			<?foreach($infok as $inf):?>
				<?=$infoklang[$inf]?>
			<?endforeach;?>
		<?else:?>
			<?=$infok?>
		<?endif;?>
	</div>
	<div class="logininfobottom"></div>
<?endif;?>

<?
$xxx = $this->phpsession->get('fuzenet');
unset($_SESSION['default']['fuzenet']);
?>
<?if($xxx!=""):?>
	<div class="logininfotopalap"></div>
	<div class="logininfo">
		<?if( is_array($xxx) ):?>
			<?$infoklang = lang('forum_infok');?>
			<?foreach($xxx as $inf):?>
				<?=$infoklang[$inf]?>
			<?endforeach;?>
		<?else:?>
			<?=$xxx?>
		<?endif;?>
	</div>
	<div class="logininfobottom"></div>
<?endif;?>


<?endif;?>