Version 2.3.6
This commit is contained in:
1 parent
a3bb603c96
commit
19b38c7c74
764 files changed
+143731
-118164
No files matched your search
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -2,26 +2,18 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
| > $Date: 2008-03-28 18:08:02 -0400 (Fri, 28 Mar 2008) $
|
||||
| > $Revision: 1232 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Admin Logs Stuff
|
||||
@@ -36,7 +28,7 @@
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåâåðíûé âõîä</h1> Ó âàñ íåò äîñòóïà ê ýòîìó ôàéëó. Åñëè ïðîâîäèëîñü îáíîâëåíèå, óáåäèòåñü, ÷òî íå çàáûëè îáíîâèòü ôàéë admin.php.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -45,34 +37,34 @@ class ad_adminlogs
|
||||
|
||||
var $base_url;
|
||||
var $colours = array();
|
||||
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "admin";
|
||||
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = "adminlog";
|
||||
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Æóðíàë àäìèíèñòðèðîâàíèÿ' );
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Admin Logs' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Make sure we're a root admin, or else!
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'])
|
||||
{
|
||||
//$this->ipsclass->admin->error("Sorry, these functions are for the root admin group only");
|
||||
}
|
||||
|
||||
|
||||
$this->colours = array(
|
||||
"cat" => "green",
|
||||
"forum" => "darkgreen",
|
||||
@@ -83,7 +75,7 @@ class ad_adminlogs
|
||||
'help' => 'darkorange',
|
||||
'modlog' => 'steelblue',
|
||||
);
|
||||
|
||||
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
@@ -91,263 +83,270 @@ class ad_adminlogs
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->view();
|
||||
break;
|
||||
|
||||
|
||||
case 'remove':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
|
||||
$this->remove();
|
||||
break;
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
default:
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->list_current();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove archived files
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function view()
|
||||
{
|
||||
$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Ïðîñìîòð âñåõ äåéñòâèé, ïðîèçâåäåííûõ àäìèíèñòðàòîðàìè";
|
||||
$this->ipsclass->admin->page_title = "Æóðíàë àäìèíèñòðèðîâàíèÿ";
|
||||
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Viewing all actions by a administrator";
|
||||
$this->ipsclass->admin->page_title = "Administration Logs Manager";
|
||||
|
||||
if ( ( !isset($this->ipsclass->input['search_string']) OR !$this->ipsclass->input['search_string'] ) AND ( !isset($this->ipsclass->input['mid']) OR !$this->ipsclass->input['mid'] ) )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Âû íå óêàçàëè äåéñòâèå, êîòîðîå íåîáõîäèìî íàéòè.";
|
||||
$this->ipsclass->main_msg = "You must enter a search string";
|
||||
$this->list_current();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ( !isset($this->ipsclass->input['search_string']) OR !$this->ipsclass->input['search_string'] )
|
||||
{
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as count', 'from' => 'admin_logs', 'where' => "member_id=".intval($this->ipsclass->input['mid']) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
$row = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
|
||||
$row_count = $row['count'];
|
||||
|
||||
|
||||
$query = "&{$this->ipsclass->form_code}&mid={$this->ipsclass->input['mid']}&code=view";
|
||||
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'adminlogs_view_one', array( 'mid' => intval($this->ipsclass->input['mid']), 'limit_a' => $start ) );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->input['search_string'] = urldecode($this->ipsclass->input['search_string']);
|
||||
|
||||
$dbq = "m.".$this->ipsclass->input['search_type']." LIKE '%".$this->ipsclass->input['search_string']."%'";
|
||||
|
||||
|
||||
if( $this->ipsclass->input['search_type'] == 'member_id' )
|
||||
{
|
||||
$dbq = "m.".$this->ipsclass->input['search_type']."='".$this->ipsclass->input['search_string']."'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$dbq = "m.".$this->ipsclass->input['search_type']." LIKE '%".$this->ipsclass->input['search_string']."%'";
|
||||
}
|
||||
|
||||
$row = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(m.id) as count', 'from' => 'admin_logs m', 'where' => $dbq ) );
|
||||
|
||||
|
||||
$row_count = $row['count'];
|
||||
|
||||
$query = "&act=adminlog&code=view&search_type={$this->ipsclass->input['search_type']}&search_string=".urlencode($this->ipsclass->input['search_string']);
|
||||
|
||||
|
||||
$query = "&{$this->ipsclass->form_code}&code=view&search_type={$this->ipsclass->input['search_type']}&search_string=".urlencode($this->ipsclass->input['search_string']);
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'adminlogs_view_two', array( 'dbq' => $dbq, 'limit_a' => $start ) );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
}
|
||||
|
||||
|
||||
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $row_count,
|
||||
'PER_PAGE' => 20,
|
||||
'CUR_ST_VAL' => $start,
|
||||
'L_SINGLE' => "Ñòðàíèöà",
|
||||
'L_MULTI' => "Ñòðàíèöû: ",
|
||||
'L_SINGLE' => "Single Page",
|
||||
'L_MULTI' => "Pages: ",
|
||||
'BASE_URL' => $this->ipsclass->base_url.$query,
|
||||
)
|
||||
);
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Â ýòîé ñåêöèè âû ìîæåòå ïðîñìàòðèâàòü è óïðàâëÿòü æóðíàëîì àäìèíèñòðèðîâàíèÿ";
|
||||
$this->ipsclass->admin->page_title = "Æóðíàë àäìèíèñòðèðîâàíèÿ";
|
||||
|
||||
|
||||
$this->ipsclass->admin->page_detail = "You may view and remove actions performed by your administrators";
|
||||
$this->ipsclass->admin->page_title = "Administrator Logs Manager";
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Àäìèíèñòðàòîð" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Äåéñòâèå" , "40%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Âðåìÿ" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "IP-àäðåñ" , "20%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Æóðíàë äåéñòâèé" );
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Member Name" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Action Perfomed" , "40%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Time of action" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "IP address" , "20%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Admin Logs" );
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'center', 'tablesubheader');
|
||||
|
||||
|
||||
if ( $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
while ( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$row['ctime'] = $this->ipsclass->admin->get_date( $row['ctime'], 'LONG' );
|
||||
|
||||
|
||||
$this->colours[$row['act']] = isset($this->colours[$row['act']]) ? $this->colours[$row['act']] : 'black';
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>{$row['members_display_name']}</b>",
|
||||
"<span style='color:{$this->colours[$row['act']]}'>{$row['note']}</span>",
|
||||
"{$row['ctime']}",
|
||||
"{$row['ip_address']}",
|
||||
) );
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Íåò çàïèñåé</center>");
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>No results</center>");
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'center', 'tablesubheader');
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove archived files
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function remove()
|
||||
{
|
||||
if ($this->ipsclass->input['mid'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû íå óêàçàëè ID àäìèíèñòðàòîðà");
|
||||
$this->ipsclass->admin->error("You did not select a member ID to remove by!");
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'admin_logs', 'where' => "member_id=".intval($this->ipsclass->input['mid']) ) );
|
||||
|
||||
|
||||
$this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// SHOW ALL LANGUAGE PACKS
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function list_current()
|
||||
{
|
||||
$form_array = array();
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Â ýòîé ñåêöèè âû ìîæåòå ïðîñìàòðèâàòü è óïðàâëÿòü æóðíàëîì àäìèíèñòðèðîâàíèÿ";
|
||||
$this->ipsclass->admin->page_title = "Æóðíàë àäìèíèñòðèðîâàíèÿ";
|
||||
|
||||
|
||||
$this->ipsclass->admin->page_detail = "You may view and remove actions performed by your administrators in mission critical areas of the administration CP (such as forum control, member control, group control, help files and moderator log management).";
|
||||
$this->ipsclass->admin->page_title = "Administration Logs Manager";
|
||||
|
||||
//-----------------------------------------
|
||||
// LAST FIVE ACTIONS
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'adminlogs_view_list_current', array() );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Àäìèíèñòðàòîð" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Äåéñòâèå" , "40%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Âðåìÿ" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "IP-àäðåñ" , "20%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "5 ïîñëåäíèõ äåéñòâèé" );
|
||||
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Member Name" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Action Perfomed" , "40%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Time of action" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "IP address" , "20%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Last 5 Admin Actions" );
|
||||
|
||||
if ( $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
while ( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
|
||||
|
||||
$row['ctime'] = $this->ipsclass->admin->get_date( $row['ctime'], 'LONG' );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>{$row['name']}</b>",
|
||||
"<span style='color:{$this->colours[$row['act']]}'>{$row['note']}</span>",
|
||||
"{$row['ctime']}",
|
||||
"{$row['ip_address']}",
|
||||
) );
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Íåò çàïèñåé</center>");
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>No results</center>");
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Àäìèíèñòðàòîð" , "30%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Äåéñòâèé ñîâåðøåíî" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ïðîñìîòð âñåõ äåéñòâèé" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Óäàëåíèå âñåõ äåéñòâèé" , "30%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Æóðíàë àäìèíèñòðèðîâàíèÿ" );
|
||||
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Member Name" , "30%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Actions Perfomed" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "View all by member" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Remove all by member" , "30%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Admininstration Logs" );
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'adminlogs_view_list_current_two', array() );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>{$r['name']}</b>",
|
||||
"<center>{$r['act_count']}</center>",
|
||||
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=view&mid={$r['member_id']}'>Ïîñìîòðåòü</a></center>",
|
||||
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=remove&mid={$r['member_id']}'>Óäàëèòü</a></center>",
|
||||
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=view&mid={$r['member_id']}'>View</a></center>",
|
||||
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=remove&mid={$r['member_id']}'>Remove</a></center>",
|
||||
) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'view' ),
|
||||
2 => array( 'act' , 'adminlog' ),
|
||||
3 => array( 'section', $this->ipsclass->section_code ),
|
||||
) );
|
||||
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîèñê äåéñòâèé â æóðíàëå" );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Admin Logs" );
|
||||
|
||||
$form_array = array(
|
||||
0 => array( 'note' , 'Äåéñòâèå' ),
|
||||
1 => array( 'ip_address' , 'IP-àäðåñ' ),
|
||||
2 => array( 'member_id' , 'ID àäìèíèñòðàòîðà' ),
|
||||
3 => array( 'act' , 'Íàñòðîéêè ACT' ),
|
||||
4 => array( 'code' , 'Íàñòðîéêè CODE' ),
|
||||
0 => array( 'note' , 'Action Performed' ),
|
||||
1 => array( 'ip_address', 'IP Address' ),
|
||||
2 => array( 'member_id' , 'Member ID' ),
|
||||
3 => array( 'act' , 'ACT Setting' ),
|
||||
4 => array( 'code' , 'CODE Setting' ),
|
||||
);
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñêàòü </b>" ,
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Search for...</b>" ,
|
||||
$this->ipsclass->adskin->form_input( "search_string")
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñêàòü â </b>" ,
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Search in...</b>" ,
|
||||
$this->ipsclass->adskin->form_dropdown( "search_type", $form_array)
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Èñêàòü");
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search");
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,580 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2007 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > API User Administration
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Monday 25 June 2007
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class ad_api
|
||||
{
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Auto run
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Make sure we're a root admin, or else!
|
||||
//-----------------------------------------
|
||||
|
||||
if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'])
|
||||
{
|
||||
$this->ipsclass->admin->error("Sorry, these functions are for the root admin group only");
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load skin...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->html = $this->ipsclass->acp_load_template('cp_skin_api');
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'XML-RPC API Management' );
|
||||
|
||||
//-----------------------------------------
|
||||
// What are we to do, today?
|
||||
//-----------------------------------------
|
||||
|
||||
switch( $this->ipsclass->input['code'] )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Default:
|
||||
//-----------------------------------------
|
||||
case 'api_list':
|
||||
default:
|
||||
$this->api_list();
|
||||
break;
|
||||
case 'api_add':
|
||||
$this->api_form( 'add' );
|
||||
break;
|
||||
case 'api_add_save':
|
||||
$this->api_save( 'add' );
|
||||
break;
|
||||
case 'api_edit':
|
||||
$this->api_form( 'edit' );
|
||||
break;
|
||||
case 'api_edit_save':
|
||||
$this->api_save( 'edit' );
|
||||
break;
|
||||
case 'api_remove':
|
||||
$this->api_remove();
|
||||
break;
|
||||
|
||||
case 'log_list':
|
||||
$this->log_list();
|
||||
break;
|
||||
case 'log_view_detail':
|
||||
$this->log_view_detail();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// API Logs View
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* API Logs View
|
||||
* View API Log
|
||||
*
|
||||
* @author Matt Mecham
|
||||
* @since 2.3.2
|
||||
*/
|
||||
/*
|
||||
CREATE TABLE ibf_api_log (
|
||||
api_log_id int(10) unsigned NOT NULL auto_increment,
|
||||
api_log_key VARCHAR(32) NOT NULL,
|
||||
api_log_ip VARCHAR(16) NOT NULL,
|
||||
api_log_date INT(10) NOT NULL,
|
||||
api_log_query TEXT NOT NULL,
|
||||
api_log_allowed TINYINT(1) unsigned NOT NULL,
|
||||
PRIMARY KEY (api_log_id)
|
||||
);*/
|
||||
|
||||
function log_view_detail()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$api_log_id = intval( $this->ipsclass->input['api_log_id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get data from the deebee
|
||||
//-----------------------------------------
|
||||
|
||||
$log = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
|
||||
'from' => 'api_log',
|
||||
'where' => 'api_log_id='.$api_log_id ) );
|
||||
|
||||
if ( ! $log['api_log_id'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "No log for that ID found";
|
||||
$this->log_list();
|
||||
return;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Display...
|
||||
//-----------------------------------------
|
||||
|
||||
$log['_api_log_date'] = $this->ipsclass->get_date( $log['api_log_date'], 'LONG' );
|
||||
$log['_api_log_allowed'] = $log['api_log_allowed'] ? 'aff_tick.png' : 'aff_cross.png';
|
||||
$log['_api_log_query'] = htmlspecialchars( $log['api_log_query'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Show...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->html->api_log_detail( $log );
|
||||
|
||||
$this->ipsclass->admin->print_popup();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// API Logs List
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* API Logs List
|
||||
* List API Logs
|
||||
*
|
||||
* @author Matt Mecham
|
||||
* @since 2.3.2
|
||||
*/
|
||||
function log_list()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$start = intval( $this->ipsclass->input['st'] );
|
||||
$perpage = 50;
|
||||
$logs = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Get log count
|
||||
//-----------------------------------------
|
||||
|
||||
$count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(*) as count',
|
||||
'from' => 'api_log' ) );
|
||||
|
||||
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => intval( $count['count'] ),
|
||||
'PER_PAGE' => $perpage,
|
||||
'CUR_ST_VAL' => $start,
|
||||
'L_SINGLE' => "",
|
||||
'L_MULTI' => "Pages: ",
|
||||
'BASE_URL' => $this->ipsclass->base_url.'&'.$this->ipsclass->form_code ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get from DB
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => '*',
|
||||
'from' => 'api_log',
|
||||
'order' => 'api_log_date DESC',
|
||||
'limit' => array( $start, $perpage ) ) );
|
||||
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
while( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$row['_api_log_date'] = $this->ipsclass->admin->get_date( $row['api_log_date'] );
|
||||
$row['_api_log_allowed'] = $row['api_log_allowed'] ? 'aff_tick.png' : 'aff_cross.png';
|
||||
|
||||
$logs[] = $row;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Print...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( "XML-RPC API Logs", "This page shows all the recorded XML-RPC requests.<br />The red cross indicates an error during the request and a green tick indicates a successful request." ) . "<br />";
|
||||
|
||||
$this->ipsclass->html .= $this->html->api_login_view( $logs, $links );
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// API User Remove
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* API User Remove
|
||||
* Removes an API User
|
||||
*
|
||||
* @author Brandon Farber
|
||||
* @since 2.3.2
|
||||
*/
|
||||
function api_remove()
|
||||
{
|
||||
$api_user_id = isset($this->ipsclass->input['api_user_id']) ? intval($this->ipsclass->input['api_user_id']) : 0;
|
||||
|
||||
if( !$api_user_id )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Could not determine the user to remove";
|
||||
$this->api_list();
|
||||
return;
|
||||
}
|
||||
|
||||
$api_user = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
|
||||
'from' => 'api_users',
|
||||
'where' => 'api_user_id='.$api_user_id ) );
|
||||
|
||||
if ( ! $api_user['api_user_id'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "The API user could not be found.";
|
||||
$this->api_list();
|
||||
return;
|
||||
}
|
||||
|
||||
$this->ipsclass->DB->do_delete( 'api_users', 'api_user_id='.$api_user_id );
|
||||
|
||||
$this->ipsclass->main_msg = "API User successfully removed";
|
||||
$this->api_list();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// API Form
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* API Save
|
||||
* Save API user
|
||||
*
|
||||
* @author Matt Mecham
|
||||
* @since 2.3.2
|
||||
*/
|
||||
function api_save( $type='add' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$api_user_id = isset($this->ipsclass->input['api_user_id']) ? intval($this->ipsclass->input['api_user_id']) : 0;
|
||||
$api_user_key = $this->ipsclass->input['api_user_key'];
|
||||
$api_user_name = $this->ipsclass->input['api_user_name'];
|
||||
$api_user_ip = $this->ipsclass->input['api_user_ip'];
|
||||
$permissions = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Check (please?)
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $api_user_name )
|
||||
{
|
||||
$this->ipsclass->main_msg = "You must enter a title";
|
||||
$this->api_form( $type );
|
||||
return;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// More checking...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $type == 'add' )
|
||||
{
|
||||
if ( ! $api_user_key )
|
||||
{
|
||||
$this->ipsclass->main_msg = "No API user key was passed!";
|
||||
$this->api_form( $type );
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$api_user = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
|
||||
'from' => 'api_users',
|
||||
'where' => 'api_user_id='.$api_user_id ) );
|
||||
|
||||
if ( ! $api_user['api_user_id'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "The API user could not be found.";
|
||||
$this->api_list();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Save basics
|
||||
//-----------------------------------------
|
||||
|
||||
$save = array( 'api_user_name' => $api_user_name,
|
||||
'api_user_ip' => $api_user_ip );
|
||||
|
||||
//-----------------------------------------
|
||||
// Sort out permissions...
|
||||
//-----------------------------------------
|
||||
|
||||
foreach( $this->ipsclass->input as $key => $value )
|
||||
{
|
||||
if ( preg_match( "#^_perm_([^_]+?)_(.*)$#", $key, $matches ) )
|
||||
{
|
||||
$module = $matches[1];
|
||||
$function = $matches[2];
|
||||
|
||||
if ( $value )
|
||||
{
|
||||
$permissions[ $module ][ $function ] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Add in perms
|
||||
//-----------------------------------------
|
||||
|
||||
$save['api_user_perms'] = serialize( $permissions );
|
||||
|
||||
//-----------------------------------------
|
||||
// Save...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $type == 'add' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Add in key..
|
||||
//-----------------------------------------
|
||||
|
||||
$save['api_user_key'] = $api_user_key;
|
||||
|
||||
//-----------------------------------------
|
||||
// Save it...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->main_msg = "API User Added";
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'api_users', $save );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->main_msg = "API User Edit";
|
||||
|
||||
$this->ipsclass->DB->do_update( 'api_users', $save, 'api_user_id=' . $api_user_id );
|
||||
}
|
||||
|
||||
$this->api_list();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// API Form
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* API LIST
|
||||
* List all currently stored API users
|
||||
*
|
||||
* @author Matt Mecham
|
||||
* @since 2.3.2
|
||||
*/
|
||||
function api_form( $type='add' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$api_user_id = isset($this->ipsclass->input['api_user_id']) ? intval($this->ipsclass->input['api_user_id']) : 0;
|
||||
$form = array();
|
||||
$permissions = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Check (please?)
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $type == 'add' )
|
||||
{
|
||||
$formcode = 'api_add_save';
|
||||
$title = "Create New API User";
|
||||
$button = "Create New API User";
|
||||
$api_user = array();
|
||||
$api_perms = array();
|
||||
}
|
||||
else
|
||||
{
|
||||
$api_user = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
|
||||
'from' => 'api_users',
|
||||
'where' => 'api_user_id='.$api_user_id ) );
|
||||
|
||||
if ( ! $api_user['api_user_id'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "The API user could not be found.";
|
||||
$this->api_list();
|
||||
return;
|
||||
}
|
||||
|
||||
$formcode = 'api_edit_save';
|
||||
$title = "Edit API User: ".$api_user['api_user_name'];
|
||||
$button = "Save Changes";
|
||||
|
||||
$api_perms = unserialize( $api_user['api_user_perms'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Form
|
||||
//-----------------------------------------
|
||||
|
||||
$form['api_user_name'] = $this->ipsclass->adskin->form_input( 'api_user_name', ( isset($_POST['api_user_name']) AND $_POST['api_user_name'] ) ? stripslashes($_POST['api_user_name']) : $api_user['api_user_name'] );
|
||||
$form['api_user_ip'] = $this->ipsclass->adskin->form_input( 'api_user_ip', ( isset($_POST['api_user_ip']) AND $_POST['api_user_ip'] ) ? stripslashes($_POST['api_user_ip']) : $api_user['api_user_ip'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get all modules and stuff and other things
|
||||
//-----------------------------------------
|
||||
|
||||
$path = ROOT_PATH . 'interface/board/modules';
|
||||
|
||||
if ( is_dir( $path ) )
|
||||
{
|
||||
$handle = opendir( $path );
|
||||
|
||||
while ( ( $file = readdir($handle) ) !== FALSE )
|
||||
{
|
||||
if ( is_dir( $path . '/' . $file ) )
|
||||
{
|
||||
if ( file_exists( $path . '/' . $file . '/config.php' ) )
|
||||
{
|
||||
$_name = $file;
|
||||
|
||||
require_once( $path . "/" . $file . '/config.php' );
|
||||
|
||||
if ( $CONFIG['api_module_title'] )
|
||||
{
|
||||
$permissions[ $_name ] = array( 'key' => $api_module_title,
|
||||
'title' => $CONFIG['api_module_title'],
|
||||
'desc' => $CONFIG['api_module_desc'],
|
||||
'path' => $path . "/" . $file,
|
||||
'perms' => array() );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get all available methods
|
||||
//-----------------------------------------
|
||||
|
||||
if ( file_exists( $path . '/' . $file . '/methods.php' ) )
|
||||
{
|
||||
require_once( $path . '/' . $file . '/methods.php' );
|
||||
|
||||
$permissions[ $_name ]['perms'] = array_keys( $ALLOWED_METHODS );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Sort out form field
|
||||
//-----------------------------------------
|
||||
|
||||
if ( is_array( $permissions[ $_name ]['perms'] ) )
|
||||
{
|
||||
foreach( $permissions[ $_name ]['perms'] as $perm )
|
||||
{
|
||||
$_checked = intval( $api_perms[ $_name ][ $perm ] );
|
||||
$permissions[ $_name ]['form_perms'][ $perm ] = array( 'title' => $perm,
|
||||
'form' => $this->ipsclass->adskin->form_checkbox( '_perm_' . $_name . '_' . $perm, $_checked, 1 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$CONFIG = array();
|
||||
$ALLOWED_METHODS = array();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closedir( $handle );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Auto-generate API key
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $type == 'add' )
|
||||
{
|
||||
$form['_api_user_key'] = md5( rand( 0, time() ) . $this->ipsclass->member['member_login_key'] . microtime() );
|
||||
}
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( "XML-RPC User Management", "You may create API users for use with the XML-RPC system which allows other applications to access IP.Board data" ) . "<br />";
|
||||
$this->ipsclass->html .= $this->html->api_form( $form, $title, $formcode, $button, $api_user, $type, $permissions );
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( "", "Add/Edit API User" );
|
||||
$this->ipsclass->admin->output();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// API List
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* API LIST
|
||||
* List all currently stored API users
|
||||
*
|
||||
* @author Matt Mecham
|
||||
* @since 2.3.2
|
||||
*/
|
||||
function api_list()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$users = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Get users from the DB
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => '*',
|
||||
'from' => 'api_users',
|
||||
'order' => 'api_user_id' ) );
|
||||
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
while( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$users[] = $row;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// XML RPC Enabled?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $this->ipsclass->vars['xmlrpc_enable'] )
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->skin_acp_global->warning_box( "XML-RPC System Disabled", "<strong>The XML-RPC system is not enabled!</strong><br />All API requests will fail. <a href='{$this->ipsclass->base_url}&section=tools&act=op&code=setting_view&conf_title_keyword=xmlrpcapi'>Click here to enable it</a>" ) . "<br >";
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( "XML-RPC User Management", "You may create API users for use with the XML-RPC system which allows other applications to access IP.Board data" ) . "<br />";
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Dun...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->html->api_list( $users );
|
||||
|
||||
//-----------------------------------------
|
||||
// PRINT
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -2,25 +2,17 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-11-03 16:54:54 -0600 (Fri, 03 Nov 2006) $
|
||||
| > $Revision: 709 $
|
||||
| > $Date: 2007-04-19 18:08:46 -0400 (Thu, 19 Apr 2007) $
|
||||
| > $Revision: 947 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
@@ -35,7 +27,7 @@
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåâåðíûé âõîä</h1> Ó âàñ íåò äîñòóïà ê ýòîìó ôàéëó. Åñëè ïðîâîäèëîñü îáíîâëåíèå, óáåäèòåñü, ÷òî íå çàáûëè îáíîâèòü ôàéë admin.php.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -44,81 +36,81 @@ class ad_banandbadword {
|
||||
var $functions = "";
|
||||
var $ipsclass;
|
||||
var $html;
|
||||
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "content";
|
||||
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = "babw";
|
||||
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
$this->html = $this->ipsclass->acp_load_template('cp_skin_bbcode_badword');
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Require and RUN !! THERES A BOMB
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->admin->page_detail = "";
|
||||
$this->ipsclass->admin->page_title = "Ôèëüòðû áëîêèðîâêè (ban)";
|
||||
$this->ipsclass->admin->page_title = "Ban Manager";
|
||||
|
||||
//-----------------------------------------
|
||||
// What to do...
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Badword
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
case 'badword':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->badword_start();
|
||||
break;
|
||||
|
||||
|
||||
case 'badword_add':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':bw-add' );
|
||||
$this->badword_add();
|
||||
break;
|
||||
|
||||
|
||||
case 'badword_remove':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':bw-remove' );
|
||||
$this->badword_remove();
|
||||
break;
|
||||
|
||||
|
||||
case 'badword_edit':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':bw-edit' );
|
||||
$this->badword_edit();
|
||||
break;
|
||||
|
||||
|
||||
case 'badword_doedit':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':bw-edit' );
|
||||
$this->badword_doedit();
|
||||
break;
|
||||
|
||||
|
||||
case 'badword_export':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':bw-export' );
|
||||
$this->badword_export();
|
||||
break;
|
||||
|
||||
|
||||
case 'badword_import':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':bw-import' );
|
||||
$this->badword_import();
|
||||
break;
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BAN (d-aid)
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
case 'ban':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':ban-view' );
|
||||
$this->ban_start();
|
||||
@@ -133,38 +125,38 @@ class ad_banandbadword {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BAN: Rebuild cache
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function ban_rebuildcache()
|
||||
{
|
||||
require_once ROOT_PATH.'sources/classes/bbcode/class_bbcode_core.php';
|
||||
|
||||
|
||||
$this->ipsclass->cache['banfilters'] = array();
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'ban_content', 'from' => 'banfilters', 'where' => "ban_type='ip'" ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$this->ipsclass->cache['banfilters'][] = $r['ban_content'];
|
||||
}
|
||||
|
||||
|
||||
usort( $this->ipsclass->cache['banfilters'] , array( 'class_bbcode_core', 'word_length_sort' ) );
|
||||
|
||||
|
||||
$this->ipsclass->update_cache( array( 'name' => 'banfilters', 'array' => 1, 'deletefirst' => 1 ) );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BAN: DELETE
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function ban_delete()
|
||||
{
|
||||
$ids = array();
|
||||
|
||||
|
||||
foreach ($this->ipsclass->input as $key => $value)
|
||||
{
|
||||
if ( preg_match( "/^id_(\d+)$/", $key, $match ) )
|
||||
@@ -175,104 +167,104 @@ class ad_banandbadword {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$ids = $this->ipsclass->clean_int_array( $ids );
|
||||
|
||||
|
||||
if ( count( $ids ) )
|
||||
{
|
||||
$this->ipsclass->DB->simple_construct( array( 'delete' => 'banfilters', 'where' => 'ban_id IN('.implode( ",",$ids ).')' ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
}
|
||||
|
||||
|
||||
$this->ban_rebuildcache();
|
||||
|
||||
$this->ipsclass->main_msg = "Ôèëüòð íà áëîêèðîâêó óñïåøíî óäàëåí";
|
||||
|
||||
$this->ipsclass->main_msg = "Ban filters removed";
|
||||
$this->ban_start();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BAN: ADD
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function ban_add()
|
||||
{
|
||||
if ( ! $this->ipsclass->input['bantext'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Âû äîëæíû ââåñòè çàìåíÿåìîå ñëîâî!";
|
||||
$this->ipsclass->main_msg = "You must enter something to add to the ban filters!";
|
||||
$this->ban_start();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Check for existing entry
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$result = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'banfilters', 'where' => "ban_content='{$this->ipsclass->input['bantext']}' and ban_type='{$this->ipsclass->input['bantype']}'" ) );
|
||||
|
||||
|
||||
if ( $result['ban_id'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Òàêîå çíà÷åíèå óæå åñòü.";
|
||||
$this->ipsclass->main_msg = "Duplicate entry, entry not added to the ban filters database.";
|
||||
$this->ban_start();
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'banfilters', array( 'ban_type' => $this->ipsclass->input['bantype'], 'ban_content' => trim($this->ipsclass->input['bantext']), 'ban_date' => time() ) );
|
||||
|
||||
|
||||
$this->ban_rebuildcache();
|
||||
|
||||
$this->ipsclass->main_msg = "Íîâûé ôèëüòð áëîêèðîâêè óñïåøíî äîáàâëåí.";
|
||||
|
||||
|
||||
$this->ipsclass->main_msg = "Ban filter added";
|
||||
|
||||
$this->ban_start();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BAN: START
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function ban_start()
|
||||
{
|
||||
$this->ipsclass->admin->page_title = "Óïðàâëåíèå ôèëüòðàìè áëîêèðîâêè";
|
||||
$this->ipsclass->admin->page_title = "Ban Control";
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=ban', 'Ban Filters' );
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Ýòà ñåêöèÿ ïîçâîëÿåò âàì èçìåíÿòü, óäàëÿòü è äîáàâëÿòü ip-àäðåñà, e-mail è çàðåçåðâèðîâàííûå èìåíà â ôèëüòð äëÿ áëîêèðîâêè.
|
||||
<br /><strong>Âû ìîæåòå èñïîëüçîâàòü «ñèìâîë çâåçäî÷êè» — * , äëÿ ëþáîãî(ûõ) ñèìâîëà(îâ) ip-àäðåñà èëè e-mail. (íàïðèìåð: 127.0.*, *@mail.ru)</strong>";
|
||||
|
||||
|
||||
$this->ipsclass->admin->page_detail = "This section allows you to modify, delete or add IP addresses, email addresses and reserved names to the ban filters.
|
||||
<br /><strong>You can use * as a wildcard in any Username, IP or email filter. (Example: 127.0.*, *@yahoo.com, bannedname*)</strong>";
|
||||
|
||||
//-----------------------------------------
|
||||
// Get things
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$ban = array();
|
||||
|
||||
|
||||
$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_id'] ] = $r;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// SHOW THEM!
|
||||
//-----------------------------------------
|
||||
|
||||
$add_form = "<div align='center'><form method='post' action='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=ban_add'><input type='hidden' name='_admin_auth_key' value='{$this->ipsclass->_admin_auth_key}' /><input type='text' size='30' class='textinput' value='' name='bantext' />
|
||||
<select class='dropdown' name='bantype'><option value='ip'>IP Address</option><option value='email'>Email Address</option><option value='name'>Name</option></select>
|
||||
<input type='submit' value='Add New Filter' class='realdarkbutton' /></form></div>
|
||||
<form method='post' action='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=ban_delete'><input type='hidden' name='_admin_auth_key' value='{$this->ipsclass->_admin_auth_key}' />";
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'ban_delete'),
|
||||
2 => array( 'act' , 'babw' ),
|
||||
4 => array( 'section', $this->ipsclass->section_code ),
|
||||
) );
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "1%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Çàïèñü" , "80%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Äàòà äîáàâëåíèÿ" , "20%" );
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "{none}" , "1%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "{none}" , "80%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "{none}" , "20%" );
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Óïðàâëåíèå ôèëüòðàìè áëîêèðîâêè" );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ban Control" );
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( $add_form, "center", "tablesubheader");
|
||||
//-----------------------------------------
|
||||
// Banned IP Addresses
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Çàáëîêèðîâàííûå ip-àäðåñà", "left", "tablesubheader");
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Banned IP Addresses", "left", "tablesubheader");
|
||||
|
||||
if ( isset($ban['ip']) AND is_array( $ban['ip'] ) AND count( $ban['ip'] ) )
|
||||
{
|
||||
foreach ( $ban['ip'] as $entry )
|
||||
@@ -285,15 +277,15 @@ class ad_banandbadword {
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Çàáëîêèðîâàííûõ IP-àäðåñîâ íåò", "left", "tablerow1");
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("No Entered Banned IP Addresses", "left", "tablerow1");
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Banned Email Addresses
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Çàáëîêèðîâàííûå e-mail àäðåñà", "left", "tablesubheader");
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Banned Email Addresses", "left", "tablesubheader");
|
||||
|
||||
if ( isset($ban['email']) AND is_array( $ban['email'] ) AND count( $ban['email'] ) )
|
||||
{
|
||||
foreach ( $ban['email'] as $entry )
|
||||
@@ -306,15 +298,15 @@ class ad_banandbadword {
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Çàáëîêèðîâàííûõ e-mail àäðåñîâ íåò", "left", "tablerow1");
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("No Entered Banned Email Addresses", "left", "tablerow1");
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Banned Names
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Çàïðåùåííûå ê ðåãèñòðàöèè èìåíà ïîëüçîâàòåëåé", "left", "tablesubheader");
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Non-Registerable Names", "left", "tablesubheader");
|
||||
|
||||
if ( isset($ban['name']) AND is_array( $ban['name'] ) AND count( $ban['name'] ) )
|
||||
{
|
||||
foreach ( $ban['name'] as $entry )
|
||||
@@ -327,422 +319,399 @@ class ad_banandbadword {
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Çàïðåùåííûõ ê ðåãèñòðàöèè èìåí ïîëüçîâàòåëåé íåò", "left", "tablerow1");
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("No Entered Names", "left", "tablerow1");
|
||||
}
|
||||
|
||||
|
||||
$end_it_now = "<div align='left' style='float:left;width:auto;'>
|
||||
<input type='submit' value='Óäàëèòü âûáðàííîå' class='realdarkbutton' />
|
||||
</div></form>
|
||||
<div align='center'><form method='post' action='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=ban_add'><input type='hidden' name='_admin_auth_key' value='{$this->ipsclass->_admin_auth_key}' /><input type='text' size='30' class='textinput' value='' name='bantext' />
|
||||
<select class='dropdown' name='bantype'><option value='ip'>IP àäðåñ</option><option value='email'>E-mail àäðåñ</option><option value='name'>Èìÿ</option></select>
|
||||
<input type='submit' value='Äîáàâèòü íîâûé ôèëüòð' class='realdarkbutton' /></form></div>";
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( $end_it_now, "center", "tablesubheader");
|
||||
|
||||
<input type='submit' value='Delete Selected' class='realdarkbutton' />
|
||||
</div></form>";
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( $end_it_now, "center", "tablesubheader");
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BADWORDS: Import
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function badword_import()
|
||||
{
|
||||
$content = $this->ipsclass->admin->import_xml( 'ipb_badwords.xml' );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Got anything?
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( ! $content )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Èìïîðòèðîâàíèå çàïèñåé íå âûïîëíåíî, òàê êàê ôàéë «ipb_badwords.xml» ñîäåðæèò îøèáêó ëèáî îí ïóñò";
|
||||
$this->ipsclass->main_msg = "Upload failed, ipb_badwords.xml was either missing or empty";
|
||||
$this->badword_start();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get xml mah-do-dah
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
require_once( KERNEL_PATH.'class_xml.php' );
|
||||
|
||||
$xml = new class_xml();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Unpack the datafile
|
||||
//-----------------------------------------
|
||||
|
||||
$xml->lite_parser = 1;
|
||||
|
||||
$xml->xml_parse_document( $content );
|
||||
|
||||
|
||||
if( !is_array($xml->xml_array['badwordexport']['badwordgroup']['badword']) OR !count($xml->xml_array['badwordexport']['badwordgroup']['badword']) )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Èìïîðòèðîâàíèå çàïèñåé íå âûïîëíåíî, òàê êàê ôàéë «ipb_badwords.xml» ñîäåðæèò îøèáêó ëèáî îí ïóñò";
|
||||
$this->ipsclass->main_msg = "XML Import failed: ipb_badwords.xml is either empty or in the wrong format";
|
||||
$this->badword_start();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get current badwords
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$words = array();
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'badwords', 'order' => 'type' ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$words[ $r['type'] ] = 1;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// pArse
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
foreach( $xml->xml_array['badwordexport']['badwordgroup']['badword'] as $entry )
|
||||
{
|
||||
$type = $entry['type']['VALUE'];
|
||||
$swop = $entry['swop']['VALUE'];
|
||||
$m_exact = $entry['m_exact']['VALUE'];
|
||||
|
||||
|
||||
if ( $words[ $type ] )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if ( $type )
|
||||
{
|
||||
$this->ipsclass->DB->do_insert( 'badwords', array( 'type' => $type, 'swop' => $swop, 'm_exact' => $m_exact ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->badword_rebuildcache();
|
||||
|
||||
$this->ipsclass->main_msg = "Èìïîðòèðîâàíèå çàïèñåé óñïåøíî âûïîëíåíî";
|
||||
|
||||
|
||||
$this->ipsclass->main_msg = "Badword XML file import completed";
|
||||
|
||||
$this->badword_start();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BADWORD: Export
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function badword_export()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get xml mah-do-dah
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
require_once( KERNEL_PATH.'class_xml.php' );
|
||||
|
||||
$xml = new class_xml();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Start...
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$xml->xml_set_root( 'badwordexport', array( 'exported' => time() ) );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get emo group
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$xml->xml_add_group( 'badwordgroup' );
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'type, swop, m_exact', 'from' => 'badwords', 'order' => 'type' ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$content = array();
|
||||
|
||||
|
||||
foreach ( $r as $k => $v )
|
||||
{
|
||||
$content[] = $xml->xml_build_simple_tag( $k, $v );
|
||||
}
|
||||
|
||||
|
||||
$entry[] = $xml->xml_build_entry( 'badword', $content );
|
||||
}
|
||||
|
||||
|
||||
$xml->xml_add_entry_to_group( 'badwordgroup', $entry );
|
||||
|
||||
|
||||
$xml->xml_format_document();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Send to browser.
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->admin->show_download( $xml->xml_document, 'ipb_badwords.xml' );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BADWORD: Start
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function badword_start()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$badword_html = "";
|
||||
|
||||
$this->ipsclass->admin->page_detail = " ýòîé ñåêöèè âû ìîæåòå äîáàâëÿòü, èçìåíÿòü è óäàëÿòü ôèëüòðû íåöåíçóðíûõ ñëîâ.<br />Ôèëüòð íåöåíçóðíûõ ñëîâ ïîçâîëÿåò âàì çàìåíÿòü íåöåíçóðíûå ñëîâà â ñîîáùåíèÿõ ïîëüçîâàòåëåé, â ïîäïèñÿõ è â íàçâàíèÿõ òåì.<br /><br /><b>Ñîâïàäåíèå ïî ìàñêå</b>: ïðè âûáîðå ñïîñîáà «Ìàñêà», ââåäåííîå âàìè ñëîâî áóäåò èçìåíÿòüñÿ äàæå â ñëîâàõ, ñîäåðæàùèõ â ñåáå ýòî ñëîâî. Íàïðèìåð, åñëè âû ââåäåòå â ôèëüòð ñëîâî «êîçà», òî ýòî ñëîâî áóäåò èçìåíåíî íà óêàçàííûé âàìè çàìåíèòåëü è â ñëîâå «ñòðåêîçà». Åñëè âû íå ââåäåòå çàìåíèòåëü, òî íåöåíçóðíîå ñëîâî áóäåò èçìåíåíî íà øåñòü ñèìâîëîâ «ðåøåòêè» — #<br /><br /><b>Òî÷íîå ñîâïàäåíèå:</b> Ïðè âûáîðå ñïîñîáà «Òî÷íûé», ââåäåííîå âàìè ñëîâî áóäåò èçìåíÿòüñÿ íà çàìåíèòåëü òîëüêî ïðè òî÷íîì ñîâïàäåíèè ýòîãî ñëîâà. Íàïðèìåð, åñëè âû ââåäåòå â ôèëüòð ñëîâî «êîçà», òî ýòî ñëîâî áóäåò èçìåíåíî íà óêàçàííûé âàìè çàìåíèòåëü, òîëüêî â ñëîâå «êîçà». Åñëè âû íå ââåäåòå çàìåíèòåëü, òî íåöåíçóðíîå ñëîâî áóäåò èçìåíåíî íà øåñòü ñèìâîëîâ «ðåøåòêè» — #.<br /><br />Äàííàÿ îïöèÿ íå ÷óâñòâèòåëüíà ê ðåãèñòðó.";
|
||||
$this->ipsclass->admin->page_title = "Ôèëüòð íåöåíçóðíûõ ñëîâ";
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=badword', 'Ôèëüòð íåöåíçóðíûõ ñëîâ' );
|
||||
|
||||
|
||||
$this->ipsclass->admin->page_detail = "You can add/edit and remove bad word filters in this section.<br>The badword filter allows you to globally replace words from a members post, signature and topic title.<br><br><b>Loose matching</b>: If you entered 'hell' as a bad word, it will replace 'hell' and 'hello' with either your replacement if entered or 6 hashes (case insensitive)<br><br><b>Exact matching</b>: If you entered 'hell' as a bad word, it will replace 'hell' only with either your replacement if entered or 6 hashes (case insensitive)";
|
||||
$this->ipsclass->admin->page_title = "Bad Word Filter";
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=badword', 'Bad Word Filters' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Start form
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'badword_add' ),
|
||||
2 => array( 'act' , 'babw' ),
|
||||
4 => array( 'section', $this->ipsclass->section_code ),
|
||||
) );
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'badwords', 'order' => 'type' ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
if ( $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$words[] = $r;
|
||||
}
|
||||
|
||||
|
||||
foreach($words as $r)
|
||||
{
|
||||
$r['replace'] = $r['swop'] ? stripslashes($r['swop']) : '######';
|
||||
$r['method'] = $r['m_exact'] ? 'Òî÷íûé' : 'Ìàñêà';
|
||||
$r['method'] = $r['m_exact'] ? 'Exact' : 'Loose';
|
||||
$r['type'] = stripslashes($r['type']);
|
||||
|
||||
|
||||
$badword_html .= $this->html->badword_row( $r );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->html->badword_wrapper( $badword_html );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// IMPORT: Start table
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// IMPORT: Start output
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'badword_import' ),
|
||||
2 => array( 'act' , 'babw' ),
|
||||
3 => array( 'MAX_FILE_SIZE', '10000000000' ),
|
||||
4 => array( 'section', $this->ipsclass->section_code ),
|
||||
) , "uploadform", " enctype='multipart/form-data'" );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Èìïîðòèðîâàíèå ñïèñêà ñ ôèëüòðàìè íåöåíçóðíûõ ñëîâ" );
|
||||
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Import a Badword List" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
|
||||
"<b>Çàãðóçêà XML-ôàéëà ñ ôèëüòðàìè</b><div style='color:gray'>Âûáåðèòå ôàéë «ipb_badwords.xml» èëè «ipb_badwords.xml.gz» íà âàøåì êîìïüþòåðå. Çàïèñè óæå ñîäåðæàùèåñÿ â áàçå íå áóäóò èìïîðòèðîâàíû.</div>",
|
||||
"<b>Upload XML Badword List</b><div style='color:gray'>Browse your computer for 'ipb_badwords.xml' or 'ipb_badwords.xml.gz'. Duplicate entries will not be imported.</div>",
|
||||
$this->ipsclass->adskin->form_upload( )
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Èìïîðòèðîâàòü");
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Import");
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BADWORD: Complete Edit
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function badword_doedit()
|
||||
{
|
||||
if ($this->ipsclass->input['before'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû íå óêàçàëè çàìåíÿåìîå ñëîâî.");
|
||||
$this->ipsclass->admin->error("You must enter a word to replace, silly!");
|
||||
}
|
||||
|
||||
|
||||
if ($this->ipsclass->input['id'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû íå óêàçàëè ID ôèëüòðà.");
|
||||
$this->ipsclass->admin->error("You must pass a valid filter id, silly!");
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->input['match'] = $this->ipsclass->input['match'] ? 1 : 0;
|
||||
|
||||
|
||||
strlen($this->ipsclass->input['swop']) > 1 ? $this->ipsclass->input['swop'] : "";
|
||||
|
||||
|
||||
$this->ipsclass->DB->do_update( 'badwords', array( 'type' => trim($this->ipsclass->input['before']),
|
||||
'swop' => trim($this->ipsclass->input['after']),
|
||||
'm_exact' => $this->ipsclass->input['match'],
|
||||
), "wid='".$this->ipsclass->input['id']."'" );
|
||||
|
||||
|
||||
$this->badword_rebuildcache();
|
||||
|
||||
$this->ipsclass->main_msg = "Ôèëüòð èçìåíåí";
|
||||
|
||||
|
||||
$this->ipsclass->main_msg = "Filter edited";
|
||||
|
||||
$this->badword_start();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BADWORD: Edit
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function badword_edit()
|
||||
{
|
||||
$this->ipsclass->admin->page_detail = "Âû ìîæåòå èçìåíèòü âûáðàííûé ôèëüòð â ôîðìå íèæå";
|
||||
$this->ipsclass->admin->page_title = "Ôèëüòð íåöåíçóðíûõ ñëîâ";
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=badword', 'Ôèëüòð íåöåíçóðíûõ ñëîâ' );
|
||||
$this->ipsclass->admin->nav[] = array( '', 'Èçìåíåíèå ôèëüòðà íåöåíçóðíûõ ñëîâ' );
|
||||
|
||||
$this->ipsclass->admin->page_detail = "You may edit the chosen filter below";
|
||||
$this->ipsclass->admin->page_title = "Bad Word Filter";
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=badword', 'Bad Word Filters' );
|
||||
$this->ipsclass->admin->nav[] = array( '', 'Edit Bad Word Filter' );
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ($this->ipsclass->input['id'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû íå óêàçàëè ID ôèëüòðà.");
|
||||
$this->ipsclass->admin->error("You must pass a valid filter id, silly!");
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'badwords', 'where' => "wid='".$this->ipsclass->input['id']."'" ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
if ( ! $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$this->ipsclass->admin->error("Óêàçàííûé âàìè ôèëüòð íå íàéäåí â áàçå äàííûõ.");
|
||||
$this->ipsclass->admin->error("We could not find that filter in the database");
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'badword_doedit' ),
|
||||
2 => array( 'act' , 'babw' ),
|
||||
3 => array( 'id' , $this->ipsclass->input['id'] ),
|
||||
4 => array( 'section', $this->ipsclass->section_code ),
|
||||
) );
|
||||
|
||||
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ñëîâî" , "40%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Çàìåíà" , "40%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ìåòîä" , "20%" );
|
||||
|
||||
|
||||
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Before" , "40%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "After" , "40%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Method" , "20%" );
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ðåäàêòèðîâàíèå ôèëüòðà" );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Edit a filter" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $this->ipsclass->adskin->form_input('before', stripslashes($r['type']) ),
|
||||
$this->ipsclass->adskin->form_input('after' , stripslashes($r['swop']) ),
|
||||
$this->ipsclass->adskin->form_dropdown( 'match', array( 0 => array( 1, 'Òî÷íûé' ), 1 => array( 0, 'Ìàñêà' ) ), $r['m_exact'] )
|
||||
$this->ipsclass->adskin->form_dropdown( 'match', array( 0 => array( 1, 'Exact' ), 1 => array( 0, 'Loose' ) ), $r['m_exact'] )
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Èçìåíèòü');
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Edit Filter');
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BADWORD: Remove badowrd
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function badword_remove()
|
||||
{
|
||||
if ($this->ipsclass->input['id'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû íå óêàçàëè ID ôèëüòðà.");
|
||||
$this->ipsclass->admin->error("You must pass a valid filter id, silly!");
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'badwords', 'where' => "wid='".$this->ipsclass->input['id']."'" ) );
|
||||
|
||||
|
||||
$this->badword_rebuildcache();
|
||||
|
||||
$this->ipsclass->main_msg = "Ôèëüòð óäàëåí.";
|
||||
|
||||
|
||||
$this->ipsclass->main_msg = "Filter removed";
|
||||
|
||||
$this->badword_start();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BADWORD: Add badword
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function badword_add()
|
||||
{
|
||||
if ($this->ipsclass->input['before'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû íå óêàçàëè ñëîâî äëÿ çàìåíû.");
|
||||
$this->ipsclass->admin->error("You must enter a word to replace, silly!");
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->input['match'] = $this->ipsclass->input['match'] ? 1 : 0;
|
||||
|
||||
|
||||
strlen($this->ipsclass->input['swop']) > 1 ? $this->ipsclass->input['swop'] : "";
|
||||
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'badwords', array( 'type' => trim($this->ipsclass->input['before']),
|
||||
'swop' => trim($this->ipsclass->input['after']),
|
||||
'm_exact' => $this->ipsclass->input['match'],
|
||||
) );
|
||||
|
||||
|
||||
$this->badword_rebuildcache();
|
||||
|
||||
$this->ipsclass->main_msg = "Ôèëüòð óñïåøíî äîáàâëåí.";
|
||||
|
||||
|
||||
$this->ipsclass->main_msg = "New filter added";
|
||||
|
||||
$this->badword_start();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BADWORD Rebuild Cache
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function badword_rebuildcache()
|
||||
{
|
||||
require_once ROOT_PATH.'sources/classes/bbcode/class_bbcode_core.php';
|
||||
|
||||
$this->ipsclass->cache['badwords'] = array();
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'type,swop,m_exact', 'from' => 'badwords' ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$this->ipsclass->cache['badwords'][] = $r;
|
||||
}
|
||||
|
||||
|
||||
usort( $this->ipsclass->cache['emoticons'] , array( 'class_bbcode_core', 'word_length_sort' ) );
|
||||
|
||||
$this->ipsclass->update_cache( array( 'name' => 'badwords', 'array' => 1, 'deletefirst' => 1 ) );
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2,26 +2,18 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-10-30 06:40:23 -0600 (Mon, 30 Oct 2006) $
|
||||
| > $Revision: 684 $
|
||||
| > $Author: matt $
|
||||
| > $Date: 2007-04-24 17:35:27 -0400 (Tue, 24 Apr 2007) $
|
||||
| > $Revision: 952 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Administration Module
|
||||
@@ -35,7 +27,7 @@
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -44,147 +36,146 @@ class ad_bbcode {
|
||||
var $functions = "";
|
||||
var $ipsclass;
|
||||
var $html;
|
||||
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "content";
|
||||
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = "bbcode";
|
||||
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
$this->html = $this->ipsclass->acp_load_template('cp_skin_bbcode_badword');
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Óïðàâëåíèå BB-êîäàìè' );
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'BBCode Manager' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Require and RUN !! THERES A BOMB
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Ýòà ñåêöèÿ ïîçâîëÿåò âàì äîáàâëÿòü íîâûå BB-êîäû.";
|
||||
$this->ipsclass->admin->page_title = "Ìåíåäæåð íàñòðîéêè BB-êîäîâ";
|
||||
|
||||
$this->ipsclass->admin->page_detail = "The BBCode manager allows you to create and manage your BBCodes.";
|
||||
$this->ipsclass->admin->page_title = "BBCode Manager";
|
||||
|
||||
//-----------------------------------------
|
||||
// What to do...
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
case 'bbcode':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->bbcode_start();
|
||||
break;
|
||||
|
||||
|
||||
case 'bbcode_add':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' );
|
||||
$this->bbcode_form('add');
|
||||
break;
|
||||
|
||||
|
||||
case 'bbcode_doadd':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' );
|
||||
$this->bbcode_save('add');
|
||||
break;
|
||||
|
||||
|
||||
case 'bbcode_edit':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
|
||||
$this->bbcode_form('edit');
|
||||
break;
|
||||
|
||||
|
||||
case 'bbcode_doedit':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
|
||||
$this->bbcode_save('edit');
|
||||
break;
|
||||
|
||||
|
||||
case 'bbcode_test':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->bbcode_test();
|
||||
break;
|
||||
|
||||
|
||||
case 'bbcode_delete':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
|
||||
$this->bbcode_delete();
|
||||
break;
|
||||
|
||||
|
||||
case 'bbcode_export':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' );
|
||||
$this->bbcode_export();
|
||||
break;
|
||||
|
||||
|
||||
case 'bbcode_import':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':import' );
|
||||
$this->bbcode_import();
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->bbcode_start();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BBCODE: Import
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function bbcode_import()
|
||||
{
|
||||
$content = $this->ipsclass->admin->import_xml( 'bbcode.xml' );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Got anything?
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( ! $content )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Íåâîçìîæíî âûïîëíèòü èìïîðòèðîâàíèå, ïîèñêîëüêó â ôàéëå «bbcode.xml» îøèáêà èëè îí íå èìååò çàïèñåé.";
|
||||
$this->ipsclass->main_msg = "Upload failed, ipb_bbcode.xml was either missing or empty";
|
||||
$this->bbcode_start();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get xml mah-do-dah
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
require_once( KERNEL_PATH.'class_xml.php' );
|
||||
|
||||
$xml = new class_xml();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Unpack the datafile
|
||||
//-----------------------------------------
|
||||
|
||||
$xml->lite_parser = 1;
|
||||
|
||||
$xml->xml_parse_document( $content );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get current custom bbcodes
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$tags = array();
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode' ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$tags[ $r['bbcode_tag'] ] = 1;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// pArse
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( ! is_array( $xml->xml_array['bbcodeexport']['bbcodegroup']['bbcode'][0] ) )
|
||||
{
|
||||
$xml->xml_array['bbcodeexport']['bbcodegroup']['bbcode'][0] = $xml->xml_array['bbcodeexport']['bbcodegroup']['bbcode'];
|
||||
}
|
||||
|
||||
|
||||
foreach( $xml->xml_array['bbcodeexport']['bbcodegroup']['bbcode'] as $entry )
|
||||
{
|
||||
$bbcode_title = $entry['bbcode_title']['VALUE'];
|
||||
@@ -197,7 +188,7 @@ class ad_bbcode {
|
||||
$bbcode_add_into_menu = $entry['bbcode_add_into_menu']['VALUE'];
|
||||
$bbcode_menu_option_text = $entry['bbcode_menu_option_text']['VALUE'];
|
||||
$bbcode_menu_content_text = $entry['bbcode_menu_content_text']['VALUE'];
|
||||
|
||||
|
||||
if ( $tags[ $bbcode_tag ] )
|
||||
{
|
||||
$bbarray = array(
|
||||
@@ -212,12 +203,12 @@ class ad_bbcode {
|
||||
'bbcode_menu_option_text' => $bbcode_menu_option_text,
|
||||
'bbcode_menu_content_text' => $bbcode_menu_content_text,
|
||||
);
|
||||
|
||||
|
||||
$this->ipsclass->DB->do_update( 'custom_bbcode', $bbarray, "bbcode_tag='".$bbcode_tag."'" );
|
||||
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if ( $bbcode_tag )
|
||||
{
|
||||
$bbarray = array(
|
||||
@@ -232,101 +223,108 @@ class ad_bbcode {
|
||||
'bbcode_menu_option_text' => $bbcode_menu_option_text,
|
||||
'bbcode_menu_content_text' => $bbcode_menu_content_text,
|
||||
);
|
||||
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'custom_bbcode', $bbarray );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->bbcode_rebuildcache();
|
||||
|
||||
$this->ipsclass->main_msg = "Çàïèñè ñ BB-êîäîâàìè óñïåøíî èìïîðòèðîâàí.";
|
||||
|
||||
|
||||
$this->ipsclass->main_msg = "BBCode XML file import completed";
|
||||
|
||||
$this->bbcode_start();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BBCODE: Export
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function bbcode_export()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get xml mah-do-dah
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
require_once( KERNEL_PATH.'class_xml.php' );
|
||||
|
||||
$xml = new class_xml();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Start...
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$xml->xml_set_root( 'bbcodeexport', array( 'exported' => time() ) );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get emo group
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$xml->xml_add_group( 'bbcodegroup' );
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode' ) );
|
||||
|
||||
$select = array( 'select' => '*', 'from' => 'custom_bbcode' );
|
||||
|
||||
if( $this->ipsclass->input['id'] )
|
||||
{
|
||||
$select['where'] = 'bbcode_id=' . intval($this->ipsclass->input['id']);
|
||||
}
|
||||
|
||||
$this->ipsclass->DB->simple_construct( $select );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$content = array();
|
||||
|
||||
|
||||
foreach ( $r as $k => $v )
|
||||
{
|
||||
$content[] = $xml->xml_build_simple_tag( $k, $v );
|
||||
}
|
||||
|
||||
|
||||
$entry[] = $xml->xml_build_entry( 'bbcode', $content );
|
||||
}
|
||||
|
||||
|
||||
$xml->xml_add_entry_to_group( 'bbcodegroup', $entry );
|
||||
|
||||
|
||||
$xml->xml_format_document();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Send to browser.
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->admin->show_download( $xml->xml_document, 'bbcode.xml', '', 0 );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BBCODE Remove
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function bbcode_delete()
|
||||
{
|
||||
if ( ! $this->ipsclass->input['id'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Âû íå óêàçàëè ID BB-êîäà äëÿ óäàëåíèÿ.";
|
||||
$this->ipsclass->main_msg = "No ID was passed, please try again.";
|
||||
$this->bbcode_start();
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'custom_bbcode', 'where' => 'bbcode_id='.intval($this->ipsclass->input['id']) ) );
|
||||
|
||||
|
||||
$this->bbcode_rebuildcache();
|
||||
|
||||
|
||||
$this->bbcode_start();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BBCODE Rebuild Cache
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function bbcode_rebuildcache()
|
||||
{
|
||||
$this->ipsclass->cache['bbcode'] = array();
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode' ) );
|
||||
$bbcode = $this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row($bbcode) )
|
||||
{
|
||||
$this->ipsclass->cache['bbcode'][] = $r;
|
||||
@@ -334,32 +332,32 @@ class ad_bbcode {
|
||||
|
||||
$this->ipsclass->update_cache( array( 'name' => 'bbcode', 'array' => 1, 'deletefirst' => 1 ) );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BBCODE Test
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function bbcode_test()
|
||||
{
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode', 'order' => 'bbcode_title' ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
$t = $this->ipsclass->txt_stripslashes($_POST['bbtest']);
|
||||
|
||||
|
||||
while ( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$preg_tag = preg_quote($row['bbcode_tag'], '#' );
|
||||
|
||||
|
||||
if ( substr_count( $row['bbcode_replace'], '{content}' ) >= 1 )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Slightly slower
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( $row['bbcode_useoption'] )
|
||||
{
|
||||
preg_match_all( "#(\[".preg_quote($row['bbcode_tag'], '#' )."=(?:"|&\#39;)?(.+?)(?:"|&\#39;)?\])(.+?)(\[/".preg_quote($row['bbcode_tag'], '#' )."\])#si", $t, $match );
|
||||
|
||||
|
||||
for ($i=0; $i < count($match[0]); $i++)
|
||||
{
|
||||
# XSS Check: Bug ID: 980
|
||||
@@ -367,20 +365,20 @@ class ad_bbcode {
|
||||
{
|
||||
$match[2][$i] = intval( $match[2][$i] );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Does the option tag come first?
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$_option = 2;
|
||||
$_content = 3;
|
||||
|
||||
|
||||
if ( $row['bbcode_switch_option'] )
|
||||
{
|
||||
$_option = 3;
|
||||
$_content = 2;
|
||||
}
|
||||
|
||||
|
||||
$tmp = $row['bbcode_replace'];
|
||||
$tmp = str_replace( '{option}' , $match[ $_option ][$i], $tmp );
|
||||
$tmp = str_replace( '{content}', $match[ $_content ][$i], $tmp );
|
||||
@@ -391,7 +389,7 @@ class ad_bbcode {
|
||||
{
|
||||
# Tricky.. match anything that's not a closing tag, or nothing
|
||||
preg_match_all( "#(\[$preg_tag\])((?!\[/$preg_tag\]).+?)?(\[/$preg_tag\])#si", $t, $match );
|
||||
|
||||
|
||||
for ($i=0; $i < count($match[0]); $i++)
|
||||
{
|
||||
$tmp = $row['bbcode_replace'];
|
||||
@@ -403,7 +401,7 @@ class ad_bbcode {
|
||||
else
|
||||
{
|
||||
$replace = explode( '{content}', $row['bbcode_replace'] );
|
||||
|
||||
|
||||
if ( $row['bbcode_useoption'] )
|
||||
{
|
||||
$t = preg_replace( "#\[".$row['bbcode_tag']."=(?:"|&\#39;)?(.+?)(?:"|&\#39;)?\]#si", str_replace( '{option}', "\\1", $replace[0] ), $t );
|
||||
@@ -412,53 +410,53 @@ class ad_bbcode {
|
||||
{
|
||||
$t = preg_replace( '#\['.$row['bbcode_tag'].'\]#i' , $replace[0], $t );
|
||||
}
|
||||
|
||||
|
||||
$t = preg_replace( '#\[/'.$row['bbcode_tag'].'\]#i', $replace[1], $t );
|
||||
}
|
||||
}
|
||||
|
||||
$this->ipsclass->main_msg = "<b>Ïðîâåðêà BB-êîäà:</b><br /><br />".$t;
|
||||
|
||||
|
||||
$this->ipsclass->main_msg = "<b>BBCode Test:</b><br /><br />".$t;
|
||||
|
||||
$this->bbcode_start();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BBCODE Save Form
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function bbcode_save($type='add')
|
||||
{
|
||||
if ( $type == 'edit' )
|
||||
{
|
||||
if ( ! $this->ipsclass->input['id'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Âû íå óêàçàëè ID äëÿ èçìåíåíèÿ.";
|
||||
$this->ipsclass->main_msg = "No ID was passed, please try again";
|
||||
$this->bbcode_form($type);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// check...
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( ! $this->ipsclass->input['bbcode_title'] or ! $this->ipsclass->input['bbcode_tag'] or ! $this->ipsclass->input['bbcode_replace'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Âû äîëæíû çàïîëíèòü âñå ïîëÿ.";
|
||||
$this->ipsclass->main_msg = "You must complete the form fully.";
|
||||
$this->bbcode_form($type);
|
||||
}
|
||||
|
||||
|
||||
if ( ! strstr( $this->ipsclass->input['bbcode_replace'], '{content}' ) )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Âû äîëæíû èñïîëüçîâàòü {content} â òåõ ìåñòàõ, ãäå ïðîèñõîäèò çàìåíà BB-êîäîâ.";
|
||||
$this->ipsclass->main_msg = "You must use {content} somewhere in the BBCode replacement section.";
|
||||
$this->bbcode_form($type);
|
||||
}
|
||||
|
||||
|
||||
if ( ! strstr( $this->ipsclass->input['bbcode_replace'], '{option}' ) AND $this->ipsclass->input['bbcode_useoption'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Âû äîëæíû èñïîëüçîâàòü {option}, â òåõ ìåñòàõ, ãäå ïðîèñõîäèò çàìåíà BB-êîäîâ èëè ïàðàìåòðó «Èñïîëüçîâàòü íàñòðîéêè â òåãàõ» óñòàíîâèòü çíà÷åíèå «Íåò».";
|
||||
$this->ipsclass->main_msg = "You must use {option} somewhere in the BBCode replacement section or set 'Use Option in tag?' to 'no'.";
|
||||
$this->bbcode_form($type);
|
||||
}
|
||||
|
||||
|
||||
$array = array( 'bbcode_title' => $this->ipsclass->input['bbcode_title'],
|
||||
'bbcode_desc' => $this->ipsclass->txt_safeslashes( $_POST['bbcode_desc'] ),
|
||||
'bbcode_tag' => $this->ipsclass->input['bbcode_tag'],
|
||||
@@ -470,48 +468,48 @@ class ad_bbcode {
|
||||
'bbcode_menu_option_text' => trim( $this->ipsclass->input['bbcode_menu_option_text'] ),
|
||||
'bbcode_menu_content_text' => trim( $this->ipsclass->input['bbcode_menu_content_text'] )
|
||||
);
|
||||
|
||||
|
||||
if ( $type == 'add' )
|
||||
{
|
||||
$this->ipsclass->DB->do_insert( 'custom_bbcode', $array );
|
||||
$this->ipsclass->main_msg = 'Íîâûé BB-êîä óñïåøíî äîáàâëåí.';
|
||||
$this->ipsclass->main_msg = 'New BBCode Added';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->DB->do_update( 'custom_bbcode', $array, 'bbcode_id='.intval($this->ipsclass->input['id']) );
|
||||
$this->ipsclass->main_msg = 'BB-êîä óñïåøíî èçìåíåí.';
|
||||
$this->ipsclass->main_msg = 'Custom BBCode Edited';
|
||||
}
|
||||
|
||||
|
||||
$this->bbcode_rebuildcache();
|
||||
|
||||
|
||||
$this->bbcode_start();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BBCODE Start Form
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function bbcode_form($type='add')
|
||||
{
|
||||
$this->ipsclass->admin->page_detail = "Â ýòîé ñåêöèè âû ñìîæåòå ïðîñìîòðåòü âñå ñîçäàííûå âàìè BB-êîäû, à òàê æå èçìåíèòü èõ èëè óäàëèòü.";
|
||||
$this->ipsclass->admin->page_title = "Äîïîëíèòåëüíûå BB-êîäû";
|
||||
$this->ipsclass->admin->nav[] = array( '', 'Äîáàâëåíèå/èçìåíåíèå BB-êîäîâ' );
|
||||
|
||||
$this->ipsclass->admin->page_detail = "The BBCode manager allows you to add new custom BBCode.";
|
||||
$this->ipsclass->admin->page_title = "BBCode Manager";
|
||||
$this->ipsclass->admin->nav[] = array( '', 'Add/Edit BBCode' );
|
||||
|
||||
if ( $type == 'edit' )
|
||||
{
|
||||
if ( ! $this->ipsclass->input['id'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Âû íå óêàçàëè ID BB-êîäà äëÿ óäàëåíèÿ";
|
||||
$this->ipsclass->main_msg = "No ID was passed, please try again";
|
||||
$this->bbcode_start();
|
||||
}
|
||||
|
||||
|
||||
$bbcode = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'custom_bbcode', 'where' => 'bbcode_id='.intval($this->ipsclass->input['id']) ) );
|
||||
|
||||
$button = "Èçìåíèòü";
|
||||
|
||||
$button = "Edit BBCode";
|
||||
$code = 'bbcode_doedit';
|
||||
$title = "Ðåäàêòèðîâàíèå BB-êîäà: ".$bbcode['bbcode_title'];
|
||||
$title = "Editing BBCode: ".$bbcode['bbcode_title'];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -522,99 +520,99 @@ class ad_bbcode {
|
||||
'bbcode_useoption' => '',
|
||||
'bbcode_replace' => '' );
|
||||
$code = 'bbcode_doadd';
|
||||
$title = "Äîáàâëåíèå íîâîãî BB-êîäà";
|
||||
$button = "Äîáàâèòü";
|
||||
$title = "Adding a new custom BBCode";
|
||||
$button = "Add BBCode";
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Show the codes mahn!
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'bbcode' ),
|
||||
2 => array( 'code' , $code ),
|
||||
3 => array( 'id' , $this->ipsclass->input['id'] ),
|
||||
4 => array( 'section', $this->ipsclass->section_code ),
|
||||
) );
|
||||
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( $title );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Íàçâàíèå BB-êîäà</b><div style='color:gray'>Èñïîëüçóåòñÿ âî âñïëûâàþùåé ïîäñêàçêå BB-êîäà</div>",
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Custom BBCode Title</b><div style='color:gray'>Used on the BBCode pop-up legend</div>",
|
||||
$this->ipsclass->adskin->form_input( 'bbcode_title', ( isset($this->ipsclass->input['bbcode_title']) AND $this->ipsclass->input['bbcode_title'] ) ? $this->ipsclass->input['bbcode_title'] : $bbcode['bbcode_title'] )
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ïîëíîå îïèñàíèå ýòîãî BB-êîäà</b><div style='color:gray'>Èñïîëüçóåòñÿ âî âñïëûâàþùåé ïîäñêàçêå BB-êîä</div>",
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Custom BBCode Description</b><div style='color:gray'>Used on the BBCode pop-up legend</div>",
|
||||
$this->ipsclass->adskin->form_textarea( 'bbcode_desc', ( isset($this->ipsclass->input['bbcode_desc']) AND $this->ipsclass->input['bbcode_desc'] ) ? $this->ipsclass->input['bbcode_desc'] : $bbcode['bbcode_desc'] )
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ïðèìåð ýòîãî BB-êîäà</b><div style='color:gray'>Èñïîëüçóåòñÿ âî âñïëûâàþùåé ïîäñêàçêå BB-êîä<br />Òåã äëÿ ïðèìåðà: [tag]Çäåñü âàø ïðèìåð![/tag]</div>",
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Custom BBCode Example</b><div style='color:gray'>Used on the BBCode pop-up legend<br />Use the tag in the example: [tag]This is an example![/tag]</div>",
|
||||
$this->ipsclass->adskin->form_textarea( 'bbcode_example', ( isset($this->ipsclass->input['bbcode_example']) AND $this->ipsclass->input['bbcode_example'] ) ? $this->ipsclass->input['bbcode_example'] : $bbcode['bbcode_example'] )
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Òåã ýòîãî BB-êîäà</b><div style='color:gray'>Ïðèìåð: Äëÿ [tag] ââåäèòå <b>tag</b></div>",
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Custom BBCode Tag</b><div style='color:gray'>Example: For [tag] enter <b>tag</b></div>",
|
||||
'[ '.$this->ipsclass->adskin->form_simple_input( 'bbcode_tag', ( isset($this->ipsclass->input['bbcode_tag']) AND $this->ipsclass->input['bbcode_tag'] ) ? $this->ipsclass->input['bbcode_tag'] : $bbcode['bbcode_tag'], 10).' ]'
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñïîëüçîâàòü îïöèè â òåãå?</b><div style='color:gray'>Èñïîëüçóåòñÿ äëÿ ñîçäàíèÿ BB-êîäà ñ îïöèÿìè: [tag=option]</div>",
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Use Option in tag?</b><div style='color:gray'>Use to create [tag=option] style tags</div>",
|
||||
$this->ipsclass->adskin->form_yes_no( 'bbcode_useoption', ( isset($this->ipsclass->input['bbcode_useoption']) AND $this->ipsclass->input['bbcode_useoption'] ) ? $this->ipsclass->input['bbcode_useoption'] : $bbcode['bbcode_useoption'] )
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ñìåíèòü îïåðàíäû?</b><div style='color:gray'>Åñëè âû æåëàåòå çàìåíÿòü {content} íà {option} (ïðè èñïîëüçîâàíèè òåãîâ IE «ëþáèò» [tag={content}]{option}[/tag]</div>",
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Switch option around?</b><div style='color:gray'>Use this if you wish to swap the {content} for {option} (IE when using tags like [tag={content}]{option}[/tag]</div>",
|
||||
$this->ipsclass->adskin->form_yes_no( 'bbcode_switch_option', ( isset($this->ipsclass->input['bbcode_switch_option']) AND $this->ipsclass->input['bbcode_switch_option'] ) ? $this->ipsclass->input['bbcode_switch_option'] : $bbcode['bbcode_switch_option'] )
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Çàìåíà BB-êîäà</b><div style='color:gray'><tag>{content}</tag><br /><tag thing='{option}'>{content}</tag></div>",
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Custom BBCode Replacement</b><div style='color:gray'><tag>{content}</tag><br /><tag thing='{option}'>{content}</tag></div>",
|
||||
$this->ipsclass->adskin->form_textarea( 'bbcode_replace', ( isset($this->ipsclass->input['bbcode_replace']) AND $this->ipsclass->input['bbcode_replace'] ) ? $this->ipsclass->input['bbcode_replace'] : $bbcode['bbcode_replace'] )
|
||||
) );
|
||||
//-----------------------------------------
|
||||
// Insert Special Options
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Äîáàâèòü â ìåíþ «Ñïåö. ýëåìåíòû» ðåäàêòîðà?</b>",
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Insert into the editor's 'Insert Special' menu?</b>",
|
||||
$this->ipsclass->adskin->form_yes_no( 'bbcode_add_into_menu', ( isset($this->ipsclass->input['bbcode_add_into_menu']) AND $this->ipsclass->input['bbcode_add_into_menu'] ) ? $this->ipsclass->input['bbcode_add_into_menu'] : $bbcode['bbcode_add_into_menu'] )
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ââåäèòå òåêñò äëÿ 'option' </b><div style='color:gray'>Òåêñò äëÿ ïîìîùè â èñïîëüçîâàíèè ïîëÿ 'Option'. Îí áóäåò îòîáðàæàòüñÿ, êîãäà áóäåò âûáðàí òåã â ðåäàêòîðå.</div>",
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Enter 'option' dialogue text</b><div style='color:gray'>Help text to use above the 'Option' text field. This will appear when the tag is chosen from the 'Insert Special' menu.</div>",
|
||||
$this->ipsclass->adskin->form_simple_input( 'bbcode_menu_option_text', ( isset($this->ipsclass->input['bbcode_menu_option_text']) AND $this->ipsclass->input['bbcode_menu_option_text'] ) ? $this->ipsclass->input['bbcode_menu_option_text'] : $bbcode['bbcode_menu_option_text'], 50)
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ââåäèòå òåêñò äëÿ 'content' </b><div style='color:gray'>Òåêñò äëÿ ïîìîùè â èñïîëüçîâàíèè ïîëÿ 'Content'. Îí áóäåò îòîáðàæàòüñÿ, êîãäà áóäåò âûáðàí òåã â ðåäàêòîðå.</div>",
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Enter 'content' dialogue text</b><div style='color:gray'>Help text to use above the 'Content' text field. This will appear when the tag is chosen from the 'Insert Special' menu.</div>",
|
||||
$this->ipsclass->adskin->form_simple_input( 'bbcode_menu_content_text', ( isset($this->ipsclass->input['bbcode_menu_content_text']) AND $this->ipsclass->input['bbcode_menu_content_text'] ) ? $this->ipsclass->input['bbcode_menu_content_text'] : $bbcode['bbcode_menu_content_text'], 50)
|
||||
) );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form( $button );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
$this->ipsclass->html .= "<br /><div class='tableborder'><div class='tablerow1' style='padding:6px'><b>Äîïîëíèòåëüíàÿ èíôîðìàöèÿ </b><br />Âî âðåìÿ äîáàâëåíèÿ çàìåíû BB-êîäà, íå çàáóäüòå äîáàâèòü áëîê {content} òàì, ãäå ýòî òðåáóåòñÿ. <br />
|
||||
Åñëè âû èñïîëüçóåòå îïöèþ BB-êîäà [tag=option][/tag], íå çàáóäüòå äîáàâèòü áëîê {option} òàì, ãäå ýòî òðåáóåòñÿ â çàìåíå BB-êîäà. </div></div>";
|
||||
|
||||
|
||||
$this->ipsclass->html .= "<br /><div class='tableborder'><div class='tablerow1' style='padding:6px'><b>More Information</b><br />When adding the BBCode replacement, don't forget to add the {content} block where you wish the tag content to go when parsed.<br />
|
||||
If you are using an option <b>[tag=option][/tag]</b> tag, don't forget to add in {option} in the BBCode replacement where you want the option to go.</div></div>";
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// BBCODE Splash
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function bbcode_start()
|
||||
{
|
||||
$this->ipsclass->admin->page_detail = "Â ýòîé ñåêöèè âû ñìîæåòå ñîçäàòü íîâûå BB-êîäû, êîòîðûå â ïîñëåäñâèå ñìîãóò èñïîëüçîâàòü ïîëüçîâàòåëè âàøåãî ôîðóìà.";
|
||||
$this->ipsclass->admin->page_title = "Äîáàâëåíèå íîâîãî äîïîëíèòåëüíîãî BB-êîäà";
|
||||
|
||||
$this->ipsclass->admin->page_detail = "The BBCode manager allows you to add new custom BBCode.";
|
||||
$this->ipsclass->admin->page_title = "BBCode Manager";
|
||||
|
||||
//-----------------------------------------
|
||||
// Show the codes mahn!
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode', 'order' => 'bbcode_title' ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
$bbcode_rows = "";
|
||||
|
||||
|
||||
while ( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
if ( $row['bbcode_useoption'] )
|
||||
@@ -625,89 +623,67 @@ class ad_bbcode {
|
||||
{
|
||||
$option = '';
|
||||
}
|
||||
|
||||
|
||||
$row['bbcode_fulltag'] = '['.$row['bbcode_tag'].$option.']{content}[/'.$row['bbcode_tag'].']';
|
||||
|
||||
|
||||
$bbcode_rows .= $this->html->bbcode_row( $row );
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->html->bbcode_wrapper( $bbcode_rows );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'bbcode' ),
|
||||
2 => array( 'code' , 'bbcode_test' ),
|
||||
4 => array( 'section', $this->ipsclass->section_code ),
|
||||
) );
|
||||
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïðîâåðèòü BB-êîä" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Ââåäèòå â ïîëå BB-êîä",
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Test your custom BBCode" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Test your BBCode",
|
||||
$this->ipsclass->adskin->form_textarea( 'bbtest', isset($_POST['bbtest']) ? $_POST['bbtest'] : '' ),
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Íà÷àòü ïðîâåðêó");
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Run Test");
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// IMPORT: Start table
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// IMPORT: Start output
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'bbcode_import' ),
|
||||
2 => array( 'act' , 'bbcode' ),
|
||||
3 => array( 'MAX_FILE_SIZE', '10000000000' ),
|
||||
4 => array( 'section', $this->ipsclass->section_code ),
|
||||
) , "uploadform", " enctype='multipart/form-data'" );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Èìïîðòèðîâàíèå ñïèñêà BB-êîäîâ" );
|
||||
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Import a BBCode List" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
|
||||
"<b>Çàãðóçêà XML ñïèñêà BB-êîäîâ</b><div style='color:gray'>Âûáåðèòå íà âàøåì êîìïüþòåðå ôàéë «ipb_bbcode.xml». Äóáëèðîâàíèå [tag] íåâîçìîæíî — èìïîðòèðîâàòü íå óäàñòñÿ.</div>",
|
||||
"<b>Upload XML BBCode List</b><div style='color:gray'>Browse your computer for 'bbcode.xml' or 'bbcode.xml.gz'. Duplicate [tag] entries will not be imported.</div>",
|
||||
$this->ipsclass->adskin->form_upload( )
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Èìïîðòèðîâàòü");
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Import");
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
+1456
-1027
File diff suppressed because it is too large.
Load diff
+576
-532
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -2,25 +2,17 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-12-01 15:07:16 -0600 (Fri, 01 Dec 2006) $
|
||||
| > $Revision: 752 $
|
||||
| > $Date: 2007-01-16 17:59:04 -0500 (Tue, 16 Jan 2007) $
|
||||
| > $Revision: 830 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
@@ -36,7 +28,7 @@
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -49,109 +41,109 @@ class ad_emailerror
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "admin";
|
||||
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = "emailerror";
|
||||
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Æóðíàë îøèáîê ïðè ðàáîòå ñ ïî÷òîé' );
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Email Error Logs' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Make sure we're a root admin, or else!
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'])
|
||||
{
|
||||
//$this->ipsclass->admin->error("Èçâèíèòå, ýòà ôóíêöèÿ äîñòóïíà òîëüêî ãëàâíûì àäìèíèñòðàòîðàì.");
|
||||
//$this->ipsclass->admin->error("Sorry, these functions are for the root admin group only");
|
||||
}
|
||||
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
case 'list':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->list_current();
|
||||
break;
|
||||
|
||||
|
||||
case 'remove':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
|
||||
$this->remove_entries();
|
||||
break;
|
||||
|
||||
|
||||
case 'viewemail':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->view_email();
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
default:
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->list_current();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// View a single email.
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function view_email()
|
||||
{
|
||||
if ($this->ipsclass->input['id'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû íå óêàçàëè ID e-mail àäðåñà.");
|
||||
$this->ipsclass->admin->error("Could not resolve the email ID, please try again");
|
||||
}
|
||||
|
||||
|
||||
$id = intval($this->ipsclass->input['id']);
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'mail_error_logs', 'where' => "mlog_id=$id" ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
if ( ! $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$this->ipsclass->admin->error("Óêàçàííûé âàìè ID ($id) íå íàéäåí â áàçå äàííûõ.");
|
||||
$this->ipsclass->admin->error("Could not resolve the email ID, please try again ($id)");
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "100%" );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( $row['mlog_subject'] );
|
||||
|
||||
|
||||
$row['mlog_date'] = $this->ipsclass->admin->get_date( $row['mlog_date'], 'LONG' );
|
||||
$row['mlog_content'] = nl2br($row['mlog_content']);
|
||||
|
||||
$row['mlog_msg'] = $row['mlog_msg'] ? $row['mlog_msg'] : '<em>Íåò èíôîðìàöèè</em>';
|
||||
$row['mlog_code'] = $row['mlog_code'] ? $row['mlog_code'] : '<em>Íåò èíôîðìàöèè</em>';
|
||||
$row['mlog_smtp_error'] = $row['mlog_smtp_error'] ? $row['mlog_smtp_error'] : '<em>Íåò èíôîðìàöèè</em>';
|
||||
|
||||
|
||||
$row['mlog_msg'] = $row['mlog_msg'] ? $row['mlog_msg'] : '<em>No Info</em>';
|
||||
$row['mlog_code'] = $row['mlog_code'] ? $row['mlog_code'] : '<em>No Info</em>';
|
||||
$row['mlog_smtp_error'] = $row['mlog_smtp_error'] ? $row['mlog_smtp_error'] : '<em>No Info</em>';
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
|
||||
"<strong>Îò:</strong> <{$row['mlog_from']}>
|
||||
<br /><strong>Êîìó:</strong> <{$row['mlog_to']}>
|
||||
<br /><strong>Îòïðàâëåíî:</strong> {$row['mlog_date']}
|
||||
<br /><strong>Òåìà:</strong> {$row['mlog_subject']}
|
||||
"<strong>From:</strong> <{$row['mlog_from']}>
|
||||
<br /><strong>To:</strong> <{$row['mlog_to']}>
|
||||
<br /><strong>Sent:</strong> {$row['mlog_date']}
|
||||
<br /><strong>Subject:</strong> {$row['mlog_subject']}
|
||||
<hr />
|
||||
<br />{$row['mlog_content']}....
|
||||
<hr />
|
||||
<br />IPB ÎØÈÁÊÀ: {$row['mlog_msg']}
|
||||
<br />SMTP ÊÎÄ: {$row['mlog_code']}
|
||||
<br />SMTP ÎØÈÁÊÀ: {$row['mlog_smtp_error']}
|
||||
<br />IPB ERROR: {$row['mlog_msg']}
|
||||
<br />SMTP CODE: {$row['mlog_code']}
|
||||
<br />SMTP ERROR: {$row['mlog_smtp_error']}
|
||||
"
|
||||
) );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
$this->ipsclass->admin->print_popup();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove row(s)
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function remove_entries()
|
||||
{
|
||||
if ( $this->ipsclass->input['type'] == 'all' )
|
||||
@@ -161,7 +153,7 @@ class ad_emailerror
|
||||
else
|
||||
{
|
||||
$ids = array();
|
||||
|
||||
|
||||
foreach ($this->ipsclass->input as $k => $v)
|
||||
{
|
||||
if ( preg_match( "/^id_(\d+)$/", $k, $match ) )
|
||||
@@ -172,57 +164,57 @@ class ad_emailerror
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$ids = $this->ipsclass->clean_int_array( $ids );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( count($ids) < 1 )
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü êàê ìèíèìóì îäíó çàïèñü äëÿ óäàëåíèÿ.");
|
||||
$this->ipsclass->admin->error("You did not select any email log entries to approve or delete");
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'mail_error_logs', 'where' => "mlog_id IN (".implode(',', $ids ).")" ) );
|
||||
}
|
||||
|
||||
$this->ipsclass->admin->save_log("Æóðíàë e-mail îøèáîê î÷èùåí");
|
||||
|
||||
|
||||
$this->ipsclass->admin->save_log("Removed email error log entries");
|
||||
|
||||
$this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}");
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// SHOW EMAIL ERROR LOGS
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function list_current()
|
||||
{
|
||||
$this->ipsclass->html .= ""; // removed js popwin
|
||||
|
||||
|
||||
$form_array = array();
|
||||
|
||||
|
||||
$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Æóðíàë ñîõðàíåííûõ e-mail îøèáîê";
|
||||
$this->ipsclass->admin->page_title = "Óïðàâëåíèå æóðíàëîì e-mail îøèáîê";
|
||||
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Stored email error logs";
|
||||
$this->ipsclass->admin->page_title = "Email Error Logs Manager";
|
||||
|
||||
//-----------------------------------------
|
||||
// Check URL parameters
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$url_query = array();
|
||||
$db_query = array();
|
||||
|
||||
|
||||
if ( isset($this->ipsclass->input['type']) AND $this->ipsclass->input['type'] != "" )
|
||||
{
|
||||
$this->ipsclass->admin->page_title .= " (Ðåçóëüòàòû ïîèñêà)";
|
||||
|
||||
$this->ipsclass->admin->page_title .= " (Search Results)";
|
||||
|
||||
switch( $this->ipsclass->input['type'] )
|
||||
{
|
||||
case 'subject':
|
||||
$string = urldecode($this->ipsclass->input['string']);
|
||||
if ( $string == "" )
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
|
||||
$this->ipsclass->admin->error("You must enter something to search by");
|
||||
}
|
||||
$url_query[] = 'type='.$this->ipsclass->input['type'];
|
||||
$url_query[] = 'string='.urlencode($string);
|
||||
@@ -232,7 +224,7 @@ class ad_emailerror
|
||||
$string = urldecode($this->ipsclass->input['string']);
|
||||
if ( $string == "" )
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
|
||||
$this->ipsclass->admin->error("You must enter something to search by");
|
||||
}
|
||||
$url_query[] = 'type='.$this->ipsclass->input['type'];
|
||||
$url_query[] = 'string='.urlencode($string);
|
||||
@@ -242,7 +234,7 @@ class ad_emailerror
|
||||
$string = urldecode($this->ipsclass->input['string']);
|
||||
if ( $string == "" )
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
|
||||
$this->ipsclass->admin->error("You must enter something to search by");
|
||||
}
|
||||
$url_query[] = 'type='.$this->ipsclass->input['type'];
|
||||
$url_query[] = 'string='.urlencode($string);
|
||||
@@ -252,13 +244,13 @@ class ad_emailerror
|
||||
$string = urldecode($this->ipsclass->input['string']);
|
||||
if ( $string == "" )
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
|
||||
$this->ipsclass->admin->error("You must enter something to search by");
|
||||
}
|
||||
$url_query[] = 'type='.$this->ipsclass->input['type'];
|
||||
$url_query[] = 'string='.urlencode($string);
|
||||
$db_query[] = $this->ipsclass->input['match'] == 'loose' ? "mlog_msg LIKE '%{$string}%' or mlog_smtp_msg LIKE '%{$string}%'" : "mlog_msg='{$string} or mlog_smtp_msg='{$string}'";
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
//
|
||||
break;
|
||||
@@ -268,48 +260,48 @@ class ad_emailerror
|
||||
//-----------------------------------------
|
||||
// LIST 'EM
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$dbe = "";
|
||||
$url = "";
|
||||
|
||||
|
||||
if ( count($db_query) > 0 )
|
||||
{
|
||||
$dbe = implode(' AND ', $db_query );
|
||||
}
|
||||
|
||||
|
||||
if ( count($url_query) > 0 )
|
||||
{
|
||||
$url = '&'.implode( '&', $url_query);
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'count(*) as cnt', 'from' => 'mail_error_logs', 'where' => $dbe ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
$count = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
|
||||
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $count['cnt'],
|
||||
'PER_PAGE' => 25,
|
||||
'CUR_ST_VAL' => $start,
|
||||
'L_SINGLE' => "Îäíà ñòðàíèöà",
|
||||
'L_MULTI' => "Ñòðàíèöû: ",
|
||||
'L_SINGLE' => "Single Page",
|
||||
'L_MULTI' => "Pages: ",
|
||||
'BASE_URL' => $this->ipsclass->base_url."&{$this->ipsclass->form_code}".$url,
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'mail_error_logs', 'where' => $dbe, 'order' => 'mlog_date DESC', 'limit' => array( $start, 25 ) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
$this->ipsclass->html .= "<script type='text/javascript'>
|
||||
function checkall( )
|
||||
{
|
||||
var formobj = document.getElementById('theAdminForm');
|
||||
var checkboxes = formobj.getElementsByTagName('input');
|
||||
|
||||
|
||||
for ( var i = 0 ; i <= checkboxes.length ; i++ )
|
||||
{
|
||||
var e = checkboxes[i];
|
||||
var docheck = formobj.checkme.checked;
|
||||
|
||||
|
||||
if ( e && (e.type == 'checkbox') && (! e.disabled) && (e.id != 'checkme') && (e.name != 'type') )
|
||||
{
|
||||
if( docheck == false )
|
||||
@@ -322,101 +314,101 @@ class ad_emailerror
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
</script>";
|
||||
|
||||
</script>";
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'remove' ),
|
||||
2 => array( 'act' , 'emailerror' ),
|
||||
3 => array( 'section', $this->ipsclass->section_code ),
|
||||
) );
|
||||
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "<input type='checkbox' onclick='checkall();' id='checkme' />" , "1%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Êîìó" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Òåìà" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Îøèáêà" , "30%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Âåðìÿ" , "20%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ñïèñîê íåîòïðàâëåííûõ ïèñåì" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "To" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Subject" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Error MSG" , "30%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Date" , "20%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Logged Emails Errors" );
|
||||
|
||||
if ( $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
while ( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$row['mlog_date'] = $this->ipsclass->admin->get_date( $row['mlog_date'], 'SHORT' );
|
||||
|
||||
|
||||
$row['mlog_subject'] = ( strpos( $row['mlog_subject'], "=?{$this->ipsclass->vars['gb_char_set']}?Q?" ) !== FALSE ) ?
|
||||
str_replace( "=?{$this->ipsclass->vars['gb_char_set']}?Q?", "", str_replace( "?=", "", preg_replace_callback( '/=([A-F0-9]{2})/', create_function( '$match', 'return chr( hexdec( "$match[1]" ) );' ), $row['mlog_subject'] ) ) )
|
||||
//base64_decode( str_replace( "=?utf-8?B?", "", str_replace( "=?=", "", str_replace( "=20", "", $row['mlog_subject'] ) ) ) )
|
||||
: $row['mlog_subject'];
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
|
||||
"<center><input type='checkbox' class='checkbox' name='id_{$row['mlog_id']}' value='1' /></center>",
|
||||
'<b>'.$row['mlog_to'].'</b>',
|
||||
"<a href='javascript:pop_win(\"&{$this->ipsclass->form_code_js}&code=viewemail&id={$row['mlog_id']}\", \"{$row['mlog_id']}\",400,350)' title='×èòàòü ïèñüìî'>".$row['mlog_subject']."</a>",
|
||||
"<a href='javascript:pop_win(\"&{$this->ipsclass->form_code_js}&code=viewemail&id={$row['mlog_id']}\", \"{$row['mlog_id']}\",400,350)' title='Read email'>".$row['mlog_subject']."</a>",
|
||||
$row['mlog_msg'].'<br />'.$row['mlog_code']. ' '.$row['mlog_smtp_msg'],
|
||||
$row['mlog_date'],
|
||||
) );
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Çàïèñåé íå íàéäåíî.</center>");
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>No results</center>");
|
||||
}
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic('<div style="float:left;width:auto"><input type="submit" value="Óäàëèòü âûáðàííûå" class="realbutton" /> <input type="checkbox" id="checkbox" name="type" value="all" /> Óäàëèòü âñå?</div><div align="right">'.$links.'</div></form>', 'left', 'tablesubheader');
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic('<div style="float:left;width:auto"><input type="submit" value="Remove Checked" class="realbutton" /> <input type="checkbox" id="checkbox" name="type" value="all" /> Remove all?</div><div align="right">'.$links.'</div></form>', 'left', 'tablesubheader');
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'list' ),
|
||||
2 => array( 'act' , 'emailerror' ),
|
||||
3 => array( 'section', $this->ipsclass->section_code ),
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîèñê çàïèñåé îøèáîê" );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Email Error Logs" );
|
||||
|
||||
$form_array = array(
|
||||
0 => array( 'subject' , 'Òåìà ïèñüìà' ),
|
||||
2 => array( 'email_from' , 'Îò (E-mail)' ),
|
||||
3 => array( 'email_to' , 'Êîìó (E-mail)' ),
|
||||
4 => array( 'error' , 'Ñîîáùåíèå îá îøèáêå' ),
|
||||
0 => array( 'subject' , 'Email Subject' ),
|
||||
2 => array( 'email_from' , 'From Email Address' ),
|
||||
3 => array( 'email_to' , 'To Email Address' ),
|
||||
4 => array( 'error' , 'Error Message' ),
|
||||
);
|
||||
|
||||
|
||||
$type_array = array(
|
||||
0 => array( 'exact' , 'ñîâïàäåíèå' ),
|
||||
1 => array( 'loose' , 'ñîäåðæèò' ),
|
||||
0 => array( 'exact' , 'is exactly' ),
|
||||
1 => array( 'loose' , 'contains' ),
|
||||
);
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ïîèñê â</b> "
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Search where</b> "
|
||||
. $this->ipsclass->adskin->form_dropdown( "type" , $form_array, isset($_POST['type']) ? $_POST['type'] : '' ) ." "
|
||||
. $this->ipsclass->adskin->form_dropdown( "match", $type_array, isset($_POST['match']) ? $_POST['match'] : '') ." "
|
||||
. $this->ipsclass->adskin->form_input( "string", isset($_POST['string']) ? $_POST['string'] : '' ),
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Íàéòè");
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search");
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,24 +2,16 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
|
||||
| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
@@ -36,7 +28,7 @@
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -52,7 +44,7 @@ class ad_emaillogs
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "admin";
|
||||
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
@@ -62,92 +54,92 @@ class ad_emaillogs
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Æóðíàë e-mail îòïðàâëåíèé' );
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Email Logs' );
|
||||
|
||||
// Make sure we're a root admin, or else!
|
||||
|
||||
|
||||
if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'])
|
||||
{
|
||||
//$this->ipsclass->admin->error("Èçâèíèòå, ýòà ôóíêöèÿ äîñòóïíà òîëüêî ãëàâíûì àäìèíèñòðàòîðàì.");
|
||||
//$this->ipsclass->admin->error("Sorry, these functions are for the root admin group only");
|
||||
}
|
||||
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
case 'list':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->list_current();
|
||||
break;
|
||||
|
||||
|
||||
case 'remove':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
|
||||
$this->remove_entries();
|
||||
break;
|
||||
|
||||
|
||||
case 'viewemail':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->view_email();
|
||||
break;
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
default:
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->list_current();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// View a single email.
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function view_email()
|
||||
{
|
||||
if ($this->ipsclass->input['id'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Íåâîçìîæíî îïðåäåëèòü ID àäðåñà email, âåðíèòåñü è ïîïðîáóéòå åùå ðàç");
|
||||
$this->ipsclass->admin->error("Could not resolve the email ID, please try again");
|
||||
}
|
||||
|
||||
|
||||
$id = intval($this->ipsclass->input['id']);
|
||||
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'emaillogs_view_email', array( 'id' => $id ) );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
|
||||
if ( ! $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$this->ipsclass->admin->error("Íåâîçìîæíî îïðåäåëèòü ID àäðåñà email, âåðíèòåñü è ïîïðîáóéòå åùå ðàç ($id)");
|
||||
$this->ipsclass->admin->error("Could not resolve the email ID, please try again ($id)");
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "100%" );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( $row['email_subject'] );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$row['email_date'] = $this->ipsclass->admin->get_date( $row['email_date'], 'LONG' );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
|
||||
"<strong>Îò:</strong> {$row['name']} <{$row['from_email_address']}>
|
||||
<br /><strong>Êîìó:</strong> {$row['to_name']} <{$row['to_email_address']}>
|
||||
<br /><strong>Îòïðàâëåíî:</strong> {$row['email_date']}
|
||||
<br /><strong>IP-àäðåñ:</strong> {$row['from_ip_address']}
|
||||
<br /><strong>Òåìà:</strong> {$row['email_subject']}
|
||||
"<strong>From:</strong> {$row['name']} <{$row['from_email_address']}>
|
||||
<br /><strong>To:</strong> {$row['to_name']} <{$row['to_email_address']}>
|
||||
<br /><strong>Sent:</strong> {$row['email_date']}
|
||||
<br /><strong>From IP:</strong> {$row['from_ip_address']}
|
||||
<br /><strong>Subject:</strong> {$row['email_subject']}
|
||||
<hr>
|
||||
<br />{$row['email_content']}
|
||||
"
|
||||
) );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
$this->ipsclass->admin->print_popup();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove row(s)
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function remove_entries()
|
||||
{
|
||||
if ( $this->ipsclass->input['type'] == 'all' )
|
||||
@@ -157,7 +149,7 @@ class ad_emaillogs
|
||||
else
|
||||
{
|
||||
$ids = array();
|
||||
|
||||
|
||||
foreach ($this->ipsclass->input as $k => $v)
|
||||
{
|
||||
if ( preg_match( "/^id_(\d+)$/", $k, $match ) )
|
||||
@@ -168,57 +160,57 @@ class ad_emaillogs
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$ids = $this->ipsclass->clean_int_array( $ids );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( count($ids) < 1 )
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü õîòü îäíó çàïèñü èç æóðíàëà äëÿ óäàëåíèÿ");
|
||||
$this->ipsclass->admin->error("You did not select any email log entries to approve or delete");
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'email_logs', 'where' => " email_id IN (".implode(',', $ids ).")" ) );
|
||||
}
|
||||
|
||||
$this->ipsclass->admin->save_log("Óäàëåíû çàïèñè èç æóðíàëà e-mail îòïðàâëåíèé");
|
||||
|
||||
|
||||
$this->ipsclass->admin->save_log("Removed email log entries");
|
||||
|
||||
$this->ipsclass->boink_it($this->ipsclass->base_url."&act=emaillog");
|
||||
exit();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// SHOW ALL LANGUAGE PACKS
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function list_current()
|
||||
{
|
||||
$this->ipsclass->html .= ""; // removed js popwin
|
||||
|
||||
|
||||
$form_array = array();
|
||||
|
||||
|
||||
$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Ñîõðàíåííûå çàïèñè æóðíàëà e-mail îòïðàâëåíèé";
|
||||
$this->ipsclass->admin->page_title = "Óïðàâëåíèå æóðíàëîì e-mail îòïðàâëåíèé";
|
||||
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Stored email logs";
|
||||
$this->ipsclass->admin->page_title = "Email Logs Manager";
|
||||
|
||||
//-----------------------------------------
|
||||
// Check URL parameters
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$url_query = array();
|
||||
$db_query = array();
|
||||
|
||||
|
||||
if ( isset($this->ipsclass->input['type']) AND $this->ipsclass->input['type'] != "" )
|
||||
{
|
||||
$this->ipsclass->admin->page_title .= " (Ðåçóëüòàòû ïîèñêà)";
|
||||
|
||||
$this->ipsclass->admin->page_title .= " (Search Results)";
|
||||
|
||||
switch( $this->ipsclass->input['type'] )
|
||||
{
|
||||
case 'fromid':
|
||||
@@ -235,7 +227,7 @@ class ad_emaillogs
|
||||
$string = urldecode($this->ipsclass->input['string']);
|
||||
if ( $string == "" )
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
|
||||
$this->ipsclass->admin->error("You must enter something to search by");
|
||||
}
|
||||
$url_query[] = 'type='.$this->ipsclass->input['type'];
|
||||
$url_query[] = 'string='.urlencode($string);
|
||||
@@ -245,7 +237,7 @@ class ad_emaillogs
|
||||
$string = urldecode($this->ipsclass->input['string']);
|
||||
if ( $string == "" )
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
|
||||
$this->ipsclass->admin->error("You must enter something to search by");
|
||||
}
|
||||
$url_query[] = 'type='.$this->ipsclass->input['type'];
|
||||
$url_query[] = 'string='.urlencode($string);
|
||||
@@ -255,7 +247,7 @@ class ad_emaillogs
|
||||
$string = urldecode($this->ipsclass->input['string']);
|
||||
if ( $string == "" )
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
|
||||
$this->ipsclass->admin->error("You must enter something to search by");
|
||||
}
|
||||
$url_query[] = 'type='.$this->ipsclass->input['type'];
|
||||
$url_query[] = 'string='.urlencode($string);
|
||||
@@ -265,7 +257,7 @@ class ad_emaillogs
|
||||
$string = urldecode($this->ipsclass->input['string']);
|
||||
if ( $string == "" )
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
|
||||
$this->ipsclass->admin->error("You must enter something to search by");
|
||||
}
|
||||
$url_query[] = 'type='.$this->ipsclass->input['type'];
|
||||
$url_query[] = 'string='.urlencode($string);
|
||||
@@ -275,43 +267,43 @@ class ad_emaillogs
|
||||
$string = urldecode($this->ipsclass->input['string']);
|
||||
if ( $string == "" )
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
|
||||
$this->ipsclass->admin->error("You must enter something to search by");
|
||||
}
|
||||
|
||||
|
||||
if ( $this->ipsclass->input['match'] == 'loose' )
|
||||
{
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'id,name', 'from' => 'members', 'where' => "name LIKE '%{$string}%'" ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
if ( ! $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
$this->ipsclass->admin->error("Íå íàéäåíî íèêàêèõ çàïèñåé, ñîîòâåòñòâóþùèõ çàïðîñó â æóðíàëå e-mail îòïðàâëåíèé");
|
||||
$this->ipsclass->admin->error("No matches found in the email logs");
|
||||
}
|
||||
|
||||
|
||||
$ids = array();
|
||||
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$ids[] = $r['id'];
|
||||
}
|
||||
|
||||
|
||||
$db_query[] = 'email.from_member_id IN('.implode( ',', $ids ).')';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'id,name', 'from' => 'members', 'where' => "name='{$string}'" ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
if ( ! $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
$this->ipsclass->admin->error("Íå íàéäåíî íèêàêèõ çàïèñåé, ñîîòâåòñòâóþùèõ çàïðîñó â æóðíàëå e-mail îòïðàâëåíèé");
|
||||
$this->ipsclass->admin->error("No matches found in the email logs");
|
||||
}
|
||||
|
||||
|
||||
$r = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
|
||||
$db_query[] = 'email.from_member_id IN('.$r['id'].')';
|
||||
}
|
||||
|
||||
|
||||
$url_query[] = 'type='.$this->ipsclass->input['type'];
|
||||
$url_query[] = 'string='.urlencode($string);
|
||||
break;
|
||||
@@ -319,43 +311,43 @@ class ad_emaillogs
|
||||
$string = urldecode($this->ipsclass->input['string']);
|
||||
if ( $string == "" )
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
|
||||
$this->ipsclass->admin->error("You must enter something to search by");
|
||||
}
|
||||
|
||||
|
||||
if ( $this->ipsclass->input['match'] == 'loose' )
|
||||
{
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'id,name', 'from' => 'members', 'where' => "name LIKE '%{$string}%'" ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
if ( ! $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
$this->ipsclass->admin->error("Íå íàéäåíî íèêàêèõ çàïèñåé, ñîîòâåòñòâóþùèõ çàïðîñó â æóðíàëå e-mail îòïðàâëåíèé");
|
||||
$this->ipsclass->admin->error("No matches found in the email logs");
|
||||
}
|
||||
|
||||
|
||||
$ids = array();
|
||||
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$ids[] = $r['id'];
|
||||
}
|
||||
|
||||
|
||||
$db_query[] = 'email.to_member_id IN('.implode( ',', $ids ).')';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'id,name', 'from' => 'members', 'where' => "name='{$string}'" ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
if ( ! $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
$this->ipsclass->admin->error("Íå íàéäåíî íèêàêèõ çàïèñåé, ñîîòâåòñòâóþùèõ çàïðîñó â æóðíàëå e-mail îòïðàâëåíèé");
|
||||
$this->ipsclass->admin->error("No matches found in the email logs");
|
||||
}
|
||||
|
||||
|
||||
$r = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
|
||||
$db_query[] = 'email.to_member_id IN('.$r['id'].')';
|
||||
}
|
||||
|
||||
|
||||
$url_query[] = 'type='.$this->ipsclass->input['type'];
|
||||
$url_query[] = 'string='.urlencode($string);
|
||||
break;
|
||||
@@ -364,41 +356,41 @@ class ad_emaillogs
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if( isset($this->ipsclass->input['match']) )
|
||||
{
|
||||
$url_query[] = 'match='.$this->ipsclass->input['match'];
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// LIST 'EM
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$dbe = "";
|
||||
$url = "";
|
||||
|
||||
|
||||
if ( count($db_query) > 0 )
|
||||
{
|
||||
$dbe = implode(' AND ', $db_query );
|
||||
}
|
||||
|
||||
|
||||
if ( count($url_query) > 0 )
|
||||
{
|
||||
$url = '&'.implode( '&', $url_query);
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'count(email.email_id) as cnt',
|
||||
'from' => 'email_logs email',
|
||||
'where' => $dbe ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
$count = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
|
||||
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $count['cnt'],
|
||||
'PER_PAGE' => 25,
|
||||
'CUR_ST_VAL' => $start,
|
||||
'L_SINGLE' => "Îäíà ñòðàíèöà",
|
||||
'L_MULTI' => "Ñòðàíèöû: ",
|
||||
'L_SINGLE' => "Single Page",
|
||||
'L_MULTI' => "Pages: ",
|
||||
'BASE_URL' => $this->ipsclass->base_url."&{$this->ipsclass->form_code}".$url,
|
||||
)
|
||||
);
|
||||
@@ -406,21 +398,21 @@ class ad_emaillogs
|
||||
{
|
||||
$dbe = 'WHERE '.$dbe;
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'emaillogs_list_current', array( 'dbe' => $dbe, 'limit_a' => $start ) );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
|
||||
$this->ipsclass->html .= "<script type='text/javascript'>
|
||||
function checkall( )
|
||||
{
|
||||
var formobj = document.getElementById('theAdminForm');
|
||||
var checkboxes = formobj.getElementsByTagName('input');
|
||||
|
||||
|
||||
for ( var i = 0 ; i <= checkboxes.length ; i++ )
|
||||
{
|
||||
var e = checkboxes[i];
|
||||
var docheck = formobj.checkme.checked;
|
||||
|
||||
|
||||
if ( e && (e.type == 'checkbox') && (! e.disabled) && (e.id != 'checkme') && (e.name != 'type') )
|
||||
{
|
||||
if( docheck == false )
|
||||
@@ -433,100 +425,100 @@ class ad_emaillogs
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
</script>";
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'remove' ),
|
||||
2 => array( 'act' , 'emaillog' ),
|
||||
3 => array( 'section', $this->ipsclass->section_code ),
|
||||
) );
|
||||
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "<input type='checkbox' onclick='checkall();' id='checkme' />" , "5%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Îò" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Òåìà" , "30%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Êîìó" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Äàòà" , "25%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ñïèñîê îòïðàâëåííûõ ïèñåì" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "From Member" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Subject" , "30%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "To Member" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Sent Time" , "25%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Logged Emails" );
|
||||
|
||||
if ( $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
while ( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
|
||||
|
||||
$row['email_date'] = $this->ipsclass->admin->get_date( $row['email_date'], 'SHORT' );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
|
||||
"<center><input type='checkbox' class='checkbox' name='id_{$row['email_id']}' value='1' /></center>",
|
||||
"<a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=list&type=fromid&id={$row['id']}' title='Ïîêàçàòü âñå îòïðàâëåííûå ïèñüìà'><img src='{$this->ipsclass->skin_acp_url}/images/acp_search.gif' border='0' alt='..by id'></a> <b><a href='{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}?showuser={$row['id']}' title='Ïðîôèëü ïîëüçîâàòåëÿ (îòêðîåòñÿ â íîâîì îêíå)' target='blank'>{$row['name']}</a></b>",
|
||||
"<a href='javascript:pop_win(\"&{$this->ipsclass->form_code_js}&code=viewemail&id={$row['email_id']}\",\"Log\",400,400)' title='Ïðî÷èòàòü ïèñüìî'>{$row['email_subject']}</a>",
|
||||
"<a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=list&type=toid&id={$row['to_id']}' title='Ïîêàçàòü âñå ïîëó÷åííûå ïèñüìà'><img src='{$this->ipsclass->skin_acp_url}/images/acp_search.gif' border='0' alt='..by id'></a> <a href='{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}?showuser={$row['to_id']}' title='Ïðîôèëü ïîëüçîâàòåëÿ (îòêðîåòñÿ â íîâîì îêíå)' target='blank'>{$row['to_name']}</a>",
|
||||
"<a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=list&type=fromid&id={$row['id']}' title='Show all from this member'><img src='{$this->ipsclass->skin_acp_url}/images/acp_search.gif' border='0' alt='..by id'></a> <b><a href='{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}?showuser={$row['id']}' title='Members profile (new window)' target='blank'>{$row['name']}</a></b>",
|
||||
"<a href='javascript:pop_win(\"&{$this->ipsclass->form_code_js}&code=viewemail&id={$row['email_id']}\",\"Log\",400,400)' title='Read email'>{$row['email_subject']}</a>",
|
||||
"<a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=list&type=toid&id={$row['to_id']}' title='Show all sent to this member'><img src='{$this->ipsclass->skin_acp_url}/images/acp_search.gif' border='0' alt='..by id'></a> <a href='{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}?showuser={$row['to_id']}' title='Members profile (new window)' target='blank'>{$row['to_name']}</a>",
|
||||
"{$row['email_date']}",
|
||||
) );
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Çàïèñåé íå íàéäåíî.</center>");
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>No results</center>");
|
||||
}
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic('<div style="float:left;width:auto"><input type="submit" value="Óäàëèòü îòìå÷åííûå" class="realbutton" /> <input type="checkbox" id="checkbox" name="type" value="all" /> Óäàëèòü âñå?</div><div align="right">'.$links.'</div></form>', 'left', 'tablesubheader');
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic('<div style="float:left;width:auto"><input type="submit" value="Remove Checked" class="realbutton" /> <input type="checkbox" id="checkbox" name="type" value="all" /> Remove all?</div><div align="right">'.$links.'</div></form>', 'left', 'tablesubheader');
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'list' ),
|
||||
2 => array( 'act' , 'emaillog' ),
|
||||
3 => array( 'section', $this->ipsclass->section_code ),
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîèñê çàïèñåé" );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Email Logs" );
|
||||
|
||||
$form_array = array(
|
||||
0 => array( 'subject' , 'Òåìà ïèñüìà' ),
|
||||
1 => array( 'content' , 'Ñîäåðæèìîå' ),
|
||||
2 => array( 'email_from' , 'Îò (E-mail)' ),
|
||||
3 => array( 'email_to' , 'Êîìó (E-mail)' ),
|
||||
4 => array( 'name_from' , 'Îò (èìÿ ïîëüçîâàòåëÿ)'),
|
||||
5 => array( 'name_to' , 'Êîìó (èìÿ ïîëüçîâàòåëÿ)' ),
|
||||
0 => array( 'subject' , 'Email Subject' ),
|
||||
1 => array( 'content' , 'Email Body' ),
|
||||
2 => array( 'email_from' , 'From Email Address' ),
|
||||
3 => array( 'email_to' , 'To Email Address' ),
|
||||
4 => array( 'name_from' , 'From Member Name'),
|
||||
5 => array( 'name_to' , 'To Member Name' ),
|
||||
);
|
||||
|
||||
|
||||
$type_array = array(
|
||||
0 => array( 'exact' , 'ñîâïàäåíèå' ),
|
||||
1 => array( 'loose' , 'ñîäåðæèò' ),
|
||||
0 => array( 'exact' , 'is exactly' ),
|
||||
1 => array( 'loose' , 'contains' ),
|
||||
);
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ïîèñê â</b> "
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Search where</b> "
|
||||
. $this->ipsclass->adskin->form_dropdown( "type", $form_array) ." "
|
||||
. $this->ipsclass->adskin->form_dropdown( "match", $type_array) ." "
|
||||
. $this->ipsclass->adskin->form_input( "string"),
|
||||
|
||||
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Èñêàòü");
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search");
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,10 +1 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />
|
||||
<meta name="author" content="Êîìïàíèÿ IBResource è Invision Power Services Inc.">
|
||||
<title>Îøèáêà ðóññêîé âåðñèè Invision Power Board</title>
|
||||
</head><body>
|
||||
<h1>Îøèáêà <a href="http://www.ibresource.ru/">ðóññêîé âåðñèè Invision Power Board</a></h1>
|
||||
<font size="4">Âû ïîïàëè íà íåñóùåñòâóþùóþ ñòðàíèöó!<br>Ïîæàëóéñòà íàæìèòå íà êíîïî÷êó «<b>Íàçàä</b>» â âàøåì áðàóçåðå äëÿ âîçâðàùåíèÿ íà ïðåäûäóùóþ ñòðàíèöó.</font>
|
||||
</body>
|
||||
</html>
|
||||
<html>␍<head><title>Invision Power Board - Bulletin Board System</title></head>␍<body>␍<h1>403: Invision Power Board -> Forbidden</h1>␍<hr>␍You have reached this Page in error, please use␍your back button to return to Invision Board.␍<hr>␍<a href="http://anonym.to/http://www.invisionboard.com/">Invision Power Board</a>␍</body>␍</html>
|
||||
+124
-132
@@ -1,133 +1,125 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > IPS Remote Call thingy
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 17th October 2002
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
| > DBA Checked: Tue 25th May 2004
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
class ad_ips {
|
||||
|
||||
var $base_url;
|
||||
|
||||
var $colours = array();
|
||||
|
||||
var $url = "http://www.invisionboard.com/acp/";
|
||||
|
||||
var $version = "1.1";
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
|
||||
case 'news':
|
||||
$this->news();
|
||||
break;
|
||||
|
||||
case 'updates':
|
||||
$this->updates();
|
||||
break;
|
||||
|
||||
case 'docs':
|
||||
$this->docs();
|
||||
break;
|
||||
|
||||
case 'support':
|
||||
$this->support();
|
||||
break;
|
||||
|
||||
case 'host':
|
||||
$this->host();
|
||||
break;
|
||||
|
||||
case 'purchase':
|
||||
$this->purchase();
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
default:
|
||||
exit();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function news()
|
||||
{
|
||||
@header("Location: ".$this->url."?news");
|
||||
exit();
|
||||
}
|
||||
|
||||
function updates()
|
||||
{
|
||||
//@header("Location: ".$this->url."?updates&version=".$this->version);
|
||||
@header("Location: ".$this->url."?updates");
|
||||
exit();
|
||||
}
|
||||
|
||||
function docs()
|
||||
{
|
||||
@header("Location: http://www.invisionpower.com/documentation/showdoc.php");
|
||||
exit();
|
||||
}
|
||||
|
||||
function support()
|
||||
{
|
||||
@header("Location: ".$this->url."?support");
|
||||
exit();
|
||||
}
|
||||
|
||||
function host()
|
||||
{
|
||||
@header("Location: ".$this->url."?host");
|
||||
exit();
|
||||
}
|
||||
|
||||
function purchase()
|
||||
{
|
||||
@header("Location: ".$this->url."?purchase");
|
||||
exit();
|
||||
}
|
||||
}
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > IPS Remote Call thingy
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 17th October 2002
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
| > DBA Checked: Tue 25th May 2004
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
class ad_ips {
|
||||
|
||||
var $base_url;
|
||||
|
||||
var $colours = array();
|
||||
|
||||
var $url = "http://anonym.to/http://www.invisionboard.com/acp/";
|
||||
|
||||
var $version = "1.1";
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
|
||||
case 'news':
|
||||
$this->news();
|
||||
break;
|
||||
|
||||
case 'updates':
|
||||
$this->updates();
|
||||
break;
|
||||
|
||||
case 'docs':
|
||||
$this->docs();
|
||||
break;
|
||||
|
||||
case 'support':
|
||||
$this->support();
|
||||
break;
|
||||
|
||||
case 'host':
|
||||
$this->host();
|
||||
break;
|
||||
|
||||
case 'purchase':
|
||||
$this->purchase();
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
default:
|
||||
exit();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function news()
|
||||
{
|
||||
@header("Location: ".$this->url."?news");
|
||||
exit();
|
||||
}
|
||||
|
||||
function updates()
|
||||
{
|
||||
//@header("Location: ".$this->url."?updates&version=".$this->version);
|
||||
@header("Location: ".$this->url."?updates");
|
||||
exit();
|
||||
}
|
||||
|
||||
function docs()
|
||||
{
|
||||
@header("Location: http://anonym.to/http://www.invisionpower.com/documentation/showdoc.php");
|
||||
exit();
|
||||
}
|
||||
|
||||
function support()
|
||||
{
|
||||
@header("Location: ".$this->url."?support");
|
||||
exit();
|
||||
}
|
||||
|
||||
function host()
|
||||
{
|
||||
@header("Location: ".$this->url."?host");
|
||||
exit();
|
||||
}
|
||||
|
||||
function purchase()
|
||||
{
|
||||
@header("Location: ".$this->url."?purchase");
|
||||
exit();
|
||||
}
|
||||
}
|
||||
?>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,367 +1,372 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Help Control functions
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 2nd April 2002
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
| > DBA Checked: Mon 24th May 2004
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
class ad_login
|
||||
{
|
||||
# Global
|
||||
var $ipsclass;
|
||||
|
||||
# HTML
|
||||
var $html;
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// What to do?
|
||||
//-----------------------------------------
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
case 'login':
|
||||
$this->login_form();
|
||||
break;
|
||||
case 'login-out':
|
||||
// Do we have a session?
|
||||
$sess_cookie = $this->ipsclass->my_getcookie( "ipb_admin_session_id" );
|
||||
|
||||
if( $sess_cookie )
|
||||
{
|
||||
$this->ipsclass->DB->do_delete( "admin_sessions", "session_id='{$sess_cookie}'" );
|
||||
}
|
||||
|
||||
$this->ipsclass->my_setcookie("ipb_admin_session_id", "-1", -1);
|
||||
$this->login_form();
|
||||
break;
|
||||
|
||||
case 'login-complete':
|
||||
$this->login_complete();
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->login_form();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Complete the log in
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function login_complete()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$username = str_replace( '|', '|', $this->ipsclass->input['username'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( empty($this->ipsclass->input['username']) )
|
||||
{
|
||||
$this->login_form("Âû äîëæíû ââåñòè èìÿ ïîëüçîâàòåëÿ ïåðåä òåì, êàê ïðîäîëæèòü");
|
||||
}
|
||||
|
||||
if ( empty($this->ipsclass->input['password']) )
|
||||
{
|
||||
$this->login_form("Âû äîëæíû ââåñòè ïàðîëü ïåðåä òåì, êàê ïðîäîëæèòü");
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load handler...
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( ROOT_PATH.'sources/handlers/han_login.php' );
|
||||
$this->han_login = new han_login();
|
||||
$this->han_login->ipsclass =& $this->ipsclass;
|
||||
$this->han_login->is_admin_auth = 1;
|
||||
$this->han_login->init();
|
||||
|
||||
//-----------------------------------------
|
||||
// Check auth
|
||||
//-----------------------------------------
|
||||
|
||||
$this->han_login->login_authenticate( $username, $this->ipsclass->input['password'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check return code...
|
||||
//-----------------------------------------
|
||||
|
||||
$mem = $this->han_login->member;
|
||||
|
||||
if ( ( ! $mem['id'] ) or ( $this->han_login->return_code == 'NO_USER' ) )
|
||||
{
|
||||
$this->write_to_log( $this->ipsclass->input['username'], 'fail' );
|
||||
$this->login_form( "Èìÿ ïîëüçîâàòåëÿ èëè ïàðîëü íå âåðíû");
|
||||
}
|
||||
|
||||
if ( $this->han_login->return_code != 'SUCCESS' )
|
||||
{
|
||||
if ( $this->han_login->return_code == 'ACCOUNT_LOCKED' )
|
||||
{
|
||||
$this->write_to_log( $this->ipsclass->input['username'], 'fail' );
|
||||
$this->login_form( "Âàøà ó÷åòíàÿ çàïèñü çàáëîêèðîâàíà" );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->write_to_log( $this->ipsclass->input['username'], 'fail' );
|
||||
$this->login_form( "Èìÿ ïîëüçîâàòåëÿ èëè ïàðîëü íå âåðíû" );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get perms
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->sess->member = $mem;
|
||||
$this->ipsclass->sess->build_group_permissions();
|
||||
$mem = $this->ipsclass->sess->member;
|
||||
|
||||
if ( $mem['g_access_cp'] != 1 )
|
||||
{
|
||||
$this->write_to_log( $this->ipsclass->input['username'], 'fail' );
|
||||
$this->login_form("Ó âàñ íåò ïðàâ äîñòóïà â ÀÖ");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//-----------------------------------------
|
||||
// Fix up query string...
|
||||
//-----------------------------------------
|
||||
|
||||
$extra_query = "";
|
||||
|
||||
if ( $_POST['qstring'] )
|
||||
{
|
||||
$extra_query = urldecode( $_POST['qstring'] );
|
||||
$extra_query = str_replace( "{$this->ipsclass->vars['board_url']}" , "" , $extra_query );
|
||||
$extra_query = preg_replace( "!/?admin\.{$this->ipsclass->vars['php_ext']}!i", "" , $extra_query );
|
||||
$extra_query = preg_replace( "!^\?!" , "" , $extra_query );
|
||||
$extra_query = preg_replace( "!adsess=(\w){32}!" , "" , $extra_query );
|
||||
$extra_query = preg_replace( "!s=(\w){32}!" , "" , $extra_query );
|
||||
$extra_query = preg_replace( "!act=login!" , "" , $extra_query );
|
||||
$extra_query = preg_replace( "!code=template-edit-bit!" , "" , $extra_query );
|
||||
$extra_query = preg_replace( "!code=template-bits-list!" , "" , $extra_query );
|
||||
$extra_query = preg_replace( "!bitname=(\w)!" , "" , $extra_query );
|
||||
$extra_query = $this->ipsclass->parse_clean_value( $extra_query );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Delete old sessions..
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->do_delete( 'admin_sessions', 'session_member_id='.$mem['id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// All is good, rejoice as we set a
|
||||
// session for this user
|
||||
//-----------------------------------------
|
||||
|
||||
$sess_id = md5( uniqid( microtime() ) );
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'admin_sessions', array (
|
||||
'session_id' => $sess_id,
|
||||
'session_ip_address' => $this->ipsclass->ip_address,
|
||||
'session_member_name' => $mem['name'],
|
||||
'session_member_id' => $mem['id'],
|
||||
'session_member_login_key' => md5( $mem['joined'] . $mem['ip_address'] ),
|
||||
'session_location' => 'index',
|
||||
'session_log_in_time' => time(),
|
||||
'session_running_time' => time(),
|
||||
) );
|
||||
|
||||
$this->ipsclass->input['adsess'] = $sess_id;
|
||||
|
||||
//-----------------------------------------
|
||||
// Set a session ID cookie
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->my_setcookie("ipb_admin_session_id", $sess_id, 0);
|
||||
|
||||
$this->write_to_log( $this->ipsclass->input['username'], 'ok' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Lets add some data in here for the access logs...
|
||||
//-----------------------------------------
|
||||
|
||||
$extra_query .= "&member_id=".$mem['id'].'&password=ok';
|
||||
|
||||
//-----------------------------------------
|
||||
// Redirect...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->admin->redirect( $this->ipsclass->vars['board_url'].'/'.IPB_ACP_DIRECTORY."/index.".$this->ipsclass->vars['php_ext']."?adsess=".$this->ipsclass->input['adsess']."&".$extra_query, 'Âõîä îñóùåñòâëåí' );
|
||||
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Write to the log in table
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Write to the admin log in loggy ma log
|
||||
*
|
||||
* @param string Username
|
||||
* @param string ok/fail flag
|
||||
*/
|
||||
function write_to_log( $username='', $flag='fail' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$username = $username ? $username : $this->ipsclass->input['username'];
|
||||
$flag = ( $flag == 'ok' ) ? 1 : 0;
|
||||
$admin_post_details = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Generate POST / GET details
|
||||
//-----------------------------------------
|
||||
|
||||
foreach( $_GET as $k => $v )
|
||||
{
|
||||
$admin_post_details['get'][ htmlspecialchars( $k ) ] = htmlspecialchars( $v );
|
||||
}
|
||||
|
||||
foreach( $_POST as $k => $v )
|
||||
{
|
||||
if ( $k == 'password' )
|
||||
{
|
||||
$v = str_repeat( '*', strlen( $v ) - 1 ) . substr( $v, -1, 1 );
|
||||
}
|
||||
|
||||
$admin_post_details['post'][ htmlspecialchars( $k ) ] = htmlspecialchars( $v );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Write to disk...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'admin_login_logs', array( 'admin_ip_address' => $this->ipsclass->ip_address,
|
||||
'admin_username' => $username,
|
||||
'admin_time' => time(),
|
||||
'admin_success' => $flag,
|
||||
'admin_post_details' => serialize($admin_post_details) ) );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Show the log in form
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function login_form($message='')
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$message = $message ? $message : (isset($this->ipsclass->admin_session['_session_message']) ? $this->ipsclass->admin_session['_session_message'] : '');
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Remove all out of date sessions, like a good boy. Woof.
|
||||
//-------------------------------------------------------
|
||||
|
||||
$cut_off_stamp = time() - 60*60*2;
|
||||
|
||||
$this->ipsclass->DB->do_delete( 'admin_sessions', "session_log_in_time < {$cut_off_stamp}" );
|
||||
|
||||
//------------------------------------------------------
|
||||
// AUTO Log in ma-thingy?
|
||||
//------------------------------------------------------
|
||||
|
||||
$name = "";
|
||||
$extra = "";
|
||||
|
||||
$mid = intval( $this->ipsclass->my_getcookie('member_id') );
|
||||
|
||||
if ( $mid > 0 )
|
||||
{
|
||||
$this->ipsclass->DB->build_query( array( 'select' => 'm.id, m.name, m.mgroup, g.g_access_cp',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => "m.id={$mid} AND g.g_access_cp=1",
|
||||
'add_join' => array( 1 => array( 'type' => 'left',
|
||||
'from' => array( 'groups' => 'g' ),
|
||||
'where' => 'g.g_id=m.mgroup' )
|
||||
)
|
||||
) );
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
if ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$name = $this->ipsclass->vars['ipbli_usertype'] == 'username' ? $r['name'] : $r['email'];
|
||||
$extra = 'onload="document.theAdminForm.password.focus();"';
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
// SHW DA FRM (txt msg stylee)
|
||||
//------------------------------------------------------
|
||||
|
||||
$qs = str_replace( '&' , '&', $this->ipsclass->parse_clean_value( urldecode( $this->ipsclass->my_getenv('QUERY_STRING') ) ) );
|
||||
$qs = str_replace( 'adsess=' , 'old_adsess=', $qs );
|
||||
$qs = str_replace( 'act=menu', '', $qs );
|
||||
$qs = str_replace( '<' , '', $qs );
|
||||
$qs = str_replace( '>' , '', $qs );
|
||||
$qs = str_replace( '(' , '', $qs );
|
||||
$qs = str_replace( ')' , '', $qs );
|
||||
|
||||
$this->ipsclass->html_title = "IPB: Àäìèíöåíòð: Âõîä";
|
||||
$this->ipsclass->html = str_replace( '<%CONTENT%>', $this->ipsclass->skin_acp_global->log_in_form( $qs, $message, $name ), $this->ipsclass->skin_acp_global->global_main_wrapper() );
|
||||
$this->ipsclass->html = str_replace( '<%TITLE%>' , $this->ipsclass->html_title, $this->ipsclass->html );
|
||||
$this->ipsclass->html = str_replace( "<body", "<body style='background-image:url({$this->ipsclass->skin_acp_url}/images/blank.gif)'", $this->ipsclass->html );
|
||||
|
||||
@header("Content-type: text/html");
|
||||
print $this->ipsclass->html;
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2008-03-28 18:08:02 -0400 (Fri, 28 Mar 2008) $
|
||||
| > $Revision: 1232 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Help Control functions
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 2nd April 2002
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
| > DBA Checked: Mon 24th May 2004
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
class ad_login
|
||||
{
|
||||
# Global
|
||||
var $ipsclass;
|
||||
|
||||
# HTML
|
||||
var $html;
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// What to do?
|
||||
//-----------------------------------------
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
case 'login':
|
||||
$this->login_form();
|
||||
break;
|
||||
case 'login-out':
|
||||
// Do we have a session?
|
||||
$sess_cookie = $this->ipsclass->my_getcookie( "ipb_admin_session_id" );
|
||||
|
||||
if( !$sess_cookie )
|
||||
{
|
||||
$sess_cookie = $this->ipsclass->input['adsess'];
|
||||
}
|
||||
|
||||
if( $sess_cookie )
|
||||
{
|
||||
$this->ipsclass->DB->do_delete( "admin_sessions", "session_id='{$sess_cookie}'" );
|
||||
}
|
||||
|
||||
$this->ipsclass->my_setcookie("ipb_admin_session_id", "-1", -1);
|
||||
$this->login_form();
|
||||
break;
|
||||
|
||||
case 'login-complete':
|
||||
$this->login_complete();
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->login_form();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Complete the log in
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function login_complete()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$username = str_replace( '|', '|', $this->ipsclass->input['username'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( empty($this->ipsclass->input['username']) )
|
||||
{
|
||||
$this->login_form("You must enter a username before proceeding");
|
||||
}
|
||||
|
||||
if ( empty($this->ipsclass->input['password']) )
|
||||
{
|
||||
$this->login_form("You must enter a password before proceeding");
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load handler...
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( ROOT_PATH.'sources/handlers/han_login.php' );
|
||||
$this->han_login = new han_login();
|
||||
$this->han_login->ipsclass =& $this->ipsclass;
|
||||
$this->han_login->is_admin_auth = 1;
|
||||
$this->han_login->init();
|
||||
|
||||
//-----------------------------------------
|
||||
// Check auth
|
||||
//-----------------------------------------
|
||||
|
||||
$this->han_login->login_authenticate( $username, $this->ipsclass->input['password'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check return code...
|
||||
//-----------------------------------------
|
||||
|
||||
$mem = $this->han_login->member;
|
||||
|
||||
$username_incorrect = "Username or password incorrect";
|
||||
|
||||
if( $this->ipsclass->vars['ipbli_usertype'] != 'username' )
|
||||
{
|
||||
$username_incorrect = "Email address or password incorrect";
|
||||
}
|
||||
|
||||
if ( ( ! $mem['id'] ) or ( $this->han_login->return_code == 'NO_USER' ) )
|
||||
{
|
||||
$this->write_to_log( $this->ipsclass->input['username'], 'fail' );
|
||||
$this->login_form( $username_incorrect );
|
||||
}
|
||||
|
||||
if ( $this->han_login->return_code != 'SUCCESS' )
|
||||
{
|
||||
if ( $this->han_login->return_code == 'ACCOUNT_LOCKED' )
|
||||
{
|
||||
$this->write_to_log( $this->ipsclass->input['username'], 'fail' );
|
||||
$this->login_form( "Your account has been locked due to the number of failed login attempts made" );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->write_to_log( $this->ipsclass->input['username'], 'fail' );
|
||||
$this->login_form( $username_incorrect );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get perms
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->sess->member = $mem;
|
||||
$this->ipsclass->sess->build_group_permissions();
|
||||
$mem = $this->ipsclass->sess->member;
|
||||
|
||||
if ( $mem['g_access_cp'] != 1 )
|
||||
{
|
||||
$this->write_to_log( $this->ipsclass->input['username'], 'fail' );
|
||||
$this->login_form("You do not have access to the administrative CP");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//-----------------------------------------
|
||||
// Fix up query string...
|
||||
//-----------------------------------------
|
||||
|
||||
$extra_query = "";
|
||||
|
||||
if ( $_POST['qstring'] )
|
||||
{
|
||||
$extra_query = urldecode( $_POST['qstring'] );
|
||||
$extra_query = str_replace( "{$this->ipsclass->vars['board_url']}" , "" , $extra_query );
|
||||
$extra_query = preg_replace( "!/?admin\.{$this->ipsclass->vars['php_ext']}!i", "" , $extra_query );
|
||||
$extra_query = preg_replace( "!^\?!" , "" , $extra_query );
|
||||
$extra_query = preg_replace( "!adsess=(\w){32}!" , "" , $extra_query );
|
||||
$extra_query = preg_replace( "!s=(\w){32}!" , "" , $extra_query );
|
||||
$extra_query = preg_replace( "!act=login!" , "" , $extra_query );
|
||||
$extra_query = preg_replace( "!code=template-edit-bit!" , "" , $extra_query );
|
||||
$extra_query = preg_replace( "!code=template-bits-list!" , "" , $extra_query );
|
||||
$extra_query = preg_replace( "!bitname=(\w)!" , "" , $extra_query );
|
||||
$extra_query = $this->ipsclass->parse_clean_value( $extra_query );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Delete old sessions..
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->do_delete( 'admin_sessions', 'session_member_id='.$mem['id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// All is good, rejoice as we set a
|
||||
// session for this user
|
||||
//-----------------------------------------
|
||||
|
||||
$sess_id = md5( uniqid( microtime() ) );
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'admin_sessions', array (
|
||||
'session_id' => $sess_id,
|
||||
'session_ip_address' => $this->ipsclass->ip_address,
|
||||
'session_member_name' => $mem['name'],
|
||||
'session_member_id' => $mem['id'],
|
||||
'session_member_login_key' => md5( $mem['joined'] . $mem['ip_address'] ),
|
||||
'session_location' => 'index',
|
||||
'session_log_in_time' => time(),
|
||||
'session_running_time' => time(),
|
||||
) );
|
||||
|
||||
$this->ipsclass->input['adsess'] = $sess_id;
|
||||
|
||||
//-----------------------------------------
|
||||
// Set a session ID cookie
|
||||
//-----------------------------------------
|
||||
|
||||
// Don't want it used for XSS...
|
||||
//$this->ipsclass->my_setcookie("ipb_admin_session_id", $sess_id, 0);
|
||||
|
||||
$this->write_to_log( $this->ipsclass->input['username'], 'ok' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Lets add some data in here for the access logs...
|
||||
//-----------------------------------------
|
||||
|
||||
$extra_query .= "&member_id=".$mem['id'].'&password=ok';
|
||||
|
||||
//-----------------------------------------
|
||||
// Redirect...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->admin->redirect( $this->ipsclass->vars['board_url'].'/'.IPB_ACP_DIRECTORY."/index.".$this->ipsclass->vars['php_ext']."?adsess=".$this->ipsclass->input['adsess']."&".$extra_query, 'Log In Successful' );
|
||||
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Write to the log in table
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Write to the admin log in loggy ma log
|
||||
*
|
||||
* @param string Username
|
||||
* @param string ok/fail flag
|
||||
*/
|
||||
function write_to_log( $username='', $flag='fail' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$username = $username ? $username : $this->ipsclass->input['username'];
|
||||
$flag = ( $flag == 'ok' ) ? 1 : 0;
|
||||
$admin_post_details = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Generate POST / GET details
|
||||
//-----------------------------------------
|
||||
|
||||
foreach( $_GET as $k => $v )
|
||||
{
|
||||
$admin_post_details['get'][ htmlspecialchars( $k ) ] = htmlspecialchars( $v );
|
||||
}
|
||||
|
||||
foreach( $_POST as $k => $v )
|
||||
{
|
||||
if ( $k == 'password' )
|
||||
{
|
||||
$v = str_repeat( '*', strlen( $v ) - 1 ) . substr( $v, -1, 1 );
|
||||
}
|
||||
|
||||
$admin_post_details['post'][ htmlspecialchars( $k ) ] = htmlspecialchars( $v );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Write to disk...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'admin_login_logs', array( 'admin_ip_address' => $this->ipsclass->ip_address,
|
||||
'admin_username' => $username,
|
||||
'admin_time' => time(),
|
||||
'admin_success' => $flag,
|
||||
'admin_post_details' => serialize($admin_post_details) ) );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Show the log in form
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function login_form($message='')
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$message = $message ? $message : (isset($this->ipsclass->admin_session['_session_message']) ? $this->ipsclass->admin_session['_session_message'] : '');
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Remove all out of date sessions, like a good boy. Woof.
|
||||
//-------------------------------------------------------
|
||||
|
||||
$cut_off_stamp = time() - 60*60*2;
|
||||
|
||||
$this->ipsclass->DB->do_delete( 'admin_sessions', "session_log_in_time < {$cut_off_stamp}" );
|
||||
|
||||
//------------------------------------------------------
|
||||
// AUTO Log in ma-thingy?
|
||||
//------------------------------------------------------
|
||||
|
||||
$name = "";
|
||||
$extra = "";
|
||||
|
||||
$mid = intval( $this->ipsclass->my_getcookie('member_id') );
|
||||
|
||||
if ( $mid > 0 )
|
||||
{
|
||||
$this->ipsclass->DB->build_query( array( 'select' => 'm.id, m.name, m.mgroup, g.g_access_cp, m.email',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => "m.id={$mid} AND g.g_access_cp=1",
|
||||
'add_join' => array( 1 => array( 'type' => 'left',
|
||||
'from' => array( 'groups' => 'g' ),
|
||||
'where' => 'g.g_id=m.mgroup' )
|
||||
)
|
||||
) );
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
if ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$name = $this->ipsclass->vars['ipbli_usertype'] == 'username' ? $r['name'] : $r['email'];
|
||||
$extra = 'onload="document.theAdminForm.password.focus();"';
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
// SHW DA FRM (txt msg stylee)
|
||||
//------------------------------------------------------
|
||||
|
||||
$qs = str_replace( '&' , '&', $this->ipsclass->parse_clean_value( urldecode( $this->ipsclass->my_getenv('QUERY_STRING') ) ) );
|
||||
$qs = str_replace( 'adsess=' , 'old_adsess=', $qs );
|
||||
$qs = str_replace( 'act=menu', '', $qs );
|
||||
$qs = str_replace( '<' , '', $qs );
|
||||
$qs = str_replace( '>' , '', $qs );
|
||||
$qs = str_replace( '(' , '', $qs );
|
||||
$qs = str_replace( ')' , '', $qs );
|
||||
|
||||
$this->ipsclass->html_title = "IPB: ACP: Log in";
|
||||
$this->ipsclass->html = str_replace( '<%CONTENT%>', $this->ipsclass->skin_acp_global->log_in_form( $qs, $message, $name ), $this->ipsclass->skin_acp_global->global_main_wrapper() );
|
||||
$this->ipsclass->html = str_replace( '<%TITLE%>' , $this->ipsclass->html_title, $this->ipsclass->html );
|
||||
$this->ipsclass->html = str_replace( "<body", "<body style='background-image:url({$this->ipsclass->skin_acp_url}/images/blank.gif)'", $this->ipsclass->html );
|
||||
|
||||
@header("Content-type: text/html");
|
||||
print $this->ipsclass->html;
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -2,26 +2,18 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-12-15 04:58:55 -0500 (Fri, 15 Dec 2006) $
|
||||
| > $Revision: 794 $
|
||||
| > $Author: matt $
|
||||
| > $Date: 2007-07-13 13:51:38 -0400 (Fri, 13 Jul 2007) $
|
||||
| > $Revision: 1087 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Components Functions
|
||||
@@ -32,7 +24,7 @@
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -40,26 +32,26 @@ class ad_login_auth
|
||||
{
|
||||
# Globals
|
||||
var $ipsclass;
|
||||
|
||||
|
||||
var $perm_main = 'tools';
|
||||
var $perm_child = 'loginauth';
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Main handler
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function auto_run()
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
$this->html = $this->ipsclass->acp_load_template('cp_skin_tools');
|
||||
$this->ipsclass->admin->nav[] = array( "{$this->ipsclass->form_code}", "Óïðàâëåíèå àâòîðèçàöèÿìè" );
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( "{$this->ipsclass->form_code}", "Log In Manager" );
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
case 'manage':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->login_list();
|
||||
break;
|
||||
|
||||
|
||||
case 'login_add':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' );
|
||||
$this->login_form('add');
|
||||
@@ -76,13 +68,13 @@ class ad_login_auth
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
|
||||
$this->login_save('edit');
|
||||
break;
|
||||
|
||||
|
||||
case 'login_diagnostics':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':diagnostics' );
|
||||
$this->login_diagnostics();
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
case 'components_export':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' );
|
||||
$this->components_export('single');
|
||||
@@ -91,66 +83,66 @@ class ad_login_auth
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':import' );
|
||||
$this->components_import();
|
||||
break;
|
||||
|
||||
|
||||
case 'component_move':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
|
||||
$this->components_move();
|
||||
break;
|
||||
|
||||
|
||||
case 'master_xml_export':
|
||||
$this->master_xml_export();
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->login_list();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Export Master XML
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
function master_xml_export()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$entry = array();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get XML class
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
require_once( KERNEL_PATH.'class_xml.php' );
|
||||
|
||||
|
||||
$xml = new class_xml();
|
||||
|
||||
|
||||
$xml->doc_type = $this->ipsclass->vars['gb_char_set'];
|
||||
|
||||
$xml->xml_set_root( 'export', array( 'exported' => time() ) );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Set group
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$xml->xml_add_group( 'group' );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get templates...
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
|
||||
'from' => 'login_methods' ) );
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$content = array();
|
||||
|
||||
|
||||
if ( $r['login_folder_name'] == 'internal' )
|
||||
{
|
||||
$r['login_enabled'] = 1;
|
||||
@@ -167,85 +159,85 @@ class ad_login_auth
|
||||
{
|
||||
$r['login_enabled'] = 0;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Sort the fields...
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
foreach( $r as $k => $v )
|
||||
{
|
||||
$content[] = $xml->xml_build_simple_tag( $k, $v );
|
||||
}
|
||||
|
||||
|
||||
$entry[] = $xml->xml_build_entry( 'row', $content );
|
||||
}
|
||||
|
||||
|
||||
$xml->xml_add_entry_to_group( 'group', $entry );
|
||||
|
||||
|
||||
$xml->xml_format_document();
|
||||
|
||||
|
||||
$doc = $xml->xml_document;
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Print to browser
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->admin->show_download( $doc, 'loginauth.xml', '', 0 );
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Components Rebuild Cache
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
function components_rebuildcache()
|
||||
{
|
||||
$this->ipsclass->cache['components'] = array();
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'com_id,com_enabled,com_section,com_filename,com_url_uri,com_url_title,com_position', 'from' => 'components', 'order' => 'com_position ASC' ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$this->ipsclass->cache['components'][] = $r;
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->update_cache( array( 'name' => 'components', 'array' => 1, 'deletefirst' => 1 ) );
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Components Import
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
function components_import()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$updated = 0;
|
||||
$inserted = 0;
|
||||
$cur_components = array();
|
||||
|
||||
|
||||
if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// check and load from server
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( ! $this->ipsclass->input['file_location'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Çàãðóæàåìûé ôàéë íå íàéäåí!";
|
||||
$this->ipsclass->main_msg = "No upload file was found and no filename was specified.";
|
||||
$this->components_list();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ( ! file_exists( ROOT_PATH . $this->ipsclass->input['file_location'] ) )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Íåëüçÿ íàéòè ôàéë äëÿ îòêðûòèÿ: " . ROOT_PATH . $this->ipsclass->input['file_location'];
|
||||
$this->ipsclass->main_msg = "Could not find the file to open at: " . ROOT_PATH . $this->ipsclass->input['file_location'];
|
||||
$this->components_list();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ( preg_match( "#\.gz$#", $this->ipsclass->input['file_location'] ) )
|
||||
{
|
||||
if ( $FH = @gzopen( ROOT_PATH.$this->ipsclass->input['file_location'], 'rb' ) )
|
||||
@@ -254,7 +246,7 @@ class ad_login_auth
|
||||
{
|
||||
$content .= @gzread( $FH, 1024 );
|
||||
}
|
||||
|
||||
|
||||
@gzclose( $FH );
|
||||
}
|
||||
}
|
||||
@@ -272,86 +264,80 @@ class ad_login_auth
|
||||
//-----------------------------------------
|
||||
// Get uploaded schtuff
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$tmp_name = $_FILES['FILE_UPLOAD']['name'];
|
||||
$tmp_name = preg_replace( "#\.gz$#", "", $tmp_name );
|
||||
|
||||
|
||||
$content = $this->ipsclass->admin->import_xml( $tmp_name );
|
||||
}
|
||||
|
||||
|
||||
if( !$content )
|
||||
{
|
||||
$this->ipsclass->admin->error( "Èìïîðòèðîâàíèå íå îñóùåñòâëåíî, òàê êàê ôàéë èìååò íåâåðíûé ôîðìàò èëè â íåì íåò çàïèñåé." );
|
||||
$this->ipsclass->admin->error( "Import file was not in the correct format or was corrupt" );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get current components.
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'com_id, com_section',
|
||||
'from' => 'components',
|
||||
'order' => 'com_id' ) );
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$cur_components[ $r['com_section'] ] = $r['com_id'];
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get xml mah-do-dah
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
require_once( KERNEL_PATH.'class_xml.php' );
|
||||
|
||||
$xml = new class_xml();
|
||||
|
||||
$xml->lite_parser = 1;
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Unpack the datafile
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$xml->xml_parse_document( $content );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// pArse
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$fields = array( 'com_title' , 'com_description', 'com_author' , 'com_url', 'com_version', 'com_menu_data',
|
||||
'com_enabled' , 'com_safemode' , 'com_section', 'com_filename' );
|
||||
|
||||
|
||||
if ( ! is_array( $xml->xml_array['componentexport']['componentgroup']['component'][0] ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Ensure [0] is populated
|
||||
//-----------------------------------------
|
||||
|
||||
$tmp = $xml->xml_array['componentexport']['componentgroup']['component'];
|
||||
|
||||
unset($xml->xml_array['componentexport']['componentgroup']['component']);
|
||||
|
||||
$xml->xml_array['componentexport']['componentgroup']['component'][0] = $tmp;
|
||||
$xml->xml_array['componentexport']['componentgroup']['component'] = array( 0 => $xml->xml_array['componentexport']['componentgroup']['component'] );
|
||||
}
|
||||
|
||||
|
||||
foreach( $xml->xml_array['componentexport']['componentgroup']['component'] as $entry )
|
||||
{
|
||||
$newrow = array();
|
||||
|
||||
|
||||
foreach( $fields as $f )
|
||||
{
|
||||
$newrow[$f] = $entry[ $f ]['VALUE'];
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->DB->force_data_type = array( 'com_version' => 'string' );
|
||||
|
||||
|
||||
if ( $cur_components[ $entry['com_section']['VALUE'] ] )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Update
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->do_update( 'components', $newrow, 'com_id='.$cur_components[ $entry['com_section']['VALUE'] ] );
|
||||
$updated++;
|
||||
}
|
||||
@@ -360,58 +346,58 @@ class ad_login_auth
|
||||
//-----------------------------------------
|
||||
// INSERT
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$newrow['com_date_added'] = time();
|
||||
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'components', $newrow );
|
||||
$inserted++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Done...
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->components_rebuildcache();
|
||||
|
||||
$this->ipsclass->main_msg = "$updated êîìïîíåíòîâ îáíîâëåíî è $inserted âñòàâëåíî.";
|
||||
|
||||
|
||||
$this->ipsclass->main_msg = "$updated components updated $inserted components inserted";
|
||||
|
||||
$this->components_list();
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Components Export
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
function components_export($type='single')
|
||||
{
|
||||
//--------------------------------------------
|
||||
// INIT
|
||||
//--------------------------------------------
|
||||
|
||||
|
||||
$com_id = intval($this->ipsclass->input['com_id']);
|
||||
$rows = array();
|
||||
|
||||
|
||||
//--------------------------------------------
|
||||
// Checks...
|
||||
//--------------------------------------------
|
||||
|
||||
|
||||
if ( $type == 'single' )
|
||||
{
|
||||
if ( ! $com_id )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Íå îäèí ID íå âûáðàí, ïîâòîðèòå ïîïûòêó çàíîâî ";
|
||||
$this->ipsclass->main_msg = "No ID was passed, please try again";
|
||||
$this->components_list();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------
|
||||
// Get DB row(s)
|
||||
//--------------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'components', 'where' => 'com_id='.$com_id ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$rows[] = $r;
|
||||
@@ -422,128 +408,128 @@ class ad_login_auth
|
||||
//--------------------------------------------
|
||||
// Get DB row(s)
|
||||
//--------------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'components' ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$rows[] = $r;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------
|
||||
// Get XML class
|
||||
//-------------------------------
|
||||
|
||||
|
||||
require_once( KERNEL_PATH.'class_xml.php' );
|
||||
|
||||
|
||||
$xml = new class_xml();
|
||||
|
||||
|
||||
$xml->xml_set_root( 'componentexport', array( 'exported' => time() ) );
|
||||
|
||||
|
||||
//-------------------------------
|
||||
// Add component
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$xml->xml_add_group( 'componentgroup' );
|
||||
|
||||
|
||||
$entry = array();
|
||||
|
||||
|
||||
foreach( $rows as $r )
|
||||
{
|
||||
$content = array();
|
||||
|
||||
|
||||
foreach( $r as $k => $v )
|
||||
{
|
||||
$content[] = $xml->xml_build_simple_tag( $k, $v );
|
||||
}
|
||||
|
||||
|
||||
$entry[] = $xml->xml_build_entry( 'component', $content );
|
||||
}
|
||||
|
||||
|
||||
$xml->xml_add_entry_to_group( 'componentgroup', $entry );
|
||||
|
||||
|
||||
$xml->xml_format_document();
|
||||
|
||||
|
||||
$doc = $xml->xml_document;
|
||||
|
||||
//-------------------------------
|
||||
// Print to browser
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->admin->show_download( $doc, 'ipd_components.xml', '', 0 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Log in: Diagnostics
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
function login_diagnostics()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Init Vars
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$login_id = intval($this->ipsclass->input['login_id']);
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Check (please?)
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$login = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_id='.$login_id ) );
|
||||
|
||||
|
||||
if ( ! $login['login_id'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Íå îäèí ID íå âûáðàí, ïîâòîðèòå ïîïûòêó çàíîâî.";
|
||||
$this->ipsclass->main_msg = "No ID was passed, please try again.";
|
||||
$this->login_list();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Generate file
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$mypath = ROOT_PATH.'sources/loginauth/'.$login['login_folder_name'];
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Generate General Info
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$login['_enabled_img'] = $login['login_enabled'] ? 'aff_tick.png' : 'aff_cross.png';
|
||||
$login['_installed_img'] = $login['login_installed'] ? 'aff_tick.png' : 'aff_cross.png';
|
||||
$login['_has_settings'] = $login['login_settings'] ? 'aff_tick.png' : 'aff_cross.png';
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// File based info
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$login['_file_auth_exists'] = @file_exists( $mypath.'/auth.php' ) ? 'aff_tick.png' : 'aff_cross.png';
|
||||
$login['_file_conf_exists'] = @file_exists( $mypath.'/conf.php' ) ? 'aff_tick.png' : 'aff_cross.png';
|
||||
$login['_file_acp_exists'] = @file_exists( $mypath.'/acp.php' ) ? 'aff_tick.png' : 'aff_cross.png';
|
||||
|
||||
|
||||
$login['_file_conf_write'] = @file_exists( $mypath.'/conf.php' ) ? 'aff_tick.png' : 'aff_cross.png';
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->html->login_diagnostics( $login );
|
||||
|
||||
$this->ipsclass->html_help_title = "Óïðàâëåíèå àâòîðèçàöèåé";
|
||||
$this->ipsclass->html_help_msg = "Ýòà ñåêöèÿ ïîçâîëèò âàì óïðàâëÿòü èäåíòèôèêàöèîííûìè ìåòîäàìè äëÿ âõîäà.";
|
||||
|
||||
|
||||
$this->ipsclass->html_help_title = "Log In Manager";
|
||||
$this->ipsclass->html_help_msg = "This section will allow you to manage your log in authentication methods.";
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Components Save
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
function login_save($type='add')
|
||||
{
|
||||
//--------------------------------------------
|
||||
// INIT
|
||||
//--------------------------------------------
|
||||
|
||||
|
||||
$login_id = intval($this->ipsclass->input['login_id']);
|
||||
$login_title = trim( $this->ipsclass->input['login_title'] );
|
||||
$login_description = trim( $this->ipsclass->txt_stripslashes( $this->ipsclass->txt_UNhtmlspecialchars($_POST['login_description'])) );
|
||||
@@ -560,42 +546,42 @@ class ad_login_auth
|
||||
$login_installed = intval($this->ipsclass->input['login_installed']);
|
||||
$login_safemode = intval($this->ipsclass->input['login_safemode']);
|
||||
$login_user_id = trim($this->ipsclass->input['login_user_id']);
|
||||
|
||||
//--------------------------------------------
|
||||
// Checks...
|
||||
//--------------------------------------------
|
||||
|
||||
if ( $type == 'edit' )
|
||||
{
|
||||
if ( ! $login_id )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Íå îäèí ID íå âûáðàí, ïîâòîðèòå ïîïûòêó çàíîâî ";
|
||||
$this->login_list();
|
||||
return;
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
// Enabled this one?
|
||||
//--------------------------------------------
|
||||
|
||||
if ( $login_enabled )
|
||||
{
|
||||
$this->ipsclass->DB->do_update( 'login_methods', array( 'login_enabled' => 0 ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ( ! $login_title OR ! $login_folder_name OR ! $login_folder_name )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Âû äîëæíû çàïîëíèòü âñå ïîëÿ";
|
||||
$this->ipsclass->main_msg = "You must complete the entire form.";
|
||||
$this->login_form( $type );
|
||||
return;
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
// Checks...
|
||||
//--------------------------------------------
|
||||
|
||||
if ( $type == 'edit' )
|
||||
{
|
||||
if ( ! $login_id )
|
||||
{
|
||||
$this->ipsclass->main_msg = "No ID was passed, please try again";
|
||||
$this->login_list();
|
||||
return;
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
// Enabled this one?
|
||||
//--------------------------------------------
|
||||
|
||||
if ( $login_enabled )
|
||||
{
|
||||
$this->ipsclass->DB->do_update( 'login_methods', array( 'login_enabled' => 0 ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
// Save...
|
||||
//--------------------------------------------
|
||||
|
||||
|
||||
$array = array( 'login_title' => $login_title,
|
||||
'login_description' => $login_description,
|
||||
'login_folder_name' => $login_folder_name,
|
||||
@@ -611,101 +597,101 @@ class ad_login_auth
|
||||
'login_allow_create' => 1,
|
||||
'login_user_id' => $login_user_id,
|
||||
);
|
||||
|
||||
|
||||
//--------------------------------------------
|
||||
// In DEV?
|
||||
//--------------------------------------------
|
||||
|
||||
|
||||
if ( IN_DEV )
|
||||
{
|
||||
$array['login_installed'] = $login_installed;
|
||||
$array['login_safemode'] = $login_safemode;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------
|
||||
// Nike.. do it
|
||||
//--------------------------------------------
|
||||
|
||||
|
||||
if ( $type == 'add' )
|
||||
{
|
||||
$array['login_date'] = time();
|
||||
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'login_methods', $array );
|
||||
$this->ipsclass->main_msg = 'Íîâûé ìåòîä âõîäà áûë äîáàâëåí';
|
||||
$this->ipsclass->main_msg = 'New Log In Method Added';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
$this->ipsclass->DB->do_update( 'login_methods', $array, 'login_id='.$login_id );
|
||||
$this->ipsclass->main_msg = 'Íîâûé ìåòîä âõîäà áûë èçìåíåí';
|
||||
$this->ipsclass->main_msg = 'Log In Method Edited';
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Rebuild cache
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
require_once( ROOT_PATH.'sources/action_admin/settings.php' );
|
||||
$adsettings = new ad_settings();
|
||||
$adsettings->ipsclass =& $this->ipsclass;
|
||||
|
||||
|
||||
$this->ipsclass->DB->do_update( 'conf_settings', array( 'conf_value' => $login_folder_name ), "conf_key='ipbli_key'" );
|
||||
$this->ipsclass->DB->do_update( 'conf_settings', array( 'conf_value' => $login_user_id ), "conf_key='ipbli_usertype'" );
|
||||
|
||||
|
||||
$adsettings->setting_rebuildcache();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Return, at once.
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->login_list();
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Log in: Form
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
function login_form( $type='add' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Init Vars
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$login_id = intval($this->ipsclass->input['login_id']);
|
||||
$login_dd = array( 0 => array( 'passthrough', 'Óäàëåííûé' ), 1 => array( 'onfail', 'Ñîâìåñòíûé' ) );
|
||||
$login_unt = array( 0 => array( 'username', 'Èìÿ ïîëüçîâàòåëÿ' ), 1 => array( 'email', 'E-mail àäðåñ' ) );
|
||||
|
||||
$login_dd = array( 0 => array( 'passthrough', 'Pass-Through' ), 1 => array( 'onfail', 'On-Fail' ) );
|
||||
$login_unt = array( 0 => array( 'username', 'User Name' ), 1 => array( 'email', 'Email Address' ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check (please?)
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( $type == 'add' )
|
||||
{
|
||||
$formcode = 'login_add_do';
|
||||
$title = "Ñîçäàíèÿ íîâîãî ìåòîäà âõîäà";
|
||||
$button = "Ñîçäàòü";
|
||||
$title = "Register New Log In Method";
|
||||
$button = "Register New Log In Method";
|
||||
}
|
||||
else
|
||||
{
|
||||
$login = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_id='.$login_id ) );
|
||||
|
||||
|
||||
if ( ! $login['login_id'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Íå îäèí ID íå âûáðàí, ïîâòîðèòå ïîïûòêó çàíîâî.";
|
||||
$this->ipsclass->main_msg = "No ID was passed, please try again.";
|
||||
$this->login_list();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$formcode = 'login_edit_do';
|
||||
$title = "Ðåäàêòèðîâàíèå: ".$login['login_title'];
|
||||
$button = "Ñîõðàíèòü èçìåíåíèÿ";
|
||||
$title = "Edit Log In Method ".$login['login_title'];
|
||||
$button = "Save Changes";
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------
|
||||
// Form elements
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$form = array();
|
||||
|
||||
|
||||
$form['login_title'] = $this->ipsclass->adskin->form_input( 'login_title' , $_POST['login_title'] ? $_POST['login_title'] : $login['login_title'] );
|
||||
$form['login_description'] = $this->ipsclass->adskin->form_input( 'login_description' , $this->ipsclass->txt_htmlspecialchars( $_POST['login_description'] ? $_POST['login_description'] : $login['login_description'] ) );
|
||||
$form['login_folder_name'] = $this->ipsclass->adskin->form_input( 'login_folder_name' , $_POST['login_folder_name'] ? $_POST['login_folder_name'] : $login['login_folder_name'] );
|
||||
@@ -719,63 +705,63 @@ class ad_login_auth
|
||||
$form['login_replace_form'] = $this->ipsclass->adskin->form_yes_no( 'login_replace_form' , $_POST['login_replace_form'] ? $_POST['login_replace_form'] : $login['login_replace_form'] );
|
||||
$form['login_type'] = $this->ipsclass->adskin->form_dropdown( 'login_type' , $login_dd , $_POST['login_type'] ? $_POST['login_type'] : $login['login_type'] );
|
||||
$form['login_user_id'] = $this->ipsclass->adskin->form_dropdown( 'login_user_id' , $login_unt, $_POST['login_user_id'] ? $_POST['login_user_id'] : $login['login_user_id'] );
|
||||
|
||||
|
||||
if ( IN_DEV )
|
||||
{
|
||||
$form['login_safemode'] = $this->ipsclass->adskin->form_yes_no( 'login_safemode' , $_POST['login_safemode'] ? $_POST['login_safemode'] : $login['login_safemode'] );
|
||||
$form['login_installed'] = $this->ipsclass->adskin->form_yes_no( 'login_installed', $_POST['login_installed'] ? $_POST['login_installed']: $login['login_installed'] );
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->html->login_form( $form, $title, $formcode, $button, $login );
|
||||
|
||||
$this->ipsclass->html_help_title = "Óïðàâëåíèå àâòîðèçàöèåé";
|
||||
$this->ipsclass->html_help_msg = "Ýòà ñåêöèÿ ïîçâîëèò âàì óïðàâëÿòü èäåíòèôèêàöèîííûìè ìåòîäàìè äëÿ àâòîðèçàöèè.";
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( "", "Äîáàâëåíèå/èçìåíåíèå ìåòîäà àâòîðèçàöèè" );
|
||||
|
||||
$this->ipsclass->html_help_title = "Log In Manager";
|
||||
$this->ipsclass->html_help_msg = "This section will allow you to manage your log in authentication methods.";
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( "", "Add/Edit Login Module" );
|
||||
$this->ipsclass->admin->output();
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// List current log in types
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
function login_list()
|
||||
{
|
||||
//-------------------------------
|
||||
// INIT
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$content = "";
|
||||
|
||||
|
||||
//-------------------------------
|
||||
// Get components
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'login_methods', 'order' => 'login_title ASC' ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
while( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
//-------------------------------
|
||||
// Until IPB 3.0: hardcode some stuff
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$r['login_installed'] = 1;
|
||||
|
||||
|
||||
//-------------------------------
|
||||
// (Alex) Cross
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$r['_enabled_img'] = $r['login_enabled'] ? 'aff_tick.png' : 'aff_cross.png';
|
||||
$r['_installed_img'] = $r['login_installed'] ? 'aff_tick.png' : 'aff_cross.png';
|
||||
|
||||
|
||||
$content .= $this->html->login_row($r);
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->html->login_overview( $content );
|
||||
|
||||
$this->ipsclass->admin->page_title = "Óïðàâëåíèå àâòîðèçàöèÿìè";
|
||||
$this->ipsclass->admin->page_detail = "Ýòà ñåêöèÿ ïîçâîëèò âàì óïðàâëÿòü ñïîñîáàìè àâòîðèçàöèè.";
|
||||
|
||||
$this->ipsclass->admin->page_title = "Log In Authentication Manager";
|
||||
$this->ipsclass->admin->page_detail = "This section will allow you to manage your log in methods.";
|
||||
$this->ipsclass->admin->output();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,188 +1,180 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-06-08 17:11:50 +0100 (Thu, 08 Jun 2006) $
|
||||
| > $Revision: 289 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Admin Logs Stuff
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 11nd September 2002
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
| > DBA Checked: Mon 24th May 2004
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class ad_logs_login
|
||||
{
|
||||
|
||||
var $base_url;
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "admin";
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = "loginlog";
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Ïîïûòêè àâòîðèçàöèè â ÀÖ' );
|
||||
|
||||
//-----------------------------------------
|
||||
// LOAD HTML
|
||||
//-----------------------------------------
|
||||
|
||||
$this->html = $this->ipsclass->acp_load_template('cp_skin_admin');
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
default:
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->login_logs_view();
|
||||
break;
|
||||
case 'view_detail':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->login_logs_view_detail();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//*-------------------------------------------------------------------------*/
|
||||
// View detail
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function login_logs_view_detail()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$admin_id = intval( $this->ipsclass->input['detail'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get data from the deebee
|
||||
//-----------------------------------------
|
||||
|
||||
$log = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
|
||||
'from' => 'admin_login_logs',
|
||||
'where' => 'admin_id='.$admin_id ) );
|
||||
|
||||
if ( ! $log['admin_id'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "Ïî óêàçàííîé çàïèñè äåòàëåé íå íàéäåíî.";
|
||||
$this->login_logs_view();
|
||||
return;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Display...
|
||||
//-----------------------------------------
|
||||
|
||||
$log['_admin_time'] = $this->ipsclass->get_date( $log['admin_time'], 'LONG' );
|
||||
$log['_admin_post_details'] = unserialize( $log['admin_post_details'] );
|
||||
$log['_admin_img'] = $log['admin_success'] ? 'aff_tick.png' : 'aff_cross.png';
|
||||
|
||||
//-----------------------------------------
|
||||
// Show...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->html->acp_last_logins_detail( $log );
|
||||
|
||||
$this->ipsclass->admin->print_popup();
|
||||
}
|
||||
|
||||
//*-------------------------------------------------------------------------*/
|
||||
// View current log in logs
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function login_logs_view()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$start = intval( $this->ipsclass->input['st'] );
|
||||
$perpage = 50;
|
||||
|
||||
//-----------------------------------------
|
||||
// Get log count
|
||||
//-----------------------------------------
|
||||
|
||||
$count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(*) as count',
|
||||
'from' => 'admin_login_logs' ) );
|
||||
|
||||
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => intval( $count['count'] ),
|
||||
'PER_PAGE' => $perpage,
|
||||
'CUR_ST_VAL' => $start,
|
||||
'L_SINGLE' => "",
|
||||
'L_MULTI' => "Ñòðàíèö: ",
|
||||
'BASE_URL' => $this->ipsclass->base_url.$this->ipsclass->form_code ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get from DB
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => '*',
|
||||
'from' => 'admin_login_logs',
|
||||
'order' => 'admin_time DESC',
|
||||
'limit' => array( $start, $perpage ) ) );
|
||||
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
while( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$row['_admin_time'] = $this->ipsclass->admin->get_date( $row['admin_time'] );
|
||||
$row['_admin_img'] = $row['admin_success'] ? 'aff_tick.png' : 'aff_cross.png';
|
||||
|
||||
$logins .= $this->html->acp_last_logins_row( $row );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Print...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( "Ïîïûòêè àâòîðèçàöèè â ÀÖ", "Íà ýòîé ñòðàíèöå îòîáðàæåíû âñå ïîïûòêè àâòîðèçàöèè â àäìèíöåíòð âàøåãî ôîðóìà.<br />Êðàñíûì èíäèêàòîðîì îòìå÷åíû íåóäà÷íûå ïîïûòêè àâòîðèçàöèè, â òî âðåìÿ êàê çåëåíûì — óäà÷íûå." ) . "<br />";
|
||||
|
||||
$this->ipsclass->html .= $this->html->acp_last_logins_wrapper( $logins, $links );
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-06-08 17:11:50 +0100 (Thu, 08 Jun 2006) $
|
||||
| > $Revision: 289 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Admin Logs Stuff
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 11nd September 2002
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
| > DBA Checked: Mon 24th May 2004
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class ad_logs_login
|
||||
{
|
||||
|
||||
var $base_url;
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "admin";
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = "loginlog";
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'ACP Log-in Logs' );
|
||||
|
||||
//-----------------------------------------
|
||||
// LOAD HTML
|
||||
//-----------------------------------------
|
||||
|
||||
$this->html = $this->ipsclass->acp_load_template('cp_skin_admin');
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
default:
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->login_logs_view();
|
||||
break;
|
||||
case 'view_detail':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->login_logs_view_detail();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//*-------------------------------------------------------------------------*/
|
||||
// View detail
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function login_logs_view_detail()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$admin_id = intval( $this->ipsclass->input['detail'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get data from the deebee
|
||||
//-----------------------------------------
|
||||
|
||||
$log = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
|
||||
'from' => 'admin_login_logs',
|
||||
'where' => 'admin_id='.$admin_id ) );
|
||||
|
||||
if ( ! $log['admin_id'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "No log for that ID found";
|
||||
$this->login_logs_view();
|
||||
return;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Display...
|
||||
//-----------------------------------------
|
||||
|
||||
$log['_admin_time'] = $this->ipsclass->get_date( $log['admin_time'], 'LONG' );
|
||||
$log['_admin_post_details'] = unserialize( $log['admin_post_details'] );
|
||||
$log['_admin_img'] = $log['admin_success'] ? 'aff_tick.png' : 'aff_cross.png';
|
||||
|
||||
//-----------------------------------------
|
||||
// Show...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->html->acp_last_logins_detail( $log );
|
||||
|
||||
$this->ipsclass->admin->print_popup();
|
||||
}
|
||||
|
||||
//*-------------------------------------------------------------------------*/
|
||||
// View current log in logs
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function login_logs_view()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$start = intval( $this->ipsclass->input['st'] );
|
||||
$perpage = 50;
|
||||
|
||||
//-----------------------------------------
|
||||
// Get log count
|
||||
//-----------------------------------------
|
||||
|
||||
$count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(*) as count',
|
||||
'from' => 'admin_login_logs' ) );
|
||||
|
||||
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => intval( $count['count'] ),
|
||||
'PER_PAGE' => $perpage,
|
||||
'CUR_ST_VAL' => $start,
|
||||
'L_SINGLE' => "",
|
||||
'L_MULTI' => "Pages: ",
|
||||
'BASE_URL' => $this->ipsclass->base_url.'&'.$this->ipsclass->form_code ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get from DB
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => '*',
|
||||
'from' => 'admin_login_logs',
|
||||
'order' => 'admin_time DESC',
|
||||
'limit' => array( $start, $perpage ) ) );
|
||||
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
while( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$row['_admin_time'] = $this->ipsclass->admin->get_date( $row['admin_time'] );
|
||||
$row['_admin_img'] = $row['admin_success'] ? 'aff_tick.png' : 'aff_cross.png';
|
||||
|
||||
$logins .= $this->html->acp_last_logins_row( $row );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Print...
|
||||
//-----------------------------------------
|
||||
|
||||
//$this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( "ACP Log-in Attempts", "This page shows all the recorded ACP log in attempts.<br />The red cross indicates an error when logging in and a green tick indicates a successful log in." ) . "<br />";
|
||||
|
||||
$this->ipsclass->html .= $this->html->acp_last_logins_wrapper( $logins, $links );
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
+1563
-1502
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -2,26 +2,18 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
| > $Date: 2008-03-28 18:08:02 -0400 (Fri, 28 Mar 2008) $
|
||||
| > $Revision: 1232 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Import functions
|
||||
@@ -36,7 +28,7 @@
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -48,7 +40,7 @@ class ad_modlogs {
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "admin";
|
||||
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
@@ -58,44 +50,44 @@ class ad_modlogs {
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Æóðíàë ìîäåðèðîâàíèÿ' );
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Moderator Logs' );
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
|
||||
|
||||
case 'view':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->view();
|
||||
break;
|
||||
|
||||
|
||||
case 'remove':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
|
||||
$this->remove();
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
default:
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->list_current();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove archived files
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function view()
|
||||
{
|
||||
$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Ïðîñìîòð äåéñòâèé ìîäåðèðîâàíèÿ ôîðóìà";
|
||||
$this->ipsclass->admin->page_title = "Æóðíàë ìîäåðèðîâàíèÿ";
|
||||
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Viewing all actions by a moderator";
|
||||
$this->ipsclass->admin->page_title = "Moderator Logs Manager";
|
||||
|
||||
if ( !isset($this->ipsclass->input['search_string']) OR $this->ipsclass->input['search_string'] == "")
|
||||
{
|
||||
if (! $this->ipsclass->input['mid'] )
|
||||
@@ -103,27 +95,27 @@ class ad_modlogs {
|
||||
// Empty search form...sneaky...
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as count', 'from' => 'moderator_logs' ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
$row = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
|
||||
$row_count = $row['count'];
|
||||
|
||||
$query = "&act=modlog&code=view";
|
||||
|
||||
|
||||
$query = "&{$this->ipsclass->form_code}&code=view";
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'modlogs_view_three', array( 'start' => $start ) );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as count', 'from' => 'moderator_logs', 'where' => "member_id=".intval($this->ipsclass->input['mid']) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
$row = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
|
||||
$row_count = $row['count'];
|
||||
|
||||
$query = "&act=modlog&mid={$this->ipsclass->input['mid']}&code=view";
|
||||
|
||||
|
||||
$query = "&{$this->ipsclass->form_code}&mid={$this->ipsclass->input['mid']}&code=view";
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'modlogs_view_one', array( 'mid' => intval($this->ipsclass->input['mid']), 'start' => $start ) );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
}
|
||||
@@ -131,7 +123,7 @@ class ad_modlogs {
|
||||
else
|
||||
{
|
||||
$this->ipsclass->input['search_string'] = urldecode($this->ipsclass->input['search_string']);
|
||||
|
||||
|
||||
if ( ($this->ipsclass->input['search_type'] == 'topic_id') or ($this->ipsclass->input['search_type'] == 'forum_id') )
|
||||
{
|
||||
$dbq = "m.".$this->ipsclass->input['search_type']."='".$this->ipsclass->input['search_string']."'";
|
||||
@@ -140,62 +132,62 @@ class ad_modlogs {
|
||||
{
|
||||
$dbq = "m.".$this->ipsclass->input['search_type']." LIKE '%".$this->ipsclass->input['search_string']."%'";
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(m.id) as count', 'from' => 'moderator_logs m', 'where' => $dbq ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
$row = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
|
||||
$row_count = $row['count'];
|
||||
|
||||
|
||||
$query = "&act=modlog&code=view&search_type={$this->ipsclass->input['search_type']}&search_string=".urlencode($this->ipsclass->input['search_string']);
|
||||
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'modlogs_view_two', array( 'dbq' => $dbq, 'start' => $start ) );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
}
|
||||
|
||||
|
||||
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $row_count,
|
||||
'PER_PAGE' => 20,
|
||||
'CUR_ST_VAL' => $start,
|
||||
'L_SINGLE' => "Ñòðàíèöà",
|
||||
'L_MULTI' => "Ñòðàíèöû: ",
|
||||
'BASE_URL' => $this->ipsclass->base_url.$query,
|
||||
'L_SINGLE' => "Single Page",
|
||||
'L_MULTI' => "Pages: ",
|
||||
'BASE_URL' => $this->ipsclass->base_url.'&'.$this->ipsclass->form_code.$query,
|
||||
)
|
||||
);
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Â ýòîé ñåêöèè âû ìîæåòå ïðîñìàòðèâàòü è óïðàâëÿòü æóðíàëîì ìîäåðèðîâàíèÿ ôîðóìîâ";
|
||||
$this->ipsclass->admin->page_title = "Æóðíàë ìîäåðèðîâàíèÿ";
|
||||
|
||||
|
||||
$this->ipsclass->admin->page_detail = "You may view and remove actions performed by your moderators";
|
||||
$this->ipsclass->admin->page_title = "Moderator Logs Manager";
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ìîäåðàòîð" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Äåéñòâèå" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ôîðóì" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Òåìà" , "25%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Âðåìÿ" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "IP-àäðåñ" , "10%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Æóðíàë äåéñòâèé" );
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Member Name" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Action Performed" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Forum" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Topic Title" , "25%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Time of action" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "IP address" , "10%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Moderator Logs" );
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader');
|
||||
|
||||
|
||||
if ( $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
while ( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$row['ctime'] = $this->ipsclass->admin->get_date( $row['ctime'], 'LONG' );
|
||||
|
||||
|
||||
if ( $row['topic_id'] )
|
||||
{
|
||||
$topicid = "<br />ID òåìû: ".$row['topic_id'];
|
||||
$topicid = "<br />Topic ID: ".$row['topic_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$topicid = " ";
|
||||
}
|
||||
|
||||
|
||||
$sess_id = preg_replace( "/^.+?s=(\w{32}).+?$/" , "\\1", $row['http_referer'] );
|
||||
$row['http_referer'] = preg_replace( "/s=(\w){32}/" , "" , $row['http_referer'] );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>{$row['members_display_name']}</b>",
|
||||
"<span style='font-weight:bold;color:red'>{$row['action']}</span>",
|
||||
"<b>{$row['name']}</b>",
|
||||
@@ -207,91 +199,91 @@ class ad_modlogs {
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Íåò çàïèñåé</center>");
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>No results</center>");
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader');
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove archived files
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function remove()
|
||||
{
|
||||
if ($this->ipsclass->input['mid'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü ID ìîäåðàòîðà!");
|
||||
$this->ipsclass->admin->error("You did not select a member ID to remove by!");
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'moderator_logs', 'where' => "member_id=".intval($this->ipsclass->input['mid']) ) );
|
||||
|
||||
$this->ipsclass->admin->save_log("Óäàëåíû çàïèñè èç æóðíàëà ìîäåðèðîâàíèÿ");
|
||||
|
||||
$this->ipsclass->boink_it($this->ipsclass->base_url."&act=modlog");
|
||||
|
||||
$this->ipsclass->admin->save_log("Removed Moderator Logs");
|
||||
|
||||
$this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}&act=modlog");
|
||||
exit();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// SHOW ALL LANGUAGE PACKS
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function list_current()
|
||||
{
|
||||
$form_array = array();
|
||||
|
||||
$this->ipsclass->admin->page_detail = "You may view and remove actions performed by your moderators";
|
||||
$this->ipsclass->admin->page_title = "Moderator Logs Manager";
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Â ýòîé ñåêöèè âû ìîæåòå ïðîñìàòðèâàòü è óïðàâëÿòü æóðíàëîì ìîäåðèðîâàíèÿ ôîðóìîâ";
|
||||
$this->ipsclass->admin->page_title = "Æóðíàë ìîäåðèðîâàíèÿ";
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// VIEW LAST 5
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'modlogs_list_current_last_five', array() );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ìîäåðàòîð" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Äåéñòâèå" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ôîðóì" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Òåìà" , "25%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Âðåìÿ" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "IP-àäðåñ" , "10%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîñëåäíèå 5 äåéñòâèé" );
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Member Name" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Action Performed" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Forum" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Topic Title" , "25%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Time of action" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "IP address" , "10%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Last 5 Moderation Actions" );
|
||||
|
||||
if ( $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
while ( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
|
||||
|
||||
$row['ctime'] = $this->ipsclass->admin->get_date( $row['ctime'], 'LONG' );
|
||||
|
||||
|
||||
$topicid = "";
|
||||
|
||||
|
||||
if ( $row['topic_id'] )
|
||||
{
|
||||
$topicid = "<br />ID òåìû: ".$row['topic_id'];
|
||||
$topicid = "<br />Topic ID: ".$row['topic_id'];
|
||||
}
|
||||
|
||||
|
||||
$sess_id = preg_replace( "/^.+?s=(\w{32}).+?$/" , "\\1", $row['http_referer'] );
|
||||
$row['http_referer'] = preg_replace( "/s=(\w){32}/" , "" , $row['http_referer'] );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>{$row['members_display_name']}</b>",
|
||||
"<span style='font-weight:bold;color:red'>{$row['action']}</span>",
|
||||
"<b>{$row['name']}</b>",
|
||||
@@ -303,81 +295,81 @@ class ad_modlogs {
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Íåò çàïèñåé</center>");
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>No results</center>");
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ìîäåðàòîð" , "30%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Äåéñòâèé ñîâåðøåíî" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ïðîñìîòð âñåõ äåéñòâèé" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Óäàëåíèå âñåõ äåéñòâèé" , "30%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Æóðíàë ìîäåðèðîâàíèÿ" );
|
||||
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Member Name" , "30%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Actions Performed" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "View all by member" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Remove all by member" , "30%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Moderator Logs" );
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'modlogs_list_current_show_all', array() );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>{$r['members_display_name']}</b>",
|
||||
"<center>{$r['act_count']}</center>",
|
||||
"<center><a href='".$this->ipsclass->base_url."&act=modlog&code=view&mid={$r['member_id']}'>Ïðîñìîòð</a></center>",
|
||||
"<center><a href='".$this->ipsclass->base_url."&act=modlog&code=remove&mid={$r['member_id']}'>Óäàëåíèå</a></center>",
|
||||
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&act=modlog&code=view&mid={$r['member_id']}'>View</a></center>",
|
||||
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&act=modlog&code=remove&mid={$r['member_id']}'>Remove</a></center>",
|
||||
) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'view' ),
|
||||
2 => array( 'act' , 'modlog' ),
|
||||
4 => array( 'section', $this->ipsclass->section_code ),
|
||||
) );
|
||||
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîèñê äåéñòâèé â æóðíàëå" );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Moderator Logs" );
|
||||
|
||||
$form_array = array(
|
||||
0 => array( 'topic_title', 'Íàçâàíèå òåìû' ),
|
||||
1 => array( 'ip_address', 'IP-àäðåñ' ),
|
||||
2 => array( 'member_name', 'Ìîäåðàòîð' ),
|
||||
3 => array( 'topic_id' , 'ID òåìû' ),
|
||||
4 => array( 'forum_id' , 'ID ôîðóìà' )
|
||||
0 => array( 'topic_title', 'Topic Title' ),
|
||||
1 => array( 'ip_address', 'IP Address' ),
|
||||
2 => array( 'member_name', 'Member Name' ),
|
||||
3 => array( 'topic_id' , 'Topic ID' ),
|
||||
4 => array( 'forum_id' , 'Forum ID' )
|
||||
);
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñêàòü </b>" ,
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Search for...</b>" ,
|
||||
$this->ipsclass->adskin->form_input( "search_string")
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñêàòü â </b>" ,
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Search in...</b>" ,
|
||||
$this->ipsclass->adskin->form_dropdown( "search_type", $form_array)
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Èñêàòü");
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search");
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -2,25 +2,17 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-10-11 13:01:38 -0500 (Wed, 11 Oct 2006) $
|
||||
| > $Revision: 628 $
|
||||
| > $Date: 2007-10-17 16:30:00 -0400 (Wed, 17 Oct 2007) $
|
||||
| > $Revision: 1133 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
@@ -333,8 +325,8 @@ class ad_paysubscriptions
|
||||
$this->ipsclass->DB->do_insert( 'subscription_methods', array( 'submethod_title' => $this->gateway->db_info['human_title'],
|
||||
'submethod_desc' => $this->gateway->db_info['human_desc'],
|
||||
'submethod_name' => $this->gateway->db_info['module_name'],
|
||||
'submethod_is_cc' => $this->gateway->db_info['allow_creditcards'],
|
||||
'submethod_is_auto' => $this->gateway->db_info['allow_auto_validate'],
|
||||
'submethod_is_cc' => intval($this->gateway->db_info['allow_creditcards']),
|
||||
'submethod_is_auto' => intval($this->gateway->db_info['allow_auto_validate']),
|
||||
'submethod_use_currency' => $this->gateway->db_info['default_currency'] ) );
|
||||
}
|
||||
|
||||
@@ -407,7 +399,7 @@ class ad_paysubscriptions
|
||||
// Already installed?
|
||||
//-------------------------------------------
|
||||
|
||||
if ( $methods[ $gateway ] )
|
||||
if ( isset($methods[ $gateway ]) AND $methods[ $gateway ] )
|
||||
{
|
||||
$installed = 1;
|
||||
}
|
||||
@@ -1345,10 +1337,10 @@ class ad_paysubscriptions
|
||||
'submethod_title' => $this->ipsclass->input['submethod_title'],
|
||||
'submethod_desc' => $this->ipsclass->txt_safeslashes( $_POST['submethod_desc'] ),
|
||||
'submethod_email' => $this->ipsclass->input['submethod_email'],
|
||||
'submethod_active' => $this->ipsclass->input['submethod_active'],
|
||||
'submethod_active' => intval($this->ipsclass->input['submethod_active']),
|
||||
'submethod_sid' => $this->ipsclass->input['submethod_sid'],
|
||||
'submethod_is_cc' => $this->ipsclass->input['submethod_is_css'],
|
||||
'submethod_is_auto' => $this->ipsclass->input['submethod_is_auto'],
|
||||
'submethod_is_cc' => intval($this->ipsclass->input['submethod_is_css']),
|
||||
'submethod_is_auto' => intval($this->ipsclass->input['submethod_is_auto']),
|
||||
'submethod_use_currency' => $this->ipsclass->input['submethod_use_currency'],
|
||||
);
|
||||
|
||||
@@ -1493,7 +1485,7 @@ class ad_paysubscriptions
|
||||
$this->ipsclass->html .= implode( "\n", $custom );
|
||||
}
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Activate this Gateway?</b><br />This will allow your members to use this option." ,
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Activate this Gateway?</b><br>This will allow your members to use this option." ,
|
||||
$this->ipsclass->adskin->form_yes_no("submethod_active", $row['submethod_active'] )
|
||||
) );
|
||||
|
||||
@@ -1951,6 +1943,11 @@ class ad_paysubscriptions
|
||||
|
||||
$end_date = $row['sub_unit'] == 'x' ? 'Lifetime' : $this->ipsclass->get_date( $row['subtrans_end_date'], 'JOINED', 1 );
|
||||
|
||||
if( !$row['sub_unit'] )
|
||||
{
|
||||
$end_date = '<i>N/A</i>';
|
||||
}
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<center><input type='checkbox' name='subtrans_id_{$row['subtrans_id']}' value='1' /></center>" ,
|
||||
"<b><a href='{$this->ipsclass->vars['board_url']}/index.php?showuser={$row['subtrans_member_id']}' target='_blank'>{$row['name']}</a></b><br /><span style='color:green'>[ <a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=edittransaction&id={$row['subtrans_id']}' style='color:green'>Edit Transaction</a> ]</span>",
|
||||
"{$row['email']}",
|
||||
@@ -2223,11 +2220,24 @@ class ad_paysubscriptions
|
||||
$new_expiry = 9999999999;
|
||||
}
|
||||
|
||||
$groups = array();
|
||||
|
||||
foreach( $this->ipsclass->cache['group_cache'] as $id => $data )
|
||||
{
|
||||
if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group']
|
||||
AND $id == $this->ipsclass->vars['admin_group'] )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$groups[] = $id;
|
||||
}
|
||||
|
||||
$save['subtrans_method'] = $this->ipsclass->input['subtrans_method'];
|
||||
$save['subtrans_end_date'] = $new_expiry;
|
||||
$save['subtrans_sub_id'] = $this->ipsclass->input['subtrans_sub_id'];
|
||||
$save['subtrans_state'] = $this->ipsclass->input['subtrans_state'];
|
||||
$save['subtrans_old_group'] = $this->ipsclass->input['subtrans_old_group'];
|
||||
$save['subtrans_old_group'] = in_array( $this->ipsclass->input['subtrans_old_group'], $groups ) ? $this->ipsclass->input['subtrans_old_group']: 0;
|
||||
$save['subtrans_paid'] = $this->ipsclass->input['subtrans_paid'];
|
||||
$save['subtrans_cumulative'] = $this->ipsclass->input['subtrans_paid'];
|
||||
|
||||
@@ -2340,11 +2350,14 @@ class ad_paysubscriptions
|
||||
|
||||
$groups = array( 0 => array( 0, "--Don't Change Group--" ) );
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => 'g_id,g_title', 'from' => 'groups', 'order' => 'g_title' ) );
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
foreach( $this->ipsclass->cache['group_cache'] as $id => $r )
|
||||
{
|
||||
if( $this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group']
|
||||
AND $r['g_id'] == $this->ipsclass->vars['admin_group'] )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$groups[] = array( $r['g_id'], $r['g_title'] );
|
||||
}
|
||||
|
||||
@@ -2799,7 +2812,7 @@ class ad_paysubscriptions
|
||||
{
|
||||
if ( $mark == 'paid' )
|
||||
{
|
||||
$change_date = time() + ( $row['sub_length'] * $day_to_seconds[ $row['sub_unit'] ] );
|
||||
$change_date = $row['sub_length'] ? time() + ( $row['sub_length'] * $day_to_seconds[ $row['sub_unit'] ] ) : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2893,7 +2906,7 @@ class ad_paysubscriptions
|
||||
$this->email->get_template("new_subscription");
|
||||
$this->email->build_message( array(
|
||||
'PACKAGE' => $row['sub_title'],
|
||||
'EXPIRES' => $this->ipsclass->get_date( $row['subtrans_end_date'], 'DATE' ),
|
||||
'EXPIRES' => $this->ipsclass->get_date( $row['subtrans_end_date'], 'DATE', 1 ),
|
||||
'LINK' => $this->ipsclass->vars['board_url'].'/index.'.$this->ipsclass->vars['php_ext'].'?act=paysubs&CODE=index',
|
||||
) );
|
||||
|
||||
|
||||
@@ -1,394 +1,386 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > PORTAL FUNCTIONS
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Tuesday 2nd August 2005 (10:32)
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* ACP MODULE: Portal Plug-ins
|
||||
*
|
||||
* Manage portal plug-ins
|
||||
*
|
||||
* @package InvisionPowerBoard
|
||||
* @subpackage ActionAdmin
|
||||
* @author Matt Mecham
|
||||
* @version 2.1
|
||||
* @since 2.1.0.2005-08-02
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* ACP MODULE: Portal Plug-ins
|
||||
*
|
||||
* Manage portal plug-ins
|
||||
*
|
||||
* @package InvisionPowerBoard
|
||||
* @subpackage ActionAdmin
|
||||
* @author Matt Mecham
|
||||
* @version 2.1
|
||||
* @since 2.1.0.2005-08-02
|
||||
*/
|
||||
class ad_portal
|
||||
{
|
||||
/**
|
||||
* IPB object
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
var $ipsclass;
|
||||
|
||||
/**
|
||||
* Perm main
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = 'tools';
|
||||
|
||||
/**
|
||||
* Perm child
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = 'portal';
|
||||
|
||||
/**
|
||||
* Portal objects
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
var $portal_objects = array();
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Main handler
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Load HTML
|
||||
//-----------------------------------------
|
||||
|
||||
$this->html = $this->ipsclass->acp_load_template('cp_skin_tools');
|
||||
|
||||
//-----------------------------------------
|
||||
// Load Language
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->acp_load_language( 'acp_lang_portal' );
|
||||
|
||||
//-----------------------------------------
|
||||
// What to do?
|
||||
//-----------------------------------------
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
case 'manage':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->portal_list();
|
||||
break;
|
||||
|
||||
case 'portal_settings':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
|
||||
$this->portal_settings();
|
||||
break;
|
||||
|
||||
case 'portal_viewtags':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
|
||||
$this->portal_viewtags();
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->portal_list();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* Rebuild Portal Cache
|
||||
*
|
||||
* @return void
|
||||
* @since 2.1.0.2005.08.02
|
||||
*/
|
||||
function portal_rebuildcache()
|
||||
{
|
||||
$this->ipsclass->cache['portal'] = array();
|
||||
|
||||
if ( ! is_array( $this->portal_objects ) or ! count( $this->portal_objects ) )
|
||||
{
|
||||
$this->get_portal_objects();
|
||||
}
|
||||
|
||||
$this->ipsclass->cache['portal'] = $this->portal_objects;
|
||||
|
||||
$this->ipsclass->update_cache( array( 'name' => 'portal', 'array' => 1, 'deletefirst' => 1 ) );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Show portal settings
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* Show portal settings
|
||||
*
|
||||
* @return void
|
||||
* @since 2.1.0.2005.08.02
|
||||
*/
|
||||
function portal_viewtags()
|
||||
{
|
||||
//-------------------------------
|
||||
// INIT
|
||||
//-------------------------------
|
||||
|
||||
$pc_key = $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['pc_key'] );
|
||||
$file = ROOT_PATH . 'sources/portal_plugins/'.$pc_key.'-cfg.php';
|
||||
$content = "";
|
||||
|
||||
//-------------------------------
|
||||
// Check
|
||||
//-------------------------------
|
||||
|
||||
if ( ! $pc_key OR ! file_exists( $file ) )
|
||||
{
|
||||
$this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_key'];
|
||||
$this->portal_list();
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Grab config file
|
||||
//-------------------------------
|
||||
|
||||
require_once( $file );
|
||||
|
||||
if ( is_array( $PORTAL_CONFIG['pc_exportable_tags'] ) AND count( $PORTAL_CONFIG['pc_exportable_tags'] ) )
|
||||
{
|
||||
foreach( $PORTAL_CONFIG['pc_exportable_tags'] as $tag => $tag_data )
|
||||
{
|
||||
$content .= $this->html->portal_pop_row( $tag, $tag_data[1] );
|
||||
}
|
||||
}
|
||||
|
||||
$this->ipsclass->html .= $this->html->portal_pop_overview( $PORTAL_CONFIG['pc_title'], $content );
|
||||
|
||||
//-------------------------------
|
||||
// Print
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->admin->print_popup();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Show portal settings
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* Show portal settings
|
||||
*
|
||||
* @return void
|
||||
* @since 2.1.0.2005.08.02
|
||||
*/
|
||||
function portal_settings()
|
||||
{
|
||||
//-------------------------------
|
||||
// Page Data
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, $this->ipsclass->acp_lang['main_nav'] );
|
||||
$this->ipsclass->admin->page_title = $this->ipsclass->acp_lang['main_title'];
|
||||
$this->ipsclass->admin->page_detail = $this->ipsclass->acp_lang['main_help'];
|
||||
|
||||
//-------------------------------
|
||||
// INIT
|
||||
//-------------------------------
|
||||
|
||||
$pc_key = $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['pc_key'] );
|
||||
$file = ROOT_PATH . 'sources/portal_plugins/'.$pc_key.'-cfg.php';
|
||||
|
||||
//-------------------------------
|
||||
// Check
|
||||
//-------------------------------
|
||||
|
||||
if ( ! $pc_key OR ! file_exists( $file ) )
|
||||
{
|
||||
$this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_key'];
|
||||
$this->portal_list();
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Grab config file
|
||||
//-------------------------------
|
||||
|
||||
require_once( $file );
|
||||
|
||||
if ( ! $PORTAL_CONFIG['pc_settings_keyword'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_settings'];
|
||||
$this->portal_list();
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Grab, init and load settings
|
||||
//-------------------------------
|
||||
|
||||
require_once( ROOT_PATH.'sources/action_admin/settings.php' );
|
||||
$settings = new ad_settings();
|
||||
$settings->ipsclass =& $this->ipsclass;
|
||||
|
||||
$settings->get_by_key = $PORTAL_CONFIG['pc_settings_keyword'];
|
||||
$settings->return_after_save = $this->ipsclass->form_code.'&code=portal_settings&pc_key='.$pc_key;
|
||||
|
||||
$settings->setting_view();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// List portal objects
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* List portal objects
|
||||
*
|
||||
* @return void
|
||||
* @since 2.1.0.2005.08.02
|
||||
*/
|
||||
function portal_list()
|
||||
{
|
||||
//-------------------------------
|
||||
// Page Data
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, $this->ipsclass->acp_lang['main_nav'] );
|
||||
$this->ipsclass->admin->page_title = $this->ipsclass->acp_lang['main_title'];
|
||||
$this->ipsclass->admin->page_detail = $this->ipsclass->acp_lang['main_help'];
|
||||
|
||||
//-------------------------------
|
||||
// INIT
|
||||
//-------------------------------
|
||||
|
||||
$content = "";
|
||||
|
||||
//-------------------------------
|
||||
// Get portal objects
|
||||
//-------------------------------
|
||||
|
||||
$this->get_portal_objects();
|
||||
|
||||
foreach( $this->portal_objects as $portal_data )
|
||||
{
|
||||
//-------------------------------
|
||||
// (Alex) Cross
|
||||
//-------------------------------
|
||||
|
||||
$content .= $this->html->portal_row( $portal_data );
|
||||
}
|
||||
|
||||
$this->ipsclass->html .= $this->html->portal_overview( $content );
|
||||
|
||||
//-------------------------------
|
||||
// Update cache
|
||||
//-------------------------------
|
||||
|
||||
$this->portal_rebuildcache();
|
||||
|
||||
//-------------------------------
|
||||
// Print
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Return portal objects
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* Return portal objects
|
||||
*
|
||||
* Picks through the portal objects directory
|
||||
*
|
||||
* @return void
|
||||
* @since 2.1.0.2005.08.02
|
||||
*/
|
||||
function get_portal_objects()
|
||||
{
|
||||
//-------------------------------
|
||||
// Got a directory?
|
||||
//-------------------------------
|
||||
|
||||
if ( ! file_exists( ROOT_PATH.'sources/portal_plugins' ) )
|
||||
{
|
||||
$this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_dir'];
|
||||
$this->portal_objects = array();
|
||||
return;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Go loopy
|
||||
//-------------------------------
|
||||
|
||||
$handle = opendir( ROOT_PATH.'sources/portal_plugins' );
|
||||
|
||||
while ( ($file = readdir($handle) ) !== FALSE )
|
||||
{
|
||||
if ( ($file != ".") && ($file != "..") )
|
||||
{
|
||||
preg_match( "#^(.*)-cfg\.php$#", $file, $matches );
|
||||
|
||||
if ( $matches[0] AND $matches[1] )
|
||||
{
|
||||
//-------------------------------
|
||||
// Include file...
|
||||
//-------------------------------
|
||||
|
||||
$PORTAL_CONFIG = array();
|
||||
|
||||
require_once( ROOT_PATH . 'sources/portal_plugins/' . $matches[0] );
|
||||
|
||||
if ( is_array( $PORTAL_CONFIG ) AND count( $PORTAL_CONFIG ) )
|
||||
{
|
||||
$PORTAL_CONFIG['pc_key'] = $matches[1];
|
||||
|
||||
$this->portal_objects[ $matches[1] ] = $PORTAL_CONFIG;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closedir($handle);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > PORTAL FUNCTIONS
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Tuesday 2nd August 2005 (10:32)
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* ACP MODULE: Portal Plug-ins
|
||||
*
|
||||
* Manage portal plug-ins
|
||||
*
|
||||
* @package InvisionPowerBoard
|
||||
* @subpackage ActionAdmin
|
||||
* @author Matt Mecham
|
||||
* @version 2.1
|
||||
* @since 2.1.0.2005-08-02
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* ACP MODULE: Portal Plug-ins
|
||||
*
|
||||
* Manage portal plug-ins
|
||||
*
|
||||
* @package InvisionPowerBoard
|
||||
* @subpackage ActionAdmin
|
||||
* @author Matt Mecham
|
||||
* @version 2.1
|
||||
* @since 2.1.0.2005-08-02
|
||||
*/
|
||||
class ad_portal
|
||||
{
|
||||
/**
|
||||
* IPB object
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
var $ipsclass;
|
||||
|
||||
/**
|
||||
* Perm main
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = 'tools';
|
||||
|
||||
/**
|
||||
* Perm child
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = 'portal';
|
||||
|
||||
/**
|
||||
* Portal objects
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
var $portal_objects = array();
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Main handler
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Load HTML
|
||||
//-----------------------------------------
|
||||
|
||||
$this->html = $this->ipsclass->acp_load_template('cp_skin_tools');
|
||||
|
||||
//-----------------------------------------
|
||||
// Load Language
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->acp_load_language( 'acp_lang_portal' );
|
||||
|
||||
//-----------------------------------------
|
||||
// What to do?
|
||||
//-----------------------------------------
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
case 'manage':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->portal_list();
|
||||
break;
|
||||
|
||||
case 'portal_settings':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
|
||||
$this->portal_settings();
|
||||
break;
|
||||
|
||||
case 'portal_viewtags':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
|
||||
$this->portal_viewtags();
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->portal_list();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* Rebuild Portal Cache
|
||||
*
|
||||
* @return void
|
||||
* @since 2.1.0.2005.08.02
|
||||
*/
|
||||
function portal_rebuildcache()
|
||||
{
|
||||
$this->ipsclass->cache['portal'] = array();
|
||||
|
||||
if ( ! is_array( $this->portal_objects ) or ! count( $this->portal_objects ) )
|
||||
{
|
||||
$this->get_portal_objects();
|
||||
}
|
||||
|
||||
$this->ipsclass->cache['portal'] = $this->portal_objects;
|
||||
|
||||
$this->ipsclass->update_cache( array( 'name' => 'portal', 'array' => 1, 'deletefirst' => 1 ) );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Show portal settings
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* Show portal settings
|
||||
*
|
||||
* @return void
|
||||
* @since 2.1.0.2005.08.02
|
||||
*/
|
||||
function portal_viewtags()
|
||||
{
|
||||
//-------------------------------
|
||||
// INIT
|
||||
//-------------------------------
|
||||
|
||||
$pc_key = $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['pc_key'] );
|
||||
$file = ROOT_PATH . 'sources/portal_plugins/'.$pc_key.'-cfg.php';
|
||||
$content = "";
|
||||
|
||||
//-------------------------------
|
||||
// Check
|
||||
//-------------------------------
|
||||
|
||||
if ( ! $pc_key OR ! file_exists( $file ) )
|
||||
{
|
||||
$this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_key'];
|
||||
$this->portal_list();
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Grab config file
|
||||
//-------------------------------
|
||||
|
||||
require_once( $file );
|
||||
|
||||
if ( is_array( $PORTAL_CONFIG['pc_exportable_tags'] ) AND count( $PORTAL_CONFIG['pc_exportable_tags'] ) )
|
||||
{
|
||||
foreach( $PORTAL_CONFIG['pc_exportable_tags'] as $tag => $tag_data )
|
||||
{
|
||||
$content .= $this->html->portal_pop_row( $tag, $tag_data[1] );
|
||||
}
|
||||
}
|
||||
|
||||
$this->ipsclass->html .= $this->html->portal_pop_overview( $PORTAL_CONFIG['pc_title'], $content );
|
||||
|
||||
//-------------------------------
|
||||
// Print
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->admin->print_popup();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Show portal settings
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* Show portal settings
|
||||
*
|
||||
* @return void
|
||||
* @since 2.1.0.2005.08.02
|
||||
*/
|
||||
function portal_settings()
|
||||
{
|
||||
//-------------------------------
|
||||
// Page Data
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, $this->ipsclass->acp_lang['main_nav'] );
|
||||
$this->ipsclass->admin->page_title = $this->ipsclass->acp_lang['main_title'];
|
||||
$this->ipsclass->admin->page_detail = $this->ipsclass->acp_lang['main_help'];
|
||||
|
||||
//-------------------------------
|
||||
// INIT
|
||||
//-------------------------------
|
||||
|
||||
$pc_key = $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['pc_key'] );
|
||||
$file = ROOT_PATH . 'sources/portal_plugins/'.$pc_key.'-cfg.php';
|
||||
|
||||
//-------------------------------
|
||||
// Check
|
||||
//-------------------------------
|
||||
|
||||
if ( ! $pc_key OR ! file_exists( $file ) )
|
||||
{
|
||||
$this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_key'];
|
||||
$this->portal_list();
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Grab config file
|
||||
//-------------------------------
|
||||
|
||||
require_once( $file );
|
||||
|
||||
if ( ! $PORTAL_CONFIG['pc_settings_keyword'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_settings'];
|
||||
$this->portal_list();
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Grab, init and load settings
|
||||
//-------------------------------
|
||||
|
||||
require_once( ROOT_PATH.'sources/action_admin/settings.php' );
|
||||
$settings = new ad_settings();
|
||||
$settings->ipsclass =& $this->ipsclass;
|
||||
|
||||
$settings->get_by_key = $PORTAL_CONFIG['pc_settings_keyword'];
|
||||
$settings->return_after_save = $this->ipsclass->form_code.'&code=portal_settings&pc_key='.$pc_key;
|
||||
|
||||
$settings->setting_view();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// List portal objects
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* List portal objects
|
||||
*
|
||||
* @return void
|
||||
* @since 2.1.0.2005.08.02
|
||||
*/
|
||||
function portal_list()
|
||||
{
|
||||
//-------------------------------
|
||||
// Page Data
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, $this->ipsclass->acp_lang['main_nav'] );
|
||||
$this->ipsclass->admin->page_title = $this->ipsclass->acp_lang['main_title'];
|
||||
$this->ipsclass->admin->page_detail = $this->ipsclass->acp_lang['main_help'];
|
||||
|
||||
//-------------------------------
|
||||
// INIT
|
||||
//-------------------------------
|
||||
|
||||
$content = "";
|
||||
|
||||
//-------------------------------
|
||||
// Get portal objects
|
||||
//-------------------------------
|
||||
|
||||
$this->get_portal_objects();
|
||||
|
||||
foreach( $this->portal_objects as $portal_data )
|
||||
{
|
||||
//-------------------------------
|
||||
// (Alex) Cross
|
||||
//-------------------------------
|
||||
|
||||
$content .= $this->html->portal_row( $portal_data );
|
||||
}
|
||||
|
||||
$this->ipsclass->html .= $this->html->portal_overview( $content );
|
||||
|
||||
//-------------------------------
|
||||
// Update cache
|
||||
//-------------------------------
|
||||
|
||||
$this->portal_rebuildcache();
|
||||
|
||||
//-------------------------------
|
||||
// Print
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Return portal objects
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* Return portal objects
|
||||
*
|
||||
* Picks through the portal objects directory
|
||||
*
|
||||
* @return void
|
||||
* @since 2.1.0.2005.08.02
|
||||
*/
|
||||
function get_portal_objects()
|
||||
{
|
||||
//-------------------------------
|
||||
// Got a directory?
|
||||
//-------------------------------
|
||||
|
||||
if ( ! file_exists( ROOT_PATH.'sources/portal_plugins' ) )
|
||||
{
|
||||
$this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_dir'];
|
||||
$this->portal_objects = array();
|
||||
return;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Go loopy
|
||||
//-------------------------------
|
||||
|
||||
$handle = opendir( ROOT_PATH.'sources/portal_plugins' );
|
||||
|
||||
while ( ($file = readdir($handle) ) !== FALSE )
|
||||
{
|
||||
if ( ($file != ".") && ($file != "..") )
|
||||
{
|
||||
preg_match( "#^(.*)-cfg\.php$#", $file, $matches );
|
||||
|
||||
if ( $matches[0] AND $matches[1] )
|
||||
{
|
||||
//-------------------------------
|
||||
// Include file...
|
||||
//-------------------------------
|
||||
|
||||
$PORTAL_CONFIG = array();
|
||||
|
||||
require_once( ROOT_PATH . 'sources/portal_plugins/' . $matches[0] );
|
||||
|
||||
if ( is_array( $PORTAL_CONFIG ) AND count( $PORTAL_CONFIG ) )
|
||||
{
|
||||
$PORTAL_CONFIG['pc_key'] = $matches[1];
|
||||
|
||||
$this->portal_objects[ $matches[1] ] = $PORTAL_CONFIG;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closedir($handle);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
+1067
-1077
File diff suppressed because it is too large.
Load diff
@@ -1,205 +1,197 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-10-05 11:04:08 -0500 (Thu, 05 Oct 2006) $
|
||||
| > $Revision: 609 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > ACP Prefs functions
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 22nd May 2003
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class ad_prefs {
|
||||
|
||||
var $base_url;
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Show the wee form
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->ipsclass->input['set'] == 1 )
|
||||
{
|
||||
$this->msg = 'Savings set';
|
||||
|
||||
if ( $this->ipsclass->input['tx'] == "" or $this->ipsclass->input['ty'] == "" )
|
||||
{
|
||||
$this->msg = 'Ïîæàëóéñòà, çàïîëíèòå ôîðìó';
|
||||
|
||||
print $this->get_html();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->my_setcookie( 'acpprefs', $this->ipsclass->input['menu'] .','. $this->ipsclass->input['tx'] .','. $this->ipsclass->input['ty'] .','. $this->ipsclass->input['preview']);
|
||||
|
||||
$this->msg = 'Íàñòðîéêè ñîõðàíåíû ';
|
||||
|
||||
$this->tx = $this->ipsclass->input['tx'];
|
||||
$this->ty = $this->ipsclass->input['ty'];
|
||||
|
||||
if ( $this->ipsclass->input['menu'] )
|
||||
{
|
||||
$this->s_yes = 'selected';
|
||||
$this->s_no = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->s_yes = '';
|
||||
$this->s_no = 'selected';
|
||||
}
|
||||
|
||||
if ( $this->ipsclass->input['preview'] )
|
||||
{
|
||||
$this->p_yes = 'selected';
|
||||
$this->p_no = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->p_yes = '';
|
||||
$this->p_no = 'selected';
|
||||
}
|
||||
|
||||
print $this->get_html();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$state = 0;
|
||||
$tx = 80;
|
||||
$ty = 40;
|
||||
|
||||
if ( $cookie = $this->ipsclass->my_getcookie('acpprefs') )
|
||||
{
|
||||
list( $state, $tx, $ty, $prev_show ) = explode( ",", $cookie );
|
||||
}
|
||||
|
||||
$this->tx = $tx;
|
||||
$this->ty = $ty;
|
||||
|
||||
if ( $state )
|
||||
{
|
||||
$this->s_yes = 'selected';
|
||||
$this->s_no = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->s_yes = '';
|
||||
$this->s_no = 'selected';
|
||||
}
|
||||
|
||||
if ( $prev_show )
|
||||
{
|
||||
$this->p_yes = 'selected';
|
||||
$this->p_no = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->p_yes = '';
|
||||
$this->p_no = 'selected';
|
||||
}
|
||||
|
||||
print $this->get_html();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function get_html()
|
||||
{
|
||||
global $SKIN;
|
||||
|
||||
$hit_muhl = <<<EOF
|
||||
<html>
|
||||
<head>
|
||||
<title>IPB-âàøè ïðåäïî÷òåíèÿ</title>
|
||||
<style type='text/css'>
|
||||
BODY {
|
||||
font-size: 10px;
|
||||
font-family: Verdana, Arial, Sans-Serif;
|
||||
color:#000;
|
||||
padding:0px;
|
||||
margin:5px 5px 5px 5px;
|
||||
background-color: #F5F9FD
|
||||
}
|
||||
|
||||
TABLE, TD, TR {
|
||||
font-family: Verdana,Arial, Sans-Serif;
|
||||
color:#000;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
a:link, a:visited, a:active { color:#000055 }
|
||||
a:hover { color:#333377;text-decoration:underline }
|
||||
input {vertical-align:middle}
|
||||
.textinput { background-color: #DFE6EF;; color:Ê#000; font-size:10px; font-family: Verdana,Arial, Sans-Serif; padding:2px; }
|
||||
|
||||
</style>
|
||||
<script type='text/javascript'>
|
||||
var msg = "{$this->msg}";
|
||||
|
||||
if ( msg != "" )
|
||||
{
|
||||
alert( msg );
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form action="{$this->ipsclass->base_url}&act=prefs&set=1" method="post">
|
||||
<input type='hidden' name='_admin_auth_key' value='{$this->ipsclass->_admin_auth_key}' />
|
||||
<fieldset style='padding:10px'>
|
||||
<legend>Âàøè ïðåäïî÷òåíèÿ â àäìèíöåíòðå</legend>
|
||||
<strong>Ñîõðàíèòü ðàñïîëîæåíèå ìåíþ àäìèíöåíòðà</strong> <select class='textinput' name='menu'><option value='1' {$this->s_yes}>Äà</option><option value='0' {$this->s_no}>Íåò</option></select>
|
||||
<br /><br />
|
||||
<strong>Ðàçìåð øðèôòà â òåêñòáîêñàõ</strong> <input class='textinput' type='text' size='3' name='tx' value='{$this->tx}' /> <strong>X</strong> <input class='textinput' type='text' size='3' name='ty' value='{$this->ty}' />
|
||||
<br /><br />
|
||||
<strong>Ïîêàçûâàòü ïðåäïðîñìîòðò ìàêðîñà</strong> <select class='textinput' name='preview'><option value='1' {$this->p_yes}>Äà</option><option value='0' {$this->p_no}>Íåò</option></select>
|
||||
<br /><br />
|
||||
<center><input type='submit' class='textinput' value='Ñîõðàíèòü' /></center>
|
||||
</fieldset>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
EOF;
|
||||
|
||||
return $hit_muhl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-10-05 12:04:08 -0400 (Thu, 05 Oct 2006) $
|
||||
| > $Revision: 609 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > ACP Prefs functions
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 22nd May 2003
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class ad_prefs {
|
||||
|
||||
var $base_url;
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Show the wee form
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->ipsclass->input['set'] == 1 )
|
||||
{
|
||||
$this->msg = 'Savings set';
|
||||
|
||||
if ( $this->ipsclass->input['tx'] == "" or $this->ipsclass->input['ty'] == "" )
|
||||
{
|
||||
$this->msg = 'Please complete the form';
|
||||
|
||||
print $this->get_html();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->my_setcookie( 'acpprefs', $this->ipsclass->input['menu'] .','. $this->ipsclass->input['tx'] .','. $this->ipsclass->input['ty'] .','. $this->ipsclass->input['preview']);
|
||||
|
||||
$this->msg = 'Settings saved';
|
||||
|
||||
$this->tx = $this->ipsclass->input['tx'];
|
||||
$this->ty = $this->ipsclass->input['ty'];
|
||||
|
||||
if ( $this->ipsclass->input['menu'] )
|
||||
{
|
||||
$this->s_yes = 'selected';
|
||||
$this->s_no = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->s_yes = '';
|
||||
$this->s_no = 'selected';
|
||||
}
|
||||
|
||||
if ( $this->ipsclass->input['preview'] )
|
||||
{
|
||||
$this->p_yes = 'selected';
|
||||
$this->p_no = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->p_yes = '';
|
||||
$this->p_no = 'selected';
|
||||
}
|
||||
|
||||
print $this->get_html();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$state = 0;
|
||||
$tx = 80;
|
||||
$ty = 40;
|
||||
|
||||
if ( $cookie = $this->ipsclass->my_getcookie('acpprefs') )
|
||||
{
|
||||
list( $state, $tx, $ty, $prev_show ) = explode( ",", $cookie );
|
||||
}
|
||||
|
||||
$this->tx = $tx;
|
||||
$this->ty = $ty;
|
||||
|
||||
if ( $state )
|
||||
{
|
||||
$this->s_yes = 'selected';
|
||||
$this->s_no = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->s_yes = '';
|
||||
$this->s_no = 'selected';
|
||||
}
|
||||
|
||||
if ( $prev_show )
|
||||
{
|
||||
$this->p_yes = 'selected';
|
||||
$this->p_no = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->p_yes = '';
|
||||
$this->p_no = 'selected';
|
||||
}
|
||||
|
||||
print $this->get_html();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function get_html()
|
||||
{
|
||||
global $SKIN;
|
||||
|
||||
$hit_muhl = <<<EOF
|
||||
<html>
|
||||
<head>
|
||||
<title>IPB-ACP Prefs</title>
|
||||
<style type='text/css'>
|
||||
BODY {
|
||||
font-size: 10px;
|
||||
font-family: Verdana, Arial, Sans-Serif;
|
||||
color:#000;
|
||||
padding:0px;
|
||||
margin:5px 5px 5px 5px;
|
||||
background-color: #F5F9FD
|
||||
}
|
||||
|
||||
TABLE, TD, TR {
|
||||
font-family: Verdana,Arial, Sans-Serif;
|
||||
color:#000;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
a:link, a:visited, a:active { color:#000055 }
|
||||
a:hover { color:#333377;text-decoration:underline }
|
||||
input {vertical-align:middle}
|
||||
.textinput { background-color: #DFE6EF;; color:Ê#000; font-size:10px; font-family: Verdana,Arial, Sans-Serif; padding:2px; }
|
||||
|
||||
</style>
|
||||
<script type='text/javascript'>
|
||||
var msg = "{$this->msg}";
|
||||
|
||||
if ( msg != "" )
|
||||
{
|
||||
alert( msg );
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form action="{$this->ipsclass->base_url}&act=prefs&set=1" method="post">
|
||||
<input type='hidden' name='_admin_auth_key' value='{$this->ipsclass->_admin_auth_key}' />
|
||||
<fieldset style='padding:10px'>
|
||||
<legend>Your ACP Prefs</legend>
|
||||
<strong>Save ACP Menu State</strong> <select class='textinput' name='menu'><option value='1' {$this->s_yes}>Yes</option><option value='0' {$this->s_no}>No</option></select>
|
||||
<br /><br />
|
||||
<strong>Template's Textbox Size</strong> <input class='textinput' type='text' size='3' name='tx' value='{$this->tx}' /> <strong>X</strong> <input class='textinput' type='text' size='3' name='ty' value='{$this->ty}' />
|
||||
<br /><br />
|
||||
<strong>Show Macro Preview?</strong> <select class='textinput' name='preview'><option value='1' {$this->p_yes}>Yes</option><option value='0' {$this->p_no}>No</option></select>
|
||||
<br /><br />
|
||||
<center><input type='submit' class='textinput' value='Save' /></center>
|
||||
</fieldset>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
EOF;
|
||||
|
||||
return $hit_muhl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,173 +1,170 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ!
|
||||
| Права на ПО принадлежат Invision Power Services
|
||||
| Права на перевод IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Admin Quick Help System
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 1st march 2002
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
| > DBA Checked: Tue 25th May 2004
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Некорректный адрес</h1>Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы.";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
class ad_quickhelp {
|
||||
|
||||
var $help_text = array();
|
||||
|
||||
function init_help_array()
|
||||
{
|
||||
|
||||
return array( 'mg_dohtml' => array( 'title' => "Использование [doHTML] тегов",
|
||||
'body' => "При использовании [doHTML], все пользователи смогут использовать чистый HTML, в сообщениях. Вы можете включать или отключать эту функцию для каждого форума в секции управления форумами.<br />
|
||||
<br /><b>Предупреждение!</b><br />
|
||||
Разрешение пользователям использовать HTML, является небезопасной функцией, поэтому стоит допустить к использованию этой функции, только доверенные Вам группы пользователей, которые не будут использовать это в корыстных целях. Хоть IPB и фильтрует некоторые нежелательные элементы в сообщениях,
|
||||
но всё равно, опытные пользователи смогут, воспользуясь этими тегами, воровать сеансы cookies, производить редиректы в сообщениях на другие сайты, портить формат отображения тем и т.д.
|
||||
<br />Invision Power Board и Invision Power Services не несут никакой ответственности за любые неполадки, произосшедшие из-за использования таких тегов.
|
||||
<br /><br /><b>Используйте это с умом!</b>
|
||||
",
|
||||
),
|
||||
|
||||
'mod_mmod' => array( 'title' => "Модерация и мульти-модерация тем",
|
||||
'body' => "Имейте ввиду, что при допуске модераторов к мульти-модерации тем, они смогут полностью воспользоваться этой функцией.
|
||||
<br />Например, если одно из Ваших правил мульти-модерации, настроено на перемещение тем, но Вы запретили в настройках одного из модераторов перемещать темы,
|
||||
данный модератор всё равно сможет перемещать темы при помощи функции мульти-модерации.
|
||||
",
|
||||
),
|
||||
|
||||
'set_spider' => array( 'title' => "Что такое поисковая машина?",
|
||||
'body' => "Поисковые машины, такие как Google, используют всякие программы, для поиска и добавления ссылок в свои базы данных.<br />Invision Power может использовать ботов, для помощи пользователям, получать необходимую разыскиваемую информацию при использовании поиска.
|
||||
<br />
|
||||
<br />
|
||||
<b>Предупреждение!</b>
|
||||
<br />
|
||||
Invision Power Board распознаёт многие поисковые машины и записывает их данные user_agent. Но, в любом случае имейте ввиду,
|
||||
что возможна и фальсификация, и некоторые пользователи смогут представить себя в виде безопасных поисковых машин.
|
||||
<br />Это не предоставит Вам никакие проблемы, т.к. бот будет иметь статус гостя, но в любом случае, будьте осторожны.
|
||||
<br /><br />Также имейте ввиду, что многие поисковые машины, не индексируют
|
||||
динамически сгенерированные страницы, во избежании перегрузки сервера, при постонном чтении тем.
|
||||
",
|
||||
),
|
||||
|
||||
|
||||
|
||||
'mg_upload' => array( 'title' => "Разрешения загрузки",
|
||||
'body' => "Если Вы хотите разрешить этой группе присоединять (загружать) файлы в сообщениях, Вы должны проверить следующие данные:
|
||||
<ul>
|
||||
<li>Введите разумное числовое значение в поле 'Максимальный размер загружаемых файлов.
|
||||
<li>Проверьте разрешения форума для этой группы и отметьте поле 'Загрузка'.
|
||||
</ul>
|
||||
Вы можете выбрать, в каких форумах эта группа пользователей может загружать файлы.
|
||||
<br /><br /><b>Предупреждение!</b><br />Если при отправке сообщений, сообщения не будут появляться и Вас будет возвращать на главную страницу форума, отключите возможность загрузки для этой группы, введя 0 в это поле. Этим самым Вы отключите возможность загрузки.
|
||||
",
|
||||
),
|
||||
|
||||
|
||||
'mg_promote' => array( 'title' => "Перемещение по группам",
|
||||
'body' => "При включении этой функции, (необходимо указать группу и кол-во сообщений),
|
||||
пользователи этой группы, будут перемещены в какую-либо другую группу, при наборе определённого кол-ва сообщений.
|
||||
<br /><br />
|
||||
Многие администраторы используют эту функцию в целях выделения активных пользователей форума, для перемещения этих пользователей в более продвинутую группу пользователей, которым доступны определённые функции форума, недоступные пользователям младшей группы (например для разрешения пользователям этой группы загружать и скачивать файлы, загружать собственные аватары и т.д.), а в некоторых случаях
|
||||
и для доступа этой группы к приватным форумам. Таким образом можно создать младшую группу пользователей и установить для них различные ограничения и при
|
||||
наборе определённого количества сообщений, переводить этих пользователей в старшую группу, у которых нет никаких ограничений.
|
||||
<br /><br /><b>Предупреждение!</b><br />Перед включением этой функиции, тщательно проверьте введённые Вами данные.<br />По ошибке Вы можете случайно установить автоперемещение в администраторскую группу, что небезопасно.
|
||||
",
|
||||
),
|
||||
's_reg_antispam' => array ( 'title' => "Антиспам при регистрации",
|
||||
'body' => "Для предотвращения многочисленных регистраций программами-ботами (которые могут повлечь за собой несколько тысяч ненужных регистраций и несколько тысяч отправленных с Вашего сервера писем),
|
||||
Вы должны включить эту функцию.
|
||||
<br /><br />Если включить эту функцию, то будут генерироваться различные 6-значные числа и отображаться в виде рисунка (это послужит препятствием для программ-ботов, которые не смогут прочесть эти числа). Пользователи, при регистрации
|
||||
должны буду ввести это число в точности, иначе их регистрация будет отклонена.",
|
||||
),
|
||||
|
||||
'm_bulkemail' => array ( 'title' => "Массовая Email рассылка",
|
||||
'body' => "<b>Обзор</b><br />С помощью массовой e-mail рассылки, Вы сможете уведомлять пользователей определённых групп или всех Ваших пользователей о различных мероприятиях и новостях форума.
|
||||
<br /><br /><b>Установки</b><br />Вы можете отправить письмо определённой группе пользователей или только пользователям, подписанным на 'Уведомления от Администратора'. Не рекомендуется использовать это для
|
||||
спама.<hr>
|
||||
<b>Доступные теги</b><br />В тексте письма Вы можете использовать следующие теги:
|
||||
<br />{board_name} будет переконвертировано в название Вашего форума
|
||||
<br />{reg_total} отобразит кол-во зарегистрированных пользователей
|
||||
<br />{total_posts} отобразит общее кол-во сообщений форума
|
||||
<br />{busy_count} отобразит рекорд посещаемости форума с кол-вом посетителей
|
||||
<br />{busy_time} отобразит дату рекорда посещаемости форума
|
||||
<br />{board_url} отобразит ссылку на Ваш форум
|
||||
<br /><br />Имя пользователя, пароль и другие данные профилей, использовать не рекомедуется.",
|
||||
),
|
||||
'comp_menu' => array ( 'title' => "Меню системы компонентов",
|
||||
'body' => "<strong>Текст меню</strong> Понятный текст меню. <em>Пример: Утилиты и настройки.</em><br />
|
||||
<strong>URL меню</strong> «конечная» часть URL. Нет нужды вводить полный путь URL. <em>Пример: code={code}</em><br />
|
||||
<strong>Переадресация?</strong> Если Да, то часть 'act={}§ion={}&code={}' пути в поле URL или переадресация могут не работать.<br />
|
||||
<strong>Название и текст переменной</strong> в системе ограничений доступа в админцент. Примеры: add, remove, edit, rebuild, recount, recache - все имеют
|
||||
языковые переменные. Любые другие переменные для системы ограничений доступа требуют добавления их в поле «Название переменной». Пример: Если название - 'tools', в поле «Текст переменной» вы можете ввести - 'Разрешить доступ к утилитам?'.<br />",
|
||||
),
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
$id = $this->ipsclass->input['id'];
|
||||
|
||||
$this->help_text = $this->init_help_array();
|
||||
|
||||
if ($this->help_text[$id]['title'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Для этой функции нет доступной информации помощи");
|
||||
}
|
||||
|
||||
print "<html>
|
||||
<head>
|
||||
<title>Быстрая помощь</title>
|
||||
</head>
|
||||
<body leftmargin='0' topmargin='0' bgcolor='#F5F9FD'>
|
||||
<table width='95%' align='center' border='0' cellpadding='6'>
|
||||
<tr>
|
||||
<td style='font-family:verdana, arial, tahoma;color:#4C77B6;font-size:16px;letter-spacing:-1px;font-weight:bold'>{$this->help_text[$id]['title']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='font-family:verdana, arial, tahoma;color:black;font-size:9pt'>{$this->help_text[$id]['body']}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
|
||||
exit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Admin Quick Help System
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 1st march 2002
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
| > DBA Checked: Tue 25th May 2004
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
class ad_quickhelp {
|
||||
|
||||
var $help_text = array();
|
||||
|
||||
function init_help_array()
|
||||
{
|
||||
|
||||
return array( 'mg_dohtml' => array( 'title' => "Posting HTML",
|
||||
'body' => "This will allow all members of the group to post pure HTML in forums that have the ability to accept raw HTML. You can turn this on and off
|
||||
for each forum via the edit forum settings function. Note: When HTML in posts in quoted by a member who does not have the permission to post HTML, the
|
||||
post will be shown in unparsed HTML format with most of the formatting removed.<br />
|
||||
<br /><b>Warning!</b><br />
|
||||
Allowing a member to post HTML is a very dangerous thing, you should not enable this functionality on any group that will use it maliciously. Although IPB tries
|
||||
to filter some of the more harmful content, it is NOT foolproof and this tag CAN be used to steal session cookies, redirect members and destroy the topic view layout.
|
||||
<br />Invision Power Board and Invision Power Services will not be held responsible for any misfortune that occurs from the usage of this tag.
|
||||
<br /><br /><b>Use it wisely!</b>
|
||||
",
|
||||
),
|
||||
|
||||
'mod_mmod' => array( 'title' => "Moderations and Topic Multi-Moderation",
|
||||
'body' => "If you allow your moderators access to the forums' multi-moderation then you must be aware that they have full use.
|
||||
<br />For example, if one of your multi-moderation actions allowed the topic to be moved and you do not allow move permissions the
|
||||
moderator will still be able to use the topic multi-moderation and move the topic.
|
||||
",
|
||||
),
|
||||
|
||||
'set_spider' => array( 'title' => "What are Search Engine Spiders?",
|
||||
'body' => "Search engines such as Google 'spider' the web by using special programs to find and add links to the search engine
|
||||
database.<br />Invision Power can take advantage of separating the bots from the real users and you can then
|
||||
ensure that they are getting adequate information to help with search engine ranking.
|
||||
<br />
|
||||
<br />
|
||||
<b>Warning!</b>
|
||||
<br />
|
||||
Invision Power Board recognises the search engine spiders and crawlers by their user_agent. Please keep in mind
|
||||
that it's not impossible to fake this and a malicious user could pose as a harmless search engine spider.
|
||||
<br />This is not a problem as by default the spider will have guest permissions, but it's something that
|
||||
you should keep in mind when allowing permissions.
|
||||
<br /><br />Also keep in mind that most search engines do NOT search dynamically generated website for fear
|
||||
of crashing the server with the constant reading of topics.
|
||||
",
|
||||
),
|
||||
|
||||
|
||||
|
||||
'mg_upload' => array( 'title' => "Upload Permissions",
|
||||
'body' => "If you wish to allow this group to attach files (upload) when posting, you will have to ensure you have completed the following:
|
||||
<ul>
|
||||
<li>You have entered a reasonable numerical figure in the groups 'Max upload file size' field.
|
||||
<li>You have edited the forum permissions for this group and checked the 'Upload' checkbox.
|
||||
</ul>
|
||||
This allows you to control in which forums this group can upload to.
|
||||
<br><br><b>Warning!</b><br>If, when posting, no post is made and you are returned back to the board index, disable this groups upload by entering 0 into this field. This will turn off the mutli-part form the uploads use.
|
||||
",
|
||||
),
|
||||
|
||||
|
||||
'mg_promote' => array( 'title' => "Group Promotion",
|
||||
'body' => "If enabled (by choosing a member group to promote your members to and by entering a number of posts to achieve this)
|
||||
when your members meet or exceed the number of posts set they will be 'promoted' to the specified group.
|
||||
<br><br>
|
||||
Many administrators use this feature to set up a 'Senior Members' group with more functionality (such as a longer edit time, larger post uploads) and even
|
||||
allow access to otherwise hidden forums - when your members have made enough posts, they are promoted to this group allowing you to intice more posting and
|
||||
allow for a more restrictive set of permissions for newcomers.
|
||||
<br><br><b>Warning!</b><br>Use this feature carefully and always check the information before proceeding.<br>It is possible to advance to an Admin group - you have been warned.
|
||||
",
|
||||
),
|
||||
's_reg_antispam' => array ( 'title' => "Registration AntiSpam",
|
||||
'body' => "To prevent robots from registering (such as a malicious denial of service attack registering thousands of new accounts and forcing thousands of emails to be sent from your server)
|
||||
you can enable this option.
|
||||
<br><br>When enabled, a random 6 digit numerical string is generated and shown in a graphical format (to prevent advanced bots from reading the source page). The user must enter
|
||||
this string exactly when registering or the account will not be created.",
|
||||
),
|
||||
|
||||
'm_bulkemail' => array ( 'title' => "Bulk Emailing",
|
||||
'body' => "<b>Overview</b><br>Bulk emailing allows you to target a specific section of your community or email all your registered members.
|
||||
<br><br><b>Settings</b><br>You can choose which user groups will receive the email and elect to override the user set 'Allow Admin Emails' function. It is NOT recommended that you do override this
|
||||
however.<hr>
|
||||
<b>Allowed Tags</b><br>Although the email system sends the mail via BCC to preserve system resources, you can add in dynamic content with the following tags.
|
||||
<br>{board_name} will return the name of your board
|
||||
<br>{reg_total} will return the total number of registered members
|
||||
<br>{total_posts} will return the total number of posts
|
||||
<br>{busy_count} will return the most number of online users
|
||||
<br>{busy_time} will return the date of the most online users
|
||||
<br>{board_url} will return the URL to the board
|
||||
<br><br>As the email is sent via BCC, it is not possible to include the members username, password or other user profile data.",
|
||||
),
|
||||
'comp_menu' => array ( 'title' => "Components menu system",
|
||||
'body' => "<strong>Menu text</strong> is the actual menu item text. <em>IE: Tools and Settings.</em><br />
|
||||
<strong>Menu URL</strong> is the final part of the URL. No need to add the full URL or the 'section=components&act=blog' part unless this is a redirect. <em>IE: code={code}</em><br />
|
||||
<strong>Menu Redirect</strong> if yes, complete the 'act={}§ion={}&code={}' part of the URL in the URL box or the redirect may not work.<br />
|
||||
<strong>Perm Bit and Perm Lang</strong> is the ACP restriction perm bit. Entries: add, remove, edit, rebuild, recount, recache all have
|
||||
language entries. Any other bit names will require adding into the Perm Bit Language box. Eg: If the perm bit was 'tools', you may enter 'Allow TOOLS Access'.<br />",
|
||||
),
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
$id = $this->ipsclass->input['id'];
|
||||
|
||||
$this->help_text = $this->init_help_array();
|
||||
|
||||
if ($this->help_text[$id]['title'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("No help information is available for this function at present");
|
||||
}
|
||||
|
||||
print "<html>
|
||||
<head>
|
||||
<title>Quick Help</title>
|
||||
</head>
|
||||
<body leftmargin='0' topmargin='0' bgcolor='#F5F9FD'>
|
||||
<table width='95%' align='center' border='0' cellpadding='6'>
|
||||
<tr>
|
||||
<td style='font-family:verdana, arial, tahoma;color:#4C77B6;font-size:16px;letter-spacing:-1px;font-weight:bold'>{$this->help_text[$id]['title']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style='font-family:verdana, arial, tahoma;color:black;font-size:9pt'>{$this->help_text[$id]['body']}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
|
||||
exit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
+1070
-876
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
+1089
-1059
File diff suppressed because it is too large.
Load diff
@@ -2,25 +2,17 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-12-08 16:41:30 -0500 (Fri, 08 Dec 2006) $
|
||||
| > $Revision: 781 $
|
||||
| > $Date: 2007-12-17 18:07:20 -0500 (Mon, 17 Dec 2007) $
|
||||
| > $Revision: 1149 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
@@ -32,7 +24,7 @@
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -44,7 +36,7 @@ class ad_skin_diff
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "lookandfeel";
|
||||
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
@@ -55,65 +47,65 @@ class ad_skin_diff
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
$this->ipsclass->admin->page_detail = "Ñðàâíèòü âàø ñòèëü.";
|
||||
$this->ipsclass->admin->page_title = "HTML Ñðàâíåíèå ñòèëåé";
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Ñðàâíåíèå' );
|
||||
$this->ipsclass->admin->page_detail = "Compare your template set differences.";
|
||||
$this->ipsclass->admin->page_title = "Skin Template HTML Differences";
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Skin Differences Home' );
|
||||
|
||||
//-----------------------------------------
|
||||
// LOAD HTML
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->html = $this->ipsclass->acp_load_template('cp_skin_lookandfeel');
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// What to do?
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
case 'skin_diff':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rundiff' );
|
||||
$this->skin_differences_start();
|
||||
break;
|
||||
|
||||
|
||||
case 'skin_diff_process':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rundiff' );
|
||||
$this->skin_differences_process();
|
||||
break;
|
||||
|
||||
|
||||
case 'skin_diff_view':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rundiff' );
|
||||
$this->skin_differences_view();
|
||||
break;
|
||||
|
||||
|
||||
case 'skin_diff_export':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' );
|
||||
$this->skin_differences_export();
|
||||
break;
|
||||
|
||||
|
||||
case 'skin_diff_view_diff':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rundiff' );
|
||||
$this->skin_differences_view_diff();
|
||||
break;
|
||||
|
||||
|
||||
case 'skin_diff_from_skin':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rundiff' );
|
||||
$this->skin_differences_start_from_skin();
|
||||
break;
|
||||
|
||||
|
||||
case 'skin_diff_remove':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
|
||||
$this->skin_differences_remove();
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
default:
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->skin_differences_list();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Compare skin differences [VIEW]
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -127,47 +119,47 @@ class ad_skin_diff
|
||||
//-----------------------------------------
|
||||
// Init
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$diff_session_id = intval( $this->ipsclass->input['diff_session_id'] );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get current session
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$current_session = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'template_diff_session', 'where' => 'diff_session_id='.$diff_session_id ) );
|
||||
|
||||
|
||||
if ( ! $current_session['diff_session_id'] )
|
||||
{
|
||||
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü òåêóùóþ ñåññèþ øàáëîíà.");
|
||||
$this->ipsclass->admin->error("Could not get the current template compare session.");
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Delete from IMPORT
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'templates_diff_import', 'where' => 'diff_session_id='.$diff_session_id ) );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Delete from SESSION
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'template_diff_session', 'where' => 'diff_session_id='.$diff_session_id ) );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Delete from CHANGES
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'template_diff_changes', 'where' => 'diff_session_id='.$diff_session_id ) );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Done...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->main_msg = "Îò÷åò î ðàçëè÷èÿõ óäàëåí";
|
||||
|
||||
|
||||
$this->ipsclass->main_msg = "Differences report removed";
|
||||
|
||||
$this->skin_differences_list();
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Compare skin differences [EXPORT]
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -181,58 +173,58 @@ class ad_skin_diff
|
||||
//-----------------------------------------
|
||||
// Init
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$diff_session_id = intval( $this->ipsclass->input['diff_session_id'] );
|
||||
$content = '';
|
||||
$missing = 0;
|
||||
$changed = 0;
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get current session
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$current_session = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'template_diff_session', 'where' => 'diff_session_id='.$diff_session_id ) );
|
||||
|
||||
|
||||
if ( ! $current_session['diff_session_id'] )
|
||||
{
|
||||
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü òåêóùóþ ñåññèþ øàáëîíà");
|
||||
$this->ipsclass->admin->error("Could not get the current template compare session.");
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get data
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => '*',
|
||||
'from' => 'template_diff_changes',
|
||||
'where' => 'diff_session_id='.$diff_session_id,
|
||||
'order' => 'diff_change_func_group ASC, diff_change_func_name ASC' ) );
|
||||
|
||||
|
||||
|
||||
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
|
||||
while( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Culmulate
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$row['diff_change_type'] ? $changed++ : $missing++;
|
||||
|
||||
|
||||
$row['diff_change_content'] = str_replace( "\n", "<br>", $row['diff_change_content']);
|
||||
$row['diff_change_content'] = str_replace( "><", ">\n<" ,$row['diff_change_content']);
|
||||
$row['diff_change_content'] = preg_replace( "#(?<!(\<del|\<ins)) {1}(?!:style)#i", " " ,$row['diff_change_content']);
|
||||
|
||||
|
||||
|
||||
$content .= $this->html->skin_diff_export_row( $row['diff_change_func_name'], $row['diff_change_func_group'], $row['diff_change_content'] );
|
||||
}
|
||||
|
||||
|
||||
$content = $this->html->skin_diff_export_overview( $content, $missing, $changed, $current_session['diff_session_title'], gmdate( 'r' ) );
|
||||
|
||||
|
||||
$this->ipsclass->admin->show_download( $content, 'ipb-difference-export.html', "unknown/unknown", 0 );
|
||||
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Compare skin differences [VIEW]
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -246,33 +238,33 @@ class ad_skin_diff
|
||||
//-----------------------------------------
|
||||
// Init
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$diff_key = $this->ipsclass->input['diff_key'];
|
||||
|
||||
//-----------------------------------------
|
||||
// Get data
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$diff_row = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
|
||||
'from' => 'template_diff_changes',
|
||||
'where' => "diff_change_key='".$diff_key."'" ) );
|
||||
|
||||
|
||||
|
||||
|
||||
if ( ! $diff_row['diff_change_key'] )
|
||||
{
|
||||
$this->ipsclass->admin->error( "Êëþ÷ íå íàéäåí" );
|
||||
$this->ipsclass->admin->error( "No key found" );
|
||||
}
|
||||
|
||||
|
||||
$diff_row['diff_change_content'] = str_replace( "\n", "<br>", $diff_row['diff_change_content']);
|
||||
$diff_row['diff_change_content'] = str_replace( "><", ">\n<" ,$diff_row['diff_change_content']);
|
||||
$diff_row['diff_change_content'] = preg_replace( "#(?<!(\<del|\<ins)) {1}(?!:style)#i", " " ,$diff_row['diff_change_content']);
|
||||
|
||||
|
||||
$this->ipsclass->html = $this->html->skin_diff_view_bit( $diff_row['diff_change_func_group'], $diff_row['diff_change_func_name'], $diff_row['diff_change_content'] );
|
||||
|
||||
|
||||
$this->ipsclass->admin->print_popup();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Compare skin differences [VIEW]
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -286,83 +278,83 @@ class ad_skin_diff
|
||||
//-----------------------------------------
|
||||
// Init
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$diff_session_id = intval( $this->ipsclass->input['diff_session_id'] );
|
||||
$content = '';
|
||||
$missing = 0;
|
||||
$changed = 0;
|
||||
$last_group = '';
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get current session
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$current_session = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'template_diff_session', 'where' => 'diff_session_id='.$diff_session_id ) );
|
||||
|
||||
|
||||
if ( ! $current_session['diff_session_id'] )
|
||||
{
|
||||
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü òåêóùóþ ñåññèþ øàáëîíà.");
|
||||
$this->ipsclass->admin->error("Could not get the current template compare session.");
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get data
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => '*',
|
||||
'from' => 'template_diff_changes',
|
||||
'where' => 'diff_session_id='.$diff_session_id,
|
||||
'order' => 'diff_change_func_group ASC, diff_change_func_name ASC' ) );
|
||||
|
||||
|
||||
|
||||
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
|
||||
while( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Gen data
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$key = $diff_session_id.':'.$row['diff_change_func_group'].':'.$row['diff_change_func_name'];
|
||||
$size = $this->ipsclass->size_format( $this->ipsclass->math_strlen_to_bytes( strlen( $row['diff_change_content'] ) ) );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Diff type
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( ! $row['diff_change_type'] )
|
||||
{
|
||||
$diff_is = '<span style="color:red">Íîâîå</span>';
|
||||
$diff_is = '<span style="color:red">New</span>';
|
||||
$missing++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$diff_is = '<span style="color:green">Èçìåíåíî</span>';
|
||||
$diff_is = '<span style="color:green">Changed</span>';
|
||||
$changed++;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// New cat?
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( $last_group != $row['diff_change_func_group'] )
|
||||
{
|
||||
$last_group = $row['diff_change_func_group'];
|
||||
|
||||
|
||||
$content .= $this->html->skin_diff_row_newgroup( $row['diff_change_func_group'] );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Culmulate
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$content .= $this->html->skin_diff_row( $row['diff_change_func_name'], $size, $key, $diff_is, str_replace( ':', '_', $key ) );
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->html = $this->html->skin_diff_overview( $content, $missing, $changed );
|
||||
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Compare skin differences: From 1 skin to another
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -376,57 +368,57 @@ class ad_skin_diff
|
||||
//-----------------------------------------
|
||||
// Init
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$content = "";
|
||||
$skin_id = intval( $this->ipsclass->input['skin_id'] );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Check...
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( ! $skin_id )
|
||||
{
|
||||
$this->ipsclass->admin->error( "No skin ID passed!" );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get skin set...
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$skin_set = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$skin_id ) );
|
||||
|
||||
|
||||
if ( ! $skin_set['set_skin_set_id'] )
|
||||
{
|
||||
$this->ipsclass->admin->error( "Íå âûáðàí ID ñòèëÿ (çàíîâî!)" );
|
||||
$this->ipsclass->admin->error( "No skin ID passed (again)!" );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get number template bits
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$total_bits = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as count', 'from' => 'skin_templates', 'where' => 'set_id=1' ) );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Create session
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'template_diff_session', array( 'diff_session_togo' => intval( $total_bits['count'] ),
|
||||
'diff_session_done' => 0,
|
||||
'diff_session_title' => "Ñðàâíåíèå ñî ñòèëåì: ".$skin_set['set_name'],
|
||||
'diff_session_title' => "Comparison from skin set: ".$skin_set['set_name'],
|
||||
'diff_session_updated' => time(),
|
||||
'diff_session_ignore_missing' => 1 ) );
|
||||
|
||||
|
||||
$diff_session_id = $this->ipsclass->DB->get_insert_id();
|
||||
|
||||
|
||||
$seen_templates = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Grab template bits from DB
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'skin_templates', 'where' => 'set_id='.$skin_id ) );
|
||||
$outer = $this->ipsclass->DB->exec_query();
|
||||
|
||||
|
||||
while( $entry = $this->ipsclass->DB->fetch_row( $outer ) )
|
||||
{
|
||||
$check = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'diff_key', 'from' => 'templates_diff_import', 'where' => "diff_key='".$diff_session_id.':'.$entry[ 'group_name' ].':'.$entry[ 'func_name' ]."'" ) );
|
||||
@@ -449,14 +441,14 @@ class ad_skin_diff
|
||||
'diff_func_data' => $entry[ 'func_data' ],
|
||||
'diff_func_name' => $entry[ 'func_name' ],
|
||||
'diff_func_content' => $entry[ 'section_content' ],
|
||||
'diff_session_id' => $diff_session_id ), 'diff_key='.$diff_session_id.':'.$entry[ 'group_name' ].':'.$entry[ 'func_name' ] );
|
||||
'diff_session_id' => $diff_session_id ), "diff_key='" . $diff_session_id.':'.$entry[ 'group_name' ].':'.$entry[ 'func_name' ] . "'" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->admin->output_multiple_redirect_init( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code_js."&code=skin_diff_process&diff_session_id={$diff_session_id}&pergo=10" );
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Compare skin differences
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -470,146 +462,146 @@ class ad_skin_diff
|
||||
//-----------------------------------------
|
||||
// Init
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$content = "";
|
||||
$seen = array();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Check...
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( ! $this->ipsclass->input['diff_session_title'] )
|
||||
{
|
||||
$this->ipsclass->admin->error( "Âû äîëæíû ââåñòè íàçâàíèå" );
|
||||
$this->ipsclass->admin->error( "You must enter a title" );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get uploaded file
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Ut-oh....
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->admin->error( "Ôàéë íå áûë çàãðóæåí" );
|
||||
|
||||
$this->ipsclass->admin->error( "No file was uploaded" );
|
||||
}
|
||||
else
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get uploaded schtuff
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$tmp_name = $_FILES['FILE_UPLOAD']['name'];
|
||||
$tmp_name = preg_replace( "#\.gz$#", "", $tmp_name );
|
||||
|
||||
|
||||
$content = $this->ipsclass->admin->import_xml( $tmp_name );
|
||||
}
|
||||
|
||||
|
||||
if( !$content )
|
||||
{
|
||||
$this->ipsclass->admin->error( "There was no content in the file to process" );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get number missing template bits
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$total_bits = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as count', 'from' => 'skin_templates', 'where' => 'set_id=1' ) );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Create session
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->allow_sub_select = 1;
|
||||
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'template_diff_session', array( 'diff_session_togo' => intval( $total_bits['count'] ),
|
||||
'diff_session_done' => 0,
|
||||
'diff_session_title' => $this->ipsclass->input['diff_session_title'],
|
||||
'diff_session_updated' => time(),
|
||||
'diff_session_ignore_missing' => intval( $this->ipsclass->input['diff_session_ignore_missing'] ) ) );
|
||||
|
||||
|
||||
$diff_session_id = $this->ipsclass->DB->get_insert_id();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get xml mah-do-dah
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
require_once( KERNEL_PATH.'class_xml.php' );
|
||||
$xml = new class_xml();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Check to see if its an archive...
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( preg_match( "#<xmlarchive generator=\"IPB\"#si", $content ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// It is an archive... expand...
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
require( KERNEL_PATH.'class_xmlarchive.php' );
|
||||
$xmlarchive = new class_xmlarchive( KERNEL_PATH );
|
||||
|
||||
|
||||
$xmlarchive->xml_read_archive_data( $content );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get the XML documents
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$import_xml = array();
|
||||
|
||||
|
||||
foreach( $xmlarchive->file_array as $f )
|
||||
{
|
||||
$import_xml[ $f['filename'] ] = $f['content'];
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Import Templates
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$content = $import_xml['ipb_templates.xml'];
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Parse document
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$xml->xml_parse_document( $content );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Import template bits...
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( ! is_array( $xml->xml_array['templateexport']['templategroup']['template'] ) )
|
||||
{
|
||||
$this->ipsclass->admin->error("Îøèáêà ñ ipb_templates.xml - ïðîäîëæèòü íåâîçìîæíî");
|
||||
$this->ipsclass->admin->error("Error with ipb_templates.xml - could not process XML properly");
|
||||
}
|
||||
|
||||
|
||||
foreach( $xml->xml_array['templateexport']['templategroup']['template'] as $entry )
|
||||
{
|
||||
$diff_key = $diff_session_id.':'.$entry[ 'group_name' ]['VALUE'].':'.$entry[ 'func_name' ]['VALUE'];
|
||||
|
||||
|
||||
if ( ! $seen[ $diff_key ] )
|
||||
{
|
||||
$this->ipsclass->DB->allow_sub_select = 1;
|
||||
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'templates_diff_import', array( 'diff_key' => $diff_session_id.':'.$entry[ 'group_name' ]['VALUE'].':'.$entry[ 'func_name' ]['VALUE'],
|
||||
'diff_func_group' => $entry[ 'group_name' ]['VALUE'],
|
||||
'diff_func_data' => $entry[ 'func_data' ]['VALUE'],
|
||||
'diff_func_name' => $entry[ 'func_name' ]['VALUE'],
|
||||
'diff_func_content' => $entry[ 'section_content' ]['VALUE'],
|
||||
'diff_session_id' => $diff_session_id ) );
|
||||
|
||||
|
||||
$seen[ $diff_key ] = 1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->admin->output_multiple_redirect_init( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code_js."&code=skin_diff_process&diff_session_id={$diff_session_id}&pergo=10" );
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Compare skin differences [PROCESS]
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -623,43 +615,43 @@ class ad_skin_diff
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$pergo = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 10;
|
||||
$diff_session_id = intval( $this->ipsclass->input['diff_session_id'] );
|
||||
$done = 0;
|
||||
$img = '<img src="'.$this->ipsclass->skin_acp_url.'/images/aff_tick_small.png" border="0" alt="-" /> ';
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get current session
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$current_session = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'template_diff_session', 'where' => 'diff_session_id='.$diff_session_id ) );
|
||||
|
||||
|
||||
if ( ! $current_session['diff_session_id'] )
|
||||
{
|
||||
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü òåêóùóþ ñåññèþ øàáëîíà.");
|
||||
$this->ipsclass->admin->error("Could not get the current template compare session.");
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get Diff library
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
require_once( KERNEL_PATH . 'class_difference.php' );
|
||||
$class_difference = new class_difference();
|
||||
$class_difference->method = 'PHP';
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get template bits to check
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => '*',
|
||||
'from' => 'skin_templates',
|
||||
'where' => 'set_id=1',
|
||||
'order' => 'suid ASC',
|
||||
'limit' => array( intval( $current_session['diff_session_done'] ), intval( $pergo ) ) ) );
|
||||
|
||||
|
||||
$outer = $this->ipsclass->DB->exec_query();
|
||||
|
||||
|
||||
if ( ! $this->ipsclass->DB->get_num_rows( $outer ) )
|
||||
{
|
||||
$done = 1;
|
||||
@@ -671,34 +663,34 @@ class ad_skin_diff
|
||||
//-----------------------------------------
|
||||
// Get corresponding row from diff table
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$diff_row = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
|
||||
'from' => 'templates_diff_import',
|
||||
'where' => "diff_func_group='{$row['group_name']}' AND diff_func_name='{$row['func_name']}' AND diff_session_id=".$diff_session_id ) );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Got anything?
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( $diff_row['diff_key'] )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get difference
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$difference = $class_difference->get_differences( $row['section_content'], $diff_row['diff_func_content'] );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Got any differences?
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( $class_difference->diff_found )
|
||||
{
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get corresponding row from diff table
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$diff_check = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'diff_change_key',
|
||||
'from' => 'template_diff_changes',
|
||||
'where' => "diff_change_key='" . $diff_session_id.':'.$row['group_name'].':'.$row['func_name'] . "'" ) );
|
||||
@@ -735,36 +727,36 @@ class ad_skin_diff
|
||||
'diff_session_id' => $diff_session_id ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Increment
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$current_session['diff_session_done']++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Update current session
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->do_update( 'template_diff_session', array( 'diff_session_done' => intval( $current_session['diff_session_done'] ) ), 'diff_session_id='.$diff_session_id );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Done or more?
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( ! $done )
|
||||
{
|
||||
$this->ipsclass->admin->output_multiple_redirect_hit( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code_js."&code=skin_diff_process&diff_session_id={$diff_session_id}&pergo=".$pergo,
|
||||
$img.' '.$current_session['diff_session_done'].' èç '. $current_session['diff_session_togo'] .' øàáëîíîâ îáðàáîòàíî...' );
|
||||
$img.' '.$current_session['diff_session_done'].' of '. $current_session['diff_session_togo'] .' template bits processed...' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->admin->output_multiple_redirect_done( "<a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=skin_diff_view&diff_session_id={$diff_session_id}' target='_top'>Ðåçóëüòàòû</a>");
|
||||
$this->ipsclass->admin->output_multiple_redirect_done( "<a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=skin_diff_view&diff_session_id={$diff_session_id}' target='_top'>View the differences results</a>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Compare skin differences [START]
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -778,40 +770,40 @@ class ad_skin_diff
|
||||
//-----------------------------------------
|
||||
// Init
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$content = '';
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Get sessions
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => '*',
|
||||
'from' => 'template_diff_session',
|
||||
'order' => 'diff_session_updated DESC' ) );
|
||||
|
||||
|
||||
|
||||
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
|
||||
while( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Gen data
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$row['_date'] = $this->ipsclass->get_date( $row['diff_session_updated'], 'TINY' );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Culmulate
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$content .= $this->html->skin_diff_main_row( $row );
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->html = $this->html->skin_diff_main_overview( $content );
|
||||
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,492 +1,484 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-10-05 11:04:08 -0500 (Thu, 05 Oct 2006) $
|
||||
| > $Revision: 609 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Skin -> Image Macro functions
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 4th April 2002
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
| > DBA Checked: Tue 25th May 2004
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
class ad_skin_macros {
|
||||
|
||||
var $base_url;
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "lookandfeel";
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = "image";
|
||||
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
case 'edit':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
|
||||
$this->show_macros();
|
||||
break;
|
||||
|
||||
case 'doedit':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
|
||||
$this->edit_set_name();
|
||||
break;
|
||||
|
||||
case 'macroremove':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
|
||||
$this->macro_remove();
|
||||
break;
|
||||
|
||||
case 'doeditmacro':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
|
||||
$this->macro_edit();
|
||||
break;
|
||||
|
||||
case 'doaddmacro':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' );
|
||||
$this->macro_add();
|
||||
break;
|
||||
|
||||
default:
|
||||
print "Äåéñòâèå íå âûáðàíî"; exit();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove macro
|
||||
//-----------------------------------------
|
||||
|
||||
function macro_remove()
|
||||
{
|
||||
if ($this->ipsclass->input['mid'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü ID ìàêðîñà, âåðíèòåñü íàçàä è ïîïðîáóéòå åùå ðàç");
|
||||
}
|
||||
|
||||
$id = intval($this->ipsclass->input['id']);
|
||||
$p = intval($this->ipsclass->input['p']);
|
||||
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_macro', 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Recache macros
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->cache_func->_recache_macros($id, $p);
|
||||
|
||||
//-----------------------------------------
|
||||
// Bounce back
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->input['id'] = $id;
|
||||
$this->ipsclass->main_msg = "Ìàêðîñ óäàëåí!";
|
||||
$this->show_macros();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Apply the edit to the DB
|
||||
//-----------------------------------------
|
||||
|
||||
function macro_edit()
|
||||
{
|
||||
if ($this->ipsclass->input['mid'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü ID ìàêðîñà, âåðíèòåñü íàçàä è ïîïðîáóéòå åùå ðàç");
|
||||
}
|
||||
|
||||
$id = intval($this->ipsclass->input['id']);
|
||||
$p = intval($this->ipsclass->input['p']);
|
||||
|
||||
$key = $this->ipsclass->DB->add_slashes( $this->ipsclass->txt_safeslashes($_POST['variable']) );
|
||||
$val = $this->ipsclass->DB->add_slashes( $this->ipsclass->txt_safeslashes($_POST['replacement']) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get macro for examination..
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_macro', 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
if ( ! $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü çàïèñü èç áàçû äàííûõ");
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Is this our macro set?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $row['macro_set'] == $id )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Okay, update...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'update' => 'skin_macro', 'set' => "macro_value='$key', macro_replace='$val'", 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
}
|
||||
else
|
||||
{
|
||||
//-----------------------------------------
|
||||
// No? OK - best add it as a 'new' macro
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->manual_addslashes = 1;
|
||||
$this->ipsclass->DB->do_insert( 'skin_macro', array (
|
||||
'macro_value' => $key,
|
||||
'macro_replace' => $val,
|
||||
'macro_can_remove' => 1,
|
||||
'macro_set' => $id
|
||||
) );
|
||||
|
||||
$this->ipsclass->DB->manual_addslashes = 0;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Recache macros
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->cache_func->_recache_macros($id, $p);
|
||||
|
||||
//-----------------------------------------
|
||||
// Bounce back
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->input['id'] = $id;
|
||||
$this->show_macros();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// ADD MACRO
|
||||
//-----------------------------------------
|
||||
|
||||
function macro_add()
|
||||
{
|
||||
if ($this->ipsclass->input['mid'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü ID ìàêðîñà, âåðíèòåñü íàçàä è ïîïðîáóéòå åùå ðàç");
|
||||
}
|
||||
|
||||
$id = intval($this->ipsclass->input['id']);
|
||||
$p = intval($this->ipsclass->input['p']);
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'skin_macro', array (
|
||||
'macro_value' => $this->ipsclass->txt_safeslashes($_POST['variable']),
|
||||
'macro_replace' => $this->ipsclass->txt_safeslashes($_POST['replacement']),
|
||||
'macro_can_remove' => 1,
|
||||
'macro_set' => $id
|
||||
) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Recache macros
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->cache_func->_recache_macros($id, $p);
|
||||
|
||||
//-----------------------------------------
|
||||
// Bounce back
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->input['id'] = $id;
|
||||
$this->show_macros();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Show macros
|
||||
//-----------------------------------------
|
||||
|
||||
function show_macros()
|
||||
{
|
||||
//-----------------------------------------
|
||||
|
||||
if ($this->ipsclass->input['id'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü ID ìàêðîñà, âåðíèòåñü íàçàä è ïîïðîáóéòå åùå ðàç");
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// check tree...
|
||||
//-----------------------------------------
|
||||
|
||||
$this_set = "";
|
||||
|
||||
if ( $this->ipsclass->input['p'] > 0 )
|
||||
{
|
||||
$in = ','.$this->ipsclass->input['p'];
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get macros
|
||||
//-----------------------------------------
|
||||
|
||||
$macros = $this->ipsclass->cache_func->_get_macros($this->ipsclass->input['id'], $this->ipsclass->input['p']);
|
||||
|
||||
//-----------------------------------------
|
||||
// Get img_dir this set is using...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id=".intval($this->ipsclass->input['id']) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
$skin = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Äëÿ èçìåíåíèÿ ìàêðîñà, íàæìèòå íà ññûëêó 'Èçìåíèòü' íàïðîòèâ âûáðàííîãî ìàêðîñà.";
|
||||
|
||||
$this->ipsclass->admin->page_title = "Óïðàâëåíèå çàìåíàìè ìàêðîñîâ øàáëîíà: {$skin['set_name']}";
|
||||
|
||||
//-----------------------------------------
|
||||
// Start output
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= "<script type='text/javascript'>
|
||||
function editmacro(id, variable, replace)
|
||||
{
|
||||
document.macroform.code.value = 'doeditmacro';
|
||||
document.macroform.submitbutton.value = 'Èçìåíèòü ýòîò ìàêðîñ';
|
||||
document.macroform.mid.value = id;
|
||||
document.macroform.variable.value = variable;
|
||||
document.macroform.replacement.value = replace;
|
||||
scroll(0,0);
|
||||
togglediv( 'popbox', 1 );
|
||||
return false;
|
||||
}
|
||||
function addmacro(id)
|
||||
{
|
||||
document.macroform.code.value = 'doaddmacro';
|
||||
document.macroform.submitbutton.value = 'Äîáàâèòü ýòîò ìàêðîñ';
|
||||
document.macroform.mid.value = id;
|
||||
document.macroform.variable.value = '';
|
||||
document.macroform.replacement.value = '';
|
||||
scroll(0,0);
|
||||
togglediv( 'popbox', 1 );
|
||||
return false;
|
||||
}
|
||||
function removemacro(url)
|
||||
{
|
||||
checkdelete(url);
|
||||
}
|
||||
</script>
|
||||
<div class='tableborder'>
|
||||
<div class='tableheaderalt'>
|
||||
<table cellpadding='0' cellspacing='0' border='0' width='100%'>
|
||||
<tr>
|
||||
<td align='left' width='100%' style='font-weight:bold;font-size:11px;color:#FFF'>Óïðàâëåíèå çàìåíàìè ìàêðîñîâ</td>
|
||||
<td align='right' nowrap='nowrap' style='padding-right:2px'><input type='button' class='realdarkbutton' value='Äîáàâèòü ìàêðîñ' onclick=\"addmacro('{$this->ipsclass->input['id']}');\" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div align='center' style='position:absolute;display:none;text-align:center;' id='popbox'>
|
||||
<form name='macroform' action='{$this->ipsclass->base_url}' method='post'>
|
||||
<input type='hidden' name='_admin_auth_key' value='{$this->ipsclass->_admin_auth_key}' />
|
||||
<input type='hidden' name='act' value='image' />
|
||||
<input type='hidden' name='section' value='{$this->ipsclass->section_code}' />
|
||||
<input type='hidden' name='code' value='' />
|
||||
<input type='hidden' name='mid' value='' />
|
||||
<input type='hidden' name='id' value='{$this->ipsclass->input['id']}' />
|
||||
<input type='hidden' name='p' value='{$this->ipsclass->input['p']}' />
|
||||
<table cellspacing='0' width='500' align='center' cellpadding='6' style='background:#EEE;border:2px outset #555;'>
|
||||
<tr>
|
||||
<td width='1%' nowrap='nowrap' valign='top'>
|
||||
<b>Ïåðåìåííàÿ</b><br /><input class='textinput' name='variable' type='text' size='20' />
|
||||
<br /><br />
|
||||
<center><input type='submit' class='realbutton' value='Èçìåíèòü ìàêðîñ' name='submitbutton' /> <input type='button' class='realdarkbutton' value='Çàêðûòü' onclick=\"togglediv('popbox');\" /></center>
|
||||
</td>
|
||||
<td width='99%'><b>Çàìåíà</b><br /><textarea class='textinput' name='replacement' style='width:99%;height:50px'></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
";
|
||||
|
||||
$this->ipsclass->html .= "<div class='tableborder'>\n<div class='tablepad'>\n<table width='100%' cellspacing='0' cellpadding='0' border='0'>";
|
||||
|
||||
$this->unaltered = "<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_unaltered.gif' border='0' alt='-' title='Íå èçìåíåí îò íà÷àëüíîãî âàðèàíòà øàáëîíà' /> ";
|
||||
$this->altered = "<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_altered.gif' border='0' alt='+' title='Èçìåíåí îò íà÷àëüíîãî âàðèàíòà øàáëîíà' /> ";
|
||||
$this->inherited = "<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_inherited.gif' border='0' alt='|' title='Óíàñëåäîâàííûé îò íà÷àëüíîãî âàðèàíòà øàáëîíà' /> ";
|
||||
|
||||
//-----------------------------------------
|
||||
// Loop and print
|
||||
//-----------------------------------------
|
||||
|
||||
foreach( $macros as $row )
|
||||
{
|
||||
$real = $this->ipsclass->txt_htmlspecialchars( $row['macro_replace'] );
|
||||
$real = str_replace("\n", '\n', str_replace( "\r", '\r', $real) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Altered?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $row['macro_set'] == $this->ipsclass->input['id'] )
|
||||
{
|
||||
$altered_image = $this->altered;
|
||||
$css_info = '#FFDCD8';
|
||||
}
|
||||
else if ( $row['macro_set'] == 1 )
|
||||
{
|
||||
$altered_image = $this->unaltered;
|
||||
$css_info = '#EEE';
|
||||
}
|
||||
else
|
||||
{
|
||||
$altered_image = $this->inherited;
|
||||
$css_info = '#FFF2D3';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Figure out quotes
|
||||
//-----------------------------------------
|
||||
|
||||
$out_quote = '"';
|
||||
$in_quote = "'";
|
||||
|
||||
if ( preg_match( "/'/", $real ) )
|
||||
{
|
||||
$out_quote = "'";
|
||||
$in_quote = '"';
|
||||
}
|
||||
|
||||
if( $in_quote == '"' )
|
||||
{
|
||||
$real = str_replace( """, '\"', $real );
|
||||
}
|
||||
|
||||
if( $in_quote == "'" )
|
||||
{
|
||||
$real = str_replace( "'", "\\'", $real );
|
||||
}
|
||||
|
||||
$preview = str_replace( "<#IMG_DIR#>", $skin['set_image_dir'], $row['macro_replace'] );
|
||||
|
||||
if ( $row['macro_set'] > 1 and $row['macro_set'] == $this->ipsclass->input['id'] )
|
||||
{
|
||||
$remove_button = "<input type='button' class='realbutton' name='remove' value='Âåðíóòü íà÷àëüíîå çíà÷åíèå' onclick=\"removemacro('{$this->ipsclass->form_code_js}&code=macroremove&mid={$row['macro_id']}&id={$this->ipsclass->input['id']}&p={$this->ipsclass->input['p']}');\" />";
|
||||
}
|
||||
else
|
||||
{
|
||||
$remove_button = "";
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Not an image?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! preg_match( "#img\s{1,}src=#i", $row['macro_replace'] ) )
|
||||
{
|
||||
$preview = substr( $real, 0, 200 );
|
||||
}
|
||||
else
|
||||
{
|
||||
$preview = preg_replace( "#style_images#", $this->ipsclass->vars['board_url'].'/style_images', $preview );
|
||||
}
|
||||
|
||||
$edit_button = "<input type='button' class='realbutton' value='Èçìåíèòü' onclick={$out_quote}editmacro( {$in_quote}{$row['macro_id']}{$in_quote}, {$in_quote}{$row['macro_value']}{$in_quote}, {$in_quote}$real{$in_quote});{$out_quote} />";
|
||||
|
||||
//-----------------------------------------
|
||||
// Render row
|
||||
//-----------------------------------------
|
||||
|
||||
$style = "padding:4px;border-bottom:1px solid #DDD;background:{$css_info}";
|
||||
|
||||
$this->ipsclass->html .= "<tr>
|
||||
<!--<td style='$style' align='center' width='1%'><img src='{$this->ipsclass->skin_acp_url}/images/skin_macro.gif' alt='Macro' title='ID: {$row['macro_id']}' style='vertical-align:middle' /></td>-->
|
||||
<td style='$style' align='left' width='1%' nowrap='nowrap'>$altered_image
|
||||
<{<span style='font-size:11px;font-weight:bold' title='ID: {$row['macro_id']}. SET: {$row['macro_set']}' href='#' >{$row['macro_value']}</span>}>
|
||||
</td>
|
||||
<td style='$style;padding-right:3px;text-align:center;' align='center' width='99%' align='center'>$preview</td>
|
||||
<td style='$style' align='right' width='40%' nowrap='nowrap'>$remove_button $edit_button</td>
|
||||
</tr>
|
||||
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->html .= "</table>
|
||||
</div>
|
||||
<div class='tablesubheader' align='center'>
|
||||
<input type='button' class='realdarkbutton' value='Äîáàâèòü ìàêðîñ' onclick=\"addmacro('{$this->ipsclass->input['id']}');\" />
|
||||
</div>
|
||||
</div>";
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->skin_jump_menu_wrap();
|
||||
|
||||
//-----------------------------------------
|
||||
// Show altered / unaltered
|
||||
// legend
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= "<br />
|
||||
<div><strong>Ïðèìåð ðàáîòû ìàêðîñà</strong><br />
|
||||
Åñëè âû äîáàâèëè ìàêðîñ 'green_font' è çàìåíó äëÿ íåãî â âèäå '<font color='green'>', êàæäûé ýëåìåíò òåêñòà <span style='color:red'><b><{green_font}></b></span> áóäåò îòîáðàæåí êàê <font color='green'>
|
||||
<br /><b><#IMG_DIR#></b> äîñòóïåí â ëþáîì ìàêðîñå. Âî âðåìÿ âûâîäà òåêñòà íà ýêðàí áóäåò ïðîèçâåäåíà çàìåíà äàííîãî òåãà íà ïóòü ïðîïèñàííûé â íàñòðîéêàõ ê äèðåêòîðèè ñ èçîáðàæåíèÿìè.
|
||||
</div><br />
|
||||
<div><strong>Îïèñàíèå îáîçíà÷åíèé:</strong><br />
|
||||
{$this->altered} Ýòîò ìàêðîñ áûë èçìåíåí.
|
||||
<br />{$this->unaltered} Ýòîò ìàêðîñ íå áûë èçìåíåí.
|
||||
<br />{$this->inherited} Ýòîò ìàêðîñ ïîñòðîåí íà áàçå ñóùåñòâóþùåãî ìàêðîñ.
|
||||
</div>";
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( 'section='.$this->ipsclass->section_code.'&act=sets' ,'Óïðàâëåíèå ñòèëÿìè' );
|
||||
$this->ipsclass->admin->nav[] = array( '' ,'Óïðàâëåíèå çàìåíàìè ìàêðîñîâ '.$skin['set_name'] );
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-10-05 12:04:08 -0400 (Thu, 05 Oct 2006) $
|
||||
| > $Revision: 609 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Skin -> Image Macro functions
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 4th April 2002
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
| > DBA Checked: Tue 25th May 2004
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
class ad_skin_macros {
|
||||
|
||||
var $base_url;
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "lookandfeel";
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = "image";
|
||||
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
case 'edit':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
|
||||
$this->show_macros();
|
||||
break;
|
||||
|
||||
case 'doedit':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
|
||||
$this->edit_set_name();
|
||||
break;
|
||||
|
||||
case 'macroremove':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
|
||||
$this->macro_remove();
|
||||
break;
|
||||
|
||||
case 'doeditmacro':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
|
||||
$this->macro_edit();
|
||||
break;
|
||||
|
||||
case 'doaddmacro':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' );
|
||||
$this->macro_add();
|
||||
break;
|
||||
|
||||
default:
|
||||
print "No action"; exit();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove macro
|
||||
//-----------------------------------------
|
||||
|
||||
function macro_remove()
|
||||
{
|
||||
if ($this->ipsclass->input['mid'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("You must specify an existing macro ID, go back and try again");
|
||||
}
|
||||
|
||||
$id = intval($this->ipsclass->input['id']);
|
||||
$p = intval($this->ipsclass->input['p']);
|
||||
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_macro', 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Recache macros
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->cache_func->_recache_macros($id, $p);
|
||||
|
||||
//-----------------------------------------
|
||||
// Bounce back
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->input['id'] = $id;
|
||||
$this->ipsclass->main_msg = "Macro removed!";
|
||||
$this->show_macros();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Apply the edit to the DB
|
||||
//-----------------------------------------
|
||||
|
||||
function macro_edit()
|
||||
{
|
||||
if ($this->ipsclass->input['mid'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("You must specify an existing image set ID, go back and try again");
|
||||
}
|
||||
|
||||
$id = intval($this->ipsclass->input['id']);
|
||||
$p = intval($this->ipsclass->input['p']);
|
||||
|
||||
$key = $this->ipsclass->DB->add_slashes( $this->ipsclass->txt_safeslashes($_POST['variable']) );
|
||||
$val = $this->ipsclass->DB->add_slashes( $this->ipsclass->txt_safeslashes($_POST['replacement']) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get macro for examination..
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_macro', 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
if ( ! $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$this->ipsclass->admin->error("Could not retrieve the record from the DB");
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Is this our macro set?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $row['macro_set'] == $id )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Okay, update...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'update' => 'skin_macro', 'set' => "macro_value='$key', macro_replace='$val'", 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
}
|
||||
else
|
||||
{
|
||||
//-----------------------------------------
|
||||
// No? OK - best add it as a 'new' macro
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->manual_addslashes = 1;
|
||||
$this->ipsclass->DB->do_insert( 'skin_macro', array (
|
||||
'macro_value' => $key,
|
||||
'macro_replace' => $val,
|
||||
'macro_can_remove' => 1,
|
||||
'macro_set' => $id
|
||||
) );
|
||||
|
||||
$this->ipsclass->DB->manual_addslashes = 0;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Recache macros
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->cache_func->_recache_macros($id, $p);
|
||||
|
||||
//-----------------------------------------
|
||||
// Bounce back
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->input['id'] = $id;
|
||||
$this->show_macros();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// ADD MACRO
|
||||
//-----------------------------------------
|
||||
|
||||
function macro_add()
|
||||
{
|
||||
if ($this->ipsclass->input['mid'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("You must specify an existing macro set ID, go back and try again");
|
||||
}
|
||||
|
||||
$id = intval($this->ipsclass->input['id']);
|
||||
$p = intval($this->ipsclass->input['p']);
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'skin_macro', array (
|
||||
'macro_value' => $this->ipsclass->txt_safeslashes($_POST['variable']),
|
||||
'macro_replace' => $this->ipsclass->txt_safeslashes($_POST['replacement']),
|
||||
'macro_can_remove' => 1,
|
||||
'macro_set' => $id
|
||||
) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Recache macros
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->cache_func->_recache_macros($id, $p);
|
||||
|
||||
//-----------------------------------------
|
||||
// Bounce back
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->input['id'] = $id;
|
||||
$this->show_macros();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Show macros
|
||||
//-----------------------------------------
|
||||
|
||||
function show_macros()
|
||||
{
|
||||
//-----------------------------------------
|
||||
|
||||
if ($this->ipsclass->input['id'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("You must specify an existing macro set ID, go back and try again");
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// check tree...
|
||||
//-----------------------------------------
|
||||
|
||||
$this_set = "";
|
||||
|
||||
if ( $this->ipsclass->input['p'] > 0 )
|
||||
{
|
||||
$in = ','.$this->ipsclass->input['p'];
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get macros
|
||||
//-----------------------------------------
|
||||
|
||||
$macros = $this->ipsclass->cache_func->_get_macros($this->ipsclass->input['id'], $this->ipsclass->input['p']);
|
||||
|
||||
//-----------------------------------------
|
||||
// Get img_dir this set is using...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id=".intval($this->ipsclass->input['id']) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
$skin = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
$this->ipsclass->admin->page_detail = "To edit a macro, simply click on the 'edit' link of the appropriate macro.";
|
||||
|
||||
$this->ipsclass->admin->page_title = "Manage Replacement Macros in Set: {$skin['set_name']}";
|
||||
|
||||
//-----------------------------------------
|
||||
// Start output
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= "<script type='text/javascript'>
|
||||
function editmacro(id, variable, replace)
|
||||
{
|
||||
document.macroform.code.value = 'doeditmacro';
|
||||
document.macroform.submitbutton.value = 'Edit This Macro';
|
||||
document.macroform.mid.value = id;
|
||||
document.macroform.variable.value = variable;
|
||||
document.macroform.replacement.value = replace;
|
||||
scroll(0,0);
|
||||
togglediv( 'popbox', 1 );
|
||||
return false;
|
||||
}
|
||||
function addmacro(id)
|
||||
{
|
||||
document.macroform.code.value = 'doaddmacro';
|
||||
document.macroform.submitbutton.value = 'Add This Macro';
|
||||
document.macroform.mid.value = id;
|
||||
document.macroform.variable.value = '';
|
||||
document.macroform.replacement.value = '';
|
||||
scroll(0,0);
|
||||
togglediv( 'popbox', 1 );
|
||||
return false;
|
||||
}
|
||||
function removemacro(url)
|
||||
{
|
||||
checkdelete(url);
|
||||
}
|
||||
</script>
|
||||
<div class='tableborder'>
|
||||
<div class='tableheaderalt'>
|
||||
<table cellpadding='0' cellspacing='0' border='0' width='100%'>
|
||||
<tr>
|
||||
<td align='left' width='100%' style='font-weight:bold;font-size:11px;color:#FFF'>Manage Replacement Macros</td>
|
||||
<td align='right' nowrap='nowrap' style='padding-right:2px'><input type='button' class='realdarkbutton' value='Add Macro' onclick=\"addmacro('{$this->ipsclass->input['id']}');\" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div align='center' style='position:absolute;display:none;text-align:center;' id='popbox'>
|
||||
<form name='macroform' action='{$this->ipsclass->base_url}' method='post'>
|
||||
<input type='hidden' name='_admin_auth_key' value='{$this->ipsclass->_admin_auth_key}' />
|
||||
<input type='hidden' name='act' value='image' />
|
||||
<input type='hidden' name='section' value='{$this->ipsclass->section_code}' />
|
||||
<input type='hidden' name='code' value='' />
|
||||
<input type='hidden' name='mid' value='' />
|
||||
<input type='hidden' name='id' value='{$this->ipsclass->input['id']}' />
|
||||
<input type='hidden' name='p' value='{$this->ipsclass->input['p']}' />
|
||||
<table cellspacing='0' width='500' align='center' cellpadding='6' style='background:#EEE;border:2px outset #555;'>
|
||||
<tr>
|
||||
<td width='1%' nowrap='nowrap' valign='top'>
|
||||
<b>Variable</b><br><input class='textinput' name='variable' type='text' size='20' />
|
||||
<br /><br />
|
||||
<center><input type='submit' class='realbutton' value='Edit Macro' name='submitbutton' /> <input type='button' class='realdarkbutton' value='Close' onclick=\"togglediv('popbox');\" /></center>
|
||||
</td>
|
||||
<td width='99%'><b>Replacement</b><br /><textarea class='textinput' name='replacement' style='width:99%;height:50px'></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
";
|
||||
|
||||
$this->ipsclass->html .= "<div class='tableborder'>\n<div class='tablepad'>\n<table width='100%' cellspacing='0' cellpadding='0' border='0'>";
|
||||
|
||||
$this->unaltered = "<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_unaltered.gif' border='0' alt='-' title='Unaltered from parent skin set' /> ";
|
||||
$this->altered = "<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_altered.gif' border='0' alt='+' title='Altered from parent skin set' /> ";
|
||||
$this->inherited = "<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_inherited.gif' border='0' alt='|' title='Inherited from parent skin set' /> ";
|
||||
|
||||
//-----------------------------------------
|
||||
// Loop and print
|
||||
//-----------------------------------------
|
||||
|
||||
foreach( $macros as $row )
|
||||
{
|
||||
$real = $this->ipsclass->txt_htmlspecialchars( $row['macro_replace'] );
|
||||
$real = str_replace("\n", '\n', str_replace( "\r", '\r', $real) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Altered?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $row['macro_set'] == $this->ipsclass->input['id'] )
|
||||
{
|
||||
$altered_image = $this->altered;
|
||||
$css_info = '#FFDCD8';
|
||||
}
|
||||
else if ( $row['macro_set'] == 1 )
|
||||
{
|
||||
$altered_image = $this->unaltered;
|
||||
$css_info = '#EEE';
|
||||
}
|
||||
else
|
||||
{
|
||||
$altered_image = $this->inherited;
|
||||
$css_info = '#FFF2D3';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Figure out quotes
|
||||
//-----------------------------------------
|
||||
|
||||
$out_quote = '"';
|
||||
$in_quote = "'";
|
||||
|
||||
if ( preg_match( "/'/", $real ) )
|
||||
{
|
||||
$out_quote = "'";
|
||||
$in_quote = '"';
|
||||
}
|
||||
|
||||
if( $in_quote == '"' )
|
||||
{
|
||||
$real = str_replace( """, '\"', $real );
|
||||
}
|
||||
|
||||
if( $in_quote == "'" )
|
||||
{
|
||||
$real = str_replace( "'", "\\'", $real );
|
||||
}
|
||||
|
||||
$preview = str_replace( "<#IMG_DIR#>", $skin['set_image_dir'], $row['macro_replace'] );
|
||||
|
||||
if ( $row['macro_set'] > 1 and $row['macro_set'] == $this->ipsclass->input['id'] )
|
||||
{
|
||||
$remove_button = "<input type='button' class='realbutton' name='remove' value='Revert' onclick=\"removemacro('{$this->ipsclass->form_code_js}&code=macroremove&mid={$row['macro_id']}&id={$this->ipsclass->input['id']}&p={$this->ipsclass->input['p']}');\" />";
|
||||
}
|
||||
else
|
||||
{
|
||||
$remove_button = "";
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Not an image?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! preg_match( "#img\s{1,}src=#i", $row['macro_replace'] ) )
|
||||
{
|
||||
$preview = substr( $real, 0, 200 );
|
||||
}
|
||||
else
|
||||
{
|
||||
$preview = preg_replace( "#style_images#", $this->ipsclass->vars['board_url'].'/style_images', $preview );
|
||||
}
|
||||
|
||||
$edit_button = "<input type='button' class='realbutton' value='Change' onclick={$out_quote}editmacro( {$in_quote}{$row['macro_id']}{$in_quote}, {$in_quote}{$row['macro_value']}{$in_quote}, {$in_quote}$real{$in_quote});{$out_quote} />";
|
||||
|
||||
//-----------------------------------------
|
||||
// Render row
|
||||
//-----------------------------------------
|
||||
|
||||
$style = "padding:4px;border-bottom:1px solid #DDD;background:{$css_info}";
|
||||
|
||||
$this->ipsclass->html .= "<tr>
|
||||
<!--<td style='$style' align='center' width='1%'><img src='{$this->ipsclass->skin_acp_url}/images/skin_macro.gif' alt='Macro' title='ID: {$row['macro_id']}' style='vertical-align:middle' /></td>-->
|
||||
<td style='$style' align='left' width='1%' nowrap='nowrap'>$altered_image
|
||||
<{<span style='font-size:11px;font-weight:bold' title='ID: {$row['macro_id']}. SET: {$row['macro_set']}' href='#' >{$row['macro_value']}</span>}>
|
||||
</td>
|
||||
<td style='$style;padding-right:3px;text-align:center;' align='center' width='99%' align='center'>$preview</td>
|
||||
<td style='$style' align='right' width='40%' nowrap='nowrap'>$remove_button $edit_button</td>
|
||||
</tr>
|
||||
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->html .= "</table>
|
||||
</div>
|
||||
<div class='tablesubheader' align='center'>
|
||||
<input type='button' class='realdarkbutton' value='Add Macro' onclick=\"addmacro('{$this->ipsclass->input['id']}');\" />
|
||||
</div>
|
||||
</div>";
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->skin_jump_menu_wrap();
|
||||
|
||||
//-----------------------------------------
|
||||
// Show altered / unaltered
|
||||
// legend
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= "<br />
|
||||
<div><strong>Replace Macro Example</strong><br />
|
||||
If you added a key of 'green_font' and a replacement of '<font color='green'>', each instance of <span style='color:red'><b><{green_font}></b></span> would be converted to <font color='green'>
|
||||
<br /><b><#IMG_DIR#></b> is available to any macro, this is automatically replaced with the name of the image directory you choose when using this macro set in a skin
|
||||
</div><br />
|
||||
<div><strong>Replacement Macro Legend:</strong><br />
|
||||
{$this->altered} This item has been customized for this skin set.
|
||||
<br />{$this->unaltered} This item has not been customized from the master skin set.
|
||||
<br />{$this->inherited} This item has inherited customizations from the parent skin set.
|
||||
</div>";
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( 'section='.$this->ipsclass->section_code.'&act=sets' ,'Skin Manager Home' );
|
||||
$this->ipsclass->admin->nav[] = array( '' ,'Editing Replacement Macros in Set '.$skin['set_name'] );
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,378 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2007-01-18 23:02:56 +0000 (Thu, 18 Jan 2007) $
|
||||
| > $Revision: 831 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Skin Difference Engine
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 22nd July 2005
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class ad_skin_remap
|
||||
{
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "lookandfeel";
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = "skinremap";
|
||||
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
$this->ipsclass->admin->page_detail = "This section allows you to force a skin set to be used in conjunction with a URL.";
|
||||
$this->ipsclass->admin->page_title = "Skin Remapping";
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Skin Remapping Home' );
|
||||
|
||||
//-----------------------------------------
|
||||
// LOAD HTML
|
||||
//-----------------------------------------
|
||||
|
||||
$this->html = $this->ipsclass->acp_load_template('cp_skin_lookandfeel');
|
||||
|
||||
//-----------------------------------------
|
||||
// What to do?
|
||||
//-----------------------------------------
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
case 'remap_remove':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->skin_remap_remove();
|
||||
break;
|
||||
case 'remap_add_do':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->skin_remap_save('add');
|
||||
break;
|
||||
case 'remap_edit_do':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->skin_remap_save('edit');
|
||||
break;
|
||||
case 'remap_edit':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->skin_remap_form('edit');
|
||||
break;
|
||||
case 'remap_add':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->skin_remap_form('add');
|
||||
break;
|
||||
case 'remap_list':
|
||||
default:
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->skin_remap_list();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Skin Remap: Save
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function skin_remap_remove()
|
||||
{
|
||||
//--------------------------------------------
|
||||
// INIT
|
||||
//--------------------------------------------
|
||||
|
||||
$map_id = intval($this->ipsclass->input['map_id']);
|
||||
|
||||
//-----------------------------------------
|
||||
// Geddit
|
||||
//-----------------------------------------
|
||||
|
||||
$remap = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*',
|
||||
'from' => 'skin_url_mapping',
|
||||
'where' => 'map_id='.$map_id ) );
|
||||
|
||||
|
||||
if ( ! $remap['map_id'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "No ID was passed, please try again.";
|
||||
$this->skin_remap_list();
|
||||
return;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove it
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->do_delete( 'skin_url_mapping', 'map_id=' . $map_id );
|
||||
|
||||
//-----------------------------------------
|
||||
// Recache
|
||||
//-----------------------------------------
|
||||
|
||||
$this->skin_remap_recache();
|
||||
|
||||
//-----------------------------------------
|
||||
// Done...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->main_msg = "Remapping removed";
|
||||
$this->skin_remap_list();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Skin Remap: Save
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function skin_remap_save( $type='add' )
|
||||
{
|
||||
//--------------------------------------------
|
||||
// INIT
|
||||
//--------------------------------------------
|
||||
|
||||
$map_id = intval($this->ipsclass->input['map_id']);
|
||||
$map_title = trim( $this->ipsclass->txt_stripslashes( $this->ipsclass->txt_htmlspecialchars($_POST['map_title'])) );
|
||||
$map_url = trim( $this->ipsclass->txt_stripslashes( $this->ipsclass->txt_UNhtmlspecialchars($_POST['map_url'])) );
|
||||
$map_match_type = trim( $this->ipsclass->input['map_match_type'] );
|
||||
$map_skin_set_id = intval($this->ipsclass->input['map_skin_set_id']);
|
||||
|
||||
//--------------------------------------------
|
||||
// Checks...
|
||||
//--------------------------------------------
|
||||
|
||||
if ( $type == 'edit' )
|
||||
{
|
||||
if ( ! $map_id OR ! $map_title OR ! $map_url )
|
||||
{
|
||||
$this->ipsclass->main_msg = "You must complete the form fully";
|
||||
$this->skin_remap_form( $type );
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ! $map_title OR ! $map_url )
|
||||
{
|
||||
$this->ipsclass->main_msg = "You must complete the entire form.";
|
||||
$this->skin_remap_form( $type );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
// Save...
|
||||
//--------------------------------------------
|
||||
|
||||
$array = array( 'map_title' => $map_title,
|
||||
'map_url' => $map_url,
|
||||
'map_match_type' => $map_match_type,
|
||||
'map_skin_set_id' => $map_skin_set_id,
|
||||
);
|
||||
|
||||
if ( $type == 'add' )
|
||||
{
|
||||
$array['map_date_added'] = time();
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'skin_url_mapping', $array );
|
||||
|
||||
$this->ipsclass->main_msg = 'Skin Remap Added';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$this->ipsclass->DB->do_update( 'skin_url_mapping', $array, 'map_id='.$map_id );
|
||||
|
||||
$this->ipsclass->main_msg = 'Skin Remap Edited';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Rebuild skin cache...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->skin_remap_recache();
|
||||
|
||||
//-----------------------------------------
|
||||
// Done...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->skin_remap_list();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Skin Remap: Form
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function skin_remap_form( $type='add' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$map_id = intval( $this->ipsclass->input['map_id'] );
|
||||
$map_match_type = array( 0 => array( 'contains', 'Contains' ),
|
||||
1 => array( 'exactly' , 'Is Exactly' ) );
|
||||
$form = array();
|
||||
$skins = array();
|
||||
$remap = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Check (please?)
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $type == 'add' )
|
||||
{
|
||||
$formcode = 'remap_add_do';
|
||||
$title = "Add New Skin Remap";
|
||||
$button = "Add New Skin Remap";
|
||||
}
|
||||
else
|
||||
{
|
||||
$remap = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*',
|
||||
'from' => 'skin_url_mapping',
|
||||
'where' => 'map_id='.$map_id ) );
|
||||
|
||||
|
||||
if ( ! $remap['map_id'] )
|
||||
{
|
||||
$this->ipsclass->main_msg = "No ID was passed, please try again.";
|
||||
$this->skin_remap_list();
|
||||
return;
|
||||
}
|
||||
|
||||
$formcode = 'remap_edit_do';
|
||||
$title = "Edit Remapping ".$remap['map_title'];
|
||||
$button = "Save Changes";
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Figure out skin
|
||||
//-----------------------------------------
|
||||
|
||||
$_skin_id = ( $_POST['map_skin_set_id'] ) ? $_POST['map_skin_set_id'] : $remap['map_skin_set_id'];
|
||||
|
||||
//-----------------------------------------
|
||||
// Get skins..
|
||||
//-----------------------------------------
|
||||
|
||||
$tmp = $this->ipsclass->skin['_setid'];
|
||||
|
||||
$this->ipsclass->skin['_setid'] = $_skin_id;
|
||||
|
||||
require_once( ROOT_PATH.'sources/classes/class_display.php' );
|
||||
$display = new display();
|
||||
$display->ipsclass =& $this->ipsclass;
|
||||
|
||||
$form['skin_list'] = $display->_build_skin_list();
|
||||
|
||||
$this->ipsclass->skin['_setid'] = $tmp;
|
||||
|
||||
//-----------------------------------------
|
||||
// Form elements
|
||||
//-----------------------------------------
|
||||
|
||||
$form['map_title'] = $this->ipsclass->adskin->form_input( 'map_title' , $this->ipsclass->txt_htmlspecialchars( ( isset($_POST['map_title']) AND $_POST['map_title'] ) ? $_POST['map_title'] : $remap['map_title'] ) );
|
||||
$form['map_match_type'] = $this->ipsclass->adskin->form_dropdown( 'map_match_type' , $map_match_type, ( isset($_POST['map_match_type']) AND $_POST['map_match_type'] ) ? $_POST['map_match_type'] : $remap['map_match_type'] );
|
||||
$form['map_url'] = $this->ipsclass->adskin->form_input( 'map_url' , $this->ipsclass->txt_htmlspecialchars( ( isset($_POST['map_url']) AND $_POST['map_url'] ) ? $_POST['map_url'] : $remap['map_url'] ) );
|
||||
|
||||
$this->ipsclass->html .= $this->html->skin_remap_form( $form, $title, $formcode, $button, $remap );
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Compare skin differences [START]
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* Compare skin differences (START)
|
||||
*
|
||||
*
|
||||
* @since 2.1.0.2005-07-22
|
||||
*/
|
||||
function skin_remap_list()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Init
|
||||
//-----------------------------------------
|
||||
|
||||
$content = '';
|
||||
$remaps = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Get sessions
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => '*',
|
||||
'from' => 'skin_url_mapping',
|
||||
'order' => 'map_date_added DESC' ) );
|
||||
|
||||
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
while( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Gen data
|
||||
//-----------------------------------------
|
||||
|
||||
$row['_date'] = $this->ipsclass->get_date( $row['map_date_added'], 'TINY' );
|
||||
$row['_name'] = $this->ipsclass->cache['skin_id_cache'][ $row['map_skin_set_id'] ]['set_name'];
|
||||
|
||||
//-----------------------------------------
|
||||
// Culmulate
|
||||
//-----------------------------------------
|
||||
|
||||
$remaps[] = $row;
|
||||
}
|
||||
|
||||
$this->ipsclass->html = $this->html->skin_remap_overview( $remaps );
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Recache the skin stuff
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function skin_remap_recache()
|
||||
{
|
||||
$this->ipsclass->cache['skin_remap'] = array();
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => '*',
|
||||
'from' => 'skin_url_mapping' ) );
|
||||
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
while( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$this->ipsclass->cache['skin_remap'][ $r['map_id'] ] = $r;
|
||||
}
|
||||
|
||||
$this->ipsclass->update_cache( array( 'name' => 'skin_remap', 'deletefirst' => 1, 'donow' => 1, 'array' => 1 ) );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
+1923
-1927
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -2,22 +2,14 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ!
|
||||
| Права на ПО принадлежат Invision Power Services
|
||||
| Права на перевод IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-12-07 06:46:38 -0500 (Thu, 07 Dec 2006) $
|
||||
| > $Revision: 777 $
|
||||
@@ -35,7 +27,7 @@
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Некорректный адрес</h1>Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -51,25 +43,25 @@ class ad_skin_wrappers {
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "lookandfeel";
|
||||
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = "wrap";
|
||||
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get the libraries
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
require_once( ROOT_PATH.'sources/lib/admin_template_functions.php' );
|
||||
|
||||
|
||||
$this->functions = new admin_template_functions();
|
||||
$this->functions->ipsclass =& $this->ipsclass;
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
@@ -78,24 +70,24 @@ class ad_skin_wrappers {
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
|
||||
$this->functions->build_editor_area_floated(1);
|
||||
break;
|
||||
|
||||
|
||||
case 'edit':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
|
||||
$this->do_form('edit');
|
||||
break;
|
||||
|
||||
|
||||
case 'doedit':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
|
||||
$this->save_wrapper('edit');
|
||||
break;
|
||||
|
||||
|
||||
case 'export':
|
||||
$this->export();
|
||||
|
||||
|
||||
default:
|
||||
print "No action chosen"; exit();
|
||||
break;
|
||||
|
||||
|
||||
//case 'wrapper':
|
||||
// $this->list_wrappers();
|
||||
// break;
|
||||
@@ -109,117 +101,117 @@ class ad_skin_wrappers {
|
||||
// $this->remove();
|
||||
// break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// ADD / EDIT WRAPPERS
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function save_wrapper( $type='add' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$id = intval( $this->ipsclass->input['id'] );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Type?
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ($type == 'edit')
|
||||
{
|
||||
if ($this->ipsclass->input['id'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Вы должны выбрать ID существующего общего шаблона, вернитесь назад и попробуйте снова");
|
||||
$this->ipsclass->admin->error("You must specify an existing wrapper ID, go back and try again");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($this->ipsclass->input['txtwrapper'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("У вас не может быть пустого шаблона");
|
||||
$this->ipsclass->admin->error("You can't have an empty template, can you?");
|
||||
}
|
||||
|
||||
|
||||
$tmpl = $this->ipsclass->admin->form_to_text( $this->ipsclass->txt_stripslashes($_POST['txtwrapper']) );
|
||||
$tmpl = str_replace( '../', '../' , $tmpl );
|
||||
|
||||
|
||||
if ( ! preg_match( "/<% BOARD %>/", $tmpl ) )
|
||||
{
|
||||
$this->ipsclass->admin->error("Вы не можете удалить <% BOARD %> !");
|
||||
$this->ipsclass->admin->error("You cannot remove the <% BOARD %> tag silly!");
|
||||
}
|
||||
|
||||
|
||||
if ( ! preg_match( "/<% COPYRIGHT %>/", $tmpl ) )
|
||||
{
|
||||
$this->ipsclass->admin->error("Вы не можете удалить <% COPYRIGHT %> !");
|
||||
$this->ipsclass->admin->error("You cannot remove the <% COPYRIGHT %> tag silly!");
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->DB->do_update( 'skin_sets', array( 'set_wrapper' => $tmpl ), 'set_skin_set_id='.$id );
|
||||
|
||||
|
||||
$this->ipsclass->cache_func->_recache_wrapper( $this->ipsclass->input['id'] );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Done
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( ! $this->ipsclass->input['savereload'] )
|
||||
{
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code ,'Управление стилями' );
|
||||
$this->ipsclass->main_msg = "Общий шаблон форума обновлен";
|
||||
$this->ipsclass->admin->done_screen("Общий шаблон форум обновлен", "Управление стилями", 'section='.$this->ipsclass->section_code.'&act=sets', "redirect" );
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code ,'Skin Manager Home' );
|
||||
$this->ipsclass->main_msg = "Board Header and Footer Wrapper Updated";
|
||||
$this->ipsclass->admin->done_screen("Board Header and Footer Wrapper Updated", "Skin Manager Home", 'section='.$this->ipsclass->section_code.'&act=sets', "redirect" );
|
||||
}
|
||||
else
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Reload edit window
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->main_msg = "Общий шаблон форума обновлен";
|
||||
|
||||
$this->ipsclass->main_msg = "Board Header and Footer Wrapper updated";
|
||||
$this->do_form('edit');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// FORM
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function do_form( $type='add' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Check input
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ($this->ipsclass->input['id'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Вы должны выбрать ID существующего общего шаблона, вернитесь назад и попробуйте снова");
|
||||
$this->ipsclass->admin->error("You must specify an existing skin set ID, go back and try again");
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// check tree...
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$found_id = "";
|
||||
$found_content = "";
|
||||
$this_set = "";
|
||||
|
||||
|
||||
if ( $this->ipsclass->input['p'] > 0 )
|
||||
{
|
||||
$in = ','.intval($this->ipsclass->input['p']);
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Query
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'stylesheets_do_form_concat', array( 'id' => intval($this->ipsclass->input['id']), 'parent' => $in ) );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// check tree...
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
while( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
if ( $row['set_wrapper'] and ! $found_id )
|
||||
@@ -227,81 +219,82 @@ class ad_skin_wrappers {
|
||||
$found_id = $row['set_skin_set_id'];
|
||||
$found_content = $row['set_wrapper'];
|
||||
}
|
||||
|
||||
|
||||
if ( $this->ipsclass->input['id'] == $row['set_skin_set_id'] )
|
||||
{
|
||||
$this_set = $row;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($type == 'add')
|
||||
{
|
||||
$code = 'doadd';
|
||||
$button = 'Создать общий шаблон';
|
||||
$button = 'Create Wrapper';
|
||||
}
|
||||
else
|
||||
{
|
||||
$code = 'doedit';
|
||||
$button = 'Сохранить общий шаблон';
|
||||
$button = 'Save Wrapper';
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Header
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Вы можете использовать HTML во время добавления или изменения общего шаблона.";
|
||||
$this->ipsclass->admin->page_title = "Изменение общего шаблона форума";
|
||||
|
||||
|
||||
$this->ipsclass->admin->page_detail = "You may use HTML fully when adding or editing wrappers.";
|
||||
$this->ipsclass->admin->page_title = "Editing Board Header and Footer Wrapper";
|
||||
|
||||
if ( $found_id == 1 )
|
||||
{
|
||||
$this->ipsclass->admin->page_detail .= "<br /><strong>Это копия основного общего шаблона, изменения в форме ниже будут скопированы, как новый общий шаблон форума для выбранного шаблона.</strong>";
|
||||
$this->ipsclass->admin->page_detail .= "<br /><strong>This is a copy of the master wrapper, editing it below will copy the changes to a new wrapper unique to this skin set and any children of this set
|
||||
will inherit this wrapper</strong>";
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Start form
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $code ),
|
||||
2 => array( 'act' , 'wrap' ),
|
||||
3 => array( 'id' , $this->ipsclass->input['id'] ),
|
||||
4 => array( 'fid' , $found_id ),
|
||||
5 => array( 'section', $this->ipsclass->section_code ),
|
||||
), "theform" );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Stop /textarea murdering layout
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$found_content = $this->ipsclass->admin->text_to_form( $found_content );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Editor section
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->functions->build_generic_editor_area( array( 'section' => $this->ipsclass->section_code, 'act' => 'wrap', 'title' => '', 'textareaname' => 'wrapper', 'textareainput' => $found_content ) );
|
||||
|
||||
|
||||
$formbuttons = "<div align='center' class='tablesubheader'>
|
||||
<input type='submit' name='submit' value='$button' class='realdarkbutton'>
|
||||
<input type='submit' name='savereload' value='Сохранить и обновить общий шаблон' class='realdarkbutton'>
|
||||
<input type='submit' name='savereload' value='Save and Reload Wrapper' class='realdarkbutton'>
|
||||
</div></form>\n";
|
||||
|
||||
|
||||
$this->ipsclass->html = str_replace( '<!--IPB.EDITORBOTTOM-->', $formbuttons, $this->ipsclass->html );
|
||||
|
||||
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->skin_jump_menu_wrap();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Output
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( 'section='.$this->ipsclass->section_code.'&act=sets' ,'Управление шаблонами' );
|
||||
$this->ipsclass->admin->nav[] = array( '' ,'Изменение общего шаблона форума '.$this_set['set_name'] );
|
||||
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( 'section='.$this->ipsclass->section_code.'&act=sets' ,'Skin Manager Home' );
|
||||
$this->ipsclass->admin->nav[] = array( '' ,'Editing Board Wrapper in set '.$this_set['set_name'] );
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,311 +1,308 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Spider (MAN) Logs
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 28th May 2003
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
| > DBA Checked: Tue 25th May 2004
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class ad_spiderlogs {
|
||||
|
||||
var $base_url;
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "admin";
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = "spiderlog";
|
||||
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Æóðíàë äåéñòâèé ïîèñêîâûõ ðîáîòîâ' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get bot names
|
||||
//-----------------------------------------
|
||||
|
||||
foreach( explode( "\n", $this->ipsclass->vars['search_engine_bots'] ) as $bot )
|
||||
{
|
||||
list($ua, $n) = explode( "=", $bot );
|
||||
|
||||
$this->bot_map[ strtolower($ua) ] = $n;
|
||||
}
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
case 'view':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->view();
|
||||
break;
|
||||
|
||||
case 'remove':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
|
||||
$this->remove();
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
default:
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->list_current();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// View Logs
|
||||
//-----------------------------------------
|
||||
|
||||
function view()
|
||||
{
|
||||
$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Íèæå óêàçàí ñïèñîê âñåõ äåéñòâèé, êîòîðûå áûëè ïðîèçâåäåíû ïîèñêîâûìè ðîáîòàìè íà âàøåì ôîðóìå.<br />Â ýòîì æóðíàëå ôèêñèðóþòñÿ äåéñòâèÿ òîëüêî èçâåñòíûõ ðîáîòîâ, êîòîðûå óêàçàíû â íàñòðîéêå «Ñïèñîê „user-agent“ ïîèñêîâûõ ðîáîòîâ».";
|
||||
$this->ipsclass->admin->page_title = "Æóðíàë äåéñòâèé ïîèñêîâûõ ðîáîòîâ";
|
||||
|
||||
$botty = urldecode($this->ipsclass->input['bid']);
|
||||
$botty = str_replace( "!", "!", $botty );
|
||||
|
||||
if ( !isset($this->ipsclass->input['search_string']) OR $this->ipsclass->input['search_string'] == "" )
|
||||
{
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "bot='$botty'" ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
$row = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
$row_count = $row['count'];
|
||||
|
||||
$query = "&{$this->ipsclass->form_code}&bid={$this->ipsclass->input['bid']}&code=view";
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
|
||||
'from' => 'spider_logs',
|
||||
'where' => "bot='$botty'",
|
||||
'order' => 'entry_date DESC',
|
||||
'limit' => array( $start, 20 ) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->input['search_string'] = urldecode($this->ipsclass->input['search_string']);
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "query_string LIKE '%{$this->ipsclass->input['search_string']}%'" ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
$row = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
$row_count = $row['count'];
|
||||
|
||||
$query = "&{$this->ipsclass->form_code}&code=view&search_string=".urlencode($this->ipsclass->input['search_string']);
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
|
||||
'from' => 'spider_logs',
|
||||
'where' => "query_string LIKE '%{$this->ipsclass->input['search_string']}%'",
|
||||
'order' => 'entry_date DESC',
|
||||
'limit' => array( $start, 20 ) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
}
|
||||
|
||||
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $row_count,
|
||||
'PER_PAGE' => 20,
|
||||
'CUR_ST_VAL' => $start,
|
||||
'L_SINGLE' => "Îäíà ñòðàíèöà",
|
||||
'L_MULTI' => "Ñòðàíèö: ",
|
||||
'BASE_URL' => $this->ipsclass->base_url.$query,
|
||||
)
|
||||
);
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Íèæå óêàçàí ñïèñîê âñåõ äåéñòâèé, êîòîðûå áûëè ïðîèçâåäåíû ïîèñêîâûìè ðîáîòàìè íà âàøåì ôîðóìå.<br />Â ýòîì æóðíàëå ôèêñèðóþòñÿ äåéñòâèÿ òîëüêî èçâåñòíûõ ðîáîòîâ, êîòîðûå óêàçàíû â íàñòðîéêå «Ñïèñîê „user-agent“ ïîèñêîâûõ ðîáîòîâ».";
|
||||
$this->ipsclass->admin->page_title = "Æóðíàë äåéñòâèé ïîèñêîâûõ ðîáîòîâ";
|
||||
|
||||
//-----------------------------------------
|
||||
// Show form!
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ïîèñêîâûé ðîáîò" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ñòðîêà çàïðîñà" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Äàòà" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "IP-àäðåñ" , "10%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ñïèñîê äåéñòâèé — ðåçóëüòàòû ïîèñêà" );
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader');
|
||||
|
||||
if ( $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
while ( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$extra = "";
|
||||
|
||||
if ( preg_match( '#lo-fi#i', $row['query_string'] ) )
|
||||
{
|
||||
$extra = '(Lo-Fi)';
|
||||
$row['query_string'] = 'showtopic='.preg_replace( "#Lo-Fi\: t(.+?)\.html#", "\\1", $row['query_string'] );
|
||||
}
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>".$this->bot_map[ strtolower($row['bot']) ]."</b>",
|
||||
"<a href='{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}?{$row['query_string']}' target='_blank'>$extra {$row['query_string']}</a>",
|
||||
$this->ipsclass->admin->get_date( $row['entry_date'], 'LONG' ),
|
||||
"{$row['ip_address']}",
|
||||
) );
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Ïîèñê íå äàë ðåçóëüòàòîâ</center>");
|
||||
}
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader');
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove archived files
|
||||
//-----------------------------------------
|
||||
|
||||
function remove()
|
||||
{
|
||||
if ($this->ipsclass->input['bid'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû íå âûáðàëè áîòà, êîòîðîãî õîòèòå óäàëèòü!");
|
||||
}
|
||||
|
||||
$botty = urldecode($this->ipsclass->input['bid']);
|
||||
$botty = str_replace( "!", "!", $botty );
|
||||
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'spider_logs', 'where' => "bot='$botty'" ) );
|
||||
|
||||
$this->ipsclass->admin->save_log("Óäàëåííûå çàïèñè èç æóðíàëà ïîèñêîâûõ ðîáîòîâ");
|
||||
|
||||
$this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}");
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// SHOW ALL BOTS
|
||||
//-----------------------------------------
|
||||
|
||||
function list_current()
|
||||
{
|
||||
$form_array = array();
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Íèæå óêàçàí ñïèñîê âñåõ äåéñòâèé, êîòîðûå áûëè ïðîèçâåäåíû ïîèñêîâûìè ðîáîòàìè íà âàøåì ôîðóìå.<br />Â ýòîì æóðíàëå ôèêñèðóþòñÿ äåéñòâèÿ òîëüêî èçâåñòíûõ ðîáîòîâ, êîòîðûå óêàçàíû â íàñòðîéêå «Ñïèñîê „user-agent“ ïîèñêîâûõ ðîáîòîâ».";
|
||||
$this->ipsclass->admin->page_title = "Æóðíàë äåéñòâèé ïîèñêîâûõ ðîáîòîâ";
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ïîèñêîâûé ðîáîò" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Õèòîâ" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Çàïóùåí" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Âñå äåéñòâèÿ" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Óäàëèòü âñå äåéñòâèÿ" , "20%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ñïèñîê äåéñòâèé" );
|
||||
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'spiderlogs_list_current', array() );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$url_butt = urlencode($r['bot']);
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $this->bot_map[ strtolower($r['bot']) ],
|
||||
"<center>{$r['cnt']}</center>",
|
||||
$this->ipsclass->admin->get_date( $r['entry_date'], 'SHORT' ),
|
||||
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=view&bid={$url_butt}'>Ïðîñìîòð</a></center>",
|
||||
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=remove&bid={$url_butt}'>Óäàëèòü</a></center>",
|
||||
) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'view' ),
|
||||
2 => array( 'act' , 'spiderlog' ),
|
||||
4 => array( 'section', $this->ipsclass->section_code ),
|
||||
) );
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîèñê äåéñòâèé" );
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñêàòü...</b>" ,
|
||||
$this->ipsclass->adskin->form_input( "search_string").'... â ñòðîêå çàïðîñà'
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Íàéòè");
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2007-03-28 18:08:51 -0400 (Wed, 28 Mar 2007) $
|
||||
| > $Revision: 910 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Spider (MAN) Logs
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 28th May 2003
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
| > DBA Checked: Tue 25th May 2004
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class ad_spiderlogs {
|
||||
|
||||
var $base_url;
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "admin";
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = "spiderlog";
|
||||
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Search Engine Spider Logs' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get bot names
|
||||
//-----------------------------------------
|
||||
|
||||
foreach( explode( "\n", $this->ipsclass->vars['search_engine_bots'] ) as $bot )
|
||||
{
|
||||
list($ua, $n) = explode( "=", $bot );
|
||||
|
||||
$this->bot_map[ strtolower($ua) ] = $n;
|
||||
}
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
case 'view':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->view();
|
||||
break;
|
||||
|
||||
case 'remove':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
|
||||
$this->remove();
|
||||
break;
|
||||
|
||||
//-----------------------------------------
|
||||
default:
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->list_current();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// View Logs
|
||||
//-----------------------------------------
|
||||
|
||||
function view()
|
||||
{
|
||||
$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Viewing all actions by a search engine spider";
|
||||
$this->ipsclass->admin->page_title = "Search Engine Logs Manager";
|
||||
|
||||
$botty = urldecode($this->ipsclass->input['bid']);
|
||||
$botty = str_replace( "!", "!", $botty );
|
||||
|
||||
if ( !isset($this->ipsclass->input['search_string']) OR $this->ipsclass->input['search_string'] == "" )
|
||||
{
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "bot='$botty'" ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
$row = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
$row_count = $row['count'];
|
||||
|
||||
$query = "&{$this->ipsclass->form_code}&bid={$this->ipsclass->input['bid']}&code=view";
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
|
||||
'from' => 'spider_logs',
|
||||
'where' => "bot='$botty'",
|
||||
'order' => 'entry_date DESC',
|
||||
'limit' => array( $start, 20 ) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->input['search_string'] = urldecode($this->ipsclass->input['search_string']);
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "query_string LIKE '%{$this->ipsclass->input['search_string']}%'" ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
$row = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
$row_count = $row['count'];
|
||||
|
||||
$query = "&{$this->ipsclass->form_code}&code=view&search_string=".urlencode($this->ipsclass->input['search_string']);
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
|
||||
'from' => 'spider_logs',
|
||||
'where' => "query_string LIKE '%{$this->ipsclass->input['search_string']}%'",
|
||||
'order' => 'entry_date DESC',
|
||||
'limit' => array( $start, 20 ) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
}
|
||||
|
||||
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $row_count,
|
||||
'PER_PAGE' => 20,
|
||||
'CUR_ST_VAL' => $start,
|
||||
'L_SINGLE' => "Single Page",
|
||||
'L_MULTI' => "Pages: ",
|
||||
'BASE_URL' => $this->ipsclass->base_url.$query,
|
||||
)
|
||||
);
|
||||
|
||||
$this->ipsclass->admin->page_detail = "You may view and remove actions performed by a search engine bot";
|
||||
$this->ipsclass->admin->page_title = "Search Engine Logs Manager";
|
||||
|
||||
//-----------------------------------------
|
||||
// Show form!
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Bot Name" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Query String" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Time of action" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "IP address" , "10%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Search Engine Logs" );
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader');
|
||||
|
||||
if ( $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
while ( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$extra = "";
|
||||
|
||||
if ( preg_match( '#lo-fi#i', $row['query_string'] ) )
|
||||
{
|
||||
$extra = '(Lo-Fi)';
|
||||
|
||||
$query_string_html = $extra . ' ' . $row['query_string'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$query_string_html = "<a href='{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}?{$row['query_string']}' target='_blank'>{$row['query_string']}</a>";
|
||||
}
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>".$this->bot_map[ strtolower($row['bot']) ]."</b>",
|
||||
$query_string_html,
|
||||
$this->ipsclass->admin->get_date( $row['entry_date'], 'LONG' ),
|
||||
"{$row['ip_address']}",
|
||||
) );
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>No results</center>");
|
||||
}
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader');
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove archived files
|
||||
//-----------------------------------------
|
||||
|
||||
function remove()
|
||||
{
|
||||
if ($this->ipsclass->input['bid'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("You did not select a bot to remove by!");
|
||||
}
|
||||
|
||||
$botty = urldecode($this->ipsclass->input['bid']);
|
||||
$botty = str_replace( "!", "!", $botty );
|
||||
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'spider_logs', 'where' => "bot='$botty'" ) );
|
||||
|
||||
$this->ipsclass->admin->save_log("Removed Search Engine Logs");
|
||||
|
||||
$this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}");
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// SHOW ALL BOTS
|
||||
//-----------------------------------------
|
||||
|
||||
function list_current()
|
||||
{
|
||||
$form_array = array();
|
||||
|
||||
$this->ipsclass->admin->page_detail = "You may view and remove entries in your spider engine logs";
|
||||
$this->ipsclass->admin->page_title = "Search Engine Logs Manager";
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Bot Name" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Hits" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Last Hit" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "View all by bot" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Remove all by bot" , "20%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Search Engine Spider Logs" );
|
||||
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'spiderlogs_list_current', array() );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$url_butt = urlencode($r['bot']);
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $this->bot_map[ strtolower($r['bot']) ],
|
||||
"<center>{$r['cnt']}</center>",
|
||||
$this->ipsclass->admin->get_date( $r['entry_date'], 'SHORT' ),
|
||||
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=view&bid={$url_butt}'>View</a></center>",
|
||||
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=remove&bid={$url_butt}'>Remove</a></center>",
|
||||
) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'view' ),
|
||||
2 => array( 'act' , 'spiderlog' ),
|
||||
4 => array( 'section', $this->ipsclass->section_code ),
|
||||
) );
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Search Engine Logs" );
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Search for...</b>" ,
|
||||
$this->ipsclass->adskin->form_input( "search_string").'... in the query string'
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search");
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,73 +1,65 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > SQL Admin Stuff
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Friday 24 June 2005
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class ad_sql
|
||||
{
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Auto run
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
if ( TRIAL_VERSION )
|
||||
{
|
||||
print "Ýòî ñâîéñòâî îòêëþ÷åíî â òåñòîâîé âåðñèè ôîðóìà.";
|
||||
exit();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Make sure we're a root admin, or else!
|
||||
//-----------------------------------------
|
||||
|
||||
if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'])
|
||||
{
|
||||
$this->ipsclass->admin->error("Èçâèíèòå, íî ýòè ôóíêöèè òîëüêî äëÿ àäìèíèñòðàòîðñêîé ãðóïïû");
|
||||
}
|
||||
|
||||
require_once( ROOT_PATH.'sources/action_admin/sql_'.strtolower($this->ipsclass->vars['sql_driver']).'.php' );
|
||||
$dbdriver = new ad_sql_module();
|
||||
$dbdriver->ipsclass =& $this->ipsclass;
|
||||
$dbdriver->auto_run();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-09-22 06:28:54 -0400 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > SQL Admin Stuff
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Friday 24 June 2005
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class ad_sql
|
||||
{
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Auto run
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
if ( TRIAL_VERSION )
|
||||
{
|
||||
print "This feature is disabled in the trial version.";
|
||||
exit();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Make sure we're a root admin, or else!
|
||||
//-----------------------------------------
|
||||
|
||||
if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'])
|
||||
{
|
||||
$this->ipsclass->admin->error("Sorry, these functions are for the root admin group only");
|
||||
}
|
||||
|
||||
require_once( ROOT_PATH.'sources/action_admin/sql_'.strtolower($this->ipsclass->vars['sql_driver']).'.php' );
|
||||
$dbdriver = new ad_sql_module();
|
||||
$dbdriver->ipsclass =& $this->ipsclass;
|
||||
$dbdriver->auto_run();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -2,22 +2,14 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ!
|
||||
| Права на ПО принадлежат Invision Power Services
|
||||
| Права на перевод IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-03-23 07:34:25 -0500 (Thu, 23 Mar 2006) $
|
||||
| > $Revision: 177 $
|
||||
@@ -34,7 +26,7 @@
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Некорректный адрес</h1>Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -42,99 +34,99 @@ if ( ! defined( 'IN_ACP' ) )
|
||||
class ad_support
|
||||
{
|
||||
var $base_url;
|
||||
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "help";
|
||||
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = "support";
|
||||
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Помощь и поддержка' );
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Support' );
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
case 'doctor':
|
||||
$this->ipsclass->admin->page_detail = "Воспользовавшись нашей документацией, вы сможете узнать более подробно о том, как использовать ту или иную функцию в Invision Power Board.";
|
||||
$this->ipsclass->admin->page_title = "Документация";
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Please utilize our documentation to discover how to use features found in the software.";
|
||||
$this->ipsclass->admin->page_title = "Documentation";
|
||||
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
|
||||
$this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/docs-ipb' );
|
||||
$this->ipsclass->admin->show_inframe( 'http://anonym.to/http://external.ipslink.com/ipboard22/landing/?p=docs-ipb' );
|
||||
break;
|
||||
break;
|
||||
|
||||
|
||||
case 'kb':
|
||||
$this->ipsclass->admin->page_detail = "Воспользуйтесь нашей базой знаний для поиска решений общих проблем и проблем, связанных со старыми выпусками Invision Power Board. В данной базе вы также сможете найти описание, как использовать некоторые функции нашего программного обеспечения.";
|
||||
$this->ipsclass->admin->page_title = "База знаний";
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Please utilize our knowledgebase to search for common issues and fixes to those issues. You can also find documentation on how to use the features found in the software as well.";
|
||||
$this->ipsclass->admin->page_title = "Help & Support";
|
||||
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
|
||||
$this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/wiki' );
|
||||
$this->ipsclass->admin->show_inframe( 'http://anonym.to/http://external.ipslink.com/ipboard22/landing/?p=kb' );
|
||||
break;
|
||||
|
||||
|
||||
case 'support':
|
||||
$this->ipsclass->admin->page_detail = "Если у вас возникли проблемы или вопросы при использовании программного обеспечения компании Invision Power Services, то, пожалуйста, воспользуйтесь формой ниже, чтобы получить квалифицированную помощь. Помните, что время ответа в первую очередь зависит от сложности вашего вопроса.<br /><br /><i>Вам необходимо иметь активную лицензию, чтобы воспользоваться клиент-центром.</i>";
|
||||
$this->ipsclass->admin->page_title = "Помощь и поддержка";
|
||||
|
||||
$this->ipsclass->admin->page_detail = "If you are experiencing an issue with your Invision Power Services software and require official assistance or support, you may utilize our ticketing system to submit a ticket. Please allow 24-48 hours for a response during normal business hours.<br /><br /><i>You must have an active support contract with us in order to submit a ticket.</i>";
|
||||
$this->ipsclass->admin->page_title = "Help & Support";
|
||||
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
|
||||
$this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/clientarea' );
|
||||
break;
|
||||
|
||||
case 'ibresource':
|
||||
$this->ipsclass->admin->page_detail = "Форумы IBResource — это ресурс, где можно найти много полезных статей и советов, модификаций и модулей, стилей и дополнительной графики, а так же получить помощь от других клиентов. Помните, вся информация на наших форумах предоставляется «как есть» и не подтверждена техническим отделом компании «Invision Power Services, Inc.» — все действия, описанные другими пользователями, вы будете делать на свой страх и риск.
|
||||
<br /><br />Перевести свою учетную запись на наших форумах в группу «Клиенты» вы можете через клиент-центр.";
|
||||
$this->ipsclass->admin->page_title = "Помощь и поддержка";
|
||||
|
||||
$this->ipsclass->admin->show_inframe( 'http://anonym.to/https://www.invisionpower.com/customer/index.php?&module=clientarea§ion=tickets' );
|
||||
break;
|
||||
|
||||
case 'resources':
|
||||
$this->ipsclass->admin->page_detail = "resources.invisionpower.com is a customer-only resource site where you can find helpful articles, modifications, skins, and graphics for your forum. Note that all content and advice found on resources.invisionpower.com is provided as-is by the individual user, and is not endorsed nor support by Invision Power Services, Inc.
|
||||
If you are looking for additional resources for your board, this is the first place to go.";
|
||||
$this->ipsclass->admin->page_title = "Help & Support";
|
||||
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
|
||||
$this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/forums' );
|
||||
$this->ipsclass->admin->show_inframe( 'http://anonym.to/http://resources.invisionpower.com' );
|
||||
break;
|
||||
|
||||
|
||||
case 'contact':
|
||||
$this->ipsclass->admin->page_detail = "Если вы хотите связаться с нами, пожалуйста, ознакомьтесь с нашей контактной информацией и часами работы ниже.";
|
||||
$this->ipsclass->admin->page_title = "Помощь и поддержка";
|
||||
|
||||
$this->ipsclass->admin->page_detail = "If you would like to contact us you can find our current contact information and hours of operation below.";
|
||||
$this->ipsclass->admin->page_title = "Help & Support";
|
||||
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
|
||||
$this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/contact' );
|
||||
$this->ipsclass->admin->show_inframe( 'http://anonym.to/http://external.ipslink.com/ipboard22/landing/?p=contact' );
|
||||
break;
|
||||
|
||||
|
||||
case 'features':
|
||||
$this->ipsclass->admin->page_detail = "Если вы хотите подсказать нам, как улучшить наши продукты, то просто оставьте свое предложение в одном из форумов ниже.";
|
||||
$this->ipsclass->admin->page_title = "Предложения и пожелания";
|
||||
|
||||
$this->ipsclass->admin->page_detail = "If you would like to request a feature, or see if a particular feature has already been requested, for Invision Power Board this forum is the place to do so.";
|
||||
$this->ipsclass->admin->page_title = "Help & Support";
|
||||
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
|
||||
$this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/suggestfeatures' );
|
||||
$this->ipsclass->admin->show_inframe( 'http://anonym.to/http://external.ipslink.com/ipboard22/landing/?p=suggestfeatures' );
|
||||
break;
|
||||
|
||||
|
||||
case 'bugs':
|
||||
$this->ipsclass->admin->page_detail = "Вы можете отправить отчет о найденной ошибке, а так же узнать об исправлениях других ошибок, используя «Bugtracker» ниже.";
|
||||
$this->ipsclass->admin->page_title = "Помощь и поддержка";
|
||||
|
||||
$this->ipsclass->admin->page_detail = "You may submit and track all bugs reported to us by our users for Invision Power Board in the Bugtracker below.";
|
||||
$this->ipsclass->admin->page_title = "Help & Support";
|
||||
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
|
||||
$this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/bugtrack' );
|
||||
break;
|
||||
|
||||
|
||||
$this->ipsclass->admin->show_inframe( 'http://anonym.to/http://forums.invisionpower.com/index.php?autocom=bugtracker&code=show_project&product_id=2' );
|
||||
break;
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
default:
|
||||
$this->ipsclass->admin->page_detail = "Если у вас возникли проблемы или вопросы при использование программного обеспечения компании Invision Power Services, то, пожалуйста, воспользуйтесь формой ниже, чтобы получить квалифицированную помощь. Помните, что время ответа в первую очередь зависит от сложности вашего вопроса.<br /><br /><i>Вам необходимо иметь активную лицензию, чтобы воспользоваться клиент-центром.</i>";
|
||||
$this->ipsclass->admin->page_title = "Помощь и поддержка";
|
||||
|
||||
$this->ipsclass->admin->page_detail = "If you are experiencing an issue with your Invision Power Services software and require official assistance or support, you may utilize our ticketing system to submit a ticket. Please allow 24-48 hours for a response during normal business hours.<br /><br /><i>You must have an active support contract with us in order to submit a ticket.</i>";
|
||||
$this->ipsclass->admin->page_title = "Help & Support";
|
||||
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
|
||||
$this->ipsclass->admin->show_inframe( 'https://www.ibresource.ru/clientarea/index.php' );
|
||||
$this->ipsclass->admin->show_inframe( 'http://anonym.to/https://www.invisionpower.com/customer/index.php?&module=clientarea§ion=tickets' );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -2,26 +2,18 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
| > $Date: 2007-05-08 16:35:01 -0400 (Tue, 08 May 2007) $
|
||||
| > $Revision: 981 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Warn Log functions
|
||||
@@ -36,216 +28,220 @@
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class ad_warnlogs {
|
||||
|
||||
var $base_url;
|
||||
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "admin";
|
||||
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = "warnlog";
|
||||
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Æóðíàë ïðåäóïðåæäåíèé' );
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Warn Logs' );
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
|
||||
|
||||
case 'view':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->view();
|
||||
break;
|
||||
|
||||
|
||||
case 'viewcontact':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->view_contact();
|
||||
break;
|
||||
|
||||
|
||||
case 'viewnote':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
|
||||
$this->view_note();
|
||||
break;
|
||||
|
||||
|
||||
case 'remove':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
|
||||
$this->remove();
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
default:
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->list_current();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// View NOTE in da pop up innit
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function view_note()
|
||||
{
|
||||
if ($this->ipsclass->input['id'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü ID email, ïîïðîáóéòå ñíîâà");
|
||||
$this->ipsclass->admin->error("Could not resolve the email ID, please try again");
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Load and config the post parser
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" );
|
||||
$this->parser = new parse_bbcode();
|
||||
$this->parser->ipsclass = $this->ipsclass;
|
||||
$this->parser->allow_update_caches = 1;
|
||||
|
||||
|
||||
$this->parser->bypass_badwords = intval($this->ipsclass->member['g_bypass_badwords']);
|
||||
|
||||
|
||||
$id = intval($this->ipsclass->input['id']);
|
||||
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'warnlogs_view_note', array( 'id' => $id ) );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
|
||||
if ( ! $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü ID email, ïîïðîáóéòå ñíîâà ($id)");
|
||||
$this->ipsclass->admin->error("Could not resolve the email ID, please try again ($id)");
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "100%" );
|
||||
|
||||
|
||||
$content = preg_match( "#<content>(.+?)</content>#is", $row['wlog_notes'], $cont );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Warn Notes" );
|
||||
|
||||
|
||||
$row['date'] = $this->ipsclass->admin->get_date( $row['wlog_date'], 'LONG' );
|
||||
|
||||
|
||||
$row['a_name'] = $row['a_name'] ? $row['a_name'] : 'Deleted Member (ID:' . $row['wlog_mid'] . ')';
|
||||
|
||||
$this->parser->parse_html = 0;
|
||||
$this->parser->parse_nl2br = 1;
|
||||
$this->parser->parse_smilies = 1;
|
||||
$this->parser->parse_bbcode = 1;
|
||||
|
||||
|
||||
$text = $this->parser->pre_display_parse( $this->parser->pre_db_parse($cont[1]) );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
|
||||
"<strong>Îò:</strong> {$row['p_name']}
|
||||
<br /><strong>Êîìó:</strong> {$row['a_name']}
|
||||
<br /><strong>Îòïðàâëåíî:</strong> {$row['date']}
|
||||
"<strong>From:</strong> {$row['p_name']}
|
||||
<br /><strong>To:</strong> {$row['a_name']}
|
||||
<br /><strong>Sent:</strong> {$row['date']}
|
||||
<hr>
|
||||
<br />$text
|
||||
"
|
||||
) );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
$this->ipsclass->admin->print_popup();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// View contact in da pop up innit
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function view_contact()
|
||||
{
|
||||
if ($this->ipsclass->input['id'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü ID email, ïîïðîáóéòå ñíîâà");
|
||||
$this->ipsclass->admin->error("Could not resolve the email ID, please try again");
|
||||
}
|
||||
|
||||
|
||||
$id = intval($this->ipsclass->input['id']);
|
||||
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'warnlogs_view_note', array( 'id' => $id ) );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
|
||||
if ( ! $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü ID email, ïîïðîáóéòå ñíîâà ($id)");
|
||||
$this->ipsclass->admin->error("Could not resolve the email ID, please try again ($id)");
|
||||
}
|
||||
|
||||
$type = $row['wlog_contact'] == 'pm' ? "Ëè÷íîå ñîîáùåíèå" : "EMAIL";
|
||||
|
||||
|
||||
$type = $row['wlog_contact'] == 'pm' ? "PM" : "EMAIL";
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "100%" );
|
||||
|
||||
|
||||
$subject = preg_match( "#<subject>(.+?)</subject>#is", $row['wlog_contact_content'], $subj );
|
||||
$content = preg_match( "#<content>(.+?)</content>#is", $row['wlog_contact_content'], $cont );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( $type.": ".$subj[1] );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$row['date'] = $this->ipsclass->admin->get_date( $row['wlog_date'], 'LONG' );
|
||||
|
||||
|
||||
$row['a_name'] = $row['a_name'] ? $row['a_name'] : 'Deleted Member (ID:' . $row['wlog_mid'] . ')';
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
|
||||
"<strong>Îò:</strong> {$row['p_name']}
|
||||
<br /><strong>Êîìó:</strong> {$row['a_name']}
|
||||
<br /><strong>Îòïðàâëåíî:</strong> {$row['date']}
|
||||
<br /><strong>Òåìà:</strong> $subj[1]
|
||||
"<strong>From:</strong> {$row['p_name']}
|
||||
<br /><strong>To:</strong> {$row['a_name']}
|
||||
<br /><strong>Sent:</strong> {$row['date']}
|
||||
<br /><strong>Subject:</strong> $subj[1]
|
||||
<hr>
|
||||
<br />$cont[1]
|
||||
"
|
||||
) );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
$this->ipsclass->admin->print_popup();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove archived files
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function view()
|
||||
{
|
||||
$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
|
||||
|
||||
|
||||
$this->ipsclass->html .= ""; // removed js popwin
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Ïðîñìîòð âñåõ çàïèñåé î ïðåäóïðåæäåíèé ïîëüçîâàòåëÿ";
|
||||
$this->ipsclass->admin->page_title = "Æóðíàë ïðåäóïðåæäåíèé";
|
||||
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Viewing all warn entries on a member";
|
||||
$this->ipsclass->admin->page_title = "Warn Logs Manager";
|
||||
|
||||
if ($this->ipsclass->input['search_string'] == "" and $this->ipsclass->input['mid'])
|
||||
{
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(wlog_id) as count', 'from' => 'warn_logs', 'where' => "wlog_mid=".intval($this->ipsclass->input['mid']) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
$row = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
|
||||
$row_count = $row['count'];
|
||||
|
||||
|
||||
$query = "&{$this->ipsclass->form_code}&mid={$this->ipsclass->input['mid']}&code=view";
|
||||
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'warnlogs_view', array( 'mid' => intval($this->ipsclass->input['mid']), 'start' => $start ) );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->input['search_string'] = urldecode($this->ipsclass->input['search_string']);
|
||||
|
||||
|
||||
if ( ($this->ipsclass->input['search_type'] == 'notes') )
|
||||
{
|
||||
$dbq = "l.wlog_notes LIKE '%".$this->ipsclass->input['search_string']."%'";
|
||||
@@ -254,115 +250,116 @@ class ad_warnlogs {
|
||||
{
|
||||
$dbq = "l.wlog_contact_content LIKE '%".$this->ipsclass->input['search_string']."%'";
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(l.wlog_id) as count', 'from' => 'warn_logs l', 'where' => $dbq ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
|
||||
$row = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
|
||||
$row_count = $row['count'];
|
||||
|
||||
|
||||
$query = "&{$this->ipsclass->form_code}&code=view&search_type={$this->ipsclass->input['search_type']}&search_string=".urlencode($this->ipsclass->input['search_string']);
|
||||
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'warnlogs_view_two', array( 'dbq' => $dbq, 'start' => $start ) );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
}
|
||||
|
||||
|
||||
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $row_count,
|
||||
'PER_PAGE' => 30,
|
||||
'CUR_ST_VAL' => $start,
|
||||
'L_SINGLE' => "Ñòðàíèöà",
|
||||
'L_MULTI' => "Ñòðàíèöû: ",
|
||||
'L_SINGLE' => "Single Page",
|
||||
'L_MULTI' => "Pages: ",
|
||||
'BASE_URL' => $this->ipsclass->base_url.$query,
|
||||
)
|
||||
);
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Â ýòîé ñåêöèè âû ìîæåòå ïðîñìàòðèâàòü è óïðàâëÿòü æóðíàëîì ïðåäóïðåæäåíèé";
|
||||
$this->ipsclass->admin->page_title = "Æóðíàë ïðåäóïðåæäåíèé";
|
||||
|
||||
|
||||
$this->ipsclass->admin->page_detail = "You may view warn entries added by your moderators";
|
||||
$this->ipsclass->admin->page_title = "Warn Logs Manager";
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Òèï" , "5%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ïîëüçîâàòåëü" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Óâåäîìëåí?" , "5%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ïðîâåðêà ñîîáùåíèé" , "10%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Áàí" , "10%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Çàïðåò ñîîáùåíèé" , "10%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Âðåìÿ" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ìîäåðàòîð" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ïîñìîòðåòü çàìåòêè" , "10%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Æóðíàë ïðåäóïðåæäåíèé" );
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Type" , "5%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Member Name" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Contacted" , "5%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "MOD Q" , "10%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "SUSP" , "10%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "NO POST" , "10%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Date" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Warned By" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "View Note" , "10%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Warn Logs" );
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader');
|
||||
|
||||
$days = array( 'd' => "Äíåé", 'h' => "÷àñîâ" );
|
||||
|
||||
|
||||
$days = array( 'd' => "Days", 'h' => "Hours" );
|
||||
|
||||
if ( $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
while ( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
|
||||
$row['a_name'] = $row['a_name'] ? $row['a_name'] : 'Deleted Member (ID:' . $row['wlog_mid'] . ')';
|
||||
|
||||
$row['wlog_date'] = $this->ipsclass->admin->get_date( $row['wlog_date'], 'LONG' );
|
||||
|
||||
|
||||
$type = ( $row['wlog_type'] == 'pos' ) ? '<span style="color:green;font-weight:bold">-</span>' : '<span style="color:red;font-weight:bold">+</span>';
|
||||
$cont = ( $row['wlog_contact'] != 'none' ) ? "<center><a href='javascript:pop_win(\"&{$this->ipsclass->form_code}&code=viewcontact&id={$row['wlog_id']}\",\"Log\", 400,400)'>Ïðîñìîòð</a></center>" : ' ';
|
||||
|
||||
$cont = ( $row['wlog_contact'] != 'none' ) ? "<center><a href='javascript:pop_win(\"&{$this->ipsclass->form_code}&code=viewcontact&id={$row['wlog_id']}\",\"Log\", 400,400)'>View</a></center>" : ' ';
|
||||
|
||||
$mod = preg_match( "#<mod>(.+?)</mod>#is" , $row['wlog_notes'], $mm );
|
||||
$post = preg_match( "#<post>(.+?)</post>#is" , $row['wlog_notes'], $pm );
|
||||
$susp = preg_match( "#<susp>(.+?)</susp>#is" , $row['wlog_notes'], $sm );
|
||||
$content = preg_match( "#<content>(.+?)</content>#is", $row['wlog_notes'], $cm );
|
||||
|
||||
|
||||
$content = $cm[1];
|
||||
|
||||
|
||||
$mod = trim($mm[1]);
|
||||
$post = trim($pm[1]);
|
||||
$susp = trim($sm[1]);
|
||||
|
||||
|
||||
list($v, $u, $i) = explode(',', $mod);
|
||||
|
||||
|
||||
if ( $i == 1 )
|
||||
{
|
||||
$mod = 'Íå îïðåäåëåíî';
|
||||
$mod = 'INDEF';
|
||||
}
|
||||
else if ( $v == "" )
|
||||
{
|
||||
$mod = 'Íåò';
|
||||
$mod = 'None';
|
||||
}
|
||||
else
|
||||
{
|
||||
$mod = $v.' '.$days[$u];
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
list($v, $u, $i) = explode(',', $post);
|
||||
|
||||
|
||||
if ( $i == 1 )
|
||||
{
|
||||
$post = 'Íå îïðåäåëåíî';
|
||||
$post = 'INDEF';
|
||||
}
|
||||
else if ( $v == "" )
|
||||
{
|
||||
$post = 'Íåò';
|
||||
$post = 'None';
|
||||
}
|
||||
else
|
||||
{
|
||||
$post = $v.' '.$days[$u];
|
||||
}
|
||||
|
||||
|
||||
list($v, $u) = explode(',', $susp);
|
||||
|
||||
|
||||
if ( $v == "" )
|
||||
{
|
||||
$susp = 'íåò';
|
||||
$susp = 'None';
|
||||
}
|
||||
else
|
||||
{
|
||||
$susp = $v.' '.$days[$u];
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
|
||||
"<center>$type</center>",
|
||||
"<b>{$row['a_name']}</b>",
|
||||
@@ -372,83 +369,85 @@ class ad_warnlogs {
|
||||
$post,
|
||||
"{$row['wlog_date']}",
|
||||
"<b>{$row['p_name']}</b>",
|
||||
"<center><a href='javascript:pop_win(\"&{$this->ipsclass->form_code}&code=viewnote&id={$row['wlog_id']}\",\"Log\",400,400)'>Ïðîñìîòð</a></center>"
|
||||
"<center><a href='javascript:pop_win(\"&{$this->ipsclass->form_code}&code=viewnote&id={$row['wlog_id']}\",\"Log\",400,400)'>View</a></center>"
|
||||
) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Íåò çàïèñåé</center>");
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>No results</center>");
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader');
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove archived files
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function remove()
|
||||
{
|
||||
if ($this->ipsclass->input['mid'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû íå âûáðàëè ïîëüçîâàòåëÿ, êîòîðîìó íåîáõîäèìî óäàëèòü ïðåäóïðåæäåíèå.");
|
||||
$this->ipsclass->admin->error("You did not select a member ID to remove by!");
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'warn_logs', 'where' => "wlog_mid=".intval($this->ipsclass->input['mid']) ) );
|
||||
|
||||
$this->ipsclass->admin->save_log("Ïðåäóïðåæäåíèå óäàëåíî");
|
||||
|
||||
$this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}");
|
||||
|
||||
$this->ipsclass->admin->save_log("Removed Warn Logs");
|
||||
|
||||
$this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// SHOW LOGS
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
function list_current()
|
||||
{
|
||||
$form_array = array();
|
||||
|
||||
$this->ipsclass->admin->page_detail = " ýòîé ñåêöèè âû ìîæåòå ïðîñìàòðèâàòü è óïðàâëÿòü æóðíàëîì ïðåäóïðåæäåíèé.<br />Ïðèìå÷àíèå: óäàëåíèå çàïèñåé èç æóðíàëà íå ïîíèæàåò óðîâåíü ïðåäóïðåæäåíèé ïîëüçîâàòåëÿ.";
|
||||
$this->ipsclass->admin->page_title = "Æóðíàë ïðåäóïðåæäåíèé";
|
||||
|
||||
|
||||
$this->ipsclass->admin->page_detail = "You may view and remove warn actions performed by your staff.<br />Note: Removing the logs does not decrease the member's warn level";
|
||||
$this->ipsclass->admin->page_title = "Warn Logs Manager";
|
||||
|
||||
$this->ipsclass->html .= ""; // removed js popwin
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// VIEW LAST 5
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'warnlogs_list_current', array() );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Type" , "5%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Warned Member" , "25%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Contacted?" , "5%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Date" , "25%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Warned By" , "25%" );
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Òèï" , "5%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ïîëüçîâàòåëü" , "25%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Óâåäîìëåí?" , "5%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Âðåìÿ" , "25%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ìîäåðàòîð" , "25%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîñëåäíèå 10 çàïèñåé" );
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Last 10 Warn Entries" );
|
||||
|
||||
if ( $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
while ( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$row['a_name'] = $row['a_name'] ? $row['a_name'] : 'Deleted Member (ID:' . $row['wlog_mid'] . ')';
|
||||
|
||||
$row['wlog_date'] = $this->ipsclass->admin->get_date( $row['wlog_date'], 'LONG' );
|
||||
|
||||
|
||||
$type = ( $row['wlog_type'] == 'pos' ) ? '<span style="color:green;font-weight:bold">-</span>' : '<span style="color:red;font-weight:bold">+</span>';
|
||||
$cont = ( $row['wlog_contact'] != 'none' ) ? "<center><a title='Ïîêàçàòü ñîîáùåíèå' href='javascript:pop_win(\"&{$this->ipsclass->form_code}&code=viewcontact&id={$row['wlog_id']}\",\"Log\",400,400)'><img src='{$this->ipsclass->skin_acp_url}/images/acp_check.gif' border='0' alt='X'></a></center>" : ' ';
|
||||
|
||||
$cont = ( $row['wlog_contact'] != 'none' ) ? "<center><a title='Show message' href='javascript:pop_win(\"&{$this->ipsclass->form_code}&code=viewcontact&id={$row['wlog_id']}\",\"Log\",400,400)'><img src='{$this->ipsclass->skin_acp_url}/images/acp_check.gif' border='0' alt='X'></a></center>" : ' ';
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
|
||||
"<center>$type</center>",
|
||||
"<b>{$row['a_name']}</b>",
|
||||
@@ -460,79 +459,80 @@ class ad_warnlogs {
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Íåò çàïèñåé</center>");
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>No results</center>");
|
||||
}
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ïîëüçîâàòåëü" , "30%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Âðåìÿ ïðåäóïðåæäåíèÿ" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ïðîñìîòð âñåõ ïðåäóïðåæäåíèé" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Óäàëåíèå âñåõ ïðåäóïðåæäåíèé" , "30%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Æóðíàë ïðåäóïðåæäåíèé" );
|
||||
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Member Name" , "30%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Times Warned" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "View all by member" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Remove all by member" , "30%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Warn Logs" );
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'warnlogs_list_current_two', array() );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
|
||||
$r['members_display_name'] = $r['members_display_name'] ? $r['members_display_name'] : 'Deleted Member (ID:' . $r['wlog_mid'] . ')';
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>{$r['members_display_name']}</b>",
|
||||
"<center>{$r['act_count']}</center>",
|
||||
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=view&mid={$r['wlog_mid']}'>Ïðîñìîòð</a></center>",
|
||||
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=remove&mid={$r['wlog_mid']}'>Óäàëèòü</a></center>",
|
||||
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=view&mid={$r['wlog_mid']}'>View</a></center>",
|
||||
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=remove&mid={$r['wlog_mid']}'>Remove</a></center>",
|
||||
) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'view' ),
|
||||
2 => array( 'act' , 'warnlog' ),
|
||||
4 => array( 'section', $this->ipsclass->section_code ),
|
||||
) );
|
||||
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîèñê äåéñòâèé â æóðíàëå" );
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Warn Logs" );
|
||||
|
||||
$form_array = array(
|
||||
0 => array( 'notes' , 'Çàìåòêè' ),
|
||||
1 => array( 'contact', 'Îòïðàâêà Email/PM' ),
|
||||
0 => array( 'notes' , 'Entry Notes' ),
|
||||
1 => array( 'contact', 'Email/PM Sent' ),
|
||||
);
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñêàòü </b>" ,
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Search for...</b>" ,
|
||||
$this->ipsclass->adskin->form_input( "search_string")
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñêàòü â </b>" ,
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Search in...</b>" ,
|
||||
$this->ipsclass->adskin->form_dropdown( "search_type", $form_array)
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Èñêàòü");
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search");
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,384 +1,299 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-12-13 05:41:32 -0500 (Wed, 13 Dec 2006) $
|
||||
| > $Revision: 788 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > XML OUT Functions for XmlHttpRequest functions
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Friday 18th March 2005
|
||||
|
|
||||
| > Module Version Number: 1.1.0
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class ad_xmlout
|
||||
{
|
||||
# Classes
|
||||
var $ipsclass;
|
||||
var $search;
|
||||
|
||||
var $xml_output;
|
||||
var $xml_header;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Constructor
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function xmlout()
|
||||
{
|
||||
$this->xml_header = '<?xml version="1.0" encoding="WINDOWS-1251"?'.'>';
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Auto run
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
if ( isset($this->ipsclass->input['j_do']) AND $this->ipsclass->input['j_do'] )
|
||||
{
|
||||
$this->ipsclass->input['do'] = $this->ipsclass->input['j_do'];
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// What shall we do?
|
||||
//-----------------------------------------
|
||||
|
||||
switch( $this->ipsclass->input['do'] )
|
||||
{
|
||||
case 'get-template-names':
|
||||
$this->get_template_names();
|
||||
break;
|
||||
case 'get-member-names':
|
||||
$this->get_member_names();
|
||||
break;
|
||||
case 'get-dir-size':
|
||||
$this->get_dir_size();
|
||||
break;
|
||||
case 'post-editorswitch':
|
||||
$this->post_editorswitch();
|
||||
break;
|
||||
case 'captcha_test':
|
||||
$this->captcha_test();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Switch editors
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function captcha_test()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Generate number
|
||||
//-----------------------------------------
|
||||
|
||||
mt_srand( (double) microtime() * 1000000 );
|
||||
$final_rand = md5( uniqid( mt_rand(), TRUE ) );
|
||||
mt_srand();
|
||||
|
||||
for( $i = 0; $i < 6; $i++ )
|
||||
{
|
||||
$captcha_string .= $final_rand{ mt_rand(0, 31) };
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Generate image
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( KERNEL_PATH . 'class_captcha.php' );
|
||||
$class_captcha = new class_captcha();
|
||||
$class_captcha->ipsclass =& $this->ipsclass;
|
||||
$class_captcha->path_background = ROOT_PATH . 'style_captcha/captcha_backgrounds';
|
||||
$class_captcha->path_fonts = ROOT_PATH . 'style_captcha/captcha_fonts';
|
||||
|
||||
return $class_captcha->captcha_show_gd_img( $captcha_string );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Switch editors
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function post_editorswitch()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Grab public class and do...
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( ROOT_PATH . 'sources/action_public/xmlout.php' );
|
||||
$lib = new xmlout();
|
||||
$lib->ipsclass =& $this->ipsclass;
|
||||
|
||||
require_once( KERNEL_PATH . 'class_ajax.php' );
|
||||
$class_ajax = new class_ajax();
|
||||
$class_ajax->ipsclass =& $this->ipsclass;
|
||||
$lib->class_ajax =& $class_ajax;
|
||||
|
||||
return $lib->post_editorswitch();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Get uploads size
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function get_dir_size()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Make sure the uploads path is correct
|
||||
//-----------------------------------------
|
||||
|
||||
$uploads_size = 0;
|
||||
|
||||
if ($dh = @opendir( $this->ipsclass->vars['upload_dir'] ))
|
||||
{
|
||||
while ( false !== ( $file = @readdir( $dh ) ) )
|
||||
{
|
||||
if ( ! preg_match( "/^..?$|^index/i", $file ) )
|
||||
{
|
||||
if( is_dir( $this->ipsclass->vars['upload_dir'] . "/" . $file ) )
|
||||
{
|
||||
if( $sub_dh = @opendir( $this->ipsclass->vars['upload_dir'] . "/" . $file ))
|
||||
{
|
||||
while ( false !== ( $sub_file = @readdir( $sub_dh ) ) )
|
||||
{
|
||||
if ( ! preg_match( "/^..?$|^index/i", $sub_file ) )
|
||||
{
|
||||
$uploads_size += @filesize( $this->ipsclass->vars['upload_dir'] . "/" . $file . "/" . $sub_file );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$uploads_size += @filesize( $this->ipsclass->vars['upload_dir'] . "/" . $file );
|
||||
}
|
||||
}
|
||||
}
|
||||
@closedir( $dh );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// This piece of code from Jesse's (jesse@jess.on.ca) contribution
|
||||
// to the PHP manual @ php.net posted without license
|
||||
//-----------------------------------------
|
||||
|
||||
if ($uploads_size >= 1048576)
|
||||
{
|
||||
$uploads_size = round($uploads_size / 1048576 * 100 ) / 100 . " ìá";
|
||||
}
|
||||
else if ($uploads_size >= 1024)
|
||||
{
|
||||
$uploads_size = round($uploads_size / 1024 * 100 ) / 100 . " êá";
|
||||
}
|
||||
else
|
||||
{
|
||||
$uploads_size = $uploads_size . " áàéò";
|
||||
}
|
||||
|
||||
$this->print_nocache_headers();
|
||||
@header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" );
|
||||
print $uploads_size;
|
||||
exit();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Get new posts
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function get_member_names()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$name = $this->ipsclass->parse_clean_value( rawurldecode( $_REQUEST['name'] ) );
|
||||
|
||||
//--------------------------------------------
|
||||
// Load extra db cache file
|
||||
//--------------------------------------------
|
||||
|
||||
$this->ipsclass->DB->load_cache_file( ROOT_PATH.'sources/sql/'.SQL_DRIVER.'_extra_queries.php', 'sql_extra_queries' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check length
|
||||
//-----------------------------------------
|
||||
|
||||
if ( strlen( $name ) < 3 )
|
||||
{
|
||||
$this->return_null();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Try query...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'member_display_name_lookup', array( 'name' => $name, 'field' => 'members_display_name' ), 'sql_extra_queries' );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
//-----------------------------------------
|
||||
// Got any results?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
$this->return_null();
|
||||
}
|
||||
|
||||
$names = array();
|
||||
$ids = array();
|
||||
|
||||
while( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$names[] = '"'.$r['members_display_name'].'"';
|
||||
$ids[] = intval($r['id']);
|
||||
}
|
||||
|
||||
$this->print_nocache_headers();
|
||||
@header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" );
|
||||
print "returnSearch( '".str_replace( "'", "", $name )."', new Array(".implode( ",", $names )."), new Array(".implode( ",", $ids ).") );";
|
||||
exit();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Get template names
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function get_template_names()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$name = $this->ipsclass->parse_clean_value( urldecode( $_REQUEST['name'] ) );
|
||||
$id = intval( $_REQUEST['id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get $skin_names stuff
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( ROOT_PATH.'sources/lib/skin_info.php' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check length
|
||||
//-----------------------------------------
|
||||
|
||||
if ( strlen( $name ) < 3 )
|
||||
{
|
||||
$this->return_null();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Try query...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => "suid,set_id,group_name,func_name",
|
||||
'from' => 'skin_templates',
|
||||
'where' => "set_id=1 AND LOWER(func_name) LIKE '{$name}%'",
|
||||
'order' => 'LENGTH(func_name) ASC',
|
||||
'limit' => array( 0,20 ) ) );
|
||||
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
$names = array();
|
||||
$ids = array();
|
||||
|
||||
while( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$names[] = '"'.$r['func_name'].' ('.$r['group_name'].')"';
|
||||
$ids[] = intval($r['suid']);
|
||||
}
|
||||
|
||||
$this->print_nocache_headers();
|
||||
@header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" );
|
||||
print "returnSearch( '".str_replace( "'", "", $name )."', new Array(".implode( ",", $names )."), new Array(".implode( ",", $ids ).") );";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// make string XML safe
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function _make_safe_for_xml( $t )
|
||||
{
|
||||
return str_replace( '&#39;', ''', htmlspecialchars( $t ) );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Print no cache headers
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function print_nocache_headers()
|
||||
{
|
||||
header("HTTP/1.0 200 OK");
|
||||
header("HTTP/1.1 200 OK");
|
||||
header("Cache-Control: no-cache, must-revalidate, max-age=0");
|
||||
header("Expires: 0");
|
||||
header("Pragma: no-cache");
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Error handler
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function error_handler()
|
||||
{
|
||||
@header( "Content-type: text/xml;charset={$this->ipsclass->vars['gb_char_set']}" );
|
||||
$this->xml_output = $this->xml_header."\r\n<errors>\r\n";
|
||||
$this->xml_output .= "<error><message>Âû äîëæíû áûòü àâòîðèçîâàíû, ÷òîáû ïîëó÷èòü äîñòóï</message></error>\r\n";
|
||||
$this->xml_output .= "</errors>";
|
||||
print $this->xml_output;
|
||||
exit();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Return NOTHING :o
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function return_null($val=0)
|
||||
{
|
||||
@header( "Content-type: text/xml;charset={$this->ipsclass->vars['gb_char_set']}" );
|
||||
print $this->xml_header."\r\n<null>{$val}</null>"; exit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2008-10-02 15:26:24 -0400 (Thu, 02 Oct 2008) $
|
||||
| > $Revision: 2579 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > XML OUT Functions for XmlHttpRequest functions
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Friday 18th March 2005
|
||||
|
|
||||
| > Module Version Number: 1.1.0
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class ad_xmlout
|
||||
{
|
||||
# Classes
|
||||
var $ipsclass;
|
||||
var $class_ajax;
|
||||
var $search;
|
||||
|
||||
var $xml_output;
|
||||
var $xml_header;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Constructor
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function xmlout()
|
||||
{
|
||||
$this->xml_header = '<?xml version="1.0" encoding="ISO-8859-1"?'.'>';
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Auto run
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
if ( isset($this->ipsclass->input['j_do']) AND $this->ipsclass->input['j_do'] )
|
||||
{
|
||||
$this->ipsclass->input['do'] = $this->ipsclass->input['j_do'];
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load ajax class
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( KERNEL_PATH . 'class_ajax.php' );
|
||||
|
||||
$this->class_ajax = new class_ajax();
|
||||
$this->class_ajax->ipsclass =& $this->ipsclass;
|
||||
$this->class_ajax->class_init();
|
||||
|
||||
//-----------------------------------------
|
||||
// What shall we do?
|
||||
//-----------------------------------------
|
||||
|
||||
switch( $this->ipsclass->input['do'] )
|
||||
{
|
||||
case 'get-template-names':
|
||||
$this->get_template_names();
|
||||
break;
|
||||
case 'get-member-names':
|
||||
$this->get_member_names();
|
||||
break;
|
||||
case 'get-dir-size':
|
||||
$this->get_dir_size();
|
||||
break;
|
||||
case 'post-editorswitch':
|
||||
$this->post_editorswitch();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Switch editors
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function post_editorswitch()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Grab public class and do...
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( ROOT_PATH . 'sources/action_public/xmlout.php' );
|
||||
$lib = new xmlout();
|
||||
$lib->ipsclass =& $this->ipsclass;
|
||||
|
||||
require_once( KERNEL_PATH . 'class_ajax.php' );
|
||||
$class_ajax = new class_ajax();
|
||||
$class_ajax->ipsclass =& $this->ipsclass;
|
||||
$lib->class_ajax =& $class_ajax;
|
||||
|
||||
return $lib->post_editorswitch();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Get uploads size
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function get_dir_size()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Make sure the uploads path is correct
|
||||
//-----------------------------------------
|
||||
|
||||
$uploads_size = 0;
|
||||
|
||||
if ($dh = @opendir( $this->ipsclass->vars['upload_dir'] ))
|
||||
{
|
||||
while ( false !== ( $file = @readdir( $dh ) ) )
|
||||
{
|
||||
if ( ! preg_match( "/^..?$|^index/i", $file ) )
|
||||
{
|
||||
if( is_dir( $this->ipsclass->vars['upload_dir'] . "/" . $file ) )
|
||||
{
|
||||
if( $sub_dh = @opendir( $this->ipsclass->vars['upload_dir'] . "/" . $file ))
|
||||
{
|
||||
while ( false !== ( $sub_file = @readdir( $sub_dh ) ) )
|
||||
{
|
||||
if ( ! preg_match( "/^..?$|^index/i", $sub_file ) )
|
||||
{
|
||||
$uploads_size += @filesize( $this->ipsclass->vars['upload_dir'] . "/" . $file . "/" . $sub_file );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$uploads_size += @filesize( $this->ipsclass->vars['upload_dir'] . "/" . $file );
|
||||
}
|
||||
}
|
||||
}
|
||||
@closedir( $dh );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// This piece of code from Jesse's (jesse@jess.on.ca) contribution
|
||||
// to the PHP manual @ php.net posted without license
|
||||
//-----------------------------------------
|
||||
|
||||
if ($uploads_size >= 1048576)
|
||||
{
|
||||
$uploads_size = round($uploads_size / 1048576 * 100 ) / 100 . " mb";
|
||||
}
|
||||
else if ($uploads_size >= 1024)
|
||||
{
|
||||
$uploads_size = round($uploads_size / 1024 * 100 ) / 100 . " k";
|
||||
}
|
||||
else
|
||||
{
|
||||
$uploads_size = $uploads_size . " bytes";
|
||||
}
|
||||
|
||||
$this->class_ajax->print_nocache_headers();
|
||||
$this->class_ajax->return_string( $uploads_size );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Get new posts
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function get_member_names()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$name = $this->class_ajax->convert_and_make_safe( $this->ipsclass->input['name'], 0 );
|
||||
|
||||
//--------------------------------------------
|
||||
// Load extra db cache file
|
||||
//--------------------------------------------
|
||||
|
||||
$this->ipsclass->DB->load_cache_file( ROOT_PATH.'sources/sql/'.SQL_DRIVER.'_extra_queries.php', 'sql_extra_queries' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check length
|
||||
//-----------------------------------------
|
||||
|
||||
if ( strlen( $name ) < 3 )
|
||||
{
|
||||
$this->class_ajax->return_null();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Try query...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'member_display_name_lookup', array( 'name' => $name, 'field' => 'members_display_name' ), 'sql_extra_queries' );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
//-----------------------------------------
|
||||
// Got any results?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
$this->class_ajax->return_null();
|
||||
}
|
||||
|
||||
$names = array();
|
||||
$ids = array();
|
||||
|
||||
while( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$names[] = '"'.$r['members_display_name'].'"';
|
||||
$ids[] = intval($r['id']);
|
||||
}
|
||||
|
||||
$this->class_ajax->print_nocache_headers();
|
||||
@header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" );
|
||||
print "returnSearch( '".str_replace( "'", "", $name )."', new Array(".implode( ",", $names )."), new Array(".implode( ",", $ids ).") );";
|
||||
exit();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Get template names
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function get_template_names()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$name = $this->class_ajax->convert_and_make_safe( $this->ipsclass->input['name'], 0 );
|
||||
$id = intval( $this->ipsclass->input['id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get $skin_names stuff
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( ROOT_PATH.'sources/lib/skin_info.php' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check length
|
||||
//-----------------------------------------
|
||||
|
||||
if ( strlen( $name ) < 3 )
|
||||
{
|
||||
$this->class_ajax->return_null();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Try query...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => "suid,set_id,group_name,func_name",
|
||||
'from' => 'skin_templates',
|
||||
'where' => "set_id=1 AND LOWER(func_name) LIKE '{$name}%'",
|
||||
'order' => 'LENGTH(func_name) ASC',
|
||||
'limit' => array( 0,20 ) ) );
|
||||
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
$names = array();
|
||||
$ids = array();
|
||||
|
||||
while( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$names[] = '"'.$r['func_name'].' ('.$r['group_name'].')"';
|
||||
$ids[] = intval($r['suid']);
|
||||
}
|
||||
|
||||
$this->class_ajax->print_nocache_headers();
|
||||
@header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" );
|
||||
print "returnSearch( '".str_replace( "'", "", $name )."', new Array(".implode( ",", $names )."), new Array(".implode( ",", $ids ).") );";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user