Esempio n. 1
0
		$query['icq'] = str_replace('-', '', $query['icq']);
		if (!is_id($query['icq'])) {
			$query['icq'] = 0;
		}

		if (!empty($query['pw']) && strlen($query['pw']) >= $config['minpwlength']) {
			$md5 = md5($query['pw']);
			$update_sql = ", pw = '{$md5}' ";
		}
		else {
			$update_sql = ' ';
		}

		admin_customsave($query['id']);

		$db->query("UPDATE {$db->pre}user SET groups = '".saveCommaSeparated($query['groups'])."', timezone = '{$query['temp']}', opt_pmnotify = '{$query['opt_1']}', opt_hidemail = '{$query['opt_3']}', template = '{$query['opt_4']}', language = '{$query['opt_5']}', pic = '{$query['pic']}', about = '{$query['comment']}', icq = '{$query['icq']}', yahoo = '{$query['yahoo']}', aol = '{$query['aol']}', msn = '{$query['msn']}', jabber = '{$query['jabber']}', birthday = '{$bday}', gender = '{$query['gender']}', hp = '{$query['hp']}', signature = '{$query['signature']}', location = '{$query['location']}', fullname = '{$query['fullname']}', skype = '{$query['skype']}', mail = '{$query['email']}', name = '{$query['name']}' {$update_sql} WHERE id = '{$user['id']}'");

		$cache = $scache->load('memberdata');
		$cache = $cache->delete();

		ok("admin.php?action=members&job=manage", $lang->phrase('admin_member_data_saved'));
	}
}
elseif ($job == 'delete') {
	echo head();
	$delete = $gpc->get('delete', arr_int);
	$mykey = array_search($my->id, $delete);
	if ($mykey !== false) {
		unset($delete[$mykey]);
	}
	if (count($delete) > 0) {
                $_POST['birthyear'] = 1000;
            }
            $_POST['birthmonth'] = leading_zero($_POST['birthmonth']);
            $_POST['birthday'] = leading_zero($_POST['birthday']);
            $_POST['birthyear'] = leading_zero($_POST['birthyear'], 4);
            $bday = $_POST['birthyear'] . '-' . $_POST['birthmonth'] . '-' . $_POST['birthday'];
            $_POST['icq'] = str_replace('-', '', $_POST['icq']);
            if (!is_id($_POST['icq'])) {
                $_POST['icq'] = 0;
            }
            if (!empty($_POST['pw']) && strxlen($_POST['pw']) >= $config['minpwlength']) {
                $md5 = md5($_POST['pw']);
                $update_sql = ", pw = '{$md5}' ";
            } else {
                $update_sql = ' ';
            }
            admin_customsave($user['id']);
            ($code = $plugins->load('managemembers_edit2_savedata')) ? eval($code) : null;
            $db->query("\n\t\t\tUPDATE {$db->pre}user\n\t\t\tSET groups = '" . saveCommaSeparated($_POST['groups']) . "', timezone = '" . $_POST['temp'] . "', opt_textarea = '" . $_POST['opt_0'] . "', opt_pmnotify = '" . $_POST['opt_1'] . "', opt_hidebad = '" . $_POST['opt_2'] . "', opt_hidemail = '" . $_POST['opt_3'] . "', template = '" . $_POST['opt_4'] . "', language = '" . $_POST['opt_5'] . "', pic = '" . $_POST['pic'] . "', about = '" . $_POST['comment'] . "', icq = '" . $_POST['icq'] . "', yahoo = '" . $_POST['yahoo'] . "', aol = '" . $_POST['aol'] . "', msn = '" . $_POST['msn'] . "', jabber = '" . $_POST['jabber'] . "', skype = '{$_POST['skype']}', birthday = '" . $bday . "', gender = '" . $_POST['gender'] . "', hp = '" . $_POST['hp'] . "', signature = '" . $_POST['signature'] . "', location = '" . $_POST['location'] . "', fullname = '" . $_POST['fullname'] . "', mail = '" . $_POST['email'] . "', name = '" . $_POST['name'] . "' {$update_sql}\n\t\t\tWHERE id = '" . $user['id'] . "'\n\t\t\tLIMIT 1\n\t\t\t", __LINE__, __FILE__);
            ok($lang->phrase('data_success'), "profile.php?id=" . $user['id']);
        }
    } else {
        error($lang->phrase('docs_not_found'), "profile.php?id={$user['id']}");
    }
}
($code = $plugins->load('managemembers_end')) ? eval($code) : null;
$slog->updatelogged();
$zeitmessung = t2();
echo $tpl->parse("footer");
$phpdoc->Out();
$db->close();