<?
$user = $this->phpsession->get('user');
$mobil = $user['mobil'];
$nyelv = hun() ? "hun" : "eng";
?>


<div id="welcome">
	
	<div style="position: absolute; z-index: 10;"><img src="/public/img/welcome/2012/submenu_shadow.png" alt="shadow box" /></div>
	
	<div id="elsodiv">
	<div class="coda-slider-wrapper" style="width: 720px; float: left; padding-top: 0;">
	<div class="preload" id="bannerek">
		<?$i=1;?>
		<?foreach($nagykepek as $kep):?>
		<div class="panel">
			<img src="/public/img/banner/reel_banners/<?=$kep->filename?>" style="width: 720px; height: 405px;" alt="" />
			<div class="codalapozo" style="position: relative; top: -110px; height: 0">
			<div style="width: 620px; height: 80px; background: url(/public/img/welcome/bg_szurke.png) repeat; padding: 15px 50px; color: #FFF; font-size: 1.6em;">
			<?if($kep->link):?>
				<?if(strlen($kep->link)==11):?>
					<a href="http://www.youtube.com/embed/<?=$kep->link?>?rel=0" class="fancyiframe" style="color: #FFF;">
				<?else:?>
					<a href="<?=$kep->link?>" style="color: #FFF;">
				<?endif;?>
				<?=$i?>. title
				</a>
			<?else:?>
				<?=$i?>. title
			<?endif;?>
			</div>
			</div>
		</div>
		<?$i++?>
		<?endforeach;?>
	</div>
	</div>
	
	<div id="jobbelso" class="welboxsmall" style="margin-right: 10px;">
		
		<div class="mptitle">MOST POPULAR</div>
		<div class="coda-slider-wrapper">
		<div class="coda-slider preload" id="codaslider" style="max-height: 200px;min-height: 200px;">
			<div class="panel">
				<div class="panel-wrapper">
					<div style="float: right;" class="wellinkdivfirst">
						<a href="<?=$fo_info->link?>" class="wellinka"><?=$fo_info->link_cim?> <img src="/public/img/welcome/2012/arrow_link.png" alt="more" /></a>
					</div>
					<h2 class="title"><?=lang('product')?></h2>
					<p style="padding-top: 0px; margin-top: 0px; color: #f96400; font-size: 16px;"><strong><?=$fo_info->cim?></strong></p>
					<p><?=$fo_info->info?></p>
				</div>
			</div>
			<div class="panel">
				<div class="panel-wrapper">
					<h2 class="title"><?=lang('news')?></h2>
					<div class="wellinkdivfirst">
						<a class="wellinka" href="/news" style="top: -5px;">
							Archive <img alt="archive" src="/public/img/welcome/2012/arrow_link.png" />
						</a>
					</div>
					<br />
					<? $hirek_lista = $this->db->query("SELECT *, DATE(CONCAT(news_y,'/',news_m,'/',news_d)) as ujdatum  FROM `news` WHERE news_lang='{$nyelv}' order by ujdatum DESC LIMIT 0,7")->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">
						<?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 class="panel">
				<div class="panel-wrapper">
					<h2 class="title"><?=lang('int_menu_gal')?></h2>
					<br />
					<?foreach($dobozok[2]->infok as $info):?>
					<a href="/multimedia/imagegallery/<?=base64_encode($info->link)?>" class="galeriaframe"><?=$info->info?></a><br /><br />
					<?endforeach;?>
				</div>
			</div>
		</div>
		</div>
		
		<div class="mptitle" style="margin-top: 15px;">Getting started and download</div>
		<div class="coda-slider-wrapper">
		<div class="coda-slider preload" id="codaslider2">
			<div class="panel">
				<div class="panel-wrapper">
					<h2 class="title">Getting started guide</h2>
					<p>This guide is designed to learn how to use ARCHLine.XP to design, communicate and document your project.</p>
					<?=$this->load->view('ikonok_sp')?>
				</div>
			</div>
			<div class="panel">
				<div class="panel-wrapper">
					<h2 class="title"><?=$dobozok[4]->cim?></h2>
					<?foreach($dobozok[4]->infok as $info):?>
					<a href="<?=$info->link?>"><?=$info->cim?></a><br />
					<?endforeach;?>
				</div>
			</div>
		</div>
		
	</div>
	</div>
	</div>
	
	<div style="clear: both;"></div>
	
		<div id="masodik">
		
		
		<div class="welboxsmall" style="margin-left: 7px;">
		<div class="welboxtit"><?=$dobozok[0]->cim?></div>
		<ul class="mycarousel jcarousel-skin-tango">
			<?foreach($dobozok[0]->infok as $info):?>
			<li>
				<?if( $info->link ):?>
				<div class="wellinkdiv">
					<a href="<?=$info->link?>" class="wellinka"><?=$info->link_cim?> <img src="/public/img/welcome/2012/arrow_link.png" alt="more" /></a>
				</div>
				<?endif;?>
				<?if( $info->kep && file_exists($info->kep) ):?>
				<a href="<?=$info->link?>">
					<img src="/<?=$info->kep?>" width="110px" height="60px" alt="" style="float: left" />
				</a>
				<?endif;?>
				<h2 class="welboxitit"><a href="<?=$info->link?>"><?=$info->cim?></a></h2>
				<div class="clear"></div>
				<span><?=$info->info?></span>
				
			</li>
			<?endforeach;?>
		</ul>
		</div>
		
		
		<div class="welboxsmall">
		<div class="welboxtit">Education</div>
		<ul class="mycarousel jcarousel-skin-tango">
			<?foreach($dobozok[0]->infok as $info):?>
			<li>
				<?if( $info->link ):?>
				<div class="wellinkdiv">
					<a href="http://www.archline.hu/multimedia/imagegallery/<?=base64_encode($info->link)?>" class="wellinka galeriaframe"><?=$info->link_cim?> <img src="/public/img/welcome/2012/arrow_link.png" alt="more" /></a>
				</div>
				<?endif;?>
				<?if( $info->kep && file_exists($info->kep) ):?>
				<a href="http://www.archline.hu/multimedia/imagegallery/<?=base64_encode($info->link)?>" class="galeriaframe">
					<img src="/<?=$info->kep?>" width="110px" height="60px" alt="" />
				</a>
				<?endif;?>
				<?if($info->cim):?>
				<h2 class="welboxitit2"><a href="<?=$info->link?>"><?=$info->cim?></a></h2>
				<?endif;?>
				<div class="clear"></div>
				<span><?=$info->info?></span>
				
			</li>
			<?endforeach;?>
		</ul>
		</div>
		
		
		<div class="welboxsmall">
		<div class="welboxtit">Modelling services</div>
		<ul class="mycarousel jcarousel-skin-tango">
			<?foreach($dobozok[3]->infok as $info):?>
			<li>
				<?if( $info->link ):?>
				<div class="wellinkdiv">
					<a href="http://www.archline.hu/multimedia/imagegallery/<?=base64_encode($info->link)?>" class="wellinka galeriaframe"><?=$info->link_cim?> <img src="/public/img/welcome/2012/arrow_link.png" alt="more" /></a>
				</div>
				<?endif;?>
				<?if( $info->kep && file_exists($info->kep) ):?>
				<a href="http://www.archline.hu/multimedia/imagegallery/<?=base64_encode($info->link)?>" class="galeriaframe">
					<img src="/<?=$info->kep?>" width="110px" height="60px" alt="" />
				</a>
				<?endif;?>
				<?if($info->cim):?>
				<h2 class="welboxitit2"><a href="<?=$info->link?>"><?=$info->cim?></a></h2>
				<?endif;?>
				<div class="clear"></div>
				<span><?=$info->info?></span>
				
			</li>
			<?endforeach;?>
		</ul>
		</div>
		
		
		<div class="welboxsmall">
		<div class="welboxtit"><?=$dobozok[1]->cim?></div>
		<ul class="mycarousel jcarousel-skin-tango">
			<?foreach($dobozok[1]->infok as $info):?>
			<li>
				<?if( $info->link ):?>
				<div class="wellinkdiv">
					<a href="http://www.archline.hu/multimedia/imagegallery/<?=base64_encode($info->link)?>" class="wellinka galeriaframe"><?=$info->link_cim?> <img src="/public/img/welcome/2012/arrow_link.png" alt="more" /></a>
				</div>
				<?endif;?>
				<?if( $info->kep && file_exists($info->kep) ):?>
				<a href="http://www.archline.hu/multimedia/imagegallery/<?=base64_encode($info->link)?>" class="galeriaframe">
					<img src="/<?=$info->kep?>" width="110px" height="60px" alt="" />
				</a>
				<?endif;?>
				<?if($info->cim):?>
				<h2 class="welboxitit2"><a href="<?=$info->link?>"><?=$info->cim?></a></h2>
				<?endif;?>
				<div class="clear"></div>
				<span><?=$info->info?></span>
				
			</li>
			<?endforeach;?>
		</ul>
		</div>
		
		
		</div> <?// END masodik ?>
		<div style="clear: both; height: 0px; width: 962px;"></div>
		
		
		<div id="negyedik" class="holder">
			<?php $vidik = $this->muser->get_welcome_video();?>
			<div id="video-holder" rel="2" title="The Second Video">
				<?if(!$mobil):?>
				<object width="425" height="349">
				<param name="movie" value="http://www.youtube.com/v/<?=$vidik[0]->youtubeid?>?fs=1&amp;hl=hu_HU"></param>
				<param name="allowFullScreen" value="true"></param>
				<param name="allowscriptaccess" value="always"></param>
				<param name="wmode" value="opaque"></param>
				<embed src="http://www.youtube.com/v/<?=$vidik[0]->youtubeid?>?fs=1&amp;hl=hu_HU" type="application/x-shockwave-flash" width="425" height="349" allowscriptaccess="always" allowfullscreen="true" wmode="opaque"></embed>
				</object>
				<?endif;?>
			</div>
			<div id="videojobb">
				<div class="welboxtit" style="padding-top: 10px;">Video library</div>
				<?if(!hun()):?><div style="margin: 0px 5px 0px 5px;">See how ARCHLine.XP covers various aspects of your design process, and helps you to win more business.</div><?endif;?>
				<div id="videoklistakeret" class="scroll-pane" style="<?if(hun()):?>height: 330px;<?else:?>height: 300px;<?endif;?>">
				<?foreach($vidik as $video):?>
					<div title="<?=$video->cim?>" class="video" rel="<?=$video->youtubeid?>">
						<img src="/<?=$video->kep?>" alt="<?=$video->cim?>" />
						<h3><?=$video->cim?></h3>
						<?=$video->leiras?>
					</div>
					<div class="clear"></div>
				<?endforeach;?>
				</div>
			</div>
		</div>
		
</div>
