Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Creates a field to select a seat in the seating chart
- function espresso_seating_chart_select($event_id, $booking_info=''){
- global $wpdb;
- $seating_chart_id = seating_chart::check_event_has_seating_chart($event_id);
- if ( $seating_chart_id !== false ){
- ?>
- <div class="event_questions" id="event_seating_chart">
- <p class="event_form_field">
- <label <?php echo is_admin() ? '' : 'style=""'; ?>><?php _e('Select a Seat:', 'event_espresso'); ?></label>
- <a onclick="javascript:document.getElementById('myFocusField').click();" class="helpLink" >Sitzplatz erste Person</a><br>
- <input name="seat_id" id="myFocusField" type="text" class="ee_s_select_seat required" title="<?php _e('Please select a seat.', 'event_espresso'); ?>" value="<?php echo $booking_info ?>" size="30" readonly="readonly" event_id="<?php echo $event_id; ?>" />
- <?php
- $seating_chart = $wpdb->get_row("select * from ".EVENTS_SEATING_CHART_TABLE." where id = $seating_chart_id");
- if (trim($seating_chart->image_name) != "" && file_exists(EVENT_ESPRESSO_UPLOAD_DIR.'seatingchart/images/'.$seating_chart->image_name) ){
- ?>
- <br/>
- <a href="<?php echo EVENT_ESPRESSO_UPLOAD_URL.'seatingchart/images/'.$seating_chart->image_name; ?>" target="_blank"><?php _e('Seating chart image', 'event_espresso'); ?></a>
- <?php
- }
- ?>
- </p>
- </div>
- <?php
- }
- }
- add_action( 'espresso_seating_chart_select', 'espresso_seating_chart_select', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement