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

+29 -12
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,14 +57,13 @@ class task_item
function run_task()
{
global $DB, $ibforums, $std;
//-----------------------------------------
// Deactivate expired announcements
//-----------------------------------------
require_once( $this->root_path.'sources/announcements.php' );
$announce = new announcements();
require_once( $this->root_path.'sources/action_public/announcements.php' );
$announce = new announcements();
$announce->ipsclass =& $this->ipsclass;
$announce->announce_retire_expired();
@@ -60,7 +71,13 @@ class task_item
// Log to log table - modify but dont delete
//-----------------------------------------
$this->class->append_task_log( $this->task, 'Announcements updated' );
$this->class->append_task_log( $this->task, 'Îáúÿâëåíèÿ îáíîâëåíû' );
//-----------------------------------------
// Unlock Task: DO NOT MODIFY!
//-----------------------------------------
$this->class->unlock_task( $this->task );
}
/*-------------------------------------------------------------------------*/
@@ -70,8 +87,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;
}
+28 -11
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: Send Bulk Mail
@@ -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,18 +57,23 @@ class task_item
function run_task()
{
global $DB, $ibforums, $std;
define( 'IN_ACP', 1 );
//-----------------------------------------
// Load Bulk Mailer thing
//-----------------------------------------
require_once( $this->root_path.'sources/admin/ad_postoffice.php' );
$po = new ad_postoffice();
require_once( $this->root_path.'sources/action_admin/postoffice.php' );
$po = new ad_postoffice();
$po->ipsclass =& $this->ipsclass;
$po->mail_send_process( $this->root_path );
//-----------------------------------------
// Unlock Task: DO NOT MODIFY!
//-----------------------------------------
$this->class->unlock_task( $this->task );
}
/*-------------------------------------------------------------------------*/
@@ -66,8 +83,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;
}
+32 -110
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();
}
@@ -46,113 +58,17 @@ class task_item
function run_task()
{
global $DB, $ibforums, $std;
//-----------------------------------------
// Cache calendar info
// Load and recache info
//-----------------------------------------
$calendar = array();
$birthdays = array();
define( 'IN_ACP', 1 );
$a = explode( ',', gmdate( 'Y,n,j,G,i,s', time() ) );
require_once( ROOT_PATH . 'sources/action_admin/calendars.php' );
$calendars = new ad_calendars();
$calendars->ipsclass =& $this->ipsclass;
$day = $a[2];
$month = $a[1];
$year = $a[0];
$daysinmonth = date( 't', time() );
//-----------------------------------------
// Get 24hr before and 24hr after to make
// sure we don't break any timezones
//-----------------------------------------
$last_day = $day - 1;
$last_month = $month;
$last_year = $year;
$next_day = $day + 1;
$next_month = $month;
$next_year = $year;
//-----------------------------------------
// Calculate dates..
//-----------------------------------------
if ( $last_day == 0 )
{
$last_month -= 1;
$last_day = date( 't', time() - 86400 );
}
if ( $last_month == 0 )
{
$last_month = 12;
$last_year -= 1;
}
if ( $next_day > date( 't', time() ) )
{
$next_month += 1;
$next_day = 1;
}
if ( $next_month == 13 )
{
$next_month = 1;
$next_year += 1;
}
//-----------------------------------------
// Grab birthdays
//-----------------------------------------
$DB->simple_construct( array( 'select' => 'id, name, mgroup, bday_day, bday_month, bday_year',
'from' => 'members',
'where' => "( bday_day=$last_day AND bday_month=$last_month )
or ( bday_day=$day AND bday_month=$month )
or ( bday_day=$next_day AND bday_month=$next_month )"
) );
$DB->simple_exec();
while ( $r = $DB->fetch_row() )
{
$birthdays[ $r['id'] ] = $r;
}
//-----------------------------------------
// Grab Calendar (-24hr + 24hr)
//-----------------------------------------
if ($ibforums->vars['calendar_limit'] < 2)
{
$ibforums->vars['calendar_limit'] = 2;
}
$our_unix = time() - 86400;
$max_date = $our_unix + ( ($ibforums->vars['calendar_limit'] + 1 ) * 86400);
$DB->simple_construct( array( 'select' => 'eventid, title, read_perms, priv_event, userid, unix_stamp',
'from' => 'calendar_events',
'where' => "unix_stamp > $our_unix and unix_stamp < $max_date",
'order' => "unix_stamp"
) );
$DB->simple_exec();
while ( $r = $DB->fetch_row() )
{
$calendar[ $r['eventid'] ] = $r;
}
//-----------------------------------------
// Save...
//-----------------------------------------
$DB->simple_exec_query( array( 'delete' => 'cache_store', 'where' => "cs_key IN ('birthdays', 'calendar')" ) );
$DB->do_insert( 'cache_store', array( 'cs_array' => 1, 'cs_key' => 'birthdays', 'cs_value' => addslashes(serialize($birthdays)) ) );
$DB->do_insert( 'cache_store', array( 'cs_array' => 1, 'cs_key' => 'calendar' , 'cs_value' => addslashes(serialize($calendar)) ) );
$calendars->calendar_rebuildcache( 0 );
//-----------------------------------------
// Log to log table - modify but dont delete
@@ -160,8 +76,14 @@ class task_item
if ( ! $this->restrict_log )
{
$this->class->append_task_log( $this->task, intval(count($birthdays))." birthdays cached, ".intval(count($calendar))." events cached" );
$this->class->append_task_log( $this->task, "Êåø êàëåíäàðÿ îáíîâëåí" );
}
//-----------------------------------------
// Unlock Task: DO NOT MODIFY!
//-----------------------------------------
$this->class->unlock_task( $this->task );
}
/*-------------------------------------------------------------------------*/
@@ -171,8 +93,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;
}
+30 -14
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,23 +57,21 @@ class task_item
function run_task()
{
global $DB, $ibforums, $std;
//-----------------------------------------
// Delete reg_anti_spam
//-----------------------------------------
$date = time() - (60*60*6);
$DB->simple_exec_query( array( 'delete' => 'reg_antispam', 'where' => 'ctime < '.$date ) );
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'reg_antispam', 'where' => 'ctime < '.$date ) );
//-----------------------------------------
// Delete old sessions
//-----------------------------------------
$date = $ibforums->vars['session_expiration'] ? (time() - $ibforums->vars['session_expiration']) : (time() - 3600);
$date = $this->ipsclass->vars['session_expiration'] ? (time() - $this->ipsclass->vars['session_expiration']) : (time() - 3600);
$DB->simple_exec_query( array( 'delete' => 'sessions', 'where' => "running_time < {$date}" ) );
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'sessions', 'where' => "running_time < {$date}" ) );
//-----------------------------------------
// Delete old searches
@@ -69,13 +79,19 @@ class task_item
$date = time() - (60*60*24);
$DB->simple_exec_query( array( 'delete' => 'search_results', 'where' => "search_date < {$date}" ) );
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'search_results', 'where' => "search_date < {$date}" ) );
//-----------------------------------------
// Log to log table - modify but dont delete
//-----------------------------------------
$this->class->append_task_log( $this->task, 'Old reg_images, sessions and search results removed' );
$this->class->append_task_log( $this->task, 'Ñòàðûå ñåññèè, íåíóæíûå èçîáðàæåíèÿ è ðåçóëüòàòû ïîèñêà óäàëåíû' );
//-----------------------------------------
// Unlock Task: DO NOT MODIFY!
//-----------------------------------------
$this->class->unlock_task( $this->task );
}
/*-------------------------------------------------------------------------*/
@@ -85,8 +101,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;
}
+37 -21
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,8 +57,6 @@ class task_item
function run_task()
{
global $DB, $ibforums, $std;
//-----------------------------------------
// Delete old subscriptions
//-----------------------------------------
@@ -54,21 +64,21 @@ class task_item
$deleted = 0;
$trids = array();
if ($ibforums->vars['subs_autoprune'] > 0)
if ($this->ipsclass->vars['subs_autoprune'] > 0)
{
$time = time() - ($ibforums->vars['subs_autoprune'] * 86400);
$time = time() - ($this->ipsclass->vars['subs_autoprune'] * 86400);
$DB->cache_add_query( 'ucp_tracker_prune', array( 'time' => $time ) );
$DB->cache_exec_query();
$this->ipsclass->DB->cache_add_query( 'ucp_tracker_prune', array( 'time' => $time ) );
$this->ipsclass->DB->cache_exec_query();
while ( $r = $DB->fetch_row() )
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$trids[] = $r['trid'];
}
if (count($trids) > 0)
{
$DB->simple_exec_query( array( 'delete', 'tracker', 'where' => "trid IN (".implode(",",$trids).")" ) );
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'tracker', 'where' => "trid IN (".implode(",",$trids).")" ) );
}
$deleted = intval( count($trids) );
@@ -78,22 +88,28 @@ class task_item
// Remove read topics
//-----------------------------------------
$ibforums->vars['db_topic_read_cutoff'] = intval($ibforums->vars['db_topic_read_cutoff']);
$this->ipsclass->vars['db_topic_read_cutoff'] = intval($this->ipsclass->vars['db_topic_read_cutoff']);
if ( $ibforums->vars['db_topic_read_cutoff'] > 0 )
if ( $this->ipsclass->vars['db_topic_read_cutoff'] > 0 )
{
$time = time() - ( $ibforums->vars['db_topic_read_cutoff'] * 86400 );
$time = time() - ( $this->ipsclass->vars['db_topic_read_cutoff'] * 86400 );
$DB->simple_exec_query( array( 'delete' => 'topics_read', 'where' => "read_date < $time" ) );
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'topics_read', 'where' => "read_date < $time" ) );
$topics_deleted = $DB->get_affected_rows();
$topics_deleted = $this->ipsclass->DB->get_affected_rows();
}
//-----------------------------------------
// Log to log table - modify but dont delete
//-----------------------------------------
$this->class->append_task_log( $this->task, "$deleted subscriptions pruned and {$topics_deleted} db read topic entries deleted" );
$this->class->append_task_log( $this->task, "$deleted ïîäïèñîê ñêðûòî è {$topics_deleted} çàïèñåé î ïðî÷èòàííûõ òåìàõ óäàëåíî" );
//-----------------------------------------
// Unlock Task: DO NOT MODIFY!
//-----------------------------------------
$this->class->unlock_task( $this->task );
}
/*-------------------------------------------------------------------------*/
@@ -103,8 +119,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;
}
+31 -13
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,15 +57,15 @@ class task_item
function run_task()
{
global $DB, $ibforums, $std;
//-----------------------------------------
// Send daily digests...
//-----------------------------------------
require_once( $this->root_path.'sources/lib/digest_functions.php' );
$digest = new digest_functions();
require_once( $this->root_path.'sources/lib/func_digest.php' );
$digest = new func_digest();
$digest->ipsclass =& $this->ipsclass;
$digest->func_digest_init( $this->root_path );
$digest->digest_time = 'daily';
$digest->digest_type = 'topic';
$digest->run_digest();
@@ -66,7 +78,13 @@ class task_item
// Log to log table - modify but dont delete
//-----------------------------------------
$this->class->append_task_log( $this->task, 'Daily Topic & Forum Digest Sent' );
$this->class->append_task_log( $this->task, 'Åæåäíåâíûé îáçîð òåì è ôîðóìà îòïðàâëåí' );
//-----------------------------------------
// Unlock Task: DO NOT MODIFY!
//-----------------------------------------
$this->class->unlock_task( $this->task );
}
/*-------------------------------------------------------------------------*/
@@ -76,8 +94,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;
}
+153
View File
@@ -0,0 +1,153 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 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 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > TASK SCRIPT: Actually expire subs
| > Script written by Matt Mecham
| > Date started: 12th July 2005 (Tuesday)
|
+--------------------------------------------------------------------------
*/
/*-------------------------------------------------------------------------*/
// THIS TASKS OPERATIONS:
// Actually expire subscriptions
/*-------------------------------------------------------------------------*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class task_item
{
var $class = "";
var $task = "";
/*-------------------------------------------------------------------------*/
// Our 'auto_run' function
// ADD CODE HERE
/*-------------------------------------------------------------------------*/
function run_task()
{
//-----------------------------------------
// INIT
//-----------------------------------------
define( 'IN_ACP', 1 );
$expire_ids = array();
//-----------------------------------------
// Get all subs to expire
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
'from' => 'subscription_trans',
'where' => "subtrans_state='paid' AND subtrans_end_date < ".time()
) );
$outer = $this->ipsclass->DB->simple_exec();
while ( $row = $this->ipsclass->DB->fetch_row( $outer ) )
{
$query = array( "sub_end" => 0 );
if ( $row['subtrans_old_group'] > 0 )
{
//---------------------------------------
// Group still exist?
//---------------------------------------
if ( is_array( $this->ipsclass->cache['group_cache'][ $row['subtrans_old_group'] ] ) )
{
$query['mgroup'] = $row['subtrans_old_group'];
}
else
{
//---------------------------------------
// Group has been deleted, reset back to base member group
//---------------------------------------
$query['mgroup'] = $this->ipsclass->vars['member_group'];
}
}
$expire_ids[ $row['subtrans_id'] ] = $row['subtrans_id'];
//---------------------------------------
// Update member
//---------------------------------------
$this->ipsclass->DB->do_update( 'members', $query, "id=".intval($row['subtrans_member_id']) );
}
//---------------------------------------
// Update rows...
//---------------------------------------
if ( count( $expire_ids ) )
{
$this->ipsclass->DB->do_update( 'subscription_trans', array( 'subtrans_state' => "expired" ), "subtrans_id IN (".implode(",",$expire_ids ).")" );
}
//-----------------------------------------
// Unlock Task: DO NOT MODIFY!
//-----------------------------------------
$this->class->append_task_log( $this->task, intval(count($expire_ids))." ïîëüçîâàòåëåé îòïèñàíî" );
$this->class->unlock_task( $this->task );
}
/*-------------------------------------------------------------------------*/
// register_class
// LEAVE ALONE
/*-------------------------------------------------------------------------*/
function register_class(&$class)
{
$this->class = $class;
$this->ipsclass =& $class->ipsclass;
$this->root_path = $this->class->root_path;
}
/*-------------------------------------------------------------------------*/
// pass_task
// LEAVE ALONE
/*-------------------------------------------------------------------------*/
function pass_task( $this_task )
{
$this->task = $this_task;
}
}
?>
+174
View File
@@ -0,0 +1,174 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 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 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > TASK SCRIPT: Test
| > Script written by Matt Mecham
| > Date started: 28th January 2004
|
+--------------------------------------------------------------------------
*/
//+--------------------------------------------------------------------------
// THIS TASKS OPERATIONS:
// Sends out an email if the subspackage is about to expire
//+--------------------------------------------------------------------------
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class task_item
{
var $class = "";
var $root_path = "";
var $task = "";
/*-------------------------------------------------------------------------*/
// Our 'auto_run' function
// ADD CODE HERE
/*-------------------------------------------------------------------------*/
function run_task()
{
//-----------------------------------------
// GET EMAIL CLASS
//-----------------------------------------
require_once( $this->root_path."sources/classes/class_email.php" );
$this->email = new emailer( $this->root_path );
$this->email->ipsclass =& $this->ipsclass;
$this->email->email_init();
//-----------------------------------------
// INIT
//-----------------------------------------
$members = array();
$ids = array();
$expired = time() + 86400 + 3600; // Tomorrow + 1 hour
$now = time() - 3600;
//-----------------------------------------
// Get members
//-----------------------------------------
$this->ipsclass->DB->build_query( array( 'select' => 'st.subtrans_member_id',
'from' => array( 'subscription_trans' => 'st' ),
'where' => "st.subtrans_state='paid' AND st.subtrans_end_date >= $now AND st.subtrans_end_date <= $expired",
'add_join' => array( 0 => array( 'select' => 'm.id, m.name, m.members_display_name, m.email',
'from' => array( 'members' => 'm' ),
'where' => 'm.id=st.subtrans_member_id',
'type' => 'left' ) ) ) );
$this->ipsclass->DB->exec_query();
while( $r = $this->ipsclass->DB->fetch_row() )
{
$members[ $r['id'] ] = $r;
$ids[] = $r['id'];
}
//-----------------------------------------
// Get subscription packages
//-----------------------------------------
if ( count( $ids ) )
{
$this->ipsclass->DB->build_query( array( 'select' => 'st.subtrans_sub_id, st.subtrans_member_id',
'from' => array( 'subscription_trans' => 'st' ),
'where' => 'st.subtrans_member_id IN ('.implode( ",", $ids ) . ") AND st.subtrans_state='paid'",
'add_join' => array( 0 => array( 'select' => 's.sub_title',
'from' => array( 'subscriptions' => 's' ),
'where' => 's.sub_id=st.subtrans_sub_id',
'type' => 'left' ) ) ) );
$this->ipsclass->DB->exec_query();
while( $r = $this->ipsclass->DB->fetch_row() )
{
$members[ $r['subtrans_member_id'] ]['sub_title'] = $r['sub_title'];
}
//-----------------------------------------
// Send out the EMAILS
//-----------------------------------------
foreach( $members as $id => $member )
{
$this->email->get_template("subscription_expires");
$this->email->build_message( array(
'PACKAGE' => $member['sub_title'],
'EXPIRES' => $this->ipsclass->get_date( $member['sub_end'], 'DATE' ),
'LINK' => $this->ipsclass->vars['board_url'].'/index.'.$this->ipsclass->vars['php_ext'].'?act=paysubs&CODE=index',
) );
$this->email->to = trim( $member['email'] );
$this->email->send_mail();
}
}
//-----------------------------------------
// Log to log table - modify but dont delete
//-----------------------------------------
$this->class->append_task_log( $this->task, intval(count($ids)).' Ïîëüçîâàòåëÿì âûñëàíî ïèñüìî îá îêîí÷àíèè äåéñòâèÿ ïîäïèñêè' );
//-----------------------------------------
// Unlock Task: DO NOT MODIFY!
//-----------------------------------------
$this->class->unlock_task( $this->task );
}
/*-------------------------------------------------------------------------*/
// register_class
// LEAVE ALONE
/*-------------------------------------------------------------------------*/
function register_class(&$class)
{
$this->class = $class;
$this->ipsclass =& $class->ipsclass;
$this->root_path = $this->class->root_path;
}
/*-------------------------------------------------------------------------*/
// pass_task
// LEAVE ALONE
/*-------------------------------------------------------------------------*/
function pass_task( $this_task )
{
$this->task = $this_task;
}
}
?>
+15
View File
@@ -0,0 +1,15 @@
<html>
<head><title>Ошибка &lt; Русская версия Invision Power Board</title></head>
<body>
<h1>Ошибка &lt; Русская версия Invision Power Board</h1>
<hr>
Вы попали на несуществующую страницу!<br>Пожалуйста нажмите на кнопочку &laquo;<b>Назад</b>&raquo;
в вашем браузере для возвращения на предыдущую страницу.
<hr>
<b>Invision Power Board:</b>
<ul>
<li><a href="http://www.bestwarez.ru" title="BestWarez.Ru - Только лучший Варез!">Русская версия</a></li>
<li><a href="http://www.invisionboard.com" title="Official Site">English version</a></li>
</ul>
</body>
</html>
+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;
}
+145
View File
@@ -0,0 +1,145 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 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-14 22:42:46 +0100 (Fri, 14 Oct 2005) $
| > $Revision: 52 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > TASK SCRIPT: Update Views
| > Script written by Matt Mecham
| > Date started: Monday 9th May 2005 (12:06)
|
+--------------------------------------------------------------------------
*/
//-----------------------------------------
// THIS TASKS OPERATIONS:
// Imports awaiting RSS articles
//+----------------------------------------
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class task_item
{
var $class = "";
var $root_path = "";
var $task = "";
/*-------------------------------------------------------------------------*/
// Our 'auto_run' function
// ADD CODE HERE
/*-------------------------------------------------------------------------*/
function run_task()
{
//-----------------------------------------
// INIT
//-----------------------------------------
define( 'IN_ACP', 1 );
$feeds_to_update = array();
$time = time();
$t_minus_30 = time() - ( 30 * 60 );
//-----------------------------------------
// Got any to update?
// 30 mins is RSS friendly.
//-----------------------------------------
$this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'rss_import', 'where' => 'rss_import_enabled=1 AND rss_import_last_import <= '.$t_minus_30 ) );
$rss_main_query = $this->ipsclass->DB->exec_query();
if ( $this->ipsclass->DB->get_num_rows( $rss_main_query ) )
{
require_once( ROOT_PATH . 'sources/action_admin/rssimport.php' );
$admin = new ad_rssimport();
$admin->ipsclass =& $this->ipsclass;
while( $rss_feed = $this->ipsclass->DB->fetch_row( $rss_main_query ) )
{
$this_check = time() - ( $rss_feed['rss_import_time'] * 60 );
if ( $rss_feed['rss_import_last_import'] <= $this_check )
{
//-----------------------------------------
// Set the feeds we need to update...
//-----------------------------------------
$feeds_to_update[] = $rss_feed['rss_import_id'];
}
}
//-----------------------------------------
// Do the update now...
//-----------------------------------------
if ( count( $feeds_to_update ) )
{
$admin->rssimport_rebuild_cache( implode( ",", $feeds_to_update), 0, 1 );
}
}
//-----------------------------------------
// Log to log table - modify but dont delete
//-----------------------------------------
$this->class->append_task_log( $this->task, 'RSS Èìïîðò çàâåðøåí ('. count($feeds_to_update) .')' );
//-----------------------------------------
// Unlock Task: DO NOT MODIFY!
//-----------------------------------------
$this->class->unlock_task( $this->task );
}
/*-------------------------------------------------------------------------*/
// register_class
// LEAVE ALONE
/*-------------------------------------------------------------------------*/
function register_class(&$class)
{
$this->class = $class;
$this->ipsclass =& $class->ipsclass;
$this->root_path = $this->class->root_path;
}
/*-------------------------------------------------------------------------*/
// pass_task
// LEAVE ALONE
/*-------------------------------------------------------------------------*/
function pass_task( $this_task )
{
$this->task = $this_task;
}
}
?>
+137
View File
@@ -0,0 +1,137 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 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 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > TASK SCRIPT: Update Views
| > Script written by Matt Mecham
| > Date started: 31st March 2005 (11:04)
|
+--------------------------------------------------------------------------
*/
//-----------------------------------------
// THIS TASKS OPERATIONS:
// Updates the topic views counter
//+----------------------------------------
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class task_item
{
var $class = "";
var $root_path = "";
var $task = "";
/*-------------------------------------------------------------------------*/
// Our 'auto_run' function
// ADD CODE HERE
/*-------------------------------------------------------------------------*/
function run_task()
{
//-----------------------------------------
// Enabled?
//-----------------------------------------
if ( ! $this->ipsclass->vars['update_topic_views_immediately'] )
{
//-----------------------------------------
// Load DB file
//-----------------------------------------
$this->ipsclass->DB->load_cache_file( $this->root_path.'sources/sql/'.SQL_DRIVER.'_extra_queries.php', 'sql_extra_queries' );
//-----------------------------------------
// Get SQL query
//-----------------------------------------
$this->ipsclass->DB->cache_add_query( 'updateviews_get', array(), 'sql_extra_queries' );
$o = $this->ipsclass->DB->cache_exec_query();
while( $r = $this->ipsclass->DB->fetch_row( $o ) )
{
//-----------------------------------------
// Update...
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'update' => 'topics',
'set' => 'views=views+'.intval( $r['topicviews'] ),
'where' => "tid=".intval($r['views_tid'])
) );
$this->ipsclass->DB->simple_exec();
}
//-----------------------------------------
// Delete from table
//-----------------------------------------
$this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'topic_views' ) );
//-----------------------------------------
// Log to log table - modify but dont delete
//-----------------------------------------
$this->class->append_task_log( $this->task, 'Îáíîâëåíèå ñ÷åò÷èêà ïðîñìîòðîâ òåì çàâåðøåíî' );
}
//-----------------------------------------
// Unlock Task: DO NOT MODIFY!
//-----------------------------------------
$this->class->unlock_task( $this->task );
}
/*-------------------------------------------------------------------------*/
// register_class
// LEAVE ALONE
/*-------------------------------------------------------------------------*/
function register_class(&$class)
{
$this->class = $class;
$this->ipsclass =& $class->ipsclass;
$this->root_path = $this->class->root_path;
}
/*-------------------------------------------------------------------------*/
// pass_task
// LEAVE ALONE
/*-------------------------------------------------------------------------*/
function pass_task( $this_task )
{
$this->task = $this_task;
}
}
?>
+30 -12
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,14 +57,14 @@ class task_item
function run_task()
{
global $DB, $ibforums, $std;
//-----------------------------------------
// Send daily digests...
//-----------------------------------------
require_once( $this->root_path.'sources/lib/digest_functions.php' );
$digest = new digest_functions();
require_once( $this->root_path.'sources/lib/func_digest.php' );
$digest = new func_digest();
$digest->ipsclass =& $this->ipsclass;
$digest->func_digest_init( $this->root_path );
$digest->digest_time = 'weekly';
$digest->digest_type = 'topic';
@@ -66,7 +78,13 @@ class task_item
// Log to log table - modify but dont delete
//-----------------------------------------
$this->class->append_task_log( $this->task, 'Weekly Topic & Forum Digest Sent' );
$this->class->append_task_log( $this->task, 'Åæåíåäåëüíûé îáçîð òåì è ôîðóìà ðàçîñëàí' );
//-----------------------------------------
// Unlock Task: DO NOT MODIFY!
//-----------------------------------------
$this->class->unlock_task( $this->task );
}
/*-------------------------------------------------------------------------*/
@@ -76,8 +94,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;
}