|
indvdum@0
|
1 |
<?php
|
|
indvdum@0
|
2 |
/**
|
|
indvdum@0
|
3 |
*
|
|
indvdum@0
|
4 |
* @package phpBB3
|
|
indvdum@0
|
5 |
* @version $Id$
|
|
indvdum@0
|
6 |
* @copyright (c) 2005 phpBB Group
|
|
indvdum@0
|
7 |
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
|
indvdum@0
|
8 |
*
|
|
indvdum@0
|
9 |
*/
|
|
indvdum@0
|
10 |
|
|
indvdum@0
|
11 |
/**
|
|
indvdum@0
|
12 |
* @ignore
|
|
indvdum@0
|
13 |
*/
|
|
indvdum@0
|
14 |
define('IN_PHPBB', true);
|
|
indvdum@0
|
15 |
define('ADMIN_START', true);
|
|
indvdum@0
|
16 |
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
|
indvdum@0
|
17 |
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
|
indvdum@0
|
18 |
include($phpbb_root_path . 'common.' . $phpEx);
|
|
indvdum@0
|
19 |
|
|
indvdum@0
|
20 |
// Start session management
|
|
indvdum@0
|
21 |
$user->session_begin(false);
|
|
indvdum@0
|
22 |
$auth->acl($user->data);
|
|
indvdum@0
|
23 |
$user->setup();
|
|
indvdum@0
|
24 |
|
|
indvdum@0
|
25 |
// Set custom template for admin area
|
|
indvdum@0
|
26 |
$template->set_custom_template($phpbb_root_path . 'adm/style', 'admin');
|
|
indvdum@0
|
27 |
|
|
indvdum@0
|
28 |
$template->set_filenames(array(
|
|
indvdum@0
|
29 |
'body' => 'colour_swatch.html')
|
|
indvdum@0
|
30 |
);
|
|
indvdum@0
|
31 |
|
|
indvdum@0
|
32 |
$form = request_var('form', '');
|
|
indvdum@0
|
33 |
$name = request_var('name', '');
|
|
indvdum@0
|
34 |
|
|
indvdum@0
|
35 |
// We validate form and name here, only id/class allowed
|
|
indvdum@0
|
36 |
$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
|
|
indvdum@0
|
37 |
$name = (!preg_match('/^[a-z0-9_-]+$/i', $name)) ? '' : $name;
|
|
indvdum@0
|
38 |
|
|
indvdum@0
|
39 |
$template->assign_vars(array(
|
|
indvdum@0
|
40 |
'OPENER' => $form,
|
|
indvdum@0
|
41 |
'NAME' => $name,
|
|
indvdum@0
|
42 |
'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
|
|
indvdum@0
|
43 |
|
|
indvdum@0
|
44 |
'S_USER_LANG' => $user->lang['USER_LANG'],
|
|
indvdum@0
|
45 |
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
|
indvdum@0
|
46 |
'S_CONTENT_ENCODING' => 'UTF-8',
|
|
indvdum@0
|
47 |
));
|
|
indvdum@0
|
48 |
|
|
indvdum@0
|
49 |
$template->display('body');
|
|
indvdum@0
|
50 |
|
|
indvdum@0
|
51 |
garbage_collection();
|
|
indvdum@0
|
52 |
|
|
indvdum@0
|
53 |
?> |