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.

51 lines
1.2 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. $Data = array();
  5. $GID = intval($_POST['NID']);
  6. $QS = "SELECT * FROM nodes WHERE site_id ={$GID}";
  7. $Result = $DATABASE->Query( $QS, false );
  8. foreach( $Result as $CD ){
  9. $NodeOK = false;
  10. switch( $CD['type'] ){
  11. case 0:
  12. continue;
  13. $cnode['content'] = 'R-Goose Server';
  14. $cnode['image'] = '/style/assets/0_node.png';
  15. break;
  16. case 1:
  17. $cnode['content'] = 'ALS';
  18. $cnode['image'] = '/style/assets/1_node.png';
  19. $NodeOK = true;
  20. break;
  21. case 2:
  22. $cnode['content'] = 'LFS';
  23. $cnode['image'] = '/style/assets/2_node.png';
  24. $NodeOK = true;
  25. break;
  26. case 3:
  27. $cnode['content'] = 'PLS-200';
  28. $cnode['image'] = '/style/assets/3_node.png';
  29. $NodeOK = true;
  30. break;
  31. case 4:
  32. $cnode['content'] = 'PLS-360';
  33. $cnode['image'] = '/style/assets/4_node.png';
  34. $NodeOK = true;
  35. break;
  36. case 5:
  37. $cnode['content'] = '3DLRF';
  38. $cnode['image'] = '/style/assets/5_node.png';
  39. $NodeOK = true;
  40. break;
  41. default: continue;
  42. };
  43. if( $NodeOK ){
  44. $cnode['id'] = $CD['id'];
  45. $Data[] = $cnode;
  46. };
  47. };
  48. echo json_encode( $Data );
  49. } else {
  50. header('location: /');
  51. };
  52. ?>