From fd629c7a9ff83de74635b403de31c42c65860ab1 Mon Sep 17 00:00:00 2001 From: James Atkinson Date: Tue, 4 Mar 2003 17:52:50 +0000 Subject: Tons of work on the UCP, see my topic in the development forum for more info on the bigger changes. Registration should still work, the basic layout of the UCP is also done with the start on the profile settings area. git-svn-id: file:///svn/phpbb/trunk@3591 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/ucp.php | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) (limited to 'phpBB/ucp.php') diff --git a/phpBB/ucp.php b/phpBB/ucp.php index bb126ae290..898b561f6f 100755 --- a/phpBB/ucp.php +++ b/phpBB/ucp.php @@ -1,4 +1,4 @@ -data['user_id'] != ANONYMOUS) @@ -98,10 +102,31 @@ if($_GET['mode'] || $_POST['mode']) } } -// -// Include our module definition file. -// -include($phpbb_root_path . 'includes/ucp/usercp_modules.'.$phpEx); +// Database based module handing +$selected_module = ($_GET['module_id']) ? $_GET['module_id'] : $_POST['module_id']; +$sql = "SELECT module_id, module_name, module_filename FROM " . UCP_MODULES_TABLE . " ORDER BY module_order"; + +$result = $db->sql_query($sql); + +$rowset = $db->sql_fetchrowset($result); + +// Default UCP link +$template->assign_block_vars('ucp_sections', array('U_SECTION' => "ucp.$phpEx$SID", + 'SECTION' => $user->lang['UCP_Main'])); + +foreach($rowset as $section) +{ + $template->assign_block_vars('ucp_sections', array('U_SECTION' => "ucp.$phpEx$SID&module_id=" . $section['module_id'] , + 'SECTION' => $section['module_name'])); + + if($section['module_id'] == $selected_module) + { + $module_to_include = $section['module_filename'] . "." . $phpEx; + include($phpbb_root_path . $module_to_include); + } +} + + $page_title = $user->lang['User_control_panel'] . ' - ' . $this_section; @@ -112,6 +137,12 @@ $orig_word = array(); $replacement_word = array(); obtain_word_list($orig_word, $replacement_word); +$template->assign_vars(array('L_SUBSCRIBED_TOPICS' => $user->lang['SUBSCRIBED_TOPICS'], + 'L_SUBSCRIBED_FORUMS' => $user->lang['SUBSCRIBED_FORUMS'], + 'L_WELCOME_USERCP' => $user->lang['WELCOME_USERCP'], + 'UCP_WELCOME_MSG' => $user->lang['UCP_WELCOME_MESSAGE'], + 'L_ONLINE_BUDDIES' => $user->lang['ONLINE_BUDDIES'], + 'L_UNREAD_PM' => $user->lang['UNREAD_PM'])); // // Subscribed Topics -- cgit v1.2.1