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.
 
 
 
 

31 lines
1.3 KiB

<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$EID = intval( $_POST['EVENT'] );
$QS = "SELECT * FROM events_cloud WHERE id = {$EID}";
$Result = $DATABASE->Query( $QS, false );
if( count( $Result ) ){
$Props = $Result[0];
$QS="SELECT * FROM nodes WHERE id={$Props['node_id']}";
$RR = $DATABASE->Query( $QS );
$CC = $RR[0];
$Type = intval( $Props['type'] );
$TName = 'props/event_prop.js';
$Data = file_get_contents( $TName );
$Data = str_replace('%%%NODEID%%%', $Props['node_id'], $Data );
$Data = str_replace('%%%TYPE%%%', $CC['type'], $Data );
$Data = str_replace('%%%NAME%%%', $CC['name'], $Data );
$Data = str_replace('%%%AZIMUTH%%%', sprintf( "%0.2f", $Props['azimuth']), $Data );
$Data = str_replace('%%%ELEVETION%%%', sprintf( "%0.2f", $Props['elevation']), $Data );
$Data = str_replace('%%%RANGE%%%', sprintf( "%0.2f", $Props['range']), $Data );
$Data = str_replace('%%%LON%%%', sprintf( "%0.8f", $Props['lon']), $Data );
$Data = str_replace('%%%LAT%%%', sprintf( "%0.8f", $Props['lat']), $Data );
$Data = str_replace('%%%ALT%%%', sprintf( "%0.1f", $Props['alt']), $Data );
echo $Data;
} else {
echo '{ html: \'Node '.$_POST['NODE'].' Loadded\'}';
};
} else {
header('location: /');
};
?>