перенос whois ip в конфиг git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@337 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
pherum83 2011-12-16 21:54:38 +00:00
commit 752b2af222
7 changed files with 23 additions and 27 deletions

View file

@ -118,9 +118,10 @@ while ($row = DB()->sql_fetchrow($result))
{
$value = trim($new_attach[$config_name]);
if ($value[strlen($value)-1] == '/')
if (strlen($value) && substr($value, -1) == '/')
{
$value[strlen($value)-1] = ' ';
if(strlen($value)) $value = substr($value, 0, strlen($value)-1);
else $value = '';
}
$new_attach[$config_name] = trim($value);

View file

@ -165,12 +165,12 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
}
else
{
$dbsize = $lang['Not_available'];
$dbsize = $lang['NOT_AVAILABLE'];
}
}
else
{
$dbsize = $lang['Not_available'];
$dbsize = $lang['NOT_AVAILABLE'];
}
$template->assign_vars(array(
@ -255,18 +255,10 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
"STARTED" => bb_date($onlinerow_reg[$i]['session_start'], 'H:i', 'false'),
"LASTUPDATE" => bb_date($onlinerow_reg[$i]['user_session_time'], 'H:i', 'false'),
"IP_ADDRESS" => $reg_ip,
"U_WHOIS_IP" => "http://ip-whois.net/ip_geo.php?ip=$reg_ip",
"U_WHOIS_IP" => $bb_cfg['whois_info'] . $reg_ip,
));
}
}
}
else
{
$template->assign_vars(array(
"L_NO_REGISTERED_USERS_BROWSING" => $lang['NO_USERS_BROWSING'])
);
}
//
@ -287,11 +279,10 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
$template->assign_block_vars("guest_user_row", array(
"ROW_CLASS" => $row_class,
"USERNAME" => $lang['GUEST'],
"STARTED" => bb_date($onlinerow_guest[$i]['session_start'], 'H:i', 'false'),
"LASTUPDATE" => bb_date($onlinerow_guest[$i]['session_time'], 'H:i' , 'false'),
"IP_ADDRESS" => $guest_ip,
"U_WHOIS_IP" => "http://ip-whois.net/ip_geo.php?ip=$guest_ip",
"U_WHOIS_IP" => $bb_cfg['whois_info'] . $guest_ip,
));
}
}

View file

@ -111,12 +111,12 @@ switch ($mode)
<br /><table class="mod_ip bCenter borderless" cellspacing="1">
<tr class="row5" >
<td>'. $lang['REG_IP'] .'</td>
<td class="tCenter"><a href="http://ip-whois.net/ip_geo.php?ip='.decode_ip($profiledata['user_reg_ip']).'" class="gen" target="_blank">'.decode_ip($profiledata['user_reg_ip']).'</a></td>
<td class="tCenter"><a href="'. $bb_cfg['whois_info'] . decode_ip($profiledata['user_reg_ip']).'" class="gen" target="_blank">'.decode_ip($profiledata['user_reg_ip']).'</a></td>
<td><div>'. $link_reg_ip .'</div></td>
</tr>
<tr class="row4">
<td>'. $lang['LAST_IP'] .'</td>
<td class="tCenter"><a href="http://ip-whois.net/ip_geo.php?ip='.decode_ip($profiledata['user_last_ip']).'" class="gen" target="_blank">'.decode_ip($profiledata['user_last_ip']).'</a></td>
<td class="tCenter"><a href="'. $bb_cfg['whois_info'] . decode_ip($profiledata['user_last_ip']).'" class="gen" target="_blank">'.decode_ip($profiledata['user_last_ip']).'</a></td>
<td><div>'. $link_last_ip .'</div></td>
</tr>
</table><br />';

View file

@ -63,8 +63,8 @@ $bb_cfg = $tr_cfg = $page_cfg = array();
// Increase number of revision after update
$bb_cfg['tp_version'] = '2.4 (beta)';
$bb_cfg['tp_release_state'] = 'R336';
$bb_cfg['tp_release_date'] = '09-12-2011';
$bb_cfg['tp_release_state'] = 'R337';
$bb_cfg['tp_release_date'] = '17-12-2011';
// Database
$charset = 'utf8';
@ -580,4 +580,6 @@ $bb_cfg['latest_news_forum_id'] = '1'; // (string) 1,2,3...
$bb_cfg['show_network_news'] = true;
$bb_cfg['max_net_title'] = 50;
$bb_cfg['network_news_count'] = 5;
$bb_cfg['network_news_forum_id'] = '2'; // (string) 1,2,3...
$bb_cfg['network_news_forum_id'] = '2'; // (string) 1,2,3...
$bb_cfg['whois_info'] = 'http://ip-whois.net/ip_geo.php?ip=';

View file

@ -160,7 +160,7 @@ table.forumline { margin: 0 auto; }
</tr>
<!-- BEGIN reg_user_row -->
<tr class="{reg_user_row.ROW_CLASS}">
<td nowrap="nowrap">{reg_user_row.USER}</td>
<td class="bold" nowrap="nowrap">{reg_user_row.USER}</td>
<td align="center" nowrap="nowrap">{reg_user_row.STARTED}-{reg_user_row.LASTUPDATE}</td>
<td class="tCenter"><a href="{reg_user_row.U_WHOIS_IP}" class="gen" target="_blank">{reg_user_row.IP_ADDRESS}</a></td>
</tr>
@ -169,10 +169,10 @@ table.forumline { margin: 0 auto; }
<td colspan="3" class="row3"><img src="{SPACER}" width="1" height="1" alt="."></td>
</tr>
<!-- BEGIN guest_user_row -->
<tr>
<td nowrap="nowrap" class="{guest_user_row.ROW_CLASS}">&nbsp;<span class="gen">{guest_user_row.USERNAME}</span>&nbsp;</td>
<td align="center" nowrap="nowrap" class="{guest_user_row.ROW_CLASS}">&nbsp;<span class="gen">{guest_user_row.STARTED}-{guest_user_row.LASTUPDATE}</span>&nbsp;</td>
<td class="{guest_user_row.ROW_CLASS}">&nbsp;<span class="gen"><a href="{guest_user_row.U_WHOIS_IP}" target="_blank">{guest_user_row.IP_ADDRESS}</a></span>&nbsp;</td>
<tr class="{guest_user_row.ROW_CLASS}">
<td nowrap="nowrap">{L_GUEST}</td>
<td align="center">{guest_user_row.STARTED}-{guest_user_row.LASTUPDATE}</td>
<td class="tCenter"><a href="{guest_user_row.U_WHOIS_IP}" target="_blank">{guest_user_row.IP_ADDRESS}</a></td>
</tr>
<!-- END guest_user_row -->
</table>

View file

@ -102,7 +102,7 @@ while ( $row = DB()->sql_fetchrow($result) )
'LASTUPDATE' => bb_date($row['session_time']),
'LASTUPDATE_RAW' => $row['session_time'],
'USERIP' => $user_ip,
'U_WHOIS_IP' => "http://ip-whois.net/ip_geo.php?ip=$user_ip",
'U_WHOIS_IP' => $bb_cfg['whois_info'] . $user_ip,
));
$which_counter++;

View file

@ -830,13 +830,15 @@ for($i = 0; $i < $total_posts; $i++)
{
$poster_avatar = get_avatar($postrow[$i]['user_avatar'], $postrow[$i]['user_avatar_type'], !bf($postrow[$i]['user_opt'], 'user_opt', 'allow_avatar'));
}
$user_rank = $postrow[$i]['user_rank'];
//
// Generate ranks, set them to empty string initially.
//
$poster_rank = $rank_image = '';
if (!$user->opt_js['h_rnk_i'] AND $user_rank = $postrow[$i]['user_rank'] AND isset($ranks[$user_rank]))
if (!$user->opt_js['h_rnk_i'] AND isset($ranks[$user_rank]))
{
$rank_image = ($bb_cfg['show_rank_image'] && $ranks[$user_rank]['rank_image']) ? '<img src="'. $ranks[$user_rank]['rank_image'] .'" alt="" title="" border="0" />' : '';
$poster_rank = ($bb_cfg['show_rank_text']) ? $ranks[$user_rank]['rank_title'] : '';