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: /'); }; ?>