diff --git a/phpBB/adm/admin_users.php b/phpBB/adm/admin_users.php
index b0a8f89fdb..dad6a47bee 100644
--- a/phpBB/adm/admin_users.php
+++ b/phpBB/adm/admin_users.php
@@ -36,6 +36,7 @@ include($phpbb_root_path.'includes/functions_profile_fields.'.$phpEx);
//
$mode = request_var('mode', '');
$action = request_var('action', 'overview');
+$start = request_var('start', 0);
$username = request_var('username', '');
$user_id = request_var('u', 0);
$ip = request_var('ip', '');
@@ -47,6 +48,7 @@ $quicktools = request_var('quicktools', '');
$submit = (isset($_POST['update'])) ? true : false;
$confirm = (isset($_POST['confirm'])) ? true : false;
$cancel = (isset($_POST['cancel'])) ? true : false;
+$preview = (isset($_POST['preview'])) ? true : false;
$error = array();
@@ -119,7 +121,7 @@ adm_page_header($user->lang['MANAGE']);
//
// User has submitted a form, process it
//
-if ($submit)
+if ($submit || $preview)
{
switch ($action)
{
@@ -473,6 +475,16 @@ if ($submit)
break;
+ case 'feedback':
+
+ if ($message = request_var('message', ''))
+ {
+ add_log('user', $user_id, 'LOG_USER_GENERAL', $message);
+ trigger_error("ADDED");
+ }
+
+ break;
+
case 'profile':
$var_ary = array(
@@ -672,9 +684,120 @@ if ($submit)
break;
case 'avatar':
+
+ $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false;
+
+ $var_ary = array(
+ 'uploadurl' => (string) '',
+ 'remotelink' => (string) '',
+ 'width' => (string) '',
+ 'height' => (string) '',
+ );
+
+ foreach ($var_ary as $var => $default)
+ {
+ $data[$var] = request_var($var, $default);
+ }
+
+ $var_ary = array(
+ 'uploadurl' => array('string', true, 5, 255),
+ 'remotelink' => array('string', true, 5, 255),
+ 'width' => array('string', true, 1, 3),
+ 'height' => array('string', true, 1, 3),
+ );
+
+ $error = validate_data($data, $var_ary);
+
+ if (!sizeof($error))
+ {
+ $data['user_id'] = $user_id;
+
+ if ((!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl']) && $can_upload)
+ {
+ list($type, $filename, $width, $height) = avatar_upload($data, $error);
+ }
+ else if ($data['remotelink'])
+ {
+ list($type, $filename, $width, $height) = avatar_remote($data, $error);
+ }
+ else if ($delete)
+ {
+ $type = $filename = $width = $height = '';
+ }
+ }
+
+ if (!sizeof($error))
+ {
+ // Do we actually have any data to update?
+ if (sizeof($data))
+ {
+ $sql_ary = array(
+ 'user_avatar' => $filename,
+ 'user_avatar_type' => $type,
+ 'user_avatar_width' => $width,
+ 'user_avatar_height' => $height,
+ );
+
+ echo $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE user_id = $user_id";
+ $db->sql_query($sql);
+
+ // Delete old avatar if present
+ if ($user_avatar && $filename != $user_avatar)
+ {
+ avatar_delete($user_avatar);
+ }
+ }
+
+ trigger_error($message);
+ }
+
+ extract($data);
+ unset($data);
+
break;
- case 'signature':
+ case 'sig':
+
+ $var_ary = array(
+ 'enable_html' => (bool) $config['allow_html'],
+ 'enable_bbcode' => (bool) $config['allow_bbcode'],
+ 'enable_smilies' => (bool) $config['allow_smilies'],
+ 'enable_urls' => true,
+ 'signature' => (string) $user_sig,
+
+ );
+
+ foreach ($var_ary as $var => $default)
+ {
+ $$var = request_var($var, $default);
+ }
+
+ if (!$preview)
+ {
+ include($phpbb_root_path . 'includes/message_parser.'.$phpEx);
+
+ $message_parser = new parse_message();
+
+ $message_parser->message = $signature;
+ $message_parser->parse($enable_html, $enable_bbcode, $enable_urls, $enable_smilies);
+
+ $sql_ary = array(
+ 'user_sig' => (string) $message_parser->message,
+ 'user_sig_bbcode_uid' => (string) $message_parser->bbcode_uid,
+ 'user_sig_bbcode_bitfield' => (int) $message_parser->bbcode_bitfield
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE user_id = $user_id";
+ $db->sql_query($sql);
+
+ $message = $user->lang['PROFILE_UPDATED'] . '
' . sprintf($user->lang['RETURN_UCP'], "", '');
+ trigger_error($message);
+ }
+
break;
case 'groups':
@@ -706,11 +829,41 @@ if ($username || $user_id)
?>
+
+
+
lang['USER_ADMIN_EXPLAIN']; ?>
-