Blame Extras/phpBB/3.0.4/adm/swatch.php

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