Version 2.3.6
This commit is contained in:
1 parent
a3bb603c96
commit
19b38c7c74
764 files changed
+143731
-118164
No files matched your search
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user