mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 02:06:32 +02:00
Couple more little updates
git-svn-id: file:///svn/phpbb/trunk@4254 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -46,15 +46,13 @@ switch ($mode)
|
||||
{
|
||||
case 'activate':
|
||||
case 'deactivate':
|
||||
// TODO ... reset user_styles if their style is deactivated
|
||||
$sql = 'UPDATE ' . STYLES_TABLE . '
|
||||
SET style_active = ' . (($action == 'activate') ? 1 : 0) . '
|
||||
WHERE style_id = ' . $style_id;
|
||||
$db->sql_query($sql);
|
||||
break;
|
||||
|
||||
case 'preview':
|
||||
break;
|
||||
|
||||
case 'edit':
|
||||
|
||||
if (isset($_POST['update']))
|
||||
@@ -68,8 +66,9 @@ switch ($mode)
|
||||
WHERE style_id = $style_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($style_data = $db->sql_fetchrow($result))
|
||||
if (!extract($db->sql_fetchrow($result)))
|
||||
{
|
||||
die("ERROR");
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
@@ -84,7 +83,7 @@ switch ($mode)
|
||||
$result = $db->sql_query($sql);
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$selected = ($row[$field . '_id'] == $style_data[$field . '_id']) ? ' selected="selected"' : '';
|
||||
$selected = ($row[$field . '_id'] == ${$field . '_id'}) ? ' selected="selected"' : '';
|
||||
${$field . '_options'} .= '<option value="' . $row[$field . '_id'] . '"' . $selected . '>' . $row[$field . '_name'] . '</option>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
@@ -100,12 +99,9 @@ switch ($mode)
|
||||
|
||||
<p><?php echo $user->lang['EDIT_STYLE_EXPLAIN']; ?></p>
|
||||
|
||||
<p>Selected Style: <b><?php echo $style_data['style_name']; ?></b></p>
|
||||
|
||||
<form name="style" method="post" action="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=$action&id=$style_id"; ?>"><table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th colspan="2">Edit Style</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1">Style Name</td>
|
||||
@@ -113,7 +109,11 @@ switch ($mode)
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1">Style Copyright</td>
|
||||
<td class="row2"><!-- input class="post" type="text" name="style_name" maxlength="255" size="40" /--></td>
|
||||
<td class="row2"><?php
|
||||
|
||||
echo ($action == 'edit') ? '<b>' . $style_copyright . '</b>' : '<input class="post" type="text" name="style_name" maxlength="255" size="40" value="' . $style_copyright . '" />';
|
||||
|
||||
?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1">Template set:</td>
|
||||
@@ -128,8 +128,8 @@ switch ($mode)
|
||||
<td class="row2"><select name="imageset_id"><?php echo $imageset_options; ?></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1">Active:</td>
|
||||
<td class="row2"></td>
|
||||
<td class="row1">Status:</td>
|
||||
<td class="row2"><input type="radio" name="style_active" value="0"<?php echo (!$style_active) ? ' checked="checked"' : ''; ?> /> Inactive <input type="radio" name="style_active" value="1"<?php echo ($style_active) ? ' checked="checked"' : ''; ?> /> Active</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="update" value="<?php echo $user->lang['SUBMIT']; ?>" /> <input class="btnlite" type="submit" name="preview" value="<?php echo $user->lang['PREVIEW']; ?>" /> <input class="btnlite" type="reset" value="<?php echo $user->lang['RESET']; ?>" /></td>
|
||||
@@ -161,7 +161,7 @@ switch ($mode)
|
||||
<tr>
|
||||
<th nowrap="nowrap">Style name</th>
|
||||
<th nowrap="nowrap">Used by</th>
|
||||
<th nowrap="nowrap"> </th>
|
||||
<th nowrap="nowrap" colspan="4"> </th>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -192,7 +192,10 @@ switch ($mode)
|
||||
<tr>
|
||||
<td class="<?php echo $row_class; ?>" width="100%"><a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=edit&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; ?>" align="center" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=$stylevis&id=" . $row['style_id']; ?>"><?php echo $user->lang['STYLE_' . strtoupper($stylevis)]; ?></a> | <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=delete&id=" . $row['style_id']; ?>">Delete</a> | <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=export&id=" . $row['style_id']; ?>">Export</a> | <a href="<?php echo "{$phpbb_root_path}index.$phpEx$SID&style=" . $row['style_id']; ?>" target="_stylepreview">Preview</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=$stylevis&id=" . $row['style_id']; ?>"><?php echo $user->lang['STYLE_' . strtoupper($stylevis)]; ?></a> </td>
|
||||
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=delete&id=" . $row['style_id']; ?>">Delete</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=export&id=" . $row['style_id']; ?>">Export</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"> <a href="<?php echo "{$phpbb_root_path}index.$phpEx$SID&style=" . $row['style_id']; ?>" target="_stylepreview">Preview</a> </td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -207,7 +210,7 @@ switch ($mode)
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="cat" colspan="3" align="right">Create new style: <input class="post" type="text" name="style_name" value="" maxlength="30" size="25" /> <input class="btnmain" type="submit" name="newstyle" value="<?php echo $user->lang['SUBMIT']; ?>" /></td>
|
||||
<td class="cat" colspan="6" align="right">Create new style: <input class="post" type="text" name="style_name" value="" maxlength="30" size="25" /> <input class="btnmain" type="submit" name="newstyle" value="<?php echo $user->lang['SUBMIT']; ?>" /></td>
|
||||
</tr>
|
||||
</table></form>
|
||||
<?php
|
||||
@@ -233,7 +236,7 @@ switch ($mode)
|
||||
<form name="style" method="post" action="<?php echo "admin_styles.$phpEx$SID&mode=$mode"; ?>"><table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<th>Imageset name</th>
|
||||
<th> </th>
|
||||
<th colspan="2"> </th>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -250,7 +253,8 @@ switch ($mode)
|
||||
?>
|
||||
<tr>
|
||||
<td class="<?php echo $row_class; ?>" width="100%"><a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=edit&id=" . $row['imageset_id']; ?>"><?php echo $row['imageset_name']; ?></a></td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=delete&id=" . $row['imageset_id']; ?>">Delete</a> | <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=export&id=" . $row['imageset_id']; ?>">Export</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=delete&id=" . $row['imageset_id']; ?>">Delete</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=export&id=" . $row['imageset_id']; ?>">Export</a> </td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -265,7 +269,7 @@ switch ($mode)
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="cat" colspan="2"> </td>
|
||||
<td class="cat" colspan="3"> </td>
|
||||
</tr>
|
||||
</table></form>
|
||||
<?php
|
||||
@@ -523,13 +527,13 @@ switch ($mode)
|
||||
|
||||
|
||||
//
|
||||
adm_page_header($user->lang['Edit_template']);
|
||||
adm_page_header($user->lang['EDIT_TEMPLATE']);
|
||||
|
||||
?>
|
||||
|
||||
<h1><?php echo $user->lang['Edit_template']; ?></h1>
|
||||
<h1><?php echo $user->lang['EDIT_TEMPLATE']; ?></h1>
|
||||
|
||||
<p><?php echo $user->lang['Edit_template_explain']; ?></p>
|
||||
<p><?php echo $user->lang['EDIT_TEMPLATE_EXPLAIN']; ?></p>
|
||||
|
||||
<form name="style" method="post" action="<?php echo "admin_styles.$phpEx$SID&mode=$mode&id=$template_id&action=$action"; ?>"><table cellspacing="1" cellpadding="1" border="0" align="center">
|
||||
<tr>
|
||||
@@ -565,17 +569,17 @@ switch ($mode)
|
||||
break;
|
||||
}
|
||||
|
||||
adm_page_header($user->lang['EDIT_TEMPLATE']);
|
||||
adm_page_header($user->lang['MANAGE_TEMPLATE']);
|
||||
|
||||
?>
|
||||
<h1><?php echo $user->lang['Edit_template']; ?></h1>
|
||||
<h1><?php echo $user->lang['MANAGE_TEMPLATE']; ?></h1>
|
||||
|
||||
<p><?php echo $user->lang['Edit_template_explain']; ?></p>
|
||||
<p><?php echo $user->lang['MANAGE_TEMPLATE_EXPLAIN']; ?></p>
|
||||
|
||||
<form name="templates" method="post" action="<?php echo "admin_styles.$phpEx$SID&mode=$mode"; ?>"><table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<th>Template name</th>
|
||||
<th> </th>
|
||||
<th colspan="2">Template name</th>
|
||||
<th colspan="3"> </th>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -592,7 +596,10 @@ switch ($mode)
|
||||
?>
|
||||
<tr>
|
||||
<td class="<?php echo $row_class; ?>" width="100%"><a href="<?php echo "admin_styles.$phpEx$SID&mode=templates&action=edit&id=" . $row['template_id']; ?>"><?php echo $row['template_name']; ?></a></td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=templates&action=bbcode&id=" . $row['template_id']; ?>">BBCode</a> | <a href="<?php echo "admin_styles.$phpEx$SID&mode=templates&action=delete&id=" . $row['template_id']; ?>">Delete</a> | <a href="<?php echo "admin_styles.$phpEx$SID&mode=templates&action=export&id=" . $row['template_id']; ?>">Export</a> | <a href="<?php echo "admin_styles.$phpEx$SID&mode=templates&action=preview&id=" . $row['template_id']; ?>">Preview</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=templates&action=bbcode&id=" . $row['template_id']; ?>">BBCode</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=templates&action=delete&id=" . $row['template_id']; ?>">Delete</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=templates&action=export&id=" . $row['template_id']; ?>">Export</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=templates&action=preview&id=" . $row['template_id']; ?>">Preview</a> </td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -607,8 +614,8 @@ switch ($mode)
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="cat" colspan="2" align="right"> </td>
|
||||
</tr><!-- Create new theme: <input class="post" type="text" name="template_name" value="" maxlength="30" size="25" /> <input class="btnmain" type="submit" name="newtheme" value="<?php echo $user->lang['SUBMIT']; ?>" />-->
|
||||
<td class="cat" colspan="5" align="right"> </td>
|
||||
</tr>
|
||||
</table></form>
|
||||
|
||||
<?php
|
||||
@@ -1308,7 +1315,7 @@ function csspreview()
|
||||
<form name="style" method="post" action="<?php echo "admin_styles.$phpEx$SID&mode=$mode"; ?>"><table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<th>Theme name</th>
|
||||
<th> </th>
|
||||
<th colspan="3"> </th>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -1331,7 +1338,9 @@ function csspreview()
|
||||
echo sprintf('%s%s%s', "<a href=\"admin_styles.$phpEx$SID&mode=themes&action=edit&id=" . $row['theme_id'] . '">', $row['theme_name'], '</a>');
|
||||
|
||||
?></td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=themes&action=delete&id=" . $row['theme_id']; ?>">Delete</a> | <a href="<?php echo "admin_styles.$phpEx$SID&mode=themes&action=export&id=" . $row['theme_id']; ?>">Export</a> | <a href="<?php echo "admin_styles.$phpEx$SID&mode=themes&action=preview&id=" . $row['theme_id']; ?>">Preview</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=themes&action=delete&id=" . $row['theme_id']; ?>">Delete</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=themes&action=export&id=" . $row['theme_id']; ?>">Export</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=themes&action=preview&id=" . $row['theme_id']; ?>">Preview</a> </td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -1346,7 +1355,7 @@ function csspreview()
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="cat" colspan="2" align="right">Create new theme: <input class="post" type="text" name="theme_name" value="" maxlength="30" size="25" /> <input class="btnmain" type="submit" name="newtheme" value="<?php echo $user->lang['SUBMIT']; ?>" /></td>
|
||||
<td class="cat" colspan="4" align="right">Create new theme: <input class="post" type="text" name="theme_name" value="" maxlength="30" size="25" /> <input class="btnmain" type="submit" name="newtheme" value="<?php echo $user->lang['SUBMIT']; ?>" /></td>
|
||||
</tr>
|
||||
</table></form>
|
||||
|
||||
|
Reference in New Issue
Block a user