mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-08 01:32:59 +02:00
issue #1265 user manager new design by @GitBluub and @MatthieuLP
Because we had a ghost page user_list_new, I didn't simply merged the feature branch, but I reproduced the new code in a single commit on master.
This commit is contained in:
@@ -43,11 +43,34 @@ while ($row = pwg_db_fetch_assoc($result))
|
||||
$groups[$row['id']] = $row['name'];
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Dates for filtering |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
$query = '
|
||||
SELECT DISTINCT
|
||||
month(registration_date) as registration_month,
|
||||
year(registration_date) as registration_year
|
||||
FROM '.USER_INFOS_TABLE.'
|
||||
ORDER BY registration_date
|
||||
;';
|
||||
$result = pwg_query($query);
|
||||
|
||||
$register_dates = array();
|
||||
while ($row = pwg_db_fetch_assoc($result))
|
||||
{
|
||||
$register_dates[] = $row['registration_month'].' '.$row['registration_year'];
|
||||
}
|
||||
|
||||
$template->assign('register_dates', implode(',' , $register_dates));
|
||||
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | template |
|
||||
// +-----------------------------------------------------------------------+
|
||||
$template->assign(
|
||||
array(
|
||||
'ADMIN_PAGE_TITLE' => l10n('Manage users'),
|
||||
'ACTIVATE_COMMENTS' => $conf['activate_comments'],
|
||||
'Double_Password' => $conf['double_password_type_in_admin']
|
||||
)
|
||||
@@ -97,6 +120,7 @@ $template->assign(
|
||||
'password_protected_users' => implode(',', array_unique($password_protected_users)),
|
||||
'guest_user' => $conf['guest_id'],
|
||||
'filter_group' => (isset($_GET['group']) ? $_GET['group'] : null),
|
||||
'connected_user' => $user["id"]
|
||||
)
|
||||
);
|
||||
|
||||
@@ -132,6 +156,24 @@ foreach ($conf['available_permission_levels'] as $level)
|
||||
$template->assign('level_options', $level_options);
|
||||
$template->assign('level_selected', $default_user['level']);
|
||||
|
||||
$query = '
|
||||
SELECT id, name, is_default
|
||||
FROM `'.GROUPS_TABLE.'`
|
||||
ORDER BY name ASC
|
||||
;';
|
||||
$result = pwg_query($query);
|
||||
|
||||
$groups_arr_id = [];
|
||||
$groups_arr_name = [];
|
||||
while ($row = pwg_db_fetch_assoc($result))
|
||||
{
|
||||
$groups_arr_name[] = '"'.pwg_db_real_escape_string($row["name"]).'"';
|
||||
$groups_arr_id[] = $row["id"];
|
||||
}
|
||||
|
||||
$template->assign('groups_arr_id', implode(',', $groups_arr_id));
|
||||
$template->assign('groups_arr_name', implode(',', $groups_arr_name));
|
||||
$template->assign('guest_id', $conf["guest_id"]);
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | html code display |
|
||||
|
||||
Reference in New Issue
Block a user