Version 2.2.0 RC-1

This commit is contained in:
Neo committed 2025-12-19 00:22:37 -08:00
1 parent f73f8bff6d
commit 22f1b963ee
1034 files changed
+178610 -70897

No files matched your search

+401 -89
View File
@@ -2,27 +2,18 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 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-12-06 17:36:43 +0000 (Tue, 06 Dec 2005) $
| > $Revision: 94 $
| > $Author: bfarber $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Import functions
@@ -35,7 +26,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();
}
@@ -60,16 +51,7 @@ class ad_skin_import {
function auto_run()
{
//-----------------------------------------
// Kill globals - globals bad, Homer good.
//-----------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Skin Import/Export' );
//-----------------------------------------
@@ -95,6 +77,16 @@ class ad_skin_import {
$this->import_xml_images();
break;
case 'importmacros':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':import' );
$this->import_xml_macros();
break;
case 'exportmacros':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' );
$this->export_xml_macros();
break;
//-----------------------------------------
default:
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
@@ -118,13 +110,13 @@ class ad_skin_import {
if ( ! $this->ipsclass->input['skin_location'] )
{
$this->ipsclass->main_msg = "Íå âûáðàí ôàéë äëÿ çàãðóçêè.";
$this->ipsclass->main_msg = "No upload file was found and no filename was specified.";
$this->show_export_page();
}
if ( ! file_exists( ROOT_PATH . $this->ipsclass->input['skin_location'] ) )
{
$this->ipsclass->main_msg = "Íå íàéäåí ôàéë: " . ROOT_PATH . $this->ipsclass->input['skin_location'];
$this->ipsclass->main_msg = "Could not find the file to open at: " . ROOT_PATH . $this->ipsclass->input['skin_location'];
$this->show_export_page();
}
@@ -167,11 +159,11 @@ class ad_skin_import {
// Get xml mah-do-dah
//-----------------------------------------
require( KERNEL_PATH.'class_xml.php' );
require_once( KERNEL_PATH.'class_xml.php' );
$xml = new class_xml();
require( KERNEL_PATH.'class_xmlarchive.php' );
require_once( KERNEL_PATH.'class_xmlarchive.php' );
$xmlarchive = new class_xmlarchive( KERNEL_PATH );
@@ -201,7 +193,7 @@ class ad_skin_import {
if ( ! count($images) )
{
$this->ipsclass->main_msg = "Â ýòîì XML-àðõèâå íåò èçîáðàæåíèé äëÿ èìïîðòèðîâàíèÿ.";
$this->ipsclass->main_msg = "There were no images to import from that XMLarchive.";
$this->show_export_page();
}
@@ -212,7 +204,7 @@ class ad_skin_import {
if ( ! is_writable( CACHE_PATH.'style_images' ) )
{
$this->ipsclass->main_msg = "Íåâîçìîæíî ñîçäàòü íîâóþ ïàïêó â 'style_images', ïðîâåðüòå ïðàâèëüíî ëè óñòàíîâëåíû ïðàâà äîñòóïà (CHMOD) ó 'style_images', ïðàâà äîñòóïà äîëæíû áûòü 0777.";
$this->ipsclass->main_msg = 'We cannot create a new folder in the "style_images" folder - please check the CHMOD value of that folder and change to 0777 is required.';
$this->show_export_page();
}
@@ -232,7 +224,7 @@ class ad_skin_import {
if ( ! @mkdir( CACHE_PATH.'style_images/'.$safename, 0777 ) )
{
$this->ipsclass->main_msg = "Íåâîçìîæíî ñîçäàòü íîâóþ ïàïêó â 'style_images'..";
$this->ipsclass->main_msg = "We are unable to create a directory in the 'style_images' folder.";
$this->show_export_page();
}
else
@@ -271,11 +263,24 @@ class ad_skin_import {
}
}
//-----------------------------------------
// Apply to a skin?
//-----------------------------------------
if( $this->ipsclass->input['skin_set'] )
{
$skin_id = intval($this->ipsclass->input['skin_set']);
$this->ipsclass->DB->do_update( 'skin_sets', array( 'set_image_dir' => $safename ), 'set_skin_set_id='.$skin_id );
$this->ipsclass->cache_func->_rebuild_skin_id_cache( array() );
}
//-----------------------------------------
// all done?
//-----------------------------------------
$this->ipsclass->main_msg = "Èçîáðàæåíèÿ èìïîðòèðîâàíû!";
$this->ipsclass->main_msg = "Image set imported!";
$this->show_export_page();
}
@@ -299,13 +304,13 @@ class ad_skin_import {
if ( ! $this->ipsclass->input['skin_location'] )
{
$this->ipsclass->main_msg = "Íå âûáðàí ôàéë äëÿ çàãðóçêè.";
$this->ipsclass->main_msg = "No upload file was found and no filename was specified.";
$this->show_export_page();
}
if ( ! file_exists( ROOT_PATH . $this->ipsclass->input['skin_location'] ) )
{
$this->ipsclass->main_msg = "Íå íàéäåí ôàéë: " . ROOT_PATH . $this->ipsclass->input['skin_location'];
$this->ipsclass->main_msg = "Could not find the file to open at: " . ROOT_PATH . $this->ipsclass->input['skin_location'];
$this->show_export_page();
}
@@ -345,15 +350,23 @@ class ad_skin_import {
$content = $this->ipsclass->admin->import_xml( $tmp_name );
}
if( !$content )
{
$this->ipsclass->admin->error( "There was no content in the file to process" );
}
//-----------------------------------------
// Get xml mah-do-dah
//-----------------------------------------
require( KERNEL_PATH.'class_xml.php' );
require_once( KERNEL_PATH.'class_xml.php' );
$xml = new class_xml();
require( KERNEL_PATH.'class_xmlarchive.php' );
$xml->doc_type = $this->ipsclass->vars['gb_char_set'];
$xml->use_doctype = 1;
require_once( KERNEL_PATH.'class_xmlarchive.php' );
$xmlarchive = new class_xmlarchive( KERNEL_PATH );
@@ -423,10 +436,25 @@ class ad_skin_import {
$wrapper_xml = $this->_extract_xml_wrapper( $import_xml[ 'ipb_wrapper.xml' ], $xml, $xmlarchive );
}
//-----------------------------------------
// Which image directory to use?
//-----------------------------------------
if( $this->ipsclass->input['image_set'] )
{
$img_dir = $this->ipsclass->input['image_set'];
}
else
{
$img_dir = $default['set_image_dir'];
}
//-----------------------------------------
// Add new skin!
//-----------------------------------------
$this->ipsclass->DB->allow_sub_select = 1;
$this->ipsclass->DB->do_insert( 'skin_sets', array( 'set_name' => $this->ipsclass->input['skin_name'] ? $this->ipsclass->input['skin_name'] : $info_xml['set_name'].' (Import)',
'set_hidden' => 0,
'set_default' => 0,
@@ -439,7 +467,7 @@ class ad_skin_import {
'set_wrapper' => $wrapper_xml,
'set_css_updated' => time(),
'set_emoticon_folder' => $default['set_emoticon_folder'],
'set_image_dir' => $default['set_image_dir']
'set_image_dir' => $img_dir
) );
$new_skin_id = $this->ipsclass->DB->get_insert_id();
@@ -452,6 +480,8 @@ class ad_skin_import {
{
foreach( $templates_xml as $t )
{
$this->ipsclass->DB->allow_sub_select = 1;
$this->ipsclass->DB->do_insert( 'skin_templates', array( 'set_id' => $new_skin_id,
'group_name' => $t['group_name'],
'section_content' => $t['section_content'],
@@ -476,6 +506,8 @@ class ad_skin_import {
continue;
}
$this->ipsclass->DB->allow_sub_select = 1;
$this->ipsclass->DB->do_insert( 'skin_macro', array( 'macro_set' => $new_skin_id,
'macro_value' => $t['macro_value'],
'macro_replace' => $t['macro_replace'],
@@ -494,7 +526,7 @@ class ad_skin_import {
// DONE!
//-----------------------------------------
$this->ipsclass->main_msg = 'Øàáëîí èìïîðòèðîâàí! (id: '.$new_skin_id.')';
$this->ipsclass->main_msg = 'Skin Set Imported! (id: '.$new_skin_id.')';
$this->ipsclass->main_msg .= "<br />".implode( "<br />", $this->ipsclass->cache_func->messages );
@@ -502,6 +534,221 @@ class ad_skin_import {
}
//-----------------------------------------
// PERFORM IMPORT TEMPLATES
//-----------------------------------------
function import_xml_macros()
{
$skin_id = intval($this->ipsclass->input['skin_set']);
$skin = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$skin_id ) );
$current = $skin['set_skin_set_id'];
$parent = $skin['set_skin_set_parent'] > 0 ? $skin['set_skin_set_parent'] : 1;
//-----------------------------------------
// Get default skin
//-----------------------------------------
$default = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_default=1' ) );
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['skin_location'] )
{
$this->ipsclass->main_msg = "No upload file was found and no filename was specified.";
$this->show_export_page();
return;
}
if ( ! file_exists( ROOT_PATH . $this->ipsclass->input['skin_location'] ) )
{
$this->ipsclass->main_msg = "Could not find the file to open at: " . ROOT_PATH . $this->ipsclass->input['skin_location'];
$this->show_export_page();
return;
}
if ( preg_match( "#\.gz$#", $this->ipsclass->input['skin_location'] ) )
{
if ( $FH = @gzopen( ROOT_PATH.$this->ipsclass->input['skin_location'], 'rb' ) )
{
while ( ! @gzeof( $FH ) )
{
$content .= @gzread( $FH, 1024 );
}
@gzclose( $FH );
}
}
else
{
if ( $FH = @fopen( ROOT_PATH.$this->ipsclass->input['skin_location'], 'rb' ) )
{
$content = @fread( $FH, filesize(ROOT_PATH.$this->ipsclass->input['skin_location']) );
@fclose( $FH );
}
}
$tmp_name = str_replace( ".gz", '', $this->ipsclass->input['skin_location'] );
}
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->main_msg = "Could not open the xml file";
$this->show_export_page();
return;
}
//-----------------------------------------
// Get xml mah-do-dah
//-----------------------------------------
require_once( KERNEL_PATH.'class_xml.php' );
$xml = new class_xml();
$xml->doc_type = $this->ipsclass->vars['gb_char_set'];
$xml->use_doctype = 1;
//-----------------------------------------
// Get the XML documents
//-----------------------------------------
$xml->xml_parse_document( $content );
//-----------------------------------------
// Import Macros
//-----------------------------------------
if ( ! is_array( $xml->xml_array['macroexport']['macrogroup'] ) and ! count( $xml->xml_array['macroexport']['macrogroup'] ) )
{
$this->ipsclass->main_msg = "The XML import doesn't appear to be valid - please check the file and try again.";
$this->show_export_page();
return;
}
$this->ipsclass->DB->do_delete( 'skin_macro', "macro_set={$skin_id}" );
foreach( $xml->xml_array['macroexport']['macrogroup']['macro'] as $id => $entry )
{
$newrow = array();
$newrow['macro_value'] = $entry[ 'macro_value' ]['VALUE'];
$newrow['macro_replace'] = $entry[ 'macro_replace' ]['VALUE'];
$newrow['macro_set'] = $skin_id;
$this->ipsclass->DB->do_insert( 'skin_macro', $newrow );
}
//-----------------------------------------
// Rebuild caches
//-----------------------------------------
$this->ipsclass->cache_func->_rebuild_all_caches( array($skin_id) );
//-----------------------------------------
// DONE!
//-----------------------------------------
$this->ipsclass->main_msg = 'Macros Imported! (id: '.$skin_id.')';
$this->ipsclass->main_msg .= "<br />".implode( "<br />", $this->ipsclass->cache_func->messages );
$this->show_export_page();
}
//-----------------------------------------
// PERFORM EXPORT MACROS
//-----------------------------------------
function export_xml_macros()
{
$skin_id = intval($this->ipsclass->input['skin_id']);
$skin = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$skin_id ) );
$current = $skin['set_skin_set_id'];
$parent = $skin['set_skin_set_parent'] > 0 ? $skin['set_skin_set_parent'] : 1;
//-----------------------------------------
// Get xml mah-do-dah
//-----------------------------------------
require_once( KERNEL_PATH.'class_xml.php' );
$xml = new class_xml();
//-----------------------------------------
// Get data
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_macro', 'where' => 'macro_set='.$parent ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$macros[ strtolower( $r['macro_value'] ) ] = $r;
}
//-----------------------------------------
// Get this set macro
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_macro', 'where' => 'macro_set='.$skin['set_skin_set_id'] ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$macros[ strtolower( $r['macro_value'] ) ] = $r;
}
//-----------------------------------------
// Format macros into XML
//-----------------------------------------
if ( count( $macros ) )
{
$xml->xml_set_root( 'macroexport', array( 'exported' => time() ) );
$xml->xml_add_group( 'macrogroup' );
foreach( $macros as $data )
{
$content = array();
$content[] = $xml->xml_build_simple_tag( 'macro_value' , $data['macro_value'] );
$content[] = $xml->xml_build_simple_tag( 'macro_replace', $data['macro_replace'] );
$entry[] = $xml->xml_build_entry( 'macro', $content );
}
$xml->xml_add_entry_to_group( 'macrogroup', $entry );
$xml->xml_format_document();
}
//-----------------------------------------
// Send to browser.
//-----------------------------------------
$this->ipsclass->admin->show_download( $xml->xml_document, 'ipb_macro.xml', '', 0 );
}
//-----------------------------------------
// PERFORM EXPORT IMAGES THING YES!
//-----------------------------------------
@@ -512,7 +759,7 @@ class ad_skin_import {
if ( ! @file_exists( CACHE_PATH.'style_images/'.$skin_dir ) )
{
$this->ipsclass->main_msg = "Íåâîçìîæíî íàéòè âûáðàííóþ ïàïêó, ïðîâåðüòå íàñòðîéêè è ïîïðîáóéòå åùå ðàç";
$this->ipsclass->main_msg = "We cannot locate the selected image directory - please try another";
$this->show_export_page();
}
@@ -520,11 +767,11 @@ class ad_skin_import {
// Get xml mah-do-dah
//-----------------------------------------
require( KERNEL_PATH.'class_xml.php' );
require_once( KERNEL_PATH.'class_xml.php' );
$xml = new class_xml();
require( KERNEL_PATH.'class_xmlarchive.php' );
require_once( KERNEL_PATH.'class_xmlarchive.php' );
$xmlarchive = new class_xmlarchive( KERNEL_PATH );
@@ -560,11 +807,11 @@ class ad_skin_import {
// Get xml mah-do-dah
//-----------------------------------------
require( KERNEL_PATH.'class_xml.php' );
require_once( KERNEL_PATH.'class_xml.php' );
$xml = new class_xml();
require( KERNEL_PATH.'class_xmlarchive.php' );
require_once( KERNEL_PATH.'class_xmlarchive.php' );
$xmlarchive = new class_xmlarchive( KERNEL_PATH );
@@ -632,7 +879,7 @@ class ad_skin_import {
if ( is_array( $xml->xml_array['macroexport']['macrogroup']['macro'] ) and count( $xml->xml_array['macroexport']['macrogroup']['macro'] ) )
{
foreach( $xml->xml_array['macroexport']['macrogroup']['macro'] as $idx => $entry )
foreach( $xml->xml_array['macroexport']['macrogroup']['macro'] as $entry )
{
$return[] = array( 'macro_value' => $entry['macro_value']['VALUE'],
'macro_replace' => $entry['macro_replace']['VALUE'],
@@ -672,7 +919,7 @@ class ad_skin_import {
if ( is_array( $xml->xml_array['wrapperexport']['wrappergroup']['wrapper'] ) )
{
foreach( $xml->xml_array['wrapperexport']['wrappergroup']['wrapper'] as $idx => $entry )
foreach( $xml->xml_array['wrapperexport']['wrappergroup']['wrapper'] as $entry )
{
$return = $entry['wrappercontent']['VALUE'];
}
@@ -710,7 +957,7 @@ class ad_skin_import {
if ( is_array( $xml->xml_array['cssexport']['cssgroup']['css'] ) )
{
foreach( $xml->xml_array['cssexport']['cssgroup']['css'] as $idx => $entry )
foreach( $xml->xml_array['cssexport']['cssgroup']['css'] as $entry )
{
$return = $entry['csscontent']['VALUE'];
}
@@ -748,7 +995,7 @@ class ad_skin_import {
if ( is_array( $xml->xml_array['templateexport']['templategroup']['template'] ) )
{
foreach( $xml->xml_array['templateexport']['templategroup']['template'] as $idx => $entry )
foreach( $xml->xml_array['templateexport']['templategroup']['template'] as $entry )
{
if ( ! $entry[ 'func_name' ]['VALUE'] )
{
@@ -796,7 +1043,7 @@ class ad_skin_import {
if ( is_array( $xml->xml_array['infoexport']['infogroup']['info'] ) )
{
foreach( $xml->xml_array['infoexport']['infogroup']['info'] as $idx => $entry )
foreach( $xml->xml_array['infoexport']['infogroup']['info'] as $entry )
{
$return[ 'set_name' ] = $entry['set_name']['VALUE'];
$return[ 'set_author_email' ] = $entry['set_author_email']['VALUE'];
@@ -925,7 +1172,7 @@ class ad_skin_import {
$xml->xml_set_root( 'macroexport', array( 'exported' => time() ) );
$xml->xml_add_group( 'macrogroup' );
foreach( $macros as $key => $data )
foreach( $macros as $data )
{
$content = array();
@@ -999,7 +1246,7 @@ class ad_skin_import {
if ( $this->ipsclass->input['skin_options'] == 'noparent' )
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'group_name, section_content, func_name, func_data', 'from' => 'skin_templates', 'where' => 'set_id='.$this->ipsclass->input['skin_id'] ) );
$this->ipsclass->DB->simple_construct( array( 'select' => 'group_name, section_content, func_name, func_data', 'from' => 'skin_templates', 'where' => 'set_id='.intval($this->ipsclass->input['skin_id']) ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
@@ -1035,7 +1282,7 @@ class ad_skin_import {
}
}
$this->ipsclass->DB->simple_construct( array( 'select' => 'group_name, section_content, func_name, func_data', 'from' => 'skin_templates', 'where' => 'set_id='.$this->ipsclass->input['skin_id'] ) );
$this->ipsclass->DB->simple_construct( array( 'select' => 'group_name, section_content, func_name, func_data', 'from' => 'skin_templates', 'where' => 'set_id='.intval($this->ipsclass->input['skin_id']) ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
@@ -1045,7 +1292,7 @@ class ad_skin_import {
if ( count( $all_templates ) )
{
foreach( $all_templates as $name => $r )
foreach( $all_templates as $r )
{
$content = array();
@@ -1078,8 +1325,8 @@ class ad_skin_import {
$form_array = array();
$set_to_image = array();
$this->ipsclass->admin->page_detail = " ýòîé ñåêöèè âû ìîæåòå èìïîðòèðîâàòü è ýêñïîðòèðîâàòü øàáëîíû. XML-àðõèâû øàáëîíîâ (HTML ôðàãìåíòû, CSS ñòèëè, ìàêðîñû è îáîëî÷êè) íåçàâèñèìû îò íàáîðà èçîáðæåíèé.<br />Äëÿ ýêñïîðòà 'ïîëíîé âåðñèè' øàáëîíà âû äîëæíû ýêñïîðòèðîâàòü îáà XML-àðõèâà: øàáëîíà è èçîáðàæåíèé.<br />Èìïîðò 'ïîëíîãî' øàáëîíà òàê æå ñîñòîèò èç äâóõ äåéñòâèé, ñíà÷àëà âàì íåîáõîäèìî çàãðóçèòü XML-àðõèâ ñàìîãî øàáëîíà, çàòåì àðõèâ ñ åãî èçîáðàæåíèÿìè.";
$this->ipsclass->admin->page_title = "Èìïîðò/Ýêñïîðò øàáëîíîâ";
$this->ipsclass->admin->page_detail = "You can download skin sets by configuring the form below. The skin XML templates (HTML, Macros, CSS & Wrapper) are independent of the image set.<br />To download a 'full' skin set, you will need to download both the skin XML and the image set.";
$this->ipsclass->admin->page_title = "Export Skin Sets";
//-----------------------------------------
// Get skin list...
@@ -1124,9 +1371,9 @@ class ad_skin_import {
{
if (($file != ".") && ($file != ".."))
{
if ( is_dir('./style_images/'.$file) )
if ( is_dir( CACHE_PATH.'style_images/'.$file ) )
{
$dirs[] = array( $file, 'Èçîáðàæåíèÿ: "'.$file.'" (èñïîëüçóåòñÿ øàáëîíîì: '.$set_to_image[ $file ].')' );
$dirs[] = array( $file, 'Image Set: "'.$file.'" (used in skin: '.$set_to_image[ $file ].')' );
}
}
}
@@ -1158,104 +1405,169 @@ class ad_skin_import {
3 => array( 'MAX_FILE_SIZE', '10000000000' ),
4 => array( 'section', $this->ipsclass->section_code ),
) , "uploadform", " enctype='multipart/form-data'" );
$start_form_e = $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'import' ),
2 => array( 'code', 'exportmacros' ),
4 => array( 'section', $this->ipsclass->section_code ),
) );
$start_form_f = $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'import' ),
2 => array( 'code', 'importmacros' ),
3 => array( 'MAX_FILE_SIZE', '10000000000' ),
4 => array( 'section', $this->ipsclass->section_code ),
) , "uploadform", " enctype='multipart/form-data'" );
$import_dirs[] = array( '', '-None-' );
$import_dirs = array_merge( $import_dirs, $dirs );
$import_skins = "<option value='0'>-None-</option>".$skin_list;
$this->ipsclass->html .= "<div class='tableborder'>
<div class='maintitle'>Ýêñïîðò...</div>
<div class='tablepad'>
<div class='tableheaderalt'>Exporting...</div>
<div class='tablepad' style='background-color:#EAEDF0'>
<br />
<fieldset>
<legend><strong>Ýêñïîðò øàáëîíîâ</strong>
<legend><strong>Export Skin Templates</strong>
$start_form_a
<div style='border:1px solid #D1DCEB'>
<table cellpadding='4' cellspacing='0' width='100%'>
<tr>
<td class='tdrow1' width='40%'><b>Êàêîé øàáëîí ýêñïîðòèðîâàòü?</b><div class='graytext'>Ïîæàëóéñòà, âûáåðèòå êàêîé øàáëîí (HTML ôðàìåíòû, CSS ñòèëè, ìàêðîñû è îáîëî÷êó) âû õîòèòå ýêñïîðòèðîâàòü.</div></td>
<td class='tdrow2' width='60%'><select name='skin_id' class='dropdown'>{$skin_list}</select></td>
<td class='tablerow1' width='40%'><b>Export Which Skin Template Set?</b><div class='graytext'>Please select which skin set (HTML templates, CSS, Macros & wrapper) you wish to export.</div></td>
<td class='tablerow2' width='60%'><select name='skin_id' class='dropdown'>{$skin_list}</select></td>
</tr>
<tr>
<td class='tdrow1' width='40%'><b>Íàñòðîéêè ýêñïîðòà</b><div class='graytext'Âûáåðèòå ãëóáèíó ýêñïîðòà.</div></td>
<td class='tdrow2' width='60%'>".$this->ipsclass->adskin->form_dropdown("skin_options",
array( 0 => array( 'noparent' , 'Ýêñïîðò òîëüêî â ýòîò ñòèëü' ),
1 => array( 'yesparent' , 'Ýêñïîðòèðîâàòü òîëüêî ñäåëàííûå èçìåíåíèÿ' )
<td class='tablerow1' width='40%'><b>Export Options</b><div class='graytext'>Please choose how deep this export should look for customizations.</div></td>
<td class='tablerow2' width='60%'>".$this->ipsclass->adskin->form_dropdown("skin_options",
array( 0 => array( 'noparent' , 'Export customizations in this skin only' ),
1 => array( 'yesparent' , 'Export customizations in this skin and any parent skins' )
)
) ."</td>
</tr>
</table>
<div align='center' class='pformstrip'><input type='submit' class='realbutton' value='Ýêñïîðòèðîâàòü' /></div>
<div align='center' class='tablesubheader'><input type='submit' class='realbutton' value='EXPORT SKIN XML' /></div>
</div>
</form>
</fieldset>
<br />
<fieldset>
<legend><strong>Ýêñïîðò èçîáðàæåíèé</strong>
<legend><strong>Export Skin Images</strong>
$start_form_b
<div style='border:1px solid #D1DCEB'>
<table cellpadding='4' cellspacing='0' width='100%'>
<tr>
<td class='tdrow1' width='40%'><b>Êàêèå èçîáðàæåíèÿ ýêñïîðòèðîâàòü?</b><div class='graytext'>Ýòè èçîáðàæåíèÿ áóäóò ýêñïîðòèðîâàíû êàê XML-àðõèâ.<br />Âû íå ñìîæåòå ïðîñìîòðåòü èçîáðàæåíèÿ â ýòîì àðõèâå. Äëÿ ïðîñìîòðà èçîáðàæåíèé ìû ðåêîìåíäóåì ñêà÷àòü èçîáðàæåíèÿ èñïîëüçóÿ âàøó FTP-ïðîãðàììó.</div></td>
<td class='tdrow2' width='60%'>". $this->ipsclass->adskin->form_dropdown( 'skin_dirs', $dirs )."</td>
<td class='tablerow1' width='40%'><b>Export Which Image Set?</b><div class='graytext'>Image sets are exported into the XMLarchive format. This is not suitable for safemode users and in such a case we recommend you manually download via FTP and ZIP the images.</div></td>
<td class='tablerow2' width='60%'>". $this->ipsclass->adskin->form_dropdown( 'skin_dirs', $dirs )."</td>
</tr>
</table>
<div align='center' class='pformstrip'><input type='submit' class='realbutton' value='Ýêñïîðòèðîâàòü XML-àðõèâ ñ èçîáðàæåíèÿìè' /></div>
<div align='center' class='tablesubheader'><input type='submit' class='realbutton' value='EXPORT SKIN IMAGES' /></div>
</div>
</form>
</fieldset>
<br />
<fieldset>
<legend><strong>Export Skin Macros</strong>
$start_form_e
<div style='border:1px solid #D1DCEB'>
<table cellpadding='4' cellspacing='0' width='100%'>
<tr>
<td class='tablerow1' width='40%'><b>Export Macros From Which Skin Set?</b><div class='graytext'>Macro sets are exported into XML format. This option may not work properly if your server has safemode enabled.</div></td>
<td class='tablerow2' width='60%'><select name='skin_id' class='dropdown'>{$skin_list}</select></td>
</tr>
</table>
<div align='center' class='tablesubheader'><input type='submit' class='realbutton' value='EXPORT SKIN MACROS' /></div>
</div>
</form>
</fieldset>
</div>
</div>
<br />
<div class='tableborder'>
<div class='maintitle'>Èìïîðò...</div>
<div class='tablepad'>
<div class='tableheaderalt'>Importing...</div>
<div class='tablepad' style='background-color:#EAEDF0'>
<br />
<fieldset>
<legend><strong>Èìïîðò øàáëîíîâ ñòèëÿ</strong>
<legend><strong>Import Skin Templates</strong>
$start_form_c
<div style='border:1px solid #D1DCEB'>
<table cellpadding='4' cellspacing='0' width='100%'>
<tr>
<td class='tdrow1' width='40%'><b>Çàãðóçêà XML-àðõèâà ñ øàáëîíàìè</b><div style='color:gray'>Ýòîò ôàéë äîëæåí íà÷èíàòüñÿ ñ 'ipb_skin-' è çàêàí÷èâàòüñÿ '.xml' èëè '.xml.gz'</div></td>
<td class='tdrow2' width='60%'>". $this->ipsclass->adskin->form_upload( ) ."</td>
<td class='tablerow1' width='40%'><b>Upload XML Template set</b><div style='color:gray'>The file must begin with 'ipb_skin-' and end with either '.xml' or '.xml.gz'</div></td>
<td class='tablerow2' width='60%'>". $this->ipsclass->adskin->form_upload( ) ."</td>
</tr>
<tr>
<td class='tdrow1' width='40%'><b><u>ÈËÈ</u> ââåäèòå íàçâàíèå ôàéëà-àðõèâà</b><div style='color:gray'>Ýòîò ôàéë äîëæåí áûòü çàãðóæåí â êîðíåâóþ ïàïêó âàøåãî ôîðóìà.</div></td>
<td class='tdrow2' width='60%'>".$this->ipsclass->adskin->form_input( 'skin_location' )."</td>
<td class='tablerow1' width='40%'><b><u>OR</u> enter the filename of the XML Template Set</b><div style='color:gray'>The file must be uploaded into the forum's root folder</div></td>
<td class='tablerow2' width='60%'>".$this->ipsclass->adskin->form_input( 'skin_location' )."</td>
</tr>
<tr>
<td class='tdrow1' width='40%'><b>Íàçâàíèå øàáëîíîâ:</b><div style='color:gray'>Îñòàâüòå ïîëå ïóñòûì, åñëè õîòèòå, ÷òîáû èñïîëüçîâàòü íàçâàíèå øàáëîíîâ èç XML-àðõèâà</div></td>
<td class='tdrow2' width='60%'>".$this->ipsclass->adskin->form_input( 'skin_name' )."</td>
<td class='tablerow1' width='40%'><b>New Skin Set Name?</b><div style='color:gray'>Leave blank to use the skin name from the XMLarchive</div></td>
<td class='tablerow2' width='60%'>".$this->ipsclass->adskin->form_input( 'skin_name' )."</td>
</tr>
<tr>
<td class='tablerow1' width='40%'><b>Use with which image set?</b><div style='color:gray'>If you have not yet uploaded the image set, leave on -None-</div></td>
<td class='tablerow2' width='60%'>". $this->ipsclass->adskin->form_dropdown( 'image_set', $import_dirs )."</td>
</tr>
</table>
<div align='center' class='pformstrip'><input type='submit' class='realbutton' value='Èìïîðòèðîâàòü XML-àðõèâ ñ øàáëîíàìè' /></div>
<div align='center' class='tablesubheader'><input type='submit' class='realbutton' value='IMPORT SKIN XML' /></div>
</div>
</form>
</fieldset>
<br />
<fieldset>
<legend><strong>Èìïîðò èçîáðàæåíèé</strong>
<legend><strong>Import Skin Images</strong>
$start_form_d
<div style='border:1px solid #D1DCEB'>
<table cellpadding='4' cellspacing='0' width='100%'>
<tr>
<td class='tdrow1' width='40%'><b>Çàãðóçêà XML-àðõèâà ñ èçîáðàæåíèÿìè</b><div style='color:gray'>Ýòîò ôàéë äîëæåí íà÷èíàòüñÿ ñ 'ipb_images-' è çàêàí÷èâàòüñÿ '.xml' èëè '.xml.gz'</div></td>
<td class='tdrow2' width='60%'>". $this->ipsclass->adskin->form_upload( ) ."</td>
<td class='tablerow1' width='40%'><b>Upload XMLarchive Image set</b><div style='color:gray'>The file must begin with 'ipb_images-' and end with either '.xml' or '.xml.gz'</div></td>
<td class='tablerow2' width='60%'>". $this->ipsclass->adskin->form_upload( ) ."</td>
</tr>
<tr>
<td class='tdrow1' width='40%'><b><u>ÈËÈ</u> ââåäèòå íàçâàíèå ôàéëà-àðõèâà</b><div style='color:gray'>Ýòîò ôàéë äîëæåí áûòü çàãðóæåí â êîðíåâóþ ïàïêó âàøåãî ôîðóìà</div></td>
<td class='tdrow2' width='60%'>".$this->ipsclass->adskin->form_input( 'skin_location' )."</td>
<td class='tablerow1' width='40%'><b><u>OR</u> enter the filename of the XMLarchive Image Set</b><div style='color:gray'>The file must be uploaded into the forum's root folder</div></td>
<td class='tablerow2' width='60%'>".$this->ipsclass->adskin->form_input( 'skin_location' )."</td>
</tr>
<tr>
<td class='tdrow1' width='40%'><b>Íàçâàíèå ïàïêè èçîáðàæåíèé:</b><div style='color:gray'>Îñòàâüòå ïîëå ïóñòûì, åñëè õîòèòå, ÷òîáû èñïîëüçîâàòü íàçâàíèå ïàïêè èçîáðàæåíèé èç XML-àðõèâà.</div></td>
<td class='tdrow2' width='60%'>".$this->ipsclass->adskin->form_input( 'skin_name' )."</td>
<td class='tablerow1' width='40%'><b>New Image Set Directory Name?</b><div style='color:gray'>Leave blank to use the set name from the XMLarchive</div></td>
<td class='tablerow2' width='60%'>".$this->ipsclass->adskin->form_input( 'skin_name' )."</td>
</tr>
<tr>
<td class='tablerow1' width='40%'><b>Use with which skin set?</b><div class='graytext'>If you do not want to apply this image set to any skin, leave on -None-.</div></td>
<td class='tablerow2' width='60%'><select name='skin_set' class='dropdown'>{$import_skins}</select></td>
</tr>
</table>
<div align='center' class='pformstrip'><input type='submit' class='realbutton' value='Èìïîðòèðîâàòü XML-àðõèâ ñ èçîáðàæåíèÿìè' /></div>
<div align='center' class='tablesubheader'><input type='submit' class='realbutton' value='IMPORT SKIN IMAGES' /></div>
</div>
</form>
</fieldset>
<br />
<fieldset>
<legend><strong>Import Skin Macros</strong>
$start_form_f
<div style='border:1px solid #D1DCEB'>
<table cellpadding='4' cellspacing='0' width='100%'>
<tr>
<td class='tablerow1' width='40%'><b>Upload XML Macro set</b><div style='color:gray'>The file must begin with 'ipb_macros-' and end with '.xml'</div></td>
<td class='tablerow2' width='60%'>". $this->ipsclass->adskin->form_upload( ) ."</td>
</tr>
<tr>
<td class='tablerow1' width='40%'><b><u>OR</u> enter the filename of the XML Macro Set</b><div style='color:gray'>The file must be uploaded into the forum's root folder</div></td>
<td class='tablerow2' width='60%'>".$this->ipsclass->adskin->form_input( 'skin_location' )."</td>
</tr>
<tr>
<td class='tablerow1' width='40%'><b>Use with which skin set?</b></td>
<td class='tablerow2' width='60%'><select name='skin_set' class='dropdown'>{$skin_list}</select></td>
</tr>
</table>
<div align='center' class='tablesubheader'><input type='submit' class='realbutton' value='IMPORT SKIN MACROS' /></div>
</div>
</form>
</fieldset>
</div>
</div>";