diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-08-03 23:52:33 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-08-03 23:52:33 +0000 |
commit | ca716517676cff9e66ebd301bf771891d0cb0962 (patch) | |
tree | 17560847b65989326f26d395f4b4aa363f4e4053 /phpBB/admin/admin_styles.php | |
parent | 66295f4bdae6eb6c0dd2f6d165d0faf3f9d7f10d (diff) | |
download | forums-ca716517676cff9e66ebd301bf771891d0cb0962.tar forums-ca716517676cff9e66ebd301bf771891d0cb0962.tar.gz forums-ca716517676cff9e66ebd301bf771891d0cb0962.tar.bz2 forums-ca716517676cff9e66ebd301bf771891d0cb0962.tar.xz forums-ca716517676cff9e66ebd301bf771891d0cb0962.zip |
Various updates
git-svn-id: file:///svn/phpbb/trunk@2816 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/admin/admin_styles.php')
-rw-r--r-- | phpBB/admin/admin_styles.php | 52 |
1 files changed, 21 insertions, 31 deletions
diff --git a/phpBB/admin/admin_styles.php b/phpBB/admin/admin_styles.php index d46f61fedd..afe37454c4 100644 --- a/phpBB/admin/admin_styles.php +++ b/phpBB/admin/admin_styles.php @@ -197,7 +197,7 @@ switch ( $mode ) { $tpl = substr($file, 0, strpos($file, '.')); $selected = ( $tplname == $tpl ) ? ' selected="selected"' : ''; - $tplname_options .= '<option name="' . $tpl . '"' . $selected . '>' . $tpl . '</option>'; + $tplname_options .= '<option value="' . $tpl . '"' . $selected . '>' . $tpl . '</option>'; } } closedir($dp); @@ -217,7 +217,7 @@ switch ( $mode ) <p><?php echo $lang['Select_template']; ?>: <select name="tplroot"><?php echo $tplroot_options; ?></select> <input class="liteoption" type="submit" name="tpl_root" value="Select" /></p> -<table class="bg" cellspacing="1" cellpadding="0" border="0" align="center"><!-- bgcolor="#98AAB1" --> +<table class="bg" width="95%" cellspacing="1" cellpadding="0" border="0" align="center"> <tr> <td class="cat"><table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> @@ -242,7 +242,7 @@ switch ( $mode ) case 'edittheme': - $theme_id = ( isset($HTTP_POST_VARS['theme_id']) ) ? $HTTP_POST_VARS['theme_id'] : ''; + $theme_id = ( isset($HTTP_POST_VARS['themeroot']) ) ? $HTTP_POST_VARS['themeroot'] : ''; if ( isset($HTTP_POST_VARS['update']) ) { @@ -256,9 +256,9 @@ switch ( $mode ) $theme_name = $row['theme_name']; $css_data = ( !empty($HTTP_POST_VARS['css_data']) ) ? htmlentities($HTTP_POST_VARS['css_data']) : ''; - $css_external = ( !empty($HTTP_POST_VARS['css_external']) ) ? $HTTP_POST_VARS['css_external'] : ''; + $css_external = ( !empty($HTTP_POST_VARS['css_data']) ) ? $HTTP_POST_VARS['css_data'] : ''; - $sql = "UPDATE " . STYLES_CSS_TABLE . " + $sql = "UPDATE " > STYLES_CSS_TABLE . " SET css_data = '$css_data', css_external = '$css_external' WHERE theme_id = $theme_id"; $db->sql_query($sql); @@ -285,24 +285,9 @@ switch ( $mode ) while ( $row = $db->sql_fetchrow($result) ); } $db->sql_freeresult($result); - -?> - -<form method="post" action="<?php echo "admin_styles.$phpEx$SID&mode=$mode"; ?>"> - -<h2><?php echo $lang['Edit_theme']; ?></h2> - -<p><?php echo $lang['Edit_theme_explain']; ?></p> - -<table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center"> - <tr> - <th colspan="2"><?php echo $lang['Edit_theme']; ?></th> - </tr> - <tr> - <td class="cat" colspan="2" align="center"><?php echo $lang['Select_theme']; ?>: <select name="theme_id"><?php echo $theme_options; ?></select> <input class="liteoption" type="submit" name="tpl_root" value="<?php echo $lang['Select']; ?>" /></td> - </tr> -<?php + $css_data = ''; + $css_external = ''; if ( $theme_id ) { $sql = "SELECT css_data, css_external @@ -314,8 +299,21 @@ switch ( $mode ) { $css_data = preg_replace('/\t{1,}/i', ' ', $row['css_data']); $css_external = $row['css_external']; + } + } ?> + +<form method="post" action="<?php echo "admin_styles.$phpEx$SID&mode=$mode"; ?>"> + +<h2><?php echo $lang['Edit_theme']; ?></h2> + +<p><?php echo $lang['Edit_theme_explain']; ?></p> + +<table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center"> + <tr> + <td class="cat" colspan="2" align="center"><?php echo $lang['Select_theme']; ?>: <select name="themeroot"><?php echo $theme_options; ?></select> <input class="liteoption" type="submit" name="tpl_root" value="<?php echo $lang['Select']; ?>" /></td> + </tr> <tr> <td class="row1"><?php echo $lang['CSS_data']; ?>: <br /><span class="gensmall"><?php echo $lang['CSS_data_explain']; ?></td> <td class="row2"><textarea class="edit" cols="65" rows="15" name="css_data"><?php echo htmlentities($css_data); ?></textarea></td> @@ -331,14 +329,6 @@ switch ( $mode ) <?php - } - } - -?> - -</form> -<?php - page_footer(); break; @@ -361,7 +351,7 @@ function get_templates($tplroot = '') while ( $row = $db->sql_fetchrow($result) ) { $selected = ( $tplroot == $row['template_path'] ) ? ' selected="selected"' : ''; - $tplroot_options .= '<option name="' . $row['template_path'] . '"' . $selected . '>' . $row['template_path'] . '</option>'; + $tplroot_options .= '<option value="' . $row['template_path'] . '"' . $selected . '>' . $row['template_path'] . '</option>'; } return $tplroot_options; |