diff options
| author | James Atkinson <thefinn@users.sourceforge.net> | 2003-03-04 17:52:50 +0000 |
|---|---|---|
| committer | James Atkinson <thefinn@users.sourceforge.net> | 2003-03-04 17:52:50 +0000 |
| commit | fd629c7a9ff83de74635b403de31c42c65860ab1 (patch) | |
| tree | 734b05a784fcf87500fafb2f9d9a3b6a3eeca545 /phpBB/ucp.php | |
| parent | c5b9e64505ee45e416a77bb988101c340be0dfa9 (diff) | |
| download | forums-fd629c7a9ff83de74635b403de31c42c65860ab1.tar forums-fd629c7a9ff83de74635b403de31c42c65860ab1.tar.gz forums-fd629c7a9ff83de74635b403de31c42c65860ab1.tar.bz2 forums-fd629c7a9ff83de74635b403de31c42c65860ab1.tar.xz forums-fd629c7a9ff83de74635b403de31c42c65860ab1.zip | |
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
Diffstat (limited to 'phpBB/ucp.php')
| -rwxr-xr-x | phpBB/ucp.php | 41 |
1 files changed, 36 insertions, 5 deletions
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 @@ -<?php +<?php /*************************************************************************** * ucp.php * ------------------- @@ -84,6 +84,10 @@ if($_GET['mode'] || $_POST['mode']) include($phpbb_root_path . 'ucp/usercp_viewprofile.'.$phpEx); exit; } + else if($mode == 'activate') + { + include($phpbb_root_path . 'ucp/usercp_activate.'.$phpEx); + } else if($mode == 'register') { if($user->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 |
