2006-10-27 00:25:02 +00:00
|
|
|
<?php
|
|
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
// | PhpWebGallery - a PHP based picture gallery |
|
|
|
|
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
|
2007-01-09 11:38:54 +00:00
|
|
|
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
|
2006-10-27 00:25:02 +00:00
|
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
// | branch : BSF (Best So Far)
|
2007-01-09 11:38:54 +00:00
|
|
|
// | file : $Id$
|
2006-10-27 00:25:02 +00:00
|
|
|
// | last update : $Date$
|
|
|
|
// | last modifier : $Author$
|
|
|
|
// | revision : $Revision$
|
|
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
// | This program is free software; you can redistribute it and/or modify |
|
|
|
|
// | it under the terms of the GNU General Public License as published by |
|
|
|
|
// | the Free Software Foundation |
|
|
|
|
// | |
|
|
|
|
// | This program is distributed in the hope that it will be useful, but |
|
|
|
|
// | WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
|
|
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
|
|
|
// | General Public License for more details. |
|
|
|
|
// | |
|
|
|
|
// | You should have received a copy of the GNU General Public License |
|
|
|
|
// | along with this program; if not, write to the Free Software |
|
|
|
|
// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
|
|
|
|
// | USA. |
|
|
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
|
|
|
|
if( !defined("PHPWG_ROOT_PATH") )
|
|
|
|
{
|
|
|
|
die ("Hacking attempt!");
|
|
|
|
}
|
|
|
|
|
|
|
|
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
|
|
|
check_status(ACCESS_ADMINISTRATOR);
|
|
|
|
|
2007-01-18 02:09:31 +00:00
|
|
|
$sections = explode('/', $_GET['section'] );
|
|
|
|
for ($i=0; $i<count($sections); $i++)
|
|
|
|
{
|
|
|
|
if (empty($sections[$i]) or $sections[$i]=='..')
|
|
|
|
{
|
|
|
|
unset($sections[$i]);
|
|
|
|
$i--;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (count($sections)<2)
|
2006-10-27 00:25:02 +00:00
|
|
|
{
|
2007-01-09 11:38:54 +00:00
|
|
|
die('Invalid plugin URL');
|
2006-10-27 00:25:02 +00:00
|
|
|
}
|
2006-12-14 00:58:57 +00:00
|
|
|
|
2007-01-18 02:09:31 +00:00
|
|
|
$plugin_id = $sections[0];
|
2007-01-09 11:38:54 +00:00
|
|
|
$check_db_plugin = get_db_plugins('active', $plugin_id );
|
|
|
|
if (empty($check_db_plugin))
|
2006-10-27 00:25:02 +00:00
|
|
|
{
|
2007-01-09 11:38:54 +00:00
|
|
|
die('Invalid URL - plugin '.$plugin_id.' not active');
|
2006-10-27 00:25:02 +00:00
|
|
|
}
|
|
|
|
|
2007-01-18 02:09:31 +00:00
|
|
|
$filename = PHPWG_PLUGINS_PATH.implode('/', $sections);
|
2007-01-09 11:38:54 +00:00
|
|
|
if (is_file($filename))
|
|
|
|
{
|
|
|
|
include_once($filename);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2007-01-18 02:09:31 +00:00
|
|
|
die('Missing file '.$filename);
|
2007-01-09 11:38:54 +00:00
|
|
|
}
|
|
|
|
?>
|