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.

25 lines
842 B

2 years ago
​
2 years ago
2 years ago
​
​
2 years ago
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. //require_once('../php/onvif/toto.php');
  4. if( $CUser->Data['id'] > 1 ){
  5. $Data = array();
  6. if( $CUser->Data['access'] > 5 ){
  7. $Data['records'] = array();
  8. $QS = "SELECT al.*, ur.login_id FROM access_log al LEFT JOIN users ur ON (al.user_id = ur.id ) ORDER BY id DESC LIMIT 64";
  9. $Result = $DATABASE->Query( $QS,false );
  10. foreach( $Result as $CD ){
  11. $cnode['id'] = intval( $CD['id'] );
  12. $cnode['user'] = $CD['login_id'];
  13. $cnode['ts']= $CD['ts'];
  14. $cnode['cmd'] = intval( $CD['cmd'] );
  15. $cnode['data_line'] = $CD['dataset'];
  16. $Data['records'][] = $cnode;
  17. };
  18. } else {
  19. $Data['records'] = array();
  20. };
  21. $Data['totalCount']= count($Data['records']);
  22. echo json_encode( $Data );
  23. } else {
  24. header('location: /');
  25. };
  26. ?>