Oi sou o dono do bigwold.com estou com um pequeno problema na foto de perfil
o codigo é:
[b]Profile_photo_file[/b]
<?php
/* $Id: profile_photos_file.php 42 2009-01-29 04:55:14Z john $ */
$page = "profile_photos_file";
include "header.php";
// DISPLAY ERROR PAGE IF USER IS NOT LOGGED IN AND ADMIN SETTING REQUIRES REGISTRATION
if($user->user_exists == 0 && $setting['setting_permission_profile'] == 0) {
$page = "error";
$smarty->assign('error_header', 639);
$smarty->assign('error_message', 656);
$smarty->assign('error_submit', 641);
include "footer.php";
}
// DISPLAY ERROR PAGE IF NO OWNER
if($owner->user_exists == 0) {
$page = "error";
$smarty->assign('error_header', 639);
$smarty->assign('error_message', 828);
$smarty->assign('error_submit', 641);
include "footer.php";
}
if(isset($_POST['task'])) { $task = $_POST['task']; } elseif(isset($_GET['task'])) { $task = $_GET['task']; } else { $task = "main"; }
if(isset($_POST['type'])) { $type = $_POST['type']; } elseif(isset($_GET['type'])) { $type = $_GET['type']; } else { $type = ""; }
if(isset($_POST['media_id'])) { $media_id = $_POST['media_id']; } elseif(isset($_GET['media_id'])) { $media_id = $_GET['media_id']; } else { $media_id = 0; }
// SET VARS
$media_per_page = 20;
// CHECK PRIVACY
$privacy_max = $owner->user_privacy_max($user);
if( !($owner->user_info['user_privacy'] & $privacy_max) )
{
header("Location: ".$url->url_create('profile', $owner->user_info['user_username']));
exit();
}
// START QUERY
$photo_query = "";
$tag_query = Array();
// CALL TAG HOOK
($hook = SE_Hook::exists('se_mediatag')) ? SE_Hook::call($hook, array()) : NULL;
// GET TOTAL PHOTOS
$total_files = $database->database_num_rows($database->database_query($photo_query));
// ADD TO PHOTO QUERY
$photo_query .= " ORDER BY mediatag_date DESC";
// MAKE MEDIA PAGES
$page_vars = make_page($total_files, $media_per_page, $p);
// RUN TAG QUERY
$media = $database->database_query($photo_query);
// GET MEDIA INTO AN ARRAY
$media_array = Array();
while($media_info = $database->database_fetch_assoc($media)) { $media_array[$media_info['type'].$media_info['media_id']] = $media_info; }
// MAKE SURE MEDIA EXISTS
if(!array_key_exists($type.$media_id, $media_array)) { header("Location: profile_photos.php?user=".$owner->user_info['user_username']); exit(); }
$media_info = $media_array[$type.$media_id];
// UPDATE NOTIFICATIONS
if($user->user_info['user_id'] == $owner->user_info['user_id'])
{
$type = str_replace("media", "", $media_info['type']);
$database->database_query("DELETE FROM se_notifys USING se_notifys LEFT JOIN se_notifytypes ON se_notifys.notify_notifytype_id=se_notifytypes.notifytype_id WHERE se_notifys.notify_user_id='{$owner->user_info['user_id']}' AND se_notifytypes.notifytype_name='new{$type}tag' AND notify_object_id='{$media_info['media_id']}'");
}
// GET ALBUM TAG PRIVACY
$allowed_to_tag = (bool) $media_info['allowed_to_tag'];
// GET ALBUM COMMENT PRIVACY
$allowed_to_comment = (bool) $media_info['allowed_to_comment'];
// GET OWNER INFO
$page_owner = $owner;
$owner = new se_user(Array($media_info['owner_user_id']));
// GET ALBUM OWNER IF NECESSARY
if($media_info['user_id'] != 0)
{
$media_info['user'] = new se_user();
$media_info['user']->user_exists = 1;
$media_info['user']->user_info['user_id'] = $media_info['user_id'];
$media_info['user']->user_info['user_username'] = $media_info['user_username'];
$media_info['user']->user_info['user_fname'] = $media_info['user_fname'];
$media_info['user']->user_info['user_lname'] = $media_info['user_lname'];
$media_info['user']->user_displayname();
}
// GET MEDIA WIDTH/HEIGHT
$mediasize = @getimagesize($media_info['media_dir'].$media_info['media_id'].'.'.$media_info['media_ext']);
$media_info['media_width'] = $mediasize[0];
$media_info['media_height'] = $mediasize[1];
// GET MEDIA COMMENTS
$comment = new se_comment($media_info['type'], $media_info['type_id'], $media_info['media_id']);
$total_comments = $comment->comment_total();
// RETRIEVE TAGS FOR THIS PHOTO
$tag_array = Array();
$tags = $database->database_query(str_replace("[media_id]", $media_info['media_id'], $tag_query[$media_info['type']]));
while($tag = $database->database_fetch_assoc($tags))
{
$taggeduser = new se_user();
if($tag['user_id'] != NULL)
{
$taggeduser->user_exists = 1;
$taggeduser->user_info['user_id'] = $tag['user_id'];
$taggeduser->user_info['user_username'] = $tag['user_username'];
$taggeduser->user_info['user_fname'] = $tag['user_fname'];
$taggeduser->user_info['user_lname'] = $tag['user_lname'];
$taggeduser->user_displayname();
}
else
{
$taggeduser->user_exists = 0;
}
$tag['tagged_user'] = $taggeduser;
$tag_array[] = $tag;
}
// SET GLOBAL PAGE TITLE
$global_page_title[0] = 1204;
$global_page_title[1] = $page_owner->user_displayname;
$global_page_title[2] = count($media_array);
$global_page_description[0] = 1204;
$global_page_description[1] = $page_owner->user_displayname;
$global_page_description[2] = count($media_array);
// ASSIGN VARIABLES AND DISPLAY ALBUM FILE PAGE
$smarty->assign('page_owner', $page_owner);
$smarty->assign('album_info', $album_info);
$smarty->assign('media_info', $media_info);
$smarty->assign('total_comments', $total_comments);
$smarty->assign('allowed_to_comment', $allowed_to_comment);
$smarty->assign('allowed_to_tag', $allowed_to_tag);
$smarty->assign('media', $media_array);
$smarty->assign('media_keys', array_keys($media_array));
$smarty->assign('tags', $tag_array);
include "footer.php";
?>
[b]Profile[/b]
<?php
/* $Id: profile.php 42 2009-01-29 04:55:14Z john $ */
$page = "profile";
include "header.php";
// DISPLAY ERROR PAGE IF USER IS NOT LOGGED IN AND ADMIN SETTING REQUIRES REGISTRATION
if($user->user_exists == 0 && $setting['setting_permission_profile'] == 0)
{
$page = "error";
$smarty->assign('error_header', 639);
$smarty->assign('error_message', 656);
$smarty->assign('error_submit', 641);
include "footer.php";
}
// DISPLAY ERROR PAGE IF NO OWNER
if($owner->user_exists == 0)
{
$page = "error";
$smarty->assign('error_header', 639);
$smarty->assign('error_message', 828);
$smarty->assign('error_submit', 641);
include "footer.php";
}
// GET VIEW AND VARS
if(isset($_POST['v'])) { $v = $_POST['v']; } elseif(isset($_GET['v'])) { $v = $_GET['v']; } else { $v = "profile"; }
if(isset($_POST['search'])) { $search = $_POST['search']; } elseif(isset($_GET['search'])) { $search = $_GET['search']; } else { $search = ""; }
if(isset($_POST['m'])) { $m = $_POST['m']; } elseif(isset($_GET['m'])) { $m = $_GET['m']; } else { $m = 0; }
if(isset($_POST['p'])) { $p = $_POST['p']; } elseif(isset($_GET['p'])) { $p = $_GET['p']; } else { $p = 1; }
// VALIDATE VIEW VAR
if($v != "profile" && $v != "friends" && $v != "comments" && !array_key_exists($v, $global_plugins)) { $v = "profile"; }
// GET PRIVACY LEVEL
$privacy_max = $owner->user_privacy_max($user);
$allowed_to_view = ($privacy_max & $owner->user_info['user_privacy']);
$is_profile_private = !$allowed_to_view;
// CHECK IF USER IS ALLOWED TO COMMENT
$allowed_to_comment = ($privacy_max & $owner->user_info['user_comments']);
// UPDATE PROFILE VIEWS IF PROFILE VISIBLE
if($is_profile_private == 0 && $user->user_info['user_id'] != $owner->user_info['user_id'])
{
$profile_viewers = "";
if( $owner->user_info['user_saveviews'] )
{
$view_query = $database->database_query("SELECT profileview_viewers FROM se_profileviews WHERE profileview_user_id='{$owner->user_info['user_id']}'");
if($database->database_num_rows($view_query) == 1)
{
$views = $database->database_fetch_assoc($view_query);
$profile_viewers = $views['profileview_viewers'];
}
if( $user->user_exists )
{
$profile_viewers_array = explode(",", $profile_viewers);
if( in_array($user->user_info['user_id'], $profile_viewers_array) )
{
array_splice($profile_viewers_array, array_search($user->user_info['user_id'], $profile_viewers_array), 1);
}
$profile_viewers_array[] = $user->user_info['user_id'];
krsort($profile_viewers_array);
$profile_viewers = implode(",", array_filter($profile_viewers_array));
}
}
$database->database_query("INSERT INTO se_profileviews (profileview_user_id, profileview_views, profileview_viewers) VALUES ('{$owner->user_info['user_id']}', '1', '{$profile_viewers}') ON DUPLICATE KEY UPDATE profileview_views=profileview_views+1, profileview_viewers='{$profile_viewers}'");
}
// DELETE COMMENT NOTIFICATIONS IF VIEWING COMMENT PAGE
if( $v == "comments" && $user->user_info['user_id'] == $owner->user_info['user_id'])
{
$database->database_query("DELETE FROM se_notifys WHERE notify_user_id='{$owner->user_info['user_id']}' AND notify_notifytype_id='3' AND notify_object_id='{$owner->user_info['user_id']}'");
}
// GET PROFILE COMMENTS
$comment = new se_comment('profile', 'user_id', $owner->user_info['user_id']);
$total_comments = $comment->comment_total();
// GET PROFILE FIELDS
$field = new se_field("profile", $owner->profile_info);
$field->cat_list(0, 1, 0, "profilecat_id='{$owner->user_info['user_profilecat_id']}'", "", "");
// SET WHERE CLAUSE FOR FRIEND LIST
if($search != "")
{
$is_where = 1;
$where = "(se_users.user_username LIKE '%$search%' OR CONCAT(se_users.user_fname, ' ', se_users.user_lname) LIKE '%$search%' OR se_users.user_email LIKE '%$search%')";
}
else
{
$is_where = 0;
$where = "";
}
if($m == 1 && $user->user_exists == 1)
{
if($where != "") { $where .= " AND "; }
$where .= "(SELECT TRUE FROM se_friends AS t1 WHERE t1.friend_user_id1='{$user->user_info['user_id']}' AND t1.friend_user_id2=se_friends.friend_user_id2)";
}
// DECIDE WHETHER TO SHOW DETAILS
$connection_types = explode("<!>", trim($setting['setting_connection_types']));
$show_details = ( count($connection_types) && $setting['setting_connection_other'] && $setting['setting_connection_explain'] );
// GET TOTAL FRIENDS
$total_friends = $owner->user_friend_total(0, 1, $is_where, $where);
// MAKE FRIEND PAGES AND GET FRIEND ARRAY
$friends_per_page = 10;
if($v == "friends") { $p_friends = $p; } else { $p_friends = 1; }
$page_vars_friends = make_page($total_friends, $friends_per_page, $p_friends);
$friends = $owner->user_friend_list($page_vars_friends[0], $friends_per_page, 0, 1, "se_users.user_username", $where, $show_details);
// GET MASTER TOTAL OF FRIENDS
$total_friends_all = $owner->user_friend_total(0);
// GET MASTER TOTAL OF ALL MUTUAL FRIENDS
$total_friends_mut = $owner->user_friend_total(0, 1, 0, "(SELECT TRUE FROM se_friends AS t1 WHERE t1.friend_user_id1='{$user->user_info['user_id']}' AND t1.friend_user_id2=se_friends.friend_user_id2)");
// GET CUSTOM PROFILE STYLE IF ALLOWED
if( $owner->level_info['level_profile_style'] && !$is_profile_private )
{
$profilestyle_info = $database->database_fetch_assoc($database->database_query("SELECT profilestyle_css FROM se_profilestyles WHERE profilestyle_user_id='{$owner->user_info['user_id']}' LIMIT 1"));
$global_css = $profilestyle_info[profilestyle_css];
}
elseif( $owner->level_info['level_profile_style_sample'] && !$is_profile_private )
{
$profilestyle_info = $database->database_fetch_assoc($database->database_query("SELECT stylesample_css FROM se_profilestyles LEFT JOIN se_stylesamples ON se_profilestyles.profilestyle_stylesample_id=se_stylesamples.stylesample_id WHERE profilestyle_user_id='{$owner->user_info['user_id']}' LIMIT 1"));
$global_css = $profilestyle_info['stylesample_css'];
}
// ENSURE CONECTIONS ARE ALLOWED FOR THIS USER AND THAT OWNER HAS NOT BLOCKED USER
$is_friend = $user->user_friended($owner->user_info['user_id']);
if( $user->user_friended($owner->user_info['user_id'], 0))
{
$is_friend_pending = 2;
}
elseif( $owner->user_friended($user->user_info['user_id'], 0) )
{
$is_friend_pending = 1;
}
else
{
$is_friend_pending = 0;
}
$friendship_allowed = 1;
switch($setting['setting_connection_allow'])
{
case "3":
// ANYONE CAN INVITE EACH OTHER TO BE FRIENDS
break;
case "2":
// CHECK IF IN SAME SUBNETWORK
if($user->user_info['user_subnet_id'] != $owner->user_info['user_subnet_id']) { $friendship_allowed = 0; }
break;
case "1":
// CHECK IF FRIEND OF FRIEND
if($user->user_friend_of_friend($owner->user_info['user_id']) == FALSE) { $friendship_allowed = 0; }
break;
case "0":
// NO ONE CAN INVITE EACH OTHER TO BE FRIENDS
$friendship_allowed = 0;
break;
}
if($owner->user_blocked($user->user_info['user_id'])) { $friendship_allowed = 0; }
if($is_friend) { $friendship_allowed = 1; }
// GET PHOTOS USER IS TAGGED IN
$photo_query = "";
($hook = SE_Hook::exists('se_mediatag')) ? SE_Hook::call($hook, array()) : NULL;
$total_photo_tags = $database->database_num_rows($database->database_query($photo_query));
// DETERMINE IF USER IS ONLINE
$online_users_array = online_users();
if(in_array($owner->user_info['user_username'], $online_users_array[2])) { $is_online = 1; } else { $is_online = 0; }
// GET PROFILE VIEWS
$profile_views = 0;
$view_query = $database->database_query("SELECT profileview_views, profileview_viewers FROM se_profileviews WHERE profileview_user_id='{$owner->user_info['user_id']}'");
if($database->database_num_rows($view_query) == 1)
{
$views = $database->database_fetch_assoc($view_query);
$profile_views = $views['profileview_views'];
}
// SET GLOBAL PAGE TITLE
$global_page_title[0] = 509;
$global_page_title[1] = $owner->user_displayname;
$global_page_description[0] = 1158;
$global_page_description[1] = $owner->user_displayname;
$global_page_description[2] = strip_tags(implode(" - ", $field->field_values));
// ASSIGN VARIABLES AND INCLUDE FOOTER
$smarty->assign('v', $v);
$smarty->assign('profile_views', $profile_views);
$smarty->assign('cats', $field->cats);
$smarty->assign('is_profile_private', $is_profile_private);
$smarty->assign('allowed_to_comment', $allowed_to_comment);
$smarty->assign('total_comments', $total_comments);
$smarty->assign('total_photo_tags', $total_photo_tags);
$smarty->assign('m', $m);
$smarty->assign('search', $search);
$smarty->assign('friends', $friends);
$smarty->assign('total_friends', $total_friends);
$smarty->assign('total_friends_all', $total_friends_all);
$smarty->assign('total_friends_mut', $total_friends_mut);
$smarty->assign('maxpage_friends', $page_vars_friends[2]);
$smarty->assign('p_start_friends', $page_vars_friends[0]+1);
$smarty->assign('p_end_friends', $page_vars_friends[0]+count($friends));
$smarty->assign('p_friends', $page_vars_friends[1]);
$smarty->assign('is_friend', $is_friend);
$smarty->assign('is_friend_pending', $is_friend_pending);
$smarty->assign('friendship_allowed', $friendship_allowed);
$smarty->assign('is_online', $is_online);
$smarty->assign('actions', $actions->actions_display(0, $setting['setting_actions_actionsonprofile'], "se_actions.action_user_id='{$owner->user_info['user_id']}'"));
include "footer.php";
?>
[b]Profile_photo[/b]
<?php
/* $Id: profile_photos.php 42 2009-01-29 04:55:14Z john $ */
$page = "profile_photos";
include "header.php";
// DISPLAY ERROR PAGE IF USER IS NOT LOGGED IN AND ADMIN SETTING REQUIRES REGISTRATION
if($user->user_exists == 0 && $setting['setting_permission_profile'] == 0)
{
$page = "error";
$smarty->assign('error_header', 639);
$smarty->assign('error_message', 656);
$smarty->assign('error_submit', 641);
include "footer.php";
}
// DISPLAY ERROR PAGE IF NO OWNER
if($owner->user_exists == 0)
{
$page = "error";
$smarty->assign('error_header', 639);
$smarty->assign('error_message', 828);
$smarty->assign('error_submit', 641);
include "footer.php";
}
if(isset($_POST['p'])) { $p = $_POST['p']; } elseif(isset($_GET['p'])) { $p = $_GET['p']; } else { $p = 1; }
// SET VARS
$media_per_page = 20;
// CHECK PRIVACY
$privacy_max = $owner->user_privacy_max($user);
if(!($owner->user_info['user_privacy'] & $privacy_max))
{
header("Location: ".$url->url_create('profile', $owner->user_info['user_username']));
exit();
}
// START QUERY
$photo_query = "";
// CALL TAG HOOK
($hook = SE_Hook::exists('se_mediatag')) ? SE_Hook::call($hook, array()) : NULL;
// GET TOTAL PHOTOS
$total_files = $database->database_num_rows($database->database_query($photo_query));
// ADD TO PHOTO QUERY
$photo_query .= " ORDER BY mediatag_date DESC";
// MAKE MEDIA PAGES
$page_vars = make_page($total_files, $media_per_page, $p);
// RUN TAG QUERY
$media = $database->database_query($photo_query);
// GET MEDIA INTO AN ARRAY
$file_array = Array();
while($media_info = $database->database_fetch_assoc($media))
{
// CREATE OBJECT FOR AUTHOR, IF EXISTS
if($media_info['user_id'] != '0')
{
$author = new se_user();
$author->user_exists = 1;
$author->user_info['user_id'] = $media_info['user_id'];
$author->user_info['user_username'] = $media_info['user_username'];
$author->user_info['user_fname'] = $media_info['user_fname'];
$author->user_info['user_lname'] = $media_info['user_lname'];
$author->user_displayname();
}
// OTHERWISE, SET AUTHOR TO NOTHING
else
{
$author = new se_user();
$author->user_exists = 0;
}
$media_info['author'] = $author;
$file_array[] = $media_info;
}
// SET GLOBAL PAGE TITLE
$global_page_title[0] = 1204;
$global_page_title[1] = $owner->user_displayname;
$global_page_title[2] = $total_files;
$global_page_description[0] = 1204;
$global_page_description[1] = $owner->user_displayname;
$global_page_description[2] = $total_files;
// ASSIGN VARIABLES AND DISPLAY PHOTOS PAGE
$smarty->assign('files', $file_array);
$smarty->assign('total_files', $total_files);
$smarty->assign('p', $page_vars[1]);
$smarty->assign('maxpage', $page_vars[2]);
$smarty->assign('p_start', $page_vars[0]+1);
$smarty->assign('p_end', $page_vars[0]+count($file_array));
include "footer.php";
?>
[b]profile_file_photo.tpl[/b]
{include file='header.tpl'}
{* $Id: profile_photos.tpl 8 2009-01-11 06:02:53Z john $ *}
<div class='page_header'>
{lang_sprintf id=1205 1=$url->url_create('profile', $owner->user_info.user_username) 2=$owner->user_displayname}
</div>
{* DISPLAY PAGINATION MENU IF APPLICABLE *}
{if $maxpage > 1}
<div style='text-align: center;padding-top:10px;'>
{if $p != 1}<a href='profile_photos.php?user={$owner->user_info.user_username}&p={math equation='p-1' p=$p}'>« {lang_print id=182}</a>{else}<font class='disabled'>« {lang_print id=182}</font>{/if}
{if $p_start == $p_end}
| {lang_sprintf id=184 1=$p_start 2=$total_files} |
{else}
| {lang_sprintf id=185 1=$p_start 2=$p_end 3=$total_files} |
{/if}
{if $p != $maxpage}<a href='profile_photos.php?user={$owner->user_info.user_username}&p={math equation='p+1' p=$p}'>{lang_print id=183} »</a>{else}<font class='disabled'>{lang_print id=183} »</font>{/if}
</div>
{/if}
{* SHOW FILES IN THIS ALBUM *}
{section name=files_loop loop=$files}
{* IF IMAGE, GET THUMBNAIL *}
{if $files[files_loop].media_ext == "jpeg" || $files[files_loop].media_ext == "jpg" || $files[files_loop].media_ext == "gif" || $files[files_loop].media_ext == "png" || $files[files_loop].media_ext == "bmp"}
{assign var='file_src' value="`$files[files_loop].media_dir``$files[files_loop].media_id`_thumb.jpg"}
{* SET THUMB PATH FOR UNKNOWN *}
{else}
{assign var='file_src' value='./images/icons/file_big.gif'}
{/if}
{* START NEW ROW *}
{cycle name="startrow" values="<table cellpadding='0' cellspacing='0' align='center'><tr>,,,,"}
{* SHOW THUMBNAIL *}
<td style='padding: 15px 15px 15px 0px; text-align: center; vertical-align: middle;'>
{$files[files_loop].media_title|truncate:20:"...":true}
<div class='album_thumb2' style='width: 120; text-align: center; vertical-align: middle;'>
<a href='profile_photos_file.php?user={$owner->user_info.user_username}&type={$files[files_loop].type}&media_id={$files[files_loop].media_id}'><img src='{$file_src}' border='0' width='{$misc->photo_size($file_src,'120','120','w')}'></a>
</div>
</td>
{* END ROW AFTER 5 RESULTS *}
{if $smarty.section.files_loop.last == true}
</tr></table>
{else}
{cycle name="endrow" values=",,,,</tr></table>"}
{/if}
{/section}
{* DISPLAY PAGINATION MENU IF APPLICABLE *}
{if $maxpage > 1}
<div style='text-align: center;padding-top:10px;'>
{if $p != 1}<a href='profile_photos.php?user={$owner->user_info.user_username}&p={math equation='p-1' p=$p}'>« {lang_print id=182}</a>{else}<font class='disabled'>« {lang_print id=182}</font>{/if}
{if $p_start == $p_end}
| {lang_sprintf id=184 1=$p_start 2=$total_files} |
{else}
| {lang_sprintf id=185 1=$p_start 2=$p_end 3=$total_files} |
{/if}
{if $p != $maxpage}<a href='profile_photos.php?user={$owner->user_info.user_username}&p={math equation='p+1' p=$p}'>{lang_print id=183} »</a>{else}<font class='disabled'>{lang_print id=183} »</font>{/if}
</div>
{/if}
{include file='footer.tpl'}
Profile_files_photo.tpl
{include file='header.tpl'}
{* $Id: profile_photos_file.tpl 162 2009-04-30 01:43:11Z john $ *}
<div style='width: 532px; margin-left: auto; margin-right: auto;'>
<div class='page_header'>
{lang_sprintf id=1205 1=$url->url_create('profile', $page_owner->user_info.user_username) 2=$page_owner->user_displayname}
</div>
{* SET CORRECT IMAGE OWNER *}
<script type="text/javascript">
</script>
{* ASSIGN INDICES *}
{assign var="current_index" value="`$media_info.type``$media_info.media_id`"|array_search:$media_keys}
{capture assign="previous_index"}{if $current_index == 0}{math equation="x-1" x=$media|@count}{else}{math equation="x-1" x=$current_index}{/if}{/capture}
{capture assign="next_index"}{if $current_index+1 == $media|@count}0{else}{math equation="x+1" x=$current_index}{/if}{/capture}
{capture assign="current_num"}{math equation="x+1" x=$current_index}{/capture}
<br>
{* SHOW PAGE NAVIGATION *}
<div style='margin-bottom: 6px;'>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td>
{lang_sprintf id=1207 1=$current_num 2=$media|@count 3="profile_photos.php?user=`$page_owner->user_info.user_username`" 4=$page_owner->user_displayname_short 5=$url->url_create('profile', $page_owner->user_info.user_username)}
</td>
<td style='text-align: right;'>
{capture assign="prev_media_id"}{$media_keys.$previous_index}{/capture}
<a href='profile_photos_file.php?user={$page_owner->user_info.user_username}&type={$media[$prev_media_id].type}&media_id={$media[$prev_media_id].media_id}'>{lang_print id=1208}</a>
{capture assign="next_media_id"}{$media_keys.$next_index}{/capture}
<a href='profile_photos_file.php?user={$page_owner->user_info.user_username}&type={$media[$next_media_id].type}&media_id={$media[$next_media_id].media_id}'>{lang_print id=1209}</a>
</td>
</tr>
</table>
</div>
{* SHOW IMAGE *}
<div class='media'>
<table cellpadding='0' cellspacing='0' align='center'>
<tr>
<td style='text-align: center;'>
{* CREATE WRAPPER DIV *}
<div id='media_photo_div' class='media_photo_div' style='width:{$media_info.media_width}px;height:{$media_info.media_height}px;'>
{* DISPLAY IMAGE *}
<img src='{$media_info.media_dir}{$media_info.media_id}.{$media_info.media_ext}' id='media_photo' border='0'>
</div>
{* SHOW DIV WITH TITLE, DESC, TAGS, ETC *}
<div class='media_caption' style='width: {if $media_info.media_width > 300}{$media_info.media_width}{else}300{/if}px;'>
{if $media_info.media_title != ""}<div class='media_title'>{$media_info.media_title}</div>{/if}
{if $media_info.media_desc != ""}<div>{$media_info.media_desc}</div>{/if}
{capture assign='parent_link'}{$media_info.media_parent_url|replace:"[media_parent_id]":$media_info.media_parent_id}{/capture}
<div>{if $media_info.user_id != 0}{lang_sprintf id=1216 1=$parent_link 2=$media_info.media_parent_title 3=$url->url_create("profile", $media_info.user->user_info.user_username) 4=$media_info.user->user_displayname}{else}{lang_sprintf id=1217 1=$parent_link 2=$media_info.media_parent_title}{/if}</div>
<div id='media_tags' style='display: none; margin-top: 10px;'>{lang_print id=1218}</div>
{if $allowed_to_tag}
<a href='java script:void();' onClick="SocialEngine.MediaTag.addTag();">{lang_print id=1212}</a>
{/if}
<div class='media_date'>
{assign var="uploaddate" value=$datetime->time_since($media_info.media_date)}{capture assign="uploaddate_text"}{lang_sprintf id=$uploaddate[0] 1=$uploaddate[1]}{/capture}
{lang_sprintf id=1219 1=$uploaddate_text}
-
<a href="java script:TB_show('{lang_print id=1220}', '#TB_inline?height=400&width=400&inlineId=sharethis', '', '../images/trans.gif');">{lang_print id=1220}</a>
-
<a href="java script:TB_show('{lang_print id=1221}', 'user_report.php?return_url={$url->url_current()|escape:url}&TB_iframe=true&height=300&width=450', '', './images/trans.gif');">{lang_print id=1221}</a>
</div>
</div>
</td>
</tr>
</table>
</div>
{* DIV FOR SHARE THIS WINDOW *}
<div style='display: none;' id='sharethis'>
<div style='margin: 10px 0px 10px 0px;'>{lang_print id=1222}</div>
<div style='margin: 10px 0px 10px 0px; font-weight: bold;'>{lang_print id=1223}</div>
<textarea readonly='readonly' onClick='this.select()' class='text' rows='2' cols='30' style='width: 95%; font-size: 7pt;'>{$url->url_base}{$media_info.media_dir|replace:"./":""}{$media_info.media_id}.{$media_info.media_ext}</textarea>
<div style='margin: 10px 0px 10px 0px; font-weight: bold;'>{lang_print id=1224}</div>
<textarea readonly='readonly' onClick='this.select()' class='text' rows='2' cols='30' style='width: 95%; font-size: 7pt;'><a href='{$url->url_base}{$media_info.media_dir|replace:"./":""}{$media_info.media_id}.{$media_info.media_ext}'><img src='{$url->url_base}{$media_info.media_dir|replace:"./":""}{$media_info.media_id}.{$media_info.media_ext}' border='0'></a></textarea>
<div style='margin: 10px 0px 10px 0px; font-weight: bold;'>{lang_print id=1225}</div>
<textarea readonly='readonly' onClick='this.select()' class='text' rows='2' cols='30' style='width: 95%; font-size: 7pt;'><a href='{$url->url_base}{$media_info.media_dir|replace:"./":""}{$media_info.media_id}.{$media_info.media_ext}'>{if $media_info.media_title != ""}{$media_info.media_title}{else}{lang_print id=589}{/if}</a></textarea>
<div style='margin: 10px 0px 10px 0px; font-weight: bold;'>{lang_print id=1226}</div>
<textarea readonly='readonly' onClick='this.select()' class='text' rows='2' cols='30' style='width: 95%; font-size: 7pt;'>[url={$url->url_base}{$media_info.media_dir|replace:"./":""}{$media_info.media_id}.{$media_info.media_ext}][img={$url->url_base}{$media_info.media_dir|replace:"./":""}{$media_info.media_id}.{$media_info.media_ext}][/url]</textarea>
<div style='margin-top: 10px;'>
<input type='button' class='button' value='{lang_print id=1227}' onClick='parent.TB_remove();'>
</div>
</div>
{* TAGGING *}
{lang_javascript ids=39,1212,1213,1214,1215,1228}
<script type="text/javascript">
SocialEngine.MediaTag = new SocialEngineAPI.Tags({ldelim}
'canTag' : {if $allowed_to_tag}true{else}false{/if},
'type' : '{$media_info.type_prefix}',
'media_id' : {$media_info.media_id},
'media_dir' : '{$media_info.media_dir}',
'object_owner' : {if $media_info.user_id != 0}false{else}'{$media_info.type_prefix}'{/if},
'object_owner_id' : {if $media_info.user_id != 0}false{else}{$media_info.media_parent_id}{/if}
{rdelim});
SocialEngine.RegisterModule(SocialEngine.MediaTag);
{section name=tag_loop loop=$tags}
insertTag('{$tags[tag_loop].mediatag_id}', '{if $tags[tag_loop].tagged_user->user_exists}{$url->url_create("profile", $tags[tag_loop].tagged_user->user_info.user_username)}{/if}', '{if $tags[tag_loop].tag_user->user_exists}{$tags[tag_loop].tagged_user->user_displayname}{else}{$tags[tag_loop].mediatag_text}{/if}', '{$tags[tag_loop].mediatag_x}', '{$tags[tag_loop].mediatag_y}', '{$tags[tag_loop].mediatag_width}', '{$tags[tag_loop].mediatag_height}', '{$tags[tag_loop].tagged_user->user_info.user_username}')
{/section}
// Backwards
function insertTag(tag_id, tag_link, tag_text, tag_x, tag_y, tag_width, tag_height, tagged_user)
{ldelim}
SocialEngine.MediaTag.insertTag(tag_id, tag_link, tag_text, tag_x, tag_y, tag_width, tag_height, tagged_user);
{rdelim}
</script>
</div>
{* SHOW CAROUSEL *}
<table cellpadding='0' cellspacing='0' align='center' style='margin-top: 20px;'>
<tr>
<td><a href='java script:void();' onClick='moveLeft();this.blur()'><img src='./images/icons/media_moveleft.gif' border='0' onMouseOver="this.src='./images/icons/media_moveleft2.gif';" onMouseOut="this.src='./images/icons/media_moveleft.gif';"></a></td>
<td>
<div id='album_carousel' style='width: 562px; margin: 0px 5px 0px 5px; text-align: center; overflow: hidden;'>
<table cellpadding='0' cellspacing='0'>
<tr>
<td id='thumb-2' style='padding: 0px 5px 0px 5px;'><img src='./images/media_placeholder.gif' border='0' width='70'></td>
<td id='thumb-1' style='padding: 0px 5px 0px 5px;'><img src='./images/media_placeholder.gif' border='0' width='70'></td>
<td id='thumb0' style='padding: 0px 5px 0px 5px;'><img src='./images/media_placeholder.gif' border='0' width='70'></td>
{foreach name=media_loop from=$media key=k item=v}
{* IF IMAGE, GET THUMBNAIL *}
{if $v.media_ext == "jpeg" || $v.media_ext == "jpg" || $v.media_ext == "gif" || $v.media_ext == "png" || $v.media_ext == "bmp"}
{assign var='file_src' value="`$v.media_dir``$v.media_id`_thumb.jpg"}
{* SET THUMB PATH FOR UNKNOWN *}
{else}
{assign var='file_src' value='./images/icons/file_big.gif'}
{/if}
{* SHOW THUMBNAILS *}
<td id='thumb{$smarty.foreach.media_loop.iteration}' class='carousel_item{if $v.media_id == $media_info.media_id && $v.type == $media_info.type}_active{/if}'><a href='profile_photos_file.php?user={$page_owner->user_info.user_username}&type={$v.type}&media_id={$v.media_id}'><img src='{$file_src}' border='0' width='{$misc->photo_size($file_src,'70','70','w')}' onClick='this.blur()'></a></td>
{/foreach}
<td id='thumb{math equation="x+1" x=$media|@count}' class='carousel_item'><img src='./images/media_placeholder.gif' border='0' width='70'></td>
<td id='thumb{math equation="x+2" x=$media|@count}' class='carousel_item'><img src='./images/media_placeholder.gif' border='0' width='70'></td>
<td id='thumb{math equation="x+3" x=$media|@count}' class='carousel_item'><img src='./images/media_placeholder.gif' border='0' width='70'></td>
</tr>
</table>
</div>
</td>
<td><a href='java script:void(0);' onClick='moveRight();this.blur()'><img src='./images/icons/media_moveright.gif' border='0' onMouseOver="this.src='./images/icons/media_moveright2.gif';" onMouseOut="this.src='./images/icons/media_moveright.gif';"></a></td>
</tr>
</table>
<div style='width: {$menu_width}px; margin-left: auto; margin-right: auto;'>
{* JAVASCRIPT FOR CAROUSEL *}
{literal}
<script type='text/javascript'>
<!--
var visiblePhotos = 7;
var current_id = 0;
var myFx;
window.addEvent('domready', function() {
myFx = new Fx.Scroll('album_carousel');
current_id = parseInt({/literal}{math equation="x-2" x=$current_index}{literal});
var position = $('thumb'+current_id).getPosition($('album_carousel'));
myFx.set(position.x, position.y);
});
function moveLeft() {
if($('thumb'+(current_id-1))) {
myFx.toElement('thumb'+(current_id-1));
myFx.toLeft();
current_id = parseInt(current_id-1);
}
}
function moveRight() {
if($('thumb'+(current_id+visiblePhotos))) {
myFx.toElement('thumb'+(current_id+1));
myFx.toRight();
current_id = parseInt(current_id+1);
}
}
//-->
</script>
{/literal}
<br>
{* DISPLAY POST COMMENT BOX *}
<div style='margin-left: auto; margin-right: auto;'>
{* COMMENTS *}
<div id="{$media_info.type_prefix}media_{$media_info.media_id}_postcomment"></div>
<div id="{$media_info.type_prefix}media_{$media_info.media_id}_comments" style='margin-left: auto; margin-right: auto;'></div>
{lang_javascript ids=39,155,175,182,183,184,185,187,784,787,829,830,831,832,833,834,835,854,856,891,1025,1026,1032,1034,1071}
<script type="text/javascript">
SocialEngine.MediaComments = new SocialEngineAPI.Comments({ldelim}
'canComment' : {if $allowed_to_comment}true{else}false{/if},
'commentHTML' : '{$setting.setting_comment_html|replace:",":", "}',
'commentCode' : {if $setting.setting_comment_code}true{else}false{/if},
'type' : '{$media_info.type_prefix}media',
'typeIdentifier' : '{$media_info.type_id}',
'typeID' : {$media_info.media_id},
'typeTab' : '{$media_info.type_prefix}media',
'typeCol' : '{$media_info.type_prefix}media',
'typeTabParent' : '{$media_info.type_prefix}albums',
'typeColParent' : '{$media_info.type_prefix}album',
'typeChild' : true,
'object_owner' : {if $media_info.user_id != 0}false{else}'{$media_info.type_prefix}'{/if},
'object_owner_id' : {if $media_info.user_id != 0}false{else}{$media_info.media_parent_id}{/if},
'initialTotal' : {$total_comments|default:0}
{rdelim});
SocialEngine.RegisterModule(SocialEngine.MediaComments);
// Backwards
function addComment(is_error, comment_body, comment_date)
{ldelim}
SocialEngine.MediaComments.addComment(is_error, comment_body, comment_date);
{rdelim}
function getComments(direction)
{ldelim}
SocialEngine.MediaComments.getComments(direction);
{rdelim}
</script>
</div>
</div>
{include file='footer.tpl'}
[b]Profile.tpl[/b]
{include file='header.tpl'}
{literal}
<style type="text/css">
body {
background-image:url(./images/profile_bg.gif);
background-repeat:repeat-x;
}
</style>
<!--[if lte IE 7]>
<style type="text/css">
div.menu_dropdown_profile {
margin-top:-28px;
}
</style>
<![endif]-->
{/literal}
<table cellpadding='0' cellspacing='0' width='100%' style="margin-top:1px;">
<tr>
<td class='profile_leftside' width='200'>
{* BEGIN LEFT COLUMN *}
{* SHOW USER PHOTO *}
<table cellpadding='0' cellspacing='0' width='100%' style='margin-bottom:10px;'>
<tr>
{if $user->user_exists == 1}
<td class='profile_photo'><div class='menu_item1' style='vertical-align: middle;' onMouseOver="showMenu('menu_dropdown_profile');"><img class='photo' src='{$owner->user_photo("./images/nophoto.gif")}' border='0'></div>
{if $owner->user_info.user_id == $user->user_info.user_id}
<div class='menu_dropdown_profile' id='menu_dropdown_profile' style='display:none;'>
<div class='menu_item_dropdown_profile'><a href='user_editprofile_photo.php' class='menu_item'>{lang_print id=1164} <img style="border:none; padding:0 5px 0 0; margin:-5px -5px -5px 3px; vertical-align:middle;" src="./images/icons/change_profile.gif"></a></div>
</div>
{/if}
{/if}
{if $user->user_exists != 1}
<td class='profile_photo'><img class='photo' src='{$owner->user_photo("./images/nophoto.gif")}' border='0'>
{/if}
</td>
</tr>
</table>
<table class='profile_menu' cellpadding='0' cellspacing='0' width='100%' style='margin-bottom:10px;'>
{* SHOW PHOTOS OF THIS PERSON *}
{if $total_photo_tags != 0}
<tr>
<td class='profile_menu1' nowrap='nowrap'>
<a href='profile_photos.php?user={$owner->user_info.user_username}'>{lang_sprintf id=1204 1=$owner->user_displayname_short 2=$total_photo_tags}</a>
</td>
{assign var='showmenu' value='1'}
{/if}
{if $owner->user_info.user_id == $user->user_info.user_id}
<td class='profile_menu1' nowrap='nowrap'>
<a href='user_editprofile.php'>{lang_print id=1163}</a>
</td>
</tr>
{/if}
{* SHOW BUTTONS IF LOGGED IN AND VIEWING SOMEONE ELSE *}
{if $owner->user_info.user_id != $user->user_info.user_id}
{* SHOW ADD OR REMOVE FRIEND MENU ITEM *}
{if $friendship_allowed != 0 && $user->user_exists != 0}
<tr><td class='profile_menu1' nowrap='nowrap'>
{* JAVASCRIPT FOR CHANGING FRIEND MENU OPTION *}
{literal}
<script type="text/javascript">
<!--
function friend_update(status, id) {
if(status == 'pending') {
if($('addfriend_'+id))
$('addfriend_'+id).style.display = 'none';
if($('confirmfriend_'+id))
$('confirmfriend_'+id).style.display = 'none';
if($('pendingfriend_'+id))
$('pendingfriend_'+id).style.display = 'block';
if($('removefriend_'+id))
$('removefriend_'+id).style.display = 'none';
} else if(status == 'remove') {
if($('addfriend_'+id))
$('addfriend_'+id).style.display = 'none';
if($('confirmfriend_'+id))
$('confirmfriend_'+id).style.display = 'none';
if($('pendingfriend_'+id))
$('pendingfriend_'+id).style.display = 'none';
if($('removefriend_'+id))
$('removefriend_'+id).style.display = 'block';
} else if(status == 'add') {
if($('addfriend_'+id))
$('addfriend_'+id).style.display = 'block';
if($('confirmfriend_'+id))
$('confirmfriend_'+id).style.display = 'none';
if($('pendingfriend_'+id))
$('pendingfriend_'+id).style.display = 'none';
if($('removefriend_'+id))
$('removefriend_'+id).style.display = 'none';
}
}
//-->
</script>
{/literal}
<div id='addfriend_{$owner->user_info.user_id}'{if $is_friend == TRUE || $is_friend_pending != 0} style='display: none;'{/if}><a href="java script:TB_show('{lang_print id=876}', 'user_friends_manage.php?user={$owner->user_info.user_username}&TB_iframe=true&height=300&width=450', '', './images/trans.gif');">{lang_print id=838}</a></div>
<div id='confirmfriend_{$owner->user_info.user_id}'{if $is_friend_pending != 1} style='display: none;'{/if}><a href="java script:TB_show('{lang_print id=887}', 'user_friends_manage.php?user={$owner->user_info.user_username}&TB_iframe=true&height=300&width=450', '', './images/trans.gif');"><img src='./images/icons/addfriend16.gif' class='icon' border='0'>{lang_print id=885}</a></div>
<div id='pendingfriend_{$owner->user_info.user_id}'{if $is_friend_pending != 2} style='display: none;'{/if} class='nolink'>{lang_print id=875}</div>
<div id='removefriend_{$owner->user_info.user_id}'{if $is_friend == FALSE || $is_friend_pending != 0} style='display: none;'{/if}><a href="java script:TB_show('{lang_print id=837}', 'user_friends_manage.php?task=remove&user={$owner->user_info.user_username}&TB_iframe=true&height=300&width=450', '', './images/trans.gif');">{lang_print id=837}</a></div>
</td></tr>
{assign var='showmenu' value='1'}
{/if}
{* SHOW SEND MESSAGE MENU ITEM *}
{if ($user->level_info.level_message_allow == 2 || ($user->level_info.level_message_allow == 1 && $is_friend)) && $owner->level_info.level_message_allow != 0}
<tr><td class='profile_menu1' nowrap='nowrap'><a href="java script:TB_show('{lang_print id=784}', 'user_messages_new.php?to_user={$owner->user_displayname}&to_id={$owner->user_info.user_username}&TB_iframe=true&height=400&width=450', '', './images/trans.gif');">{lang_print id=839}</a></td>
</tr>
{assign var='showmenu' value='1'}
{/if}
{* SHOW REPORT THIS PERSON MENU ITEM *}
{if $user->user_exists != 0}
<tr><td class='profile_menu1' nowrap='nowrap'><a href="java script:TB_show('{lang_print id=857}', 'user_report.php?return_url={$url->url_current()}&TB_iframe=true&height=300&width=450', '', './images/trans.gif');">{lang_print id=840}</a></td>
</tr>
{assign var='showmenu' value='1'}
{/if}
{* SHOW BLOCK OR UNBLOCK THIS PERSON MENU ITEM *}
{if $user->level_info.level_profile_block != 0}
<tr><td class='profile_menu1' nowrap='nowrap'>
<div id='unblock'{if $user->user_blocked($owner->user_info.user_id) == FALSE} style='display: none;'{/if}><a href="java script:TB_show('{lang_print id=869}', 'user_friends_block.php?task=unblock&user={$owner->user_info.user_username}&TB_iframe=true&height=300&width=450', '', './images/trans.gif');">{lang_print id=841}</a></div>
<div id='block'{if $user->user_blocked($owner->user_info.user_id) == TRUE} style='display: none;'{/if}><a href="java script:TB_show('{lang_print id=868}', 'user_friends_block.php?task=block&user={$owner->user_info.user_username}&TB_iframe=true&height=300&width=450', '', './images/trans.gif');">{lang_print id=842}</a></div>
</td></tr>
{assign var='showmenu' value='1'}
{/if}
{/if}
{* PLUGIN RELATED PROFILE MENU ITEMS *}
{hook_foreach name=profile_menu var=profile_menu_args}
{assign var='showmenu' value='1'}
<tr>
<td class='profile_menu1' nowrap='nowrap'>
<a href='{$profile_menu_args.file}'>
<img src='./images/icons/{$profile_menu_args.icon}' class='icon' border='0' />
{lang_sprintf id=$profile_menu_args.title 1=$profile_menu_args.title_1 2=$profile_menu_args.title_2}
</a>
</td>
</tr>
{/hook_foreach}
</table>
{if $showmenu == 1}
<div style='height: 10px; font-size: 1pt;'> </div>
{/if}
{* DISPLAY IF PROFILE IS PRIVATE TO VIEWING USER *}
{if $is_profile_private != 0}
{* END LEFT COLUMN *}
</td>
<td class='profile_rightside'>
{* BEGIN RIGHT COLUMN *}
<img src='./images/icons/error48.gif' border='0' class='icon_big'>
<div class='page_header'>{lang_print id=843}</div>
{lang_print id=844}
{* DISPLAY ONLY IF PROFILE IS NOT PRIVATE TO VIEWING USER *}
{else}
{* BEGIN STATUS *}
{if ($owner->level_info.level_profile_status != 0 && ($owner->user_info.user_status != "" || $owner->user_info.user_id == $user->user_info.user_id)) || $is_online == 1}
<table cellpadding='0' cellspacing='0' width='100%' style='margin-bottom:0px;'>
<tr>
<td class='header'>{lang_print id=768}</td>
<tr>
<td class='profile'>
{if $is_online == 1}
<table cellpadding='0' cellspacing='0'>
<tr>
<td valign='top'><img src='./images/icons/online16.gif' border='0' class='icon'></td>
<td>{lang_sprintf id=845 1=$owner->user_displayname_short}</td>
</tr>
</table>
{/if}
{if $owner->level_info.level_profile_status != 0 && ($owner->user_info.user_status != "" || $owner->user_info.user_id == $user->user_info.user_id)}
<table cellpadding='0' cellspacing='0'{if $is_online == 1} style='margin-top: 5px;'{/if}>
<tr>
<td valign='top'><img src='./images/icons/status16.gif' border='0' class='icon'></td>
<td>
{if $owner->user_info.user_id == $user->user_info.user_id}
{* JAVASCRIPT FOR CHANGING STATUS *}
{literal}
<script type="text/javascript">
<!--
var current_status = '{/literal}{$owner->user_info.user_status}{literal}';
function noenter_status(e) {
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
if(keycode == 13) {
changeStatus_submit();
return false;
}
}
function changeStatus() {
var HTML = "{/literal}{$owner->user_displayname_short}{literal} <input type='text' class='text_small' name='status_new' id='status_new' maxlength='100' value='";
if(current_status == '') { HTML += "{/literal}{lang_print id=744}{literal}"; } else { HTML += current_status.replace(/<wbr>/g, '').replace(//g, ''); }
HTML += "' size='10' style='width: 140px; margin: 2px 0px 2px 0px;' onkeypress='return noenter_status(event)'><br><a href='java script:changeStatus_submit(0);'>{/literal}{lang_print id=746}{literal}</a> | <a href='java script:changeStatus_return();'>{/literal}{lang_print id=747}{literal}</a>";
$('ajax_status').innerHTML = HTML;
$('status_new').focus();
$('status_new').select();
}
function changeStatus_return() {
if(current_status == '') {
$('ajax_status').innerHTML = "<a href='java script:changeStatus();'>{/literal}{lang_print id=743}{literal}</a>";
} else {
$('ajax_status').innerHTML = "{/literal}{$owner->user_displayname_short}{literal} <span id='ajax_currentstatus_value'>"+current_status+"</span><br>{/literal}{lang_print id=1113}{literal} <span id='ajax_currentstatus_date'>{/literal}{lang_sprintf id=773 1=1}{literal}</span><br>[ <a href='java script:void(0);' onClick='changeStatus(0)'>{/literal}{lang_print id=745}{literal}</a> ]";
}
}
function changeStatus_submit() {
$('ajaxframe').src = "misc_js.php?task=status_change&status="+encodeURIComponent($('status_new').value);
}
//-->
</script>
{/literal}
<div id='ajax_status'>
{if $owner->user_info.user_status != ""}
{assign var='status_date' value=$datetime->time_since($owner->user_info.user_status_date)}
{$owner->user_displayname_short} <span id='ajax_currentstatus_value'>{$owner->user_info.user_status}</span>
<br>{lang_print id=1113} <span id='ajax_currentstatus_date'>{lang_sprintf id=$status_date[0] 1=$status_date[1]}</span>
<br>[ <a href="java script:void(0);" onClick="changeStatus()">{lang_print id=745}</a> ]
{else}
<a href="java script:changeStatus(0);">{lang_print id=743}</a>
{/if}
</div>
{else}
{assign var='status_date' value=$datetime->time_since($owner->user_info.user_status_date)}
{$owner->user_displayname_short} {$owner->user_info.user_status}
<br>{lang_print id=1113} <span id='ajax_currentstatus_date'>{lang_sprintf id=$status_date[0] 1=$status_date[1]}</span>
{/if}
</td>
</tr>
</table>
{/if}
</td>
</tr>
</table>
{/if}
{* END STATUS *}
{* BEGIN STATS *}
<table cellpadding='0' cellspacing='0' width='100%'>
<tr><td class='header'>{lang_print id=24}</td></tr>
<tr>
<td class='profile'>
<table cellpadding='0' cellspacing='0'>
<tr><td width='80' valign='top'>{lang_print id=1120}</td><td><a href='search_advanced.php?cat_selected={$owner->profilecat_info.profilecat_id}'>{lang_print id=$owner->profilecat_info.profilecat_title}</a></td></tr>
<tr><td valign='top'>{lang_print id=1119}</td><td>{lang_print id=$owner->subnet_info.subnet_name}</td></tr>
<tr><td>{lang_print id=846}</td><td>{lang_sprintf id=740 1=$profile_views}</td></tr>
{if $setting.setting_connection_allow != 0}<tr><td>{lang_print id=847}</td><td>{lang_sprintf id=848 1=$total_friends}</td></tr>{/if}
{if $owner->user_info.user_dateupdated != ""}<tr><td>{lang_print id=1113}</td><td>{assign var='last_updated' value=$datetime->time_since($owner->user_info.user_dateupdated)}{lang_sprintf id=$last_updated[0] 1=$last_updated[1]}</td></tr>{/if}
{if $owner->user_info.user_signupdate != ""}<tr><td>{lang_print id=850}</td><td>{$datetime->cdate("`$setting.setting_dateformat`", $datetime->timezone("`$owner->user_info.user_signupdate`", $global_timezone))}</td></tr>{/if}
</table>
</td>
</tr>
</table>
{* END STATS *}
{* PLUGIN RELATED PROFILE SIDEBAR *}
{hook_foreach name=profile_side var=profile_side_args}
{include file=$profile_side_args.file}
{/hook_foreach}
{* END LEFT COLUMN *}
</td>
<td class='profile_rightside'>
{* BEGIN RIGHT COLUMN *}
<div class='page_header'>{lang_sprintf id=786 1=$owner->user_displayname}</div>
{* JAVASCRIPT FOR SWITCHING TABS *}
{literal}
<script type='text/javascript'>
<!--
var visible_tab = '{/literal}{$v}{literal}';
function loadProfileTab(tabId) {
if(tabId == visible_tab) {
return false;
}
if($('profile_'+tabId)) {
$('profile_tabs_'+tabId).className='profile_tab2';
$('profile_'+tabId).style.display = "block";
if($('profile_tabs_'+visible_tab)) {
$('profile_tabs_'+visible_tab).className='profile_tab';
$('profile_'+visible_tab).style.display = "none";
}
visible_tab = tabId;
}
}
//-->
</script>
{/literal}
{* SHOW PROFILE TAB BUTTONS *}
<table cellpadding='0' cellspacing='0'>
<tr>
<td valign='bottom'><table cellpadding='0' cellspacing='0'><tr><td class='profile_tab{if $v == 'profile'}2{/if}' id='profile_tabs_profile' onMouseUp="this.blur()"><a href='java script:void(0);' onMouseDown="loadProfileTab('profile')" onMouseUp="this.blur()">{lang_print id=652}</a></td></tr></table></td>
{if $total_friends_all != 0}<td valign='bottom'><table cellpadding='0' cellspacing='0'><td class='profile_tab{if $v == 'friends'}2{/if}' id='profile_tabs_friends' onMouseUp="this.blur()"><a href='java script:void(0);' onMouseDown="loadProfileTab('friends');" onMouseUp="this.blur()">{lang_print id=653}</a></td></tr></table></td>{/if}
{if $allowed_to_comment != 0 || $total_comments != 0}<td valign='bottom'><table cellpadding='0' cellspacing='0'><td class='profile_tab{if $v == 'comments'}2{/if}' id='profile_tabs_comments' onMouseUp="this.blur()"><a href='java script:void(0);' onMouseDown="loadProfileTab('comments');SocialEngine.ProfileComments.getComments(1)" onMouseUp="this.blur()">{lang_print id=854}</a></td></tr></table></td>{/if}
{* PLUGIN RELATED PROFILE TABS *}
{hook_foreach name=profile_tab var=profile_tab_args max=4 complete=profile_tab_complete}
<td valign='bottom'>
<table cellpadding='0' cellspacing='0' style='float: left;'>
<tr>
<td class='profile_tab{if $v == $profile_tab_args.name}2{/if}' id='profile_tabs_{$profile_tab_args.name}' onMouseUp="this.blur();">
<a href='java script:void(0);' onMouseDown="loadProfileTab('{$profile_tab_args.name}')" onMouseUp="this.blur();">
{lang_print id=$profile_tab_args.title}
</a>
</td>
</tr>
</table>
</td>
{/hook_foreach}
{if !$profile_tab_complete}
<td valign='bottom'>
<table cellpadding='0' cellspacing='0' style='float: left;'>
<tr>
<td class='profile_tab' onMouseUp="this.blur();" nowrap="nowrap">
<a href="java script:void(0);" onclick="$('profile_tab_dropdown').style.display = ( $('profile_tab_dropdown').style.display=='none' ? 'inline' : 'none' ); this.blur(); return false;" nowrap="nowrap">
{lang_print id=1317}
</a>
</td>
</tr>
</table>
<div class='menu_profile_dropdown' id='profile_tab_dropdown' style='display: none;'>
<div>
{* SHOW ANY PLUGIN MENU ITEMS *}
{hook_foreach name=profile_tab var=profile_tab_args start=4}
<div class='menu_profile_item_dropdown'>
<div id='profile_tabs_{$profile_tab_args.name}' onMouseUp="this.blur();">
<a href='java script:void(0);' onMouseDown="loadProfileTab('{$profile_tab_args.name}')" onMouseUp="this.blur();" class='menu_profile_item' style="text-align: left;">
{lang_print id=$profile_tab_args.title}
</a>
</div></div>
{/hook_foreach}
</div>
</div>
</td>
{/if}
<td width='100%' class='profile_tab_end'> </td>
</tr>
</table>
<div class='profile_content'>
<div class='profile_content'>{* PROFILE TAB *}
<div id='profile_profile'{if $v != 'profile'} style='display: none;'{/if}> {* SHOW PROFILE CATS AND FIELDS *} {section name=cat_loop loop=$cats} {section name=subcat_loop loop=$cats[cat_loop].subcats}
<div class='profile_headline{if !$smarty.section.subcat_loop.first}2{/if}'><b>{lang_print id=$cats[cat_loop].subcats[subcat_loop].subcat_title}</b></div>
<table cellpadding='0' cellspacing='0'>
{* LOOP THROUGH FIELDS IN TAB, ONLY SHOW FIELDS THAT HAVE BEEN FILLED IN *} {section name=field_loop loop=$cats[cat_loop].subcats[subcat_loop].fields}
<tr>
<td valign='top' style='padding-right: 10px;' nowrap='nowrap'> {lang_print id=$cats[cat_loop].subcats[subcat_loop].fields[field_loop].field_title}: </td>
<td>
<div class='profile_field_value'>{$cats[cat_loop].subcats[subcat_loop].fields[field_loop].field_value_formatted}</div>
{if $cats[cat_loop].subcats[subcat_loop].fields[field_loop].field_special == 1 && $cats[cat_loop].subcats[subcat_loop].fields[field_loop].field_value|substr:0:4 != "0000"} ({lang_sprintf id=852 1=$datetime->age($cats[cat_loop].subcats[subcat_loop].fields[field_loop].field_value)}){/if} </td>
</tr>
{/section}
</table>
{/section} {/section} {* END PROFILE TABS AND FIELDS *} {* SHOW RECENT ACTIVITY *} {if $actions|@count > 0} {literal}
<script language="JavaScript">
<!--
Rollimage0 = new Image(10,12);
Rollimage0.src = "./images/icons/action_delete1.gif";
Rollimage1 = new Image(10,12);
Rollimage1.src = "./images/icons/action_delete2.gif";
var total_actions = {/literal}{$actions|@count}{literal};
function action_delete(action_id)
{
$('action_' + action_id).style.display = 'none';
total_actions--;
if(total_actions == 0)
$('actions').style.display = "none";
}
//-->
</script>
{/literal} {* SHOW RECENT ACTIONS *}
<div style='padding-bottom: 10px;' id='actions'>
<div class='profile_headline2'><b>{lang_print id=851}</b></div>
{section name=actions_loop loop=$actions}
<div id='action_{$actions[actions_loop].action_id}' class='profile_action'>
<table cellpadding='0' cellspacing='0'>
<tr>
<td valign='top'><img src='./images/icons/{$actions[actions_loop].action_icon}' border='0' class='icon'></td>
<td valign='top' width='100%'>
<div class='profile_action_date'> {assign var='action_date' value=$datetime->time_since($actions[actions_loop].action_date)} {lang_sprintf id=$action_date[0] 1=$action_date[1]} {* DISPLAY DELETE LINK IF NECESSARY *} {if $setting.setting_actions_selfdelete == 1 && $actions[actions_loop].action_user_id == $user->user_info.user_id} <img src='./images/icons/action_delete1.gif' style='vertical-align: middle; margin-left: 3px; cursor: pointer; cursor: hand;' border='0' onmouseover="this.src=Rollimage1.src;" onmouseout="this.src=Rollimage0.src;" onClick="java script:$('ajaxframe').src='misc_js.php?task=action_delete&action_id={$actions[actions_loop].action_id}'"> {/if} </div>
{assign var='action_media' value=''} {if $actions[actions_loop].action_media !== FALSE}{capture assign='action_media'}{section name=action_media_loop loop=$actions[actions_loop].action_media}<a href='{$actions[actions_loop].action_media[action_media_loop].actionmedia_link}'><img src='{$actions[actions_loop].action_media[action_media_loop].actionmedia_path}' border='0' width='{$actions[actions_loop].action_media[action_media_loop].actionmedia_width}' class='recentaction_media'></a>{/section}{/capture}{/if} {lang_sprintf assign=action_text id=$actions[actions_loop].action_text args=$actions[actions_loop].action_vars} {$action_text|replace:"[media]":$action_media|choptext:50:"<br>
"} </td>
</tr>
</table>
</div>
{/section} </div>
{/if} {* END RECENT ACTIVITY *} </div>
{* END PROFILE TAB *} {* FRIENDS TAB *} {if $total_friends_all != 0}
<div id='profile_friends'{if $v != 'friends'} style='display: none;'{/if}>
<div>
<div style='float: left; width: 50%;'>
<div class='profile_headline'> {if $m == 1} {lang_sprintf id=1024 1=$owner->user_displayname_short} {else} {lang_sprintf id=930 1=$owner->user_displayname_short} {/if} ({$total_friends}) </div>
</div>
<div style='float: right; width: 50%; text-align: right;'> {if $search == ""}
<div id='profile_friends_searchbox_link'> <a href='java script:void(0);' onClick="$('profile_friends_searchbox_link').style.display='none';$('profile_friends_searchbox').style.display='block';$('profile_friends_searchbox_input').focus();">{lang_print id=1197}</a> </div>
{/if}
<div id='profile_friends_searchbox' style='text-align: right;{if $search == ""} display: none;{/if}'>
<form action='profile.php' method='post'>
<input type='text' maxlength='100' size='30' class='text' name='search' value='{$search}' id='profile_friends_searchbox_input'>
<input name="submit" type='submit' class='button' value='{lang_print id=646}'>
<input type='hidden' name='p' value='{$p}'>
<input type='hidden' name='v' value='friends'>
<input type='hidden' name='user' value='{$owner->user_info.user_username}'>
</form>
</div>
</div>
<div style='clear: both;'></div>
</div>
{* IF MUTUAL FRIENDS EXIST, SHOW OPTION TO VIEW THEM *} {if $owner->user_info.user_id != $user->user_info.user_id && $total_friends_mut != 0}
<div style='margin-bottom: 10px;'> {if $m != 1} {lang_print id=1022} {else} <a href='profile.php?user={$owner->user_info.user_username}&v=friends'>{lang_print id=1022}</a> {/if} | {if $m == 1} {lang_print id=1020} {else} <a href='profile.php?user={$owner->user_info.user_username}&v=friends&m=1'>{lang_print id=1020}</a> {/if} </div>
{/if} {* DISPLAY NO RESULTS MESSAGE *} {if $search != "" && $total_friends == 0} <br>
<table cellpadding='0' cellspacing='0'>
<tr>
<td class='result'> <img src='./images/icons/bulb16.gif' border='0' class='icon'>{lang_sprintf id=934 1=$owner->user_displayname_short} </td>
</tr>
</table>
{elseif $m == 1 && $total_friends == 0} <br>
<table cellpadding='0' cellspacing='0'>
<tr>
<td class='result'> <img src='./images/icons/bulb16.gif' border='0' class='icon'>{lang_sprintf id=1023 1=$owner->user_displayname_short} </td>
</tr>
</table>
{/if} {* DISPLAY PAGINATION MENU IF APPLICABLE *} {if $maxpage_friends > 1}
<div style='text-align: center;'> {if $p_friends != 1}<a href='profile.php?user={$owner->user_info.user_username}&v=friends&search={$search}&m={$m}&p={math equation='p-1' p=$p_friends}'>« {lang_print id=182}</a>{else}<font class='disabled'>« {lang_print id=182}</font>{/if} {if $p_start_friends == $p_end_friends} | {lang_sprintf id=184 1=$p_start_friends 2=$total_friends} | {else} | {lang_sprintf id=185 1=$p_start_friends 2=$p_end_friends 3=$total_friends} | {/if} {if $p_friends != $maxpage_friends}<a href='profile.php?user={$owner->user_info.user_username}&v=friends&search={$search}&m={$m}&p={math equation='p+1' p=$p_friends}'>{lang_print id=183} »</a>{else}<font class='disabled'>{lang_print id=183} »</font>{/if} </div>
{/if} {* LOOP THROUGH FRIENDS *} {section name=friend_loop loop=$friends}
<div class='browse_friends_result' style='overflow: hidden;'>
<div class='profile_friend_photo'> <a href='{$url->url_create("profile",$friends[friend_loop]->user_info.user_username)}'> <img src='{$friends[friend_loop]->user_photo("./images/nophoto.gif")}' width='{$misc->photo_size($friends[friend_loop]->user_photo("./images/nophoto.gif"),"90","90","w")}' border='0' alt="{lang_sprintf id=509 1=$friends[friend_loop]->user_displayname_short}"> </a> </div>
<div class='profile_friend_info'>
<div class='profile_friend_name'><a href='{$url->url_create('profile',$friends[friend_loop]->user_info.user_username)}'>{$friends[friend_loop]->user_displayname}</a></div>
<div class='profile_friend_details'> {if $friends[friend_loop]->user_info.user_dateupdated != 0}
<div>{lang_print id=849} {assign var='last_updated' value=$datetime->time_since($friends[friend_loop]->user_info.user_dateupdated)}{lang_sprintf id=$last_updated[0] 1=$last_updated[1]}</div>
{/if} {if $show_details != 0} {if $friends[friend_loop]->friend_type != ""}
<div>{lang_print id=882} {$friends[friend_loop]->friend_type}</div>
{/if} {if $friends[friend_loop]->friend_explain != ""}
<div>{lang_print id=907} {$friends[friend_loop]->friend_explain}</div>
{/if} {/if} </div>
</div>
<div class='profile_friend_options'> {if !$friends[friend_loop]->is_viewers_friend && !$friends[friend_loop]->is_viewers_blocklisted && $friends[friend_loop]->user_info.user_id != $user->user_info.user_id && $user->user_exists != 0}
<div id='addfriend_{$friends[friend_loop]->user_info.user_id}'><a href="java script:TB_show('{lang_print id=876}', 'user_friends_manage.php?user={$friends[friend_loop]->user_info.user_username}&TB_iframe=true&height=300&width=450', '', './images/trans.gif');">{lang_print id=838}</a></div>
{/if} {if !$members[member_loop].member->is_viewer_blocklisted && ($user->level_info.level_message_allow == 2 || ($user->level_info.level_message_allow == 1 && $friends[friend_loop]->is_viewers_friend == 2)) && $friends[friend_loop]->user_info.user_id != $user->user_info.user_id}<a href="java script:TB_show('{lang_print id=784}', 'user_messages_new.php?to_user={$friends[friend_loop]->user_displayname}&to_id={$friends[friend_loop]->user_info.user_username}&TB_iframe=true&height=400&width=450', '', './images/trans.gif');">{lang_print id=839}</a>{/if} </div>
<div style='clear: both;'></div>
</div>
{/section} {* DISPLAY PAGINATION MENU IF APPLICABLE *} {if $maxpage_friends > 1}
<div style='text-align: center;'> {if $p_friends != 1}<a href='profile.php?user={$owner->user_info.user_username}&v=friends&search={$search}&m={$m}&p={math equation='p-1' p=$p_friends}'>« {lang_print id=182}</a>{else}<font class='disabled'>« {lang_print id=182}</font>{/if} {if $p_start_friends == $p_end_friends} | {lang_sprintf id=184 1=$p_start_friends 2=$total_friends} | {else} | {lang_sprintf id=185 1=$p_start_friends 2=$p_end_friends 3=$total_friends} | {/if} {if $p_friends != $maxpage_friends}<a href='profile.php?user={$owner->user_info.user_username}&v=friends&search={$search}&m={$m}&p={math equation='p+1' p=$p_friends}'>{lang_print id=183} »</a>{else}<font class='disabled'>{lang_print id=183} »</font>{/if} </div>
{/if} </div>
{/if} {* END FRIENDS TAB *} {* BEGIN COMMENTS TAB *} {if $allowed_to_comment != 0 || $total_comments != 0} {* SHOW COMMENT TAB *}
<div id='profile_comments'{if $v != 'comments'} style='display: none;'{/if}> {* COMMENTS *}
<div id="profile_{$owner->user_info.user_id}_postcomment"></div>
<div id="profile_{$owner->user_info.user_id}_comments" style='margin-left: auto; margin-right: auto;'></div>
{lang_javascript ids=39,155,175,182,183,184,185,187,784,787,829,830,831,832,833,834,835,854,856,891,1025,1026,1032,1034,1071} {literal}
<style type='text/css'>
div.comment_headline {
font-size: 10pt;
margin-bottom: 7px;
font-weight: bold;
padding: 0px;
border: none;
background: none;
color: #555555;
}
</style>
{/literal}
<script type="text/javascript">
SocialEngine.ProfileComments = new SocialEngineAPI.Comments({ldelim}
'canComment' : {if $allowed_to_comment}true{else}false{/if},
'commentHTML' : '{$setting.setting_comment_html|replace:",":", "}',
'commentCode' : {if $setting.setting_comment_code}true{else}false{/if},
'type' : 'profile',
'typeIdentifier' : 'user_id',
'typeID' : {$owner->user_info.user_id},
'typeTab' : 'users',
'typeCol' : 'user',
'initialTotal' : {$total_comments|default:0},
'paginate' : true,
'cpp' : 10,
'commentLinks' : {literal}{'reply' : true, 'walltowall' : true}{/literal}
{rdelim});
SocialEngine.RegisterModule(SocialEngine.ProfileComments);
// Backwards
function addComment(is_error, comment_body, comment_date)
{ldelim}
SocialEngine.ProfileComments.addComment(is_error, comment_body, comment_date);
{rdelim}
function getComments(direction)
{ldelim}
SocialEngine.ProfileComments.getComments(direction);
{rdelim}
</script>
</div>
{/if} {* END COMMENTS *} {* PLUGIN RELATED PROFILE TABS *} {hook_foreach name=profile_tab var=profile_tab_args}
<div id='profile_{$profile_tab_args.name}'{if $v != $profile_tab_args.name} style='display: none;'{/if}> {include file=$profile_tab_args.file} </div>
{/hook_foreach} {/if} {* END PRIVACY IF STATEMENT *} </div>
{* END RIGHT COLUMN *} </div>
</td>
</td>
{if $ads->ad_right != ""}
<td class='profile_rightside'>
<div style="width:162px; min-height:500px; background-image:url(./images/profile_ads.gif); margin-top:75px;">
<div style="vertical-align:top; color:#3b5998; padding-left:15px;"><a href="help_contact.php">Advertise</a></div>
<div style="padding-left:10px; padding-top:10px;">{$ads->ad_right}</div>
</div>
</td>
{/if}
</tr>
</table>
{include file='footer.tpl'}
Obrigado