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
605 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. $UID = intval( $CUser->Data['id'] );
  4. $ACCESS = intval( $CUser->Data['access'] );
  5. $Data = array();
  6. $Data['sattus']='ERRROR';
  7. if( $UID > 1 ){
  8. if( isset( $_POST['MID'] ) ){
  9. $MID = intval($_POST['MID']);
  10. if( $MID ){
  11. $QS = "DELETE FROM `location_maps` WHERE `id`={$MID} AND `persistent`=0";
  12. $DATABASE->Query( $QS );
  13. $QS = "UPDATE `system_props` SET `map_id`=1, `local_binding`=0 WHERE `id`=1";
  14. $DATABASE->Query( $QS );
  15. $Data['sattus']='OK';
  16. };
  17. }
  18. } else {
  19. };
  20. echo json_encode( $Data );
  21. ?>