aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm/admin_styles.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2003-07-13 23:29:22 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2003-07-13 23:29:22 +0000
commit7668388b4ed9fddc95e6740da0e6fb3c97edb187 (patch)
tree896e035591d2d4acff7c9bd6a9d68a49e8179206 /phpBB/adm/admin_styles.php
parent2c400376a17e981bffd7e07de474cc20400a7457 (diff)
downloadforums-7668388b4ed9fddc95e6740da0e6fb3c97edb187.tar
forums-7668388b4ed9fddc95e6740da0e6fb3c97edb187.tar.gz
forums-7668388b4ed9fddc95e6740da0e6fb3c97edb187.tar.bz2
forums-7668388b4ed9fddc95e6740da0e6fb3c97edb187.tar.xz
forums-7668388b4ed9fddc95e6740da0e6fb3c97edb187.zip
More styling stuff ... activate, deactivate styles ... deactivated styles can still be used in forum/board styling selectors
git-svn-id: file:///svn/phpbb/trunk@4253 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/adm/admin_styles.php')
-rw-r--r--phpBB/adm/admin_styles.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/phpBB/adm/admin_styles.php b/phpBB/adm/admin_styles.php
index bbdfea4792..036176f11c 100644
--- a/phpBB/adm/admin_styles.php
+++ b/phpBB/adm/admin_styles.php
@@ -44,6 +44,14 @@ switch ($mode)
switch ($action)
{
+ case 'activate':
+ case 'deactivate':
+ $sql = 'UPDATE ' . STYLES_TABLE . '
+ SET style_active = ' . (($action == 'activate') ? 1 : 0) . '
+ WHERE style_id = ' . $style_id;
+ $db->sql_query($sql);
+ break;
+
case 'preview':
break;
@@ -168,7 +176,7 @@ switch ($mode)
}
$db->sql_freeresult($result);
- $sql = 'SELECT style_id, style_name
+ $sql = 'SELECT style_id, style_name, style_active
FROM ' . STYLES_TABLE;
$result = $db->sql_query($sql);
@@ -178,11 +186,13 @@ switch ($mode)
{
$row_class = ($row_class != 'row1') ? 'row1' : 'row2';
+ $stylevis = (!$row['style_active']) ? 'activate' : 'deactivate';
+
?>
<tr>
<td class="<?php echo $row_class; ?>" width="100%"><a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=edit&amp;id=" . $row['style_id']; ?>"><?php echo $row['style_name']; ?></a><?php echo ($config['default_style'] == $row['style_id']) ? ' *' : ''; ?></td>
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"><?php echo (!empty($style_count[$row['style_id']])) ? $style_count[$row['style_id']] : '0'; ?></td>
- <td class="<?php echo $row_class; ?>" nowrap="nowrap">&nbsp;<a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=deactivate&amp;id=" . $row['style_id']; ?>">Deactivate</a> | <a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=delete&amp;id=" . $row['style_id']; ?>">Delete</a> | <a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=export&amp;id=" . $row['style_id']; ?>">Export</a> | <a href="<?php echo "{$phpbb_root_path}index.$phpEx$SID&amp;style=" . $row['style_id']; ?>" target="_stylepreview">Preview</a>&nbsp;</td>
+ <td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap">&nbsp;<a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=$stylevis&amp;id=" . $row['style_id']; ?>"><?php echo $user->lang['STYLE_' . strtoupper($stylevis)]; ?></a> | <a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=delete&amp;id=" . $row['style_id']; ?>">Delete</a> | <a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=export&amp;id=" . $row['style_id']; ?>">Export</a> | <a href="<?php echo "{$phpbb_root_path}index.$phpEx$SID&amp;style=" . $row['style_id']; ?>" target="_stylepreview">Preview</a>&nbsp;</td>
</tr>
<?php