Example #1
0
 public function execute()
 {
     if (false === ($this->song = Slay_Song::getByID(Common::getGetString('song')))) {
         return $this->module->error('err_song');
     }
     return $this->templateSong();
 }
Example #2
0
 public static function getNowPlaying(Module_Slaytags $module)
 {
     # Only once on fresh install!
     if (false === ($stid = GWF_Settings::getSetting(self::NP_KEY, false))) {
         return self::querySlay($module);
     }
     # Live show?
     if ($stid === '0') {
         if (self::timedOut()) {
             echo "Timed out<br/>\n";
             return self::querySlay($module);
         } else {
             return self::dummySong($module, self::LIVE_ERROR, self::getTimeLeft());
         }
     }
     # DB Error should not happen
     if (false === ($np = Slay_Song::getByID($stid))) {
         return self::querySlay($module);
         # Simply query again
     }
     if (self::timedOut()) {
         Slay_PlayHistory::insertPlayed($np, self::getEndTime());
         return self::querySlay($module);
     }
     return $np;
 }
Example #3
0
 public function execute()
 {
     if (false === ($song = Slay_Song::getByID(Common::getGetString('stid')))) {
         return $this->module->error('err_song');
     }
     if (isset($_POST['add'])) {
         return $this->onAddLyrics($song) . $this->templateAddLyrics($song);
     }
     return $this->templateAddLyrics($song);
 }
Example #4
0
 public function execute()
 {
     if (false === ($song = Slay_Song::getByID(Common::getGetString('stid')))) {
         return $this->module->error('err_song');
     }
     $this->module->includeClass('Slay_KeySelect');
     if (isset($_POST['edit'])) {
         return $this->onEdit($song) . $this->templateEdit($song);
     }
     if (isset($_POST['flush_tags'])) {
         return $this->onFlushTagsA($song) . $this->templateEdit($song);
     }
     return $this->templateEdit($song);
 }