diff options
| author | Henry Sudhof <kellanved@phpbb.com> | 2008-06-02 17:15:43 +0000 |
|---|---|---|
| committer | Henry Sudhof <kellanved@phpbb.com> | 2008-06-02 17:15:43 +0000 |
| commit | d0cd2152ff810e2cf724ea206b9a0934e08795e2 (patch) | |
| tree | 8f5f0a73b8bbba8ab44062f2ab51e8a7ae96e1ee /phpBB/includes | |
| parent | 8039c37b5126742c4170a8b17a645021f940f26a (diff) | |
| download | forums-d0cd2152ff810e2cf724ea206b9a0934e08795e2.tar forums-d0cd2152ff810e2cf724ea206b9a0934e08795e2.tar.gz forums-d0cd2152ff810e2cf724ea206b9a0934e08795e2.tar.bz2 forums-d0cd2152ff810e2cf724ea206b9a0934e08795e2.tar.xz forums-d0cd2152ff810e2cf724ea206b9a0934e08795e2.zip | |
give the ACP a login screen
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8581 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
| -rw-r--r-- | phpBB/includes/functions.php | 51 |
1 files changed, 42 insertions, 9 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 600506d08f..f45bfa57b3 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2234,7 +2234,7 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo */ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true) { - global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $config; + global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $phpbb_admin_path, $config; $err = ''; @@ -2243,6 +2243,16 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa { $user->setup(); } + + if (defined('ADMIN_START')) + { + // Set custom template for admin area + $template->set_custom_template($phpbb_admin_path . 'style', 'admin'); + $template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style'); + + // the acp template is never stored in the database + $user->theme['template_storedb'] = false; + } // Print out error if user tries to authenticate as an administrator without having the privileges... if ($admin && !$auth->acl_get('a_')) @@ -2447,20 +2457,43 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_ADMIN_AUTH' => $admin, + 'S_ACP_LOGIN' => defined('ADMIN_START'), 'USERNAME' => ($admin) ? $user->data['username'] : '', 'USERNAME_CREDENTIAL' => 'username', 'PASSWORD_CREDENTIAL' => ($admin) ? 'password_' . $credential : 'password', )); - - page_header($user->lang['LOGIN'], false); - - $template->set_filenames(array( - 'body' => 'login_body.html') - ); + + if (defined('ADMIN_START')) + { + $template->set_filenames(array( + 'body' => 'acp_login.html') + ); + $template->assign_block_vars('t_block1', array( + 'L_TITLE' => $user->lang['LOGIN'], + 'S_SELECTED' => true, + 'U_TITLE' => '', + )); + adm_page_header($user->lang['LOGIN'], false); + } + else + { + $template->set_filenames(array( + 'body' => 'login_body.html') + ); + page_header($user->lang['LOGIN'], false); + } + make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx")); - - page_footer(); + if (defined('ADMIN_START') && isset($user->data['session_admin']) && $user->data['session_admin']) + { + adm_page_footer(); + } + else + { + page_footer(); + } + } /** |
