Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <select name="region" class="em-events-search-region">
- <option value=''><?php echo get_option('dbem_search_form_regions_label'); ?></option>
- <?php if ( !is_user_logged_in() ) { ?>
- <option value='Africa'>Africa</option>
- <!--
- <option value='Asia'>Asia</option>
- -->
- <option value='AUS/NZL'>AUS/NZL</option>
- <option value='Europe'>Europe</option>
- <option value='N-America'>N-America</option>
- <option value='S-America'>S-America</option>
- <?php } else {
- if( !empty($region) )
- {
- // get the countries from locations table
- global $wpdb;
- $em_region = $wpdb->get_results($wpdb->prepare("SELECT DISTINCT location_region FROM ".EM_LOCATIONS_TABLE." WHERE location_region IS NOT NULL AND location_region != '' AND location_country=%s AND location_status=1 ORDER BY location_region ASC", $country), ARRAY_N);
- foreach($em_region as $region)
- {
- ?>
- <option <?php echo (!empty($_REQUEST['region']) && $_REQUEST['region'] == $region[0]) ? 'selected="selected"':''; ?>><?php echo esc_html($region[0]); ?></option>
- <?php
- }
- }
- }
- ?>
- </select>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement