} echo json_encode($artist->db_out(null, 0)); break; case "update_artist": $artist = new WT_Artist($_POST["artist_id"]); $artist->update($_POST); $artist->db_response("json"); break; case "quickupdate_artist": $artist = new WT_Artist($_POST["artist_id"]); $artist->quick_update($_POST); $artist->db_response("json"); break; case "insert_artist": $artist = new WT_Artist(); $artist->insert($_POST); $artist->db_response("json"); break; case "delete_artist": unset($_POST["action"]); $artist = new WT_Artist($_POST["artist_id"]); $artist->delete($_POST["_nonce"]); $artist->db_response("json"); break; case "delete_all_artists": unset($_POST["action"]); if ($_POST["id"]) { $artist = new WT_Artist(); $artist->delete_all(json_decode(stripslashes($_POST["id"])), $_POST["_nonce"]); $artist->db_response("json"); }