1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/adm/swatch.php Wed Mar 07 16:41:10 2012 +0400
1.3 @@ -0,0 +1,53 @@
1.4 +<?php
1.5 +/**
1.6 +*
1.7 +* @package phpBB3
1.8 +* @version $Id$
1.9 +* @copyright (c) 2005 phpBB Group
1.10 +* @license http://opensource.org/licenses/gpl-license.php GNU Public License
1.11 +*
1.12 +*/
1.13 +
1.14 +/**
1.15 +* @ignore
1.16 +*/
1.17 +define('IN_PHPBB', true);
1.18 +define('ADMIN_START', true);
1.19 +$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
1.20 +$phpEx = substr(strrchr(__FILE__, '.'), 1);
1.21 +include($phpbb_root_path . 'common.' . $phpEx);
1.22 +
1.23 +// Start session management
1.24 +$user->session_begin(false);
1.25 +$auth->acl($user->data);
1.26 +$user->setup();
1.27 +
1.28 +// Set custom template for admin area
1.29 +$template->set_custom_template($phpbb_root_path . 'adm/style', 'admin');
1.30 +
1.31 +$template->set_filenames(array(
1.32 + 'body' => 'colour_swatch.html')
1.33 +);
1.34 +
1.35 +$form = request_var('form', '');
1.36 +$name = request_var('name', '');
1.37 +
1.38 +// We validate form and name here, only id/class allowed
1.39 +$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
1.40 +$name = (!preg_match('/^[a-z0-9_-]+$/i', $name)) ? '' : $name;
1.41 +
1.42 +$template->assign_vars(array(
1.43 + 'OPENER' => $form,
1.44 + 'NAME' => $name,
1.45 + 'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
1.46 +
1.47 + 'S_USER_LANG' => $user->lang['USER_LANG'],
1.48 + 'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
1.49 + 'S_CONTENT_ENCODING' => 'UTF-8',
1.50 +));
1.51 +
1.52 +$template->display('body');
1.53 +
1.54 +garbage_collection();
1.55 +
1.56 +?>
1.57 \ No newline at end of file