function venue_rows($rows) { global $wpdb; if (!$rows) { ?> <tr class="empty"> <td colspan="5"><p>No Venues Found</p></td> </tr> <?php return; } else { ?> <?php $venue = new WT_Venue(); foreach ($rows as $row) { echo get_venue_row_html($venue->db_out($row)); } } }
public function get_venue_id($venue_id = 0) { if ($venue_id) { $venue = new WT_Venue($venue_id); $venue->retrieve(); return $this->save_venue($venue->db_out(null, 0), 0); } return 0; }
foreach ($states as $code => $name) { echo "<a class='ui-selectee' href='{$name}'><strong>{$name}</strong></a>"; } ?> </div> <?php } if ($_GET["page"] == "all_venues") { $venues = WT_Venue::all(); $venueObj = new WT_Venue(); ?> <div class="wordtour-selectable"> <?php foreach ($venues as $value) { $venue = $venueObj->db_out($value); $address = array(); if (!empty($venue["venue_city"])) { $address[] = $venue["venue_city"]; } if (!empty($venue["venue_state"])) { $address[] = $venue["venue_state"]; } if (!empty($venue["venue_country"])) { $address[] = $venue["venue_country"]; } echo "<a class='ui-selectee' href='#'><strong>{$venue['venue_name']}</strong><br/><small>" . implode(",", $address) . "</small></a>"; } ?> </div>
case "get_event_rsvp": if (!empty($_POST["event_id"])) { $event = new WT_Event($_POST["event_id"]); echo json_encode($event->get_rsvp_users()); } break; // VENUE // VENUE case "get_venue": $venue = new WT_Venue($_POST["venue_id"]); if (!empty($_POST["venue_id"])) { $venue->retrieve(); } else { $venue->defaults(); } echo json_encode($venue->db_out(null, 0)); break; case "update_venue": $venue = new WT_Venue($_POST["venue_id"]); $venue->update($_POST); $venue->db_response("json"); break; case "quickupdate_venue": $venue = new WT_Venue($_POST["venue_id"]); $venue->quick_update($_POST); $venue->db_response("json"); break; case "insert_venue": $venue = new WT_Venue(); $venue->insert($_POST); $venue->db_response("json");