Version 2.1.7
This commit is contained in:
1 parent
0eecc172d9
commit
f73f8bff6d
941 files changed
+215301
-103093
No files matched your search
@@ -0,0 +1,714 @@
|
||||
<?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 $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Administration Module
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 27th January 2004
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
| > DBA Checked: Mon 24th May 2004
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåâåðíûé âõîä</h1> Ó Âàñ íåò äîñòóïà ê äèðåêòèâå ýòîãî ôàéëà. Åñëè Âû ïðîâîäèëè îáíîâëåíèÿ, óáåäèòåñü, ÷òî íå çàáûëè îáíîâèòü 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class ad_administration
|
||||
{
|
||||
var $ipsclass;
|
||||
var $html;
|
||||
var $map;
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "tools";
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = "admin";
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Require and RUN !! THERES A BOMB
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Óïðàâëåíèå êåøåì ïîçâîëÿåò âàì ïðîñìàòðèâàòü ñîäåðæèìîå âàøåãî êåøà, à òàêæå è îáíîâëÿòü åãî.";
|
||||
$this->ipsclass->admin->page_title = "Óïðàâëåíèå êåøåì";
|
||||
|
||||
//-----------------------------------------
|
||||
// Load skin
|
||||
//-----------------------------------------
|
||||
|
||||
$this->html = $this->ipsclass->acp_load_template('cp_skin_tools');
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill globals - globals bad, Homer good.
|
||||
//-----------------------------------------
|
||||
|
||||
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
|
||||
|
||||
foreach ( $tmp_in as $k => $v )
|
||||
{
|
||||
unset($$k);
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Map
|
||||
//-----------------------------------------
|
||||
|
||||
$this->map = array( 'forum_cache' => 'Èíôîðìàöèÿ è äàííûå î âñåõ ôîðóìàõ',
|
||||
'group_cache' => 'Èíôîðìàöèÿ è äàííûå î âñåõ ïîëüçîâàòåëüñêèõ ãðóïï',
|
||||
'systemvars' => 'Ðàáî÷åå âðåìÿ ñèñòåìû',
|
||||
'skin_id_cache' => 'Èíôîðìàöèÿ è äàííûå è ñòèëÿõ',
|
||||
'moderators' => 'Èíôîðìàöèÿ è äàííûåõ î âñåõ ìîäåðàòîðõ',
|
||||
'stats' => 'Ñòàòèñòèêà ôîðóìà, îáùåå êîë-âî ñîîáùåíèé è ò.ä.',
|
||||
'ranks' => 'Èíôîðìàöèÿ îá ó÷åòíûõ çàïèñÿõ ïîëüçîâàòåëåé è èõ ñòàòóñàõ',
|
||||
'profilefields' => 'Èíôîðìàöèÿ î äîïîëíèòåëüíûõ ïîëÿõ â ïðîôèëå',
|
||||
'birthdays' => 'Äíè ðîæäåíèÿ ïîëüçîâàòåëåé',
|
||||
'calendar' => 'Ïðèáëèæàþùèåñÿ êàëåíäàðíûå ñîáûòèÿ',
|
||||
'multimod' => 'Èíôîðìàöèÿ è äàííûå î ìóëüòè-ìîäåðàöèè',
|
||||
'bbcode' => "Èíôîðìàöèÿ è äàííûå î ñïåöèàëüíûõ ÁÁ êîäàõ",
|
||||
'settings' => "Íàñòðîéêè ôîðóìà è ïåðåìåííûõ",
|
||||
'emoticons' => 'Èíôîðìàöèÿ è äàííûå î ñìàéëèêàõ',
|
||||
'badwords' => 'Èíôîðìàöèÿ è äàííûå î ôèëüòðå íåöåíçóðíûõ ñëîâ',
|
||||
'languages' => 'Èíôîðìàöèÿ î ÿçûêîâûõ íàñòðîéêàõ',
|
||||
'banfilters' => 'Çàáàíåííûå IP àäðåñà',
|
||||
'attachtypes' => 'Èíôîðìàöèÿ î òèïàõ ïðèêðåïëÿåìûõ ôàéëîâ',
|
||||
'announcements' => 'Êåø ñîîáùåíèé',
|
||||
'components' => 'Âêëþ÷åííûå êîìïîíåíòû â âàøåì IPB',
|
||||
);
|
||||
|
||||
//-----------------------------------------
|
||||
// What to do...
|
||||
//-----------------------------------------
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
case 'cacheend':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' );
|
||||
$this->cache_end();
|
||||
break;
|
||||
|
||||
case 'viewcache':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->view_cache();
|
||||
break;
|
||||
|
||||
case 'cache_update_all':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' );
|
||||
$this->ipsclass->admin->output_multiple_redirect_init( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code_js.'&code=cache_update_all_process&id=0' );
|
||||
break;
|
||||
|
||||
case 'cache_update_all_process':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recache' );
|
||||
$this->cache_update_all_process();
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->cache_start();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Process....
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function cache_update_all_process()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$id = intval( $this->ipsclass->input['id'] );
|
||||
$cache_name = '';
|
||||
$count = 0;
|
||||
$img = '<img src="'.$this->ipsclass->skin_url.'/images/aff_tick_small.png" border="0" alt="-" /> ';
|
||||
|
||||
//-----------------------------------------
|
||||
// Get cache name
|
||||
//-----------------------------------------
|
||||
|
||||
foreach( $this->map as $name => $desc )
|
||||
{
|
||||
if ( $count == $id )
|
||||
{
|
||||
$cache_name = $name;
|
||||
break;
|
||||
}
|
||||
|
||||
$count++;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Do what, now?
|
||||
//-----------------------------------------
|
||||
|
||||
$id++;
|
||||
|
||||
if ( $cache_name )
|
||||
{
|
||||
$this->cache_end( $cache_name, 1 );
|
||||
|
||||
$this->ipsclass->admin->output_multiple_redirect_hit( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code_js.'&code=cache_update_all_process&id='.$id, $img.$cache_name.' processed...' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->admin->output_multiple_redirect_done();
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// DO VIEW
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function view_cache()
|
||||
{
|
||||
if ( ! $this->ipsclass->input['cache'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Íå îäèí ID íå âûáðàí, ïîâòîðèòå ïîïûòêó çàíîâî ";
|
||||
$this->cache_start();
|
||||
}
|
||||
|
||||
$row = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='{$this->ipsclass->input['cache']}'" ) );
|
||||
|
||||
ob_start();
|
||||
if ( $row['cs_array'] )
|
||||
{
|
||||
print_r( unserialize($this->ipsclass->txt_stripslashes($row['cs_value'])) );
|
||||
}
|
||||
else
|
||||
{
|
||||
print $row['cs_value'];
|
||||
}
|
||||
|
||||
$out = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$this->ipsclass->html = "<pre>".htmlspecialchars($out)."</pre>";
|
||||
|
||||
$this->ipsclass->admin->print_popup();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// DO UPDATE
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function cache_end( $cache_name='', $dontcancel=0 )
|
||||
{
|
||||
if ( ! $cache_name )
|
||||
{
|
||||
$cache_name = $this->ipsclass->input['cache'];
|
||||
}
|
||||
|
||||
switch ( $cache_name )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Forum cache
|
||||
//-----------------------------------------
|
||||
|
||||
case 'forum_cache':
|
||||
|
||||
$this->ipsclass->update_forum_cache();
|
||||
|
||||
$this->ipsclass->main_msg = 'Êåø ôîðóìà îáíîâëåí';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// Group Cache
|
||||
//-----------------------------------------
|
||||
|
||||
case 'group_cache':
|
||||
$this->ipsclass->cache['group_cache'] = array();
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => "*",
|
||||
'from' => 'groups'
|
||||
) );
|
||||
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
while ( $i = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$this->ipsclass->cache['group_cache'][ $i['g_id'] ] = $i;
|
||||
}
|
||||
|
||||
$this->ipsclass->update_cache( array( 'name' => 'group_cache', 'array' => 1, 'deletefirst' => 1 ) );
|
||||
|
||||
$this->ipsclass->main_msg = 'Êåø ãðóïï îáíîâëåí';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// Systemvars
|
||||
//-----------------------------------------
|
||||
|
||||
case 'systemvars':
|
||||
$this->ipsclass->cache['systemvars'] = array();
|
||||
|
||||
$result = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as cnt', 'from' => 'mail_queue' ) );
|
||||
|
||||
$this->ipsclass->cache['systemvars']['mail_queue'] = intval( $result['cnt'] );
|
||||
|
||||
$this->ipsclass->update_cache( array( 'name' => 'systemvars', 'array' => 1, 'deletefirst' => 1 ) );
|
||||
|
||||
require_once( ROOT_PATH.'sources/lib/func_taskmanager.php' );
|
||||
$task = new func_taskmanager();
|
||||
$task->ipsclass =& $this->ipsclass;
|
||||
$task->save_next_run_stamp();
|
||||
|
||||
$this->ipsclass->main_msg = 'Ïåðåìåííûå ñèñòåìû îáíîâëåíû';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// Skin ID cache
|
||||
//-----------------------------------------
|
||||
|
||||
case 'skin_id_cache':
|
||||
require_once( ROOT_PATH.'sources/lib/admin_cache_functions.php' );
|
||||
$admin = new admin_cache_functions();
|
||||
$admin->ipsclass =& $this->ipsclass;
|
||||
$admin->_rebuild_skin_id_cache();
|
||||
|
||||
$this->ipsclass->main_msg = 'Êåø ñòèëÿ îáíîâëåí';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// Moderators
|
||||
//-----------------------------------------
|
||||
|
||||
case 'moderators':
|
||||
|
||||
$this->ipsclass->cache['moderators'] = array();
|
||||
|
||||
require_once( ROOT_PATH.'sources/action_admin/moderator.php' );
|
||||
$this->mod = new ad_moderator();
|
||||
$this->mod->ipsclass =& $this->ipsclass;
|
||||
|
||||
$this->mod->rebuild_moderator_cache();
|
||||
|
||||
$this->ipsclass->main_msg = 'Ìîäåðàòîðû îáíîâëåíû';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// Stats
|
||||
//-----------------------------------------
|
||||
|
||||
case 'stats':
|
||||
|
||||
|
||||
|
||||
|
||||
$this->ipsclass->main_msg = 'Ñòàòèñòèêà îáíîâëåíà';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// Ranks
|
||||
//-----------------------------------------
|
||||
|
||||
case 'ranks':
|
||||
|
||||
$this->ipsclass->cache['ranks'] = array();
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'id, title, pips, posts',
|
||||
'from' => 'titles',
|
||||
'order' => "posts DESC",
|
||||
) );
|
||||
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
while ($i = $this->ipsclass->DB->fetch_row())
|
||||
{
|
||||
$this->ipsclass->cache['ranks'][ $i['id'] ] = array(
|
||||
'TITLE' => $i['title'],
|
||||
'PIPS' => $i['pips'],
|
||||
'POSTS' => $i['posts'],
|
||||
);
|
||||
}
|
||||
|
||||
$this->ipsclass->update_cache( array( 'name' => 'ranks', 'array' => 1, 'deletefirst' => 1 ) );
|
||||
|
||||
$this->ipsclass->main_msg = 'Ñòàòóñû îáíîâëåíû';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// Profile Fields
|
||||
//-----------------------------------------
|
||||
|
||||
case 'profilefields':
|
||||
|
||||
$this->ipsclass->cache['profilefields'] = array();
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'pfields_data', 'order' => 'pf_position' ) );
|
||||
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$this->ipsclass->cache['profilefields'][ $r['pf_id'] ] = $r;
|
||||
}
|
||||
|
||||
$this->ipsclass->update_cache( array( 'name' => 'profilefields', 'array' => 1, 'deletefirst' => 1 ) );
|
||||
|
||||
$this->ipsclass->main_msg = 'Äîï. ïîëÿ â ïðîôèëå îáíîâëåíû';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// Calendar
|
||||
//-----------------------------------------
|
||||
|
||||
case 'calendar':
|
||||
|
||||
require_once( ROOT_PATH.'sources/lib/func_taskmanager.php' );
|
||||
$func = new func_taskmanager();
|
||||
$func->ipsclass =& $this->ipsclass;
|
||||
|
||||
require_once( ROOT_PATH.'sources/tasks/calendarevents.php' );
|
||||
|
||||
$task = new task_item();
|
||||
$task->register_class( $func );
|
||||
$task->restrict_log = 1;
|
||||
$task->run_task();
|
||||
|
||||
$this->ipsclass->main_msg = 'Êàëåíäàðíûå ñîáûòèÿ îáíîâëåíû';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// Birthdays
|
||||
//-----------------------------------------
|
||||
|
||||
case 'birthdays':
|
||||
|
||||
require_once( ROOT_PATH.'sources/lib/func_taskmanager.php' );
|
||||
$func = new func_taskmanager();
|
||||
$func->ipsclass =& $this->ipsclass;
|
||||
|
||||
require_once( ROOT_PATH.'sources/tasks/calendarevents.php' );
|
||||
|
||||
$task = new task_item();
|
||||
$task->register_class( $func );
|
||||
$task->restrict_log = 1;
|
||||
$task->run_task();
|
||||
|
||||
$this->ipsclass->main_msg = 'Äíè ðîæäåíèÿ îáíîâëåíû';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// Multimoderation
|
||||
//-----------------------------------------
|
||||
|
||||
case 'multimod':
|
||||
|
||||
$this->ipsclass->cache['multimod'] = array();
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array(
|
||||
'select' => '*',
|
||||
'from' => 'topic_mmod',
|
||||
'order' => 'mm_title'
|
||||
) );
|
||||
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
while ($i = $this->ipsclass->DB->fetch_row())
|
||||
{
|
||||
$this->ipsclass->cache['multimod'][ $i['mm_id'] ] = $i;
|
||||
}
|
||||
|
||||
$this->ipsclass->update_cache( array( 'name' => 'multimod', 'array' => 1, 'deletefirst' => 1 ) );
|
||||
|
||||
$this->ipsclass->main_msg = 'Ìóëüòè-ìîäåðàöèÿ îáíîâëåíà';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// BBCODE
|
||||
//-----------------------------------------
|
||||
|
||||
case 'bbcode':
|
||||
|
||||
require_once( ROOT_PATH.'sources/action_admin/bbcode.php' );
|
||||
$this->bbcode = new ad_bbcode();
|
||||
$this->bbcode->ipsclass =& $this->ipsclass;
|
||||
|
||||
$this->bbcode->bbcode_rebuildcache();
|
||||
|
||||
$this->ipsclass->main_msg = 'ÁÁ êîäû îáíîâëåíû';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// SETTINGS
|
||||
//-----------------------------------------
|
||||
|
||||
case 'settings':
|
||||
|
||||
$this->ipsclass->cache['settings'] = array();
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'conf_settings', 'where' => 'conf_add_cache=1' ) );
|
||||
$info = $this->ipsclass->DB->simple_exec();
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row($info) )
|
||||
{
|
||||
$value = $r['conf_value'] != "" ? $r['conf_value'] : $r['conf_default'];
|
||||
|
||||
if ( $value == '{blank}' )
|
||||
{
|
||||
$value = '';
|
||||
}
|
||||
|
||||
$this->ipsclass->cache['settings'][ $r['conf_key'] ] = $value;
|
||||
}
|
||||
|
||||
$this->ipsclass->update_cache( array( 'name' => 'settings', 'array' => 1, 'deletefirst' => 1 ) );
|
||||
|
||||
$this->ipsclass->main_msg = 'Íàñòðîéêè îáíîâëåíû';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// EMOTICONS
|
||||
//-----------------------------------------
|
||||
|
||||
case 'emoticons':
|
||||
|
||||
require_once( ROOT_PATH.'sources/action_admin/emoticons.php' );
|
||||
$this->emoticons = new ad_emoticons();
|
||||
$this->emoticons->ipsclass =& $this->ipsclass;
|
||||
|
||||
$this->emoticons->emoticon_rebuildcache();
|
||||
|
||||
$this->ipsclass->main_msg = 'Ñìàéëèêè îáíîâëåíû';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// BADWORDS
|
||||
//-----------------------------------------
|
||||
|
||||
case 'badwords':
|
||||
|
||||
require_once( ROOT_PATH.'sources/action_admin/banandbadword.php' );
|
||||
$this->banandbadword = new ad_banandbadword();
|
||||
$this->banandbadword->ipsclass =& $this->ipsclass;
|
||||
|
||||
$this->banandbadword->badword_rebuildcache();
|
||||
|
||||
$this->ipsclass->main_msg = 'Ôèëüòð íåöåíçóðíûõ ñëîâ îáíîâëåí';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// LANGUAGES
|
||||
//-----------------------------------------
|
||||
|
||||
case 'languages':
|
||||
|
||||
$this->ipsclass->cache['languages'] = array();
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'ldir,lname', 'from' => 'languages' ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$this->ipsclass->cache['languages'][] = $r;
|
||||
}
|
||||
|
||||
$this->ipsclass->update_cache( array( 'name' => 'languages', 'array' => 1, 'deletefirst' => 1 ) );
|
||||
|
||||
$this->ipsclass->main_msg = 'ßçûêè îáíîâëåíû';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// BAN FILTERS
|
||||
//-----------------------------------------
|
||||
|
||||
case 'banfilters':
|
||||
|
||||
require_once( ROOT_PATH.'sources/action_admin/banandbadword.php' );
|
||||
$this->banandbadword = new ad_banandbadword();
|
||||
$this->banandbadword->ipsclass =& $this->ipsclass;
|
||||
|
||||
$this->banandbadword->ban_rebuildcache();
|
||||
|
||||
$this->ipsclass->main_msg = 'Ôèëüòð áàíà îáíîâëåí';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// ATTACHMENT TYPES
|
||||
//-----------------------------------------
|
||||
|
||||
case 'attachtypes':
|
||||
$this->ipsclass->cache['attachtypes'] = array();
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'atype_extension,atype_mimetype,atype_post,atype_photo,atype_img', 'from' => 'attachments_type', 'where' => "atype_photo=1 OR atype_post=1" ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$this->ipsclass->cache['attachtypes'][ $r['atype_extension'] ] = $r;
|
||||
}
|
||||
|
||||
$this->ipsclass->update_cache( array( 'name' => 'attachtypes', 'array' => 1, 'deletefirst' => 1 ) );
|
||||
|
||||
$this->ipsclass->main_msg = 'Òèïû ïðèñîåäèíÿåìûõ ôàéëîâ îáíîâëåíû';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// Announcements
|
||||
//-----------------------------------------
|
||||
|
||||
case 'announcements':
|
||||
|
||||
require_once( ROOT_PATH.'sources/action_public/announcements.php' );
|
||||
$announcements = new announcements();
|
||||
$announcements->ipsclass =& $this->ipsclass;
|
||||
$announcements->announce_recache();
|
||||
|
||||
$this->ipsclass->main_msg = 'Ñîîáùåíèé îáíîâëåíû';
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
// BBCODE
|
||||
//-----------------------------------------
|
||||
|
||||
case 'components':
|
||||
|
||||
require_once( ROOT_PATH.'sources/action_admin/components.php' );
|
||||
$this->components = new ad_components();
|
||||
$this->components->ipsclass =& $this->ipsclass;
|
||||
|
||||
$this->components->components_rebuildcache();
|
||||
|
||||
$this->ipsclass->main_msg = 'Êîìïîíåíòû îáíîâëåíû';
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->ipsclass->main_msg = 'Íå÷åãî îáíîâëÿòü';
|
||||
break;
|
||||
}
|
||||
|
||||
if ( ! $dontcancel )
|
||||
{
|
||||
$this->cache_start();
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// SHOW CACHE FORM
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function cache_start()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$used = array();
|
||||
$content = "";
|
||||
|
||||
//-----------------------------------------
|
||||
// SHOW CACHES
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'cache_store', 'order' => 'cs_key' ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
while ( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
if ( ! in_array( $row['cs_key'], array_keys( $this->map ) ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$used[ $row['cs_key'] ] = $row['cs_key'];
|
||||
$row['_size'] = ceil( intval( strlen( $row['cs_value'] ) ) / 1024 );
|
||||
$row['_desc'] = $this->map[ $row['cs_key'] ];
|
||||
|
||||
$content .= $this->html->cache_row( $row );
|
||||
}
|
||||
|
||||
if ( count( $used ) != count( $this->map ) )
|
||||
{
|
||||
foreach( $this->map as $k => $v )
|
||||
{
|
||||
if ( in_array( $k, array_keys( $used ) ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
$row['cs_key'] = $k;
|
||||
$row['cs_value'] = $v;
|
||||
$row['_size'] = 0;
|
||||
$row['_desc'] = $this->map[ $row['cs_key'] ];
|
||||
|
||||
$content .= $this->html->cache_row( $row );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->ipsclass->html .= $this->html->cache_overview( $content );
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// PERL
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function perly_length_sort($a, $b)
|
||||
{
|
||||
if ( strlen($a['typed']) == strlen($b['typed']) )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return ( strlen($a['typed']) > strlen($b['typed']) ) ? -1 : 1;
|
||||
}
|
||||
|
||||
function perly_word_sort($a, $b)
|
||||
{
|
||||
if ( strlen($a['type']) == strlen($b['type']) )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return ( strlen($a['type']) > strlen($b['type']) ) ? -1 : 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user