Version 2.1.7
This commit is contained in:
1 parent
0eecc172d9
commit
f73f8bff6d
941 files changed
+215301
-103093
No files matched your search
@@ -0,0 +1,319 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
|
||||
| > $Revision: 23 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Help Control functions
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 2nd April 2002
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
| > DBA Checked: Tue 25th May 2004
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåâåðíûé âõîä</h1> Ó Âàñ íåò äîñòóïà ê äèðåêòèâå ýòîãî ôàéëà. Åñëè Âû ïðîâîäèëè îáíîâëåíèÿ, óáåäèòåñü, ÷òî íå çàáûëè îáíîâèòü 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class ad_skin_wrappers {
|
||||
|
||||
var $base_url;
|
||||
var $template = "";
|
||||
var $functions = "";
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @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;
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill globals - globals bad, Homer good.
|
||||
//-----------------------------------------
|
||||
|
||||
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
|
||||
|
||||
foreach ( $tmp_in as $k => $v )
|
||||
{
|
||||
unset($$k);
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
case 'floateditor':
|
||||
$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;
|
||||
//case 'add':
|
||||
// $this->add_splash();
|
||||
// break;
|
||||
//case 'doadd':
|
||||
// $this->save_wrapper('add');
|
||||
// break;
|
||||
//case 'remove':
|
||||
// $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 ñóùåñòâóþùåãî îáùåãî øàáëîíà, âåðíèòåñü íàçàä è ïîïðîáóéòå ñíîâà");
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->ipsclass->input['txtwrapper'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Ó âàñ íå ìîæåò áûòü ïóñòîãî øàáëîíà");
|
||||
}
|
||||
|
||||
$tmpl = $this->ipsclass->admin->form_to_text( $this->ipsclass->txt_stripslashes($_POST['txtwrapper']) );
|
||||
|
||||
if ( ! preg_match( "/<% BOARD %>/", $tmpl ) )
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû íå ìîæåòå óäàëèòü <% BOARD %> !");
|
||||
}
|
||||
|
||||
if ( ! preg_match( "/<% COPYRIGHT %>/", $tmpl ) )
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû íå ìîæåòå óäàëèòü <% COPYRIGHT %> !");
|
||||
}
|
||||
|
||||
$this->ipsclass->DB->do_update( 'skin_sets', array( 'set_wrapper' => $tmpl ), 'set_skin_set_id='.$this->ipsclass->input['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" );
|
||||
}
|
||||
else
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Reload edit window
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->main_msg = "Âåðõíèé è íèæíèé êîëîíòèòóëû ôîðóìà îáíîâëåíû";
|
||||
$this->do_form('edit');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// FORM
|
||||
//-----------------------------------------
|
||||
|
||||
function do_form( $type='add' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Check input
|
||||
//-----------------------------------------
|
||||
|
||||
if ($this->ipsclass->input['id'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü ID ñóùåñòâóþùåãî îáùåãî øàáëîíà, âåðíèòåñü íàçàä è ïîïðîáóéòå ñíîâà");
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// check tree...
|
||||
//-----------------------------------------
|
||||
|
||||
$found_id = "";
|
||||
$found_content = "";
|
||||
$this_set = "";
|
||||
|
||||
if ( $this->ipsclass->input['p'] > 0 )
|
||||
{
|
||||
$in = ','.$this->ipsclass->input['p'];
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Query
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'stylesheets_do_form_concat', array( 'id' => $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 )
|
||||
{
|
||||
$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 = 'Ñîçäàòü îáùèé øàáëîí';
|
||||
}
|
||||
else
|
||||
{
|
||||
$code = 'doedit';
|
||||
$button = 'Ñîõðàíèòü îáùèé øàáëîí';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Header
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Âû ìîæåòå èñïîëüçîâàòü HTML âî âðåìÿ äîáàâëåíèÿ èëè èçìåíåíèÿ îáùåãî øàáëîíà.";
|
||||
$this->ipsclass->admin->page_title = "Èçìåíåíèå âåðõíåãî è íèæíåãî êîëîíòèòóëîâ ôîðóìà";
|
||||
|
||||
if ( $found_id == 1 )
|
||||
{
|
||||
$this->ipsclass->admin->page_detail .= "<br /><strong>Ýòî êîïèÿ îñíîâíîãî îáùåãî øàáëîíà, èçìåíåíèÿ â ôîðìå íèæå áóäóò ñêîïèðîâàíû, êàê íîâûé îáùèé øàáëîí ôîðóìà äëÿ âûáðàííîãî øàáëîíà.</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='pformstrip'>
|
||||
<input type='submit' name='submit' value='$button' class='realdarkbutton'>
|
||||
<input type='submit' name='savereload' value='Ñîõðàíèòü è îáíîâèòü îáùèé øàáëîí' 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->output();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user