Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 3012ba086c
Fetching contributors…

Cannot retrieve contributors at this time

61 lines (52 sloc) 1.925 kb
<?php
/**
*
* @package Icy Phoenix
* @version $Id$
* @copyright (c) 2008 Icy Phoenix
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
define('IN_ICYPHOENIX', true);
if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './');
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(IP_ROOT_PATH . 'common.' . PHP_EXT);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// End session management
$current_time = time();
$user_id = $user->data['user_id'];
$last_view = $user->data['user_last_profile_view'];
$sql = "SELECT p.*, u.username, u.user_active, u.user_color
FROM " . PROFILE_VIEW_TABLE . " p, " . USERS_TABLE . " u
WHERE p.user_id = " . $user_id . "
AND p.view_stamp >= " . $last_view . "
AND u.user_id = p.viewer_id
ORDER BY p.view_stamp DESC";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$viewer = $row['viewer_id'];
$template->assign_block_vars('row', array(
'VIEW_BY' => colorize_username($viewer, $row['username'], $row['user_color'], $row['user_active']),
'STAMP' => create_date_ip($user->data['user_dateformat'], $row['view_stamp'], $user->data['user_timezone'])
)
);
}
$template->assign_vars(array(
'PROFILE' => '<a href="'.append_sid(CMS_PAGE_PROFILE . '?mode=viewprofile&amp;' . POST_USERS_URL . '=' . $user_id).'" target="_new" class="nav-current">'.$user->data['username'].'</a>',
'L_VIEW_TITLE' => $meta_content['page_title'],
'L_CLOSE' => $lang['Close_window'],
'L_VIEWER' => $lang['Username'],
'L_STAMP' => $lang['Last_updated']
)
);
$sql = "UPDATE " . USERS_TABLE . "
SET user_profile_view = '0', user_last_profile_view = '$current_time'
WHERE user_id = " . $user_id;
$db->sql_query($sql);
$gen_simple_header = true;
full_page_generation('profile_view_popup_body.tpl', $lang['Profile'] . ' - ' . $lang['Views'], '', '');
?>
Jump to Line
Something went wrong with that request. Please try again.