diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-10-01 17:24:53 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-10-01 17:24:53 +0000 |
commit | 860dc47114dc71ea108465d2fd882d25714bbfa4 (patch) | |
tree | 91e63d2bd0c792a7c3cfda1552466c8df502a74f /phpBB/includes/ucp/ucp_prefs.php | |
parent | 64177fa87e905cf11ad3ab91469dd99f5399cf2f (diff) | |
download | forums-860dc47114dc71ea108465d2fd882d25714bbfa4.tar forums-860dc47114dc71ea108465d2fd882d25714bbfa4.tar.gz forums-860dc47114dc71ea108465d2fd882d25714bbfa4.tar.bz2 forums-860dc47114dc71ea108465d2fd882d25714bbfa4.tar.xz forums-860dc47114dc71ea108465d2fd882d25714bbfa4.zip |
Change in format of module db data, add zebra, many things probably "damaged goods" for now ... don't panic Mr. Mainwaring, don't panic
git-svn-id: file:///svn/phpbb/trunk@4522 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp/ucp_prefs.php')
-rw-r--r-- | phpBB/includes/ucp/ucp_prefs.php | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index 61ca31a31c..d368188f01 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -11,25 +11,16 @@ // // ------------------------------------------------------------- -class ucp_prefs extends ucp +class ucp_prefs extends module { - function main($id) + function ucp_prefs($id, $mode) { global $censors, $config, $db, $user, $auth, $SID, $template, $phpbb_root_path, $phpEx; - $submode = (!empty($_REQUEST['mode'])) ? htmlspecialchars($_REQUEST['mode']) : 'personal'; $submit = (isset($_POST['submit'])) ? true : false; $error = $data = array(); - // Setup internal subsection display - $submodules['PERSONAL'] = "i=$id&mode=personal"; - $submodules['VIEW'] = "i=$id&mode=view"; - $submodules['POST'] = "i=$id&mode=post"; - - $this->menu($id, $submodules, $submode); - unset($submodules); - - switch($submode) + switch($mode) { case 'personal': @@ -84,8 +75,8 @@ class ucp_prefs extends ucp WHERE user_id = ' . $user->data['user_id']; $db->sql_query($sql); - meta_refresh(3, "ucp.$phpEx$SID&i=$id&mode=$submode"); - $message = $user->lang['PREFERENCES_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&i=$id&mode=$submode\">", '</a>'); + meta_refresh(3, "ucp.$phpEx$SID&i=$id&mode=$mode"); + $message = $user->lang['PREFERENCES_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&i=$id&mode=$mode\">", '</a>'); trigger_error($message); } } @@ -191,8 +182,8 @@ class ucp_prefs extends ucp WHERE user_id = ' . $user->data['user_id']; $db->sql_query($sql); - meta_refresh(3, "ucp.$phpEx$SID&i=$id&mode=$submode"); - $message = $user->lang['PREFERENCES_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&i=$id&mode=$submode\">", '</a>'); + meta_refresh(3, "ucp.$phpEx$SID&i=$id&mode=$mode"); + $message = $user->lang['PREFERENCES_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&i=$id&mode=$mode\">", '</a>'); trigger_error($message); } } @@ -294,8 +285,8 @@ class ucp_prefs extends ucp WHERE user_id = ' . $user->data['user_id']; $db->sql_query($sql); - meta_refresh(3, "ucp.$phpEx$SID&i=$id&mode=$submode"); - $message = $user->lang['PREFERENCES_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&i=$id&mode=$submode\">", '</a>'); + meta_refresh(3, "ucp.$phpEx$SID&i=$id&mode=$mode"); + $message = $user->lang['PREFERENCES_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&i=$id&mode=$mode\">", '</a>'); trigger_error($message); } } @@ -334,11 +325,11 @@ class ucp_prefs extends ucp } $template->assign_vars(array( - 'L_TITLE' => $user->lang['UCP_' . strtoupper($submode)], + 'L_TITLE' => $user->lang['UCP_' . strtoupper($mode)], - 'S_DISPLAY_' . strtoupper($submode) => true, + 'S_DISPLAY_' . strtoupper($mode) => true, 'S_HIDDEN_FIELDS' => $s_hidden_fields, - 'S_UCP_ACTION' => "ucp.$phpEx$SID&i=$id&mode=$submode") + 'S_UCP_ACTION' => "ucp.$phpEx$SID&i=$id&mode=$mode") ); $this->display($user->lang['UCP_PROFILE'], 'ucp_prefs.html'); |