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.
24 lines
630 B
24 lines
630 B
<?php
|
|
require_once('../ajax_asm.php');
|
|
if( $CUser->Data['id'] > 1 ){
|
|
$Data = array();
|
|
$Data['success'] = false;
|
|
if( isset( $_POST['DID'] ) ){
|
|
$ECID = intval( $_POST['DID'] );
|
|
$QS = "SELECT * FROM sockets WHERE node_id={$ECID}";
|
|
$Result = $DATABASE->Query($QS,false);
|
|
foreach( $Result as $CD ){
|
|
$cnode['id'] = $CD['id'];
|
|
$cnode['name'] = $CD['name'];
|
|
$cnode['type'] = $CD['type'];
|
|
$cnode['mode'] = $CD['mode'];
|
|
$cnode['binded'] = $CD['binded'];
|
|
$Data['nodes'][] = $cnode;
|
|
};
|
|
$Data['success'] = true;
|
|
};
|
|
echo json_encode( $Data );
|
|
} else {
|
|
header('location: /');
|
|
};
|
|
?>
|