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.

21 lines
518 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. $NID = intval($_POST['NID']);
  5. $Data = array();
  6. if( $NID ){
  7. $QS = "SELECT * FROM nodes WHERE id={$NID}";
  8. $result = $DATABASE->Query( $QS, false );
  9. if( count( $result ) ){
  10. $Data['success'] = deleteNode( $NID );
  11. } else {
  12. $Data['error'] = 'Unknown Node ID Provided!';
  13. };
  14. } else {
  15. $Data['error'] = 'Unknown Node ID Provided!';
  16. };
  17. echo json_encode( $Data );
  18. exit();
  19. };
  20. header('location: /');
  21. ?>