public function getSongs($status) { if ($status == 'all') { $songs = AGDO::getInstance()->GetAll("SELECT * FROM SVsongs LEFT OUTER JOIN sv_song_genres ON g_id = website ORDER BY title"); } elseif ($status == 'repertoire') { $songs = AGDO::getInstance()->GetAll("SELECT * FROM SVsongs LEFT OUTER JOIN sv_song_genres ON g_id = website WHERE probe != 1 AND probe != 5 ORDER BY title"); } elseif ($status == 'uebrige') { $songs = AGDO::getInstance()->GetAll("SELECT * FROM SVsongs LEFT OUTER JOIN sv_song_genres ON g_id = website WHERE probe != 1 AND probe != 5 ORDER BY g_id, title"); } elseif ($status == 'erschienen') { $songs = AGDO::getInstance()->GetAll("SELECT * FROM SVsongs LEFT OUTER JOIN sv_song_genres ON g_id = website ORDER BY erschienen DESC"); } elseif ($status == 2) { $dringend = AGDO::getInstance()->GetAll("SELECT * FROM SVsongs LEFT OUTER JOIN sv_song_genres ON g_id = website WHERE probe = 3 ORDER BY title"); $proben = AGDO::getInstance()->GetAll("SELECT * FROM SVsongs LEFT OUTER JOIN sv_song_genres ON g_id = website WHERE probe = 2 ORDER BY title"); $sonstige = AGDO::getInstance()->GetAll("SELECT * FROM SVsongs LEFT OUTER JOIN sv_song_genres ON g_id = website WHERE probe = 4 ORDER BY letzteProbe"); $songs = array_merge($dringend, $proben, $sonstige); } elseif ($status == 5) { $songs = AGDO::getInstance()->GetAll("SELECT * FROM SVsongs LEFT OUTER JOIN sv_song_genres ON g_id = website WHERE\n angefangen > '" . date("Y-m-d", time() - 3600 * 24 * 21) . "' OR probe = '5' ORDER BY angefangen DESC"); } else { $songs = AGDO::getInstance()->GetAll("SELECT * FROM SVsongs LEFT OUTER JOIN sv_song_genres ON g_id = website WHERE probe = '" . $status . "' ORDER BY title"); } foreach ($songs as $song) { $song['b'] = $song['c']; $song['arr_b'] = $song['arr_c']; $song['arr_t'] = ''; $song['arr_p'] = ''; $S = new Song(); $S->setSong($song); $this->songs[$song['id']] = $S; } return $this->songs; }
public function setSong($song) { parent::setSong($song); $this->ps_id = $song['ps_id']; $this->pl_id = $song['pl_id']; $this->pb_id = $song['pb_id']; $this->pl_datum = $song['pl_datum']; $this->setPlayedButton(); }