2010-06-23 Sergio Martin <sergio.martin@artica.es>
* include/auth/mysql.php operation/users/user.php godmode/users/user_list.php: Added pagination to users list in operations and administration git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2920 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
658387f4da
commit
f4efe80f28
|
@ -1,3 +1,10 @@
|
|||
2010-06-23 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/auth/mysql.php
|
||||
operation/users/user.php
|
||||
godmode/users/user_list.php: Added pagination
|
||||
to users list in operations and administration
|
||||
|
||||
2010-06-22 Raúl Mateos <raulofpandora@gmail.com>
|
||||
|
||||
* godmode/reporting/graph_builder.main.php
|
||||
|
|
|
@ -30,7 +30,6 @@ print_page_header (__('User management').' » '.__('Users defined in Pandor
|
|||
|
||||
if (isset ($_GET["user_del"])) { //delete user
|
||||
$id_user = get_parameter ("delete_user", 0);
|
||||
//debugPrint($_POST);
|
||||
// Only allow delete user if is not the actual user
|
||||
if($id_user != $config['id_user']){
|
||||
$result = delete_user ($id_user);
|
||||
|
@ -76,7 +75,11 @@ $table->size[5] = 40;
|
|||
|
||||
$info = array ();
|
||||
// Get users ordered by id_user
|
||||
$info = get_users ("id_user");
|
||||
$info = get_users ("id_user",array ('offset' => (int) get_parameter ('offset'),
|
||||
'limit' => (int) $config['block_size']));
|
||||
|
||||
// Prepare pagination
|
||||
pagination (count(get_users ()));
|
||||
|
||||
$rowPair = true;
|
||||
$iterator = 0;
|
||||
|
|
|
@ -191,7 +191,7 @@ function get_user_info ($user) {
|
|||
*
|
||||
* @return array An array of user information
|
||||
*/
|
||||
function get_users ($order = "fullname") {
|
||||
function get_users ($order = "fullname", $filter = false, $fields = false) {
|
||||
switch ($order) {
|
||||
case "id_user":
|
||||
case "registered":
|
||||
|
@ -202,9 +202,12 @@ function get_users ($order = "fullname") {
|
|||
$order = "fullname";
|
||||
}
|
||||
|
||||
$filter['order'] = $order." ASC";
|
||||
|
||||
|
||||
$output = array();
|
||||
|
||||
$result = get_db_all_rows_in_table ("tusuario", $order);
|
||||
$result = get_db_all_rows_filter ("tusuario", $filter, $fields);
|
||||
if ($result !== false) {
|
||||
foreach ($result as $row) {
|
||||
$output[$row["id_user"]] = $row;
|
||||
|
|
|
@ -43,7 +43,8 @@ $table->align[3] = "center";
|
|||
|
||||
$info = array ();
|
||||
// Get users ordered by id_user
|
||||
$info = get_users ("id_user");
|
||||
$info = get_users ("id_user",array ('offset' => (int) get_parameter ('offset'),
|
||||
'limit' => (int) $config['block_size']));
|
||||
|
||||
//Only the users from the user groups are visible
|
||||
|
||||
|
@ -63,6 +64,9 @@ foreach($users_hidden as $user_hidden){
|
|||
unset($info[$user_hidden]);
|
||||
}
|
||||
|
||||
// Prepare pagination
|
||||
pagination (count(get_users ()));
|
||||
|
||||
$rowPair = true;
|
||||
$iterator = 0;
|
||||
foreach ($info as $user_id => $user_info) {
|
||||
|
|
Loading…
Reference in New Issue