~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/php/phpBB3/adm/swatch.php

  • Committer: dcoles
  • Date: 2008-07-03 04:20:54 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:803
Setup: Modularised setup.py so it is now no longer over 1000 lines. This should 
allow us to get in there and tidy up each module much easier. Also removed 
updatejails since this functionality seems to be duplicated with remakeuser.py 
and remakealluser.py scripts.

Show diffs side-by-side

added added

removed removed

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