<?
$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;
?>
<script type="text/javascript">
		//optional: set config options here!
		var rwd_images = {
			widthBreakPoint: 300
		};
</script>
<style>
		img { border: 0; width: 100%; display: block; max-width: 100%; }
</style>

<div data-role="header">
	<h1 style="margin-left: 70px; margin-right: 15px;">"<?=lang('hk')?>": <?if(hun()):?><?=$kivev?> <?endif;?><?=$honapok[$kivhonap]?><?if(!hun()):?><?endif;?></h1>
    <a class="ui-btn ui-shadow ui-btn-corner-all ui-btn-icon-left ui-btn-up-a" data-theme="a" data-wrapperels="span" data-iconshadow="true" data-shadow="true" data-corners="true" href="/mobile#galleries" data-role="button" data-icon="arrow-l" data-ajax="false">
		<span class="ui-btn-inner ui-btn-corner-all"><span class="ui-btn-text"><?=lang('forum_vissza')?></span>
		<span class="ui-icon ui-icon-arrow-l ui-icon-shadow">&nbsp;</span></span>
    </a>
</div>

<div data-role="content">
<?=lang('hk_keszitette')?>: <span style=""><? $szoveg2 = explode(' - ',$galeria->cim); print end($szoveg2); ?></span>

<div style="text-align: center">
<img src="/<?=$utvonal.$kivhonap?>/thumbs/<?=$galeria->kezdo?>?full=/<?=$utvonal.$kivhonap?>/<?=$galeria->kezdo?>" alt="" style="margin: 0px 5px 0px 0px;" />
</div>

<?if(hun()):?>
<? $szoveg = explode('###',$galeria->leiras);?>
<div style="margin-bottom: 10px;"><?=lang("hk_indoklas")?></div>
<em>"<? print $szoveg[0]; ?>"</em>
<?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 || ( count($images) > 0 && !in_array(".",$images) ) ):?>
<div style="margin: 10px 0px 5px 7px;"><?=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_"  ):?>
	<div style="width: 153px; float: left; text-align: center; margin-bottom: 5px; margin-right: 5px;">
	<div>
		<img src="/public/img/honapkepe/galeria/<?=$this->uri->segment(3)?>/thumbs/<?=$i?>" alt="<?=$i?>" style="max-width: 150px;" />
	</div>
	<? $kepnev = explode('_-_',$i); print preg_replace("/_/"," ",$kepnev[0]); ?>
	</div>
	<?endif;?>
<?endforeach;?>
<br />

<?endif;?>
</div>

<div data-role="footer">
	<p align="center">&copy; <?=lang('m_cegnev')?> | <a href="/<?if(hun()):?>palyazat<?else:?>monthpicture<?endif;?>/gallery/<?=(date('m',time())+11)?>" data-ajax="false"><?=lang('m_teljesv')?></a></p>
</div>
