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,86 +2,91 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Gallery Module
|
||||
| IP.Gallery Component
|
||||
| ========================================
|
||||
| by Joshua Williams
|
||||
| (c) 2001 - 2003 Invision Power Services
|
||||
| by Brandon Farber
|
||||
| (c) 2001 - 2007 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisiongallery.com
|
||||
| Email: josh@invisiongallery.com
|
||||
| Web: http://www.invisiongallery.com
|
||||
| Email: brandon@invisionpower.com
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2007-06-21 14:09:44 -0400 (Thu, 21 Jun 2007) $
|
||||
| > $Revision: 340 $
|
||||
| > $Author: bfarber $
|
||||
|
|
||||
| > Main Admin Module
|
||||
| > Script written by Joshua Williams
|
||||
| $Id: gallery.php,v 1.1.1.1 2005/07/11 20:43:50 kinderstod Exp $
|
||||
| > Main Admin Module Loader
|
||||
| > Script written by Brandon Farber
|
||||
| > Script Started by Joshua Williams
|
||||
| $Id: gallery.php 340 2007-06-21 18:09:44Z bfarber $
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
define( 'GALLERY_PATH' , ROOT_PATH.'modules/gallery/' );
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
exit();
|
||||
die( "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'." );
|
||||
}
|
||||
|
||||
class ad_gallery {
|
||||
define( 'GALLERY_PATH' , ROOT_PATH . 'sources/components_acp/gallery/' );
|
||||
define( 'GALLERY_LIBS' , ROOT_PATH . 'sources/components_public/gallery/lib/' );
|
||||
|
||||
var $base_url;
|
||||
var $ipsclass;
|
||||
var $gallery_lib;
|
||||
class ad_gallery
|
||||
{
|
||||
# Objects
|
||||
var $ipsclass;
|
||||
var $gallery_lib;
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Kill globals - globals bad, Homer good.
|
||||
// Is Gallery installed?
|
||||
//-----------------------------------------
|
||||
|
||||
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
|
||||
|
||||
foreach ( $tmp_in as $k => $v )
|
||||
if ( ! @is_dir( GALLERY_PATH ) OR !$this->ipsclass->DB->table_exists( 'gallery_images' ) )
|
||||
{
|
||||
unset($$k);
|
||||
}
|
||||
|
||||
$this->ipsclass->admin->page_title = "Óïðàâëåíèå Invision Gallery";
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Ýòà ñåêöèÿ ïîçâîëÿåò âàì óïðàâëÿòü ãàëåðååé IP.Gallery .";
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( 'section=components&act=gallery' , 'Óïðàâëåíèå Invision Gallery' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Do some set up
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! @is_dir( ROOT_PATH.'/modules/gallery' ) )
|
||||
{
|
||||
$this->ipsclass->admin->show_inframe("http://www.invisiongallery.com/?why");
|
||||
$this->ipsclass->admin->show_inframe( "http://anonym.to/http://www.invisiongallery.com/?why" );
|
||||
}
|
||||
else
|
||||
{
|
||||
define( 'IPB_CALLED', 1 );
|
||||
$this->ipsclass->DB->load_cache_file( ROOT_PATH . 'sources/sql/'.SQL_DRIVER.'_gallery_queries.php', 'gallery_sql_queries' );
|
||||
$this->ipsclass->DB->load_cache_file( ROOT_PATH . 'sources/sql/'.SQL_DRIVER.'_gallery_admin_queries.php', 'gallery_admin_sql_queries' );
|
||||
|
||||
$this->ipsclass->admin->page_title =& $this->ipsclass->acp_lang['gbl_gallery_title'];
|
||||
$this->ipsclass->admin->page_detail =& $this->ipsclass->acp_lang['gbl_gallery_detail'];
|
||||
$this->ipsclass->admin->nav[] = array( 'section=components&act=gallery', $this->ipsclass->acp_lang['gbl_gallery_nav'] );
|
||||
|
||||
$this->ipsclass->DB->load_cache_file( ROOT_PATH . 'sources/sql/' . SQL_DRIVER . '_gallery_admin_queries.php', 'gallery_admin_sql_queries' );
|
||||
|
||||
$section = ( $this->ipsclass->input['code'] ) ? "ad_{$this->ipsclass->input['code']}" : "ad_overview";
|
||||
//-----------------------------------------
|
||||
// What are we doing?
|
||||
//-----------------------------------------
|
||||
|
||||
$section = $this->ipsclass->input['code'] ? 'ad_' . $this->ipsclass->input['code'] : 'ad_overview';
|
||||
|
||||
if( !in_array( $section, array( 'ad_overview', 'ad_albums', 'ad_cats', 'ad_groups', 'ad_media', 'ad_postform', 'ad_stats', 'ad_tools' ) ) )
|
||||
{
|
||||
$section = 'ad_overview';
|
||||
}
|
||||
|
||||
$this->ipsclass->vars['gallery_images_path'] = str_replace( "\", "\\", $this->ipsclass->vars['gallery_images_path'] );
|
||||
$this->ipsclass->vars['gallery_watermark_path'] = str_replace( "\", "\\", $this->ipsclass->vars['gallery_watermark_path'] );
|
||||
|
||||
require ROOT_PATH.'modules/gallery/lib/gallery_library.php';
|
||||
$this->gallery_lib = new gallery_lib();
|
||||
$this->gallery_lib->ipsclass =& $this->ipsclass;
|
||||
|
||||
require ROOT_PATH.'modules/gallery/admin/'.$section.'.php';
|
||||
//-----------------------------------------
|
||||
// Load generic library
|
||||
//-----------------------------------------
|
||||
|
||||
$PLUGIN = new ad_plugin_gallery_sub();
|
||||
$PLUGIN->ipsclass =& $this->ipsclass;
|
||||
$PLUGIN->glib =& $this->gallery_lib;
|
||||
$PLUGIN->auto_run();
|
||||
require GALLERY_LIBS . 'lib_gallery.php';
|
||||
$this->gallery_lib = new lib_gallery();
|
||||
$this->gallery_lib->ipsclass =& $this->ipsclass;
|
||||
|
||||
//-----------------------------------------
|
||||
// Run the main module
|
||||
//-----------------------------------------
|
||||
|
||||
require GALLERY_PATH . $section . '.php';
|
||||
$PLUGIN = new ad_plugin_gallery_sub();
|
||||
$PLUGIN->ipsclass =& $this->ipsclass;
|
||||
$PLUGIN->glib =& $this->gallery_lib;
|
||||
$PLUGIN->auto_run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user