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

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