{include file="$gentemplates/$header_tpl"}
	<div>
        <div>
            <h2>{$lang.section.clubs}
            <ins onclick="javascript:location.href='{$site_root}/{$seo.club}?sel=create';" class="add-group-icon sub_icon" title="{$header_s.club_menu_3}">&nbsp;</ins>
            </h2>
        </div>
       
            {if $par eq 'my'}
				<div class="top_menu">
					<div>&nbsp;</div>
					<!-- main tabs -->	
					<div class="main_tabs">					
						<div class="tab_block first {if $filter eq ''}active{/if}">
							<a href="{$site_root}/{$seo.club}?sel=my_club">
								{$lang.club.my_club.all} ({$count_all})
							</a>
						</div>
						<div class="tab_block {if $filter eq 'own'}active{/if}">
							<a href="{$site_root}/{$seo.club}?sel=my_club&filter=own">
								{$lang.club.my_club.own} ({$count_own})
							</a>
						</div>
						<div class="tab_block {if $filter eq 'join'}active{/if}">
							<a href="{$site_root}/{$seo.club}?sel=my_club&filter=join">
								{$lang.club.my_club.join} ({$count_join})
							</a>
						</div>
					</div>
				</div>
				<!-- end main tabs -->
            {/if}
        
        	{*if $form.err}
        		*&nbsp;{$form.err}
        	{/if*}
        <div class="club_content" style="display:table;width:100%;">
			<p>&nbsp;</p>
			{if $links_top}
			<div style="display:table;width:100%;padding: 15px 0;">				
				{include file="$gentemplates/pagination_top.tpl"}
			</div>
			{/if}
			
			<div style="display:table;">
                {section name=s loop=$clubs}
                    <div class="club" style="overflow:hidden;padding-bottom:10px;">
                    {strip}
                        <div class="float_left" style="width: {$form.icon_max_width+10}px;">
							<a class="imgcanvas_container" href="{$clubs[s].link}"><img src="{$clubs[s].icon_path}" class="icon imgcanvas" alt=""></a>
						</div>
						<div style="padding:0 10px; width: 229px;" class="float_left" valign="top" >
							<p>
								<span class="text_head">
									<a href="{$clubs[s].link}">{$clubs[s].club_name}</a>
								</span>&nbsp;&nbsp;&nbsp;
								<font class="text_hidden">
									{if $clubs[s].is_open eq 1}{$lang.club.public}
									{else}{$lang.club.private}{/if} 
									{$lang.section.club}
								</font>
							</p>
							<p>
								{$lang.club.club_category}:&nbsp;{$clubs[s].category}
							</p>
							<p>
								{if $clubs[s].user_in_club eq 0}
									<input type="button" onclick="document.location.href='{$clubs[s].join_link}';" value="{$lang.club.join_club}">
								{else}
									<p class="header_club">
										<b>{if $clubs[s].user_is_leader eq '1'}{$lang.club.owner}{else}{$lang.club.joined}{/if}</b>
									</p>
								{/if}
							</p>
							{if $clubs[s].user_in_club ne 0 && $clubs[s].user_is_leader ne '1'}
								<p><a href="{$clubs[s].leave_link}">{$lang.club.leave_club}</a></p>
							{/if}
						</div>
						<div style="width:350px;float:left;">
							<p class="left width">{$clubs[s].members_count}&nbsp;{$lang.club.members}</p>
							<div class="left wysiwyg_content">{$clubs[s].description|strip_tags}</div>
						</div>
                    {/strip}                        
                    </div>
                {/section}
            </div>            
   			{include file="$gentemplates/pagination_bottom.tpl"}
			</div>
			</div>
        <!--/div>		
    </div-->
{include file="$gentemplates/$footer_tpl"}