aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2008-06-03 16:33:02 +0000
committerHenry Sudhof <kellanved@phpbb.com>2008-06-03 16:33:02 +0000
commit65fb840b761cb04d52bd03ef0d5ed20053ae16ba (patch)
treefa273e401ee711a6c5250fbb6b3fec617495ac44 /phpBB/adm
parent59e6bc27f1f1f91a5242074d216bc1f2de9fe45c (diff)
downloadforums-65fb840b761cb04d52bd03ef0d5ed20053ae16ba.tar
forums-65fb840b761cb04d52bd03ef0d5ed20053ae16ba.tar.gz
forums-65fb840b761cb04d52bd03ef0d5ed20053ae16ba.tar.bz2
forums-65fb840b761cb04d52bd03ef0d5ed20053ae16ba.tar.xz
forums-65fb840b761cb04d52bd03ef0d5ed20053ae16ba.zip
merge
git-svn-id: file:///svn/phpbb/trunk@8587 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/adm')
-rw-r--r--phpBB/adm/index.php12
-rwxr-xr-xphpBB/adm/style/acp_login.html46
-rw-r--r--phpBB/adm/style/overall_header.html6
3 files changed, 60 insertions, 4 deletions
diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php
index af5511f3b6..819e4a1a8f 100644
--- a/phpBB/adm/index.php
+++ b/phpBB/adm/index.php
@@ -28,10 +28,14 @@ $user->setup('acp/common');
// End session management
// Have they authenticated (again) as an admin for this session?
-if (!isset($user->data['session_admin']) || !$user->data['session_admin'])
+if ($user->data['user_id'] != ANONYMOUS && (!isset($user->data['session_admin']) || !$user->data['session_admin']))
{
login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false);
}
+else if ($user->data['user_id'] == ANONYMOUS)
+{
+ login_box('');
+}
// Is user any type of admin? No, then stop here, each script needs to
// check specific permissions but this is a catchall
@@ -108,7 +112,7 @@ function adm_page_header($page_title)
$template->assign_vars(array(
'PAGE_TITLE' => $page_title,
- 'USERNAME' => $user->data['username'],
+ 'USERNAME' => ($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : '',
'SID' => $SID,
'_SID' => $_SID,
@@ -116,9 +120,13 @@ function adm_page_header($page_title)
'ROOT_PATH' => PHPBB_ADMIN_PATH,
'U_LOGOUT' => append_sid('ucp', 'mode=logout'),
+ 'U_ADM_LOGOUT' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'action=admlogout'),
'U_ADM_INDEX' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT),
'U_INDEX' => append_sid('index'),
+ 'S_USER_ADMIN' => $user->data['session_admin'],
+ 'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS && !$user->data['is_bot']),
+
'T_IMAGES_PATH' => PHPBB_ROOT_PATH . 'images/',
'T_SMILIES_PATH' => PHPBB_ROOT_PATH . $config['smilies_path'] . '/',
'T_AVATAR_PATH' => PHPBB_ROOT_PATH . $config['avatar_path'] . '/',
diff --git a/phpBB/adm/style/acp_login.html b/phpBB/adm/style/acp_login.html
new file mode 100755
index 0000000000..015f3ec908
--- /dev/null
+++ b/phpBB/adm/style/acp_login.html
@@ -0,0 +1,46 @@
+<!-- INCLUDE overall_header.html -->
+<h1>{PAGE_TITLE}</h1>
+<p><!-- IF LOGIN_EXPLAIN -->{LOGIN_EXPLAIN}<!-- ELSE -->{L_LOGIN}<!-- ENDIF --></p>
+
+<!-- IF LOGIN_ERROR -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{LOGIN_ERROR}</p>
+ </div>
+<!-- ENDIF -->
+<form action="{S_LOGIN_ACTION}" method="post" id="login">
+
+ <fieldset>
+ <dl>
+ <dt><label for="{USERNAME_CREDENTIAL}">{L_USERNAME}:</label></dt>
+ <dd><input type="text" tabindex="1" name="{USERNAME_CREDENTIAL}" id="{USERNAME_CREDENTIAL}" size="25" value="{USERNAME}" class="inputbox autowidth" /></dd>
+ </dl>
+ <dl>
+ <dt><label for="{PASSWORD_CREDENTIAL}">{L_PASSWORD}:</label></dt>
+ <dd><input type="password" tabindex="2" id="{PASSWORD_CREDENTIAL}" name="{PASSWORD_CREDENTIAL}" size="25" class="inputbox autowidth" /></dd>
+ <!-- IF S_DISPLAY_FULL_LOGIN and (U_SEND_PASSWORD or U_RESEND_ACTIVATION) -->
+ <!-- IF U_SEND_PASSWORD --><dd><a href="{U_SEND_PASSWORD}">{L_FORGOT_PASS}</a></dd><!-- ENDIF -->
+ <!-- IF U_RESEND_ACTIVATION --><dd><a href="{U_RESEND_ACTIVATION}">{L_RESEND_ACTIVATION}</a></dd><!-- ENDIF -->
+ <!-- ENDIF -->
+ </dl>
+
+ <!-- IF S_CONFIRM_CODE -->
+ <dl>
+ <dt><label for="confirm_code">{L_CONFIRM_CODE}:</label><br /><span>{L_CONFIRM_CODE_EXPLAIN}</span></dt>
+ <dd><input type="hidden" name="confirm_id" value="{CONFIRM_ID}" />{CONFIRM_IMAGE}</dd>
+ <dd><input type="text" name="confirm_code" id="confirm_code" size="8" maxlength="8" tabindex="3" class="inputbox narrow" title="{L_CONFIRM_CODE}" /></dd>
+ </dl>
+ <!-- ENDIF -->
+
+ <p class="submit-buttons">
+ <!-- IF S_DISPLAY_FULL_LOGIN -->
+ <!-- IF S_AUTOLOGIN_ENABLED --><label for="autologin"><input type="checkbox" name="autologin" id="autologin" tabindex="4" /> {L_LOG_ME_IN}</label><!-- ENDIF -->
+ <label for="viewonline"><input type="checkbox" name="viewonline" id="viewonline" tabindex="5" /> {L_HIDE_ME}</label>
+ <!-- ENDIF -->
+ &nbsp;
+ {S_HIDDEN_FIELDS}<input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button1" />
+ </p>
+ </fieldset>
+</form>
+
+<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html
index e883e66d80..adafc0aa6d 100644
--- a/phpBB/adm/style/overall_header.html
+++ b/phpBB/adm/style/overall_header.html
@@ -181,11 +181,12 @@ function switch_menu()
<span class="corners-top"><span></span></span>
<div id="content">
<!-- IF not S_USER_NOTICE -->
- <div id="toggle">
+ <div id="toggle">
<a id="toggle-handle" accesskey="m" title="{L_MENU_TOGGLE}" onclick="switch_menu(); return false;" href="#"></a></div>
<!-- ENDIF -->
<div id="menu">
- <p>{L_LOGGED_IN_AS}<br /><strong>{USERNAME}</strong> [&nbsp;<a href="{U_LOGOUT}">{L_LOGOUT}</a>&nbsp;]</p>
+ <p><!-- IF S_USER_LOGGED_IN --> {L_LOGGED_IN_AS}<br /><strong>{USERNAME}</strong> [&nbsp;<a href="{U_LOGOUT}">{L_LOGOUT}</a>&nbsp;]<!-- ENDIF --><!-- IF S_USER_ADMIN -->[&nbsp;<a href="{U_ADM_LOGOUT}">{L_ADM_LOGOUT}</a>&nbsp;]<!-- ENDIF --></p>
+ <!-- IF S_USER_ADMIN -->
<ul>
<!-- BEGIN l_block1 -->
<!-- IF l_block1.S_SELECTED -->
@@ -203,6 +204,7 @@ function switch_menu()
<!-- ENDIF -->
<!-- END l_block1 -->
</ul>
+ <!-- ENDIF -->
</div>
<div id="main">