Start of pallet

This commit is contained in:
Ice
2008-09-28 22:59:25 +00:00
parent b4c27b2f0d
commit b800ee0c96
41 changed files with 1190 additions and 854 deletions

View File

@@ -22,44 +22,55 @@ if (!defined('IN_PORTAL'))
$style = request_var('style', 0);
$sql = 'SELECT style_id, style_name, style_copyright
FROM ' . STYLES_TABLE . '
WHERE style_active = 1
ORDER BY style_name ASC';
$sql = 'SELECT style_id, style_name, style_copyright
FROM ' . STYLES_TABLE . '
WHERE style_active = 1
ORDER BY style_name ASC';
$result = $db->sql_query($sql);
$style_select = '<option selected="selected" disabled="disabled">' . $user->lang['STYLE_CHOOSE'] . '</option>';
while ($row = $db->sql_fetchrow($result))
{
$selected = ( $style == $row['style_id'] ) ? ' selected="selected"' : '';
$style_value = append_sid("{$phpbb_root_path}portal.$phpEx", 'style=' . $row['style_id']);
$style_select .= '<option value="' . $style_value . '"' . $selected . '>&nbsp; ' . $row['style_name'] . ' &nbsp;</option>';
}
$db->sql_freeresult($result);
// style info
$sql2 = 'SELECT style_id, style_name, style_copyright
FROM ' . STYLES_TABLE . '
WHERE style_active = 1
AND style_id = ' . $style;
$result = $db->sql_query($sql);
$style_select = '<option selected="selected" disabled="disabled">' . $user->lang['STYLE_CHOOSE'] . '</option>';
while ($row = $db->sql_fetchrow($result))
{
$selected = ( $style == $row['style_id'] ) ? ' selected="selected"' : '';
$style_value = append_sid("{$phpbb_root_path}portal.$phpEx", 'style=' . $row['style_id']);
$style_select .= '<option value="' . $style_value . '"' . $selected . '>&nbsp; ' . $row['style_name'] . ' &nbsp;</option>';
}
$db->sql_freeresult($result);
$result = $db->sql_query($sql2);
$row = $db->sql_fetchrow($result);
// style info
$sql2 = 'SELECT style_id, style_name, style_copyright
FROM ' . STYLES_TABLE . '
WHERE style_active = 1
AND style_id = ' . $style;
$template->assign_vars(array(
'S_STYLE_ACTION'=> append_sid("{$phpbb_root_path}portal.$phpEx"),
'STYLE_NAME' => $row['style_name'],
'STYLE_COPY' => $row['style_copyright'],
'STYLE_SELECT' => $style_select,
));
$result = $db->sql_query($sql2);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
// Assign specific vars
$template->assign_vars(array(
'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($user->data['user_style']),
'S_DISPLAY_CHANGE_STYLE' => true,
'S_STYLE_ACTION'=> append_sid("{$phpbb_root_path}portal.$phpEx"),
'STYLE_NAME' => $row['style_name'],
'STYLE_COPY' => $row['style_copyright'],
'STYLE_SELECT' => $style_select,
));
$db->sql_freeresult($result);
// Assign specific vars
$template->assign_vars(array(
'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($user->data['user_style']),
));
if (!isset($template->filename['change_style_block']))
{
$template->set_filenames(array(
'change_style_block' => 'portal/block/change_style.html')
);
}
$block_temp = $template->assign_display('change_style_block');
$template->assign_block_vars('portal_column_'.$block_pos, array(
'BLOCK_DATA' => $block_temp)
);
unset( $block_temp );
?>