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.
 
 
 
 

24 lines
771 B

<?php
require_once('../ajax_asm.php');
require_once('../php/onvif/toto.php');
if( $CUser->Data['id'] > 1 ){
if( $CUser->Data['access'] > 5 ){
$QS = "SELECT al.*, ur.login FROM access_log al LEFT JOIN users ur ON (al.user_id = ur.id ) ORDER BY id DESC";
$Result = $DATABASE->Query($QS,false);
foreach( $Result as $CD ){
$cnode['id'] = intval( $CD['id'] );
$cnode['user'] = $CD['login'];
$cnode['ts']= $CD['ts'];
$cnode['cmd'] = intval( $CD['cmd'] );
$cnode['data_line'] = $CD['dataset'];
$Data['records'][] = $cnode;
};
} else {
$Data['records'] = array();
};
$Data['totalCount']= count($Data['records']);
echo json_encode( $Data );
} else {
header('location: /');
};
?>