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.

36 lines
885 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 && $CUser->Data['access'] > 5 ){
  4. $Data = array();
  5. $Data['success'] = false;
  6. if( isset( $_POST['OPID'] ) ){
  7. $CMD = intval( $_POST['OPID'] );
  8. } else {
  9. $CMD = 0;
  10. };
  11. if( $CMD > 0 ){
  12. switch( $CMD ){
  13. case 1:{//Debug Mode
  14. $PARAM = intval( $_POST['OPCODE'] );
  15. $QS = "UPDATE `system_props` SET `working_mode`={$PARAM}";
  16. $DATABASE->Query( $QS );
  17. $Data['q'] = $QS;
  18. $Data['success'] = true;
  19. break;
  20. };
  21. case 2:{//Layout
  22. $PARAM = intval( $_POST['OPCODE'] );
  23. $QS = "UPDATE `system_props` SET `app_layout`={$PARAM}";
  24. $DATABASE->Query( $QS );
  25. $Data['q'] = $QS;
  26. $Data['success'] = true;
  27. break;
  28. };
  29. };
  30. } else {
  31. $Data['msg']='Wrong Parameters!';
  32. };
  33. echo json_encode( $Data );
  34. exit();
  35. };
  36. header('location: /');
  37. ?>