aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/ucp/ucp_prefs.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/ucp/ucp_prefs.php')
-rw-r--r--phpBB/ucp/ucp_prefs.php30
1 files changed, 20 insertions, 10 deletions
diff --git a/phpBB/ucp/ucp_prefs.php b/phpBB/ucp/ucp_prefs.php
index d390a92f7c..7ad954e6d6 100644
--- a/phpBB/ucp/ucp_prefs.php
+++ b/phpBB/ucp/ucp_prefs.php
@@ -1,6 +1,6 @@
<?php
/***************************************************************************
- * usercp_profile.php
+ * ucp_prefs.php
* -------------------
* begin : Saturday, Feb 21, 2003
* copyright : (C) 2001 The phpBB Group
@@ -8,7 +8,6 @@
*
* $Id$
*
- *
***************************************************************************/
/***************************************************************************
@@ -18,27 +17,38 @@
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- *
***************************************************************************/
class ucp_prefs extends ucp
{
- function main($module_id)
+ function main($id)
{
global $config, $db, $user, $SID, $template, $phpEx;
$submode = ($_REQUEST['mode']) ? htmlspecialchars($_REQUEST['mode']) : 'personal';
// Setup internal subsection display
- $submodules['PERSONAL'] = "module_id=$module_id&amp;mode=personal";
- $submodules['VIEW'] = "module_id=$module_id&amp;mode=view";
- $submodules['POST'] = "module_id=$module_id&amp;mode=post";
+ $submodules['PERSONAL'] = "i=$id&amp;mode=personal";
+ $submodules['VIEW'] = "i=$id&amp;mode=view";
+ $submodules['POST'] = "i=$id&amp;mode=post";
- ucp::subsection($submodules, $submode);
+ $this->subsection($submodules, $submode);
unset($submodules);
switch($submode)
{
+ case 'personal':
+ $template->assign_vars(array(
+ 'VIEW_EMAIL_YES' => ($user->data['user_viewemail ']) ? ' checked="checked"' : '',
+ 'VIEW_EMAIL_NO' => (!$user->data['user_viewemail ']) ? ' checked="checked"' : '',
+ 'DATE_FORMAT' => $user->data['user_dateformat'],
+
+ 'S_LANG_OPTIONS' => language_select($user->data['user_lang']),
+ 'S_STYLE_OPTIONS' => style_select($user->data['user_style']),
+ 'S_TZ_OPTIONS' => tz_select($user->data['user_timezone']),)
+ );
+ break;
+
case 'view':
break;
@@ -54,10 +64,10 @@ class ucp_prefs extends ucp
'S_DISPLAY_' . strtoupper($submode) => true,
'S_HIDDEN_FIELDS' => $s_hidden_fields,
- 'S_UCP_ACTION' => "ucp.$phpEx$SID&amp;module_id=$module_id&amp;mode=$submode")
+ 'S_UCP_ACTION' => "ucp.$phpEx$SID&amp;i=$id&amp;mode=$submode")
);
- ucp::output($user->lang['UCP_PROFILE'], 'ucp_prefs.html');
+ $this->output($user->lang['UCP_PROFILE'], 'ucp_prefs.html');
}
}