mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Now showing: A ton of bug fixes and a complete overhaul of my admin code...
git-svn-id: file:///svn/phpbb/trunk@1402 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
fd9158ac75
commit
3c6e635bec
10 changed files with 109 additions and 88 deletions
|
@ -32,6 +32,7 @@ if($setmodules == 1)
|
||||||
// Load default header
|
// Load default header
|
||||||
//
|
//
|
||||||
$phpbb_root_dir = "./../";
|
$phpbb_root_dir = "./../";
|
||||||
|
$no_page_header = TRUE;
|
||||||
require('pagestart.inc');
|
require('pagestart.inc');
|
||||||
|
|
||||||
if( isset($HTTP_POST_VARS[POST_GROUPS_URL]) || isset($HTTP_GET_VARS[POST_GROUPS_URL]) )
|
if( isset($HTTP_POST_VARS[POST_GROUPS_URL]) || isset($HTTP_GET_VARS[POST_GROUPS_URL]) )
|
||||||
|
@ -48,6 +49,12 @@ if( isset($HTTP_POST_VARS['edit']) || isset($HTTP_POST_VARS['new']) )
|
||||||
//
|
//
|
||||||
// Ok they are editing a group or creating a new group
|
// Ok they are editing a group or creating a new group
|
||||||
//
|
//
|
||||||
|
include('page_header_admin.' . $phpEx);
|
||||||
|
|
||||||
|
$template->set_filenames(array(
|
||||||
|
"body" => "admin/group_edit_body.tpl")
|
||||||
|
);
|
||||||
|
|
||||||
if ( isset($HTTP_POST_VARS['edit']) )
|
if ( isset($HTTP_POST_VARS['edit']) )
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
@ -68,6 +75,7 @@ if( isset($HTTP_POST_VARS['edit']) || isset($HTTP_POST_VARS['new']) )
|
||||||
$group_info = $db->sql_fetchrow($result);
|
$group_info = $db->sql_fetchrow($result);
|
||||||
|
|
||||||
$mode = "editgroup";
|
$mode = "editgroup";
|
||||||
|
$template->assign_block_vars("group_edit", array());
|
||||||
|
|
||||||
}
|
}
|
||||||
else if( isset($HTTP_POST_VARS['new']) )
|
else if( isset($HTTP_POST_VARS['new']) )
|
||||||
|
@ -109,9 +117,7 @@ if( isset($HTTP_POST_VARS['edit']) || isset($HTTP_POST_VARS['new']) )
|
||||||
$group_closed = ( $group_info['group_type'] == GROUP_CLOSED ) ? "checked=\"checked\"" : "";
|
$group_closed = ( $group_info['group_type'] == GROUP_CLOSED ) ? "checked=\"checked\"" : "";
|
||||||
$group_hidden = ( $group_info['group_type'] == GROUP_HIDDEN ) ? "checked=\"checked\"" : "";
|
$group_hidden = ( $group_info['group_type'] == GROUP_HIDDEN ) ? "checked=\"checked\"" : "";
|
||||||
|
|
||||||
$template->set_filenames(array(
|
|
||||||
"body" => "admin/group_edit_body.tpl")
|
|
||||||
);
|
|
||||||
|
|
||||||
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />';
|
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />';
|
||||||
|
|
||||||
|
@ -119,7 +125,7 @@ if( isset($HTTP_POST_VARS['edit']) || isset($HTTP_POST_VARS['new']) )
|
||||||
"GROUP_NAME" => $group_info['group_name'],
|
"GROUP_NAME" => $group_info['group_name'],
|
||||||
"GROUP_DESCRIPTION" => $group_info['group_description'],
|
"GROUP_DESCRIPTION" => $group_info['group_description'],
|
||||||
|
|
||||||
"L_GROUP_TITLE" => $lang['Group'] . " " . $lang['Admin'],
|
"L_GROUP_TITLE" => $lang['Group_administration'],
|
||||||
"L_GROUP_EDIT_DELETE" => ( isset($HTTP_POST_VARS['new']) ) ? $lang['New_group'] : $lang['Edit_group'],
|
"L_GROUP_EDIT_DELETE" => ( isset($HTTP_POST_VARS['new']) ) ? $lang['New_group'] : $lang['Edit_group'],
|
||||||
"L_GROUP_NAME" => $lang['group_name'],
|
"L_GROUP_NAME" => $lang['group_name'],
|
||||||
"L_GROUP_DESCRIPTION" => $lang['group_description'],
|
"L_GROUP_DESCRIPTION" => $lang['group_description'],
|
||||||
|
@ -229,7 +235,13 @@ else if( isset($HTTP_POST_VARS['group_update']) )
|
||||||
message_die(GENERAL_ERROR, "Couldn't update group", "", __LINE__, __FILE__, $sql);
|
message_die(GENERAL_ERROR, "Couldn't update group", "", __LINE__, __FILE__, $sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
message_die(GENERAL_MESSAGE, $lang['Updated_group']);
|
$template->assign_vars(array(
|
||||||
|
"META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_groups.$phpEx") . '">')
|
||||||
|
);
|
||||||
|
|
||||||
|
$message = $lang['Updated_group'];
|
||||||
|
$message .= "<br />" . sprintf($lang['return_group_admin'], "<a href=\"" . append_sid("admin_groups.$phpEx") . "\">", "</a>");
|
||||||
|
message_die(GENERAL_MESSAGE, $message);
|
||||||
}
|
}
|
||||||
else if( $mode == "newgroup" )
|
else if( $mode == "newgroup" )
|
||||||
{
|
{
|
||||||
|
@ -250,7 +262,13 @@ else if( isset($HTTP_POST_VARS['group_update']) )
|
||||||
message_die(GENERAL_ERROR, "Couldn't insert new user-group info", "", __LINE__, __FILE__, $sql);
|
message_die(GENERAL_ERROR, "Couldn't insert new user-group info", "", __LINE__, __FILE__, $sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
message_die(GENERAL_MESSAGE, $lang['Added_new_group']);
|
$template->assign_vars(array(
|
||||||
|
"META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_groups.$phpEx") . '">')
|
||||||
|
);
|
||||||
|
|
||||||
|
$message = $lang['Added_new_group'];
|
||||||
|
$message .= "<br />" . sprintf($lang['return_group_admin'], "<a href=\"" . append_sid("admin_groups.$phpEx") . "\">", "</a>");
|
||||||
|
message_die(GENERAL_MESSAGE, $message);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -261,6 +279,8 @@ else if( isset($HTTP_POST_VARS['group_update']) )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
include('page_header_admin.' . $phpEx);
|
||||||
|
|
||||||
$sql = "SELECT group_id, group_name
|
$sql = "SELECT group_id, group_name
|
||||||
FROM " . GROUPS_TABLE . "
|
FROM " . GROUPS_TABLE . "
|
||||||
WHERE group_single_user <> " . TRUE . "
|
WHERE group_single_user <> " . TRUE . "
|
||||||
|
@ -280,10 +300,10 @@ else
|
||||||
);
|
);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
"L_GROUP_TITLE" => $lang['Group'] . " " . $lang['Admin'],
|
"L_GROUP_TITLE" => $lang['Group_administration'],
|
||||||
"L_GROUP_EXPLAIN" => $lang['Group_admin_explain'],
|
"L_GROUP_EXPLAIN" => $lang['Group_admin_explain'],
|
||||||
"L_GROUP_SELECT" => $lang['Select_a'] . " " . $lang['Group'],
|
"L_GROUP_SELECT" => $lang['Select_group'],
|
||||||
"L_LOOK_UP" => $lang['Look_up'] . " " . $lang['Group'],
|
"L_LOOK_UP" => $lang['Look_up_group'],
|
||||||
"L_CREATE_NEW_GROUP" => $lang['New_group'],
|
"L_CREATE_NEW_GROUP" => $lang['New_group'],
|
||||||
|
|
||||||
"S_GROUP_ACTION" => append_sid("admin_groups.$phpEx"),
|
"S_GROUP_ACTION" => append_sid("admin_groups.$phpEx"),
|
||||||
|
|
|
@ -31,6 +31,7 @@ if($setmodules == 1)
|
||||||
// Let's set the root dir for phpBB
|
// Let's set the root dir for phpBB
|
||||||
//
|
//
|
||||||
$phpbb_root_dir = "./../";
|
$phpbb_root_dir = "./../";
|
||||||
|
$no_page_header = TRUE;
|
||||||
require('pagestart.inc');
|
require('pagestart.inc');
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,6 +66,7 @@ if( $mode != "" )
|
||||||
//
|
//
|
||||||
// They want to add a new rank, show the form.
|
// They want to add a new rank, show the form.
|
||||||
//
|
//
|
||||||
|
include('page_header_admin.' . $phpEx);
|
||||||
|
|
||||||
$rank_id = ( isset($HTTP_GET_VARS['id']) ) ? intval($HTTP_GET_VARS['id']) : 0;
|
$rank_id = ( isset($HTTP_GET_VARS['id']) ) ? intval($HTTP_GET_VARS['id']) : 0;
|
||||||
|
|
||||||
|
@ -193,7 +195,7 @@ if( $mode != "" )
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
"META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_ranks.$phpEx") . '">')
|
"META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_ranks.$phpEx") . '">')
|
||||||
);
|
);
|
||||||
$message .= "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("admin_ranks.$phpEx") . "\">" . $lang['Here'] . "</a> " . $lang['return_rank_admin'];
|
$message .= "<br />" . sprintf($lang['return_rank_admin'], "<a href=\"" . append_sid("admin_ranks.$phpEx") . "\">", "</a>");
|
||||||
message_die(GENERAL_MESSAGE, $message);
|
message_die(GENERAL_MESSAGE, $message);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -225,7 +227,8 @@ if( $mode != "" )
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
"META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_ranks.$phpEx") . '">')
|
"META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_ranks.$phpEx") . '">')
|
||||||
);
|
);
|
||||||
$message = $lang['Rank_removed'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("admin_ranks.$phpEx") . "\">" . $lang['Here'] . "</a> " . $lang['return_rank_admin'];
|
$message = $lang['Rank_removed'];
|
||||||
|
$message .= "<br />" . sprintf($lang['return_rank_admin'], "<a href=\"" . append_sid("admin_ranks.$phpEx") . "\">", "</a>");
|
||||||
message_die(GENERAL_MESSAGE, $message);
|
message_die(GENERAL_MESSAGE, $message);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -242,6 +245,7 @@ if( $mode != "" )
|
||||||
//
|
//
|
||||||
// They didn't feel like giving us any information. Oh, too bad, we'll just display the
|
// They didn't feel like giving us any information. Oh, too bad, we'll just display the
|
||||||
// list then...
|
// list then...
|
||||||
|
include('page_header_admin.' . $phpEx);
|
||||||
|
|
||||||
$template->set_filenames(array(
|
$template->set_filenames(array(
|
||||||
"body" => "admin/ranks_list_body.tpl")
|
"body" => "admin/ranks_list_body.tpl")
|
||||||
|
@ -309,6 +313,7 @@ else
|
||||||
//
|
//
|
||||||
// Show the default page
|
// Show the default page
|
||||||
//
|
//
|
||||||
|
include('page_header_admin.' . $phpEx);
|
||||||
|
|
||||||
$template->set_filenames(array(
|
$template->set_filenames(array(
|
||||||
"body" => "admin/ranks_list_body.tpl")
|
"body" => "admin/ranks_list_body.tpl")
|
||||||
|
|
|
@ -30,8 +30,12 @@ if($setmodules == 1)
|
||||||
|
|
||||||
//
|
//
|
||||||
// Load default header
|
// Load default header
|
||||||
|
// We need to tell the pagestart file not to load page headers
|
||||||
|
// because of the use of META tags.
|
||||||
//
|
//
|
||||||
|
|
||||||
$phpbb_root_dir = "./../";
|
$phpbb_root_dir = "./../";
|
||||||
|
$no_page_header = TRUE;
|
||||||
require('pagestart.inc');
|
require('pagestart.inc');
|
||||||
include($phpbb_root_dir . 'includes/bbcode.'.$phpEx);
|
include($phpbb_root_dir . 'includes/bbcode.'.$phpEx);
|
||||||
include($phpbb_root_dir . 'includes/post.'.$phpEx);
|
include($phpbb_root_dir . 'includes/post.'.$phpEx);
|
||||||
|
@ -132,6 +136,7 @@ if( $mode == "searchuser" )
|
||||||
}
|
}
|
||||||
else if( $mode == "edit" && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_GET_VARS[POST_USERS_URL]) || isset($HTTP_POST_VARS[POST_USERS_URL]) ) )
|
else if( $mode == "edit" && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_GET_VARS[POST_USERS_URL]) || isset($HTTP_POST_VARS[POST_USERS_URL]) ) )
|
||||||
{
|
{
|
||||||
|
include('page_header_admin.' . $phpEx);
|
||||||
//
|
//
|
||||||
// Let's find out a little about them...
|
// Let's find out a little about them...
|
||||||
//
|
//
|
||||||
|
@ -186,9 +191,9 @@ else if( $mode == "edit" && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_
|
||||||
|
|
||||||
$COPPA = false;
|
$COPPA = false;
|
||||||
|
|
||||||
$html_status = ($board_config['allow_html']) ? $lang['ON'] : $lang['OFF'];
|
$html_status = ($userdata['user_allowhtml']) ? $lang['HTML_is_ON'] : $lang['HTML_is_OFF'];
|
||||||
$bbcode_status = ($board_config['allow_bbcode']) ? $lang['ON'] : $lang['OFF'];
|
$bbcode_status = ($userdata['user_allowbbcode']) ? $lang['BBCode_is_ON'] : $lang['BBCode_is_OFF'];
|
||||||
$smilies_status = ($board_config['allow_smilies']) ? $lang['ON'] : $lang['OFF'];
|
$smilies_status = ($userdata['user_allowsmile']) ? $lang['Smilies_are_ON'] : $lang['Smilies_are_OFF'];
|
||||||
|
|
||||||
$s_hidden_fields = '<input type="hidden" name="mode" value="save" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
|
$s_hidden_fields = '<input type="hidden" name="mode" value="save" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
|
||||||
$s_hidden_fields .= '<input type="hidden" name="id" value="' . $this_userdata['user_id'] . '" />';
|
$s_hidden_fields .= '<input type="hidden" name="id" value="' . $this_userdata['user_id'] . '" />';
|
||||||
|
@ -231,8 +236,8 @@ else if( $mode == "edit" && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_
|
||||||
$rank = $rank_rows[$i]['rank_title'];
|
$rank = $rank_rows[$i]['rank_title'];
|
||||||
$rank_id = $rank_rows[$i]['rank_id'];
|
$rank_id = $rank_rows[$i]['rank_id'];
|
||||||
|
|
||||||
$selected = ( $this_userdata['user_rank'] == $i + 1 ) ? "selected=\"selected\"" : "";
|
$selected = ( $this_userdata['user_rank'] == $rank_id ) ? "selected=\"selected\"" : "";
|
||||||
$rank_select_box .= "<option value=\"" . $rank_id . "\"$selected>" . $rank . "</option>";
|
$rank_select_box .= "<option value=\"" . $rank_id . "\" " . $selected . ">" . $rank . "</option>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$signature = preg_replace("/\:[0-9a-z\:]*?\]/si", "]", $signature);
|
$signature = preg_replace("/\:[0-9a-z\:]*?\]/si", "]", $signature);
|
||||||
|
@ -275,9 +280,6 @@ else if( $mode == "edit" && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_
|
||||||
"TIMEZONE_SELECT" => tz_select($user_timezone),
|
"TIMEZONE_SELECT" => tz_select($user_timezone),
|
||||||
"STYLE_SELECT" => style_select($user_style, 'style'),
|
"STYLE_SELECT" => style_select($user_style, 'style'),
|
||||||
"DATE_FORMAT" => $user_dateformat,
|
"DATE_FORMAT" => $user_dateformat,
|
||||||
"HTML_STATUS" => $html_status,
|
|
||||||
"BBCODE_STATUS" => $bbcode_status,
|
|
||||||
"SMILIES_STATUS" => $smilies_status,
|
|
||||||
"ALLOW_PM_YES" => ($user_allowpm) ? "checked=\"checked\"" : "",
|
"ALLOW_PM_YES" => ($user_allowpm) ? "checked=\"checked\"" : "",
|
||||||
"ALLOW_PM_NO" => (!$user_allowpm) ? "checked=\"checked\"" : "",
|
"ALLOW_PM_NO" => (!$user_allowpm) ? "checked=\"checked\"" : "",
|
||||||
"ALLOW_AVATAR_YES" => ($user_allowavatar) ? "checked=\"checked\"" : "",
|
"ALLOW_AVATAR_YES" => ($user_allowavatar) ? "checked=\"checked\"" : "",
|
||||||
|
@ -323,7 +325,7 @@ else if( $mode == "edit" && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_
|
||||||
"L_CURRENT_IMAGE" => $lang['Current_Image'],
|
"L_CURRENT_IMAGE" => $lang['Current_Image'],
|
||||||
|
|
||||||
"L_SIGNATURE" => $lang['Signature'],
|
"L_SIGNATURE" => $lang['Signature'],
|
||||||
"L_SIGNATURE_EXPLAIN" => $lang['Signature_explain'],
|
"L_SIGNATURE_EXPLAIN" => sprintf($lang['Signature_explain'], $board_config['max_sig_chars']),
|
||||||
"L_NOTIFY_ON_PRIVMSG" => $lang['Notify_on_privmsg'],
|
"L_NOTIFY_ON_PRIVMSG" => $lang['Notify_on_privmsg'],
|
||||||
"L_PREFERENCES" => $lang['Preferences'],
|
"L_PREFERENCES" => $lang['Preferences'],
|
||||||
"L_PUBLIC_VIEW_EMAIL" => $lang['Public_view_email'],
|
"L_PUBLIC_VIEW_EMAIL" => $lang['Public_view_email'],
|
||||||
|
@ -334,9 +336,9 @@ else if( $mode == "edit" && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_
|
||||||
"L_CONFIRM" => $lang['Confirm'],
|
"L_CONFIRM" => $lang['Confirm'],
|
||||||
"L_EMAIL_ADDRESS" => $lang['Email_address'],
|
"L_EMAIL_ADDRESS" => $lang['Email_address'],
|
||||||
|
|
||||||
"L_HTML_IS" => $lang['HTML'] . " " . $lang['is'],
|
"HTML_STATUS" => $html_status,
|
||||||
"L_BBCODE_IS" => $lang['BBCode'] . " " . $lang['is'],
|
"BBCODE_STATUS" => $bbcode_status,
|
||||||
"L_SMILIES_ARE" => $lang['Smilies'] . " " . $lang['are'],
|
"SMILIES_STATUS" => $smilies_status,
|
||||||
|
|
||||||
"L_DELETE_USER" => $lang['User_delete'],
|
"L_DELETE_USER" => $lang['User_delete'],
|
||||||
"L_DELETE_USER_EXPLAIN" => $lang['User_delete_explain'],
|
"L_DELETE_USER_EXPLAIN" => $lang['User_delete_explain'],
|
||||||
|
@ -353,6 +355,12 @@ else if( $mode == "save" && isset($HTTP_POST_VARS['submit']) )
|
||||||
//
|
//
|
||||||
// Ok, the profile has been modified and submitted, let's update
|
// Ok, the profile has been modified and submitted, let's update
|
||||||
//
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// First let's declare our "Return Address"
|
||||||
|
//
|
||||||
|
$return_address = append_sid("admin_users." . $phpEx);
|
||||||
|
|
||||||
$user_id = intval($HTTP_POST_VARS['id']);
|
$user_id = intval($HTTP_POST_VARS['id']);
|
||||||
|
|
||||||
$username = (!empty($HTTP_POST_VARS['username'])) ? trim(strip_tags($HTTP_POST_VARS['username'])) : "";
|
$username = (!empty($HTTP_POST_VARS['username'])) ? trim(strip_tags($HTTP_POST_VARS['username'])) : "";
|
||||||
|
@ -399,6 +407,11 @@ else if( $mode == "save" && isset($HTTP_POST_VARS['submit']) )
|
||||||
$error = FALSE;
|
$error = FALSE;
|
||||||
$passwd_sql = "";
|
$passwd_sql = "";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$error = TRUE;
|
||||||
|
$passwd_sql = "";
|
||||||
|
}
|
||||||
|
|
||||||
if(!empty($password) && !empty($password_confirm))
|
if(!empty($password) && !empty($password_confirm))
|
||||||
{
|
{
|
||||||
|
@ -406,7 +419,7 @@ else if( $mode == "save" && isset($HTTP_POST_VARS['submit']) )
|
||||||
if($password != $password_confirm)
|
if($password != $password_confirm)
|
||||||
{
|
{
|
||||||
$error = TRUE;
|
$error = TRUE;
|
||||||
$error_msg = $lang['Password_mismatch'];
|
$error_msg .= $lang['Password_mismatch'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -417,12 +430,12 @@ else if( $mode == "save" && isset($HTTP_POST_VARS['submit']) )
|
||||||
else if($password && !$password_confirm)
|
else if($password && !$password_confirm)
|
||||||
{
|
{
|
||||||
$error = TRUE;
|
$error = TRUE;
|
||||||
$error_msg = $lang['Password_mismatch'];
|
$error_msg .= $lang['Password_mismatch'];
|
||||||
}
|
}
|
||||||
else if(!$password && $password_confirm)
|
else if(!$password && $password_confirm)
|
||||||
{
|
{
|
||||||
$error = TRUE;
|
$error = TRUE;
|
||||||
$error_msg = $lang['Password_mismatch'];
|
$error_msg .= $lang['Password_mismatch'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $signature != "" )
|
if( $signature != "" )
|
||||||
|
@ -465,15 +478,7 @@ else if( $mode == "save" && isset($HTTP_POST_VARS['submit']) )
|
||||||
WHERE user_id = $user_id";
|
WHERE user_id = $user_id";
|
||||||
$result = @$db->sql_query($sql);
|
$result = @$db->sql_query($sql);
|
||||||
|
|
||||||
$template->set_filenames(array(
|
$message = $lang['User_deleted'];
|
||||||
"body" => "admin/admin_message_body.tpl")
|
|
||||||
);
|
|
||||||
|
|
||||||
$template->assign_vars(array(
|
|
||||||
"MESSAGE_TITLE" => $lang['User'] . $lang['User_admin'],
|
|
||||||
"MESSAGE_TEXT" => $lang['User_deleted'])
|
|
||||||
);
|
|
||||||
$template->pparse("body");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -492,15 +497,7 @@ else if( $mode == "save" && isset($HTTP_POST_VARS['submit']) )
|
||||||
|
|
||||||
if( $error == TRUE )
|
if( $error == TRUE )
|
||||||
{
|
{
|
||||||
$template->set_filenames(array(
|
$error_msg .= $lang['Admin_user_fail'];
|
||||||
"body" => "admin/admin_message_body.tpl")
|
|
||||||
);
|
|
||||||
|
|
||||||
$template->assign_vars(array(
|
|
||||||
"MESSAGE_TITLE" => $lang['User'] . $lang['User_admin'],
|
|
||||||
"MESSAGE_TEXT" => "Could not update user table")
|
|
||||||
);
|
|
||||||
$template->pparse("body");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -510,45 +507,30 @@ else if( $mode == "save" && isset($HTTP_POST_VARS['submit']) )
|
||||||
WHERE user_id = $user_id";
|
WHERE user_id = $user_id";
|
||||||
if( $result = $db->sql_query($sql) )
|
if( $result = $db->sql_query($sql) )
|
||||||
{
|
{
|
||||||
$template->set_filenames(array(
|
$message .= $lang['Admin_user_updated'];
|
||||||
"body" => "admin/admin_message_body.tpl")
|
|
||||||
);
|
|
||||||
|
|
||||||
$template->assign_vars(array(
|
|
||||||
"MESSAGE_TITLE" => $lang['User'] . $lang['User_admin'],
|
|
||||||
"MESSAGE_TEXT" => $lang['Profile_updated'])
|
|
||||||
);
|
|
||||||
$template->pparse("body");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$template->set_filenames(array(
|
$error = TRUE;
|
||||||
"body" => "admin/admin_message_body.tpl")
|
$error_msg .= $lang['Admin_user_fail'];
|
||||||
);
|
|
||||||
|
|
||||||
$template->assign_vars(array(
|
|
||||||
"MESSAGE_TITLE" => $lang['User'] . $lang['User_admin'],
|
|
||||||
"MESSAGE_TEXT" => "Error updating user profile")
|
|
||||||
);
|
|
||||||
$template->pparse("body");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$template->assign_vars(array(
|
||||||
|
"META" => '<meta http-equiv="refresh" content="3;url=' . $return_address . '">')
|
||||||
|
);
|
||||||
|
message_die(GENERAL_MESSAGE, $message . "<br />" . sprintf($lang['Click_return_useradmin'], "<a href=\"" . $return_address . "\">", "</a>"), $lang['User_admin']);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$template->assign_vars(array(
|
||||||
|
"META" => '<meta http-equiv="refresh" content="3;url=' . $return_address . '">')
|
||||||
|
);
|
||||||
|
message_die(GENERAL_ERROR, $error_msg . "<br />" . sprintf($lang['Click_return_useradmin'], "<a href=\"" . $return_address . "\">", "</a>"), $lang['User_admin']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$template->set_filenames(array(
|
include('page_header_admin.' . $phpEx);
|
||||||
"body" => "admin/admin_message_body.tpl")
|
|
||||||
);
|
|
||||||
|
|
||||||
$template->assign_vars(array(
|
|
||||||
"MESSAGE_TITLE" => $lang['User'] . $lang['User_admin'],
|
|
||||||
"MESSAGE_TEXT" => $error_msg)
|
|
||||||
);
|
|
||||||
$template->pparse("body");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//
|
//
|
||||||
// Default user selection box
|
// Default user selection box
|
||||||
//
|
//
|
||||||
|
@ -576,7 +558,7 @@ else
|
||||||
"L_USER_TITLE" => $lang['User'] . " " . $lang['User_admin'],
|
"L_USER_TITLE" => $lang['User'] . " " . $lang['User_admin'],
|
||||||
"L_USER_EXPLAIN" => $lang['User_admin_explain'],
|
"L_USER_EXPLAIN" => $lang['User_admin_explain'],
|
||||||
"L_USER_SELECT" => $lang['Select_a'] . " " . $lang['User'],
|
"L_USER_SELECT" => $lang['Select_a'] . " " . $lang['User'],
|
||||||
"L_LOOK_UP" => $lang['Look_up'] . " " . $lang['User'],
|
"L_LOOK_UP" => $lang['Look_up_user'],
|
||||||
"L_FIND_USERNAME" => $lang['Find_username'],
|
"L_FIND_USERNAME" => $lang['Find_username'],
|
||||||
|
|
||||||
"U_SEARCH_USER" => append_sid("../search.$phpEx?mode=searchuser"),
|
"U_SEARCH_USER" => append_sid("../search.$phpEx?mode=searchuser"),
|
||||||
|
|
|
@ -398,7 +398,7 @@ elseif( $HTTP_GET_VARS['pane'] == 'right' )
|
||||||
"LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow[$i]['session_time'], $board_config['board_timezone']),
|
"LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow[$i]['session_time'], $board_config['board_timezone']),
|
||||||
"LOCATION" => $location,
|
"LOCATION" => $location,
|
||||||
"IP_ADDRESS" => $ip_address,
|
"IP_ADDRESS" => $ip_address,
|
||||||
"U_USER_PROFILE" => append_sid("admin_users.$phpEx?" . POST_USERS_URL . "=" . $onlinerow[$i]['user_id']))
|
"U_USER_PROFILE" => append_sid("admin_users.$phpEx?" . POST_USERS_URL . "=" . $onlinerow[$i]['user_id'] . "&mode=edit"))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ $template->set_filenames(array(
|
||||||
);
|
);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
"PHPBB_VERSION" => "2.0 beta-1")
|
"PHPBB_VERSION" => "2.0 CVS")
|
||||||
);
|
);
|
||||||
|
|
||||||
$template->pparse("page_footer");
|
$template->pparse("page_footer");
|
||||||
|
|
|
@ -357,9 +357,15 @@ $lang['Click_return_smileadmin'] = "Click %sHere%s to return to Smiley Administr
|
||||||
//
|
//
|
||||||
// User Management
|
// User Management
|
||||||
//
|
//
|
||||||
$lang['User_admin'] = "Administration";
|
$lang['User_admin'] = "User Administration";
|
||||||
$lang['User_admin_explain'] = "Here you can change your user's information and certain specific options. To modify the users permissions please use the user and group permissions system.";
|
$lang['User_admin_explain'] = "Here you can change your user's information and certain specific options. To modify the users permissions please use the user and group permissions system.";
|
||||||
|
|
||||||
|
$lang['Look_up_user'] = "Look up user";
|
||||||
|
|
||||||
|
$lang['Admin_user_fail'] = "Couldn't update the user's profiile.";
|
||||||
|
$lang['Admin_user_updated'] = "The user's profile was successfully updated.";
|
||||||
|
$lang['Click_return_useradmin'] = "Click %sHere%s to return to User Administration";
|
||||||
|
|
||||||
$lang['User_delete'] = "Delete this user";
|
$lang['User_delete'] = "Delete this user";
|
||||||
$lang['User_delete_explain'] = "Click here to delete this user, this cannot be undone.";
|
$lang['User_delete_explain'] = "Click here to delete this user, this cannot be undone.";
|
||||||
$lang['User_deleted'] = "User was successfully deleted.";
|
$lang['User_deleted'] = "User was successfully deleted.";
|
||||||
|
@ -377,6 +383,8 @@ $lang['User_special_explain'] = "These fields are not able to be modified by the
|
||||||
//
|
//
|
||||||
// Group Management
|
// Group Management
|
||||||
//
|
//
|
||||||
|
|
||||||
|
$lang['Group_administration'] = "Group Administration";
|
||||||
$lang['Group_admin_explain'] = "From this panel you can administer all your usergroups, you can; delete, create and edit existing groups. You may choose moderators, toggle open/closed group status and set the group name and description";
|
$lang['Group_admin_explain'] = "From this panel you can administer all your usergroups, you can; delete, create and edit existing groups. You may choose moderators, toggle open/closed group status and set the group name and description";
|
||||||
$lang['Error_updating_groups'] = "There was an error while updating the groups";
|
$lang['Error_updating_groups'] = "There was an error while updating the groups";
|
||||||
$lang['Updated_group'] = "The group was successfully updated";
|
$lang['Updated_group'] = "The group was successfully updated";
|
||||||
|
@ -400,6 +408,9 @@ $lang['No_group_moderator'] = "You must specify a moderator for this group";
|
||||||
$lang['No_group_mode'] = "You must specify a mode for this group, open or closed";
|
$lang['No_group_mode'] = "You must specify a mode for this group, open or closed";
|
||||||
$lang['delete_group_moderator'] = "Delete the old group moderator?";
|
$lang['delete_group_moderator'] = "Delete the old group moderator?";
|
||||||
$lang['delete_moderator_explain'] = "If you're changing the group moderator, check this box to remove the old moderator from the group. Otherwise, do not check it, and the user will become a regular member of the group.";
|
$lang['delete_moderator_explain'] = "If you're changing the group moderator, check this box to remove the old moderator from the group. Otherwise, do not check it, and the user will become a regular member of the group.";
|
||||||
|
$lang['return_group_admin'] = "Click %sHere%s to return to Group Administration.";
|
||||||
|
$lang['Select_group'] = "Select a group";
|
||||||
|
$lang['Look_up_group'] = "Look up group";
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -503,7 +514,7 @@ $lang['Rank_removed'] = "The rank was successfully deleted";
|
||||||
$lang['Add_new_rank'] = "Add new rank";
|
$lang['Add_new_rank'] = "Add new rank";
|
||||||
$lang['Rank_image'] = "Rank Image";
|
$lang['Rank_image'] = "Rank Image";
|
||||||
$lang['Rank_image_explain'] = "This is the place to set a custom image for everyone in the rank. You can specify either a relative or absolute path to the image";
|
$lang['Rank_image_explain'] = "This is the place to set a custom image for everyone in the rank. You can specify either a relative or absolute path to the image";
|
||||||
$lang['return_rank_admin'] = "to return to rank admin";
|
$lang['return_rank_admin'] = "Click %sHere%s to return to rank admin";
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -2362,7 +2362,7 @@ else
|
||||||
$user_sig = $userdata['user_sig'];
|
$user_sig = $userdata['user_sig'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$post_message = preg_replace("/\:$post_bbcode_uid(|\:[a-z])/si", "", $post_message);
|
$post_message = preg_replace("/\:(([a-z0-9]:)?)$post_bbcode_uid/si", "", $post_message);
|
||||||
$post_message = str_replace("<br />", "\n", $post_message);
|
$post_message = str_replace("<br />", "\n", $post_message);
|
||||||
$post_message = preg_replace($html_entities_match, $html_entities_replace, $post_message);
|
$post_message = preg_replace($html_entities_match, $html_entities_replace, $post_message);
|
||||||
$post_message = preg_replace('#</textarea>#si', '</textarea>', $post_message);
|
$post_message = preg_replace('#</textarea>#si', '</textarea>', $post_message);
|
||||||
|
|
|
@ -24,6 +24,13 @@
|
||||||
<td class="row1" width="38%"><span class="gen">{L_GROUP_MODERATOR}:</span></td>
|
<td class="row1" width="38%"><span class="gen">{L_GROUP_MODERATOR}:</span></td>
|
||||||
<td class="row2" width="62%">{S_SELECT_MODERATORS}</td>
|
<td class="row2" width="62%">{S_SELECT_MODERATORS}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="row1" width="38%"><span class="gen">{L_GROUP_STATUS}:</span></td>
|
||||||
|
<td class="row2" width="62%">
|
||||||
|
<input type="radio" name="group_type" value="{S_GROUP_OPEN_TYPE}" {S_GROUP_OPEN_CHECKED} /> {L_GROUP_OPEN} <input type="radio" name="group_type" value="{S_GROUP_CLOSED_TYPE}" {S_GROUP_CLOSED_CHECKED} /> {L_GROUP_CLOSED} <input type="radio" name="group_type" value="{S_GROUP_HIDDEN_TYPE}" {S_GROUP_HIDDEN_CHECKED} /> {L_GROUP_HIDDEN}</td>
|
||||||
|
</tr>
|
||||||
|
<!-- BEGIN group_edit -->
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1" width="38%"><span class="gen">{L_DELETE_MODERATOR}</span>
|
<td class="row1" width="38%"><span class="gen">{L_DELETE_MODERATOR}</span>
|
||||||
<br />
|
<br />
|
||||||
|
@ -32,17 +39,13 @@
|
||||||
<input type="checkbox" name="delete_old_moderator" value="1">
|
<input type="checkbox" name="delete_old_moderator" value="1">
|
||||||
{L_YES}</td>
|
{L_YES}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td class="row1" width="38%"><span class="gen">{L_GROUP_STATUS}:</span></td>
|
|
||||||
<td class="row2" width="62%">
|
|
||||||
<input type="radio" name="group_type" value="{S_GROUP_OPEN_TYPE}" {S_GROUP_OPEN_CHECKED} /> {L_GROUP_OPEN} <input type="radio" name="group_type" value="{S_GROUP_CLOSED_TYPE}" {S_GROUP_CLOSED_CHECKED} /> {L_GROUP_CLOSED} <input type="radio" name="group_type" value="{S_GROUP_HIDDEN_TYPE}" {S_GROUP_HIDDEN_CHECKED} /> {L_GROUP_HIDDEN}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1" width="38%"><span class="gen">{L_GROUP_DELETE}:</span></td>
|
<td class="row1" width="38%"><span class="gen">{L_GROUP_DELETE}:</span></td>
|
||||||
<td class="row2" width="62%">
|
<td class="row2" width="62%">
|
||||||
<input type="checkbox" name="group_delete" value="1">
|
<input type="checkbox" name="group_delete" value="1">
|
||||||
{L_GROUP_DELETE_CHECK}</td>
|
{L_GROUP_DELETE_CHECK}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<!-- END group_edit -->
|
||||||
<tr>
|
<tr>
|
||||||
<td class="catBottom" colspan="2" align="center"><span class="cattitle">
|
<td class="catBottom" colspan="2" align="center"><span class="cattitle">
|
||||||
<input type="submit" name="group_update" value="{L_SUBMIT}" class="mainoption" />
|
<input type="submit" name="group_update" value="{L_SUBMIT}" class="mainoption" />
|
||||||
|
|
|
@ -97,9 +97,9 @@
|
||||||
<td class="row1"><span class="gen">{L_SIGNATURE}:</span><br />
|
<td class="row1"><span class="gen">{L_SIGNATURE}:</span><br />
|
||||||
<span class="gensmall">{L_SIGNATURE_EXPLAIN}<br />
|
<span class="gensmall">{L_SIGNATURE_EXPLAIN}<br />
|
||||||
<br />
|
<br />
|
||||||
{L_HTML_IS} <u>{HTML_STATUS}</u><br />
|
{HTML_STATUS}<br />
|
||||||
{L_BBCODE_IS} <u>{BBCODE_STATUS}</u><br />
|
{BBCODE_STATUS}<br />
|
||||||
{L_SMILIES_ARE} <u>{SMILIES_STATUS}</u></span></td>
|
{SMILIES_STATUS}</span></td>
|
||||||
<td class="row2">
|
<td class="row2">
|
||||||
<textarea name="signature" rows="6" cols="45">{SIGNATURE}</textarea>
|
<textarea name="signature" rows="6" cols="45">{SIGNATURE}</textarea>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1" align="right"><b>{L_EMAIL_SUBJECT}</b></td>
|
<td class="row1" align="right"><b>{L_EMAIL_SUBJECT}</b></td>
|
||||||
<td class="row2"><span class="gen"><input type="text" name="{S_EMAIL_SUBJECT}{S_EMAIL_SUBJECT}" size="45" maxlength="100" style="width:450px" tabindex="2" class="post" /></span></td>
|
<td class="row2"><span class="gen"><input type="text" name="{S_EMAIL_SUBJECT}" size="45" maxlength="100" style="width:450px" tabindex="2" class="post" /></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1" align="right" valign="top"> <span class="gen"><b>{L_EMAIL_MSG}</b></span>
|
<td class="row1" align="right" valign="top"> <span class="gen"><b>{L_EMAIL_MSG}</b></span>
|
||||||
|
|
Loading…
Add table
Reference in a new issue