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.
 
 
 
 

22 lines
617 B

<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$Data = array();
$Data['success'] = false;
if( isset( $_POST['SITE'] ) ){
$SiteID = intval( $_POST['SITE'] );
$QS = "SELECT `aux_id`, `name` FROM `nodes` WHERE `site_id`={$SiteID} AND `type`=0";
$Result = $DATABASE->Query($QS,false);
$Data['servers'] = array();
foreach( $Result as $CD ){
$cnode['server_id'] = $CD['aux_id'];
$cnode['server_name'] = $CD['name'];
$Data['servers'][] = $cnode;
};
$Data['success'] = true;
};
echo json_encode( $Data );
} else {
header('location: /');
};
?>