{if $splash == '1'}
{php}
	//test for existence of cookies if the cookie from splash page has not been set...
	if(!$_COOKIE[splash]){
{/php}
{literal}
	<script type="text/javascript">
	// name, value, expires, path, domain, secure
	Set_Cookie( 'enter', 'none', '', '/', '', '' );
	
	// if Get_Cookie succeeds, cookies are enabled, since the cookie was successfully created.
	if ( Get_Cookie( 'enter' ) )
	{
		cookie_set = true;
		// name, path, domain
		// make sure you use the same parameters in Set and Delete Cookie.
		Delete_Cookie('enter', '/', '');
		window.location = 'enter.php';
	}
	// if the Get_Cookie test fails, cookies are not enabled for this session.
	else
		cookie_set = false;
	</script>
{/literal}
{php}	
	} 
{/php}
{/if}
<div id="content">
    <div class="left span-755">
        <div class="box">
            
            <div class="btitle">
                <div class="btitlel"><h2>VIDEOS BEING WATCHED</h2></div>
                <div class="btitler"><a href="{$relative}/videos?o=bw">See More Being Watched Videos...</a></div>
                <div class="clear"></div>
            </div>
            {if $viewed_videos}
            {section name=i loop=$viewed_videos}
            <div class="video_box">
                <a href="{$relative}/video/{$viewed_videos[i].VID}/{$viewed_videos[i].title|clean}"><img src="{$relative}/media/videos/tmb/{$viewed_videos[i].VID}/{$viewed_videos[i].thumb}.jpg" title="{$viewed_videos[i].title|escape:'html'}" alt="{$viewed_videos[i].title|escape:'html'}" width="160" height="120" id="rotate_{$viewed_videos[i].VID}_viewed" /><br /><span class="font-13 font-bold">{$viewed_videos[i].title|truncate:21:' ...':true|escape:'html'}</span><br />{if $viewed_videos[i].type == 'private'}<img alt="" style="position: absolute; left: 0px; top: 0px; width: 160px; height: 120px;" src="{$relative_tpl}/images/private-video.png" />{/if}</a>
                <div class="box_left">
                    {insert name=duration assign=duration duration=$viewed_videos[i].duration}
                    {$duration}<br />
                    {insert name=time_range assign=addtime time=$viewed_videos[i].addtime}
                    {$addtime}
                </div>
                <div class="box_right">
                    {insert name=rating_small assign=video_rating rating=$viewed_videos[i].rate}
                    {$video_rating}
                    <div class="clear_right"></div>                                                            
                    {$viewed_videos[i].viewnumber} views
                </div>
                <div class="clear"></div>
            </div>
            {/section}
            <div class="clear_left"></div>
            {else}
                <p>&nbsp;&nbsp;&nbsp;No viewed videos!</p>
            {/if}
        </div>
        <div class="box">
            
            <div class="btitle">
                <div class="btitlel"><h2>MOST RECENT VIDEOS</h2></div>
                <div class="btitler"><a href="{$relative}/videos?o=mr">See More Most Recent Videos...</a></div>
                <div class="clear"></div>
            </div>
            {if $recent_videos}
            {section name=i loop=$recent_videos}
            <div class="video_box">
                <a href="{$relative}/video/{$recent_videos[i].VID}/{$recent_videos[i].title|clean}"><br /><img src="{$relative}/media/videos/tmb/{$recent_videos[i].VID}/{$recent_videos[i].thumb}.jpg" title="{$recent_videos[i].title|escape:'html'}" alt="{$recent_videos[i].title|escape:'html'}" width="160" height="120" id="rotate_{$recent_videos[i].VID}_recent" /><br /><span class="font-13 font-bold">{$recent_videos[i].title|truncate:21:' ...':true|escape:'html'}</span>{if $recent_videos[i].type == 'private'}<img alt="" style="position: absolute; left: 0px; top: +15px; width: 160px; height: 120px;" src="{$relative_tpl}/images/private-video.png" />{/if}</a>
                <div class="box_left">
                    {insert name=duration assign=duration duration=$recent_videos[i].duration}
                    {$duration}<br />
                    {insert name=time_range assign=addtime time=$recent_videos[i].addtime}
                    {$addtime}
                </div>
                <div class="box_right">
                    {insert name=rating_small assign=video_rating rating=$recent_videos[i].rate}
                    {$video_rating}
                    <div class="clear_right"></div>                                                            
                    {$recent_videos[i].viewnumber} views
                </div>
                <div class="clear"></div>
            </div>
            {/section}
            <div class="clear_left"></div>
            {else}
                <p>&nbsp;&nbsp;&nbsp;No recent videos!</p>
            {/if}            
        </div>
        <div class="box">
	    
	    <div class="btitle"><h2>SPONSORS</h2></div>
    	    {insert name=adv assign=adv group='index_bottom'}
    	    {if $adv}<br /><div class="ads">{$adv}</div><br />{/if}
        </div>
    </div>
    <div class="right span-200">
	    {insert name=load_plugin page=index plugin=login}
	    {insert name=load_plugin page=index plugin=statistics}
        <div class="box">
            
            <div class="btitle"><h2>SPONSORS</h2></div>
            {insert name=adv assign=adv group='index_right'}
            {if $adv}<br /><div class="ads">{$adv}</div><br />{/if}
        </div>
    </div>
    <div class="clear"></div>
</div>
