<div id="content">
    <div class="left span-300">
        {include file='user_info.tpl'}        
        {if $friends}
        <div class="box">            
            <div class="btitle"><h2>{$username|upper}'S FRIENDS</h2></div>
            {section name=i loop=$friends}
            <div class="user-box">
                <a href="{$relative}/user/{$friends[i].username}"><img src="{$relative}/media/users/{if $friends[i].photo == ''}nopic-{$friends[i].gender}.gif{else}{$friends[i].photo}{/if}" alt="{$friends[i].username}'s avatar" /><br /><span class="font-12">{$friends[i].username|escape:'html'}</span></a><br />
            </div>                                                    
            {/section}
            <div class="clear_left"></div>
            <div class="blink">
                <a href="{$relative}/user/{$user.username}/friends">View All...</a>
            </div>                                                   
        </div>
        {/if}        
        {if $subscribers}
        <div class="box">
            
            <div class="btitle"><h2>{$username|upper}'S SUBSCRIBERS</h2></div>            
            {section name=i loop=$subscribers}
            <div class="user-box">
                <a href="{$relative}/user/{$subscribers[i].username}"><img src="{$relative}/media/users/{if $subscribers[i].photo == ''}nopic-{$subscribers[i].gender}.gif{else}{$subscribers[i].photo}{/if}" alt="{$subscribers[i].username}'s avatar" /><br /><span class="font-12">{$subscribers[i].username|escape:'html'}</span></a><br />
            </div>                                                    
            {/section}
            <div class="clear_left"></div>
            <div class="blink">
                <a href="{$relative}/user/{$user.username}/subscribers">View All...</a>
            </div>                                                   
        </div>
        {/if}        
        {if $subscriptions}
        <div class="box">
            
            <div class="btitle"><h2>{$username|upper}'S SUBSCRIPTIONS</h2></div>
            {section name=i loop=$subscriptions}
            <div class="user-box">
                <a href="{$relative}/user/{$subscriptions[i].username}"><img src="{$relative}/media/users/{if $subscriptions[i].photo == ''}nopic-{$subscriptions[i].gender}.gif{else}{$subscriptions[i].photo}{/if}" alt="{$subscriptions[i].username}'s avatar" /><br /><span class="font-12">{$subscriptions[i].username|escape:'html'}</span></a><br />
            </div>                                                    
            {/section}
            <div class="clear_left"></div>
            <div class="blink">
                <a href="{$relative}/user/{$user.username}/subscriptions">View All...</a>
            </div>                                                   
        </div>
        {/if}        
    </div>
    <div class="right span-650">
        {if $blog && $blog_module == '1'}
        <div class="box">
            
            <div class="btitle"><h2>BLOG</h2></div>
            <div class="blog_header">
                <h5><a href="{$relative}/blog/{$blog.BID}/{$blog.title|clean}">{$blog.title|escape:'html'}</a></h5>
                {insert name=time_range assign=addtime time=$blog.addtime}
                Views: {$blog.total_views} <strong>&middot;</strong> Posted: {$addtime}
            </div>
            <div class="blog_content">
                {$blog.content|nl2br}
            </div>
            <div class="blog_links_u">
                <div class="blog_links_l">
                    <a href="{$relative}/blog/{$blog.BID}/{$blog.title|clean}">{$blog.total_comments} comments</a> <strong>&middot;</strong>
                    <a href="{$relative}/blog/{$blog.BID}/{$blog.title|clean}">Post Comment</a>
                </div>
                <div class="blog_links_r">
                    <a href="{$relative}/user/{$username}/blog">See All</a>
                    {if isset($smarty.session.uid) && $smarty.session.uid == $user.UID}
                    <strong>&middot;</strong>
                    <a href="{$relative}/blog/edit/{$blog.BID}/{$blog.title|clean}">Edit</a> <strong>&middot;</strong>
                    <a href="{$relative}/blog/delete/{$blog.BID}">Delete</a>
                    {/if}
                </div>
                <div class="clear"></div>
            </div>
        </div>
        {/if}
        {if $albums && $photo_module == '1'}
        <div class="box">
            
            <div class="btitle">
                <div class="btitlel"><h2>PHOTO ALBUMS</h2></div>
                <div class="btitler"><a href="{$relative}/user/{$user.username}/albums">View All...</a></div>
                <div class="clear"></div>
            </div>
            {section name=i loop=$albums}
            <div class="album_box">
                <a href="{$relative}/album/{$albums[i].AID}/{$albums[i].name|clean}"><img src="{$relative}/media/albums/{$albums[i].AID}.jpg" title="{$albums[i].name|escape:'html'}" alt="{$albums[i].name|escape:'html'}" width="120" /><br /><span class="font-11 font-bold">{$albums[i].name|truncate:21:' ...':true|escape:'html'}</span><br />{if $albums[i].type == 'private'}<img alt="" style="position: absolute; left: 0px; top: 0px; width: 120px; height: 140px;" src="{$relative_tpl}/images/private-album.png" />{/if}</a>
                <div class="album_info">
                    <div class="album_left">
                        {$albums[i].total_photos} {if $albums[i].total_photos > 1}photos{else}photo{/if}<br />
                    </div>
                    <div class="album_right">
                        {insert name=rating_small assign=album_rating rating=$albums[i].rate}
                        {$album_rating}
                    </div>
                    <div class="clear"></div>
                    {insert name=time_range assign=addtime time=$albums[i].addtime}
                    Added: {$addtime}
                </div>
            </div>                                                   
            {/section}
            <div class="clear_left"></div>
        </div>
        {/if}
        {if $playlist}
        <div class="box">
            
            <div class="btitle">
                <div class="btitlel"><h2>PLAYLIST</h2></div>
                <div class="btitler"><a href="{$relative}/user/{$user.username}/playlist">View All...</a></div>
                <div class="clear"></div>
            </div>
            <div id="remove_playlist_message" class="posting" style="display:none"></div>
            {section name=i loop=$playlist}
            <div id="playlist_video_{$playlist[i].VID}" class="video_box_small">
                <a href="{$relative}/video/{$playlist[i].VID}/{$playlist[i].title|clean}"><img src="{$relative}/media/videos/tmb/{$playlist[i].VID}/{$playlist[i].thumb}.jpg" alt="{$playlist[i].title|escape:'html'}" width="140" id="playlistrotate_{$playlist[i].VID}" /><br /><span class="font-12 font-bold">{$playlist[i].title|truncate:21:' ...':true|escape:'html'}</span><br />{if $playlist[i].type == 'private'}<img alt="" style="position: absolute; left: 0px; top: 0px; width: 140px; height: 105px;" src="{$relative_tpl}/images/private-video.png" />{/if}</a>
                <div class="vbox_small_left">
                    {insert name=duration assign=duration duration=$playlist[i].duration}
                    {$duration}
                </div>
                <div class="vbox_small_right">
                    {insert name=rating_small assign=video_rating rating=$playlist[i].rate}
                    {$video_rating}
                    <div class="clear_right"></div>
                    {$playlist[i].viewnumber} views
                </div>
                <div class="clear"></div>
                {if isset($smarty.session.uid) && $smarty.session.uid == $user.UID}
                <div class="vbox_small_remove">
                    <a href="#remove_video" id="remove_video_from_playlist_{$playlist[i].VID}" class="remove">Remove</a>
                </div>
                {/if}
            </div>
            {/section}
            <div class="clear_left"></div>
        </div>
        {/if}
        {if $videos_public}
        <div class="box">
            
            <div class="btitle">
                <div class="btitlel"><h2>PUBLIC VIDEOS</h2></div>
                <div class="btitler"><a href="{$relative}/user/{$user.username}/videos/public">View All...</a></div>
                <div class="clear"></div>
            </div>
            {section name=i loop=$videos_public}
            <div class="video_box_small">
                <a href="{$relative}/video/{$videos_public[i].VID}/{$videos_public[i].title|clean}"><span class="font-12 font-bold">{$videos_public[i].title|truncate:23:' ...':true|escape:'html'}</span><br /><img src="{$relative}/media/videos/tmb/{$videos_public[i].VID}/{$videos_public[i].thumb}.jpg" alt="{$videos_public[i].title|escape:'html'}" width="140" id="publicrotate_{$videos_public[i].VID}" /><br /></a>
                <div class="vbox_small_left">
                    {insert name=duration assign=duration duration=$videos_public[i].duration}
                    {$duration}
                </div>
                <div class="vbox_small_right">
                    {insert name=rating_small assign=video_rating rating=$videos_public[i].rate}
                    {$video_rating}
                    <div class="clear_right"></div>
                    {$videos_public[i].viewnumber} views
                </div>
                <div class="clear"></div>
            </div>
            {/section}
            <div class="clear_left"></div>
        </div>
        {/if}
        {if $videos_private}
        <div class="box">            
            <div class="btitle">
                <div class="btitlel"><h2>PRIVATE VIDEOS</h2></div>
                <div class="btitler"><a href="{$relative}/user/{$user.username}/videos/private">View All...</a></div>
                <div class="clear"></div>
            </div>
            {section name=i loop=$videos_private}
            <div class="video_box_small">
                <a href="{$relative}/video/{$videos_private[i].VID}/{$videos_private[i].title|clean}"><img src="{$relative}/media/videos/tmb/{$videos_private[i].VID}/{$videos_private[i].thumb}.jpg" alt="{$videos_private[i].title|escape:'html'}" width="140" id="privaterotate_{$videos_private[i].VID}" /><br /><span class="font-12 font-bold">{$videos_private[i].title|truncate:23:' ...':true|escape:'html'}</span><br /><img alt="" style="position: absolute; left: 0px; top: 0px; width: 140px; height: 105px;" src="{$relative_tpl}/images/private-video.png" /></a>
                <div class="vbox_small_left">
                    {insert name=duration assign=duration duration=$videos_private[i].duration}
                    {$duration}
                </div>
                <div class="vbox_small_right">
                    {insert name=rating_small assign=video_rating rating=$videos_private[i].rate}
                    {$video_rating}
                    <div class="clear_right"></div>
                    {$videos_private[i].viewnumber} views
                </div>
                <div class="clear"></div>
            </div>
            {/section}
            <div class="clear_left"></div>
        </div>
        {/if}
        {if $favorites}
        <div class="box">            
            <div class="btitle">
                <div class="btitlel"><h2>FAVORITE VIDEOS</h2></div>
                <div class="btitler"><a href="{$relative}/user/{$user.username}/favorite/videos">View All...</a></div>
                <div class="clear"></div>
            </div>
            <div id="remove_favorite_message" class="posting" style="display:none"></div>
            {section name=i loop=$favorites}
            <div id="favorite_video_{$favorites[i].VID}" class="video_box_small">
                <a href="{$relative}/video/{$favorites[i].VID}/{$favorites[i].title|clean}"><img src="{$relative}/media/videos/tmb/{$favorites[i].VID}/{$favorites[i].thumb}.jpg" alt="{$favorites[i].title|escape:'html'}" width="140" id="favoriterotate_{$favorites[i].VID}" /><br /><span class="font-12 font-bold">{$favorites[i].title|truncate:23:' ...':true|escape:'html'}</span><br />{if $favorites[i].type == 'private'}<img alt="" style="position: absolute; left: 0px; top: 0px; width: 140px; height: 105px;" src="{$relative_tpl}/images/private-video.png" />{/if}</a>
                <div class="vbox_small_left">
                    {insert name=duration assign=duration duration=$favorites[i].duration}
                    {$duration}
                </div>
                <div class="vbox_small_right">
                    {insert name=rating_small assign=video_rating rating=$favorites[i].rate}
                    {$video_rating}
                    <div class="clear_right"></div>
                    {$favorites[i].viewnumber} views
                </div>
                <div class="clear"></div>
                {if isset($smarty.session.uid) && $smarty.session.uid == $user.UID}
                <div class="vbox_small_remove">
                    <a href="#remove_video" id="remove_video_from_favorite_{$favorites[i].VID}" class="remove">Remove</a>
                </div>
                {/if}
            </div>
            {/section}
            <div class="clear_left"></div>
        </div>
        {/if}
        {if $photos && $photo_module == '1'}
        <div class="box">            
            <div class="btitle">
                <div class="btitlel"><h2>FAVORITE PHOTOS</h2></div>
                <div class="btitler"><a href="{$relative}/user/{$user.username}/favorite/photos">View All...</a></div>
                <div class="clear"></div>
            </div>
            <div id="remove_favorite_photo_message" class="posting" style="display: none;"></div>
            <div class="photo_row">
            {section name=i loop=$photos}
            <div id="favorite_photo_{$photos[i].PID}" class="photo_box">
                <a href="{$relative}/photo/{$photos[i].PID}/"><img src="{$relative}/media/photos/tmb/{$photos[i].PID}.jpg" alt="{$photos[i].caption|escape:html}" width="150" id="album_photo_{$photos[i].PID}" />{if $photos[i].type == 'private'}<img alt="" style="position: absolute; left: 0px; top: +13px; width: 120px; height: 140px;" src="{$relative_tpl}/images/private-album.png" />{/if}</a>
                {if isset($smarty.session.uid) && $smarty.session.uid == $user.UID}
                <div class="photo_remove">
                    <a href="#remove_photo" id="remove_photo_from_favorite_{$photos[i].PID}" class="remove">Remove</a>
                </div>
                {/if}                
            </div>
            {/section}
            <div class="clear_left"></div>
            </div>
        </div>
        {/if}
        {if $games && $game_module == '1'}
        <div class="box">
            <div class="btitle">
                <div class="btitlel"><h2>FAVORITE GAMES</h2></div>
                <div class="btitler"><a href="{$relative}/user/{$user.username}/favorite/games">View All...</a></div>
                <div class="clear"></div>
            </div>
            <div id="remove_favorite_game_message" class="posting" style="display:none"></div>
            {section name=i loop=$games}
            <div id="favorite_game_{$games[i].GID}" class="video_box_small">
                <a href="{$relative}/game/{$games[i].GID}/{$games[i].title|clean}"><span class="font-12 font-bold">{$games[i].title|truncate:21:' ...':true|escape:'html'}</span><br /><img src="{$relative}/media/games/tmb/{$games[i].GID}.jpg" alt="{$games[i].title|escape:'html'}" width="140" /><br />{if $games[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="vbox_small_left">
                    {$games[i].total_plays} plays
                </div>
                <div class="vbox_small_right">
                    {insert name=rating_small assign=game_rating rating=$games[i].rate}
                    {$game_rating}
                    <div class="clear_right"></div>
                </div>
                <div class="clear"></div>
                {if isset($smarty.session.uid) && $smarty.session.uid == $user.UID}
                <div class="vbox_small_remove">
                    <a href="#remove_game" id="remove_game_from_favorite_{$games[i].GID}" class="remove">Remove</a>
                </div>
                {/if}
            </div>
            {/section}
            <div class="clear_left"></div>            
        </div>
        {/if}
        {if $show_wall}
		{if $walls || ( isset($smarty.session.uid) && $wall_comments == '1' )}
        <div class="box">
            
            <div class="btitle"><h2>WALL</h2></div>
            {if isset($smarty.session.uid) && $user.UID && $wall_comments == '1'}
            <div id="wall">
                <form name="wall_form" id="wall_form" method="post" action="#post_comment">
                <div class="separator"><div id="media_message" style="display: none;"></div></div>
                <div class="separator"><div id="media_content" style="display: none;"></div></div>
                <textarea name="wall_comment" id="wall_comment" cols="75" rows="5" class="user_txtarea">{$comment}</textarea>
                <div id="post_message" class="post_message" style="display: none;">Please enter your comment!</div>
                <div class="center">
                    <div class="left" id="chars_left">
                        1000 characters left
                    </div>
                    <div class="middle">
                        <input name="submit_wall" type="submit" value=" Add " id="post_wall_comment_{$user.UID}" class="button">
                    </div>
                    <div class="right">
                        <a href="#attach_photo" id="attach_photo">Attach Photo</a>
                        <a href="#attach_video" id="attach_video">Attach Video</a>
                    </div>
                    <div class="clear_left"></div>
                </div>
                </form>
                <div id="wall_response" class="wall_posting" style="display: none;">Posting...</div>
            </div>
            <br />
            {/if}
            <div id="wall_comments_{$user.UID}">
            {if $walls}
            <div class="blinkp">
                Showing <strong>{$start_num}</strong> to <strong>{$end_num}</strong> of <strong>{$walls_total}</strong> comments.
            </div>
            <div class="pagination"><ul>{$page_link}</ul></div>
            <div id="comments_delimiter" style="display:none;"></div>
            {section name=i loop=$walls}
            <div id="wall_comment_{$walls[i].wall_id}">
            <div id="delete_response_{$walls[i].wall_id}" class="response" style="display: none;"></div>
            <div class="comment">
                <div class="comment_left">
                    <a href="{$relative}/user/{$walls[i].username}">
                        <img src="{$relative}/media/users/{if $walls[i].photo != ''}{$walls[i].photo}{else}nopic-{$walls[i].gender}.gif{/if}" width="60" title="{$walls[i].username}'s avatar" alt="{$walls[i].username}'s avatar" />
                    </a>
                </div>
                <div class="comment_right">
                    <div class="comment_info">
                        {insert name=time_range assign=addtime time=$walls[i].addtime}
                        <a href="{$relative}/user/{$walls[i].username}">{$walls[i].username}</a>&nbsp;<strong>-</strong>&nbsp;<span class="font-10">{$addtime}</span>
                    </div>
                    <p class="comment_body">{$walls[i].message|nl2br}</p>
                    {if isset($smarty.session.uid)}
                    <div class="comment_actions">
                        {if $smarty.session.uid == $walls[i].UID}
                        <a href="#delete_comment" id="delete_comment_wall_{$walls[i].wall_id}_{$user.UID}">Delete</a> <strong>&middot;</strong>
                        {/if}
                        <span id="reported_spam_{$walls[i].wall_id}_{$user.UID}"><a href="#report_spam" id="report_spam_wall_{$walls[i].wall_id}_{$user.UID}">Report Spam</a></span>
                    </div>
                    {/if}                                                                                                                                                                                                    
                </div>
                <div class="clear"></div>
            </div>
            </div>
            {/section}
            {else}
            <div id="comments_delimiter" style="display:none;"></div>
            {/if}
            <br />
            </div>
        </div>
        </div>
		{/if}
        {/if}
    </div>
    <div class="clear"></div>
</div>
