format(); break; case 'artist_row': $artist = new Artist($_GET['id']); $artist->format(); break; case 'song_row': $song = new Song($_GET['id']); $song->format(); break; case 'live_stream_row': $radio = new Radio($_GET['id']); $radio->format(); break; case 'playlist_row': case 'playlist_title': $playlist = new Playlist($_GET['id']); $playlist->format(); // If the current user is the owner, only user is required if ($playlist->user == $GLOBALS['user']->id) { $level = '25'; } break; case 'smartplaylist_row': case 'smartplaylist_title': $playlist = new Search('song', $_GET['id']); $playlist->format(); if ($playlist->user == $GLOBALS['user']->id) { $level = '25'; } break; default: exit(); } // end switch on type // Make sure they got them rights if (!Access::check('interface', $level)) { break; } ob_start(); require AmpConfig::get('prefix') . '/templates/show_edit_' . $_GET['type'] . '.inc.php'; $results = ob_get_contents(); ob_end_clean(); break; default: exit(); } // end switch action echo $results;