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.

23 lines
771 B

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. if( $CUser->Data['access'] > 5 ){
  6. $QS = "SELECT al.*, ur.login FROM access_log al LEFT JOIN users ur ON (al.user_id = ur.id ) ORDER BY id DESC";
  7. $Result = $DATABASE->Query($QS,false);
  8. foreach( $Result as $CD ){
  9. $cnode['id'] = intval( $CD['id'] );
  10. $cnode['user'] = $CD['login'];
  11. $cnode['ts']= $CD['ts'];
  12. $cnode['cmd'] = intval( $CD['cmd'] );
  13. $cnode['data_line'] = $CD['dataset'];
  14. $Data['records'][] = $cnode;
  15. };
  16. } else {
  17. $Data['records'] = array();
  18. };
  19. $Data['totalCount']= count($Data['records']);
  20. echo json_encode( $Data );
  21. } else {
  22. header('location: /');
  23. };
  24. ?>