Version 2.1.7

This commit is contained in:
Neo committed 2025-12-19 00:21:15 -08:00
1 parent 0eecc172d9
commit f73f8bff6d
941 files changed
+215301 -103093

No files matched your search

+60 -29
View File
@@ -2,16 +2,28 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board v2.0.0
| Invision Power Board 2.1.7
| =============================================
| by Matthew Mecham
| (c) 2001 - 2004 Invision Power Services, Inc.
| (c) 2001 - 2005 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| Time: Tue, 21 Sep 2004 16:34:28 GMT
| Release: 150aa7a702c3c8b6f6eb90ad49305d2f
| 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 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > TASK SCRIPT: Test
@@ -28,7 +40,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -45,53 +57,72 @@ class task_item
function run_task()
{
global $DB, $ibforums, $std;
//-----------------------------------------
// Get current stats...
//-----------------------------------------
$stats = $DB->simple_exec_query( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='stats'" ) );
$stats = array();
$stats = unserialize(stripslashes($stats['cs_value']));
$r = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='stats'" ) );
$tmp = unserialize( $this->ipsclass->txt_safeslashes($r['cs_value']) );
if ( is_array( $tmp ) and count( $tmp ) )
{
foreach( $tmp as $k => $v )
{
$stats[ $k ] = stripslashes($v);
}
}
unset( $tmp );
//-----------------------------------------
// Rebuild stats
//-----------------------------------------
$r = $DB->simple_exec_query( array( 'select' => 'count(*) as posts', 'from' => 'posts', 'where' => 'queued <> 1' ) );
$stats['total_replies'] = intval($r['posts']);
$topics = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'COUNT(*) as tcount',
'from' => 'topics',
'where' => 'approved=1' ) );
$r = $DB->simple_exec_query( array( 'select' => 'count(*) as topics', 'from' => 'topics', 'where' => 'approved = 1' ) );
$stats['total_topics'] = intval($r['topics']);
$stats['total_replies'] -= $stats['total_topics'];
$posts = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'SUM(posts) as replies',
'from' => 'topics',
'where' => 'approved=1' ) );
$stats['total_topics'] = $topics['tcount'];
$stats['total_replies'] = $posts['replies'];
$r = $DB->simple_exec_query( array( 'select' => 'count(*) as members', 'from' => 'members', 'where' => "mgroup <> ".$ibforums->vars['auth_group'] ) );
$r = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as members', 'from' => 'members', 'where' => "mgroup <> ".$this->ipsclass->vars['auth_group'] ) );
$stats['mem_count'] = intval( $r['members'] );
$r = $DB->simple_exec_query( array( 'select' => 'id, name',
'from' => 'members',
'where' => "mgroup <> ".$ibforums->vars['auth_group'],
'order' => 'id DESC',
'limit' => array(0,1)
) );
$r = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'id, name, members_display_name',
'from' => 'members',
'where' => "mgroup <> ".$this->ipsclass->vars['auth_group'],
'order' => 'id DESC',
'limit' => array(0,1)
) );
$stats['last_mem_name'] = $r['name'];
$stats['last_mem_name'] = $r['members_display_name'];
$stats['last_mem_id'] = $r['id'];
if ( count($stats) > 0 )
{
$DB->obj['use_shutdown'] = 0;
$ibforums->cache['stats'] = $stats;
$std->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 1 ) );
$this->ipsclass->DB->obj['use_shutdown'] = 0;
$this->ipsclass->cache['stats'] = $stats;
$this->ipsclass->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 1 ) );
}
//-----------------------------------------
// Log to log table - modify but dont delete
//-----------------------------------------
$this->class->append_task_log( $this->task, 'Statistics rebuilt' );
$this->class->append_task_log( $this->task, 'Ñòàòèñòèêà ïåðåñ÷èòàíà' );
//-----------------------------------------
// Unlock Task: DO NOT MODIFY!
//-----------------------------------------
$this->class->unlock_task( $this->task );
}
/*-------------------------------------------------------------------------*/
@@ -101,8 +132,8 @@ class task_item
function register_class(&$class)
{
$this->class = $class;
$this->class = $class;
$this->ipsclass =& $class->ipsclass;
$this->root_path = $this->class->root_path;
}