<?
$user = $this->phpsession->get('user');
$mobil = $user['mobil'];
?>

<style type="text/css">
#balelso{
	font-size: 12px;
}
#balelso a, #masodik .korosbg{
	color: #0000EE;
	background: url(/public/img/welcome/2014/nyilkorben.png) right center no-repeat transparent !important;
	padding: 15px 23px 10px 0 !important;
}
#welcome #harmadik a{
	color: #404040;
}
#welcome #harmadik a, #welcome #masodik .welboxsmall a{
	color: #404040;
	font-size: 12px;
}
#welcome #harmadik a:hover, #welcome #masodik .welboxsmall a:hover{
	text-decoration: underline;
}

#masodik .welboxbig ul a, #masodik .welboxsmall .wellinka{
	color: #0000EE;
	font-size: 12px;
	background: url(/public/img/welcome/2014/more.jpg) right center no-repeat transparent;
	padding-right: 10px;
}
#masodik .welboxbig{
	background: #F5F5F5;
	margin-right: 15px;
	width: 325px;
	font-size: 12px;
	height: 125px;
}
#masodik .welboxsmall{
	background: #F5F5F5;
	width: 232px;
	float: right;
	height: 125px;
}
#masodik ul{padding: 0;}
#welcome #masodik .welboxtit{
	font-size: 18px;
}

#harmadik{margin-top: 15px;}
#harmadik .welboxbig{
	background: none;
	margin: 0 2px;
	width: 217px;
	height: 252px;
}
#menu{height: 20px;}
#header{ height: 89px; }
.wellinkdiv{top: 83px;}
</style>

<div id="welcome" style="">

<div style="position: absolute; z-index: 30;"><img src="/public/img/welcome/2012/submenu_shadow.png" alt="shadow box" /></div>

<div id="elsodiv" style="height: 405px; background: none; padding-top: 15px;">
	<div id="flash" style="height: 405px; overflow: hidden; float: left;">
		<?if(isset($kepek) && is_array($kepek) && count($kepek)>0):?>
			<div id="chocoslides" style="width: 720px; height: 405px;">
			<?foreach($kepek as $kep):?>
				<?if( file_exists($utvonal.$kep->img) && !is_dir($utvonal.$kep->img) ):?>
				<a href="<?=$kep->link?>" title="<?=$kep->title?>"><img src="/<?=$utvonal?><?=$kep->img?>" alt="<?=$kep->title?>" /></a>
				<?endif;?>
			<?endforeach;?>
			</div>
		<?else:?>
			<img src="/public/img/banner/reel_banners/banner_2012_features.jpg" alt="ARCHLine Interior" />
		<?endif;?>
	</div>
	
	<div id="balelso" style="height: 405px; background: #f5f5f5; float: right; margin-right: 8px; padding-right: 5px; margin-right: 0px; position: relative;">
		<div style="background: #969696; color:#ffffff; padding: 10px; position: absolute; top: 360px; margin: -5px; height: 30px;"><?=$foinfolinkek[0]->info?></div>
		<?unset($foinfolinkek[0]);?>
		<h1 style="margin: 5px 0 5px 0; font-size: 17px; text-align: center; border-bottom: 1px solid #ffffff; padding: 4px; width: auto;"><?=$h1cim?></h1>
		<p style="padding-top: 3px; font-size: 14px;"><strong><?=$fo_info->cim_2014?></strong></p>
		<p><?=$fo_info->info?></p>
		<?foreach($foinfolinkek as $info):?>
		<br /><a href="<?=$info->link?>" title="<?=$info->info?>"><?=$info->cim_2014?></a><br />
		<?endforeach;?>
	</div>
</div>

<div style="clear: both;"></div>

<div id="masodik">
		
	<div class="welboxbig">
	<div class="welboxtit"><?=$dobozok[0]->cim_2014?></div>
	<ul>
		<?foreach($dobozok[0]->infok as $info):?>
		<li>
			<div class="wellinkdiv" style="float: left;">
				<a href="<?=$info->link?>" class="korosbg wellinka"><?=$info->cim_2014?></a>
			</div>
			<div class="wellinkdiv">
				<a href="/interior/system" class="wellinka"><?=lang('sys_req')?></a>
			</div>
			<div class="clear"></div>
			<span><?=$info->info?></span>
			
		</li>
		<?endforeach;?>
	</ul>
	</div>
		
	<div class="welboxbig">
	<div class="welboxtit"><?=$dobozok[1]->cim_2014?></div>
	<ul style="padding: 0px;">
		<?foreach($dobozok[1]->infok as $info):?>
		<li style="margin-top: 5px;">
			<a href="<?=$info->link?>" title="<?=$info->info?>">
				<?=$info->cim_2014?>
			</a>
		</li>
		<?endforeach;?>
	</ul>
	</div>
		
	<div class="welboxsmall">
		<div class="welboxtit"><?=$dobozok[2]->cim_2014?></div>
			<ul><li>
			<div class="wellinkdiv">
				<a class="wellinka" href="/news" style="color: #0000EE;">Archive</a>
			</div>
			</li></ul>
			<? $nyelv = hun() ? "hun" : "eng";
			$hirek_lista = $this->db->query("SELECT *, DATE(CONCAT(news_y,'/',news_m,'/',news_d)) as ujdatum  FROM `news` WHERE news_lang='{$nyelv}' AND news_arch=0 AND public=1 order by ujdatum DESC LIMIT 0,4")->result(); ?>
			<?$ideiglenes=array();?>
			<?if($hirek_lista):?>
				<?foreach($hirek_lista as $hir):?>
					<?$datum=$hir->news_y. '-' . $hir->news_m . '-' . $hir->news_d;?>
					<?$hir->datum= date('D, d M Y H:i:s +0200', strtotime($datum));?>
					<?array_push($ideiglenes,$hir);?>
				<?endforeach;?>
				<?usort($ideiglenes,"hasonlito")?>
			
				<ul id="newslist" style="padding-left: 15px;">
				<?foreach($ideiglenes as $hir):?>
					<li>
					<?if($hir->url):?><?=anchor('news/show/'.$hir->url,$hir->news_title,"class='welcomenews'")?>
					<?else:?><?=anchor('news/show/'.$hir->news_id,$hir->news_title,"class='welcomenews'")?>
					<?endif;?>
					</li>
				<?endforeach;?>
				</ul>
			<?endif;?>
		</div>
</div>
<div style="clear: both;"></div>

<div id="harmadik">
	<div class="welboxbig">
	<div class="welboxtit"
		<?if($dobozok[3]->kep!="" && file_exists('public/img/welcome/2014/'.$dobozok[3]->kep)):?>
			style="background: url(/public/img/welcome/2014/<?=$dobozok[3]->kep?>) 0 0 no-repeat transparent; padding: 15px 0 10px 45px;"
		<?endif;?>
		>
		<?=$dobozok[3]->cim_2014?></div>
	<ul style="padding: 0px;">
		<?foreach($dobozok[3]->infok as $info):?>
		<li>
			<a href="<?=$info->link?>" title="<?=titlecsere($info->info)?>">
				<?=$info->cim_2014?>
			</a>
		</li>
		<?endforeach;?>
	</ul>
	</div>
	
	
	<div class="welboxbig">
	<div class="welboxtit"
		<?if($dobozok[4]->kep!="" && file_exists('public/img/welcome/2014/'.$dobozok[4]->kep)):?>
			style="background: url(/public/img/welcome/2014/<?=$dobozok[4]->kep?>) 0 0 no-repeat transparent; padding: 15px 0 10px 45px;"
		<?endif;?>
		>
		<?=$dobozok[4]->cim_2014?>
	</div>
	<ul style="padding: 0px;">
		<?foreach($dobozok[4]->infok as $info):?>
		<li>
			<?if( substr(trim($info->link,'/'),0,7)!="public/" ):?>
				<a href="<?=$info->link?>" title="<?=titlecsere($info->info)?>">
					<?=$info->cim_2014?>
				</a>
			<?else:?>
				<a href="http://www.archline.hu/multimedia/imagegallery/<?=base64_encode($info->link)?>" class="galeriaframe" title="<?=titlecsere($info->info)?>">
					<?=$info->cim_2014?>
				</a>
			<?endif;?>
		</li>
		<?endforeach;?>
	</ul>
	</div>
	
	
	<div class="welboxbig">
	<div class="welboxtit"
		<?if($dobozok[5]->kep!="" && file_exists('public/img/welcome/2014/'.$dobozok[5]->kep)):?>
			style="background: url(/public/img/welcome/2014/<?=$dobozok[5]->kep?>) 0 0 no-repeat transparent; padding: 15px 0 10px 45px;"
		<?endif;?>
		>
		<?=$dobozok[5]->cim_2014?></div>
	<ul style="padding: 0px;">
		<?foreach($dobozok[5]->infok as $info):?>
		<li>
			<a href="<?=$info->link?>" title="<?=titlecsere($info->info)?>">
				<?=$info->cim_2014?>
			</a>
			<div class="clear"></div>
		</li>
		<?endforeach;?>
	</ul>
	</div>
	
	
	<div class="welboxbig">
	<div class="welboxtit"
		<?if($dobozok[6]->kep!="" && file_exists('public/img/welcome/2014/'.$dobozok[6]->kep)):?>
			style="background: url(/public/img/welcome/2014/<?=$dobozok[6]->kep?>) 0 0 no-repeat transparent; padding: 15px 0 10px 45px;"
		<?endif;?>
		>
		<?=$dobozok[6]->cim_2014?></div>
	<ul style="padding: 0px;">
		<?foreach($dobozok[6]->infok as $info):?>
		<li>
			<a href="<?=$info->link?>" title="<?=titlecsere($info->info)?>">
				<?=$info->cim_2014?>
			</a>
			<div class="clear"></div>
		</li>
		<?endforeach;?>
	</ul>
	</div>
</div>


</div>

<?function titlecsere($input){
	$output = str_replace(array('"','<br />'),array('&quot;',' '),$input);
	return $output;
}?>