Blame Identity/Webenv/phpBB/3.0.4/adm/swatch.php

ef5584
ef5584
/**
ef5584
*
ef5584
* @package phpBB3
ef5584
* @version $Id: swatch.php 8479 2008-03-29 00:22:48Z naderman $
ef5584
* @copyright (c) 2005 phpBB Group
ef5584
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
ef5584
*
ef5584
*/
ef5584
ef5584
/**
ef5584
* @ignore
ef5584
*/
ef5584
define('IN_PHPBB', true);
ef5584
define('ADMIN_START', true);
ef5584
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
ef5584
$phpEx = substr(strrchr(__FILE__, '.'), 1);
ef5584
include($phpbb_root_path . 'common.' . $phpEx);
ef5584
ef5584
// Start session management
ef5584
$user->session_begin(false);
ef5584
$auth->acl($user->data);
ef5584
$user->setup();
ef5584
ef5584
// Set custom template for admin area
ef5584
$template->set_custom_template($phpbb_root_path . 'adm/style', 'admin');
ef5584
ef5584
$template->set_filenames(array(
ef5584
	'body' => 'colour_swatch.html')
ef5584
);
ef5584
ef5584
$form = request_var('form', '');
ef5584
$name = request_var('name', '');
ef5584
ef5584
// We validate form and name here, only id/class allowed
ef5584
$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
ef5584
$name = (!preg_match('/^[a-z0-9_-]+$/i', $name)) ? '' : $name;
ef5584
ef5584
$template->assign_vars(array(
ef5584
	'OPENER'		=> $form,
ef5584
	'NAME'			=> $name,
ef5584
	'T_IMAGES_PATH'	=> "{$phpbb_root_path}images/",
ef5584
ef5584
	'S_USER_LANG'			=> $user->lang['USER_LANG'],
ef5584
	'S_CONTENT_DIRECTION'	=> $user->lang['DIRECTION'],
ef5584
	'S_CONTENT_ENCODING'	=> 'UTF-8',
ef5584
));
ef5584
ef5584
$template->display('body');
ef5584
ef5584
garbage_collection();
ef5584
ef5584
?>