Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2014
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. case 'play':
  2. if($this->_vlcController->isStarted())
  3. {
  4. if (!$this->checkDataPermission('tracks', $this->input('track_id')))
  5. {
  6. throw new Exception(sprintf('Нет доступа к композиции(id=%s)', $this->input('track_id')));
  7. }
  8. $trackSth = $this->dbh->query(sprintf('
  9. SELECT
  10. vw_tracks.*,
  11. playlist_tracks.vlc_order_number
  12. FROM
  13. vw_tracks
  14. INNER JOIN playlist_tracks on vw_tracks.id = playlist_tracks.track_id
  15. WHERE
  16. vw_tracks.id = %d',
  17. $this->input('track_id')
  18. ));
  19. $track = $trackSth->fetch(PDO::FETCH_ASSOC);
  20. $this->_vlcController->sendCommand(sprintf('goto %d', $track['vlc_order_number']));
  21. $this->_vlcController->sendCommand('play');
  22. Response::redirect(Html::composeUrl('/Aether'));
  23. }
  24. else
  25. {
  26. throw new Exception('Эфир не запущен');
  27. }
  28. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement