Code: Select all
<?php
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['User Data']['User IP Addresses'] = $filename;
return;
}
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
$lang['UserIP_Title'] = 'User IP Addresses';
$lang['UserIP_Title_Explain'] = 'IP Addresses users were using when they registered.';
$lang['UIP_UserID'] = 'User ID';
$lang['UIP_Username'] = 'Username';
$lang['UIP_IPAddress'] = 'IP Address';
$lang['UIP_Activated'] = 'Activated';
$lang['UIP_LastOn'] = 'Last Visit';
$lang['UIP_Email'] = 'Email';
$template->set_filenames(array('body' => 'admin/admin_user_ip.tpl'));
$template->assign_vars(array(
'L_USERIP_TITLE' => $lang['UserIP_Title'],
'L_USERIP_EXPLAIN' => $lang['UserIP_Title_Explain'],
'L_USERIP_USERID' => $lang['UIP_UserID'],
'L_USERIP_USERNAME' => $lang['UIP_Username'],
'L_USERIP_IPADDRESS' => $lang['UIP_IPAddress'],
'L_USERIP_ACTIVATED' => $lang['UIP_Activated'],
'L_USERIP_LASTON' => $lang['UIP_LastOn'],
'L_USERIP_EMAIL' => $lang['UIP_Email'])
);
$sql = "SELECT user_id, username, user_regip, user_active, user_lastvisit, user_email FROM phpbb_users
WHERE user_id > 0
ORDER BY user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user list.', '', __LINE__, __FILE__, $sql);
}
while( $row = $db->sql_fetchrow($result) )
{
$user_id = '<a href="' . $board_config['script_path'] . 'profile.php?mode=viewprofile&u=' . $row['user_id'] . '" target="_profile">' . $row['user_id'] . '</a>';
$username = $row['username'];
$user_regip = decode_ip($row['user_regip']);
if ( $user_regip != '0.0.0.0' )
{
$user_regip = '<a href="http://network-tools.com/default.asp?prog=trace&Netnic=whois.arin.net&host=' . $user_regip . '" target=_"ip">' . $user_regip . '</a>';
}
else
{
$user_regip = '<span style="color: red;">' . $user_regip . '</span>';
}
$user_active = '<span style="color: green;">Yes</span>';
if ( !$row['user_active'] )
{
$user_active = '<span style="color: red;">No</span>';
}
$user_laston = '<span style="color: red;">' . $lang['Never'] . '</span>';
if ( !empty($row['user_lastvisit']) )
{
$user_laston = create_date('M d Y', $row['user_lastvisit'], $board_config['board_timezone']);
}
$user_email = '<a href=mailto:' . $row['user_email'] . '>' . $row['user_email'] . '</a>';
$template->assign_block_vars('userip_row', array(
'USER_ID' => $user_id,
'USERNAME' => $username,
'USER_REGIP' => $user_regip,
'USER_ACTIVE' => $user_active,
'USER_LASTON' => $user_laston,
'USER_EMAIL' => $user_email));
}
$db->sql_freeresult($result);
$template->pparse("body");
include('./page_footer_admin.'.$phpEx);
?>
Code: Select all
<h1>{L_USERIP_TITLE}</h1>
<p>{L_USERIP_EXPLAIN}</p>
<table align="center" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th>{L_USERIP_USERID}</td>
<th>{L_USERIP_USERNAME}</td>
<th>{L_USERIP_IPADDRESS}</td>
<th>{L_USERIP_ACTIVATED}</td>
<th>{L_USERIP_LASTON}</td>
<th>{L_USERIP_EMAIL}</td>
</tr>
<!-- BEGIN userip_row -->
<tr>
<td class="row1" align="center">{userip_row.USER_ID}</td>
<td class="row1">{userip_row.USERNAME}</td>
<td class="row1">{userip_row.USER_REGIP}</td>
<td class="row1" align="center">{userip_row.USER_ACTIVE}</td>
<td class="row1">{userip_row.USER_LASTON}</td>
<td class="row1">{userip_row.USER_EMAIL}</td>
</tr>
<!-- END userip_row -->
</table>
<br />
Code: Select all
##############################################################
## MOD Title: Addon to Log IP Address on Registration by TerraFrost
## MOD Author: Lance < Lance at cylan dot net > (Lance Clarke) http://www.cylan.net/
## MOD Description: Adds an ACP page to display User IP and other user information.
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 1 Minute
##
## Files To Edit: n/a
##
## Included Files: admin_user_ip.php
## admin_user_ip.tpl
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## This is an addon to Log IP Address on Registration by TerraFrost which can be
## found at: http://www.frostjedi.com/terra/scripts/phpbb/reg_ip.zip
##
## Log IP Address on Registration by TerraFrost must be installed before installing
## this addon.
##
##############################################################
## MOD History:
##
## 2005-08-06 - Version 1.0.0
## - Initial Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ COPY ]-------------------------------------------
#
copy admin_user_ip.php to admin/admin_user_ip.php
copy admin_user_ip.tpl to templates/subSilver/admin/admin_user_ip.tpl
#-----[ SAVE/CLOSE ALL FILES ]--------------------------
#
# EoM
Code: Select all
Could not insert data into users table
DEBUG MODE
SQL Error : 1054 Unknown column 'user_regip' in 'field list'
INSERT INTO phpbb_users (user_id, username, user_regdate, user_password, user_email, user_regip,user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) VALUES (101, 'zwei-stein', 1123409493, 'e19457c81e62b6bb21e9031a5a187cdf', ' tiscali.de', '5091568a', '', '', 'kein', '', 'keine', '', '', '', 0, 0, '', '', '', 1, 1, 1, 1, 1, 0, 1, 1, 1, 'd.m.Y, H:i', 'german', 1, 0, 1, 0, '1dc5f578907fc')
Line : 580
File : rums/includes/usercp_register.php
Makc666 wrote: Why you didn't read Install notes?
You have to add red line below into your forum's database.
phpBB Knowledge base - How to Install MODs
Find there: 10 ) The "SQL" action :
###############
#
#-----[ SQL ]-------------------------------------------
#
ALTER TABLE phpbb_users ADD user_regip CHAR(8) NOT NULL DEFAULT '0';
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
ALLMIGHTYGOD wrote: I did enter the SQL- ENTRY! of course - but still get the ERROR message! donT get it....
U have another idea why i get the ERROR message?!
greets
Code: Select all
ALTER TABLE phpbb_users ADD user_regip CHAR(8) NOT NULL DEFAULT '0';
Code: Select all
INSERT INTO phpbb_users (user_id, username, user_regdate, user_password, user_email, user_regip,user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) VALUES (101, 'zwei-stein', 1123409493, 'e19457c81e62b6bb21e9031a5a187cdf', ' tiscali.de', '5091568a', '', '', 'kein', '', 'keine', '', '', '', 0, 0, '', '', '', 1, 1, 1, 1, 1, 0, 1, 1, 1, 'd.m.Y, H:i', 'german', 1, 0, 1, 0, '1dc5f578907fc')
4rum wrote:You need to edit the above at the point user_regip,Code: Select all
INSERT INTO phpbb_users (user_id, username, user_regdate, user_password, user_email, user_regip,user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) VALUES (101, 'zwei-stein', 1123409493, 'e19457c81e62b6bb21e9031a5a187cdf', ' tiscali.de', '5091568a', '', '', 'kein', '', 'keine', '', '', '', 0, 0, '', '', '', 1, 1, 1, 1, 1, 0, 1, 1, 1, 'd.m.Y, H:i', 'german', 1, 0, 1, 0, '1dc5f578907fc')
include a space after user_regip,
ALLMIGHTYGOD wrote: but the programm does the same thing I already did manually in PHP my Admin; so what or why should this help?
it must be s.th else I suppose...
thx 4 help, tho
maybe u still have an idea..
later
Code: Select all
SQL Error : 1054 Unknown column 'user_regip' in 'field list'
Code: Select all
Could not insert data into users table
DEBUG MODE
SQL Error : 1054 Unknown column 'user_regip' in 'field list'
INSERT INTO phpbb_users (user_id, username, user_regdate, user_password, user_email, user_regip, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) VALUES (101, 'zwei-stein', 1123441711, 'e19457c81e62b6bb21e9031a5a187cdf', ' @tiscali.de', '5091568a', '', '', '', '', '', '', '', '', 0, 0, '', '', '', 1, 1, 1, 1, 1, 0, 1, 1, 1, 'd.m.Y, H:i', 'german', 1, 0, 1, 0, '2481e6e291b02')
Line : 580
File : /forums/includes/usercp_register.php