{if $userquery->login_check('',true)}
{else}

{lang code='Login to upload videos and much more'}

{/if}
{if has_sidebar('index-sidebar-left')} {sidebar('index-sidebar-left')} {else} {if $userquery->udetails && $userquery->udetails.total_subscriptions > 0} {$subscriptions=$userquery->get_user_subscriptions($userquery->udetails.userid)} {if $subscriptions}

{lang code='Subscriptions'}

    {foreach $subscriptions as $sub} {include_template_file file="blocks/user.html" user=$sub display_method='index_sidebar' subs='true'} {/foreach}
{/if} {/if}

{lang code='Browse'}

{$categories=getCategoryList(['type'=>'video'])} {if $categories} {/if}
{$featured_users=get_users(['limit'=>'10','featured'=>'yes'])} {if $featured_users}

{lang code='Featured Users'}

    {foreach $featured_users as $feature_user} {include_template_file file="blocks/user.html" user=$feature_user display_method='index_sidebar' subs='false'} {/foreach}
{/if} {/if}
{if is_installed('editorspick')}
{if $editor_picks}
{include_template_file file="blocks/editor_pick/video_block.html" video=$editor_picks.0}
{foreach $editor_picks as $video} {include_template_file file='blocks/editor_pick/index_featured_video.html' video=$video first=$video@first} {/foreach}
{else}
There is no video in editor's pick, Please Add Videos In Editor's Pick
Videos Manager > Add to editor's pick
{/if}
{/if}
{if has_sidebar('index-sidebar-right')} {sidebar('index-sidebar-right')} {else} {$last_viewed=get_photos(['limit'=>'8','order'=>' last_viewed DESC'])} {if $last_viewed}

{lang code='Being Viewed Photos'}

{foreach $last_viewed as $photo} {include_template_file file="blocks/photo.html" photo=$photo display_method='index_sidebar'} {/foreach}
{/if} {/if}
{$videos=get_videos(['limit'=>16])} {if $videos} {$heading='Latest Videos'} {$more_mode='recent'} {/if}
{if $videos}

{$heading}

{/if}

Being Watched

{$last_viewed=get_videos(['limit'=>'8','order'=>' last_viewed DESC'])} {if $last_viewed}
{foreach $last_viewed as $video}
{/foreach}
{/if}
{$featured_videos=get_videos(['limit'=>8,'featured'=>'yes'])} {if $featured_videos} {/if} {AD place='ad_468x60'} {$photos=get_photos(['limit'=>9])} {if $photos} {$heading='Latest Photos'} {$more_mode='recent'} {/if} {if $photos}

{lang code=$heading}

{foreach $photos as $photo} {include_template_file file="blocks/photo.html" photo=$photo display_method="index_photos" iteration=$photo@iteration last=$photo@last first=$photo@first} {/foreach}
{/if}