2204 lines
77 KiB
PHP
2204 lines
77 KiB
PHP
<?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
|
|
+---------------------------------------------------------------------------
|
|
| > $Date: 2006-01-31 22:47:20 +0000 (Tue, 31 Jan 2006) $
|
|
| > $Revision: 131 $
|
|
| > $Author: bfarber $
|
|
+---------------------------------------------------------------------------
|
|
|
|
|
| > Admin Rebuild Counter Functions
|
|
| > Module written by Matt Mecham
|
|
| > Date started: 9th March 2004
|
|
|
|
|
| > Module Version Number: 1.0.0
|
|
| > DBA Checked: Tue 25th May 2004
|
|
+--------------------------------------------------------------------------
|
|
*/
|
|
|
|
if ( ! defined( 'IN_ACP' ) )
|
|
{
|
|
print "<h1>Íåâåðíûé âõîä</h1> Ó Âàñ íåò äîñòóïà ê äèðåêòèâå ýòîãî ôàéëà. Åñëè Âû ïðîâîäèëè îáíîâëåíèÿ, óáåäèòåñü, ÷òî íå çàáûëè îáíîâèòü 'admin.php'.";
|
|
exit();
|
|
}
|
|
|
|
class ad_rebuild {
|
|
|
|
var $base_url;
|
|
|
|
/**
|
|
* Section title name
|
|
*
|
|
* @var string
|
|
*/
|
|
var $perm_main = "tools";
|
|
|
|
/**
|
|
* Section title name
|
|
*
|
|
* @var string
|
|
*/
|
|
var $perm_child = "rebuild";
|
|
|
|
|
|
function auto_run()
|
|
{
|
|
//-----------------------------------------
|
|
// Kill globals - globals bad, Homer good.
|
|
//-----------------------------------------
|
|
|
|
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
|
|
|
|
foreach ( $tmp_in as $k => $v )
|
|
{
|
|
unset($$k);
|
|
}
|
|
|
|
switch($this->ipsclass->input['code'])
|
|
{
|
|
case 'docount':
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recount' );
|
|
$this->docount();
|
|
break;
|
|
case 'doresyncforums':
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recount' );
|
|
$this->resync_forums();
|
|
break;
|
|
case 'doresynctopics':
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':recount' );
|
|
$this->resync_topics();
|
|
break;
|
|
case 'doposts':
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' );
|
|
$this->rebuild_posts();
|
|
break;
|
|
case 'dopostnames':
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' );
|
|
$this->rebuild_post_names();
|
|
break;
|
|
case 'dopostcounts':
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' );
|
|
$this->rebuild_post_counts();
|
|
break;
|
|
case 'dothumbnails':
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' );
|
|
$this->rebuild_thumbnails();
|
|
break;
|
|
case 'doattachdata':
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' );
|
|
$this->rebuild_attachdata();
|
|
break;
|
|
case 'cleanattachments':
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' );
|
|
$this->clean_attachments();
|
|
break;
|
|
case 'cleanavatars':
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' );
|
|
$this->clean_avatars();
|
|
break;
|
|
case 'cleanphotos':
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' );
|
|
$this->clean_photos();
|
|
break;
|
|
//-----------------------------------------
|
|
// Tools
|
|
//-----------------------------------------
|
|
|
|
case '210polls':
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' );
|
|
$this->tools_210_polls();
|
|
break;
|
|
|
|
case '210calevents':
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' );
|
|
$this->tools_210_calevents();
|
|
break;
|
|
case '210tool_settings':
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' );
|
|
$this->tools_210_dupe_settings();
|
|
break;
|
|
|
|
case 'tool_settings':
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' );
|
|
$this->tools_dupe_settings();
|
|
break;
|
|
|
|
case 'tool_converge':
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' );
|
|
$this->tools_converge();
|
|
break;
|
|
|
|
case 'tool_bansettings':
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rebuild' );
|
|
$this->tool_bansettings();
|
|
break;
|
|
|
|
case 'tools':
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
|
$this->tools_splash();
|
|
break;
|
|
|
|
default:
|
|
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
|
$this->rebuild_start();
|
|
break;
|
|
}
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// 210: TOOLS DUPLICATE SETTINGS
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function tools_210_dupe_settings()
|
|
{
|
|
//-----------------------------------------
|
|
// Remove dupe categories
|
|
//-----------------------------------------
|
|
|
|
$title_id_to_keep = array();
|
|
$title_id_to_delete = array();
|
|
$title_deleted_count = 0;
|
|
$msg = '';
|
|
|
|
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'conf_settings_titles', 'order' => 'conf_title_id DESC' ) );
|
|
$this->ipsclass->DB->simple_exec();
|
|
|
|
while ( $r = $this->ipsclass->DB->fetch_row() )
|
|
{
|
|
if ( $title_id_to_keep[ $r['conf_title_title'] ] )
|
|
{
|
|
$title_id_to_delete[ $r['conf_title_id'] ] = $r['conf_title_id'];
|
|
|
|
$msg .= "Óäàëåíèå: {$r['conf_title_title']} ID:{$r['conf_title_id']}<br />";
|
|
}
|
|
else
|
|
{
|
|
$title_id_to_keep[ $r['conf_title_title'] ] = $r['conf_title_id'];
|
|
$msg .= "Õðàíåíèå: {$r['conf_title_title']} ID:{$r['conf_title_id']}<br />";
|
|
}
|
|
}
|
|
|
|
if ( count( $title_id_to_delete ) )
|
|
{
|
|
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'conf_settings_titles', 'where' => 'conf_title_id IN ('.implode( ',', $title_id_to_delete ).')' ) );
|
|
}
|
|
|
|
$title_deleted_count = intval( count($title_id_to_delete) );
|
|
|
|
//-----------------------------------------
|
|
// Time to move on dude
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->main_msg = "Óäàëåíî: $title_deleted_count äâîéíûõ ñèñòåìíûõ íàñòðîåê<br />$msg";
|
|
$this->tools_splash();
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// CALENDAR EVENTS
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function tools_210_calevents()
|
|
{
|
|
$start = intval($_GET['st']);
|
|
$lend = 50;
|
|
$end = $start + $lend;
|
|
$max = intval($_GET['max']);
|
|
|
|
//-----------------------------------------
|
|
// Do we need to run this tool?
|
|
//-----------------------------------------
|
|
|
|
if ( ! $max )
|
|
{
|
|
$original = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as max', 'from' => 'calendar_events' ) );
|
|
$new = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as max', 'from' => 'cal_events' ) );
|
|
|
|
if ( $new['max'] >= $original['max'] OR ! $original['max'] )
|
|
{
|
|
$this->ipsclass->main_msg = "Êàëåíäàðíûå ñîáûòèÿ óæå êîíâåðòèðîâàíû";
|
|
$this->tools_splash();
|
|
}
|
|
}
|
|
|
|
$max = intval( $original['max'] );
|
|
|
|
//-----------------------------------------
|
|
// In steps...
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
|
|
'from' => 'calendar_events',
|
|
'limit' => array( $start, $lend ) ) );
|
|
$o = $this->ipsclass->DB->simple_exec();
|
|
|
|
//-----------------------------------------
|
|
// Do it...
|
|
//-----------------------------------------
|
|
|
|
if ( $this->ipsclass->DB->get_num_rows($o) )
|
|
{
|
|
//-----------------------------------------
|
|
// Got some to convert!
|
|
//-----------------------------------------
|
|
|
|
while ( $r = $this->ipsclass->DB->fetch_row($o) )
|
|
{
|
|
$recur_remap = array( 'w' => 1,
|
|
'm' => 2,
|
|
'y' => 3 );
|
|
|
|
$begin_date = $this->ipsclass->date_getgmdate( $r['unix_stamp'] );
|
|
$end_date = $this->ipsclass->date_getgmdate( $r['end_unix_stamp'] );
|
|
|
|
if ( ! $begin_date OR ! $end_date )
|
|
{
|
|
continue;
|
|
}
|
|
|
|
$day = $begin_date['mday'];
|
|
$month = $begin_date['mon'];
|
|
$year = $begin_date['year'];
|
|
|
|
$end_day = $end_date['mday'];
|
|
$end_month = $end_date['mon'];
|
|
$end_year = $end_date['year'];
|
|
|
|
$_final_unix_from = gmmktime(0, 0, 0, $month, $day, $year );
|
|
|
|
//-----------------------------------------
|
|
// Recur or ranged...
|
|
//-----------------------------------------
|
|
|
|
if ( $r['event_repeat'] OR $r['event_ranged'] )
|
|
{
|
|
$_final_unix_to = gmmktime(23, 59, 59, $end_month, $end_day, $end_year);
|
|
}
|
|
else
|
|
{
|
|
$_final_unix_to = 0;
|
|
}
|
|
|
|
$new_event = array( 'event_calendar_id' => 1,
|
|
'event_member_id' => $r['userid'],
|
|
'event_content' => $r['event_text'],
|
|
'event_title' => $r['title'],
|
|
'event_smilies' => $r['show_emoticons'],
|
|
'event_perms' => $r['read_perms'],
|
|
'event_private' => $r['priv_event'],
|
|
'event_approved' => 1,
|
|
'event_unixstamp' => $r['unix_stamp'],
|
|
'event_recurring' => ( $r['event_repeat'] && $recur_remap[ $r['repeat_unit'] ] ) ? $recur_remap[ $r['repeat_unit'] ] : 0,
|
|
'event_tz' => 0,
|
|
'event_unix_from' => $_final_unix_from,
|
|
'event_unix_to' => $_final_unix_to );
|
|
|
|
//-----------------------------------------
|
|
// INSERT
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->DB->do_insert( 'cal_events', $new_event );
|
|
}
|
|
|
|
$this->ipsclass->main_msg = "<b>Êàëåíäàðíûå ñîáûòèÿ: $start äî $end çàâåðøåíû....</b>";
|
|
|
|
$url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&max='.$max.'&st='.$end;
|
|
}
|
|
else
|
|
{
|
|
$this->ipsclass->main_msg = "<b>Êàëåíäàðíûå ñîáûòèÿ óæå êîíâåðòèðîâàíû</b>";
|
|
|
|
$url = "{$this->ipsclass->form_code}&code=tools";
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Bye....
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->admin->redirect( $url, $this->ipsclass->main_msg, 0, $time );
|
|
|
|
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// POLLS
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function tools_210_polls()
|
|
{
|
|
$start = intval($_GET['st']);
|
|
$lend = 50;
|
|
$end = $start + $lend;
|
|
$max = intval($_GET['max']);
|
|
$done = 0;
|
|
$converted = intval( $_GET['conv'] );
|
|
|
|
//-----------------------------------------
|
|
// First off.. grab number of polls to convert
|
|
//-----------------------------------------
|
|
|
|
if ( ! $max )
|
|
{
|
|
$total = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as max',
|
|
'from' => 'topics',
|
|
'where' => "poll_state IN ('open', 'close', 'closed')" ) );
|
|
|
|
$max = $total['max'];
|
|
}
|
|
|
|
if ( $max < 1 )
|
|
{
|
|
$done = 1;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// In steps...
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
|
|
'from' => 'topics',
|
|
'where' => "poll_state IN ('open', 'close', 'closed' )",
|
|
'limit' => array( 0, $lend ) ) );
|
|
$o = $this->ipsclass->DB->simple_exec();
|
|
|
|
//-----------------------------------------
|
|
// Do it...
|
|
//-----------------------------------------
|
|
|
|
if ( $this->ipsclass->DB->get_num_rows($o) )
|
|
{
|
|
//-----------------------------------------
|
|
// Got some to convert!
|
|
//-----------------------------------------
|
|
|
|
while ( $r = $this->ipsclass->DB->fetch_row($o) )
|
|
{
|
|
$converted++;
|
|
|
|
$new_poll = array( 1 => array() );
|
|
|
|
$poll_data = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
|
|
'from' => 'polls',
|
|
'where' => "tid=".$r['tid']
|
|
) );
|
|
if ( ! $poll_data['pid'] )
|
|
{
|
|
continue;
|
|
}
|
|
|
|
if ( ! $poll_data['poll_question'] )
|
|
{
|
|
$poll_data['poll_question'] = $r['title'];
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Kick start new poll
|
|
//-----------------------------------------
|
|
|
|
$new_poll[1]['question'] = $poll_data['poll_question'];
|
|
|
|
//-----------------------------------------
|
|
// Get OLD polls
|
|
//-----------------------------------------
|
|
|
|
$poll_answers = unserialize( stripslashes( $poll_data['choices'] ) );
|
|
|
|
reset($poll_answers);
|
|
|
|
foreach ( $poll_answers as $entry )
|
|
{
|
|
$id = $entry[0];
|
|
$choice = $entry[1];
|
|
$votes = $entry[2];
|
|
|
|
$total_votes += $votes;
|
|
|
|
if ( strlen($choice) < 1 )
|
|
{
|
|
continue;
|
|
}
|
|
|
|
$new_poll[ 1 ]['choice'][ $id ] = $choice;
|
|
$new_poll[ 1 ]['votes'][ $id ] = $votes;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Got something?
|
|
//-----------------------------------------
|
|
|
|
if ( count( $new_poll[1]['choice'] ) )
|
|
{
|
|
$this->ipsclass->DB->do_update( 'polls' , array( 'choices' => serialize( $new_poll ) ), 'tid='.$r['tid'] );
|
|
$this->ipsclass->DB->do_update( 'topics', array( 'poll_state' => 1 ), 'tid='.$r['tid'] );
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// All done?
|
|
//-----------------------------------------
|
|
|
|
if ( $converted >= $max )
|
|
{
|
|
$done = 1;
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
$done = 1;
|
|
}
|
|
|
|
|
|
if ( ! $done )
|
|
{
|
|
$this->ipsclass->main_msg = "<b>Îïðîñû: $start äî $end èç $max çàâåðøåíî....</b>";
|
|
|
|
$url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&max='.$max.'&st='.$end.'&conv='.$converted;
|
|
}
|
|
else
|
|
{
|
|
$this->ipsclass->main_msg = "<b>Îïðîñû êîíâåðòèðîâàíû</b>";
|
|
|
|
$url = "{$this->ipsclass->form_code}&code=tools";
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Bye....
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->admin->redirect( $url, $this->ipsclass->main_msg, 0, 1 );
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// TOOLS BAN SETTINGS
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function tool_bansettings()
|
|
{
|
|
//-----------------------------------------
|
|
// Init
|
|
//-----------------------------------------
|
|
|
|
$bomb = array();
|
|
$ban = array();
|
|
$ip_count = 0;
|
|
$email_count = 0;
|
|
$name_count = 0;
|
|
|
|
//-----------------------------------------
|
|
// Get current entries
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'banfilters', 'order' => 'ban_date desc' ) );
|
|
$this->ipsclass->DB->simple_exec();
|
|
|
|
while ( $r = $this->ipsclass->DB->fetch_row() )
|
|
{
|
|
$ban[ $r['ban_type'] ][ $r['ban_content'] ] = $r;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Get $INFO (again) ip email name
|
|
//-----------------------------------------
|
|
|
|
require( ROOT_PATH."conf_global.php" );
|
|
|
|
//-----------------------------------------
|
|
// IP
|
|
//-----------------------------------------
|
|
|
|
if ( $INFO['ban_ip'] )
|
|
{
|
|
$bomb = explode( '|', $INFO['ban_ip'] );
|
|
|
|
if ( is_array( $bomb ) and count( $bomb ) )
|
|
{
|
|
foreach( $bomb as $bang )
|
|
{
|
|
if ( ! is_array($ban['ip'][ $bang ]) )
|
|
{
|
|
$this->ipsclass->DB->do_insert( 'banfilters', array( 'ban_type' => 'ip', 'ban_content' => $bang, 'ban_date' => time() ) );
|
|
|
|
$ip_count++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// EMAIL
|
|
//-----------------------------------------
|
|
|
|
if ( $INFO['ban_email'] )
|
|
{
|
|
$bomb = explode( '|', $INFO['ban_email'] );
|
|
|
|
if ( is_array( $bomb ) and count( $bomb ) )
|
|
{
|
|
foreach( $bomb as $bang )
|
|
{
|
|
if ( ! is_array($ban['email'][ $bang ]) )
|
|
{
|
|
$this->ipsclass->DB->do_insert( 'banfilters', array( 'ban_type' => 'email', 'ban_content' => $bang, 'ban_date' => time() ) );
|
|
|
|
$email_count++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// EMAIL
|
|
//-----------------------------------------
|
|
|
|
if ( $INFO['ban_names'] )
|
|
{
|
|
$bomb = explode( '|', $INFO['ban_names'] );
|
|
|
|
if ( is_array( $bomb ) and count( $bomb ) )
|
|
{
|
|
foreach( $bomb as $bang )
|
|
{
|
|
if ( ! is_array($ban['name'][ $bang ]) )
|
|
{
|
|
$this->ipsclass->DB->do_insert( 'banfilters', array( 'ban_type' => 'name', 'ban_content' => $bang, 'ban_date' => time() ) );
|
|
|
|
$name_count++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
$this->ipsclass->main_msg = "Èìïîðòèðîâàíî: $ip_count IP-àäðåñîâ, $email_count àäðåñîâ email, $name_count çàïðåùåííûõ èìåí.";
|
|
|
|
require_once( ROOT_PATH."sources/action_admin/banandbadword.php");
|
|
$thing = new ad_banandbadword();
|
|
$thing->ipsclass =& $this->ipsclass;
|
|
|
|
$thing->ban_rebuildcache();
|
|
|
|
$this->tools_splash();
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// TOOLS (UN)CONVERGE
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function tools_converge()
|
|
{
|
|
//-----------------------------------------
|
|
// Get all validating members...
|
|
//-----------------------------------------
|
|
|
|
$to_unconverge = array();
|
|
$unconverge_count = 0;
|
|
|
|
$this->ipsclass->DB->simple_construct( array( 'select' => 'id, email, mgroup', 'from' => 'members', 'where' => 'mgroup=1' ) );
|
|
$this->ipsclass->DB->simple_exec();
|
|
|
|
while( $m = $this->ipsclass->DB->fetch_row() )
|
|
{
|
|
if ( preg_match( "#^{$m['id']}\-#", $m['email'] ) )
|
|
{
|
|
$to_unconverge[] = $m['id'];
|
|
}
|
|
}
|
|
|
|
$unconverge_count = intval( count($to_unconverge) );
|
|
|
|
if ( $unconverge_count )
|
|
{
|
|
foreach( $to_unconverge as $mid )
|
|
{
|
|
$this->ipsclass->DB->do_update( 'members' , array( 'mgroup' => $this->ipsclass->vars['member_group'] ), 'id='.$mid );
|
|
$this->ipsclass->DB->do_update( 'member_extra', array( 'bio' => 'dupemail' ), 'id='.$mid );
|
|
}
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Time to move on dude
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->main_msg = "Âñåãî íàéäåíî è âîññòàíîâëåíî $unconverge_count ïîëüçîâàòåëåé.";
|
|
$this->tools_splash();
|
|
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// TOOLS DUPLICATE SETTINGS
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function tools_dupe_settings()
|
|
{
|
|
//-----------------------------------------
|
|
// Remove dupe categories
|
|
//-----------------------------------------
|
|
|
|
$title_id_to_keep = array();
|
|
$title_id_to_delete = array();
|
|
$title_deleted_count = 0;
|
|
|
|
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'conf_settings_titles', 'order' => 'conf_title_id' ) );
|
|
$this->ipsclass->DB->simple_exec();
|
|
|
|
while ( $r = $this->ipsclass->DB->fetch_row() )
|
|
{
|
|
if ( $title_id_to_keep[ $r['conf_title_title'] ] )
|
|
{
|
|
$title_id_to_delete[ $r['conf_title_id'] ] = $r['conf_title_id'];
|
|
}
|
|
else
|
|
{
|
|
$title_id_to_keep[ $r['conf_title_title'] ] = $r['conf_title_id'];
|
|
}
|
|
}
|
|
|
|
if ( count( $title_id_to_delete ) )
|
|
{
|
|
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'conf_settings_titles', 'where' => 'conf_title_id IN ('.implode( ',', $title_id_to_delete ).')' ) );
|
|
}
|
|
|
|
$title_deleted_count = intval( count($title_id_to_delete) );
|
|
|
|
//-----------------------------------------
|
|
// Remove dupe settings
|
|
//-----------------------------------------
|
|
|
|
$setting_id_to_keep = array();
|
|
$setting_id_to_delete = array();
|
|
$setting_id_deleted_count = 0;
|
|
|
|
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'conf_settings', 'order' => 'conf_id' ) );
|
|
$this->ipsclass->DB->simple_exec();
|
|
|
|
while ( $r = $this->ipsclass->DB->fetch_row() )
|
|
{
|
|
if ( $setting_id_to_keep[ $r['conf_title'].','.$r['conf_key'] ] )
|
|
{
|
|
$setting_id_to_delete[ $r['conf_id'] ] = $r['conf_id'];
|
|
}
|
|
else
|
|
{
|
|
$setting_id_to_keep[ $r['conf_title'].','.$r['conf_key'] ] = $r['conf_id'];
|
|
}
|
|
}
|
|
|
|
if ( count( $setting_id_to_delete ) )
|
|
{
|
|
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'conf_settings', 'where' => 'conf_id IN ('.implode( ',', $setting_id_to_delete ).')' ) );
|
|
}
|
|
|
|
$setting_deleted_count = intval( count($setting_id_to_delete) );
|
|
|
|
//-----------------------------------------
|
|
// Time to move on dude
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->main_msg = "Óäàëåíî: $title_deleted_count äâîéíûõ íàçâàíèé, $setting_deleted_count äâîéíûõ ñèñòåìíûõ íàñòðîåê.";
|
|
$this->tools_splash();
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// TOOLS SPLASH
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function tools_splash()
|
|
{
|
|
$this->ipsclass->admin->page_detail = "Â ýòîé ñåêöèè ïðåäñòàâëåíû òàêèå èíñòðóìåíòû, êàê «Óäàëåíèå äâîéíûõ ñèñòåìíûõ íàñòðîåê», «Âîññòàíîâëåíèå ñîåäèíèâøèõñÿ ïîëüçîâàòåëåé», «Âîññòàíîâëåíèå ïðåæíèõ áàí-ôèëüòðîâ».";
|
|
$this->ipsclass->admin->page_title = "Èíñòðóìåíòû ôîðóìà";
|
|
|
|
//-----------------------------------------
|
|
// 210: DUPE SETTINGS
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , '210tool_settings' ),
|
|
2 => array( 'act' , 'rebuild' ),
|
|
4 => array( 'section', $this->ipsclass->section_code ),
|
|
) );
|
|
|
|
$this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Óäàëåíèå äâîéíûõ ñèñòåìíûõ íàñòðîåê èç IPB 2.1.x" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Ïîñëå ìîäåðíèçàöèè ôîðóìà èëè èìïîðòèðîâàíèÿ îò äðóãèõ âåðñèé ôîðóìà, âû ìîæåòå îáíàðóæèòü, ÷òî â ðåçóëüòàòå ýòèõ îáíîâëåíèé èëè èìïîðòèðîâàíèÿ íåêîòîðûå ñèñòåìíûå íàñòðîéêè ïðîäóáëèðîâàëèñü.<br />Ýòîò èíñòðóìåíò íàõîäèò è óäàëÿåò äâîéíûå çàïèñè, ó êîòîðûõ ID áîëüøå, ÷åì îðèãèíàëüíûå."
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Çàïóñòèòü èíñòðóìåíò...');
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
|
|
|
//-----------------------------------------
|
|
// 210: CALEVENTS
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , '210calevents' ),
|
|
2 => array( 'act' , 'rebuild' ),
|
|
4 => array( 'section', $this->ipsclass->section_code ),
|
|
) );
|
|
|
|
$this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Êîíâåðòèðîâàíèå êàëåíäàðíûõ ñîáûòèé èç ôîðìàòà 2.0.x â 2.1.x " );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Ýòîò èíñòðóìåíò ïåðåêîíâåðòèðóåò êàëåíäàðíûå ñîáûòèÿ ôîðìàòà IPB 2.0.x â íîâûé ôîðìàò. Èñïîëüçóéòå ýòîò èíñòðóìåíò ïîñëå îçíàêîìëåíèåì î åãî èñïîëüçîâàíèè èëè êîãäà íåêîòîðûå êàëåíäàðíûå ñîáûòèÿ íå ïðîøëè êîíâåðòèðîâàíèå."
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Çàïóñòèòü èíñòðóìåíò...');
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
|
|
|
//-----------------------------------------
|
|
// 210: POLLS
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , '210polls' ),
|
|
2 => array( 'act' , 'rebuild' ),
|
|
4 => array( 'section', $this->ipsclass->section_code ),
|
|
) );
|
|
|
|
$this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Êîíâåðòèðîâàíèå îïðîñîâ èç ôîðìàòà 2.0.x â 2.1.x " );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Ýòîò èíñòðóìåíò ïåðåêîíâåðòèðóåò îïðîñû ôîðìàòà IPB 2.0.x â íîâûé ôîðìàò. Èñïîëüçóéòå ýòîò èíñòðóìåíò ïîñëå îçíàêîìëåíèåì î åãî èñïîëüçîâàíèè èëè êîãäà íåêîòîðûå îïðîñû íå ïðîøëè êîíâåðòèðîâàíèå."
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Çàïóñòèòü èíñòðóìåíò...');
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
|
|
|
//-----------------------------------------
|
|
// DUPE SETTINGS
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'tool_settings' ),
|
|
2 => array( 'act' , 'rebuild' ),
|
|
4 => array( 'section', $this->ipsclass->section_code ),
|
|
) );
|
|
|
|
$this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Óäàëåíèå ïîâòîðÿþùèõñÿ ñèñòåìíûõ íàñòðîåê èç IPB 2.0.x" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Ïîñëå îáíîâëåíèÿ ñ ïðåäûäóùåé âåðñèè èëè èìïîðòèðîâàíèÿ ñ äðóãèõ ñèñòåì ôîðóìîâ, âû ìîæåòå íàéòè ÷òî äîëæíû çàïóñòèòü îáíîâëåíèå äâàæäû. <br />Ýòà ôóíêöèÿ íàéäåò ïîâòîðåíèÿ, êîòîðûå èìåþò âûñøèé ID ÷åì îðèãèíàëüíûå."
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Çàïóñòèòü èíñòðóìåíò...');
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
|
|
|
//-----------------------------------------
|
|
// STATISTICS (also vali mem)
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'tool_converge' ),
|
|
2 => array( 'act' , 'rebuild' ),
|
|
4 => array( 'section', $this->ipsclass->section_code ),
|
|
) );
|
|
|
|
$this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Âîññòàíîâëåíèå 'ñîåäèíèâøèõñÿ' ïîëüçîâàòåëåé" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Ïîñëå ìîäåðíèçàöèè ôîðóìà èëè èìïîðòèðîâàíèÿ îò äðóãèõ âåðñèé ôîðóìà, âû ìîæåòå îáíàðóæèòü, ÷òî â ðåçóëüòàòå ýòèõ îáíîâëåíèé èëè èìïîðòèðîâàíèÿ ó íåêîòîðûõ ïîëüçîâàòåëåé ïîÿâèëèñü ïîâòîðÿþùèåñÿ àäðåñà email èëè èõ ó÷åòíûå çàïèñè ïåðåìåùåíû â ãðóïïó îæèäàþùèõ ïîäòâåðæäåíèÿ ðåãèñòðàöèè (ñìåíû àäðåñîâ email).<br />Ýòîò èíñòðóìåíò íàõîäèò è ïåðåìåùàåò òàêèõ ïîëüçîâàòåëåé â îñíîâíóþ ãðóïïó, à òàêæå çàïðàøèâàåò ïîëüçîâàòåëåé î ñìåíå àäðåñà email."
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Çàïóñòèòü');
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
|
|
|
//-----------------------------------------
|
|
// Import old bandana settings
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'tool_bansettings' ),
|
|
2 => array( 'act' , 'rebuild' ),
|
|
4 => array( 'section', $this->ipsclass->section_code ),
|
|
) );
|
|
|
|
$this->ipsclass->adskin->td_header[] = array( "{none}" , "100%" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Âîññòàíîâëåíèå ïðåæíèå áàí-ôèëüòðû" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Ïîñëå ìîäåðíèçàöèè ôîðóìà, âû ìîæåòå îáíàðóæèòü, ÷òî âàøè ñòàðûå áàí-ôèëüòðû áîëüøå íå ðàáîòàþò.<br />Â ìîìåíò çàïóñêà ýòîò èíñòðóìåíò äåëàåò ïîïûòêè âîññòàíîâëåíèÿ âàøèõ ñòàðûõ áàí-ôèëüòðîâ. Ñòàðûå çàïèñè íå áóäóò çàìåíåíû íîâûìè, òî åñòü âû íå ïîòåðÿåòå âàøè íîâûå áàí-ôèëüòðû."
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Çàïóñòèòü èíñòðóìåíò...');
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
|
|
|
//-----------------------------------------
|
|
// Print
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->admin->output();
|
|
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// Clean out photos
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function clean_photos()
|
|
{
|
|
require_once( KERNEL_PATH.'class_upload.php' );
|
|
|
|
$upload = new class_upload();
|
|
|
|
//-----------------------------------------
|
|
// Set up
|
|
//-----------------------------------------
|
|
|
|
$done = 0;
|
|
$start = intval( $this->ipsclass->input['st'] );
|
|
$end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100;
|
|
$display = $end + $start;
|
|
$output = array();
|
|
|
|
//-----------------------------------------
|
|
// Pop open the directory and
|
|
// peek inside...
|
|
//-----------------------------------------
|
|
|
|
$i = 0;
|
|
|
|
$dh = opendir( ROOT_PATH.'uploads' );
|
|
|
|
while ( $file = readdir( $dh ) )
|
|
{
|
|
if ( strstr( $file, 'photo-' ) )
|
|
{
|
|
$fullfile = ROOT_PATH.'uploads/'.$file;
|
|
|
|
$i++;
|
|
|
|
//-----------------------------------------
|
|
// Already started?
|
|
//-----------------------------------------
|
|
|
|
if ( $start > $i )
|
|
{
|
|
continue;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Done for this iteration?
|
|
//-----------------------------------------
|
|
|
|
if ( $i > $end )
|
|
{
|
|
break;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Try and get attach row
|
|
//-----------------------------------------
|
|
|
|
$found = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'id', 'from' => 'member_extra', 'where' => "photo_location='$file'" ) );
|
|
|
|
if ( ! $found['id'] )
|
|
{
|
|
@unlink( $fullfile );
|
|
$output[] = "<span style='color:red'>Óäàëåíà ôîòîãðàôèÿ áåç ñâÿçåé: $file</span>";
|
|
}
|
|
else
|
|
{
|
|
$output[] = "<span style='color:gray'>Ôîòîãðàôèÿ â ïîðÿäêå: $file</span>";
|
|
}
|
|
}
|
|
}
|
|
|
|
closedir( $dh );
|
|
|
|
//-----------------------------------------
|
|
// Finish - or more?...
|
|
//-----------------------------------------
|
|
|
|
if ( $i < $display)
|
|
{
|
|
//-----------------------------------------
|
|
// Done..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ïåðåñòðîéêà çàâåðøåíà</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}";
|
|
$time = 2;
|
|
}
|
|
else
|
|
{
|
|
//-----------------------------------------
|
|
// More..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ôàéëîâ ïðîâåðåíî {$display}, ïðîäîëæåíèå...</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$end;
|
|
$time = 0;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Bye....
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->admin->redirect( $url, $text, 0, $time );
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// Clean out avatars
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function clean_avatars()
|
|
{
|
|
require_once( KERNEL_PATH.'class_upload.php' );
|
|
|
|
$upload = new class_upload();
|
|
|
|
//-----------------------------------------
|
|
// Set up
|
|
//-----------------------------------------
|
|
|
|
$done = 0;
|
|
$start = intval( $this->ipsclass->input['st'] );
|
|
$end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100;
|
|
$dis = $end + $start;
|
|
$output = array();
|
|
|
|
//-----------------------------------------
|
|
// Pop open the directory and
|
|
// peek inside...
|
|
//-----------------------------------------
|
|
|
|
$i = 0;
|
|
|
|
$dh = opendir( ROOT_PATH.'uploads' );
|
|
|
|
while ( $file = readdir( $dh ) )
|
|
{
|
|
if ( strstr( $file, 'av-' ) )
|
|
{
|
|
$fullfile = ROOT_PATH.'uploads/'.$file;
|
|
|
|
$i++;
|
|
|
|
//-----------------------------------------
|
|
// Already started?
|
|
//-----------------------------------------
|
|
|
|
if ( $start > $i )
|
|
{
|
|
continue;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Done for this iteration?
|
|
//-----------------------------------------
|
|
|
|
if ( $i > $end )
|
|
{
|
|
break;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Try and get attach row
|
|
//-----------------------------------------
|
|
|
|
$found = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'id', 'from' => 'member_extra', 'where' => "avatar_location='$file' or avatar_location='upload:$file'" ) );
|
|
|
|
if ( ! $found['id'] )
|
|
{
|
|
@unlink( $fullfile );
|
|
$output[] = "<span style='color:red'>Óäàëåíà àâàòàðà áåç ñâÿçåé: $file</span>";
|
|
}
|
|
else
|
|
{
|
|
$output[] = "<span style='color:gray'>Àâàòàðà â ïîðÿäêå: $file</span>";
|
|
}
|
|
}
|
|
}
|
|
|
|
closedir( $dh );
|
|
|
|
//-----------------------------------------
|
|
// Finish - or more?...
|
|
//-----------------------------------------
|
|
|
|
if ( $i < $dis)
|
|
{
|
|
//-----------------------------------------
|
|
// Done..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ïåðåñòðîéêà çàâåðøåíà</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}";
|
|
$time = 2;
|
|
}
|
|
else
|
|
{
|
|
//-----------------------------------------
|
|
// More..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ôàéëîâ ïðîâåðåíî: $dis, ïðîäîëæåíèå...</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$end;
|
|
$time = 0;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Bye....
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->admin->redirect( $url, $text, 0, $time );
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// Clean out attachments
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function clean_attachments()
|
|
{
|
|
require_once( KERNEL_PATH.'class_upload.php' );
|
|
|
|
$upload = new class_upload();
|
|
|
|
//-----------------------------------------
|
|
// Set up
|
|
//-----------------------------------------
|
|
|
|
$done = 0;
|
|
$start = intval( $this->ipsclass->input['st'] );
|
|
$end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100;
|
|
$dis = $end + $start;
|
|
$output = array();
|
|
|
|
//-----------------------------------------
|
|
// Pop open the directory and
|
|
// peek inside...
|
|
//-----------------------------------------
|
|
|
|
$i = 0;
|
|
|
|
$dh = opendir( ROOT_PATH.'uploads' );
|
|
|
|
while ( $file = readdir( $dh ) )
|
|
{
|
|
if ( strstr( $file, 'post-' ) )
|
|
{
|
|
$fullfile = ROOT_PATH.'uploads/'.$file;
|
|
|
|
$i++;
|
|
|
|
//-----------------------------------------
|
|
// Already started?
|
|
//-----------------------------------------
|
|
|
|
if ( $start > $i )
|
|
{
|
|
continue;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Done for this iteration?
|
|
//-----------------------------------------
|
|
|
|
if ( $i > $end )
|
|
{
|
|
break;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Try and get attach row
|
|
//-----------------------------------------
|
|
|
|
$found = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => "attach_location='$file' OR attach_thumb_location='$file'" ) );
|
|
|
|
if ( ! $found['attach_id'] )
|
|
{
|
|
@unlink( $fullfile );
|
|
$output[] = "<span style='color:red'>Óäàëåí ôàéë áåç ñâÿçåé: $file</span>";
|
|
}
|
|
else
|
|
{
|
|
$output[] = "<span style='color:gray'>Ïðèêðåïëåííûé ôàéë â ïîðÿäêå: $file</span>";
|
|
}
|
|
}
|
|
}
|
|
|
|
closedir( $dh );
|
|
|
|
//-----------------------------------------
|
|
// Finish - or more?...
|
|
//-----------------------------------------
|
|
|
|
if ( $i < $dis)
|
|
{
|
|
//-----------------------------------------
|
|
// Done..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ïåðåñòðîéêà çàâåðøåíà</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}";
|
|
$time = 2;
|
|
}
|
|
else
|
|
{
|
|
//-----------------------------------------
|
|
// More..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ôàéëîâ ïðîâåðåíî: $dis, ïðîäîëæåíèå...</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis;
|
|
$time = 0;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Bye....
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->admin->redirect( $url, $text, 0, $time );
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// REBUILD ATTACH DATA
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function rebuild_attachdata()
|
|
{
|
|
require_once( KERNEL_PATH.'class_upload.php' );
|
|
|
|
$upload = new class_upload();
|
|
|
|
//-----------------------------------------
|
|
// Set up
|
|
//-----------------------------------------
|
|
|
|
$done = 0;
|
|
$start = intval( $this->ipsclass->input['st'] );
|
|
$end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100;
|
|
$dis = $end + $start;
|
|
$output = array();
|
|
|
|
//-----------------------------------------
|
|
// Got any more?
|
|
//-----------------------------------------
|
|
|
|
$tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'attach_id', 'from' => 'attachments', 'limit' => array($dis,1) ) );
|
|
$max = intval( $tmp['attach_id'] );
|
|
|
|
//-----------------------------------------
|
|
// Avoid limit...
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'attachments', 'order' => 'attach_id ASC', 'limit' => array($start,$end) ) );
|
|
$outer = $this->ipsclass->DB->simple_exec();
|
|
|
|
//-----------------------------------------
|
|
// Process...
|
|
//-----------------------------------------
|
|
|
|
while( $r = $this->ipsclass->DB->fetch_row( $outer ) )
|
|
{
|
|
//-----------------------------------------
|
|
// Get ext
|
|
//-----------------------------------------
|
|
|
|
$update = array();
|
|
|
|
$update['attach_ext'] = $upload->_get_file_extension( $r['attach_file'] );
|
|
|
|
if ( $r['attach_location'] )
|
|
{
|
|
if ( file_exists( $this->ipsclass->vars['upload_dir'].'/'.$r['attach_location'] ) )
|
|
{
|
|
$update['attach_filesize'] = @filesize( $this->ipsclass->vars['upload_dir'].'/'.$r['attach_location'] );
|
|
}
|
|
}
|
|
|
|
if ( count( $update ) )
|
|
{
|
|
$this->ipsclass->DB->do_update( 'attachments', $update, 'attach_id='.$r['attach_id'] );
|
|
}
|
|
|
|
$done++;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Finish - or more?...
|
|
//-----------------------------------------
|
|
|
|
if ( ! $done and ! $max )
|
|
{
|
|
//-----------------------------------------
|
|
// Done..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ïåðåñòðîéêà çàâåðøåíà</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}";
|
|
$time = 2;
|
|
}
|
|
else
|
|
{
|
|
//-----------------------------------------
|
|
// More..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ôàéëîâ ïðîâåðåíî: $dis, ïðîäîëæåíèå...</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis;
|
|
$time = 0;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Bye....
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->admin->redirect( $url, $text, 0, $time );
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// REBUILD THUMBNAILS
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function rebuild_thumbnails()
|
|
{
|
|
require_once( KERNEL_PATH.'class_image.php' );
|
|
|
|
//-----------------------------------------
|
|
// Set up
|
|
//-----------------------------------------
|
|
|
|
$done = 0;
|
|
$start = intval( $this->ipsclass->input['st'] );
|
|
$end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100;
|
|
$dis = $end + $start;
|
|
$output = array();
|
|
|
|
//-----------------------------------------
|
|
// Got any more?
|
|
//-----------------------------------------
|
|
|
|
$tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'attach_id', 'from' => 'attachments', 'limit' => array($dis,1) ) );
|
|
$max = intval( $tmp['attach_id'] );
|
|
|
|
//-----------------------------------------
|
|
// Avoid limit...
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'attachments', 'order' => 'attach_id ASC', 'limit' => array($start,$end) ) );
|
|
$outer = $this->ipsclass->DB->simple_exec();
|
|
|
|
//-----------------------------------------
|
|
// Process...
|
|
//-----------------------------------------
|
|
|
|
while( $r = $this->ipsclass->DB->fetch_row( $outer ) )
|
|
{
|
|
if ( $r['attach_is_image'] )
|
|
{
|
|
if ( $r['attach_thumb_location'] and ( $r['attach_thumb_location'] != $r['attach_location'] ) )
|
|
{
|
|
if ( file_exists( $this->ipsclass->vars['upload_dir'].'/'.$r['attach_thumb_location'] ) )
|
|
{
|
|
if ( ! @unlink( $this->ipsclass->vars['upload_dir'].'/'.$r['attach_thumb_location'] ) )
|
|
{
|
|
$output[] = "Íåâîçìîæíî óäàëèòü: ".$r['attach_thumb_location'];
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
|
|
$attach_data = array();
|
|
$thumb_data = array();
|
|
|
|
$image = new class_image();
|
|
|
|
$image->in_type = 'file';
|
|
$image->out_type = 'file';
|
|
$image->in_file_dir = $this->ipsclass->vars['upload_dir'];
|
|
$image->in_file_name = $r['attach_location'];
|
|
$image->desired_width = $this->ipsclass->vars['siu_width'];
|
|
$image->desired_height = $this->ipsclass->vars['siu_height'];
|
|
$image->gd_version = $this->ipsclass->vars['gd_version'];
|
|
|
|
$thumb_data = $image->generate_thumbnail();
|
|
|
|
$attach_data['attach_thumb_width'] = $thumb_data['thumb_width'];
|
|
$attach_data['attach_thumb_height'] = $thumb_data['thumb_height'];
|
|
$attach_data['attach_thumb_location'] = $thumb_data['thumb_location'];
|
|
|
|
if ( count( $attach_data ) )
|
|
{
|
|
$this->ipsclass->DB->do_update( 'attachments', $attach_data, 'attach_id='.$r['attach_id'] );
|
|
|
|
$output[] = "Ðàçìåð èçìåíåí: ".$r['attach_location'];
|
|
}
|
|
|
|
unset($image);
|
|
}
|
|
|
|
$done++;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Finish - or more?...
|
|
//-----------------------------------------
|
|
|
|
if ( ! $done and ! $max )
|
|
{
|
|
//-----------------------------------------
|
|
// Done..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ïåðåñòðîéêà çàâåðøåíà</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}";
|
|
$time = 2;
|
|
}
|
|
else
|
|
{
|
|
//-----------------------------------------
|
|
// More..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ôàéëîâ ïðîâåðåíî: $dis, ïðîäîëæåíèå...</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis;
|
|
$time = 0;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Bye....
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->admin->redirect( $url, $text, 0, $time );
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// REBUILD POST COUNTS
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function rebuild_post_counts()
|
|
{
|
|
//-----------------------------------------
|
|
// Forums not to count?
|
|
//-----------------------------------------
|
|
|
|
$forums = array();
|
|
|
|
foreach( $this->ipsclass->cache['forum_cache'] as $id => $data )
|
|
{
|
|
if ( ! $data['inc_postcount'] )
|
|
{
|
|
$forums[] = $data['id'];
|
|
}
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Set up
|
|
//-----------------------------------------
|
|
|
|
$done = 0;
|
|
$start = intval( $this->ipsclass->input['st'] );
|
|
$end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100;
|
|
$dis = $end + $start;
|
|
$output = array();
|
|
|
|
//-----------------------------------------
|
|
// Got any more?
|
|
//-----------------------------------------
|
|
|
|
$tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'id', 'from' => 'members', 'limit' => array($dis,1) ) );
|
|
$max = intval( $tmp['id'] );
|
|
|
|
//-----------------------------------------
|
|
// Avoid limit...
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->DB->simple_construct( array( 'select' => 'id, name', 'from' => 'members', 'order' => 'id ASC', 'limit' => array($start,$end) ) );
|
|
$outer = $this->ipsclass->DB->simple_exec();
|
|
|
|
//-----------------------------------------
|
|
// Process...
|
|
//-----------------------------------------
|
|
|
|
while( $r = $this->ipsclass->DB->fetch_row( $outer ) )
|
|
{
|
|
if ( ! count( $forums ) )
|
|
{
|
|
$count = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as count', 'from' => 'posts', 'where' => 'queued != 1 AND author_id='.$r['id'] ) );
|
|
}
|
|
else
|
|
{
|
|
$this->ipsclass->DB->query( "SELECT count(p.pid) as count
|
|
FROM ".SQL_PREFIX."posts p, ".SQL_PREFIX."topics t
|
|
WHERE p.queued != 1 AND p.author_id={$r['id']}
|
|
AND t.tid=p.topic_id AND t.forum_id NOT IN (".implode(",",$forums).")" );
|
|
|
|
$count = $this->ipsclass->DB->fetch_row();
|
|
}
|
|
|
|
$new_post_count = intval( $count['count'] );
|
|
|
|
$this->ipsclass->DB->do_update( 'members', array( 'posts' => $new_post_count ), 'id='.$r['id'] );
|
|
|
|
$done++;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Finish - or more?...
|
|
//-----------------------------------------
|
|
|
|
if ( ! $done and ! $max )
|
|
{
|
|
//-----------------------------------------
|
|
// Done..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ïåðåñòðîéêà çàâåðøåíà</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}";
|
|
$time = 2;
|
|
}
|
|
else
|
|
{
|
|
//-----------------------------------------
|
|
// More..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ôàéëîâ ïðîâåðåíî: $dis, ïðîäîëæåíèå...</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis;
|
|
$time = 0;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Bye....
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->admin->redirect( $url, $text, 0, $time );
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// REBUILD POSTS
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function rebuild_post_names()
|
|
{
|
|
//-----------------------------------------
|
|
// Set up
|
|
//-----------------------------------------
|
|
|
|
$done = 0;
|
|
$start = intval( $this->ipsclass->input['st'] );
|
|
$end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100;
|
|
$dis = $end + $start;
|
|
$output = array();
|
|
|
|
//-----------------------------------------
|
|
// Got any more?
|
|
//-----------------------------------------
|
|
|
|
$tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'id', 'from' => 'members', 'limit' => array($dis,1) ) );
|
|
$max = intval( $tmp['id'] );
|
|
|
|
//-----------------------------------------
|
|
// Avoid limit...
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->DB->simple_construct( array( 'select' => 'id, members_display_name', 'from' => 'members', 'order' => 'id ASC', 'limit' => array($start,$end) ) );
|
|
$outer = $this->ipsclass->DB->simple_exec();
|
|
|
|
//-----------------------------------------
|
|
// Process...
|
|
//-----------------------------------------
|
|
|
|
while( $r = $this->ipsclass->DB->fetch_row( $outer ) )
|
|
{
|
|
$this->ipsclass->DB->do_update( 'contacts' , array( 'contact_name' => $r['members_display_name'] ), "contact_id=" .$r['id'] );
|
|
$this->ipsclass->DB->do_update( 'topics' , array( 'starter_name' => $r['members_display_name'] ), "starter_id=" .$r['id'] );
|
|
|
|
$done++;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Finish - or more?...
|
|
//-----------------------------------------
|
|
|
|
if ( ! $done and ! $max )
|
|
{
|
|
//-----------------------------------------
|
|
// Done..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ïåðåñòðîéêà çàâåðøåíà</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}";
|
|
$time = 2;
|
|
}
|
|
else
|
|
{
|
|
//-----------------------------------------
|
|
// More..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ôàéëîâ ïðîâåðåíî: $dis, ïðîäîëæåíèå...</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis;
|
|
$time = 0;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Bye....
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->admin->redirect( $url, $text, 0, $time );
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// REBUILD POSTS
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function rebuild_posts()
|
|
{
|
|
require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" );
|
|
$parser = new parse_bbcode();
|
|
$parser->ipsclass =& $this->ipsclass;
|
|
$parser->allow_update_caches = 1;
|
|
|
|
//-----------------------------------------
|
|
// Set up
|
|
//-----------------------------------------
|
|
|
|
$done = 0;
|
|
$start = intval( $this->ipsclass->input['st'] );
|
|
$end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100;
|
|
$dis = $end + $start;
|
|
$output = array();
|
|
|
|
//-----------------------------------------
|
|
// Got any more?
|
|
//-----------------------------------------
|
|
|
|
$tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'pid', 'from' => 'posts', 'limit' => array($dis,1) ) );
|
|
$max = intval( $tmp['pid'] );
|
|
|
|
//-----------------------------------------
|
|
// Avoid limit...
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->DB->simple_construct( array( 'select' => 'p.*, t.forum_id', 'from' => 'posts p, ibf_topics t', 'where' => "p.topic_id=t.tid", 'order' => 'pid ASC', 'limit' => array($start,$end) ) );
|
|
$outer = $this->ipsclass->DB->simple_exec();
|
|
|
|
//-----------------------------------------
|
|
// Process...
|
|
//-----------------------------------------
|
|
|
|
while( $r = $this->ipsclass->DB->fetch_row( $outer ) )
|
|
{
|
|
$parser->quote_open = 0;
|
|
$parser->quote_closed = 0;
|
|
$parser->quote_error = 0;
|
|
$parser->error = '';
|
|
$parser->image_count = 0;
|
|
|
|
$parser->parse_smilies = $r['use_emo'];
|
|
$parser->parse_html = 0;
|
|
$parser->parse_bbcode = $this->ipsclass->cache['forum_cache'][ $r['forum_id'] ]['use_ibc'];
|
|
|
|
$rawpost = $parser->pre_edit_parse( $r['post'] );
|
|
|
|
$newpost = $parser->pre_db_parse( $rawpost );
|
|
|
|
//-----------------------------------------
|
|
// Remove old \' escaping
|
|
//-----------------------------------------
|
|
|
|
$newpost = str_replace( "\\'", "'", $newpost );
|
|
|
|
//-----------------------------------------
|
|
// Convert old dohtml?
|
|
//-----------------------------------------
|
|
|
|
$htmlstate = 0;
|
|
|
|
if ( strstr( strtolower($newpost), '[dohtml]' ) )
|
|
{
|
|
//-----------------------------------------
|
|
// Can we use HTML?
|
|
//-----------------------------------------
|
|
|
|
if ( $this->ipsclass->cache['forum_cache'][ $r['forum_id'] ]['use_html'] )
|
|
{
|
|
$htmlstate = 2;
|
|
}
|
|
|
|
$newpost = preg_replace( "#\[dohtml\]#i" , "", $newpost );
|
|
$newpost = preg_replace( "#\[/dohtml\]#i", "", $newpost );
|
|
}
|
|
else
|
|
{
|
|
$htmlstate = intval( $r['post_htmlstate'] );
|
|
}
|
|
|
|
if ( $newpost )
|
|
{
|
|
$this->ipsclass->DB->do_update( 'posts', array( 'post' => $newpost, 'post_htmlstate' => $htmlstate ), 'pid='.$r['pid'] );
|
|
}
|
|
|
|
$done++;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Finish - or more?...
|
|
//-----------------------------------------
|
|
|
|
if ( ! $done and ! $max )
|
|
{
|
|
//-----------------------------------------
|
|
// Done..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ïåðåñòðîéêà çàâåðøåíà</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}";
|
|
$time = 2;
|
|
}
|
|
else
|
|
{
|
|
//-----------------------------------------
|
|
// More..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ôàéëîâ ïðîâåðåíî: $dis, ïðîäîëæåíèå...</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis;
|
|
$time = 0;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Bye....
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->admin->redirect( $url, $text, 0, $time );
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// RESYNCHRONIZE TOPICS
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function resync_topics()
|
|
{
|
|
require_once( ROOT_PATH.'sources/lib/func_mod.php' );
|
|
$modfunc = new func_mod();
|
|
$modfunc->ipsclass =& $this->ipsclass;
|
|
|
|
//-----------------------------------------
|
|
// Set up
|
|
//-----------------------------------------
|
|
|
|
$done = 0;
|
|
$start = intval( $this->ipsclass->input['st'] );
|
|
$end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100;
|
|
$dis = $end + $start;
|
|
$output = array();
|
|
|
|
//-----------------------------------------
|
|
// Got any more?
|
|
//-----------------------------------------
|
|
|
|
$tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as count', 'from' => 'topics', 'limit' => array($dis,1) ) );
|
|
$max = intval( $tmp['count'] );
|
|
|
|
//-----------------------------------------
|
|
// Avoid limit...
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'topics', 'order' => 'tid ASC', 'limit' => array($start,$end) ) );
|
|
$outer = $this->ipsclass->DB->simple_exec();
|
|
|
|
//-----------------------------------------
|
|
// Process...
|
|
//-----------------------------------------
|
|
|
|
while( $r = $this->ipsclass->DB->fetch_row( $outer ) )
|
|
{
|
|
$modfunc->rebuild_topic($r['tid'], 0);
|
|
|
|
if ( $this->ipsclass->input['pergo'] <= 200 )
|
|
{
|
|
$output[] = "Ïðîâåðÿåìàÿ òåìà ".$r['title'];
|
|
}
|
|
|
|
$done++;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Finish - or more?...
|
|
//-----------------------------------------
|
|
|
|
if ( ! $done and ! $max )
|
|
{
|
|
//-----------------------------------------
|
|
// Done..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ïåðåñòðîéêà çàâåðøåíà</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}";
|
|
$time = 2;
|
|
}
|
|
else
|
|
{
|
|
//-----------------------------------------
|
|
// More..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Òåì ïðîâåðåíî: $dis, ïðîäîëæåíèå...</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis;
|
|
$time = 0;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Bye....
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->admin->redirect( $url, $text, 0, $time );
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// RESYNCHRONIZE FORUMS
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function resync_forums()
|
|
{
|
|
require_once( ROOT_PATH.'sources/lib/func_mod.php' );
|
|
$modfunc = new func_mod();
|
|
$modfunc->ipsclass =& $this->ipsclass;
|
|
|
|
//-----------------------------------------
|
|
// Set up
|
|
//-----------------------------------------
|
|
|
|
$done = 0;
|
|
$start = intval( $this->ipsclass->input['st'] );
|
|
$end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100;
|
|
$dis = $end + $start;
|
|
$output = array();
|
|
|
|
//-----------------------------------------
|
|
// Got any more?
|
|
//-----------------------------------------
|
|
|
|
$tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as count', 'from' => 'forums', 'limit' => array($dis,1) ) );
|
|
$max = intval( $tmp['count'] );
|
|
|
|
//-----------------------------------------
|
|
// Avoid limit...
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forums', 'order' => 'id ASC', 'limit' => array($start,$end) ) );
|
|
$outer = $this->ipsclass->DB->simple_exec();
|
|
|
|
//-----------------------------------------
|
|
// Process...
|
|
//-----------------------------------------
|
|
|
|
while( $r = $this->ipsclass->DB->fetch_row( $outer ) )
|
|
{
|
|
$modfunc->forum_recount( $r['id'] );
|
|
$output[] = "Ïðîâåðÿåìûé ôîðóì ".$r['name'];
|
|
$done++;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Finish - or more?...
|
|
//-----------------------------------------
|
|
|
|
if ( ! $done and ! $max )
|
|
{
|
|
//-----------------------------------------
|
|
// Done..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ïåðåñòðîéêà çàâåðøåíà</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}";
|
|
$time = 2;
|
|
}
|
|
else
|
|
{
|
|
//-----------------------------------------
|
|
// More..
|
|
//-----------------------------------------
|
|
|
|
$text = "<b>Ôîðóìîâ ïðîâåðåíî: $dis, ïðîäîëæåíèå...</b><br />".implode( "<br />", $output );
|
|
$url = "{$this->ipsclass->form_code}&code=".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis;
|
|
$time = 0;
|
|
}
|
|
|
|
//-----------------------------------------
|
|
// Bye....
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->admin->redirect( $url, $text, 0, $time );
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// DO COUNT - Count the stats
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function docount()
|
|
{
|
|
if ( (! $this->ipsclass->input['posts']) and (! $this->ipsclass->input['online']) and (! $this->ipsclass->input['members'] ) and (! $this->ipsclass->input['lastreg'] ) )
|
|
{
|
|
$this->ipsclass->admin->error("Íå÷åãî ïåðåñ÷èòûâàòü, âû äîëæíû âûáðàòü õîòü ÷òî-òî!");
|
|
}
|
|
|
|
$stats = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='stats'" ) );
|
|
|
|
$stats = unserialize($this->ipsclass->txt_stripslashes($stats['cs_value']));
|
|
|
|
if ($this->ipsclass->input['posts'])
|
|
{
|
|
$topics = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'COUNT(*) as tcount',
|
|
'from' => 'topics',
|
|
'where' => 'approved=1' ) );
|
|
|
|
$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'];
|
|
}
|
|
|
|
if ($this->ipsclass->input['members'])
|
|
{
|
|
$this->ipsclass->DB->simple_construct( array( 'select' => 'count(id) as members', 'from' => 'members', 'where' => "mgroup <> '".$this->ipsclass->vars['auth_group']."'" ) );
|
|
$this->ipsclass->DB->simple_exec();
|
|
|
|
$r = $this->ipsclass->DB->fetch_row();
|
|
$stats['mem_count'] = intval($r['members']);
|
|
}
|
|
|
|
if ($this->ipsclass->input['lastreg'])
|
|
{
|
|
$this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, members_display_name',
|
|
'from' => 'members',
|
|
'where' => "mgroup <> '".$this->ipsclass->vars['auth_group']."'",
|
|
'order' => "id DESC",
|
|
'limit' => array(0,1) ) );
|
|
$this->ipsclass->DB->simple_exec();
|
|
|
|
$r = $this->ipsclass->DB->fetch_row();
|
|
$stats['last_mem_name'] = $r['members_display_name'] ? $r['members_display_name'] : $r['name'];
|
|
$stats['last_mem_id'] = $r['id'];
|
|
}
|
|
|
|
if ($this->ipsclass->input['online'])
|
|
{
|
|
$stats['most_date'] = time();
|
|
$stats['most_count'] = 1;
|
|
}
|
|
|
|
if ( count($stats) > 0 )
|
|
{
|
|
$this->ipsclass->cache['stats'] =& $stats;
|
|
$this->ipsclass->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 1 ) );
|
|
}
|
|
else
|
|
{
|
|
$this->ipsclass->admin->error("Íå÷åãî ïåðåñ÷èòûâàòü!");
|
|
}
|
|
|
|
$this->ipsclass->main_msg = 'Ñòàòèñòèêà ïåðåñ÷èòàíà';
|
|
|
|
$this->ipsclass->admin->done_screen("Ñòàòèñòèêà ïåðåñ÷èòàíà", "Ïåðåñ÷åò è ïåðåñòðîéêà", "{$this->ipsclass->form_code}", 'redirect' );
|
|
|
|
}
|
|
|
|
/*-------------------------------------------------------------------------*/
|
|
// MAIN PAGE
|
|
/*-------------------------------------------------------------------------*/
|
|
|
|
function rebuild_start()
|
|
{
|
|
$this->ipsclass->admin->page_detail = "Ýòà ñåêöèÿ ïîçâîëÿåò âàì ñèíõðîíèçèðîâàòü äàííûå âàøåãî ôîðóìà.";
|
|
$this->ipsclass->admin->page_title = "Ïåðåñ÷åò è ïåðåñòðîéêà";
|
|
|
|
//-----------------------------------------
|
|
// STATISTICS
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'docount' ),
|
|
2 => array( 'act' , 'rebuild' ),
|
|
4 => array( 'section', $this->ipsclass->section_code ),
|
|
) );
|
|
|
|
$this->ipsclass->adskin->td_header[] = array( "Ñòàòèñòèêà" , "70%" );
|
|
$this->ipsclass->adskin->td_header[] = array( "Îïöèÿ" , "30%" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïåðåñ÷åò ñòàòèñòèêè" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Ïåðåñ÷èòàòü âñå òåìû è ñîîáùåíèÿ?",
|
|
$this->ipsclass->adskin->form_dropdown( 'posts', array( 0 => array( 1, 'Äà' ), 1 => array( 0, 'Íåò' ) ) )
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Ïåðåñ÷èòàòü ïîëüçîâàòåëåé?",
|
|
$this->ipsclass->adskin->form_dropdown( 'members', array( 0 => array( 1, 'Äà' ), 1 => array( 0, 'Íåò' ) ) )
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Íàéòè ïîñëåäíåãî çàðåãèñòðèðîâàííîãî ïîëüçîâàòåëÿ?",
|
|
$this->ipsclass->adskin->form_dropdown( 'lastreg', array( 0 => array( 1, 'Äà' ), 1 => array( 0, 'Íåò' ) ) )
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Ñáðîñèòü 'Ðåêîðä ïîñåùàåìîñòè ôîðóìà'?",
|
|
$this->ipsclass->adskin->form_dropdown( 'online', array( 0 => array( 0, 'Íåò' ), 1 => array( 1, 'Äà' ) ) )
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Îáíîâèòü ñòàòèñòèêó');
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
|
|
|
//-----------------------------------------
|
|
// Resynchronise Forums
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doresyncforums' ),
|
|
2 => array( 'act' , 'rebuild' ),
|
|
4 => array( 'section', $this->ipsclass->section_code ),
|
|
) );
|
|
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ðåñèíõðîíèçàöèÿ ôîðóìîâ" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ðåñèíõðîíèçàöèÿ ôîðóìîâ</b><div style='color:gray'>Äàííàÿ îïöèÿ ïîçâîëÿåò ïåðåñ÷èòàòü òåìû, ñîîáùåíèÿ è íàéòè ïîñëåäíåãî àâòîðà.<br />Äåéñòâóåò äëÿ âñåõ âàøèõ ôîðóìîâ.</div>",
|
|
"ïî ". $this->ipsclass->adskin->form_simple_input( 'pergo', '50', 5 ). " çà ðàç"
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Ðåñèíõðîíèçèðîâàòü ôîðóìû');
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
|
|
|
//-----------------------------------------
|
|
// Resynchronise Forums
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doresynctopics' ),
|
|
2 => array( 'act' , 'rebuild' ),
|
|
4 => array( 'section', $this->ipsclass->section_code ),
|
|
) );
|
|
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ðåñèíõðîíèçàöèÿ òåì" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ðåñèíõðîíèçàöèÿ òåì</b><div style='color:gray'>Ýòà îïöèÿ ïîçâîëÿåò ïåðåñ÷èòûâàòü îòâåòû, êîëè÷åñòâî ïðèêðåïëåííûõ ôàéëîâ, àâòîðîâ òåì è àâòîðîâ îòâåòîâ.</div>",
|
|
"ïî ". $this->ipsclass->adskin->form_simple_input( 'pergo', '500', 5 ). " çà ðàç"
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Ðåñèíõðîíèçèðîâàòü òåìû');
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
|
|
|
//-----------------------------------------
|
|
// Resynchronise Posts
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doposts' ),
|
|
2 => array( 'act' , 'rebuild' ),
|
|
4 => array( 'section', $this->ipsclass->section_code ),
|
|
) );
|
|
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïåðåñòðîéêà ñîäåðæèìîãî ñîîáùåíèé" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ïåðåñòðîéêà ñîäåðæèìîãî ñîîáùåíèé</b><div style='color:gray'>Ýòà îïöèÿ ïîçâîëÿåò ïåðåñòðîèòü ñîäåðæèìîå âñåõ ñîîáùåíèé, âêëþ÷àÿ BB-òýãè è ñìàéëèêè.<br />Ïîëåçíî â òåõ ñëó÷àÿõ, êîãäà âû èçìåíèëè ìíîæåñòâî ñìàéëèêîâ èëè èçìåíèëè ê íèì ïóòü.</div>",
|
|
"ïî ". $this->ipsclass->adskin->form_simple_input( 'pergo', '500', 5 ). " çà ðàç"
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Ïåðåñòðîèòü ñîäåðæèìîå ñîîáùåíèé');
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
|
|
|
//-----------------------------------------
|
|
// Resynchronise User Names
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dopostnames' ),
|
|
2 => array( 'act' , 'rebuild' ),
|
|
4 => array( 'section', $this->ipsclass->section_code ),
|
|
) );
|
|
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïåðåñòðîéêà èìåí ïîëüçîâàòåëåé" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ïåðåñòðîéêà èìåí ïîëüçîâàòåëåé</b><div style='color:gray'>Ýòà îïöèÿ ïîçâîëÿåò ñáðîñèòü ñîõðàíåííûå èìåíà ïîëüçîâàòåëåé â òåìàõ, ñîîáùåíèÿõ, ëîãàõ è ò.ï.<br />Ïîëåçíî â òåõ ñëó÷àÿõ, êîãäà âû ÷àñòî êîíâåðòèðóåòå èëè ìåíÿåòå â ðó÷íóþ èìåíà ïîëüçîâàòåëåé.</div>",
|
|
"ïî ". $this->ipsclass->adskin->form_simple_input( 'pergo', '500', 5 ). " çà ðàç"
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Ïåðåñòðîèòü èìåíà ïîëüçîâàòåëåé');
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
|
|
|
//-----------------------------------------
|
|
// Resynchronise User Post Counts
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dopostcounts' ),
|
|
2 => array( 'act' , 'rebuild' ),
|
|
4 => array( 'section', $this->ipsclass->section_code ),
|
|
) );
|
|
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïåðåñ÷åò ñîîáùåíèé ïîëüçîâàòåëåé" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ïåðåñ÷åò ñîîáùåíèé ïîëüçîâàòåëåé</b><div style='color:gray'>Ýòà îïöèÿ ïîçâîëÿåò ïåðåñ÷èòàòü âñå ñîîáùåíèÿ ïîëüçîâàòåëåé ïî ÒÅÊÓÙÈÌ ñîîáùåíèÿì áàçû äàííûõ ôîðóìà.<br />Îáû÷íî ïîñëå ïåðåñ÷åòà ñ÷åò÷èêè ñîîáùåíèé ïîëüçîâàòåëåé ÓÌÅÍÜØÀÞÒÑß, òàê êàê ïðè ïåðåñ÷åòå íå ó÷èòûâàþòñÿ óäàëåííûå ñîîáùåíèÿ.<br />Ýòî äåéñòâèå ñëåäóåò âûïîëíèòü â òîì ñëó÷àå, åñëè âû õîòèòå óçíàòü íàñòîÿùåå êîëè÷åñòâî ñîîáùåíèé âàøèõ ïîëüçîâàòåëåé.</div>Âíèìàíèå: ÝÒÎ ÄÅÉÑÒÂÈÅ ÍÅËÜÇß ÎÒÌÅÍÈÒÜ!",
|
|
"ïî ". $this->ipsclass->adskin->form_simple_input( 'pergo', '500', 5 ). " çà ðàç"
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Ïåðåñ÷åò ñîîáùåíèé ïîëüçîâàòåëåé');
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
|
|
|
|
|
//-----------------------------------------
|
|
// Rebuild thumbnails
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'dothumbnails' ),
|
|
2 => array( 'act' , 'rebuild' ),
|
|
4 => array( 'section', $this->ipsclass->section_code ),
|
|
) );
|
|
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïåðåñòðîéêà óìåíüøåííûõ èçîáðàæåíèé" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ïåðåñòðîéêà óìåíüøåííûõ èçîáðàæåíèé</b><div style='color:gray'>Ýòà îïöèÿ ïîçâîëÿåò ïåðåñòðîèòü óìåíüøåííûå èçîáðàæåíèÿ ïðèêðåïëåííûõ ôàéëîâ.<br />Ïîëåçíî â òåõ ñëó÷àÿõ, êîãäà âû èçìåíèëè ðàçìåðû óìåíüøåííûõ èçîáðàæåíèé è õîòèòå îáíîâèòü âñå ïðèêðåïëåííûå èçîáðàæåíèÿ.</div>Âíèìàíèå: ýòà îïöèÿ òðåáóåò äîñòàòî÷íî ìíîãî ðåñóðñîâ.",
|
|
"ïî ". $this->ipsclass->adskin->form_simple_input( 'pergo', '20', 5 ). " çà ðàç"
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Ïåðåñòðîèòü óìåíüøåííûå èçîáðàæåíèÿ');
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
|
|
|
//-----------------------------------------
|
|
// Rebuild attachment data
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'doattachdata' ),
|
|
2 => array( 'act' , 'rebuild' ),
|
|
4 => array( 'section', $this->ipsclass->section_code ),
|
|
) );
|
|
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïåðåñòðîéêà èíôîðìàöèè î ïðèêðåïëåííûõ ôàéëàõ" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ïåðåñòðîéêà èíôîðìàöèè î ïðèêðåïëåííûõ ôàéëàõ</b><div style='color:gray'>Ýòà îïöèÿ ïîçâîëÿåò ïåðåñòðîèòü âñþ èíôîðìàöèþ î ïðèêðåïëåííûõ ôàéëàõ, òàêóþ êàê: ðàçìåð ôàéëà, ìåñòîïîëîæåíèå è ðàçðåøåíèå ôàéëà.</div>Âíèìàíèå: ýòà îïöèÿ òðåáóåò äîñòàòî÷íî ìíîãî ðåñóðñîâ.",
|
|
"ïî ".
|
|
$this->ipsclass->adskin->form_simple_input( 'pergo', '50', 5 ). " çà ðàç"
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Ïåðåñòðîèòü èíôîðìàöèþ î ïðèêðåïëåííûõ ôàéëàõ');
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
|
|
|
//-----------------------------------------
|
|
// Clean up attachments
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'cleanattachments' ),
|
|
2 => array( 'act' , 'rebuild' ),
|
|
4 => array( 'section', $this->ipsclass->section_code ),
|
|
) );
|
|
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Óäàëåíèå ïðèêðåïëåííûõ ôàéëîâ áåç ñâÿçåé" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Óäàëåíèå ïðèêðåïëåííûõ ôàéëîâ áåç ñâÿçåé</b><div style='color:gray'>Ýòà îïöèÿ ïîçâîëÿåò ïðîâåðèòü è óäàëèòü âñå ôàéëû 'post-', êîòîðûå óæå íå ÿâëÿþòñÿ ïðèêðåïëåííûìè.</div>Âíèìàíèå: ýòà îïöèÿ òðåáóåò äîñòàòî÷íî ìíîãî ðåñóðñîâ.",
|
|
"ïî ".
|
|
$this->ipsclass->adskin->form_simple_input( 'pergo', '50', 5 ). " çà ðàç"
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Óäàëèòü ïðèêðåïëåííûå ôàéëû áåç ñâÿçåé');
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
|
|
|
//-----------------------------------------
|
|
// Clean up uploaded avatars
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'cleanavatars' ),
|
|
2 => array( 'act' , 'rebuild' ),
|
|
4 => array( 'section', $this->ipsclass->section_code ),
|
|
) );
|
|
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Óäàëåíèå àâàòàð áåç ñâÿçåé" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Óäàëåíèå àâàòàð áåç ñâÿçåé</b><div style='color:gray'>Ýòà îïöèÿ ïîçâîëÿåò ïðîâåðèòü è óäàëèòü âñå ôàéëû 'av-', êîòîðûå óæå íå èñïîëüçóþòñÿ ïîëüçîâàòåëÿìè.</div>Âíèìàíèå: ýòà îïöèÿ òðåáóåò äîñòàòî÷íî ìíîãî ðåñóðñîâ.",
|
|
"ïî ".
|
|
$this->ipsclass->adskin->form_simple_input( 'pergo', '50', 5 ). " çà ðàç"
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Óäàëèòü àâàòàðû áåç ñâÿçåé');
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
|
|
|
//-----------------------------------------
|
|
// Clean up uploaded photos
|
|
//-----------------------------------------
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'cleanphotos' ),
|
|
2 => array( 'act' , 'rebuild' ),
|
|
4 => array( 'section', $this->ipsclass->section_code ),
|
|
) );
|
|
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
|
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Óäàëåíèå ôîòîãðàôèé áåç ñâÿçåé" );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Óäàëåíèå ôîòîãðàôèé áåç ñâÿçåé</b><div style='color:gray'>Ýòà îïöèÿ ïîçâîëÿåò ïðîâåðèòü è óäàëèòü âñå ôàéëû 'photo-', êîòîðûå óæå íå èñïîëüçóþòñÿ ïîëüçîâàòåëÿìè.</div>Âíèìàíèå: ýòà îïöèÿ òðåáóåò äîñòàòî÷íî ìíîãî ðåñóðñîâ.",
|
|
"ïî ".
|
|
$this->ipsclass->adskin->form_simple_input( 'pergo', '50', 5 ). " çà ðàç"
|
|
) );
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Óäàëèòü ôîòîãðàôèè áåç ñâÿçåé');
|
|
|
|
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
|
|
|
//-------------------------------//
|
|
|
|
$this->ipsclass->admin->output();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
?>
|