6 * @copyright (c) 2005 phpBB Group
7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
14 define('IN_PHPBB', true);
15 define('ADMIN_START', true);
16 if (!defined('PHPBB_ROOT_PATH')) define('PHPBB_ROOT_PATH', './../');
17 if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__
, '.'), 1));
18 include(PHPBB_ROOT_PATH
. 'common.' . PHP_EXT
);
20 // Start session management
21 $user->session_begin(false);
22 $auth->acl($user->data
);
25 // Set custom template for admin area
26 $template->set_custom_template(PHPBB_ROOT_PATH
. phpbb
::$base_config['admin_folder'] . '/style', 'admin');
28 $template->set_filenames(array(
29 'body' => 'colour_swatch.html')
32 $form = request_var('form', '');
33 $name = request_var('name', '');
35 // We validate form and name here, only id/class allowed
36 $form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ?
'' : $form;
37 $name = (!preg_match('/^[a-z0-9_-]+$/i', $name)) ?
'' : $name;
39 $template->assign_vars(array(
42 'T_IMAGES_PATH' => PHPBB_ROOT_PATH
. 'images/',
44 'S_USER_LANG' => $user->lang
['USER_LANG'],
45 'S_CONTENT_DIRECTION' => $user->lang
['DIRECTION'],
46 'S_CONTENT_ENCODING' => 'UTF-8',
49 $template->display('body');