Data['id'] > 1 ){ $Node = intval( $_POST['NODE'] ); $QS = "SELECT * FROM nodes WHERE id = {$Node}"; $Result = $DATABASE->Query( $QS, false ); if( count( $Result ) ){ $Props = $Result[0]; $Type = intval( $Props['type'] ); $TName = 'props/'.$Type.'_node_prop.js'; $Data = file_get_contents( $TName ); switch( $Type ){ case ARGUS_3D_SENSOR:{ $Data = str_replace('%%%NODEID%%%', ''.$Node, $Data ); $Data = str_replace('%%%NODENAME%%%', $Props['name'] , $Data ); //Info $InfoData = ''; $InfoParts = array(); $InfoParts[] = '{ xtype: \'panel\', html: \'
'.$Server['identity'].'
\'}'; switch( intval($Props['online']) ){ case 0: $InfoParts[] = '{ xtype: \'panel\', html: \'
Offline
\'}'; break; case 1: $InfoParts[] = '{ xtype: \'panel\', html: \'
Handler Online
\'}'; break; case 3: $InfoParts[] = '{ xtype: \'panel\', html: \'
Master Online
\'}'; break; case 5: $InfoParts[] = '{ xtype: \'panel\', html: \'
Slave Online
\'}'; break; case 7: $InfoParts[] = '{ xtype: \'panel\', html: \'
Device Online
\'}'; break; }; $InfoData = implode( ',', $InfoParts ); $Data = str_replace('%%%INFO%%%', $InfoData, $Data ); break; }; }; echo $Data; } else { echo '{ html: \'Node '.$_POST['NODE'].' Loadded\'}'; }; } else { header('location: /'); }; ?>