Web UI for ARGUS server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
804 B

5 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. require_once('../php/onvif/toto.php');
  4. if( $CUser->Data['id'] > 1 ){
  5. if( $CUser->Data['access'] > 5 ){
  6. $QS = "SELECT * FROM users";
  7. $Result = $DATABASE->Query($QS,false);
  8. foreach( $Result as $CD ){
  9. $cnode['id'] = intval( $CD['id'] );
  10. $cnode['status'] = $CD['status'];
  11. $cnode['access'] = intval( $CD['access'] );
  12. $cnode['login'] = $CD['login'];
  13. $cnode['created']= $CD['create_ts'];
  14. $cnode['last'] = $CD['login_ts'];
  15. $cnode['lang'] = intval( $CD['language'] );
  16. $cnode['site'] = $CD['selected_site'];
  17. $Data['users'][] = $cnode;
  18. };
  19. } else {
  20. $Data['users'] = array();
  21. };
  22. $Data['totalCount']= count($Data['users']);
  23. echo json_encode( $Data );
  24. } else {
  25. header('location: /');
  26. };
  27. ?>