diff --git a/phpBB/adm/admin_styles.php b/phpBB/adm/admin_styles.php index c37b8e26d3..7fbf6a9e0d 100644 --- a/phpBB/adm/admin_styles.php +++ b/phpBB/adm/admin_styles.php @@ -25,11 +25,13 @@ require('pagestart.' . $phpEx); // Do we have styles admin permissions? if (!$auth->acl_get('a_styles')) { - trigger_error($user->lang['No_admin']); + trigger_error($user->lang['NO_ADMIN']); } // -$mode = (isset($_GET['mode'])) ? $_GET['mode'] : $_POST['mode']; +$mode = (isset($_REQUEST['mode'])) ? htmlspecialchars($_REQUEST['mode']) : ''; + + switch ($mode) @@ -46,9 +48,9 @@ switch ($mode) $imageset = array('imageset_path', 'post_new', 'post_locked', 'post_pm', 'reply_new', 'reply_pm', 'reply_locked', 'icon_profile', 'icon_pm', 'icon_delete', 'icon_ip', 'icon_quote', 'icon_search', 'icon_edit', 'icon_email', 'icon_www', 'icon_icq', 'icon_aim', 'icon_yim', 'icon_msnm', 'icon_no_email', 'icon_no_www', 'icon_no_icq', 'icon_no_aim', 'icon_no_yim', 'icon_no_msnm', 'goto_post', 'goto_post_new', 'goto_post_latest', 'goto_post_newest', 'forum', 'forum_new', 'forum_locked', 'sub_forum', 'sub_forum_new', 'folder', 'folder_new', 'folder_hot', 'folder_hot_new', 'folder_locked', 'folder_locked_new', 'folder_sticky', 'folder_sticky_new', 'folder_announce', 'folder_announce_new', 'topic_watch', 'topic_unwatch', 'poll_left', 'poll_center', 'poll_right', 'rating'); - $sql = "SELECT imageset_name, imageset_path - FROM " . STYLES_IMAGE_TABLE . " - ORDER BY imageset_name"; + $sql = 'SELECT imageset_name, imageset_path + FROM ' . STYLES_IMAGE_TABLE . ' + ORDER BY imageset_name'; $result = $db->sql_query($sql); $imgroot_options = ''; @@ -249,6 +251,18 @@ switch ($mode) adm_page_footer(); break; + + + + + + + + + + + + case 'edittheme': $theme_id = (isset($_POST['themeroot'])) ? $_POST['themeroot'] : ''; @@ -311,28 +325,129 @@ switch ($mode) } } + $user->lang = array_merge($user->lang, array( + 'SELECT_CLASS' => 'Select class', + 'style_body' => 'Body', + 'style_p' => 'Paragraphs', + 'style_th' => 'Table Header Cell', + 'style_td' => 'Table Data Cell', + 'style_postdetails' => 'Post Information', + 'style_postbody' => 'Post text', + 'style_gen' => 'General Text', + 'style_genmed' => 'Medium Text', + 'style_gensmall' => 'Small Text', + 'style_copyright' => 'Copyright Text', + + )); + + $base_classes = array( + 'body', + 'p', + 'th', + 'td', + 'postdetails', + 'postbody', + 'gen', + 'gensmall', + 'copyright' + ); + + $class_options = ''; + foreach ($base_classes as $class) + { + $class_options .= ''; + } + + + $imglist = filelist($phpbb_root_path . 'templates'); + + $bg_imglist = ''; + foreach ($imglist as $img) + { + $img = substr($img['path'], 1) . (($img['path'] != '') ? '/' : '') . $img['file']; + +// $selected = ' selected="selected"'; + $bg_imglist .= ''; + } + $bg_imglist = '' . $bg_imglist; + + ?> -
"> +

lang['Edit_theme']; ?>

lang['Edit_theme_explain']; ?>

- +">
- + - - - - - - - - - +
lang['Select_theme']; ?>:   lang['SELECT_CLASS']; ?>:  
lang['CSS_data']; ?>:
lang['CSS_data_explain']; ?>
lang['CSS_sheet']; ?>:
   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterValue
Background image:
Repeat background:
Background color: [ Web-safe Colour Swatch ]
Foreground color: [ Web-safe Colour Swatch ]
Font:
Font size:
Font Bold: lang['YES']; ?>   lang['NO']; ?>
Font Italic: lang['YES']; ?>   lang['NO']; ?>
Font Underline: lang['YES']; ?>   lang['NO']; ?>
Line spacing:
  
@@ -341,6 +456,15 @@ switch ($mode) adm_page_footer(); break; + + + + + + + + + }