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

  1. <?php
  2. if (isset($_POST['radio'])) {
  3. radioControl($_POST['radio']);
  4. }
  5. function radioControl($digit) {
  6. switch ($digit) {
  7. case '1':
  8. shell_exec('mpc play 1');
  9. break;
  10. case '2':
  11. shell_exec('mpc play 2');
  12. break;
  13. case '3':
  14. shell_exec('mpc play 3');
  15. break;
  16. default:
  17. shell_exec('mpc stop');
  18. break;
  19. }
  20. }
  21. ?>