aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/admin
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/admin')
-rw-r--r--phpBB/admin/admin_board.php10
-rw-r--r--phpBB/admin/admin_db_utilities.php36
-rw-r--r--phpBB/admin/admin_forum_prune.php14
-rw-r--r--phpBB/admin/admin_forumauth.php93
-rw-r--r--phpBB/admin/admin_forums.php28
-rw-r--r--phpBB/admin/admin_groupauth.php28
-rw-r--r--phpBB/admin/admin_groups.php54
-rw-r--r--phpBB/admin/admin_userauth.php67
-rw-r--r--phpBB/admin/admin_users.php20
9 files changed, 217 insertions, 133 deletions
diff --git a/phpBB/admin/admin_board.php b/phpBB/admin/admin_board.php
index 0715123f27..86a77ebc0c 100644
--- a/phpBB/admin/admin_board.php
+++ b/phpBB/admin/admin_board.php
@@ -41,19 +41,15 @@ init_userprefs($userdata);
//
// End session management
//
-
-//
-// Check user permissions
-//
if( !$userdata['session_logged_in'] )
{
- header("Location: ../login.$phpEx?forward_page=/admin");
+ header("Location: ../login.$phpEx?forward_page=admin/");
}
else if( $userdata['user_level'] != ADMIN )
{
- message_die(GENERAL_MESSAGE, "You are not authorised to administer this board");
+ message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}
-$template_header = "admin/page_header.tpl";
+
include('page_header_admin.'.$phpEx);
$mode = ($HTTP_GET_VARS['mode']) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
diff --git a/phpBB/admin/admin_db_utilities.php b/phpBB/admin/admin_db_utilities.php
index ef4e9da39a..5004377487 100644
--- a/phpBB/admin/admin_db_utilities.php
+++ b/phpBB/admin/admin_db_utilities.php
@@ -46,29 +46,18 @@ include($phpbb_root_path . 'common.'.$phpEx);
//
$userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length);
init_userprefs($userdata);
-//
-// End sessionmanagement
//
-
-//
-// Check user permissions
+// End session management
//
if( !$userdata['session_logged_in'] )
{
- header("Location: ../login.$phpEx?forward_page=/admin/");
+ header("Location: ../login.$phpEx?forward_page=admin/");
}
else if( $userdata['user_level'] != ADMIN )
{
- message_die(GENERAL_MESSAGE, "You are not authorised to administer this board");
+ message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}
-//
-// Define Template files...
-//
-$template->set_filenames(array(
- "body" => "admin/db_utilities_body.tpl")
-);
-
//
// Set VERBOSE to 1 for debugging info..
//
@@ -854,23 +843,24 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
case 'restore':
if(!isset($restore_start))
{
+ //
+ // Define Template files...
+ //
+ $template->set_filenames(array(
+ "body" => "admin/db_utils_restore_body.tpl")
+ );
+
//
// Page header
//
$template_header = "admin/page_header.tpl";
include('page_header_admin.'.$phpEx);
- $db_message = "<H2>This will perform a full restore of a previously Backed up phpBB database</H2><BR>\n";
- $db_message .= "<P><b>WARNING: This will overwrite any existing data</b><br>\n";
- $db_links = "<FORM ENCTYPE=\"multipart/form-data\" METHOD=\"post\" ACTION=\"" . append_sid($PHP_SELF) . "\">\n";
- $db_links .= "<INPUT TYPE=\"hidden\" NAME=\"perform\" VALUE=\"restore\">\n";
- $db_links .= "Backup File:<INPUT TYPE=\"file\" NAME=\"backup_file\">\n";
- $db_links .= "<INPUT TYPE=\"submit\" NAME=\"restore_start\" VALUE=\"Start Restore\">\n";
- $db_links .= "</FORM></P>\n";
+ $s_hidden_fields = "<input type=\"hidden\" name=\"perform\" value=\"restore\">";
$template->assign_vars(array(
- "U_DB_MESSAGE" => $db_message,
- "U_DB_LINKS" => $db_links)
+ "S_DBRESTORE_ACTION" => append_sid("admin_db_utilities.$phpEx"),
+ "S_HIDDEN_FIELDS" => $s_hidden_fields)
);
$template->pparse("body");
diff --git a/phpBB/admin/admin_forum_prune.php b/phpBB/admin/admin_forum_prune.php
index ac6a9a84bb..5f3b90d024 100644
--- a/phpBB/admin/admin_forum_prune.php
+++ b/phpBB/admin/admin_forum_prune.php
@@ -38,9 +38,7 @@ if( $setmodules == 1 )
return;
}
-//
-// Now include the relevant files.
-//
+
$phpbb_root_path = "./../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
@@ -51,20 +49,16 @@ include($phpbb_root_path . 'includes/prune.'.$phpEx);
//
$userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length);
init_userprefs($userdata);
-//
-// End sessionmanagement
-//
-
//
-// Check user permissions
+// End session management
//
if( !$userdata['session_logged_in'] )
{
- header("Location: ../login.$phpEx?forward_page=/admin/");
+ header("Location: ../login.$phpEx?forward_page=admin/");
}
else if( $userdata['user_level'] != ADMIN )
{
- message_die(GENERAL_MESSAGE, "You are not authorised to administer this board");
+ message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}
//
diff --git a/phpBB/admin/admin_forumauth.php b/phpBB/admin/admin_forumauth.php
index feb76a1cb3..2f6950236e 100644
--- a/phpBB/admin/admin_forumauth.php
+++ b/phpBB/admin/admin_forumauth.php
@@ -25,7 +25,7 @@
if($setmodules == 1)
{
$filename = basename(__FILE__);
- $module['Auth']['Forums'] = $filename;
+ $module['Forums']['Permissions'] = $filename;
return;
}
@@ -48,55 +48,46 @@ init_userprefs($userdata);
//
if( !$userdata['session_logged_in'] )
{
- header("Location: ../login.$phpEx?forward_page=/admin");
+ header("Location: ../login.$phpEx?forward_page=admin/");
}
else if( $userdata['user_level'] != ADMIN )
{
- message_die(GENERAL_MESSAGE, "You are not authorised to administer this board");
+ message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}
//
// Start program - define vars
//
$simple_auth_ary = array(
- 0 => array(0, 0, 0, 0, 1, 1, 3, 3),
- 1 => array(0, 0, 0, 0, 3, 3, 3, 3),
- 2 => array(0, 0, 1, 1, 1, 1, 3, 3),
- 3 => array(1, 1, 1, 1, 1, 1, 3, 3),
- 4 => array(0, 2, 2, 2, 2, 2, 2, 3),
- 5 => array(2, 2, 2, 2, 2, 2, 2, 3),
- 6 => array(0, 3, 3, 3, 3, 3, 3, 3),
- 7 => array(3, 3, 3, 3, 3, 3, 3, 3),
- 8 => array(0, 0, 3, 0, 1, 1, 3, 3),
- 9 => array(0, 0, 3, 1, 1, 1, 3, 3)
+ 0 => array(0, 0, 0, 0, 1, 1, 1, 3),
+ 1 => array(0, 0, 1, 1, 1, 1, 1, 3),
+ 2 => array(1, 1, 1, 1, 1, 1, 1, 3),
+ 3 => array(0, 2, 2, 2, 2, 2, 2, 3),
+ 4 => array(2, 2, 2, 2, 2, 2, 2, 3),
+ 5 => array(0, 3, 3, 3, 3, 3, 3, 3),
+ 6 => array(3, 3, 3, 3, 3, 3, 3, 3),
);
-$simple_auth_types = array("Public", "Test Restricted", "Registered", "Registered [Hidden]", "Private", "Private [Hidden]", "Moderators", "Moderators [Hidden]", "Moderator Post + All Reply", "Moderator Post + Reg Reply");
+$simple_auth_types = array($lang['Public'], $lang['Registered'], $lang['Registered'] . " [" . $lang['Hidden'] . "]", $lang['Private'], $lang['Private'] . " [" . $lang['Hidden'] . "]", $lang['Moderators'], $lang['Moderators'] . " [" . $lang['Hidden'] . "]");
$forum_auth_fields = array("auth_view", "auth_read", "auth_post", "auth_reply", "auth_edit", "auth_delete", "auth_sticky", "auth_announce");
-$forum_auth_levels = array("ALL", "REG", "ACL", "MOD", "ADMIN");
-$forum_auth_const = array(AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN);
-// Future Stuff
-/*$simple_auth_ary = array(
- 0 => array(0, 0, 0, 0, 1, 0, 3, 3, 0, 0, 0),
- 1 => array(0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3),
- 2 => array(0, 0, 1, 1, 1, 1, 3, 3, 1, 1, 1),
- 3 => array(1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1),
- 4 => array(0, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2),
- 5 => array(2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2),
- 6 => array(0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
- 7 => array(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
- 8 => array(0, 0, 3, 0, 0, 0, 3, 3, 3, 3, 3),
- 9 => array(0, 0, 3, 1, 0, 0, 3, 3, 3, 3, 3)
-);*/
-//, "auth_votecreate", "auth_vote", "auth_attachments"
+$field_names = array(
+ "auth_view" => $lang['View'],
+ "auth_read" => $lang['Read'],
+ "auth_post" => $lang['Post'],
+ "auth_reply" => $lang['Reply'],
+ "auth_edit" => $lang['Edit'],
+ "auth_delete" => $lang['Delete'],
+ "auth_sticky" => $lang['Sticky'],
+ "auth_announce" => $lang['Announce']);
+$forum_auth_levels = array("ALL", "REG", "ACL", "MOD", "ADMIN");
+$forum_auth_const = array(AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN);
if(isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL]))
{
$forum_id = (isset($HTTP_POST_VARS[POST_FORUM_URL])) ? $HTTP_POST_VARS[POST_FORUM_URL] : $HTTP_GET_VARS[POST_FORUM_URL];
-
$forum_sql = "AND forum_id = $forum_id";
}
else
@@ -105,15 +96,18 @@ else
$forum_sql = "";
}
-if(isset($HTTP_GET_VARS['adv']))
+if( isset($HTTP_GET_VARS['adv']) )
{
$adv = $HTTP_GET_VARS['adv'];
}
else
{
- $adv = -1;
+ unset($adv);
}
+//
+// Start program proper
+//
if(isset($HTTP_POST_VARS['submit']))
{
$sql = "";
@@ -193,7 +187,6 @@ $forum_rows = $db->sql_fetchrowset($f_result);
//
// Page header
//
-$template_header = "admin/page_header.tpl";
include('page_header_admin.'.$phpEx);
if(empty($forum_id))
@@ -203,7 +196,7 @@ if(empty($forum_id))
// specified
//
$template->set_filenames(array(
- "body" => "admin/forum_auth_select_body.tpl")
+ "body" => "admin/auth_select_body.tpl")
);
$select_list = "<select name=\"" . POST_FORUM_URL . "\">";
@@ -214,8 +207,13 @@ if(empty($forum_id))
$select_list .= "</select>";
$template->assign_vars(array(
- "S_FORUMAUTH_ACTION" => append_sid("admin_forumauth.$phpEx"),
- "S_FORUMS_SELECT" => $select_list)
+ "L_AUTH_TITLE" => $lang['Forum'] . " " . $lang['Auth_Control'],
+ "L_AUTH_EXPLAIN" => $lang['Forum_auth_explain'],
+ "L_AUTH_SELECT" => $lang['Select_a'] . " " . $lang['Forum'],
+ "L_LOOK_UP" => $lang['Look_up'] . " " . $lang['Forum'],
+
+ "S_AUTH_ACTION" => append_sid("admin_forumauth.$phpEx"),
+ "S_AUTH_SELECT" => $select_list)
);
}
@@ -226,7 +224,7 @@ else
// specified
//
$template->set_filenames(array(
- "body" => "admin/forum_auth_body.tpl")
+ "body" => "admin/auth_forum_body.tpl")
);
$forum_name = $forum_rows[0]['forum_name'];
@@ -252,14 +250,14 @@ else
// If we didn't get a match above then we
// automatically switch into 'advanced' mode
//
- if($adv == -1 && !$matched)
+ if(!isset($adv) && !$matched)
{
$adv = 1;
}
$s_column_span == 0;
- if( $adv <= 0 )
+ if( empty($adv) )
{
$simple_auth = "&nbsp;<select name=\"simpleauth\">";
@@ -280,7 +278,7 @@ else
$simple_auth .= "</select>&nbsp;";
$template->assign_block_vars("forum_auth_titles", array(
- "CELL_TITLE" => "Simple Mode")
+ "CELL_TITLE" => $lang['Simple_mode'])
);
$template->assign_block_vars("forum_auth_data", array(
"S_AUTH_LEVELS_SELECT" => $simple_auth)
@@ -313,8 +311,10 @@ else
}
$custom_auth[$j] .= "</select>&nbsp;";
+ $cell_title = $field_names[$forum_auth_fields[$j]];
+
$template->assign_block_vars("forum_auth_titles", array(
- "CELL_TITLE" => ucfirst(preg_replace("/auth_/", "", $forum_auth_fields[$j])))
+ "CELL_TITLE" => $cell_title)
);
$template->assign_block_vars("forum_auth_data", array(
"S_AUTH_LEVELS_SELECT" => $custom_auth[$j])
@@ -325,8 +325,8 @@ else
}
$switch_mode = "admin_forumauth.$phpEx?" . POST_FORUM_URL . "=" . $forum_id . "&adv=";
- $switch_mode .= ($adv <= 0 ) ? "1" : "0";
- $switch_mode_text = ($adv <= 0 ) ? "Advanced Mode" : "Simple Mode";
+ $switch_mode .= ( empty($adv) ) ? "1" : "0";
+ $switch_mode_text = ( empty($adv) ) ? $lang['Advanced_mode'] : $lang['Simple_mode'];
$u_switch_mode = '<a href="' . $switch_mode . '">' . $switch_mode_text . '</a>';
$s_hidden_fields = '<input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '">';
@@ -334,6 +334,11 @@ else
$template->assign_vars(array(
"FORUM_NAME" => $forum_name,
+ "L_AUTH_TITLE" => $lang['Forum'] . " " . $lang['Auth_Control'],
+ "L_AUTH_EXPLAIN" => $lang['Forum_auth_explain'],
+ "L_SUBMIT_CHANGES" => $lang['Submit_changes'],
+ "L_RESET_CHANGES" => $lang['Reset_changes'],
+
"U_FORUMAUTH_ACTION" => append_sid("admin_forumauth.$phpEx?" . POST_FORUM_URL . "=$forum_id"),
"U_SWITCH_MODE" => $u_switch_mode,
diff --git a/phpBB/admin/admin_forums.php b/phpBB/admin/admin_forums.php
index 171ab3e9ae..e21f26972c 100644
--- a/phpBB/admin/admin_forums.php
+++ b/phpBB/admin/admin_forums.php
@@ -25,18 +25,34 @@
if( $setmodules == 1 )
{
$filename = basename(__FILE__);
- $module['Forums']['add'] = "$filename?mode=add";
- $module['Forums']['edit'] = "$filename?mode=edit";
- $module['Forums']['delete'] = "$filename?mode=delete";
+ $module['Forums']['Add_new'] = "$filename?mode=add";
+ $module['Forums']['Manage'] = "$filename?mode=manage";
return;
}
-print "Got past the \$setmodules check<br>\n";
-print "Requested action was: $mode<br>\n";
-
$phpbb_root_path = "./../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
+//
+// Start session management
+//
+$userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length);
+init_userprefs($userdata);
+//
+// End session management
+//
+if( !$userdata['session_logged_in'] )
+{
+ header("Location: ../login.$phpEx?forward_page=admin/");
+}
+else if( $userdata['user_level'] != ADMIN )
+{
+ message_die(GENERAL_MESSAGE, $lang['Not_admin']);
+}
+
+print "Got past the \$setmodules check<br>\n";
+print "Requested action was: $mode<br>\n";
+
?> \ No newline at end of file
diff --git a/phpBB/admin/admin_groupauth.php b/phpBB/admin/admin_groupauth.php
index 31648433d1..5f56e05d4d 100644
--- a/phpBB/admin/admin_groupauth.php
+++ b/phpBB/admin/admin_groupauth.php
@@ -25,7 +25,7 @@
if($setmodules == 1)
{
$filename = basename(__FILE__);
- $module['Auth']['Groups'] = $filename;
+ $module['Groups']['Permissions'] = $filename;
return;
}
@@ -44,11 +44,11 @@ init_userprefs($userdata);
//
if( !$userdata['session_logged_in'] )
{
- header("Location: ../login.$phpEx?forward_page=/admin");
+ header("Location: ../login.$phpEx?forward_page=admin/");
}
else if( $userdata['user_level'] != ADMIN )
{
- message_die(GENERAL_MESSAGE, "You are not authorised to administer this board");
+ message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}
//
@@ -550,14 +550,17 @@ else if(empty($HTTP_GET_VARS[POST_GROUPS_URL]))
include('page_header_admin.'.$phpEx);
$template->set_filenames(array(
- "body" => "admin/ug_auth_select_body.tpl")
+ "body" => "admin/auth_select_body.tpl")
);
$template->assign_vars(array(
- "L_USER_OR_GROUP" => "Group",
+ "L_AUTH_TITLE" => $lang['Group'] . " " . $lang['Auth_Control'],
+ "L_AUTH_EXPLAIN" => $lang['Group_auth_explain'],
+ "L_AUTH_SELECT" => $lang['Select_a'] . " " . $lang['Group'],
+ "L_LOOK_UP" => $lang['Look_up'] . " " . $lang['Group'],
- "S_USERAUTH_ACTION" => append_sid("admin_groupauth.$phpEx"),
- "S_USERS_SELECT" => $select_list)
+ "S_AUTH_ACTION" => append_sid("admin_groupauth.$phpEx"),
+ "S_AUTH_SELECT" => $select_list)
);
}
@@ -580,7 +583,7 @@ else
include('page_header_admin.'.$phpEx);
$template->set_filenames(array(
- "body" => "admin/ug_auth_body.tpl")
+ "body" => "admin/auth_ug_body.tpl")
);
//
@@ -904,9 +907,12 @@ else
"USERNAME" => $t_groupname,
"USER_GROUP_MEMBERSHIPS" => "This group has the following members: $t_usergroup_list",
- "L_USER_OR_GROUPNAME" => "Group name",
- "L_USER_OR_GROUP" => "Group",
-
+ "L_USER_OR_GROUPNAME" => $lang['Group_name'],
+ "L_AUTH_TITLE" => $lang['User'] . " " . $lang['Auth_Control'],
+ "L_AUTH_EXPLAIN" => $lang['User_auth_explain'],
+ "L_PERMISSIONS" => $lang['Permissions'],
+ "L_SUBMIT_CHANGES" => $lang['Submit_changes'],
+ "L_RESET_CHANGES" => $lang['Reset_changes'],
"U_USER_OR_GROUP" => append_sid("admin_groupauth.$phpEx"),
"U_SWITCH_MODE" => $u_switch_mode,
diff --git a/phpBB/admin/admin_groups.php b/phpBB/admin/admin_groups.php
new file mode 100644
index 0000000000..61f41e160f
--- /dev/null
+++ b/phpBB/admin/admin_groups.php
@@ -0,0 +1,54 @@
+<?php
+/***************************************************************************
+ *
+ * -------------------
+ * begin : Saturday, Feb 13, 2001
+ * copyright : (C) 2001 The phpBB Group
+ * email : support@phpbb.com
+ *
+ * $Id$
+ *
+ *
+ ***************************************************************************/
+
+
+/***************************************************************************
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ *
+ ***************************************************************************/
+
+if($setmodules == 1)
+{
+ $filename = basename(__FILE__);
+ $module['Groups']['Manage'] = $filename;
+
+ return;
+}
+
+$phpbb_root_path = "./../";
+include($phpbb_root_path . 'extension.inc');
+include($phpbb_root_path . 'common.'.$phpEx);
+
+//
+// Start session management
+//
+$userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length);
+init_userprefs($userdata);
+//
+// End session management
+//
+if( !$userdata['session_logged_in'] )
+{
+ header("Location: ../login.$phpEx?forward_page=admin/");
+}
+else if( $userdata['user_level'] != ADMIN )
+{
+ message_die(GENERAL_MESSAGE, $lang['Not_admin']);
+}
+
+?> \ No newline at end of file
diff --git a/phpBB/admin/admin_userauth.php b/phpBB/admin/admin_userauth.php
index 19027be152..90d0742013 100644
--- a/phpBB/admin/admin_userauth.php
+++ b/phpBB/admin/admin_userauth.php
@@ -25,7 +25,7 @@
if($setmodules == 1)
{
$filename = basename(__FILE__);
- $module['Auth']['Users'] = $filename;
+ $module['Users']['Permissions'] = $filename;
return;
}
@@ -44,16 +44,18 @@ init_userprefs($userdata);
//
if( !$userdata['session_logged_in'] )
{
- header("Location: ../login.$phpEx?forward_page=/admin");
+ header("Location: ../login.$phpEx?forward_page=admin/");
}
else if( $userdata['user_level'] != ADMIN )
{
- message_die(GENERAL_MESSAGE, "You are not authorised to administer this board");
+ message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}
//
// Start program - define vars
//
+$forum_auth_fields = array("auth_view", "auth_read", "auth_post", "auth_reply", "auth_edit", "auth_delete", "auth_sticky", "auth_announce");
+
$auth_field_match = array(
"auth_view" => AUTH_VIEW,
"auth_read" => AUTH_READ,
@@ -64,25 +66,18 @@ $auth_field_match = array(
"auth_sticky" => AUTH_STICKY,
"auth_announce" => AUTH_ANNOUNCE);
-$forum_auth_fields = array("auth_view", "auth_read", "auth_post", "auth_reply", "auth_edit", "auth_delete", "auth_sticky", "auth_announce");
+$field_names = array(
+ "auth_view" => $lang['View'],
+ "auth_read" => $lang['Read'],
+ "auth_post" => $lang['Post'],
+ "auth_reply" => $lang['Reply'],
+ "auth_edit" => $lang['Edit'],
+ "auth_delete" => $lang['Delete'],
+ "auth_sticky" => $lang['Sticky'],
+ "auth_announce" => $lang['Announce']);
$forum_auth_key_fields = array("auth_view", "auth_read", "auth_post", "auth_reply");
-//
-// Future stuff
-//
-//, "auth_votecreate", "auth_vote", "auth_attachments", "auth_allow_html", "auth_allow_bbcode", "auth_allow_smilies"
-//
-/* ,
- "auth_vote" => AUTH_VOTE,
- "auth_votecreate" => AUTH_VOTECREATE,
- "auth_attachments" => AUTH_ATTACH,
-
- "auth_allow_html" => AUTH_ALLOW_HTML
- "auth_allow_bbcode" => AUTH_ALLOW_BBCODE
- "auth_allow_smilies" => AUTH_ALLOW_SMILIES
-);*/
-
// ---------------
// Start Functions
@@ -613,14 +608,17 @@ else if(empty($HTTP_GET_VARS[POST_USERS_URL]))
include('page_header_admin.'.$phpEx);
$template->set_filenames(array(
- "body" => "admin/ug_auth_select_body.tpl")
+ "body" => "admin/auth_select_body.tpl")
);
$template->assign_vars(array(
- "L_USER_OR_GROUP" => "User",
+ "L_AUTH_TITLE" => $lang['User'] . " " . $lang['Auth_Control'],
+ "L_AUTH_EXPLAIN" => $lang['User_auth_explain'],
+ "L_AUTH_SELECT" => $lang['Select_a'] . " " . $lang['User'],
+ "L_LOOK_UP" => $lang['Look_up'] . " " . $lang['User'],
- "S_USERAUTH_ACTION" => append_sid("admin_userauth.$phpEx"),
- "S_USERS_SELECT" => $select_list)
+ "S_AUTH_ACTION" => append_sid("admin_userauth.$phpEx"),
+ "S_AUTH_SELECT" => $select_list)
);
}
@@ -643,7 +641,7 @@ else
include('page_header_admin.'.$phpEx);
$template->set_filenames(array(
- "body" => "admin/ug_auth_body.tpl")
+ "body" => "admin/auth_ug_body.tpl")
);
@@ -947,7 +945,7 @@ else
if(!$adv)
{
$template->assign_block_vars("acltype", array(
- "L_UG_ACL_TYPE" => "Simple Auth Setting")
+ "L_UG_ACL_TYPE" => $lang['Simple_Permission'])
);
$s_column_span++;
}
@@ -955,24 +953,33 @@ else
{
for($i = 0; $i < count($forum_auth_fields); $i++)
{
+ $cell_title = $field_names[$forum_auth_fields[$i]];
+
$template->assign_block_vars("acltype", array(
- "L_UG_ACL_TYPE" => ucfirst(preg_replace("/auth_/", "", $forum_auth_fields[$i])))
+ "L_UG_ACL_TYPE" => $cell_title)
);
$s_column_span++;
}
}
$switch_mode = "admin_userauth.$phpEx?" . POST_USERS_URL . "=" . $user_id . "&adv=";
- $switch_mode .= ( !$adv ) ? "1" : "0";
- $switch_mode_text = ( !$adv ) ? "Advanced Mode" : "Simple Mode";
+ $switch_mode .= ( empty($adv) ) ? "1" : "0";
+ $switch_mode_text = ( empty($adv) ) ? $lang['Advanced_mode'] : $lang['Simple_mode'];
$u_switch_mode = '<a href="' . $switch_mode . '">' . $switch_mode_text . '</a>';
$template->assign_vars(array(
"USERNAME" => $t_username,
"USER_GROUP_MEMBERSHIPS" => "This user is a $s_user_type and belongs to the following groups: $t_usergroup_list",
- "L_USER_OR_GROUPNAME" => "Username",
- "L_USER_OR_GROUP" => "User",
+ "L_USER_OR_GROUPNAME" => $lang['Username'],
+ "L_USER_OR_GROUP" => $lang['User'],
+
+ "L_AUTH_TITLE" => $lang['User'] . " " . $lang['Auth_Control'],
+ "L_AUTH_EXPLAIN" => $lang['User_auth_explain'],
+ "L_PERMISSIONS" => $lang['Permissions'],
+ "L_SUBMIT_CHANGES" => $lang['Submit_changes'],
+ "L_RESET_CHANGES" => $lang['Reset_changes'],
+ "L_MODERATOR_STATUS" => $lang['Moderator_status'],
"U_USER_OR_GROUP" => append_sid("admin_userauth.$phpEx"),
"U_SWITCH_MODE" => $u_switch_mode,
diff --git a/phpBB/admin/admin_users.php b/phpBB/admin/admin_users.php
index 10cf6a3f1a..4d9f87582c 100644
--- a/phpBB/admin/admin_users.php
+++ b/phpBB/admin/admin_users.php
@@ -25,14 +25,30 @@
if($setmodules == 1)
{
$filename = basename(__FILE__);
- $module['Users']['users'] = $filename;
+ $module['Users']['Manage'] = $filename;
return;
}
-
$phpbb_root_path = "./../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
+//
+// Start session management
+//
+$userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length);
+init_userprefs($userdata);
+//
+// End session management
+//
+if( !$userdata['session_logged_in'] )
+{
+ header("Location: ../login.$phpEx?forward_page=admin/");
+}
+else if( $userdata['user_level'] != ADMIN )
+{
+ message_die(GENERAL_MESSAGE, $lang['Not_admin']);
+}
+
?> \ No newline at end of file