#
#-----[ SQL]------------------------------------------
#

CREATE TABLE `phpbb_log_auth` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `user_id` varchar(10) NOT NULL default '',
  `user_ua` text NOT NULL,
  `user_date` varchar(20) NOT NULL default '',
  `user_ip` varchar(16) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `name` (`user_id`)
);

#
#-----[]------------------------------------------
#

login.php

#
#-----[]------------------------------------------
#

if( $session_id )
{
$posl_visit = create_date($board_config['default_dateformat'], $row['user_lastvisit'], $board_config['board_timezone']);
						
#
#-----[  ]------------------------------------------
#

$time_now = create_date($board_config['default_dateformat'], $now_time, $board_config['board_timezone']);
						$sql = "INSERT INTO phpbb_log_auth (user_id, user_ua, user_ip,user_date)
					VALUES ('".$row['user_id']."', '". strtok($user_agent,'/') . "','$client_ip','$time_now')";
					if ( !$db->sql_query($sql) )
					{
						message_die(GENERAL_ERROR, 'Could not insert private message sent info', '', __LINE__, __FILE__, $sql);
					}
#
#-----[]------------------------------------------
#

profile.php

#
#-----[]------------------------------------------
#

else if ( $mode == 'medals' )
	{
		include($phpbb_root_path . 'includes/usercp_viewmedals.'.$phpEx);
		exit;
	}
	
#
#-----[  ]------------------------------------------
#

else if ( $mode == 'logs' )
	{
		include($phpbb_root_path . 'includes/usercp_logauth.'.$phpEx);
		exit;
	}
#
#-----[]------------------------------------------
#

templates/profile_view_body.tpl

#
#-----[]------------------------------------------
#

<!-- BEGIN editprofile -->
<b></b>:<br/>

#
#-----[  ]------------------------------------------
#
- <a href="profile.php?mode=logs"></a><br/>

======================
KaspeR
2009
bbmod.net
: xwab.ru/forum