Esempio n. 1
0
 public function sortSong($post)
 {
     $id = str_replace('song_', '', $post['song_id']);
     $newPosition = $post['position'];
     $temp_ids = explode('_', $post['parent_id']);
     $pb_id = $temp_ids[1];
     $pl_id = $temp_ids[2];
     $song = new playlistSong();
     $song->getSongByID($id);
     $song->getPosition($pl_id);
     if ($pb_id == 'uebrige') {
         $song->eraseFromPlaylist();
     } else {
         $block = new playlist_bloecke();
         $block->getBlockByID($pb_id);
         $block->getSongs();
         $block->resortSongs($newPosition, $id);
     }
     $this->getAndReturnPlayZeiten($pl_id);
 }
Esempio n. 2
0
File: ajax.php Progetto: hlag/svs
 private function savePause($pb_id, $pause)
 {
     $block = new playlist_bloecke();
     $block->getBlockByID($pb_id);
     $block->setPause($pause);
     $block->saveBlock();
     $pl = new playlist();
     $pl->getPlaylistByID($block->pl_id);
     $retval = $pl->getDataForJson();
     echo json_encode($retval);
 }