Version 2.2.0 RC-1
This commit is contained in:
1 parent
f73f8bff6d
commit
22f1b963ee
1034 files changed
+178610
-70897
No files matched your search
@@ -2,28 +2,18 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| 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: 2006-01-30 18:53:19 +0000 (Mon, 30 Jan 2006) $
|
||||
| > $Revision: 127 $
|
||||
| > $Author: bfarber $
|
||||
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Board index functions module
|
||||
@@ -37,7 +27,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();
|
||||
}
|
||||
|
||||
@@ -101,7 +91,8 @@ class func_boardstats
|
||||
|
||||
if ( $this->ipsclass->member['id'] )
|
||||
{
|
||||
$rows = array( $ar_time => array( 'login_type' => substr($this->ipsclass->member['login_anonymous'],0, 1),
|
||||
$rows = array( $ar_time.'.'.md5(microtime()) => array( 'id' => 0,
|
||||
'login_type' => substr($this->ipsclass->member['login_anonymous'],0, 1),
|
||||
'running_time' => $ar_time,
|
||||
'member_id' => $this->ipsclass->member['id'],
|
||||
'member_name' => $this->ipsclass->member['members_display_name'],
|
||||
@@ -128,6 +119,20 @@ class func_boardstats
|
||||
|
||||
krsort( $rows );
|
||||
|
||||
//-----------------------------------------
|
||||
// Is this a root admin in disguise?
|
||||
// Is that kinda like a diamond in the rough?
|
||||
//-----------------------------------------
|
||||
|
||||
$our_mgroups = array();
|
||||
|
||||
if( isset($this->ipsclass->member['mgroup_others']) AND $this->ipsclass->member['mgroup_others'] )
|
||||
{
|
||||
$our_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) );
|
||||
}
|
||||
|
||||
$our_mgroups[] = $this->ipsclass->member['mgroup'];
|
||||
|
||||
//-----------------------------------------
|
||||
// cache all printed members so we
|
||||
// don't double print them
|
||||
@@ -155,7 +160,7 @@ class func_boardstats
|
||||
{
|
||||
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 ) )
|
||||
{
|
||||
$active['NAMES'] .= "{$result['member_name']}*{$this->sep_char} \n";
|
||||
}
|
||||
@@ -195,15 +200,14 @@ class func_boardstats
|
||||
if ( empty( $cached[ $result['member_id'] ] ) )
|
||||
{
|
||||
$cached[ $result['member_id'] ] = 1;
|
||||
|
||||
$result['prefix'] = $this->ipsclass->cache['group_cache'][ $result['member_group'] ]['prefix'];
|
||||
$result['suffix'] = $this->ipsclass->cache['group_cache'][ $result['member_group'] ]['suffix'];
|
||||
|
||||
$result['member_name'] = $this->ipsclass->make_name_formatted( $result['member_name'], $result['member_group'] );
|
||||
|
||||
if ($result['login_type'])
|
||||
{
|
||||
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) )
|
||||
{
|
||||
$active['NAMES'] .= "<a href='{$this->ipsclass->base_url}showuser={$result['member_id']}' title='$last_date'>{$result['prefix']}{$result['member_name']}{$result['suffix']}</a>*{$this->sep_char} \n";
|
||||
$active['NAMES'] .= "<a href='{$this->ipsclass->base_url}showuser={$result['member_id']}' title='$last_date'>{$result['member_name']}</a>*{$this->sep_char} \n";
|
||||
$active['ANON']++;
|
||||
}
|
||||
else
|
||||
@@ -214,7 +218,7 @@ class func_boardstats
|
||||
else
|
||||
{
|
||||
$active['MEMBERS']++;
|
||||
$active['NAMES'] .= "<a href='{$this->ipsclass->base_url}showuser={$result['member_id']}' title='$last_date'>{$result['prefix']}{$result['member_name']}{$result['suffix']}</a>{$this->sep_char} \n";
|
||||
$active['NAMES'] .= "<a href='{$this->ipsclass->base_url}showuser={$result['member_id']}' title='$last_date'>{$result['member_name']}</a>{$this->sep_char} \n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -250,6 +254,8 @@ class func_boardstats
|
||||
|
||||
function show_calendar_events()
|
||||
{
|
||||
$stats_html = "";
|
||||
|
||||
if ($this->ipsclass->vars['show_birthdays'] or $this->ipsclass->vars['show_calendar'] )
|
||||
{
|
||||
$a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() + $this->ipsclass->get_time_offset() ) );
|
||||
@@ -266,12 +272,19 @@ class func_boardstats
|
||||
{
|
||||
if ( is_array($this->ipsclass->cache['birthdays']) AND count( $this->ipsclass->cache['birthdays'] ) )
|
||||
{
|
||||
foreach( $this->ipsclass->cache['birthdays'] as $id => $u )
|
||||
foreach( $this->ipsclass->cache['birthdays'] as $u )
|
||||
{
|
||||
if ( $u['bday_day'] == $day and $u['bday_month'] == $month )
|
||||
{
|
||||
$users[] = $u;
|
||||
}
|
||||
else if( $day == 28 && $month == 2 && !date("L") )
|
||||
{
|
||||
if ( $u['bday_day'] == "29" and $u['bday_month'] == $month )
|
||||
{
|
||||
$users[] = $u;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,7 +292,7 @@ class func_boardstats
|
||||
// Spin and print...
|
||||
//-----------------------------------------
|
||||
|
||||
foreach ( $users as $id => $user )
|
||||
foreach ( $users as $user )
|
||||
{
|
||||
$birthstring .= "<a href='{$this->ipsclass->base_url}showuser={$user['id']}'>{$user['members_display_name']}</a>";
|
||||
|
||||
@@ -332,15 +345,36 @@ class func_boardstats
|
||||
$events = array();
|
||||
$show_events = array();
|
||||
|
||||
$member_permission_groups[] = $this->ipsclass->member['mgroup'];
|
||||
|
||||
if( isset($this->ipsclass->member['mgroup_others']) AND $this->ipsclass->member['mgroup_others'] )
|
||||
{
|
||||
$this->ipsclass->member['mgroup_others'] = $this->ipsclass->clean_perm_string($this->ipsclass->member['mgroup_others']);
|
||||
|
||||
$mgroup_others = explode( ",", $this->ipsclass->member['mgroup_others'] );
|
||||
|
||||
if( count($mgroup_others) )
|
||||
{
|
||||
foreach( $mgroup_others as $mgroup )
|
||||
{
|
||||
if( $mgroup )
|
||||
{
|
||||
$member_permission_groups[] = $mgroup;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( is_array($this->ipsclass->cache['calendar']) AND count( $this->ipsclass->cache['calendar'] ) )
|
||||
{
|
||||
foreach( $this->ipsclass->cache['calendar'] as $id => $u )
|
||||
foreach( $this->ipsclass->cache['calendar'] as $u )
|
||||
{
|
||||
$set_offset = 0;
|
||||
if( $u['event_timeset'] && !($u['event_recurring'] == 0 AND $u['event_unix_to']) )
|
||||
{
|
||||
$set_offset = $this->ipsclass->member['time_offset'] * 3600;
|
||||
$set_offset = isset($this->ipsclass->member['time_offset']) ? $this->ipsclass->member['time_offset'] * 3600 : 0;
|
||||
}
|
||||
|
||||
$u['_unix_from'] = $u['event_unix_from'] - $set_offset;
|
||||
$u['_unix_to'] = $u['event_unix_to'] - $set_offset;
|
||||
|
||||
@@ -357,18 +391,54 @@ class func_boardstats
|
||||
// Got perms?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->ipsclass->check_perms( $u['event_perms'] ) != TRUE )
|
||||
if ( $u['event_perms'] != "*" )
|
||||
{
|
||||
continue;
|
||||
$event_perms = explode( ",", $this->ipsclass->clean_perm_string( $u['event_perms'] ) );
|
||||
|
||||
$check = 0;
|
||||
|
||||
if( count($event_perms) )
|
||||
{
|
||||
foreach( $event_perms as $mgroup_perm )
|
||||
{
|
||||
if( in_array( $mgroup_perm, $member_permission_groups ) )
|
||||
{
|
||||
$check = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( !$check )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Got calendar perms?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->ipsclass->check_perms( $u['_perm_read'] ) != TRUE )
|
||||
if ( $u['_perm_read'] != "*" )
|
||||
{
|
||||
continue;
|
||||
$read_perms = explode( ",", $this->ipsclass->clean_perm_string( $u['_perm_read'] ) );
|
||||
|
||||
$check = 0;
|
||||
|
||||
if( count($read_perms) )
|
||||
{
|
||||
foreach( $read_perms as $mgroup_perm )
|
||||
{
|
||||
if( in_array( $mgroup_perm, $member_permission_groups ) )
|
||||
{
|
||||
$check = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( !$check )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -376,10 +446,10 @@ class func_boardstats
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $u['event_recurring'] == 0 AND ( ( $u['event_unix_from'] >= $our_unix AND $u['event_unix_from'] <= $max_date )
|
||||
OR ( $u['event_unix_to'] = 0 AND $u['event_unix_from'] >= $our_unix AND $u['event_unix_from'] <= $max_date ) ) )
|
||||
OR ( $u['event_unix_to'] == 0 AND $u['event_unix_from'] >= $our_unix AND $u['event_unix_from'] <= $max_date ) ) )
|
||||
{
|
||||
$u['event_activetime'] = $u['_unix_from'];
|
||||
$events[$u['event_unix_from'].$u['event_id']] = $u;
|
||||
$events[ str_pad( $u['event_unix_from'].$u['event_id'], 15, "0" ) ] = $u;
|
||||
}
|
||||
elseif( $u['event_recurring'] > 0 )
|
||||
{
|
||||
@@ -390,7 +460,7 @@ class func_boardstats
|
||||
if( $cust_range_s >= $our_unix AND $cust_range_s <= $max_date )
|
||||
{
|
||||
$u['event_activetime'] = $cust_range_s;
|
||||
$events[$cust_range_s.$u['event_id']] = $u;
|
||||
$events[ str_pad( $cust_range_s.$u['event_id'], 15, "0" ) ] = $u;
|
||||
}
|
||||
|
||||
if( $u['event_recurring'] == "1" )
|
||||
@@ -416,16 +486,14 @@ class func_boardstats
|
||||
|
||||
ksort($events);
|
||||
|
||||
foreach( $events as $e => $event )
|
||||
foreach( $events as $event )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Recurring?
|
||||
//-----------------------------------------
|
||||
|
||||
$c_time = '';
|
||||
//if ( ! $event['event_recurring'] )
|
||||
//{
|
||||
$c_time = gmdate( 'j-F-y', $event['event_activetime'] );
|
||||
//}
|
||||
$c_time = gmdate( 'j-F-y', $event['event_activetime'] );
|
||||
|
||||
$show_events[] = "<a href='{$this->ipsclass->base_url}act=calendar&code=showevent&calendar_id={$event['event_calendar_id']}&event_id={$event['event_id']}' title='$c_time'>".$event['event_title']."</a>";
|
||||
}
|
||||
@@ -459,6 +527,8 @@ class func_boardstats
|
||||
|
||||
function show_totals()
|
||||
{
|
||||
$stats_html = "";
|
||||
|
||||
if ($this->ipsclass->vars['show_totals'])
|
||||
{
|
||||
if ( ! is_array( $this->ipsclass->cache['stats'] ) )
|
||||
|
||||
Reference in new issue
Block a user