Version 2.2.0 RC-1

This commit is contained in:
Neo committed 2025-12-19 00:22:37 -08:00
1 parent f73f8bff6d
commit 22f1b963ee
1034 files changed
+178610 -70897

No files matched your search

+71 -44
View File
@@ -2,27 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Tuesday 18th of July 2006 05:56:00 PM
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
| > $Revision: 23 $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
@@ -39,7 +29,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
@@ -70,7 +60,7 @@ class online
// Are we allowed to see the online list?
//-----------------------------------------
$this->ipsclass->input['st'] = intval($this->ipsclass->input['st']);
$this->ipsclass->input['st'] = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
if ( $this->ipsclass->vars['allow_online_list'] != 1 )
{
@@ -119,7 +109,7 @@ class online
//-----------------------------------------
$this->ipsclass->print->add_output("$this->output");
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) );
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) );
}
@@ -135,7 +125,7 @@ class online
// INIT
//-----------------------------------------
$this->first = intval($this->ipsclass->input['st']);
$this->first = intval($this->ipsclass->input['st']) > 0 ? intval($this->ipsclass->input['st']) : 0;
$show_mem_html = "";
$sort_order_html = "";
$sort_key_html = "";
@@ -150,10 +140,23 @@ class online
$sort_order = array( 'desc', 'asc' );
$sort_key = array( 'click', 'name' );
$show_mem_value = $this->ipsclass->input['show_mem'] ? $this->ipsclass->input['show_mem'] : 'all';
$sort_order_value = $this->ipsclass->input['sort_order'] ? $this->ipsclass->input['sort_order'] : 'desc';
$sort_key_value = $this->ipsclass->input['sort_key'] ? $this->ipsclass->input['sort_key'] : 'click';
$show_mem_value = (isset($this->ipsclass->input['show_mem']) AND $this->ipsclass->input['show_mem']) ? $this->ipsclass->input['show_mem'] : 'all';
$sort_order_value = (isset($this->ipsclass->input['sort_order']) AND $this->ipsclass->input['sort_order']) ? $this->ipsclass->input['sort_order'] : 'desc';
$sort_key_value = (isset($this->ipsclass->input['sort_key']) AND $this->ipsclass->input['sort_key']) ? $this->ipsclass->input['sort_key'] : 'click';
//-----------------------------------------
// Get member groups
//-----------------------------------------
$our_mgroups = array();
if( $this->ipsclass->member['mgroup_others'] )
{
$our_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) );
}
$our_mgroups[] = $this->ipsclass->member['mgroup'];
//-----------------------------------------
// Build lists
//-----------------------------------------
@@ -207,11 +210,11 @@ class online
$db_order = $sort_order_value == 'asc' ? 'asc' : 'desc';
$db_key = $sort_key_value == 'click' ? 'running_time' : 'member_name';
switch ($show_mem_value)
{
case 'reg':
$db_mem = " AND s.member_id != 0 AND s.member_group <> {$this->ipsclass->vars['guest_group']}";
$db_mem = " AND s.member_id <> 0 AND s.member_group <> {$this->ipsclass->vars['guest_group']}";
break;
case 'guest':
$db_mem = " AND s.member_group = {$this->ipsclass->vars['guest_group']} ";
@@ -221,7 +224,27 @@ class online
break;
}
$max = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'COUNT(*) as total_sessions', 'from' => 'sessions s', 'where' => "running_time > $t_time".$db_mem ) );
$remove_spiders = 0;
if ( $this->ipsclass->vars['spider_anon'] )
{
if ( !in_array( $this->ipsclass->vars['admin_group'], $our_mgroups ) )
{
$remove_spiders = 1;
}
}
$remove_anon = 1;
if ( (in_array( $this->ipsclass->vars['admin_group'], $our_mgroups )) and ($this->ipsclass->vars['disable_admin_anon'] != 1) )
{
$remove_anon = 0;
}
$this->ipsclass->DB->cache_add_query( 'session_get_count', array( 'time' => $t_time, 'db_mem' => $db_mem, 'remove_anon' => $remove_anon, 'remove_spiders' => $remove_spiders ) );
$this->ipsclass->DB->cache_exec_query();
$max = $this->ipsclass->DB->fetch_row();
$links = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $max['total_sessions'],
'PER_PAGE' => 25,
@@ -238,19 +261,19 @@ class online
// Grab all the current sessions.
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
'from' => 'sessions s',
'where' => "s.running_time > $t_time $db_mem",
'order' => "$db_key $db_order",
'limit' => array( $this->first, 25 )
) );
$this->ipsclass->DB->simple_exec();
$this->ipsclass->DB->cache_add_query( 'session_get_sessions', array( 'time' => $t_time, 'db_mem' => $db_mem, 'remove_anon' => $remove_anon, 'remove_spiders' => $remove_spiders,
'db_key' => $db_key, 'db_order' => $db_order, 'start' => $this->first, 'finish' => 25 ) );
$outer = $this->ipsclass->DB->cache_exec_query();
while( $r = $this->ipsclass->DB->fetch_row() )
if( !$this->ipsclass->DB->get_num_rows($outer) && $this->first > 0 )
{
$r['prefix'] = $this->ipsclass->cache['group_cache'][ $r['member_group'] ]['prefix'];
$r['suffix'] = $this->ipsclass->cache['group_cache'][ $r['member_group'] ]['suffix'];
// We are request page 2 - but there is no page 2 now...
$this->ipsclass->boink_it( $this->ipsclass->base_url."act=Online&amp;sortkey={$sort_key_value}&amp;show_mem={$show_mem_value}&amp;sort_order={$sort_order_value}" );
}
while( $r = $this->ipsclass->DB->fetch_row($outer) )
{
$r['member_name'] = $this->ipsclass->make_name_formatted( $r['member_name'], $r['member_group'] );
$final[ $r['id'] ] = $r;
@@ -324,7 +347,7 @@ class online
// LOOPY
//-----------------------------------------
foreach( $final as $idx => $sess )
foreach( $final as $sess )
{
//-----------------------------------------
// Is this a member, and have we seen them before?
@@ -341,7 +364,7 @@ class online
if ( $this->ipsclass->vars['spider_anon'] )
{
if ( $this->ipsclass->member['mgroup'] == $this->ipsclass->vars['admin_group'] )
if ( in_array( $this->ipsclass->vars['admin_group'], $our_mgroups ) )
{
$inv = '*';
}
@@ -355,7 +378,7 @@ class online
}
else if ($sess['login_type'] == 1)
{
if ( ($this->ipsclass->member['mgroup'] == $this->ipsclass->vars['admin_group']) and ($this->ipsclass->vars['disable_admin_anon'] != 1) )
if ( (in_array( $this->ipsclass->vars['admin_group'], $our_mgroups )) and ($this->ipsclass->vars['disable_admin_anon'] != 1) )
{
$inv = '*';
}
@@ -401,7 +424,7 @@ class online
// PARSED?
//-----------------------------------------
if ( $sess['_parsed'] )
if ( isset($sess['_parsed']) AND $sess['_parsed'] )
{
$line = "<a href='{$sess['_url']}'>{$sess['_text']}</a>";
}
@@ -473,7 +496,7 @@ class online
$sess['where_line'] = $line;
if ( ($this->ipsclass->member['mgroup'] == $this->ipsclass->vars['admin_group']) and ($this->ipsclass->vars['disable_online_ip'] != 1) )
if ( (in_array( $this->ipsclass->vars['admin_group'], $our_mgroups )) and ($this->ipsclass->vars['disable_online_ip'] != 1) )
{
$sess['ip_address'] = " ( ".$sess['ip_address']." )";
}
@@ -482,9 +505,13 @@ class online
$sess['ip_address'] = "";
}
if ( ($sess['member_id']) )
if ( $sess['member_id'] )
{
$sess['member_name'] = "<a href='{$this->base_url}showuser={$sess['member_id']}'>{$sess['prefix']}{$sess['member_name']}{$sess['suffix']}</a>$inv {$sess['ip_address']}";
$sess['member_name'] = "<a href='{$this->base_url}showuser={$sess['member_id']}'>{$sess['member_name']}</a>{$inv} {$sess['ip_address']}";
}
else if( isset($sess['is_bot']) AND $sess['is_bot'] )
{
$sess['member_name'] = $sess['member_name'].$inv;
}
$sess['running_time'] = $this->ipsclass->get_date( $sess['running_time'], 'LONG' );
@@ -511,9 +538,9 @@ class online
}
else
{
if ( ! $sess['is_bot'] )
if ( !isset($sess['is_bot']) OR !$sess['is_bot'] )
{
$sess['member_name'] = $sess['prefix'].$this->ipsclass->lang['guest'].$sess['suffix']." ".$sess['ip_address'];
$sess['member_name'] = $this->ipsclass->lang['guest']." ".$sess['ip_address'];
$sess['msg_icon'] = '&nbsp;';
}
else