<?/*	Gyártó kategóriája	*/?>
<?if(!isset($userproject)):?>

<? $akt = $this->uri->segment(3); ?>
<script type="text/javascript">
jQuery(document).ready(function($){
	
	aktmenu();
	
	function aktmenu(){
		$('.colli').each(function(){
			
			var reg = /kat<?=$akt?>$/;
			if( reg.test($(this).attr('id')) ){
				if( "<?=trim($akt)?>" != "" ){
					$(this).addClass( 'colli-aktiv' );
					$(this).removeClass( 'colli-inaktiv' )
				}
			}
			
		});
	}
//	alert("betoltve");
});
</script>

<div id="collectionheader" <?if(hun()):?>style="background: url(/public/img/collection/stilus/header_bemutatoterem.png)"<?else:?>style="background: url(/public/img/collection/stilus/header_showroom.png)"<?endif;?>>
	<div class="collbal">
		<div class="collheadbal3">
			<?if($gyarto):?>
			<img src="/public/img/collection/<?=$gyarto->dir?>/logo.png" alt="<?=$gyarto->dir?> logo" width="239" height="122" title="<?=$gyarto->name?>" />
			<?else:?>
			<img src="/public/img/collection/nologo.png" alt="logo ?" width="239" height="122" />
			<?endif;?>
			<img src="/public/img/collection/stilus/menu_dropdown.png" alt="nyíl le" class="nyille2" />
		</div>
	</div>
	<div class="collheadbal2">
		<a href="/<?=$this->uri->segment(1)?><?//=$this->uri->segment(1)?>" class="colheadback">
			<img src="/public/img/collection/stilus/arrow_back.png" alt="vissza" /> &nbsp;<?=lang('backbrands')?>
		</a>
		<form action="/temp/showroomsearch" method="get">
		<input type="hidden" name="class" value="<?=$this->uri->segment(1)?>" />
		<input type="text" name="shsearch" class="search" style="position: relative; left: 555px; top: -110px;" />
		</form>
	</div>
</div>

<div class="clear"></div>


<div class="collbal" style="height: auto;">
<ul id="collullist">
	<?if(is_array($kategoriak)):?>
	<?foreach($kategoriak as $k=>$kat):?>
	<li class="colli colli-inaktiv" id="kat<?=$kat->c_id?>" ><a href="/<?=$this->uri->segment(1)?>/category/<?=$kat->c_id?>"><? hun() ? print $kat->nev_hun : print $kat->nev_eng;?></a></li>
	<?endforeach;?>
	<?else:?>
	<li class="colli colli-aktiv"><a href="#"><?=$kategoria?></a></li>
	<?endif;?>
</ul>
</div>



<div class="colljobb">
<?if( is_array($objektumok) && count($objektumok)>0):?>
<?$i=1;?>
<?foreach($objektumok as $obj):?>
<div class="listaelem" onclick="location.href='/<?=$this->uri->segment(1)?>/details/<?=$obj->o_id?>'" <?if($i%4==0):?>style="margin-right: 0px;"<?endif;?>>
	<? $mappa = isset($gyarto->dir) ? $gyarto->dir : $obj->gyartodir; ?>
	<? $nagykepek = scandir('public/img/collection/'.$mappa.'/'.$obj->o_id."/big"); $volt=false; ?>
	<?if(file_exists("public/img/collection/{$mappa}/{$obj->o_id}/zz_thumb.jpg")):?>
		<img src="/public/img/collection/<?=$mappa."/".$obj->o_id?>/zz_thumb.jpg" class="listakep" alt="" />
	<?else:?>
		<img src="/public/img/collection/object.png" class="listakep" alt="empty" />
	<?endif;?>
	<div class="sotetdoboz2">
		<? 
		if( isset($obj->title) ){
			print $obj->title;
		}else{
			hun() ? print $obj->title_hun : print $obj->title_eng;
		}
		?>
	</div>
</div>
<?$i++;?>
<?endforeach;?>
<?else:?>
<?=lang('collec_nincselemek')?>
<?endif;?>
</div>
<div class="clear" style="margin-bottom: 1px;"></div>





<?/*	Felhasználók projektjei	*/?>
<?else:?>




<div id="collectionheader" <?if(hun()):?>style="background: url(/public/img/collection/stilus/header_bemutatoterem.png)"<?else:?>style="background: url(/public/img/collection/stilus/header_showroom.png)"<?endif;?>>
	<div class="collbal">
		<div class="collheadbal3">
			<img src="/public/img/collection/<?=$gyarto->dir?>/logo.png" alt="<?=$gyarto->dir?> logo" width="239" height="122" title="<?=$gyarto->name?>" />
			<img src="/public/img/collection/stilus/menu_dropdown.png" alt="nyíl le" class="nyille2" />
		</div>
	</div>
	<div class="collheadbal2">
		<a href="/<?=$this->uri->segment(1)?>" class="colheadback">
			<img src="/public/img/collection/stilus/arrow_back.png" alt="vissza" /> &nbsp;<?=lang('backbrands')?>
		</a>
	</div>
</div>

<div class="clear"></div>


<div class="collbal">
<ul id="collullist">
	<?foreach($kategoriak as $k=>$kat):?>
	<li class="colli colli-inaktiv" ><a href="/<?=$this->uri->segment(1)?>/user/<?=$kat->userid?>/<?=$kat->project?>"><?=$kat->nev;?></a></li>
	<?endforeach;?>
</ul>
</div>




<div class="colljobb">
<?if( is_array($kategoriak) && count($kategoriak)>0):?>
<?$i=1;?>
<?foreach($kategoriak as $kat):?>
<div class="listaelem" onclick="location.href='/<?=$this->uri->segment(1)?>/user/<?=$kat->userid?>/<?=$kat->project?>'" <?if($i%4==0):?>style="margin-right: 0px;"<?endif;?>>
	<img src="/public/img/collection/users/<?=$kat->userid?>/<?=$kat->project?>/<?=$kat->project?>.jpg" class="listakep" alt="" />
	<div class="sotetdoboz2">
		<?=$kat->nev;?>
	</div>
</div>
<?$i++;?>
<?endforeach;?>
<?else:?>
<?=lang('collec_nincselemek')?>
<?endif;?>
</div>
<div class="clear" style="margin-bottom: 1px;"></div>
<?endif;?>
