<div style="padding: 5px 0 0 5px;">

<?if(hun()):?>
	<? $lap = $this->mpages->get_row(587); ?>
<?else:?>
	<? $lap = $this->mpages->get_row(588);?>
<?endif;?>

<?
	$kezdo = "<table border=\"1\" cellspacing=\"0\" cellpadding=\"3\">\n<tr>\n\t<th>".lang('date_lbl')."</th>";
	$kezdo .= "\n\t<th>".lang('frissites_info')."</th>";
	$kezdo .= "\n\t<th>".lang('type_lbl')."</th>";
	$kezdo .= "\n\t<th>".lang('download')."</th>";
	$kezdo .= "\n\t<th style=\"width: 300px;\">".lang('frissites_focus')."</th>\n</tr>";
	$vege = "</table>";
//	$reszek = explode('#tablazat#',$lap->page_body);
	foreach($frissitesek as $frissites){
		if(hun()){
			$frissites->doksi = $frissites->doksi_hun;
			$frissites->leiras = $frissites->leiras_hun;
		}
		
		
		if(!isset($tabla[$frissites->ev]))
			$tabla[$frissites->ev] = $kezdo;
		
		$tabla[$frissites->ev] .= "\n<tr>";
		$tabla[$frissites->ev] .= "\n\t<td>".substr($frissites->datum,0,16)."</td>";
		$tabla[$frissites->ev] .= "\n\t<td>";
		if(file_exists('public/downloads/'.$frissites->doksi) && is_file('public/downloads/'.$frissites->doksi) )
			$tabla[$frissites->ev] .= "<a href=\"/public/downloads/".$frissites->doksi."\">".$frissites->pkgid."</a>";
		elseif($frissites->doksi != "" && substr($frissites->doksi,-4) != ".pdf" && $frissites->doksi != "0" )
			$tabla[$frissites->ev] .= "<a href=\"".$frissites->doksi."\"><strong>".$frissites->pkgid."</strong></a>";
		else
			$tabla[$frissites->ev] .= $frissites->pkgid;
		$tabla[$frissites->ev] .= "</td>";
		$tabla[$frissites->ev] .= "\n\t<td>".$frissites->tipus."</td>";
		$tabla[$frissites->ev] .= "\n\t<td>";
		if(file_exists('public/downloads/'.$frissites->fajl) && is_file('public/downloads/'.$frissites->fajl) )
			$tabla[$frissites->ev] .= "<a href=\"/public/downloads/".$frissites->fajl."\">".lang('download')."</a>";
		else
			$tabla[$frissites->ev] .= "&nbsp;";
		$tabla[$frissites->ev] .= "</td>";
		$tabla[$frissites->ev] .= "\n\t<td>".$frissites->leiras."</td>";
		$tabla[$frissites->ev] .= "\n</tr>";
	}
	
	foreach($tabla as $k=>$tev){
		$tev .= $vege;
		$cserelendo = '#tablazat'.$k.'#';
		$lap->page_body = str_ireplace($cserelendo, $tev, /*$reszek[0]*/$lap->page_body);
	//	print " cserélendő: ".$cserelendo;
	}
	
	$reszek = explode('#tablazat#',$lap->page_body);
?>

<h1><?=$lap->page_title?></h1>

<?=$lap->page_body?>


</div>