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.

35 lines
968 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. $Data['status'] = 'error';
  5. if( $CUser->Data['access'] > 5 ){
  6. if( isset( $_POST['MODE'] ) ){
  7. $MODE = intval( $_POST['MODE'] );
  8. switch( $MODE ){
  9. case 0:{
  10. $Data['msg']='Module ID not Defined!';
  11. if( isset( $_POST['MID'] ) ){
  12. $MID = intval( $_POST['MID'] );
  13. if( $MID ){
  14. unset( $Data['msg'] );
  15. $Data['status'] = 'ok';
  16. $QS = "SELECT `status`, `values`, `crossbar_a`,`crossbar_b`,`crossbar_c`,`crossbar_d` WHERE `id`={$MID}";
  17. $RR = $DATABASE->Query( $QS, false );
  18. $VV = intval( $RR[0]['values'];
  19. $VO = $VV & 0xFF;
  20. $VI = ($VV >> 8 ) & 0xFF;
  21. };
  22. };
  23. break;
  24. };
  25. };
  26. } else $Data['msg']='Mode not Defined!';
  27. } else {
  28. $Data['msg']='Access Denied!';
  29. };
  30. echo json_encode( $Data );
  31. } else {
  32. header('location: /');
  33. };
  34. ?>