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.

23 lines
630 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. $Data = array();
  5. $Data['success'] = false;
  6. if( isset( $_POST['DID'] ) ){
  7. $ECID = intval( $_POST['DID'] );
  8. $QS = "SELECT * FROM sockets WHERE node_id={$ECID}";
  9. $Result = $DATABASE->Query($QS,false);
  10. foreach( $Result as $CD ){
  11. $cnode['id'] = $CD['id'];
  12. $cnode['name'] = $CD['name'];
  13. $cnode['type'] = $CD['type'];
  14. $cnode['mode'] = $CD['mode'];
  15. $cnode['binded'] = $CD['binded'];
  16. $Data['nodes'][] = $cnode;
  17. };
  18. $Data['success'] = true;
  19. };
  20. echo json_encode( $Data );
  21. } else {
  22. header('location: /');
  23. };
  24. ?>