2006-06-12 22:16:27 +00:00
|
|
|
<?php
|
2007-10-05 14:30:11 +00:00
|
|
|
/**
|
2006-06-12 22:16:27 +00:00
|
|
|
*
|
|
|
|
* @package phpBB3
|
|
|
|
* @version $Id$
|
2007-10-05 14:30:11 +00:00
|
|
|
* @copyright (c) 2005 phpBB Group
|
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
2006-06-12 22:16:27 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ignore
|
|
|
|
*/
|
|
|
|
define('IN_PHPBB', true);
|
2007-09-18 14:49:19 +00:00
|
|
|
define('ADMIN_START', true);
|
2007-07-26 15:51:11 +00:00
|
|
|
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
2006-06-12 22:16:27 +00:00
|
|
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
|
|
|
include($phpbb_root_path . 'common.' . $phpEx);
|
|
|
|
|
|
|
|
// Start session management
|
|
|
|
$user->session_begin(false);
|
|
|
|
$auth->acl($user->data);
|
|
|
|
$user->setup();
|
|
|
|
|
|
|
|
// Set custom template for admin area
|
|
|
|
$template->set_custom_template($phpbb_root_path . 'adm/style', 'admin');
|
|
|
|
|
|
|
|
$template->set_filenames(array(
|
|
|
|
'body' => 'colour_swatch.html')
|
|
|
|
);
|
|
|
|
|
2007-09-22 18:31:50 +00:00
|
|
|
$form = request_var('form', '');
|
|
|
|
$name = request_var('name', '');
|
|
|
|
|
|
|
|
// We validate form and name here, only id/class allowed
|
|
|
|
$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
|
|
|
|
$name = (!preg_match('/^[a-z0-9_-]+$/i', $name)) ? '' : $name;
|
|
|
|
|
2006-06-12 22:16:27 +00:00
|
|
|
$template->assign_vars(array(
|
2007-09-22 18:31:50 +00:00
|
|
|
'OPENER' => $form,
|
|
|
|
'NAME' => $name,
|
2006-11-19 14:14:35 +00:00
|
|
|
'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
|
|
|
|
|
|
|
|
'S_USER_LANG' => $user->lang['USER_LANG'],
|
|
|
|
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
|
|
|
'S_CONTENT_ENCODING' => 'UTF-8',
|
|
|
|
));
|
2006-06-12 22:16:27 +00:00
|
|
|
|
|
|
|
$template->display('body');
|
|
|
|
|
2006-07-06 16:46:53 +00:00
|
|
|
garbage_collection();
|
2006-06-12 22:16:27 +00:00
|
|
|
|
|
|
|
?>
|