home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / dotproject / modules / admin / vw_inactive_usr.php < prev    next >
Encoding:
PHP Script  |  2003-05-15  |  863 b   |  24 lines

  1. <?php /* ADMIN $Id: vw_inactive_usr.php,v 1.9 2003/05/15 02:40:20 eddieajau Exp $ */
  2. GLOBAL $AppUI, $canEdit, $stub, $where, $orderby;
  3.  
  4. $sql = "
  5. SELECT DISTINCT(user_id), user_username, user_last_name, user_first_name, permission_user, user_email, company_name, user_company
  6. FROM users
  7. LEFT JOIN permissions ON user_id = permission_user 
  8. LEFT JOIN companies ON company_id = user_company
  9. WHERE permission_value IS NULL
  10. ";
  11.  
  12. if ($stub) {
  13.     $sql .= "\n    AND (UPPER(user_username) LIKE '$stub%' or UPPER(user_first_name) LIKE '$stub%' OR UPPER(user_last_name) LIKE '$stub%')";
  14. } else if ($where) {
  15.     $sql .= "\n    AND (UPPER(user_username) LIKE '%$where%' or UPPER(user_first_name) LIKE '%$where%' OR UPPER(user_last_name) LIKE '%$where%')";
  16. }
  17.  
  18. $sql .= "\nORDER by $orderby";
  19.  
  20. $users = db_loadList( $sql );
  21.  
  22. require "{$AppUI->cfg['root_dir']}/modules/admin/vw_usr.php";
  23. ?>
  24.