Web UI for ARGUS server
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.

21 lines
617 B

​
​
​
​
​
​
4 years ago
​
​
4 years ago
​
​
​
​
​
​
​
​
​
  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['SITE'] ) ){
  7. $SiteID = intval( $_POST['SITE'] );
  8. $QS = "SELECT `aux_id`, `name` FROM `nodes` WHERE `site_id`={$SiteID} AND `type`=0";
  9. $Result = $DATABASE->Query($QS,false);
  10. $Data['servers'] = array();
  11. foreach( $Result as $CD ){
  12. $cnode['server_id'] = $CD['aux_id'];
  13. $cnode['server_name'] = $CD['name'];
  14. $Data['servers'][] = $cnode;
  15. };
  16. $Data['success'] = true;
  17. };
  18. echo json_encode( $Data );
  19. } else {
  20. header('location: /');
  21. };
  22. ?>