Web Interface For Lite Argus Control modules
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.
 
 
 
 

52 lines
1.2 KiB

<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$Data = array();
$GID = intval($_POST['NID']);
$QS = "SELECT * FROM nodes WHERE site_id ={$GID}";
$Result = $DATABASE->Query( $QS, false );
foreach( $Result as $CD ){
$NodeOK = false;
switch( $CD['type'] ){
case 0:
continue;
$cnode['content'] = 'R-Goose Server';
$cnode['image'] = '/style/assets/0_node.png';
break;
case 1:
$cnode['content'] = 'ALS';
$cnode['image'] = '/style/assets/1_node.png';
$NodeOK = true;
break;
case 2:
$cnode['content'] = 'LFS';
$cnode['image'] = '/style/assets/2_node.png';
$NodeOK = true;
break;
case 3:
$cnode['content'] = 'PLS-200';
$cnode['image'] = '/style/assets/3_node.png';
$NodeOK = true;
break;
case 4:
$cnode['content'] = 'PLS-360';
$cnode['image'] = '/style/assets/4_node.png';
$NodeOK = true;
break;
case 5:
$cnode['content'] = '3DLRF';
$cnode['image'] = '/style/assets/5_node.png';
$NodeOK = true;
break;
default: continue;
};
if( $NodeOK ){
$cnode['id'] = $CD['id'];
$Data[] = $cnode;
};
};
echo json_encode( $Data );
} else {
header('location: /');
};
?>