aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_profile.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2003-10-01 17:24:53 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2003-10-01 17:24:53 +0000
commit860dc47114dc71ea108465d2fd882d25714bbfa4 (patch)
tree91e63d2bd0c792a7c3cfda1552466c8df502a74f /phpBB/includes/ucp/ucp_profile.php
parent64177fa87e905cf11ad3ab91469dd99f5399cf2f (diff)
downloadforums-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_profile.php')
-rw-r--r--phpBB/includes/ucp/ucp_profile.php41
1 files changed, 16 insertions, 25 deletions
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index f28c0a214a..8457b50bda 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -11,27 +11,18 @@
//
// -------------------------------------------------------------
-class ucp_profile extends ucp
+class ucp_profile extends module
{
- function main($id)
+ function ucp_profile($id, $mode)
{
global $censors, $config, $db, $user, $auth, $SID, $template, $phpbb_root_path, $phpEx;
- $submode = (isset($_GET['mode'])) ? htmlspecialchars($_GET['mode']) : 'reg_details';
- $preview = (isset($_POST['preview'])) ? true : false;
- $submit = (isset($_POST['submit'])) ? true : false;
- $delete = (isset($_POST['delete'])) ? true : false;
+ $preview = (!empty($_POST['preview'])) ? true : false;
+ $submit = (!empty($_POST['submit'])) ? true : false;
+ $delete = (!empty($_POST['delete'])) ? true : false;
$error = $data = array();
- $submodules['REG_DETAILS'] = "i=$id&amp;mode=reg_details";
- $submodules['PROFILE_INFO'] = "i=$id&amp;mode=profile_info";
- $submodules['SIGNATURE'] = "i=$id&amp;mode=signature";
- $submodules['AVATAR'] = "i=$id&amp;mode=avatar";
-
- $this->menu($id, $submodules, $submode);
- unset($submodules);
-
- switch ($submode)
+ switch ($mode)
{
case 'reg_details':
@@ -100,8 +91,8 @@ class ucp_profile extends ucp
update_username($user->data['username'], $username);
}
- meta_refresh(3, "ucp.$phpEx$SID&amp;i=$id&amp;mode=$submode");
- $message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&amp;i=$id&amp;mode=$submode\">", '</a>');
+ meta_refresh(3, "ucp.$phpEx$SID&amp;i=$id&amp;mode=$mode");
+ $message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&amp;i=$id&amp;mode=$mode\">", '</a>');
trigger_error($message);
}
}
@@ -195,8 +186,8 @@ class ucp_profile extends ucp
WHERE user_id = ' . $user->data['user_id'];
$db->sql_query($sql);
- meta_refresh(3, "ucp.$phpEx$SID&amp;i=$id&amp;mode=$submode");
- $message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&amp;i=$id&amp;mode=$submode\">", '</a>');
+ meta_refresh(3, "ucp.$phpEx$SID&amp;i=$id&amp;mode=$mode");
+ $message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&amp;i=$id&amp;mode=$mode\">", '</a>');
trigger_error($message);
}
}
@@ -294,7 +285,7 @@ class ucp_profile extends ucp
WHERE user_id = ' . $user->data['user_id'];
$db->sql_query($sql);
- $message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&amp;i=$id&amp;mode=$submode\">", '</a>');
+ $message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&amp;i=$id&amp;mode=$mode\">", '</a>');
trigger_error($message);
}
}
@@ -437,8 +428,8 @@ class ucp_profile extends ucp
}
}
- meta_refresh(3, "ucp.$phpEx$SID&amp;i=$id&amp;mode=$submode");
- $message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&amp;i=$id&amp;mode=$submode\">", '</a>');
+ meta_refresh(3, "ucp.$phpEx$SID&amp;i=$id&amp;mode=$mode");
+ $message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&amp;i=$id&amp;mode=$mode\">", '</a>');
trigger_error($message);
}
@@ -489,11 +480,11 @@ class ucp_profile 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&amp;i=$id&amp;mode=$submode")
+ 'S_UCP_ACTION' => "ucp.$phpEx$SID&amp;i=$id&amp;mode=$mode")
);
$this->display($user->lang['UCP_PROFILE'], 'ucp_profile.html');