processor.php 707 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * [WeEngine System] Copyright (c) 2014 WE7.CC
  4. * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
  5. */
  6. defined('IN_IA') or exit('Access Denied');
  7. class MusicModuleProcessor extends WeModuleProcessor {
  8. public function respond() {
  9. global $_W;
  10. $rid = $this->rule;
  11. $sql = "SELECT * FROM " . tablename('music_reply') . " WHERE `rid`=:rid ORDER BY RAND()";
  12. $item = pdo_fetch($sql, array(':rid' => $rid));
  13. if (empty($item['id'])) {
  14. return false;
  15. }
  16. return $this->respMusic(array(
  17. 'Title' => $item['title'],
  18. 'Description' => $item['description'],
  19. 'MusicUrl' => $item['url'],
  20. 'HQMusicUrl' => $item['hqurl'],
  21. ));
  22. }
  23. }