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.
30 lines
913 B
30 lines
913 B
<?php
|
|
require_once('../ajax_asm.php');
|
|
|
|
if( $CUser->Data['id'] > 1 ){
|
|
if( $CUser->Data['access'] > 5 ){
|
|
$Records = array();
|
|
$QS = "SELECT * FROM `server_log_messages` ORDER BY `ts` DESC, `id` DESC LIMIT 64";
|
|
$DATA = $DATABASE->Query( $QS );
|
|
$LID = 0;
|
|
$AID = 1;
|
|
foreach( $DATA as $DATUM ){
|
|
$cnode['id'] = $DATUM['id'];
|
|
$cnode['type']=$DATUM['lvl'];
|
|
$cnode['ts'] = $DATUM['ts'];
|
|
$TArr = explode( ':', $DATUM['msg'] );
|
|
$TBrr = explode( ' ', $TArr[0] );
|
|
$cnode['ptr'] = $TBrr[0];
|
|
$cnode['module'] = $TBrr[1];
|
|
$cnode['msg'] = substr( $DATUM['msg'], strlen( $cnode['ptr'] )+strlen( $cnode['module'] )+2 );
|
|
$Records['records'][] = $cnode;
|
|
};
|
|
} else {
|
|
$Records['records'] = array();
|
|
};
|
|
$Records['totalCount']= count($Records['records']);
|
|
echo json_encode( $Records );
|
|
} else {
|
|
header('location: /');
|
|
};
|
|
?>
|