function albums_rows($rows) { global $wpdb; if (!$rows) { ?> <tr class="empty"> <td colspan="5"><p>No Albums Found</p></td> </tr> <?php } else { ?> <?php $album = new WT_Album(); foreach ($rows as $row) { echo get_album_row_html($album->db_out($row)); } } }
if ($id) { $venue = new WT_Venue($id); $venue->set_default(""); $venue->db_response("json"); } break; // ALBUM // ALBUM case "get_album": $album = new WT_Album($_POST["album_id"]); if (!empty($_POST["album_id"])) { $album->retrieve(); } else { $album->defaults(); } echo json_encode($album->db_out(null, 0)); break; case "insert_album": $album = new WT_Album(); $album->insert($_POST); $album->db_response("json"); break; case "update_album": $album = new WT_Album($_POST["album_id"]); $album->update($_POST); $album->db_response("json"); break; case "quickupdate_album": $album = new WT_Album($_POST["album_id"]); $album->quick_update($_POST); $album->db_response("json");