function tour_rows($rows) { global $wpdb; if (!$rows) { ?> <tr class="empty"> <td colspan="3"><p>No Tours Found</p></td> </tr> <?php } else { ?> <?php $tour = new WT_Tour(); foreach ($rows as $row) { echo get_tour_row_html($tour->db_out($row)); } } }
function wt_get_tour($artist_id = 0, $order = "order") { $order = $order == "order" ? "tour_order" : "tour_name"; $data = array(); if ($artist_id) { $data = WT_Tour::all_by_artist($artist_id, $order); } else { $data = WT_Tour::all($order); } foreach ($data as $key => $value) { $data[$key] = WT_Tour::tpl(WT_Tour::db_out($value)); } return $data; }
echo "<a class='ui-selectee' href='#'><strong>{$artist['artist_name']}</strong></a>"; } ?> </div> <?php } if ($_GET["page"] == "all_tour") { $tours = WT_Tour::all(); $tourObj = new WT_Tour(); ?> <div class="wordtour-selectable"> <?php foreach ($tours as $value) { $tour = $tourObj->db_out($value); echo "<a class='ui-selectee' href='#'><strong>{$tour['tour_name']}</strong></a>"; } ?> </div> <?php } if ($_GET["page"] == "venues") { $is_default = $_wt_options->options("default_venue") == $venue_id ? 1 : 0; ?> <div id="dialog-alert" class='wordtour-alert'></div> <form> <input type="hidden" name="_venue_nonce"></input> <input type="hidden" name="venue_id"></input> <?php
if ($id) { $artist = new WT_Artist($id); $artist->set_default(""); $artist->db_response("json"); } break; // TOUR // TOUR case "get_tour": $tour = new WT_Tour($_POST["tour_id"]); if (!empty($_POST["tour_id"])) { $tour->retrieve(); } else { $tour->defaults(); } echo json_encode($tour->db_out(null, 0)); break; case "update_tour": $tour = new WT_Tour($_POST["tour_id"]); $tour->update($_POST); $tour->db_response("json"); break; case "quickupdate_tour": $tour = new WT_Tour($_POST["tour_id"]); $tour->quick_update($_POST); $tour->db_response("json"); break; case "insert_tour": $tour = new WT_Tour(); $tour->insert($_POST); $tour->db_response("json");