<?
$honapok = lang('honapok');
$kivhonap = $this->uri->segment(3);
$kivev = (2011 + (int)($kivhonap/12.00009));

$kivhonap = (($kivhonap-1)%12+1);


if( $kivhonap < 10 )
	$utvonal = "public/img/honapkepe/".$kivev."0";
else
	$utvonal = "public/img/honapkepe/".$kivev;
?>

<div id="baloldal">

<div class="hkheadertop"></div>
<div class="hkkeret">
	<table width="100%"><tr>
	<td>
		<div class="gal-cim2 feherbetu" style="margin-bottom: 10px; color: #fff !important;">"<?=lang('hk')?>": <?if(hun()):?><?=$kivev?> <?endif;?><?=$honapok[$kivhonap]?><?if(!hun()):?> <?=$kivev?><?endif;?></div>
	</td>
	<td align="right">
		<div class="gal-cim2 vcard" style="margin-bottom: 10px; text-align: right;">
			<?=lang('hk_keszitette')?>: <span class="feherbetu fn" style="color: #fff;"><? $szoveg2 = explode(' - ',$galeria->cim); print end($szoveg2); ?></span>
		</div>
	</td>
	</tr></table>
</div>
<div class="hkheaderbottom"></div>


<div style="background: url(/public/img/galeria/picture_frame_sprite.png) -729px 0 no-repeat; height: 11px; width: 729px;"></div>
<div style="background: url(/public/img/galeria/picture_frame_sprite.png) -1458px 0 repeat-y; padding: 7px 19px 0px 19px;">
	<a href="/<?=$utvonal.$kivhonap?>/<?=$galeria->kezdo?>" class="fancy" title="<?if(hun()):?><?=$kivev?> <?endif;?><?=$honapok[$kivhonap]?><?if(!hun()):?> <?=$kivev?><?endif;?>, <?=end($szoveg2)?>">
		<?if(file_exists($utvonal.$kivhonap.'/692_'.$galeria->kezdo)):?>
		<img src="/<?=$utvonal.$kivhonap?>/692_<?=$galeria->kezdo?>" alt="" style="margin: 0px 5px 0px 0px; float: left; max-width: 692px;" />
		<?else:?>
		<img src="/<?=$utvonal.$kivhonap?>/<?=$galeria->kezdo?>" alt="" style="margin: 0px 5px 0px 0px; float: left; max-width: 692px;" />
		<?endif;?>
	</a><span style="font-size: 5px;">&nbsp;</span>
</div>
<div style="background: url(/public/img/galeria/picture_frame_sprite.png) no-repeat; height: 13px; width: 729px;"></div>

<? $szoveg = explode('###',$galeria->leiras);?>

<?if(hun()):?>
<div class="hkheadertop"></div>
<div class="hkkeret">
	<div class="gal-cim2" style="margin-bottom: 10px;"><?=lang("hk_indoklas")?></div>
	<em>"<? print $szoveg[0]; ?>"</em>
</div>
<div class="hkheaderbottom"></div>
<?elseif(isset($szoveg[1]) && $szoveg[1] != ""):?>
<div class="hkheadertop"></div>
<div class="hkkeret">
	<div class="gal-cim2" style="margin-bottom: 10px;"><?=lang("hk_indoklas")?></div>
	<em>"<? print $szoveg[1]; ?>"</em>
</div>
<div class="hkheaderbottom"></div>
<?endif;?>

<?
if( file_exists('public/img/honapkepe/galeria/'.$this->uri->segment(3).'/sorrend.php') ){
	include('public/img/honapkepe/galeria/'.$this->uri->segment(3).'/sorrend.php');
}

if( !isset($images) || !is_array($images) )
	$images = scandir('public/img/honapkepe/galeria/'.$this->uri->segment(3));
?>
<?if(count($images) > 3 || ( is_array($images) && count($images) > 0 && !in_array(".",$images) ) ):?>
<div style="margin: 5px 0px 5px 7px; color: #AAA; font-weight: bold; font-size: 1.2em;"><?=lang('hk_tovabbikepek')?></div>

<?foreach($images as $i):?>
	<?if($i != ".." && $i != "." && substr($i,0,4) != "elo_" && !is_dir('public/img/honapkepe/galeria/'.$this->uri->segment(3)."/".$i) && substr($i,0,4) != "400_" && substr($i,0,4) != "692_"  && substr($i,-4)!=".txt"):?>
	<div style="width: 185px; float: left; text-align: center; margin-bottom: 5px;">
	<div class="gal-outer">
	<div class="gal-container">
    <a href="/public/img/honapkepe/galeria/<?=$this->uri->segment(3)?>/<?=$i?>" class="fancy" title="<?=$i?>" rel="group">
		<img src="/public/img/honapkepe/galeria/<?=$this->uri->segment(3)?>/thumbs/<?=$i?>" alt="<?=$i?>" style="max-width: 150px;" />
	</a>
	</div>
	</div>
	<?
		$kepnev = explode('_-_',$i);
		$str = preg_replace("/_/"," ",$kepnev[0]);
		$cutstr=substr($str,0,strlen($str)-4);
		print $cutstr;
	?>
	</div>
	<?endif;?>
<?endforeach;?>
<br />
<?endif;?>


<div class="clear"></div>
<div style="margin: 25px 0px 5px 7px; color: #AAA; font-weight: bold; font-size: 1.2em;"><?=lang('hk_tobbimunka')?></div>
<?$images2 = scandir($utvonal.$kivhonap);?>
<?foreach($images2 as $i):?>
	<?//print_r($images)?>
	<?if($i != ".." && $i != "." && substr($i,0,4) != "elo_" && !is_dir($utvonal.$kivhonap."/".$i) && file_exists($utvonal.$kivhonap."/thumbs/".$i) && !in_array($i,$images) && $i != $galeria->kezdo ):?>
	<div style="width: 180px; float: left; text-align: center; margin-bottom: 5px;">
	<div class="gal-outer">
	<div class="gal-container">
    <a href="/<?=$utvonal.$kivhonap?>/<?=$i?>" class="fancy" title="<?=preg_replace("/_/"," ",$i)?>" rel="group">
		<img src="/<?=$utvonal.$kivhonap?>/thumbs/<?=$i?>" alt="<?=$i?>" style="max-width: 150px; max-height: 113px;" />
	</a>
	</div>
	</div>
	<?
		$kepnev = explode('_-_',$i);
		$str = preg_replace("/_/"," ",$kepnev[0]);
		$cutstr=substr($str,0,strlen($str)-4);
		print $cutstr;
	?>
	</div>
	<?endif;?>
<?endforeach;?>
</div>

<div id="jobboldal" style="padding-top: 10px;">
	<img src="/public/img/galeria/hk_banner<?if(hun()):?>_hun<?else:?>_eng<?endif;?>.png" alt="<?=lang('hk')?>" />
	
	<div class="hkheadersmalltop"></div>
	<div class="hkkeretsmall">
		<div class="gal-cim2"><?=lang('hk_palyazzon')?></div>
		<?=lang('hk_short')?>
		<p style="text-align: right"><a href="/news/show/<?if(hun()):?>83<?else:?>86<?endif;?>" style="color: #f37d00;" class="mutat"><?=lang("kt_tovabbiak")?> 
		<img src="/public/img/link_arrow.png" style="margin: 0px;" alt="" /></a></p>
	</div>
	<div class="hkheadersmallbottom"></div>
	
	
	<div class="hkheadersmalltop"></div>
	<div class="hkkeretsmall">
		<div class="gal-cim2"><?=lang('hk_zsuribe')?></div>
		<?=lang('hk_zsuritagok')?>:
		<ul style="padding-left: 0px;">
			<li><?=lang('hk_zs_epitesz')?></li>
			<li><?=lang('hk_zs_belso')?></li>
			<li><?=lang('hk_zs_cadline')?>.</li>
		</ul>
		<p style="text-align: right"><a href="/<?=lang("hk_url")?>/<?if(hun()):?>zsuri<?else:?>jury<?endif;?>" style="color: #f37d00;" class="mutat"><?=lang("kt_tovabbiak")?> 
		<img src="/public/img/link_arrow.png" style="margin: 0px;" alt="" /></a></p>
	</div>
	<div class="hkheadersmallbottom"></div>
	
	
	<div class="hkheadersmalltop"></div>
	<div class="hkkeretsmall">
		<div class="gal-cim2"><?=lang("hk_archivum")?></div>
		<?
		if(time()>1372629600) $honnan = 48; else $honnan = 29;
		?>
		<?for($i=$honnan;$i>=49;$i--):?>
		<a href="/<?=lang("hk_url")?>/gallery/<?=$i?>" class="mutat"><?if(hun()):?>2015 <?endif;?><?=$honapok[$i-48]?><?if(!hun()):?> 2015<?endif;?></a><br />
		<?endfor;?>
		<?for($i=$honnan;$i>=37;$i--):?>
		<a href="/<?=lang("hk_url")?>/gallery/<?=$i?>" class="mutat"><?if(hun()):?>2014 <?endif;?><?=$honapok[$i-36]?><?if(!hun()):?> 2014<?endif;?></a><br />
		<?endfor;?>
		<?for($i=36;$i>=25;$i--):?>
		<a href="/<?=lang("hk_url")?>/gallery/<?=$i?>" class="mutat"><?if(hun()):?>2013 <?endif;?><?=$honapok[$i-24]?><?if(!hun()):?> 2013<?endif;?></a><br />
		<?endfor;?>
		<?for($i=24;$i>=13;$i--):?>
		<a href="/<?=lang("hk_url")?>/gallery/<?=$i?>" class="mutat"><?if(hun()):?>2012 <?endif;?><?=$honapok[$i-12]?><?if(!hun()):?> 2012<?endif;?></a><br />
		<?endfor;?>
		<?for($i=12/*(date('m',time())-1)*/;$i>=6;$i--):?>
		<a href="/<?=lang("hk_url")?>/gallery/<?=$i?>" class="mutat"><?if(hun()):?>2011 <?endif;?><?=$honapok[$i]?><?if(!hun()):?> 2011<?endif;?></a><br />
		<?endfor;?>
	</div>
	<div class="hkheadersmallbottom"></div>
</div>


