diff --git a/phpBB/adm/admin_styles.php b/phpBB/adm/admin_styles.php index e8a1f33a8f..9b0b749a04 100644 --- a/phpBB/adm/admin_styles.php +++ b/phpBB/adm/admin_styles.php @@ -76,8 +76,6 @@ $tmp_path = ''; $safe_mode = (@ini_get('safe_mode') || @strtolower(ini_get('safe_mode')) == 'on') ? true : false; $file_uploads = (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on') ? true : false; - - // Generate list of archive types inc. regexp | match $archive_types = '.tar'; $archive_preg = '\.tar'; @@ -91,14 +89,11 @@ foreach (array('tar.gz' => 'zlib', 'tar.bz2' => 'bz2', 'zip' => 'zlib') as $type $archive_preg .= '|\.' . preg_quote($type); } - - // -------------------- // Start program proper // -------------------- - -// Unified actions +// Mode indepedent actions switch ($action) { case 'export': @@ -120,11 +115,13 @@ switch ($action) remove($mode, $id); } break; + + case 'preview': + + break; } - - -// What shall we do today then? +// Mode based actions switch ($mode) { // STYLES @@ -151,124 +148,7 @@ switch ($mode) break; } - adm_page_header($user->lang['MANAGE_STYLE']); - -?> -

lang['MANAGE_STYLE']; ?>

- -

lang['MANAGE_STYLE_EXPLAIN']; ?>

- -
"> - - - - - - - - -sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $style_count[$row['user_style']] = $row['style_count']; - } - $db->sql_freeresult($result); - - $sql = 'SELECT style_id, style_name, style_active - FROM ' . STYLES_TABLE; - $result = $db->sql_query($sql); - - $installed = array(); - $basis_options = ''; - while ($row = $db->sql_fetchrow($result)) - { - $installed[] = strtolower($row['style_name']); - $basis_options .= ''; - - $row_class = ($row_class != 'row1') ? 'row1' : 'row2'; - - $stylevis = (!$row['style_active']) ? 'activate' : 'deactivate'; - -?> - - - - - - - - -sql_freeresult($result); - -?> - - - - $cfg) - { - -?> - - - - - - - - - - - - -
lang['STYLE_NAME']; ?>lang['STYLE_USED_BY']; ?>lang['OPTIONS']; ?>
lang['INSTALLED_STYLE']; ?>
"> ">lang['STYLE_' . strtoupper($stylevis)]; ?>  ">lang['DELETE']; ?>  ">lang['EXPORT']; ?>  lang['PREVIEW']; ?> 
lang['UNINSTALLED_STYLE']; ?>
">lang['INSTALL']; ?>
lang['NO_UNINSTALLED_STYLE']; ?>
lang['CREATE_STYLE']; ?>: lang['FROM']; ?>
-lang[$l_prefix . 'S']); @@ -1452,15 +1337,40 @@ function frontend($type, $options)
"> - - + + + + + - + sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $style_count[$row['user_style']] = $row['style_count']; + } + $db->sql_freeresult($result); + } + + $sql = "SELECT * FROM $sql_from"; $result = $db->sql_query($sql); @@ -1473,11 +1383,24 @@ function frontend($type, $options) $row_class = ($row_class != 'row1') ? 'row1' : 'row2'; + $tagstyle = ($type == 'style' && $row['style_id'] == $config['default_style']) ? '*' : ''; + ?> - + + + + + - + - + - + - +
lang[$l_prefix . '_NAME']; ?>lang['OPTIONS']; ?>lang[$l_prefix . '_NAME']; ?>lang['STYLE_USED_BY']; ?>lang['OPTIONS']; ?>
lang['INSTALLED_' . $l_prefix]; ?>lang['INSTALLED_' . $l_prefix]; ?>
">  ">lang['STYLE_' . strtoupper($stylevis)]; ?>  lang['PREVIEW']; ?> 
lang['UNINSTALLED_' . $l_prefix]; ?>lang['UNINSTALLED_' . $l_prefix]; ?>
">lang['INSTALL']; ?>">lang['INSTALL']; ?>
lang['NO_UNINSTALLED_' . $l_prefix]; ?>lang['NO_UNINSTALLED_' . $l_prefix]; ?>
lang['CREATE_' . $l_prefix]; ?>: lang['FROM']; ?> lang['CREATE_' . $l_prefix]; ?>: lang['FROM']; ?>