Events Manager - Version 5.9.6

Version Description

  • fixed monthly recurrence pattern issues with PHP <5.6
  • fixed multiple minor PHP Warnings including Countable errors when saving a booking in PHP 7.2+
  • added em_bookings_table_get_bookings_args filter, allowing ordering and more for bookings admin tables
  • added Faroe Islands to countries list
  • added custom dataset variable for EM_Options, added ability to save dbem_data array options in settings page
  • fixed publishing issues with long multibyte character post titles in recurring events
  • added em_mailer_before_send action to EM_Mailer->send() just before a mail is sent
  • added em_javascript_loaded jQuery trigger
  • added ability to send attachments via WP_Mail in EM_Mailer::send(), provided the transport used by it allows
  • added recurring event placeholders #RECURRINGDATERANGE, #_RECURRINGPATTERN, #RECURRINGID
  • fixed incorrectly named #EDITLOCATIONURL and #_EDITLOCATIONLINK which were previouly (and still are) working under #LOCATIONEDITLINK and #_LOCATIONEDITURL
  • fixed pagination for calendar day archives when formatting is disabled
  • added custom tabs hooks to settings page (including multisite which now has a default single tab)
  • added id property to each EM_Admin_Notice that is output to screen
  • optimized EM_Admin_Notices::add() so that strings are assumed to be hooks and no extra logic necessary to register the notice initially
  • added em_booking_pre_calculate_price hook
  • fixed potential PHP warning when editing other CPTs with galleries
  • fixed some incorrect ticket end times related to saving rsvp end dates for recurring events in single ticket mode with blank end dates/times
  • fixed inconsistent rsvp_end __set() compared to end and start properties,
  • fixed event rsvp ending at 12:00 instead of event time when no date is supplied in single ticket mode,
  • unified PHP get_post logic of start/end date/time recurrence info for tickets to reduce redundant code
  • fixed invalid rsvp end date persisting unless changed when first saving an event with blank start date
  • potentially-breaking for custom code email filters changed $output_type/$target method param in EM_Booking::email() calls to EM_Booking::output() function calls to 'email', use get_option('dbem_smtp_html') to determine whether to use HTML or not if using that format
  • changed event category/tag and location lists to not include pagination in emails due to lack of predictability for pagination links
  • added css tweaks to to admin single booking view and modify booking form in dashboard area
  • fixed lack or confirm-redirect for no-user booking personal details editor when viewing a single booking
  • fixed edit/delete links showing in post admin lists to users without the right caps (clicking these links had no result)
  • added some strict_type future-proofing to EM_DateTime class
  • added em_event_detach and em_event_attach filters
  • fixed location coordinates not being supplied for examct Gmap pin placement when auto-complete attaching a location to an event,
  • fixed double google API call when choosing an existing location via auto-complete search
  • changed #_LOCATIONMAP so no 'map unavailable' messgage is shown if google maps are disabled
  • fixed google maps location bubble CSS formatting issues in admin area
  • changed datepicker to show relative year range dropdown selector according to currently selected date, allowing for flexible year selection
  • fixed potential stored XSS vulnerability, many thanks to Tobias Fink of SBA-Research for a good eye and responsible (pending) disclosure
  • fixed lack of validation when submitting tickets with higher min spaces than max spaces allowed in the ticket
  • added username to exportable/viewable field columns in booking admin
  • fixed embedded maps display errors when there is an & character in name or address
  • fixed certain recurrence patterns with "last x of the month" skipping months
  • fixed recurring events showing location meta boxes and columns when locations are disabled
  • fixed event count not showing up in event profile tab
  • fixed events admin table front-end showing location column when locations disabled,
  • fixed location placeholders getting processed if locations are disabled
  • fixed yearly recurring events not working for any value other than 1 yearly interval
  • fixed precision inconsistencies between location coordinates in wp_postmeta and wp_em_locations by changing mysql FLOAT to DECIMAL and rounding numbers on $_POST retrieval
  • fixed ticket prices input/display in event admin not accepting localized decimal separators
  • fixed minor CSS validation errors in events_manager.css
  • fixed #_BOOKINGDATE not working on first automated sent email
  • fixed port assignation errors in SMTP mail settings
  • pre-emptively hardened some lines of code as recommended by the wordpress security team
Download this release

Release Info

Developer netweblogic
Plugin Icon 128x128 Events Manager
Version 5.9.6
Comparing to
See all releases

Code changes from version 5.9.5 to 5.9.6

admin/em-bookings.php CHANGED
@@ -188,288 +188,286 @@ function em_bookings_single(){
188
  <?php esc_html_e('Edit Booking', 'events-manager'); ?>
189
  <?php if( !is_admin() ): ?></h2><?php else: ?></h1><?php endif; ?>
190
  <?php if( !is_admin() ) echo $EM_Notices; ?>
191
- <div id="poststuff" class="metabox-holder">
192
- <div id="post-body">
193
- <div id="post-body-content">
194
- <div class="stuffbox">
195
- <h3>
196
- <?php esc_html_e( 'Event Details', 'events-manager'); ?>
197
- </h3>
198
- <div class="inside">
199
- <?php
200
- $EM_Event = $EM_Booking->get_event();
201
- ?>
202
- <table>
203
- <tr><td><strong><?php esc_html_e('Name','events-manager'); ?></strong></td><td><a class="row-title" href="<?php echo $EM_Event->get_bookings_url(); ?>"><?php echo ($EM_Event->event_name); ?></a></td></tr>
204
- <tr>
205
- <td><strong><?php esc_html_e('Date/Time','events-manager'); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong></td>
206
- <td>
207
- <?php echo $EM_Event->output('#_EVENTDATES @ #_EVENTTIMES'); ?>
208
- </td>
209
- </tr>
210
- </table>
211
- <?php do_action('em_bookings_admin_booking_event', $EM_Event); ?>
 
 
 
 
 
 
 
 
 
 
 
212
  </div>
213
- </div>
214
- <div class="stuffbox">
215
- <h3>
216
- <?php esc_html_e( 'Personal Details', 'events-manager'); ?>
217
- </h3>
218
- <div class="inside">
219
- <div class="em-booking-person-details">
220
- <?php echo $EM_Booking->get_person()->display_summary(); ?>
221
- <?php if( $EM_Booking->is_no_user() ): ?>
222
- <input type="button" class="button-secondary" id="em-booking-person-modify" value="<?php esc_attr_e('Edit Details','events-manager'); ?>" />
223
- <?php endif; ?>
224
  </div>
225
- <?php if( $EM_Booking->is_no_user() ): ?>
226
- <form action="" method="post" class="em-booking-person-form">
227
- <div class="em-booking-person-editor" style="display:none;">
228
- <?php echo $EM_Booking->get_person_editor(); ?>
229
- <input type='hidden' name='action' value='booking_modify_person'/>
230
- <input type='hidden' name='booking_id' value='<?php echo $EM_Booking->booking_id; ?>'/>
231
- <input type='hidden' name='event_id' value='<?php echo $EM_Event->event_id; ?>'/>
232
- <input type='hidden' name='_wpnonce' value='<?php echo wp_create_nonce('booking_modify_person_'.$EM_Booking->booking_id); ?>'/>
233
- <input type="submit" class="button-primary em-button em-booking-person-modify-submit" id="em-booking-person-modify-submit" value="<?php esc_attr_e('Submit Changes', 'events-manager'); ?>" />
234
- <input type="button" id="em-booking-person-modify-cancel" class="button-secondary em-button" value="<?php esc_attr_e('Cancel','events-manager'); ?>" />
235
- </div>
236
- </form>
237
- <script type="text/javascript">
238
- jQuery(document).ready( function($){
239
- $('#em-booking-person-modify').click(function(){
240
- $('.em-booking-person-details').hide();
241
- $('.em-booking-person-editor').show();
242
- });
243
- $('#em-booking-person-modify-cancel').click(function(){
244
- $('.em-booking-person-details').show();
245
- $('.em-booking-person-editor').hide();
246
- });
247
  });
248
- </script>
249
- <?php endif; ?>
250
- <?php do_action('em_bookings_admin_booking_person', $EM_Booking); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
251
  </div>
252
- </div>
253
- <div class="stuffbox">
254
- <h3>
255
- <?php esc_html_e( 'Booking Details', 'events-manager'); ?>
256
- </h3>
257
- <div class="inside">
258
- <?php
259
- $EM_Event = $EM_Booking->get_event();
260
- $shown_tickets = array();
261
- ?>
262
- <div>
263
- <form action="" method="post" class="em-booking-single-status-info">
264
- <strong><?php esc_html_e('Status','events-manager'); ?> : </strong>
265
- <?php echo $EM_Booking->get_status(); ?>
266
- <input type="button" class="button-secondary em-button em-booking-submit-status-modify" id="em-booking-submit-status-modify" value="<?php esc_attr_e('Change', 'events-manager'); ?>" />
267
- <input type="submit" class="button-primary em-button em-booking-resend-email" id="em-booking-resend-email" value="<?php esc_attr_e('Resend Email', 'events-manager'); ?>" />
268
- <input type='hidden' name='action' value='booking_resend_email'/>
269
- <input type='hidden' name='booking_id' value='<?php echo $EM_Booking->booking_id; ?>'/>
270
- <input type='hidden' name='event_id' value='<?php echo $EM_Event->event_id; ?>'/>
271
- <input type='hidden' name='_wpnonce' value='<?php echo wp_create_nonce('booking_resend_email_'.$EM_Booking->booking_id); ?>'/>
272
- </form>
273
- <form action="" method="post" class="em-booking-single-status-edit">
274
- <strong><?php esc_html_e('Status','events-manager'); ?> : </strong>
275
- <select name="booking_status">
276
- <?php foreach($EM_Booking->status_array as $status => $status_name): ?>
277
- <option value="<?php echo esc_attr($status); ?>" <?php if($status == $EM_Booking->booking_status){ echo 'selected="selected"'; } ?>><?php echo esc_html($status_name); ?></option>
 
 
 
 
 
 
 
 
 
 
 
278
  <?php endforeach; ?>
279
- </select>
280
- <input type="checkbox" checked="checked" name="send_email" value="1" />
281
- <?php esc_html_e('Send Email','events-manager'); ?>
282
- <input type="submit" class="button-primary em-button em-booking-submit-status" id="em-booking-submit-status" value="<?php esc_attr_e('Submit Changes', 'events-manager'); ?>" />
283
- <input type="button" class="button-secondary em-button em-booking-submit-status-cancel" id="em-booking-submit-status-cancel" value="<?php esc_attr_e('Cancel', 'events-manager'); ?>" />
284
- <input type='hidden' name='action' value='booking_set_status'/>
285
- <input type='hidden' name='booking_id' value='<?php echo $EM_Booking->booking_id; ?>'/>
286
- <input type='hidden' name='event_id' value='<?php echo $EM_Event->event_id; ?>'/>
287
- <input type='hidden' name='_wpnonce' value='<?php echo wp_create_nonce('booking_set_status_'.$EM_Booking->booking_id); ?>'/>
288
- <br /><em><?php echo wp_kses_data(__('<strong>Notes:</strong> Ticket availability not taken into account when approving new bookings (i.e. you can overbook).','events-manager')); ?></em>
289
- </form>
290
- </div>
291
- <form action="" method="post" class="em-booking-form">
292
- <table class="em-tickets-bookings-table" cellpadding="0" cellspacing="0">
293
- <thead>
294
  <tr>
295
- <th><?php esc_html_e('Ticket Type','events-manager'); ?></th>
296
- <th><?php esc_html_e('Spaces','events-manager'); ?></th>
297
  <th><?php esc_html_e('Price','events-manager'); ?></th>
 
 
298
  </tr>
299
- </thead>
300
- <tbody>
301
- <?php foreach($EM_Booking->get_tickets_bookings()->tickets_bookings as $EM_Ticket_Booking): /* @var $EM_Ticket_Booking EM_Ticket_Booking */ ?>
302
  <tr>
303
- <td class="ticket-type"><a class="row-title" href="<?php echo em_add_get_params($EM_Event->get_bookings_url(), array('ticket_id'=>$EM_Ticket_Booking->ticket_id)); ?>"><?php echo $EM_Ticket_Booking->get_ticket()->ticket_name ?></a></td>
304
- <td>
305
- <span class="em-booking-single-info"><?php echo $EM_Ticket_Booking->get_spaces(); ?></span>
306
- <div class="em-booking-single-edit"><input name="em_tickets[<?php echo $EM_Ticket_Booking->ticket_id; ?>][spaces]" class="em-ticket-select" id="em-ticket-spaces-<?php echo $EM_Ticket_Booking->ticket_id; ?>" value="<?php echo $EM_Ticket_Booking->get_spaces(); ?>" /></div>
307
- </td>
308
- <td><?php echo $EM_Ticket_Booking->get_price(true,true); ?></td>
309
  </tr>
310
- <?php
311
- $shown_tickets[] = $EM_Ticket_Booking->ticket_id;
312
- do_action('em_bookings_admin_ticket_row', $EM_Ticket_Booking->get_ticket(), $EM_Booking);
313
- ?>
314
  <?php endforeach; ?>
315
- <?php if( count($shown_tickets) < count($EM_Event->get_bookings()->get_tickets()->tickets)): ?><tr>
316
- <?php foreach($EM_Event->get_bookings()->get_tickets()->tickets as $EM_Ticket): /* @var $EM_Ticket EM_Ticket */ ?>
317
- <?php if( !in_array($EM_Ticket->ticket_id, $shown_tickets) ): ?>
318
- <tr>
319
- <td class="ticket-type"><a class="row-title" href="<?php echo em_add_get_params($EM_Event->get_bookings_url(), array('ticket_id'=>$EM_Ticket->ticket_id)); ?>"><?php echo $EM_Ticket->ticket_name ?></a></td>
320
- <td>
321
- <span class="em-booking-single-info">0</span>
322
- <div class="em-booking-single-edit"><input name="em_tickets[<?php echo $EM_Ticket->ticket_id; ?>][spaces]" class="em-ticket-select" id="em-ticket-spaces-<?php echo $EM_Ticket->ticket_id; ?>" value="0" /></div>
323
- </td>
324
- <td><?php echo em_get_currency_symbol() ?>0.00</td>
325
- </tr>
326
- <?php do_action('em_bookings_admin_ticket_row', $EM_Ticket, $EM_Booking); ?>
327
- <?php endif; ?>
328
- <?php endforeach; ?>
329
- <?php endif; ?>
330
- </tbody>
331
- <tfoot>
332
- <?php
333
- do_action('em_bookings_admin_ticket_totals_header');
334
- $price_summary = $EM_Booking->get_price_summary_array();
335
- //we should now have an array of information including base price, taxes and post/pre tax discounts
336
- ?>
337
  <tr>
338
- <th><?php esc_html_e('Price','events-manager'); ?></th>
339
- <th><?php echo sprintf(__('%d Spaces','events-manager'), $EM_Booking->get_spaces()); ?></th>
340
- <th><?php echo $EM_Booking->get_price_base(true); ?></th>
341
  </tr>
342
- <?php if( count($price_summary['discounts_pre_tax']) > 0 ): ?>
343
- <?php foreach( $price_summary['discounts_pre_tax'] as $discount_summary ): ?>
344
- <tr>
345
- <th><?php echo $discount_summary['name']; ?></th>
346
- <th><?php echo $discount_summary['adjustment']; ?></th>
347
- <th>- <?php echo $discount_summary['amount']; ?></th>
348
- </tr>
349
- <?php endforeach; ?>
350
- <?php endif; ?>
351
- <?php if( count($price_summary['surcharges_pre_tax']) > 0 ): ?>
352
- <?php foreach( $price_summary['surcharges_pre_tax'] as $surcharge_summary ): ?>
353
- <tr>
354
- <th><?php echo $surcharge_summary['name']; ?></th>
355
- <th><?php echo $surcharge_summary['adjustment']; ?></th>
356
- <th><?php echo $surcharge_summary['amount']; ?></th>
357
- </tr>
358
- <?php endforeach; ?>
359
- <?php endif; ?>
360
- <?php if( !empty($price_summary['taxes']['amount']) ): ?>
361
  <tr>
362
- <th><?php esc_html_e('Tax','events-manager'); ?></th>
363
- <th>
364
- <span class="em-booking-single-info"><?php echo $price_summary['taxes']['rate'] ?></span>
365
- <div class="em-booking-single-edit"><input name="booking_tax_rate" value="<?php echo esc_attr($EM_Booking->get_tax_rate()); ?>">%</div>
366
- </th>
367
- <th><?php echo $price_summary['taxes']['amount']; ?></th>
368
  </tr>
369
- <?php endif; ?>
370
- <?php if( count($price_summary['discounts_post_tax']) > 0 ): ?>
371
- <?php foreach( $price_summary['discounts_post_tax'] as $discount_summary ): ?>
372
- <tr>
373
- <th><?php echo $discount_summary['name']; ?></th>
374
- <th><?php echo $discount_summary['adjustment']; ?></th>
375
- <th>- <?php echo $discount_summary['amount']; ?></th>
376
- </tr>
377
- <?php endforeach; ?>
378
- <?php endif; ?>
379
- <?php if( count($price_summary['surcharges_post_tax']) > 0 ): ?>
380
- <?php foreach( $price_summary['surcharges_post_tax'] as $surcharge_summary ): ?>
381
- <tr>
382
- <th><?php echo $surcharge_summary['name']; ?></th>
383
- <th><?php echo $surcharge_summary['adjustment']; ?></th>
384
- <th><?php echo $surcharge_summary['amount']; ?></th>
385
- </tr>
386
- <?php endforeach; ?>
387
- <?php endif; ?>
388
- <tr class="em-hr">
389
- <th><?php esc_html_e('Total Price','events-manager'); ?></th>
390
- <th>&nbsp;</th>
391
- <th><?php echo $price_summary['total']; ?></th>
392
  </tr>
393
- <?php do_action('em_bookings_admin_ticket_totals_footer', $EM_Booking); ?>
394
- </tfoot>
395
- </table>
396
- <table class="em-form-fields" cellspacing="0" cellpadding="0">
397
- <?php if( !has_action('em_bookings_single_custom') ): //default behavior ?>
398
- <tr>
399
- <th><?php esc_html_e('Comment','events-manager'); ?></th>
400
- <td>
401
- <span class="em-booking-single-info"><?php echo esc_html($EM_Booking->booking_comment); ?></span>
402
- <div class="em-booking-single-edit"><textarea name="booking_comment"><?php echo esc_html($EM_Booking->booking_comment); ?></textarea></div>
403
- </td>
404
- </tr>
405
- <?php else: do_action('em_bookings_single_custom',$EM_Booking); //do your own thing, e.g. pro ?>
406
  <?php endif; ?>
407
- </table>
408
- <p class="em-booking-single-info">
409
- <input type="button" class="button-secondary em-button em-booking-submit-modify" id="em-booking-submit-modify" value="<?php esc_attr_e('Modify Booking', 'events-manager'); ?>" />
410
- </p>
411
- <p class="em-booking-single-edit">
412
- <em><?php _e('<strong>Notes:</strong> Ticket availability not taken into account (i.e. you can overbook). Emails are not resent automatically.','events-manager'); ?></em>
413
- <br /><br />
414
- <input type="submit" class="button-primary em-button em-booking-submit" id="em-booking-submit" value="<?php esc_attr_e('Submit Changes', 'events-manager'); ?>" />
415
- <input type="button" class="button-secondary em-button em-booking-submit-cancel" id="em-booking-submit-cancel" value="<?php esc_attr_e('Cancel', 'events-manager'); ?>" />
416
- <input type='hidden' name='action' value='booking_save'/>
417
- <input type='hidden' name='booking_id' value='<?php echo $EM_Booking->booking_id; ?>'/>
418
- <input type='hidden' name='event_id' value='<?php echo $EM_Event->event_id; ?>'/>
419
- <input type='hidden' name='_wpnonce' value='<?php echo wp_create_nonce('booking_save_'.$EM_Booking->booking_id); ?>'/>
420
- </p>
421
- </form>
422
- <script type="text/javascript">
423
- jQuery(document).ready( function($){
424
- $('#em-booking-submit-modify').click(function(){
425
- $('.em-booking-single-info').hide();
426
- $('.em-booking-single-edit').show();
427
- });
428
- $('#em-booking-submit-cancel').click(function(){
429
- $('.em-booking-single-info').show();
430
- $('.em-booking-single-edit').hide();
431
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
432
  $('.em-booking-single-info').show();
433
  $('.em-booking-single-edit').hide();
 
 
 
434
 
435
- $('#em-booking-submit-status-modify').click(function(){
436
- $('.em-booking-single-status-info').hide();
437
- $('.em-booking-single-status-edit').show();
438
- });
439
- $('#em-booking-submit-status-cancel').click(function(){
440
- $('.em-booking-single-status-info').show();
441
- $('.em-booking-single-status-edit').hide();
442
- });
443
  $('.em-booking-single-status-info').show();
444
  $('.em-booking-single-status-edit').hide();
445
  });
446
- </script>
447
- </div>
 
 
448
  </div>
449
- <div id="em-booking-notes" class="stuffbox">
450
- <h3>
451
- <?php esc_html_e( 'Booking Notes', 'events-manager'); ?>
452
- </h3>
453
- <div class="inside">
454
- <p><?php esc_html_e('You can add private notes below for internal reference that only event managers will see.','events-manager'); ?></p>
455
- <?php foreach( $EM_Booking->get_notes() as $note ):
456
- $user = new EM_Person($note['author']);
457
- ?>
458
- <div>
459
- <?php echo sprintf(esc_html_x('%1$s - %2$s wrote','[Date] - [Name] wrote','events-manager'), date(get_option('date_format'), $note['timestamp']), $user->get_name()); ?>:
460
- <p style="background:#efefef; padding:5px;"><?php echo nl2br($note['note']); ?></p>
461
- </div>
462
- <?php endforeach; ?>
463
- <form method="post" action="" style="padding:5px;">
464
- <textarea class="widefat" rows="5" name="booking_note"></textarea>
465
- <input type="hidden" name="action" value="bookings_add_note" />
466
- <input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce('bookings_add_note'); ?>" />
467
- <input type="submit" class="em-button button-primary" value="<?php esc_html_e('Add Note', 'events-manager'); ?>" />
468
- </form>
469
  </div>
470
- </div>
471
- <?php do_action('em_bookings_single_metabox_footer', $EM_Booking); ?>
 
 
 
 
 
 
472
  </div>
 
473
  </div>
474
  </div>
475
  <br style="clear:both;" />
188
  <?php esc_html_e('Edit Booking', 'events-manager'); ?>
189
  <?php if( !is_admin() ): ?></h2><?php else: ?></h1><?php endif; ?>
190
  <?php if( !is_admin() ) echo $EM_Notices; ?>
191
+ <div class="metabox-holder">
192
+ <div class="postbox-container" style="width:99.5%">
193
+ <div class="postbox">
194
+ <h3>
195
+ <?php esc_html_e( 'Event Details', 'events-manager'); ?>
196
+ </h3>
197
+ <div class="inside">
198
+ <?php
199
+ $EM_Event = $EM_Booking->get_event();
200
+ ?>
201
+ <table>
202
+ <tr><td><strong><?php esc_html_e('Name','events-manager'); ?></strong></td><td><a class="row-title" href="<?php echo $EM_Event->get_bookings_url(); ?>"><?php echo ($EM_Event->event_name); ?></a></td></tr>
203
+ <tr>
204
+ <td><strong><?php esc_html_e('Date/Time','events-manager'); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong></td>
205
+ <td>
206
+ <?php echo $EM_Event->output('#_EVENTDATES @ #_EVENTTIMES'); ?>
207
+ </td>
208
+ </tr>
209
+ </table>
210
+ <?php do_action('em_bookings_admin_booking_event', $EM_Event); ?>
211
+ </div>
212
+ </div>
213
+ <div class="postbox">
214
+ <h3>
215
+ <?php esc_html_e( 'Personal Details', 'events-manager'); ?>
216
+ </h3>
217
+ <div class="inside">
218
+ <div class="em-booking-person-details">
219
+ <?php echo $EM_Booking->get_person()->display_summary(); ?>
220
+ <?php if( $EM_Booking->is_no_user() ): ?>
221
+ <input type="button" class="button-secondary" id="em-booking-person-modify" value="<?php esc_attr_e('Edit Details','events-manager'); ?>" />
222
+ <?php endif; ?>
223
  </div>
224
+ <?php if( $EM_Booking->is_no_user() ): ?>
225
+ <form action="" method="post" class="em-booking-person-form">
226
+ <div class="em-booking-person-editor" style="display:none;">
227
+ <?php echo $EM_Booking->get_person_editor(); ?>
228
+ <input type='hidden' name='action' value='booking_modify_person'/>
229
+ <input type='hidden' name='booking_id' value='<?php echo $EM_Booking->booking_id; ?>'/>
230
+ <input type='hidden' name='event_id' value='<?php echo $EM_Event->event_id; ?>'/>
231
+ <input type='hidden' name='_wpnonce' value='<?php echo wp_create_nonce('booking_modify_person_'.$EM_Booking->booking_id); ?>'/>
232
+ <input type="submit" class="button-primary em-button em-booking-person-modify-submit" id="em-booking-person-modify-submit" value="<?php esc_attr_e('Submit Changes', 'events-manager'); ?>" />
233
+ <input type="button" id="em-booking-person-modify-cancel" class="button-secondary em-button" value="<?php esc_attr_e('Cancel','events-manager'); ?>" />
 
234
  </div>
235
+ </form>
236
+ <script type="text/javascript">
237
+ jQuery(document).ready( function($){
238
+ $('#em-booking-person-modify').click(function(){
239
+ $('.em-booking-person-details').hide();
240
+ $('.em-booking-person-editor').show();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
241
  });
242
+ $('#em-booking-person-modify-cancel').click(function(){
243
+ $('.em-booking-person-details').show();
244
+ $('.em-booking-person-editor').hide();
245
+ });
246
+ });
247
+ </script>
248
+ <?php endif; ?>
249
+ <?php do_action('em_bookings_admin_booking_person', $EM_Booking); ?>
250
+ </div>
251
+ </div>
252
+ <div class="postbox">
253
+ <h3>
254
+ <?php esc_html_e( 'Booking Details', 'events-manager'); ?>
255
+ </h3>
256
+ <div class="inside">
257
+ <?php
258
+ $EM_Event = $EM_Booking->get_event();
259
+ $shown_tickets = array();
260
+ ?>
261
+ <div>
262
+ <form action="" method="post" class="em-booking-single-status-info">
263
+ <strong><?php esc_html_e('Status','events-manager'); ?> : </strong>
264
+ <?php echo $EM_Booking->get_status(); ?>
265
+ <input type="button" class="button-secondary em-button em-booking-submit-status-modify" id="em-booking-submit-status-modify" value="<?php esc_attr_e('Change', 'events-manager'); ?>" />
266
+ <input type="submit" class="button-primary em-button em-booking-resend-email" id="em-booking-resend-email" value="<?php esc_attr_e('Resend Email', 'events-manager'); ?>" />
267
+ <input type='hidden' name='action' value='booking_resend_email'/>
268
+ <input type='hidden' name='booking_id' value='<?php echo $EM_Booking->booking_id; ?>'/>
269
+ <input type='hidden' name='event_id' value='<?php echo $EM_Event->event_id; ?>'/>
270
+ <input type='hidden' name='_wpnonce' value='<?php echo wp_create_nonce('booking_resend_email_'.$EM_Booking->booking_id); ?>'/>
271
+ </form>
272
+ <form action="" method="post" class="em-booking-single-status-edit">
273
+ <strong><?php esc_html_e('Status','events-manager'); ?> : </strong>
274
+ <select name="booking_status">
275
+ <?php foreach($EM_Booking->status_array as $status => $status_name): ?>
276
+ <option value="<?php echo esc_attr($status); ?>" <?php if($status == $EM_Booking->booking_status){ echo 'selected="selected"'; } ?>><?php echo esc_html($status_name); ?></option>
277
+ <?php endforeach; ?>
278
+ </select>
279
+ <input type="checkbox" checked="checked" name="send_email" value="1" />
280
+ <?php esc_html_e('Send Email','events-manager'); ?>
281
+ <input type="submit" class="button-primary em-button em-booking-submit-status" id="em-booking-submit-status" value="<?php esc_attr_e('Submit Changes', 'events-manager'); ?>" />
282
+ <input type="button" class="button-secondary em-button em-booking-submit-status-cancel" id="em-booking-submit-status-cancel" value="<?php esc_attr_e('Cancel', 'events-manager'); ?>" />
283
+ <input type='hidden' name='action' value='booking_set_status'/>
284
+ <input type='hidden' name='booking_id' value='<?php echo $EM_Booking->booking_id; ?>'/>
285
+ <input type='hidden' name='event_id' value='<?php echo $EM_Event->event_id; ?>'/>
286
+ <input type='hidden' name='_wpnonce' value='<?php echo wp_create_nonce('booking_set_status_'.$EM_Booking->booking_id); ?>'/>
287
+ <br /><em><?php echo wp_kses_data(__('<strong>Notes:</strong> Ticket availability not taken into account when approving new bookings (i.e. you can overbook).','events-manager')); ?></em>
288
+ </form>
289
  </div>
290
+ <form action="" method="post" class="em-booking-form">
291
+ <table class="em-tickets-bookings-table" cellpadding="0" cellspacing="0">
292
+ <thead>
293
+ <tr>
294
+ <th><?php esc_html_e('Ticket Type','events-manager'); ?></th>
295
+ <th><?php esc_html_e('Spaces','events-manager'); ?></th>
296
+ <th><?php esc_html_e('Price','events-manager'); ?></th>
297
+ </tr>
298
+ </thead>
299
+ <tbody>
300
+ <?php foreach($EM_Booking->get_tickets_bookings()->tickets_bookings as $EM_Ticket_Booking): /* @var $EM_Ticket_Booking EM_Ticket_Booking */ ?>
301
+ <tr>
302
+ <td class="ticket-type"><a class="row-title" href="<?php echo em_add_get_params($EM_Event->get_bookings_url(), array('ticket_id'=>$EM_Ticket_Booking->ticket_id)); ?>"><?php echo $EM_Ticket_Booking->get_ticket()->ticket_name ?></a></td>
303
+ <td>
304
+ <span class="em-booking-single-info"><?php echo $EM_Ticket_Booking->get_spaces(); ?></span>
305
+ <div class="em-booking-single-edit"><input name="em_tickets[<?php echo $EM_Ticket_Booking->ticket_id; ?>][spaces]" class="em-ticket-select" id="em-ticket-spaces-<?php echo $EM_Ticket_Booking->ticket_id; ?>" value="<?php echo $EM_Ticket_Booking->get_spaces(); ?>" /></div>
306
+ </td>
307
+ <td><?php echo $EM_Ticket_Booking->get_price(true,true); ?></td>
308
+ </tr>
309
+ <?php
310
+ $shown_tickets[] = $EM_Ticket_Booking->ticket_id;
311
+ do_action('em_bookings_admin_ticket_row', $EM_Ticket_Booking->get_ticket(), $EM_Booking);
312
+ ?>
313
+ <?php endforeach; ?>
314
+ <?php if( count($shown_tickets) < count($EM_Event->get_bookings()->get_tickets()->tickets)): ?><tr>
315
+ <?php foreach($EM_Event->get_bookings()->get_tickets()->tickets as $EM_Ticket): /* @var $EM_Ticket EM_Ticket */ ?>
316
+ <?php if( !in_array($EM_Ticket->ticket_id, $shown_tickets) ): ?>
317
+ <tr>
318
+ <td class="ticket-type"><a class="row-title" href="<?php echo em_add_get_params($EM_Event->get_bookings_url(), array('ticket_id'=>$EM_Ticket->ticket_id)); ?>"><?php echo $EM_Ticket->ticket_name ?></a></td>
319
+ <td>
320
+ <span class="em-booking-single-info">0</span>
321
+ <div class="em-booking-single-edit"><input name="em_tickets[<?php echo $EM_Ticket->ticket_id; ?>][spaces]" class="em-ticket-select" id="em-ticket-spaces-<?php echo $EM_Ticket->ticket_id; ?>" value="0" /></div>
322
+ </td>
323
+ <td><?php echo em_get_currency_symbol() ?>0.00</td>
324
+ </tr>
325
+ <?php do_action('em_bookings_admin_ticket_row', $EM_Ticket, $EM_Booking); ?>
326
+ <?php endif; ?>
327
  <?php endforeach; ?>
328
+ <?php endif; ?>
329
+ </tbody>
330
+ <tfoot>
331
+ <?php
332
+ do_action('em_bookings_admin_ticket_totals_header');
333
+ $price_summary = $EM_Booking->get_price_summary_array();
334
+ //we should now have an array of information including base price, taxes and post/pre tax discounts
335
+ ?>
 
 
 
 
 
 
 
336
  <tr>
 
 
337
  <th><?php esc_html_e('Price','events-manager'); ?></th>
338
+ <th><?php echo sprintf(__('%d Spaces','events-manager'), $EM_Booking->get_spaces()); ?></th>
339
+ <th><?php echo $EM_Booking->get_price_base(true); ?></th>
340
  </tr>
341
+ <?php if( count($price_summary['discounts_pre_tax']) > 0 ): ?>
342
+ <?php foreach( $price_summary['discounts_pre_tax'] as $discount_summary ): ?>
 
343
  <tr>
344
+ <th><?php echo $discount_summary['name']; ?></th>
345
+ <th><?php echo $discount_summary['adjustment']; ?></th>
346
+ <th>- <?php echo $discount_summary['amount']; ?></th>
 
 
 
347
  </tr>
 
 
 
 
348
  <?php endforeach; ?>
349
+ <?php endif; ?>
350
+ <?php if( count($price_summary['surcharges_pre_tax']) > 0 ): ?>
351
+ <?php foreach( $price_summary['surcharges_pre_tax'] as $surcharge_summary ): ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
352
  <tr>
353
+ <th><?php echo $surcharge_summary['name']; ?></th>
354
+ <th><?php echo $surcharge_summary['adjustment']; ?></th>
355
+ <th><?php echo $surcharge_summary['amount']; ?></th>
356
  </tr>
357
+ <?php endforeach; ?>
358
+ <?php endif; ?>
359
+ <?php if( !empty($price_summary['taxes']['amount']) ): ?>
360
+ <tr>
361
+ <th><?php esc_html_e('Tax','events-manager'); ?></th>
362
+ <th>
363
+ <span class="em-booking-single-info"><?php echo $price_summary['taxes']['rate'] ?></span>
364
+ <div class="em-booking-single-edit"><input name="booking_tax_rate" value="<?php echo esc_attr($EM_Booking->get_tax_rate()); ?>">%</div>
365
+ </th>
366
+ <th><?php echo $price_summary['taxes']['amount']; ?></th>
367
+ </tr>
368
+ <?php endif; ?>
369
+ <?php if( count($price_summary['discounts_post_tax']) > 0 ): ?>
370
+ <?php foreach( $price_summary['discounts_post_tax'] as $discount_summary ): ?>
 
 
 
 
 
371
  <tr>
372
+ <th><?php echo $discount_summary['name']; ?></th>
373
+ <th><?php echo $discount_summary['adjustment']; ?></th>
374
+ <th>- <?php echo $discount_summary['amount']; ?></th>
 
 
 
375
  </tr>
376
+ <?php endforeach; ?>
377
+ <?php endif; ?>
378
+ <?php if( count($price_summary['surcharges_post_tax']) > 0 ): ?>
379
+ <?php foreach( $price_summary['surcharges_post_tax'] as $surcharge_summary ): ?>
380
+ <tr>
381
+ <th><?php echo $surcharge_summary['name']; ?></th>
382
+ <th><?php echo $surcharge_summary['adjustment']; ?></th>
383
+ <th><?php echo $surcharge_summary['amount']; ?></th>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
384
  </tr>
385
+ <?php endforeach; ?>
 
 
 
 
 
 
 
 
 
 
 
 
386
  <?php endif; ?>
387
+ <tr class="em-hr">
388
+ <th><?php esc_html_e('Total Price','events-manager'); ?></th>
389
+ <th>&nbsp;</th>
390
+ <th><?php echo $price_summary['total']; ?></th>
391
+ </tr>
392
+ <?php do_action('em_bookings_admin_ticket_totals_footer', $EM_Booking); ?>
393
+ </tfoot>
394
+ </table>
395
+ <table class="em-form-fields" cellspacing="0" cellpadding="0">
396
+ <?php if( !has_action('em_bookings_single_custom') ): //default behavior ?>
397
+ <tr>
398
+ <th><?php esc_html_e('Comment','events-manager'); ?></th>
399
+ <td>
400
+ <span class="em-booking-single-info"><?php echo esc_html($EM_Booking->booking_comment); ?></span>
401
+ <div class="em-booking-single-edit"><textarea name="booking_comment"><?php echo esc_html($EM_Booking->booking_comment); ?></textarea></div>
402
+ </td>
403
+ </tr>
404
+ <?php else: do_action('em_bookings_single_custom',$EM_Booking); //do your own thing, e.g. pro ?>
405
+ <?php endif; ?>
406
+ </table>
407
+ <p class="em-booking-single-info">
408
+ <input type="button" class="button-secondary em-button em-booking-submit-modify" id="em-booking-submit-modify" value="<?php esc_attr_e('Modify Booking', 'events-manager'); ?>" />
409
+ </p>
410
+ <p class="em-booking-single-edit">
411
+ <em><?php _e('<strong>Notes:</strong> Ticket availability not taken into account (i.e. you can overbook). Emails are not resent automatically.','events-manager'); ?></em>
412
+ <br /><br />
413
+ <input type="submit" class="button-primary em-button em-booking-submit" id="em-booking-submit" value="<?php esc_attr_e('Submit Changes', 'events-manager'); ?>" />
414
+ <input type="button" class="button-secondary em-button em-booking-submit-cancel" id="em-booking-submit-cancel" value="<?php esc_attr_e('Cancel', 'events-manager'); ?>" />
415
+ <input type='hidden' name='action' value='booking_save'/>
416
+ <input type='hidden' name='booking_id' value='<?php echo $EM_Booking->booking_id; ?>'/>
417
+ <input type='hidden' name='event_id' value='<?php echo $EM_Event->event_id; ?>'/>
418
+ <input type='hidden' name='_wpnonce' value='<?php echo wp_create_nonce('booking_save_'.$EM_Booking->booking_id); ?>'/>
419
+ </p>
420
+ </form>
421
+ <script type="text/javascript">
422
+ jQuery(document).ready( function($){
423
+ $('#em-booking-submit-modify').click(function(){
424
+ $('.em-booking-single-info').hide();
425
+ $('.em-booking-single-edit').show();
426
+ });
427
+ $('#em-booking-submit-cancel').click(function(){
428
  $('.em-booking-single-info').show();
429
  $('.em-booking-single-edit').hide();
430
+ });
431
+ $('.em-booking-single-info').show();
432
+ $('.em-booking-single-edit').hide();
433
 
434
+ $('#em-booking-submit-status-modify').click(function(){
435
+ $('.em-booking-single-status-info').hide();
436
+ $('.em-booking-single-status-edit').show();
437
+ });
438
+ $('#em-booking-submit-status-cancel').click(function(){
 
 
 
439
  $('.em-booking-single-status-info').show();
440
  $('.em-booking-single-status-edit').hide();
441
  });
442
+ $('.em-booking-single-status-info').show();
443
+ $('.em-booking-single-status-edit').hide();
444
+ });
445
+ </script>
446
  </div>
447
+ </div>
448
+ <div id="em-booking-notes" class="postbox">
449
+ <h3>
450
+ <?php esc_html_e( 'Booking Notes', 'events-manager'); ?>
451
+ </h3>
452
+ <div class="inside">
453
+ <p><?php esc_html_e('You can add private notes below for internal reference that only event managers will see.','events-manager'); ?></p>
454
+ <?php foreach( $EM_Booking->get_notes() as $note ):
455
+ $user = new EM_Person($note['author']);
456
+ ?>
457
+ <div>
458
+ <?php echo sprintf(esc_html_x('%1$s - %2$s wrote','[Date] - [Name] wrote','events-manager'), date(get_option('date_format'), $note['timestamp']), $user->get_name()); ?>:
459
+ <p style="background:#efefef; padding:5px;"><?php echo nl2br($note['note']); ?></p>
 
 
 
 
 
 
 
460
  </div>
461
+ <?php endforeach; ?>
462
+ <form method="post" action="" style="padding:5px;">
463
+ <textarea class="widefat" rows="5" name="booking_note"></textarea>
464
+ <input type="hidden" name="action" value="bookings_add_note" />
465
+ <input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce('bookings_add_note'); ?>" />
466
+ <input type="submit" class="em-button button-primary" value="<?php esc_html_e('Add Note', 'events-manager'); ?>" />
467
+ </form>
468
+ </div>
469
  </div>
470
+ <?php do_action('em_bookings_single_metabox_footer', $EM_Booking); ?>
471
  </div>
472
  </div>
473
  <br style="clear:both;" />
admin/em-docs.php CHANGED
@@ -103,6 +103,9 @@ function em_docs_init($force_init = false){
103
  '#_EVENTCATEGORIES' => array( 'desc' => 'Shows a list of category links this event belongs to.' ),
104
  '#_EVENTCATEGORIESIMAGES' => array( 'desc' => 'Shows a list of category images this event belongs to. Categories without an image will be ignored.' ),
105
  '#_EVENTTAGS' => array( 'desc' => 'Shows a list of tag links this event belongs to.' ),
 
 
 
106
  )
107
  ),
108
  'Date and Times' => array(
@@ -120,7 +123,7 @@ function em_docs_init($force_init = false){
120
  'desc' => 'Events Manager allows extremely flexible date formatting by using <a href="http://www.php.net/manual/en/function.date.php">PHP date syntax format characters</a> along with placeholders.',
121
  'placeholders' => array(
122
  '# or #@' => array( 'desc' => 'Prepend <code>#</code> or <code>#@</code> before a valid PHP date syntax format character to show start and end date/time information respectively (e.g. <code>#F</code> will show the starting month name like "January", #@h shows the end hour).' ),
123
- '#{x} or #@{x}' => array( 'desc' => 'You can also create a date format without prepending # to each character by wrapping a valid php date() format in <code>#{}</code> or <code>#@{}</code> (e.g. <code>#_{d/m/Y}</code>). If there is no end date (or is same as start date), the value is not shown. This is useful if you want to show event end dates only on events that are longer than one day, e.g. <code>#j #M #Y #@_{ \u\n\t\i\l j M Y}</code>.' ),
124
  )
125
  ),
126
  'Links/URLs' => array(
103
  '#_EVENTCATEGORIES' => array( 'desc' => 'Shows a list of category links this event belongs to.' ),
104
  '#_EVENTCATEGORIESIMAGES' => array( 'desc' => 'Shows a list of category images this event belongs to. Categories without an image will be ignored.' ),
105
  '#_EVENTTAGS' => array( 'desc' => 'Shows a list of tag links this event belongs to.' ),
106
+ '#_RECURRINGDATERANGE' => array( 'desc' => 'Range of dates between the start/end of the recurring event pattern for an event recurrence, blank for non-recurrences.' ),
107
+ '#_RECURRINGPATTERN' => array( 'desc' => 'Describes the pattern of a recurring event when used on an event recurrence, blank for non-recurrences.' ),
108
+ '#_RECURRINGID' => array( 'desc' => 'The event ID of the recurring event template when displayed on a recurrence, blank for non-recurrences.' ),
109
  )
110
  ),
111
  'Date and Times' => array(
123
  'desc' => 'Events Manager allows extremely flexible date formatting by using <a href="http://www.php.net/manual/en/function.date.php">PHP date syntax format characters</a> along with placeholders.',
124
  'placeholders' => array(
125
  '# or #@' => array( 'desc' => 'Prepend <code>#</code> or <code>#@</code> before a valid PHP date syntax format character to show start and end date/time information respectively (e.g. <code>#F</code> will show the starting month name like "January", #@h shows the end hour).' ),
126
+ '#_{x} or #@_{x}' => array( 'desc' => 'You can also create a date format without prepending # to each character by wrapping a valid php date() format in <code>#_{}</code> or <code>#@_{}</code> (e.g. <code>#_{d/m/Y}</code>). If there is no end date (or is same as start date), the value is not shown. This is useful if you want to show event end dates only on events that are longer than one day, e.g. <code>#j #M #Y #@_{ \u\n\t\i\l j M Y}</code>.' ),
127
  )
128
  ),
129
  'Links/URLs' => array(
admin/em-locations-search.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
- /*
3
- * This page will search for either a specific location via GET "id" variable
4
- * or will search for events by name via the GET "q" variable.
5
- */
6
- //FIXME just plug loc search into ajax catcher
7
- require_once('../../../../wp-load.php');
8
- global $wpdb;
9
-
10
- $locations_table = EM_LOCATIONS_TABLE;
11
- $location_cond = ( !current_user_can('edit_others_locations') && !current_user_can('read_others_locations') ) ? "AND location_owner=".get_current_user_id() : '';
12
-
13
- $term = (isset($_GET['term'])) ? '%'.$_GET['term'].'%' : '%'.$_GET['q'].'%';
14
- $sql = $wpdb->prepare("
15
- SELECT
16
- location_id AS `id`,
17
- Concat( location_name, ', ', location_address, ', ', location_town) AS `label`,
18
- location_name AS `value`,
19
- location_address AS `address`,
20
- location_town AS `town`,
21
- location_state AS `state`,
22
- location_region AS `region`,
23
- location_postcode AS `postcode`,
24
- location_country AS `country`
25
- FROM $locations_table
26
- WHERE ( `location_name` LIKE %s ) $location_cond LIMIT 10
27
- ", $term);
28
-
29
- $locations_array = $wpdb->get_results($sql);
30
- echo EM_Object::json_encode($locations_array);
31
- /*
32
- $return_string_array = array();
33
- foreach($locations_array as $location){
34
- $return_string_class = array();
35
- foreach($location as $key => $value ){
36
- $return_string_class[] = "$key : '".addslashes($value)."'";
37
- }
38
- $return_string_array[] = '{'. implode(',', $return_string_class) .'}';
39
- }
40
- echo '['. implode(',', $return_string_array) .']';
41
- */
42
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/em-ms-options.php CHANGED
@@ -132,11 +132,27 @@ function em_ms_admin_options_page() {
132
  });
133
  </script>
134
  <style type="text/css">.postbox h3 { cursor:pointer; }</style>
135
- <div class="wrap">
136
  <div id='icon-options-general' class='icon32'><br /></div>
137
  <h1 id="em-options-title"><?php _e ( 'Event Manager Options', 'events-manager'); ?></h1>
138
  <h2 class="nav-tab-wrapper">
139
- <a href="#" id="em-menu-general" class="nav-tab nav-tab-active"><?php esc_html_e('General','events-manager'); ?></a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  </h2>
141
  <?php echo $EM_Notices; ?>
142
  <form id="em-options-form" method="post" action="">
@@ -144,7 +160,7 @@ function em_ms_admin_options_page() {
144
  <!-- // TODO Move style in css -->
145
  <div class='postbox-container' style='width: 99.5%'>
146
  <div id="">
147
-
148
  <div class="em-menu-general em-menu-group">
149
  <div class="postbox " id="em-opt-ms-options" >
150
  <div class="handlediv" title="<?php __('Click to toggle', 'events-manager'); ?>"><br /></div><h3><span><?php _e ( 'Multi Site Options', 'events-manager'); ?></span></h3>
@@ -192,10 +208,27 @@ function em_ms_admin_options_page() {
192
 
193
  <?php do_action('em_ms_options_page_footer'); ?>
194
  </div> <!-- .em-menu-general -->
195
-
196
- <div class="em-menu-pages em-menu-group" style="display:none;">
197
-
198
- </div> <!-- .em-menu-pages -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
 
200
  <p class="submit">
201
  <input type="submit" class="button-primary" name="Submit" value="<?php esc_attr_e( 'Save Changes', 'events-manager'); ?>" />
132
  });
133
  </script>
134
  <style type="text/css">.postbox h3 { cursor:pointer; }</style>
135
+ <div class="wrap <?php if(empty($tabs_enabled)) echo 'tabs-active' ?>">
136
  <div id='icon-options-general' class='icon32'><br /></div>
137
  <h1 id="em-options-title"><?php _e ( 'Event Manager Options', 'events-manager'); ?></h1>
138
  <h2 class="nav-tab-wrapper">
139
+ <?php
140
+ $tabs_enabled = defined('EM_SETTINGS_TABS') && EM_SETTINGS_TABS;
141
+ if( $tabs_enabled ){
142
+ $general_tab_link = esc_url(add_query_arg( array('em_tab'=>'general')));
143
+ }else{
144
+ $general_tab_link = '';
145
+ }
146
+ ?>
147
+ <a href="<?php echo $general_tab_link ?>#general" id="em-menu-general" class="nav-tab nav-tab-active"><?php esc_html_e('General','events-manager'); ?></a>
148
+ <?php
149
+ $custom_tabs = apply_filters('em_ms_options_page_tabs', array());
150
+ foreach( $custom_tabs as $tab_key => $tab_name ){
151
+ $tab_link = !empty($tabs_enabled) ? esc_url(add_query_arg( array('em_tab'=>$tab_key))) : '';
152
+ $active_class = !empty($tabs_enabled) && !empty($_GET['em_tab']) && $_GET['em_tab'] == $tab_key ? 'nav-tab-active':'';
153
+ echo "<a href='$tab_link#$tab_key' id='em-menu-$tab_key' class='nav-tab $active_class'>$tab_name</a>";
154
+ }
155
+ ?>
156
  </h2>
157
  <?php echo $EM_Notices; ?>
158
  <form id="em-options-form" method="post" action="">
160
  <!-- // TODO Move style in css -->
161
  <div class='postbox-container' style='width: 99.5%'>
162
  <div id="">
163
+ <?php if( !$tabs_enabled || ($tabs_enabled && (empty($_REQUEST['em_tab']) || $_REQUEST['em_tab'] == 'general')) ): //make less changes for now, since we don't have any core tabs to add yet ?>
164
  <div class="em-menu-general em-menu-group">
165
  <div class="postbox " id="em-opt-ms-options" >
166
  <div class="handlediv" title="<?php __('Click to toggle', 'events-manager'); ?>"><br /></div><h3><span><?php _e ( 'Multi Site Options', 'events-manager'); ?></span></h3>
208
 
209
  <?php do_action('em_ms_options_page_footer'); ?>
210
  </div> <!-- .em-menu-general -->
211
+ <?php endif; ?>
212
+ <?php
213
+ //other tabs
214
+ if( $tabs_enabled ){
215
+ if( array_key_exists($_REQUEST['em_tab'], $custom_tabs) ){
216
+ ?>
217
+ <div class="em-menu-bookings em-menu-group">
218
+ <?php do_action('em_ms_options_page_tab_'. $_REQUEST['em_tab']); ?>
219
+ </div>
220
+ <?php
221
+ }
222
+ }else{
223
+ foreach( $custom_tabs as $tab_key => $tab_name ){
224
+ ?>
225
+ <div class="em-menu-<?php echo esc_attr($tab_key) ?> em-menu-group" style="display:none;">
226
+ <?php do_action('em_ms_options_page_tab_'. $tab_key); ?>
227
+ </div>
228
+ <?php
229
+ }
230
+ }
231
+ ?>
232
 
233
  <p class="submit">
234
  <input type="submit" class="button-primary" name="Submit" value="<?php esc_attr_e( 'Save Changes', 'events-manager'); ?>" />
admin/em-options.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  //Function composing the options subpanel
4
  function em_options_save(){
5
- global $EM_Notices;
6
  /*
7
  * Here's the idea, we have an array of all options that need super admin approval if in multi-site mode
8
  * since options are only updated here, its one place fit all
@@ -11,13 +11,13 @@ function em_options_save(){
11
  //Build the array of options here
12
  $post = $_POST;
13
  foreach ($_POST as $postKey => $postValue){
14
- if( substr($postKey, 0, 5) == 'dbem_' ){
15
  //TODO some more validation/reporting
16
  $numeric_options = array('dbem_locations_default_limit','dbem_events_default_limit');
17
  if( in_array($postKey, array('dbem_bookings_notify_admin','dbem_event_submitted_email_admin','dbem_js_limit_events_form','dbem_js_limit_search','dbem_js_limit_general','dbem_css_limit_include','dbem_css_limit_exclude','dbem_search_form_geo_distance_options')) ){ $postValue = str_replace(' ', '', $postValue); } //clean up comma separated emails, no spaces needed
18
  if( in_array($postKey,$numeric_options) && !is_numeric($postValue) ){
19
  //Do nothing, keep old setting.
20
- }elseif( ($postKey == 'dbem_category_default_color' || $postKey == 'dbem_tag_default_color') && !preg_match("/^#([abcdef0-9]{3}){1,2}?$/i",$postValue)){
21
  $EM_Notices->add_error( sprintf(esc_html_x('Colors must be in a valid %s format, such as #FF00EE.', 'hex format', 'events-manager'), '<a href="http://en.wikipedia.org/wiki/Web_colors">hex</a>').' '. esc_html__('This setting was not changed.', 'events-manager'), true);
22
  }else{
23
  //TODO slashes being added?
@@ -28,6 +28,16 @@ function em_options_save(){
28
  }
29
  update_option($postKey, $postValue);
30
  }
 
 
 
 
 
 
 
 
 
 
31
  }
32
  }
33
  //set capabilities
@@ -461,6 +471,14 @@ function em_admin_options_page() {
461
  <a href="<?php echo $bookings_tab_link; ?>#bookings" id="em-menu-bookings" class="nav-tab"><?php _e('Bookings','events-manager'); ?></a>
462
  <?php endif; ?>
463
  <a href="<?php echo $emails_tab_link; ?>#emails" id="em-menu-emails" class="nav-tab"><?php _e('Emails','events-manager'); ?></a>
 
 
 
 
 
 
 
 
464
  </h2>
465
  <form id="em-options-form" method="post" action="">
466
  <div class="metabox-holder">
@@ -479,6 +497,13 @@ function em_admin_options_page() {
479
  include('settings/tabs/bookings.php');
480
  }
481
  if( $_REQUEST['em_tab'] == 'emails' ) include('settings/tabs/emails.php');
 
 
 
 
 
 
 
482
  }
483
  }else{
484
  include('settings/tabs/general.php');
@@ -488,6 +513,13 @@ function em_admin_options_page() {
488
  include('settings/tabs/bookings.php');
489
  }
490
  include('settings/tabs/emails.php');
 
 
 
 
 
 
 
491
  }
492
  ?>
493
 
2
 
3
  //Function composing the options subpanel
4
  function em_options_save(){
5
+ global $EM_Notices; /* @var EM_Notices $EM_Notices */
6
  /*
7
  * Here's the idea, we have an array of all options that need super admin approval if in multi-site mode
8
  * since options are only updated here, its one place fit all
11
  //Build the array of options here
12
  $post = $_POST;
13
  foreach ($_POST as $postKey => $postValue){
14
+ if( $postKey != 'dbem_data' && substr($postKey, 0, 5) == 'dbem_' ){
15
  //TODO some more validation/reporting
16
  $numeric_options = array('dbem_locations_default_limit','dbem_events_default_limit');
17
  if( in_array($postKey, array('dbem_bookings_notify_admin','dbem_event_submitted_email_admin','dbem_js_limit_events_form','dbem_js_limit_search','dbem_js_limit_general','dbem_css_limit_include','dbem_css_limit_exclude','dbem_search_form_geo_distance_options')) ){ $postValue = str_replace(' ', '', $postValue); } //clean up comma separated emails, no spaces needed
18
  if( in_array($postKey,$numeric_options) && !is_numeric($postValue) ){
19
  //Do nothing, keep old setting.
20
+ }elseif( ($postKey == 'dbem_category_default_color' || $postKey == 'dbem_tag_default_color') && !sanitize_hex_color($postValue) ){
21
  $EM_Notices->add_error( sprintf(esc_html_x('Colors must be in a valid %s format, such as #FF00EE.', 'hex format', 'events-manager'), '<a href="http://en.wikipedia.org/wiki/Web_colors">hex</a>').' '. esc_html__('This setting was not changed.', 'events-manager'), true);
22
  }else{
23
  //TODO slashes being added?
28
  }
29
  update_option($postKey, $postValue);
30
  }
31
+ }elseif( $postKey == 'dbem_data' && is_array($postValue) ){
32
+ foreach( $postValue as $postK => $postV ){
33
+ //TODO slashes being added?
34
+ if( is_array($postV) ){
35
+ foreach($postV as $postValue_key=>$postValue_val) $postV[$postValue_key] = wp_unslash($postValue_val);
36
+ }else{
37
+ $postV = wp_unslash($postV);
38
+ }
39
+ EM_Options::set( $postK, $postV );
40
+ }
41
  }
42
  }
43
  //set capabilities
471
  <a href="<?php echo $bookings_tab_link; ?>#bookings" id="em-menu-bookings" class="nav-tab"><?php _e('Bookings','events-manager'); ?></a>
472
  <?php endif; ?>
473
  <a href="<?php echo $emails_tab_link; ?>#emails" id="em-menu-emails" class="nav-tab"><?php _e('Emails','events-manager'); ?></a>
474
+ <?php
475
+ $custom_tabs = apply_filters('em_options_page_tabs', array());
476
+ foreach( $custom_tabs as $tab_key => $tab_name ){
477
+ $tab_link = !empty($tabs_enabled) ? esc_url(add_query_arg( array('em_tab'=>$tab_key))) : '';
478
+ $active_class = !empty($tabs_enabled) && !empty($_GET['em_tab']) && $_GET['em_tab'] == $tab_key ? 'nav-tab-active':'';
479
+ echo "<a href='$tab_link#$tab_key' id='em-menu-$tab_key' class='nav-tab $active_class'>$tab_name</a>";
480
+ }
481
+ ?>
482
  </h2>
483
  <form id="em-options-form" method="post" action="">
484
  <div class="metabox-holder">
497
  include('settings/tabs/bookings.php');
498
  }
499
  if( $_REQUEST['em_tab'] == 'emails' ) include('settings/tabs/emails.php');
500
+ if( array_key_exists($_REQUEST['em_tab'], $custom_tabs) ){
501
+ ?>
502
+ <div class="em-menu-<?php echo esc_attr($_REQUEST['em_tab']) ?> em-menu-group">
503
+ <?php do_action('em_options_page_tab_'. $_REQUEST['em_tab']); ?>
504
+ </div>
505
+ <?php
506
+ }
507
  }
508
  }else{
509
  include('settings/tabs/general.php');
513
  include('settings/tabs/bookings.php');
514
  }
515
  include('settings/tabs/emails.php');
516
+ foreach( $custom_tabs as $tab_key => $tab_name ){
517
+ ?>
518
+ <div class="em-menu-<?php echo esc_attr($tab_key) ?> em-menu-group" style="display:none;">
519
+ <?php do_action('em_options_page_tab_'. $tab_key); ?>
520
+ </div>
521
+ <?php
522
+ }
523
  }
524
  ?>
525
 
buddypress/bp-em-core.php CHANGED
@@ -65,7 +65,6 @@ class BP_EM_Component extends BP_Component {
65
  //check multisite or normal mode for correct permission checking
66
  if(is_multisite() && $blog_id != BP_ROOT_BLOG){
67
  //FIXME MS mode doesn't seem to recognize cross subsite caps, using the proper functions, for now we use switch_blog.
68
- $current_blog = $blog_id;
69
  switch_to_blog(BP_ROOT_BLOG);
70
  $can_manage_events = current_user_can_for_blog(BP_ROOT_BLOG, 'edit_events');
71
  $can_manage_locations = current_user_can_for_blog(BP_ROOT_BLOG, 'edit_locations');
@@ -77,8 +76,10 @@ class BP_EM_Component extends BP_Component {
77
  $can_manage_bookings = current_user_can('manage_bookings');
78
  }
79
  /* Add 'Events' to the main user profile navigation */
 
 
80
  $main_nav = array(
81
- 'name' => __( 'Events', 'events-manager'),
82
  'slug' => em_bp_get_slug(),
83
  'position' => 80,
84
  'screen_function' => 'bp_em_events',
65
  //check multisite or normal mode for correct permission checking
66
  if(is_multisite() && $blog_id != BP_ROOT_BLOG){
67
  //FIXME MS mode doesn't seem to recognize cross subsite caps, using the proper functions, for now we use switch_blog.
 
68
  switch_to_blog(BP_ROOT_BLOG);
69
  $can_manage_events = current_user_can_for_blog(BP_ROOT_BLOG, 'edit_events');
70
  $can_manage_locations = current_user_can_for_blog(BP_ROOT_BLOG, 'edit_locations');
76
  $can_manage_bookings = current_user_can('manage_bookings');
77
  }
78
  /* Add 'Events' to the main user profile navigation */
79
+ $event_count = EM_Events::count( array( 'scope'=>'future', 'owner'=> bp_displayed_user_id() ));
80
+ if( empty($event_count) ) $event_count = 0;
81
  $main_nav = array(
82
+ 'name' => __( 'Events', 'events-manager'). '<span>'.esc_html($event_count).'</span>',
83
  'slug' => em_bp_get_slug(),
84
  'position' => 80,
85
  'screen_function' => 'bp_em_events',
classes/em-admin-notice.php CHANGED
@@ -167,7 +167,7 @@ class EM_Admin_Notice {
167
  if( empty($this->message) ) return false;
168
  $action = $this->network ? 'em_dismiss_network_admin_notice':'em_dismiss_admin_notice';
169
  ?>
170
- <div class="em-admin-notice notice notice-<?php echo esc_attr($this->what); ?> <?php if($this->dismissible) echo 'is-dismissible'?>" data-dismiss-action="<?php echo $action; ?>" data-dismiss-key="<?php echo esc_attr($this->name); ?>">
171
  <p><?php echo $this->message; ?></p>
172
  </div>
173
  <?php
167
  if( empty($this->message) ) return false;
168
  $action = $this->network ? 'em_dismiss_network_admin_notice':'em_dismiss_admin_notice';
169
  ?>
170
+ <div class="em-admin-notice notice notice-<?php echo esc_attr($this->what); ?> <?php if($this->dismissible) echo 'is-dismissible'?>" id="notice-<?php echo esc_attr($this->name); ?>" data-dismiss-action="<?php echo $action; ?>" data-dismiss-key="<?php echo esc_attr($this->name); ?>">
171
  <p><?php echo $this->message; ?></p>
172
  </div>
173
  <?php
classes/em-admin-notices.php CHANGED
@@ -35,7 +35,10 @@ class EM_Admin_Notices {
35
  */
36
  public static function add( $EM_Admin_Notice, $network = false ){
37
  $network = $network && is_multisite(); //make sure we are actually in multisite!
38
- if( is_string($EM_Admin_Notice) ) $EM_Admin_Notice = new EM_Admin_Notice( $EM_Admin_Notice );
 
 
 
39
  if( !$EM_Admin_Notice->name ) return false;
40
  //get options data
41
  $data = $network ? get_site_option('dbem_data') : get_option('dbem_data');
@@ -43,14 +46,13 @@ class EM_Admin_Notices {
43
  if( !is_array($data)) $data = array();
44
  $notices_data = $network ? get_site_option('dbem_admin_notices') : get_option('dbem_admin_notices');
45
  $notices_data = empty($notices_data) ? array() : maybe_unserialize($notices_data);
46
- if( !is_array($notices_data)) $notices_data = array();
47
  //start building data
48
  $notices = !empty($data['admin_notices']) ? $data['admin_notices'] : array();
49
  $notices[$EM_Admin_Notice->name] = !empty($EM_Admin_Notice->when) ? $EM_Admin_Notice->when : 0;
50
- //if no message supplied, we assume it's a hook, possibly with a time-to-show assigned above
51
- if( !empty($EM_Admin_Notice->message) ){
52
- $notices_data[$EM_Admin_Notice->name] = $EM_Admin_Notice->to_array();
53
- }
54
  if( !empty($notices) ){
55
  $data['admin_notices'] = $notices;
56
  $update_notices = $network ? update_site_option('dbem_data', $data) : update_option('dbem_data', $data);
35
  */
36
  public static function add( $EM_Admin_Notice, $network = false ){
37
  $network = $network && is_multisite(); //make sure we are actually in multisite!
38
+ if( is_string($EM_Admin_Notice) ){
39
+ $EM_Admin_Notice = new EM_Admin_Notice( $EM_Admin_Notice );
40
+ $hook_notice = true;
41
+ }
42
  if( !$EM_Admin_Notice->name ) return false;
43
  //get options data
44
  $data = $network ? get_site_option('dbem_data') : get_option('dbem_data');
46
  if( !is_array($data)) $data = array();
47
  $notices_data = $network ? get_site_option('dbem_admin_notices') : get_option('dbem_admin_notices');
48
  $notices_data = empty($notices_data) ? array() : maybe_unserialize($notices_data);
49
+ if( !is_array($notices_data)) $notices_data = array(); //we store the data regarldess of whether a message will require a hook, since it contains location and caps considtions
50
  //start building data
51
  $notices = !empty($data['admin_notices']) ? $data['admin_notices'] : array();
52
  $notices[$EM_Admin_Notice->name] = !empty($EM_Admin_Notice->when) ? $EM_Admin_Notice->when : 0;
53
+ if( empty($hook_notice) ){ //we only skip this if simply a key is provided initially in $EM_Admin_Notice
54
+ $notices_data[$EM_Admin_Notice->name] = $EM_Admin_Notice->to_array();
55
+ }
 
56
  if( !empty($notices) ){
57
  $data['admin_notices'] = $notices;
58
  $update_notices = $network ? update_site_option('dbem_data', $data) : update_option('dbem_data', $data);
classes/em-booking.php CHANGED
@@ -183,7 +183,7 @@ class EM_Booking extends EM_Object{
183
  }
184
 
185
  public function __isset( $prop ){
186
- if( $prop == 'timestamp' ) $this->date()->getTimestamp() > 0;
187
  }
188
 
189
  function get_notes(){
@@ -202,7 +202,7 @@ class EM_Booking extends EM_Object{
202
 
203
  /**
204
  * Saves the booking into the database, whether a new or existing booking
205
- * @param $mail whether or not to email the user and contact people
206
  * @return boolean
207
  */
208
  function save($mail = true){
@@ -227,7 +227,7 @@ class EM_Booking extends EM_Object{
227
  }else{
228
  $update = false;
229
  $data_types = $this->get_types($data);
230
- $data['booking_date'] = gmdate('Y-m-d H:i:s');
231
  $data_types[] = '%s';
232
  $result = $wpdb->insert($table, $data, $data_types);
233
  $this->booking_id = $wpdb->insert_id;
@@ -370,8 +370,8 @@ class EM_Booking extends EM_Object{
370
 
371
  /**
372
  * Get the total number of spaces booked in THIS booking. Setting $force_refresh to true will recheck spaces, even if previously done so.
373
- * @param unknown_type $force_refresh
374
- * @return mixed
375
  */
376
  function get_spaces( $force_refresh=false ){
377
  if($this->booking_spaces == 0 || $force_refresh == true ){
@@ -481,6 +481,8 @@ class EM_Booking extends EM_Object{
481
  * @return double
482
  */
483
  function calculate_price(){
 
 
484
  //reset price and taxes calculations
485
  $this->booking_price = $this->booking_taxes = null;
486
  //get post-tax price and save it to booking_price
@@ -838,9 +840,9 @@ class EM_Booking extends EM_Object{
838
  $email = $this->get_person()->user_email;
839
  $phone = ($this->get_person()->phone != __('Not Supplied','events-manager')) ? $this->get_person()->phone:'';
840
  if( !empty($_REQUEST['action']) && $_REQUEST['action'] == 'booking_modify_person' ){
841
- $name = !empty($_REQUEST['user_name']) ? $_REQUEST['user_name']:$name;
842
- $email = !empty($_REQUEST['user_email']) ? $_REQUEST['user_email']:$email;
843
- $phone = !empty($_REQUEST['dbem_phone']) ? $_REQUEST['dbem_phone']:$phone;
844
  }
845
  ?>
846
  <table class="em-form-fields">
@@ -1061,8 +1063,6 @@ class EM_Booking extends EM_Object{
1061
  case '#_BOOKINGCOMMENT':
1062
  $replace = $this->booking_comment;
1063
  break;
1064
- $replace = $this->get_price(true); //if there's tax, it'll be added here
1065
- break;
1066
  case '#_BOOKINGPRICEWITHOUTTAX':
1067
  $replace = $this->format_price($this->get_price() - $this->get_price_taxes());
1068
  break;
@@ -1136,12 +1136,11 @@ class EM_Booking extends EM_Object{
1136
  if( $this->booking_status !== $this->previous_status || $force_resend ){
1137
  //messages can be overridden just before being sent
1138
  $msg = $this->email_messages();
1139
- $output_type = get_option('dbem_smtp_html') ? 'html':'email';
1140
 
1141
  //Send user (booker) emails
1142
  if( !empty($msg['user']['subject']) && $email_attendee ){
1143
  $msg['user']['subject'] = $this->output($msg['user']['subject'], 'raw');
1144
- $msg['user']['body'] = $this->output($msg['user']['body'], $output_type);
1145
  //Send to the person booking
1146
  if( !$this->email_send( $msg['user']['subject'], $msg['user']['body'], $this->get_person()->user_email) ){
1147
  $result = false;
@@ -1164,7 +1163,7 @@ class EM_Booking extends EM_Object{
1164
  if( !empty($admin_emails) ){
1165
  //Only gets sent if this is a pending booking, unless approvals are disabled.
1166
  $msg['admin']['subject'] = $this->output($msg['admin']['subject'],'raw');
1167
- $msg['admin']['body'] = $this->output($msg['admin']['body'], $output_type);
1168
  //email admins
1169
  if( !$this->email_send( $msg['admin']['subject'], $msg['admin']['body'], $admin_emails) && current_user_can('manage_options') ){
1170
  $this->errors[] = __('Confirmation email could not be sent to admin. Registrant should have gotten their email (only admin see this warning).','events-manager');
183
  }
184
 
185
  public function __isset( $prop ){
186
+ if( $prop == 'timestamp' ) return $this->date()->getTimestamp() > 0;
187
  }
188
 
189
  function get_notes(){
202
 
203
  /**
204
  * Saves the booking into the database, whether a new or existing booking
205
+ * @param bool $mail whether or not to email the user and contact people
206
  * @return boolean
207
  */
208
  function save($mail = true){
227
  }else{
228
  $update = false;
229
  $data_types = $this->get_types($data);
230
+ $data['booking_date'] = $this->booking_date = gmdate('Y-m-d H:i:s');
231
  $data_types[] = '%s';
232
  $result = $wpdb->insert($table, $data, $data_types);
233
  $this->booking_id = $wpdb->insert_id;
370
 
371
  /**
372
  * Get the total number of spaces booked in THIS booking. Setting $force_refresh to true will recheck spaces, even if previously done so.
373
+ * @param boolean $force_refresh
374
+ * @return int
375
  */
376
  function get_spaces( $force_refresh=false ){
377
  if($this->booking_spaces == 0 || $force_refresh == true ){
481
  * @return double
482
  */
483
  function calculate_price(){
484
+ //any programatic price adjustments should be added here, otherwise you need to run this function again
485
+ do_action('em_booking_pre_calculate_price', $this);
486
  //reset price and taxes calculations
487
  $this->booking_price = $this->booking_taxes = null;
488
  //get post-tax price and save it to booking_price
840
  $email = $this->get_person()->user_email;
841
  $phone = ($this->get_person()->phone != __('Not Supplied','events-manager')) ? $this->get_person()->phone:'';
842
  if( !empty($_REQUEST['action']) && $_REQUEST['action'] == 'booking_modify_person' ){
843
+ $name = !empty($_REQUEST['user_name']) ? sanitize_text_field($_REQUEST['user_name']):$name;
844
+ $email = !empty($_REQUEST['user_email']) ? sanitize_email($_REQUEST['user_email']):$email;
845
+ $phone = !empty($_REQUEST['dbem_phone']) ? sanitize_text_field($_REQUEST['dbem_phone']):$phone;
846
  }
847
  ?>
848
  <table class="em-form-fields">
1063
  case '#_BOOKINGCOMMENT':
1064
  $replace = $this->booking_comment;
1065
  break;
 
 
1066
  case '#_BOOKINGPRICEWITHOUTTAX':
1067
  $replace = $this->format_price($this->get_price() - $this->get_price_taxes());
1068
  break;
1136
  if( $this->booking_status !== $this->previous_status || $force_resend ){
1137
  //messages can be overridden just before being sent
1138
  $msg = $this->email_messages();
 
1139
 
1140
  //Send user (booker) emails
1141
  if( !empty($msg['user']['subject']) && $email_attendee ){
1142
  $msg['user']['subject'] = $this->output($msg['user']['subject'], 'raw');
1143
+ $msg['user']['body'] = $this->output($msg['user']['body'], 'email');
1144
  //Send to the person booking
1145
  if( !$this->email_send( $msg['user']['subject'], $msg['user']['body'], $this->get_person()->user_email) ){
1146
  $result = false;
1163
  if( !empty($admin_emails) ){
1164
  //Only gets sent if this is a pending booking, unless approvals are disabled.
1165
  $msg['admin']['subject'] = $this->output($msg['admin']['subject'],'raw');
1166
+ $msg['admin']['body'] = $this->output($msg['admin']['body'], 'email');
1167
  //email admins
1168
  if( !$this->email_send( $msg['admin']['subject'], $msg['admin']['body'], $admin_emails) && current_user_can('manage_options') ){
1169
  $this->errors[] = __('Confirmation email could not be sent to admin. Registrant should have gotten their email (only admin see this warning).','events-manager');
classes/em-bookings-table.php CHANGED
@@ -46,7 +46,8 @@ class EM_Bookings_Table{
46
  public $page = 1;
47
  public $offset = 0;
48
  public $scope = 'future';
49
- public $show_tickets = false;
 
50
 
51
  function __construct($show_tickets = false){
52
  $this->statuses = array(
@@ -73,6 +74,7 @@ class EM_Bookings_Table{
73
  $this->status = ( !empty($_REQUEST['status']) && array_key_exists($_REQUEST['status'], $this->statuses) ) ? sanitize_text_field($_REQUEST['status']):'needs-attention';
74
  //build template of possible collumns
75
  $this->cols_template = apply_filters('em_bookings_table_cols_template', array(
 
76
  'user_name'=>__('Name','events-manager'),
77
  'first_name'=>__('First Name','events-manager'),
78
  'last_name'=>__('Last Name','events-manager'),
@@ -103,10 +105,12 @@ class EM_Bookings_Table{
103
  }
104
  $this->cols_template['actions'] = __('Actions','events-manager');
105
  //calculate collumns if post requests
106
- if( !empty($_REQUEST ['cols']) ){
107
- if( is_array($_REQUEST ['cols']) ){
108
- array_walk($_REQUEST['cols'], 'sanitize_text_field');
109
- $this->cols = $_REQUEST['cols'];
 
 
110
  }else{
111
  $this->cols = explode(',',sanitize_text_field($_REQUEST['cols']));
112
  }
@@ -191,46 +195,31 @@ class EM_Bookings_Table{
191
  */
192
  function get_bookings($force_refresh = true){
193
  if( empty($this->bookings) || $force_refresh ){
194
- $this->events = array();
195
  $EM_Ticket = $this->get_ticket();
196
  $EM_Event = $this->get_event();
197
  $EM_Person = $this->get_person();
 
198
  if( $EM_Person !== false ){
199
  $args = array('person'=>$EM_Person->ID,'scope'=>$this->scope,'status'=>$this->get_status_search(),'order'=>$this->order,'orderby'=>$this->orderby);
200
  $this->bookings_count = EM_Bookings::count($args);
201
- $this->bookings = EM_Bookings::get(array_merge($args, array('limit'=>$this->limit,'offset'=>$this->offset)));
202
- foreach($this->bookings->bookings as $EM_Booking){
203
- //create event
204
- if( !array_key_exists($EM_Booking->event_id,$this->events) ){
205
- $this->events[$EM_Booking->event_id] = new EM_Event($EM_Booking->event_id);
206
- }
207
- }
208
  }elseif( $EM_Ticket !== false ){
209
  //searching bookings with a specific ticket
210
  $args = array('ticket_id'=>$EM_Ticket->ticket_id, 'order'=>$this->order,'orderby'=>$this->orderby);
211
  $this->bookings_count = EM_Bookings::count($args);
212
- $this->bookings = EM_Bookings::get(array_merge($args, array('limit'=>$this->limit,'offset'=>$this->offset)));
213
- $this->events[$EM_Ticket->event_id] = $EM_Ticket->get_event();
214
  }elseif( $EM_Event !== false ){
215
  //bookings for an event
216
  $args = array('event'=>$EM_Event->event_id,'scope'=>false,'status'=>$this->get_status_search(),'order'=>$this->order,'orderby'=>$this->orderby);
217
  $args['owner'] = !current_user_can('manage_others_bookings') ? get_current_user_id() : false;
218
  $this->bookings_count = EM_Bookings::count($args);
219
- $this->bookings = EM_Bookings::get(array_merge($args, array('limit'=>$this->limit,'offset'=>$this->offset)));
220
- $this->events[$EM_Event->event_id] = $EM_Event;
221
  }else{
222
  //all bookings for a status
223
  $args = array('status'=>$this->get_status_search(),'scope'=>$this->scope,'order'=>$this->order,'orderby'=>$this->orderby);
224
  $args['owner'] = !current_user_can('manage_others_bookings') ? get_current_user_id() : false;
225
  $this->bookings_count = EM_Bookings::count($args);
226
- $this->bookings = EM_Bookings::get(array_merge($args, array('limit'=>$this->limit,'offset'=>$this->offset)));
227
- //Now let's create events and bookings for this instead of giving each booking an event
228
- foreach($this->bookings->bookings as $EM_Booking){
229
- //create event
230
- if( !array_key_exists($EM_Booking->event_id,$this->events) ){
231
- $this->events[$EM_Booking->event_id] = new EM_Event($EM_Booking->event_id);
232
- }
233
- }
234
  }
235
  }
236
  return $this->bookings;
@@ -534,6 +523,16 @@ class EM_Bookings_Table{
534
  //TODO fix urls so this works in all pages in front as well
535
  if( $col == 'user_email' ){
536
  $val = $EM_Booking->get_person()->user_email;
 
 
 
 
 
 
 
 
 
 
537
  }elseif($col == 'dbem_phone'){
538
  $val = $EM_Booking->get_person()->phone;
539
  }elseif($col == 'user_name'){
@@ -587,7 +586,7 @@ class EM_Bookings_Table{
587
  }
588
  //escape all HTML if destination is HTML or not defined
589
  if( $format == 'html' || empty($format) ){
590
- if( !in_array($col, array('user_name', 'event_name', 'actions')) ) $val = esc_html($val);
591
  }
592
  //use this
593
  $val = apply_filters('em_bookings_table_rows_col_'.$col, $val, $EM_Booking, $this, $format, $object);
46
  public $page = 1;
47
  public $offset = 0;
48
  public $scope = 'future';
49
+ public $show_tickets = false;
50
+ public $bookings_count = 0;
51
 
52
  function __construct($show_tickets = false){
53
  $this->statuses = array(
74
  $this->status = ( !empty($_REQUEST['status']) && array_key_exists($_REQUEST['status'], $this->statuses) ) ? sanitize_text_field($_REQUEST['status']):'needs-attention';
75
  //build template of possible collumns
76
  $this->cols_template = apply_filters('em_bookings_table_cols_template', array(
77
+ 'user_login' => __('Username', 'events-manager'),
78
  'user_name'=>__('Name','events-manager'),
79
  'first_name'=>__('First Name','events-manager'),
80
  'last_name'=>__('Last Name','events-manager'),
105
  }
106
  $this->cols_template['actions'] = __('Actions','events-manager');
107
  //calculate collumns if post requests
108
+ if( !empty($_REQUEST['cols']) ){
109
+ if( is_array($_REQUEST['cols']) ){
110
+ $this->cols = array();
111
+ foreach( $_REQUEST['cols'] as $k => $col ){
112
+ $this->cols[$k] = sanitize_text_field($col);
113
+ }
114
  }else{
115
  $this->cols = explode(',',sanitize_text_field($_REQUEST['cols']));
116
  }
195
  */
196
  function get_bookings($force_refresh = true){
197
  if( empty($this->bookings) || $force_refresh ){
 
198
  $EM_Ticket = $this->get_ticket();
199
  $EM_Event = $this->get_event();
200
  $EM_Person = $this->get_person();
201
+ $default_args = apply_filters('em_bookings_table_get_bookings_args', array('limit'=>$this->limit,'offset'=>$this->offset), $this);
202
  if( $EM_Person !== false ){
203
  $args = array('person'=>$EM_Person->ID,'scope'=>$this->scope,'status'=>$this->get_status_search(),'order'=>$this->order,'orderby'=>$this->orderby);
204
  $this->bookings_count = EM_Bookings::count($args);
205
+ $this->bookings = EM_Bookings::get(array_merge($args, $default_args));
 
 
 
 
 
 
206
  }elseif( $EM_Ticket !== false ){
207
  //searching bookings with a specific ticket
208
  $args = array('ticket_id'=>$EM_Ticket->ticket_id, 'order'=>$this->order,'orderby'=>$this->orderby);
209
  $this->bookings_count = EM_Bookings::count($args);
210
+ $this->bookings = EM_Bookings::get(array_merge($args, $default_args));
 
211
  }elseif( $EM_Event !== false ){
212
  //bookings for an event
213
  $args = array('event'=>$EM_Event->event_id,'scope'=>false,'status'=>$this->get_status_search(),'order'=>$this->order,'orderby'=>$this->orderby);
214
  $args['owner'] = !current_user_can('manage_others_bookings') ? get_current_user_id() : false;
215
  $this->bookings_count = EM_Bookings::count($args);
216
+ $this->bookings = EM_Bookings::get(array_merge($args, $default_args));
 
217
  }else{
218
  //all bookings for a status
219
  $args = array('status'=>$this->get_status_search(),'scope'=>$this->scope,'order'=>$this->order,'orderby'=>$this->orderby);
220
  $args['owner'] = !current_user_can('manage_others_bookings') ? get_current_user_id() : false;
221
  $this->bookings_count = EM_Bookings::count($args);
222
+ $this->bookings = EM_Bookings::get(array_merge($args, $default_args));
 
 
 
 
 
 
 
223
  }
224
  }
225
  return $this->bookings;
523
  //TODO fix urls so this works in all pages in front as well
524
  if( $col == 'user_email' ){
525
  $val = $EM_Booking->get_person()->user_email;
526
+ }elseif($col == 'user_login'){
527
+ if( $EM_Booking->is_no_user() ){
528
+ $val = esc_html__('Guest User', 'events-manager');
529
+ }else{
530
+ if( $format == 'csv' ){
531
+ $val = $EM_Booking->get_person()->user_login;
532
+ }else{
533
+ $val = '<a href="'.esc_url(add_query_arg(array('person_id'=>$EM_Booking->person_id, 'event_id'=>null), $EM_Booking->get_event()->get_bookings_url())).'">'. esc_html($EM_Booking->person->user_login) .'</a>';
534
+ }
535
+ }
536
  }elseif($col == 'dbem_phone'){
537
  $val = $EM_Booking->get_person()->phone;
538
  }elseif($col == 'user_name'){
586
  }
587
  //escape all HTML if destination is HTML or not defined
588
  if( $format == 'html' || empty($format) ){
589
+ if( !in_array($col, array('user_login', 'user_name', 'event_name', 'actions')) ) $val = esc_html($val);
590
  }
591
  //use this
592
  $val = apply_filters('em_bookings_table_rows_col_'.$col, $val, $EM_Booking, $this, $format, $object);
classes/em-bookings.php CHANGED
@@ -88,7 +88,7 @@ class EM_Bookings extends EM_Object implements Iterator{
88
  //if isset is invoked on $EM_Bookings->bookings then we'll assume it's only set if the bookings property is empty, not if null.
89
  $result = false;
90
  if( $var == 'bookings' ){
91
- $result = !empty($this->bookings);
92
  }
93
  return $result;
94
  }
@@ -125,7 +125,8 @@ class EM_Bookings extends EM_Object implements Iterator{
125
  if($result){
126
  //Success
127
  do_action('em_bookings_added', $EM_Booking);
128
- if( $this->bookings !== null ) $this->bookings[] = $EM_Booking;
 
129
  $email = $EM_Booking->email();
130
  if( get_option('dbem_bookings_approval') == 1 && $EM_Booking->booking_status == 0){
131
  $this->feedback_message = get_option('dbem_booking_feedback_pending');
@@ -180,7 +181,7 @@ class EM_Bookings extends EM_Object implements Iterator{
180
  }else{
181
  if( is_numeric($this->event_id) && $this->event_id > 0 ){
182
  return em_get_event($this->event_id, 'event_id');
183
- }elseif( count($this->bookings) > 0 ){
184
  foreach($this->bookings as $EM_Booking){
185
  /* @var $EM_Booking EM_Booking */
186
  return em_get_event($EM_Booking->event_id, 'event_id');
@@ -213,15 +214,22 @@ class EM_Bookings extends EM_Object implements Iterator{
213
  }else{
214
  //if no end date is set, use event end date (which will have defaulted to the event start date
215
  if( !$EM_Event->is_recurring() ){
216
- $EM_Ticket->ticket_end = $EM_Event->rsvp_end()->getDateTime();
 
 
 
217
  }else{
218
  if( !isset($EM_Ticket->ticket_meta['recurrences']['end_days']) ){
219
  //for recurrences, we take the recurrence_rsvp_days and feed it into the ticket meta that'll handle recurrences
220
- $EM_Ticket->ticket_meta['recurrences']['end_days'] = $EM_Event->recurrence_rsvp_days;
221
- if( !isset($EM_Ticket->ticket_meta['recurrences']['time']) ){
222
- $EM_Ticket->ticket_meta['recurrences']['end_time'] = $EM_Event->event_rsvp_time;
 
 
 
 
223
  }
224
- $EM_Ticket->ticket_end = date('Y-m-d ') . $EM_Ticket->ticket_meta['recurrences']['end_time'];
225
  }
226
  }
227
  }
88
  //if isset is invoked on $EM_Bookings->bookings then we'll assume it's only set if the bookings property is empty, not if null.
89
  $result = false;
90
  if( $var == 'bookings' ){
91
+ $result = $this->bookings !== null;
92
  }
93
  return $result;
94
  }
125
  if($result){
126
  //Success
127
  do_action('em_bookings_added', $EM_Booking);
128
+ if( $this->bookings === null ) $this->bookings = array();
129
+ $this->bookings[] = $EM_Booking;
130
  $email = $EM_Booking->email();
131
  if( get_option('dbem_bookings_approval') == 1 && $EM_Booking->booking_status == 0){
132
  $this->feedback_message = get_option('dbem_booking_feedback_pending');
181
  }else{
182
  if( is_numeric($this->event_id) && $this->event_id > 0 ){
183
  return em_get_event($this->event_id, 'event_id');
184
+ }elseif( is_array($this->bookings) ){
185
  foreach($this->bookings as $EM_Booking){
186
  /* @var $EM_Booking EM_Booking */
187
  return em_get_event($EM_Booking->event_id, 'event_id');
214
  }else{
215
  //if no end date is set, use event end date (which will have defaulted to the event start date
216
  if( !$EM_Event->is_recurring() ){
217
+ //save if we have a valid rsvp end date
218
+ if( $EM_Event->rsvp_end()->valid ){
219
+ $EM_Ticket->ticket_end = $EM_Event->rsvp_end()->getDateTime();
220
+ }
221
  }else{
222
  if( !isset($EM_Ticket->ticket_meta['recurrences']['end_days']) ){
223
  //for recurrences, we take the recurrence_rsvp_days and feed it into the ticket meta that'll handle recurrences
224
+ $EM_Ticket->ticket_meta['recurrences']['end_days'] = !empty($EM_Event->recurrence_rsvp_days) ? $EM_Event->recurrence_rsvp_days : 0;
225
+ if( !isset($EM_Ticket->ticket_meta['recurrences']['end_time']) ){
226
+ iF( empty($EM_Event->event_rsvp_time) ){
227
+ $EM_Ticket->ticket_meta['recurrences']['end_time'] = $EM_Event->start()->getTime();
228
+ }else{
229
+ $EM_Ticket->ticket_meta['recurrences']['end_time'] = $EM_Event->event_rsvp_time;
230
+ }
231
  }
232
+ $EM_Ticket->ticket_end = $EM_Event->start()->format('Y-m-d') . $EM_Ticket->ticket_meta['recurrences']['end_time'];
233
  }
234
  }
235
  }
classes/em-datetime.php CHANGED
@@ -30,18 +30,23 @@ class EM_DateTime extends DateTime {
30
  * @see DateTime::__construct()
31
  * @param string $time
32
  * @param string|EM_DateTimeZone $timezone Unlike DateTime this also accepts string representation of a valid timezone, as well as UTC offsets in form of 'UTC -3' or just '-3'
 
33
  */
34
- public function __construct( $time = null, $timezone = null ){
35
  //get our EM_DateTimeZone
36
  $timezone = EM_DateTimeZone::create($timezone);
37
  //save timezone name for use in getTimezone()
38
  $this->timezone_name = $timezone->getName();
39
  $this->timezone_manual_offset = $timezone->manual_offset;
40
  //fix DateTime error if a regular timestamp is supplied without prepended @ symbol
41
- if( is_numeric($time) ) $time = '@'.$time;
 
 
 
 
42
  //finally, run parent function with our custom timezone
43
  try{
44
- @parent::__construct($time, $timezone);
45
  if( substr($time,0,1) == '@' || $time == 'now' ) $this->setTimezone($timezone);
46
  $this->valid = true; //if we get this far, supplied time is valid
47
  }catch( Exception $e ){
@@ -150,7 +155,7 @@ class EM_DateTime extends DateTime {
150
 
151
  /**
152
  * Returns a date and time representation in the format stored in Events Manager settings.
153
- * @param string $include_hour
154
  * @return string
155
  */
156
  public function formatDefault( $include_hour = true ){
@@ -207,7 +212,9 @@ class EM_DateTime extends DateTime {
207
  /**
208
  * Sets timestamp with PHP 5.2.x fallback.
209
  * Returns EM_DateTime object in all cases, but $this->valid will be set to false if unsuccessful
 
210
  * @see DateTime::setTimestamp()
 
211
  */
212
  public function setTimestamp( $timestamp ){
213
  if( function_exists('date_timestamp_set') ){
@@ -226,6 +233,7 @@ class EM_DateTime extends DateTime {
226
  /**
227
  * Extends DateTime functionality by accepting a false or string value for a timezone.
228
  * Returns EM_DateTime object in all cases, but $this->valid will be set to false if unsuccessful
 
229
  * @see DateTime::setTimezone()
230
  * @return EM_DateTime Returns object for chaining.
231
  */
@@ -258,7 +266,7 @@ class EM_DateTime extends DateTime {
258
  if( $this->timezone_manual_offset !== false ){
259
  $date_array = explode('-', $this->format('Y-m-d'));
260
  }
261
- $return = parent::setTime( $hour, $minute, $second );
262
  $this->handleOffsets();
263
  //post-handle offsets for time changes where dates change as stated above
264
  if( $this->timezone_manual_offset !== false ){
@@ -278,7 +286,7 @@ class EM_DateTime extends DateTime {
278
  if( $this->timezone_manual_offset !== false ){
279
  //we run into issues if we're dealing with timezones on the fringe of date changes e.g. 2018-01-01 01:00:00 UTC+2
280
  $DateTime = new DateTime( $this->getDateTime(), new DateTimeZone('UTC'));
281
- $DateTime->setDate( $year, $month, $day ); //$this->valid is determined here
282
  //create a new timestamp based on UTC DateTime and offset it to current timezone
283
  if( function_exists('date_timestamp_get') ){
284
  $timestamp = $DateTime->getTimestamp();
@@ -382,8 +390,8 @@ class EM_DateTime extends DateTime {
382
 
383
  /**
384
  * Fallback function for PHP versions prior to 5.3, as sub() and add() methods aren't available and therefore we need to generate a valid string we can pass onto modify()
385
- * @param unknown $dateinteval_string
386
- * @param unknown $add_or_subtract
387
  * @return string
388
  */
389
  private function dateinterval_fallback( $dateinteval_string, $add_or_subtract ){
@@ -441,6 +449,7 @@ class EM_DateTime extends DateTime {
441
  * If using this to supply to a date() function, set $server_localized to true which will account for any rogue code
442
  * that sets the server default timezone to something other than UTC (which is WP sets it to at the start)
443
  * @param boolean $server_localized
 
444
  */
445
  public function getTimestampWithOffset( $server_localized = false ){
446
  //aside from the actual offset from the timezone, we also have a local server offset we need to deal with here...
@@ -491,6 +500,7 @@ class EM_DateTime extends DateTime {
491
 
492
  /**
493
  * Returns a MySQL DATE formatted string.
 
494
  * @return string
495
  */
496
  public function getDate( $utc = false ){
30
  * @see DateTime::__construct()
31
  * @param string $time
32
  * @param string|EM_DateTimeZone $timezone Unlike DateTime this also accepts string representation of a valid timezone, as well as UTC offsets in form of 'UTC -3' or just '-3'
33
+ * @throws Exception
34
  */
35
+ public function __construct( $time = 'now', $timezone = null ){
36
  //get our EM_DateTimeZone
37
  $timezone = EM_DateTimeZone::create($timezone);
38
  //save timezone name for use in getTimezone()
39
  $this->timezone_name = $timezone->getName();
40
  $this->timezone_manual_offset = $timezone->manual_offset;
41
  //fix DateTime error if a regular timestamp is supplied without prepended @ symbol
42
+ if( is_numeric($time) ){
43
+ $time = '@'.$time;
44
+ }elseif( is_null($time) ){
45
+ $time = 'now';
46
+ }
47
  //finally, run parent function with our custom timezone
48
  try{
49
+ @parent::__construct( (string) $time, $timezone);
50
  if( substr($time,0,1) == '@' || $time == 'now' ) $this->setTimezone($timezone);
51
  $this->valid = true; //if we get this far, supplied time is valid
52
  }catch( Exception $e ){
155
 
156
  /**
157
  * Returns a date and time representation in the format stored in Events Manager settings.
158
+ * @param bool $include_hour
159
  * @return string
160
  */
161
  public function formatDefault( $include_hour = true ){
212
  /**
213
  * Sets timestamp with PHP 5.2.x fallback.
214
  * Returns EM_DateTime object in all cases, but $this->valid will be set to false if unsuccessful
215
+ * @param int $timestamp
216
  * @see DateTime::setTimestamp()
217
+ * @return EM_DateTime
218
  */
219
  public function setTimestamp( $timestamp ){
220
  if( function_exists('date_timestamp_set') ){
233
  /**
234
  * Extends DateTime functionality by accepting a false or string value for a timezone.
235
  * Returns EM_DateTime object in all cases, but $this->valid will be set to false if unsuccessful
236
+ * @param string $timezone
237
  * @see DateTime::setTimezone()
238
  * @return EM_DateTime Returns object for chaining.
239
  */
266
  if( $this->timezone_manual_offset !== false ){
267
  $date_array = explode('-', $this->format('Y-m-d'));
268
  }
269
+ $return = parent::setTime( (int) $hour, (int) $minute, (int) $second );
270
  $this->handleOffsets();
271
  //post-handle offsets for time changes where dates change as stated above
272
  if( $this->timezone_manual_offset !== false ){
286
  if( $this->timezone_manual_offset !== false ){
287
  //we run into issues if we're dealing with timezones on the fringe of date changes e.g. 2018-01-01 01:00:00 UTC+2
288
  $DateTime = new DateTime( $this->getDateTime(), new DateTimeZone('UTC'));
289
+ $DateTime->setDate( (int) $year, (int) $month, (int) $day ); //$this->valid is determined here
290
  //create a new timestamp based on UTC DateTime and offset it to current timezone
291
  if( function_exists('date_timestamp_get') ){
292
  $timestamp = $DateTime->getTimestamp();
390
 
391
  /**
392
  * Fallback function for PHP versions prior to 5.3, as sub() and add() methods aren't available and therefore we need to generate a valid string we can pass onto modify()
393
+ * @param string $dateinteval_string
394
+ * @param string $add_or_subtract
395
  * @return string
396
  */
397
  private function dateinterval_fallback( $dateinteval_string, $add_or_subtract ){
449
  * If using this to supply to a date() function, set $server_localized to true which will account for any rogue code
450
  * that sets the server default timezone to something other than UTC (which is WP sets it to at the start)
451
  * @param boolean $server_localized
452
+ * @return int
453
  */
454
  public function getTimestampWithOffset( $server_localized = false ){
455
  //aside from the actual offset from the timezone, we also have a local server offset we need to deal with here...
500
 
501
  /**
502
  * Returns a MySQL DATE formatted string.
503
+ * @param bool $utc
504
  * @return string
505
  */
506
  public function getDate( $utc = false ){
classes/em-event-post-admin.php CHANGED
@@ -501,7 +501,9 @@ class EM_Event_Recurring_Post_Admin{
501
  }
502
  add_meta_box('em-event-recurring', __('Recurrences','events-manager'), array('EM_Event_Recurring_Post_Admin','meta_box_recurrence'),'event-recurring', 'normal','high');
503
  //add_meta_box('em-event-meta', 'Event Meta (debugging only)', array('EM_Event_Post_Admin','meta_box_metadump'),'event-recurring', 'normal','high');
504
- add_meta_box('em-event-where', __('Where','events-manager'), array('EM_Event_Post_Admin','meta_box_location'),'event-recurring', 'normal','high');
 
 
505
  if( get_option('dbem_rsvp_enabled') && $EM_Event->can_manage('manage_bookings','manage_others_bookings') ){
506
  add_meta_box('em-event-bookings', __('Bookings/Registration','events-manager'), array('EM_Event_Post_Admin','meta_box_bookings'),'event-recurring', 'normal','high');
507
  }
501
  }
502
  add_meta_box('em-event-recurring', __('Recurrences','events-manager'), array('EM_Event_Recurring_Post_Admin','meta_box_recurrence'),'event-recurring', 'normal','high');
503
  //add_meta_box('em-event-meta', 'Event Meta (debugging only)', array('EM_Event_Post_Admin','meta_box_metadump'),'event-recurring', 'normal','high');
504
+ if(get_option('dbem_locations_enabled', true)){
505
+ add_meta_box('em-event-where', __('Where','events-manager'), array('EM_Event_Post_Admin','meta_box_location'),'event-recurring', 'normal','high');
506
+ }
507
  if( get_option('dbem_rsvp_enabled') && $EM_Event->can_manage('manage_bookings','manage_others_bookings') ){
508
  add_meta_box('em-event-bookings', __('Bookings/Registration','events-manager'), array('EM_Event_Post_Admin','meta_box_bookings'),'event-recurring', 'normal','high');
509
  }
classes/em-event-post.php CHANGED
@@ -318,13 +318,13 @@ class EM_Event_Post {
318
  if( is_admin() ){
319
  //admin areas don't need special ordering, so make it simple
320
  if( !empty($_REQUEST['orderby']) && $_REQUEST['orderby'] != 'date-time' ){
321
- $wp_query->query_vars['orderby'] = $_REQUEST['orderby'];
322
  }else{
323
  $wp_query->query_vars['orderby'] = 'meta_value';
324
  $wp_query->query_vars['meta_key'] = '_event_start_local';
325
  $wp_query->query_vars['meta_type'] = 'DATETIME';
326
  }
327
- $wp_query->query_vars['order'] = (!empty($_REQUEST['order'])) ? $_REQUEST['order']:'ASC';
328
  }else{
329
  if( get_option('dbem_events_default_archive_orderby') == 'title'){
330
  $wp_query->query_vars['orderby'] = 'title';
318
  if( is_admin() ){
319
  //admin areas don't need special ordering, so make it simple
320
  if( !empty($_REQUEST['orderby']) && $_REQUEST['orderby'] != 'date-time' ){
321
+ $wp_query->query_vars['orderby'] = sanitize_key($_REQUEST['orderby']);
322
  }else{
323
  $wp_query->query_vars['orderby'] = 'meta_value';
324
  $wp_query->query_vars['meta_key'] = '_event_start_local';
325
  $wp_query->query_vars['meta_type'] = 'DATETIME';
326
  }
327
+ $wp_query->query_vars['order'] = (!empty($_REQUEST['order']) && preg_match('/^(ASC|DESC)$/i', $_REQUEST['order'])) ? $_REQUEST['order']:'ASC';
328
  }else{
329
  if( get_option('dbem_events_default_archive_orderby') == 'title'){
330
  $wp_query->query_vars['orderby'] = 'title';
classes/em-event-posts-admin.php CHANGED
@@ -22,9 +22,6 @@ class EM_Event_Posts_Admin{
22
  $row_action_type = is_post_type_hierarchical( EM_POST_TYPE_EVENT ) ? 'page_row_actions' : 'post_row_actions';
23
  add_filter($row_action_type, array('EM_Event_Posts_Admin','row_actions'),10,2);
24
  add_action('admin_head', array('EM_Event_Posts_Admin','admin_head'));
25
-
26
- if( empty($_GET['orderby']) ) $_GET['orderby'] = 'date-time';
27
- if( empty($_GET['order']) ) $_GET['order'] = 'asc';
28
  }
29
  //collumns
30
  add_filter('manage_edit-'.EM_POST_TYPE_EVENT.'_columns' , array('EM_Event_Posts_Admin','columns_add'));
@@ -212,12 +209,14 @@ class EM_Event_Posts_Admin{
212
  //get meta value to see if post has location, otherwise
213
  $EM_Location = $EM_Event->get_location();
214
  if( !empty($EM_Location->location_id) ){
215
- echo "<strong><a href='". $EM_Location->get_permalink()."'>" . $EM_Location->location_name . "</a></strong>
216
- <span class='row-actions'> -
217
- <a href='". esc_url($EM_Location->get_edit_url())."'>". esc_html__('Edit') ."</a> |
218
- <a href='". esc_url($EM_Location->get_permalink())."'>". esc_html__('View') ."</a>
219
- </span>
220
- <br/>" . $EM_Location->location_address . " - " . $EM_Location->location_town;
 
 
221
  }else{
222
  echo __('None','events-manager');
223
  }
@@ -246,16 +245,25 @@ class EM_Event_Posts_Admin{
246
  <?php endif;
247
  echo ($EM_Event->is_recurrence()) ? '<br />':'';
248
  }
249
- if ( $EM_Event->is_recurrence() && $EM_Event->can_manage('edit_recurring_events','edit_others_recurring_events') ) {
250
- $recurrence_delete_confirm = __('WARNING! You will delete ALL recurrences of this event, including booking history associated with any event in this recurrence. To keep booking information, go to the relevant single event and save it to detach it from this recurrence series.','events-manager');
 
 
 
 
 
 
 
251
  ?>
252
  <strong>
253
- <?php echo $EM_Event->get_recurrence_description(); ?> <br />
254
  </strong>
 
 
255
  <div class="row-actions">
256
- <a href="<?php echo admin_url(); ?>post.php?action=edit&amp;post=<?php echo $EM_Event->get_event_recurrence()->post_id ?>"><?php _e ( 'Edit Recurring Events', 'events-manager'); ?></a> | <span class="trash"><a class="em-delete-recurrence-link" href="<?php echo get_delete_post_link($EM_Event->get_event_recurrence()->post_id); ?>"><?php _e('Delete','events-manager'); ?></a></span> | <a class="em-detach-link" href="<?php echo $EM_Event->get_detach_url(); ?>"><?php _e('Detach', 'events-manager'); ?></a>
257
  </div>
258
- <?php
259
  }
260
 
261
  break;
@@ -350,11 +358,15 @@ class EM_Event_Recurring_Posts_Admin{
350
  unset($columns['comments']);
351
  unset($columns['date']);
352
  unset($columns['author']);
353
- return array_merge($id_array, $columns, array(
354
  'location' => __('Location','events-manager'),
355
  'date-time' => __('Date and Time','events-manager'),
356
  'author' => __('Owner','events-manager'),
357
  ));
 
 
 
 
358
  }
359
 
360
 
@@ -371,12 +383,14 @@ class EM_Event_Recurring_Posts_Admin{
371
  //get meta value to see if post has location, otherwise
372
  $EM_Location = $EM_Event->get_location();
373
  if( !empty($EM_Location->location_id) ){
374
- echo "<strong><a href='". $EM_Location->get_permalink()."'>" . $EM_Location->location_name . "</a></strong>
375
- <span class='row-actions'> -
376
- <a href='". esc_url($EM_Location->get_edit_url())."'>". esc_html__('Edit') ."</a> |
377
- <a href='". esc_url($EM_Location->get_permalink())."'>". esc_html__('View') ."</a>
378
- </span>
379
- <br/>" . $EM_Location->location_address . " - " . $EM_Location->location_town;
 
 
380
  }else{
381
  echo __('None','events-manager');
382
  }
22
  $row_action_type = is_post_type_hierarchical( EM_POST_TYPE_EVENT ) ? 'page_row_actions' : 'post_row_actions';
23
  add_filter($row_action_type, array('EM_Event_Posts_Admin','row_actions'),10,2);
24
  add_action('admin_head', array('EM_Event_Posts_Admin','admin_head'));
 
 
 
25
  }
26
  //collumns
27
  add_filter('manage_edit-'.EM_POST_TYPE_EVENT.'_columns' , array('EM_Event_Posts_Admin','columns_add'));
209
  //get meta value to see if post has location, otherwise
210
  $EM_Location = $EM_Event->get_location();
211
  if( !empty($EM_Location->location_id) ){
212
+ $actions = array();
213
+ $actions[] = "<a href='". esc_url($EM_Location->get_permalink())."'>". esc_html__('View') ."</a>";
214
+ if( $EM_Location->can_manage('edit_locations', 'edit_others_locations') ) {
215
+ $actions[] = "<a href='". esc_url($EM_Location->get_edit_url())."'>". esc_html__('Edit') ."</a>";
216
+ }
217
+ echo "<strong><a href='". $EM_Location->get_permalink()."'>" . $EM_Location->location_name . "</a></strong>";
218
+ echo "<span class='row-actions'> - ". implode(' | ', $actions) . "</span>";
219
+ echo "<br/>" . $EM_Location->location_address . " - " . $EM_Location->location_town;
220
  }else{
221
  echo __('None','events-manager');
222
  }
245
  <?php endif;
246
  echo ($EM_Event->is_recurrence()) ? '<br />':'';
247
  }
248
+ if ( $EM_Event->is_recurrence() && current_user_can('edit_recurring_events','edit_others_recurring_events') ) {
249
+ $actions = array();
250
+ if( $EM_Event->get_event_recurrence()->can_manage('edit_recurring_events', 'edit_others_recurring_events') ){
251
+ $actions[] = '<a href="'. admin_url() .'post.php?action=edit&amp;post='. $EM_Event->get_event_recurrence()->post_id .'">'. esc_html__( 'Edit Recurring Events', 'events-manager'). '</a>';
252
+ $actions[] = '<a class="em-detach-link" href="'. esc_url($EM_Event->get_detach_url()) .'">'. esc_html__('Detach', 'events-manager') .'</a>';
253
+ }
254
+ if( $EM_Event->get_event_recurrence()->can_manage('delete_recurring_events', 'delete_others_recurring_events') ){
255
+ $actions[] = '<span class="trash"><a class="em-delete-recurrence-link" href="'. get_delete_post_link($EM_Event->get_event_recurrence()->post_id) .'">'. esc_html__('Delete','events-manager') .'</a></span>';
256
+ }
257
  ?>
258
  <strong>
259
+ <?php echo $EM_Event->get_recurrence_description(); ?>
260
  </strong>
261
+ <?php if( !empty($actions) ): ?>
262
+ <br >
263
  <div class="row-actions">
264
+ <?php echo implode(' | ', $actions); ?>
265
  </div>
266
+ <?php endif;
267
  }
268
 
269
  break;
358
  unset($columns['comments']);
359
  unset($columns['date']);
360
  unset($columns['author']);
361
+ $columns = array_merge($id_array, $columns, array(
362
  'location' => __('Location','events-manager'),
363
  'date-time' => __('Date and Time','events-manager'),
364
  'author' => __('Owner','events-manager'),
365
  ));
366
+ if( !get_option('dbem_locations_enabled') ){
367
+ unset($columns['location']);
368
+ }
369
+ return $columns;
370
  }
371
 
372
 
383
  //get meta value to see if post has location, otherwise
384
  $EM_Location = $EM_Event->get_location();
385
  if( !empty($EM_Location->location_id) ){
386
+ $actions = array();
387
+ $actions[] = "<a href='". esc_url($EM_Location->get_permalink())."'>". esc_html__('View') ."</a>";
388
+ if( $EM_Location->can_manage('edit_locations', 'edit_others_locations') ) {
389
+ $actions[] = "<a href='". esc_url($EM_Location->get_edit_url())."'>". esc_html__('Edit') ."</a>";
390
+ }
391
+ echo "<strong><a href='". $EM_Location->get_permalink()."'>" . $EM_Location->location_name . "</a></strong>";
392
+ echo "<span class='row-actions'> - ". implode(' | ', $actions) . "</span>";
393
+ echo "<br/>" . $EM_Location->location_address . " - " . $EM_Location->location_town;
394
  }else{
395
  echo __('None','events-manager');
396
  }
classes/em-event.php CHANGED
@@ -409,13 +409,9 @@ class EM_Event extends EM_Object{
409
  elseif( $prop == 'event_rsvp_date') $this->rsvp_end = null;
410
  }
411
  //deprecated properties, use start()->setTimestamp() instead
412
- elseif( $prop == 'start' || $prop == 'end' ){
413
  if( is_numeric($val) ){
414
- if( $prop == 'start' ){
415
- $this->start()->setTimestamp($val);
416
- }else{
417
- $this->end()->setTimestamp($val);
418
- }
419
  }elseif( is_string($val) ){
420
  $this->$val = new EM_DateTime($val, $this->event_timezone);
421
  }
@@ -554,7 +550,7 @@ class EM_Event extends EM_Object{
554
  //don't forget categories!
555
  if( get_option('dbem_categories_enabled') ) $this->get_categories()->get_post();
556
  //get the rest and validate (optional)
557
- $this->get_post_meta(false);
558
  //anonymous submissions and guest basic info
559
  if( !is_user_logged_in() && get_option('dbem_events_anonymous_submissions') && empty($this->event_id) ){
560
  $this->event_owner_anonymous = 1;
@@ -1411,7 +1407,8 @@ class EM_Event extends EM_Object{
1411
  public function rsvp_end( $utc_timezone = false ){
1412
  if( empty($this->rsvp_end) || !$this->rsvp_end->valid ){
1413
  if( !empty($this->event_rsvp_date ) ){
1414
- $this->rsvp_end = new EM_DateTime($this->event_rsvp_date." ".$this->event_rsvp_time, $this->event_timezone);
 
1415
  if( !$this->rsvp_end->valid ){
1416
  //invalid date will revert to start time
1417
  $this->rsvp_end = $this->start()->copy();
@@ -1728,7 +1725,6 @@ class EM_Event extends EM_Object{
1728
  //$format = do_shortcode($format); //parse shortcode first, so that formats within shortcodes are parsed properly, however uncommenting this will break shortcode containing placeholders for arguments
1729
  $event_string = $format;
1730
  //Time place holder that doesn't show if empty.
1731
- //TODO add filter here too
1732
  preg_match_all('/#@?_\{[^}]+\}/', $format, $results);
1733
  foreach($results[0] as $result) {
1734
  if(substr($result, 0, 3 ) == "#@_"){
@@ -2023,6 +2019,19 @@ class EM_Event extends EM_Object{
2023
  case '#_EVENTTIMEZONERAW':
2024
  $replace = $this->event_timezone;
2025
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
2026
  //Links
2027
  case '#_EVENTPAGEURL': //deprecated
2028
  case '#_LINKEDNAME': //deprecated
@@ -2344,11 +2353,13 @@ class EM_Event extends EM_Object{
2344
  }
2345
  }
2346
  //Now do dependent objects
2347
- if( !empty($this->location_id) && $this->get_location()->location_status ){
2348
- $event_string = $this->get_location()->output($event_string, $target);
2349
- }else{
2350
- $EM_Location = new EM_Location();
2351
- $event_string = $EM_Location->output($event_string, $target);
 
 
2352
  }
2353
 
2354
  if( get_option('dbem_categories_enabled') ){
@@ -2476,10 +2487,10 @@ class EM_Event extends EM_Object{
2476
  delete_post_meta($this->post_id, '_recurrence_id');
2477
  $this->feedback_message = __('Event detached.','events-manager') . ' <a href="'.$url.'">'.__('Undo','events-manager').'</a>';
2478
  $this->recurrence_id = 0;
2479
- return true;
2480
  }
2481
  $this->add_error(__('Event could not be detached.','events-manager'));
2482
- return false;
2483
  }
2484
 
2485
  /**
@@ -2493,10 +2504,10 @@ class EM_Event extends EM_Object{
2493
  $wpdb->update(EM_EVENTS_TABLE, array('recurrence_id'=>$recurrence_id), array('event_id' => $this->event_id));
2494
  update_post_meta($this->post_id, '_recurrence_id', $recurrence_id);
2495
  $this->feedback_message = __('Event re-attached to recurrence.','events-manager');
2496
- return true;
2497
  }
2498
  $this->add_error(__('Event could not be attached.','events-manager'));
2499
- return false;
2500
  }
2501
 
2502
  /**
@@ -2505,8 +2516,8 @@ class EM_Event extends EM_Object{
2505
  */
2506
  function save_events() {
2507
  global $wpdb;
2508
- $event_ids = $post_ids = $event_dates = array();
2509
  if( !$this->can_manage('edit_events','edit_others_events') ) return apply_filters('em_event_save_events', false, $this, $event_ids, $post_ids);
 
2510
  if( $this->is_published() || 'future' == $this->post_status ){
2511
  //check if there's any events already created, if not (such as when an event is first submitted for approval and then published), force a reschedule.
2512
  if( $wpdb->get_var('SELECT COUNT(event_id) FROM '.EM_EVENTS_TABLE.' WHERE recurrence_id='. absint($this->event_id)) == 0 ){
@@ -2517,7 +2528,6 @@ class EM_Event extends EM_Object{
2517
  $event = $this->to_array(true); //event template - for index
2518
  if( !empty($event['event_attributes']) ) $event['event_attributes'] = serialize($event['event_attributes']);
2519
  $post_fields = $wpdb->get_row('SELECT * FROM '.$wpdb->posts.' WHERE ID='.$this->post_id, ARRAY_A); //post to copy
2520
- $post_name = $post_fields['post_name']; //save post slug since we'll be using this
2521
  $post_fields['post_type'] = 'event'; //make sure we'll save events, not recurrence templates
2522
  $meta_fields_map = $wpdb->get_results('SELECT meta_key,meta_value FROM '.$wpdb->postmeta.' WHERE post_id='.$this->post_id, ARRAY_A);
2523
  $meta_fields = array();
@@ -2542,9 +2552,11 @@ class EM_Event extends EM_Object{
2542
  $event['recurrence'] = 0;
2543
 
2544
  //Let's start saving!
2545
- $event_saves = array();
2546
- //First thing - times. If we're changing event times, we need to delete all events and recreate them with the right times, no other way
2547
  $recurring_date_format = apply_filters('em_event_save_events_format', 'Y-m-d');
 
 
 
2548
  if( $this->recurring_reschedule ){
2549
  $this->delete_events(); //Delete old events beforehand, this will change soon
2550
  $matching_days = $this->get_recurrence_days(); //Get days where events recur
@@ -2558,7 +2570,11 @@ class EM_Event extends EM_Object{
2558
  $EM_DateTime->setTimestamp($day)->setTimeString($event['event_start_time']);
2559
  $start_timestamp = $EM_DateTime->getTimestamp(); //for quick access later
2560
  //rewrite post fields if needed
2561
- $post_fields['post_name'] = $event['event_slug'] = apply_filters('em_event_save_events_slug', $post_name.'-'.$EM_DateTime->format($recurring_date_format), $post_fields, $day, $matching_days, $this);
 
 
 
 
2562
  //set start date
2563
  $event['event_start_date'] = $meta_fields['_event_start_date'] = $EM_DateTime->getDate();
2564
  $event['event_start'] = $meta_fields['_event_start'] = $EM_DateTime->getDateTime(true);
@@ -2627,7 +2643,6 @@ class EM_Event extends EM_Object{
2627
  }
2628
  }else{
2629
  //we go through all event main data and meta data, we delete and recreate all meta data
2630
- $meta_inserts = array();
2631
  //now unset some vars we don't need to deal with since we're just updating data in the wp_em_events and posts table
2632
  unset( $event['event_date_created'], $event['recurrence_id'], $event['recurrence'], $event['event_start_date'], $event['event_end_date'] );
2633
  $event['event_date_modified'] = current_time('mysql'); //since the recurrences are modified but not recreated
@@ -2646,7 +2661,12 @@ class EM_Event extends EM_Object{
2646
  $event_dates[$event_array['event_id']] = $start_timestamp;
2647
  $post_ids[] = $event_array['post_id'];
2648
  //do we need to change the slugs?
2649
- $post_fields['post_name'] = $event['event_slug'] = apply_filters('em_event_save_events_slug', $post_name.'-'.$EM_DateTime->setTimestamp($start_timestamp)->format($recurring_date_format), $post_fields, $start_timestamp, array(), $this);
 
 
 
 
 
2650
  //adjust certain meta information relative to dates and times
2651
  if( !empty($this->recurrence_rsvp_days) && is_numeric($this->recurrence_rsvp_days) ){
2652
  $event_rsvp_days = $this->recurrence_rsvp_days >= 0 ? '+'. $this->recurrence_rsvp_days: $this->recurrence_rsvp_days;
@@ -2805,13 +2825,41 @@ class EM_Event extends EM_Object{
2805
  wp_schedule_single_event( $time, 'publish_future_post', array( $post_id ) );
2806
  }
2807
  }
2808
- return apply_filters('em_event_save_events', !in_array(false, $event_saves) && $result !== false, $this, $event_ids, $post_ids);
2809
  }elseif( !$this->is_published() && $this->get_previous_status() != $this->get_status() && defined('EM_FORCE_RECURRENCES_SAVE') && EM_FORCE_RECURRENCES_SAVE ){
2810
  $this->set_status_events($this->get_status());
2811
  }
2812
  return apply_filters('em_event_save_events', false, $this, $event_ids, $post_ids);
2813
  }
2814
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2815
  /**
2816
  * Removes all reoccurring events.
2817
  * @param $recurrence_id
@@ -2884,7 +2932,8 @@ class EM_Event extends EM_Object{
2884
  break;
2885
  case 'monthly':
2886
  //loop months starting this month by intervals
2887
- $current_date = $this->start()->copy()->modify('first day of this month')->setTime(0,0,0); //Start date on first day of month
 
2888
  while( $current_date->getTimestamp() <= $this->end()->getTimestamp() ){
2889
  $last_day_of_month = $current_date->format('t');
2890
  //Now find which day we're talking about
@@ -2915,8 +2964,9 @@ class EM_Event extends EM_Object{
2915
  $matching_days[] = $matching_date;
2916
  }
2917
  }
2918
- //add the monthly interval to the current date
2919
- $current_date->add('P'.$this->recurrence_interval.'M')->modify('first day of this month');
 
2920
  }
2921
  break;
2922
  case 'yearly':
@@ -2924,7 +2974,7 @@ class EM_Event extends EM_Object{
2924
  $EM_DateTime = $this->start()->copy();
2925
  while( $EM_DateTime <= $this->end() ){
2926
  $matching_days[] = $EM_DateTime->getTimestamp();
2927
- $EM_DateTime->add('P1Y');
2928
  }
2929
  break;
2930
  }
@@ -3120,7 +3170,7 @@ if ( is_object($GLOBALS['wp_embed']) ){
3120
  */
3121
  function em_event_gallery_override( $attr = array() ){
3122
  global $post;
3123
- if( $post->post_type == EM_POST_TYPE_EVENT && empty($attr['id']) && empty($attr['ids']) ){
3124
  //no id specified, so check if it's recurring and override id with recurrence template post id
3125
  $EM_Event = em_get_event($post->ID, 'post_id');
3126
  if( $EM_Event->is_recurrence() ){
409
  elseif( $prop == 'event_rsvp_date') $this->rsvp_end = null;
410
  }
411
  //deprecated properties, use start()->setTimestamp() instead
412
+ elseif( $prop == 'start' || $prop == 'end' || $prop == 'rsvp_end' ){
413
  if( is_numeric($val) ){
414
+ $this->$prop()->setTimestamp( (int) $val);
 
 
 
 
415
  }elseif( is_string($val) ){
416
  $this->$val = new EM_DateTime($val, $this->event_timezone);
417
  }
550
  //don't forget categories!
551
  if( get_option('dbem_categories_enabled') ) $this->get_categories()->get_post();
552
  //get the rest and validate (optional)
553
+ $this->get_post_meta();
554
  //anonymous submissions and guest basic info
555
  if( !is_user_logged_in() && get_option('dbem_events_anonymous_submissions') && empty($this->event_id) ){
556
  $this->event_owner_anonymous = 1;
1407
  public function rsvp_end( $utc_timezone = false ){
1408
  if( empty($this->rsvp_end) || !$this->rsvp_end->valid ){
1409
  if( !empty($this->event_rsvp_date ) ){
1410
+ $rsvp_time = !empty($this->event_rsvp_time) ? $this->event_rsvp_time : $this->event_start_time;
1411
+ $this->rsvp_end = new EM_DateTime($this->event_rsvp_date." ".$rsvp_time, $this->event_timezone);
1412
  if( !$this->rsvp_end->valid ){
1413
  //invalid date will revert to start time
1414
  $this->rsvp_end = $this->start()->copy();
1725
  //$format = do_shortcode($format); //parse shortcode first, so that formats within shortcodes are parsed properly, however uncommenting this will break shortcode containing placeholders for arguments
1726
  $event_string = $format;
1727
  //Time place holder that doesn't show if empty.
 
1728
  preg_match_all('/#@?_\{[^}]+\}/', $format, $results);
1729
  foreach($results[0] as $result) {
1730
  if(substr($result, 0, 3 ) == "#@_"){
2019
  case '#_EVENTTIMEZONERAW':
2020
  $replace = $this->event_timezone;
2021
  break;
2022
+ //Recurring Placeholders
2023
+ case '#_RECURRINGDATERANGE': //Outputs the #_EVENTDATES equivalent of the recurring event template pattern.
2024
+ $replace = $this->get_event_recurrence()->output_dates(); //if not a recurrence, we're running output_dates on $this
2025
+ break;
2026
+ case '#_RECURRINGPATTERN':
2027
+ $replace = '';
2028
+ if( $this->is_recurrence() || $this->is_recurring() ){
2029
+ $replace = $this->get_event_recurrence()->get_recurrence_description();
2030
+ }
2031
+ break;
2032
+ case '#_RECURRINGID':
2033
+ $replace = $this->recurrence_id;
2034
+ break;
2035
  //Links
2036
  case '#_EVENTPAGEURL': //deprecated
2037
  case '#_LINKEDNAME': //deprecated
2353
  }
2354
  }
2355
  //Now do dependent objects
2356
+ if( get_option('dbem_locations_enabled') ){
2357
+ if( !empty($this->location_id) && $this->get_location()->location_status ){
2358
+ $event_string = $this->get_location()->output($event_string, $target);
2359
+ }else{
2360
+ $EM_Location = new EM_Location();
2361
+ $event_string = $EM_Location->output($event_string, $target);
2362
+ }
2363
  }
2364
 
2365
  if( get_option('dbem_categories_enabled') ){
2487
  delete_post_meta($this->post_id, '_recurrence_id');
2488
  $this->feedback_message = __('Event detached.','events-manager') . ' <a href="'.$url.'">'.__('Undo','events-manager').'</a>';
2489
  $this->recurrence_id = 0;
2490
+ return apply_filters('em_event_detach', true, $this);
2491
  }
2492
  $this->add_error(__('Event could not be detached.','events-manager'));
2493
+ return apply_filters('em_event_detach', false, $this);
2494
  }
2495
 
2496
  /**
2504
  $wpdb->update(EM_EVENTS_TABLE, array('recurrence_id'=>$recurrence_id), array('event_id' => $this->event_id));
2505
  update_post_meta($this->post_id, '_recurrence_id', $recurrence_id);
2506
  $this->feedback_message = __('Event re-attached to recurrence.','events-manager');
2507
+ return apply_filters('em_event_attach', true, $recurrence_id, $this);
2508
  }
2509
  $this->add_error(__('Event could not be attached.','events-manager'));
2510
+ return apply_filters('em_event_attach', false, $recurrence_id, $this);
2511
  }
2512
 
2513
  /**
2516
  */
2517
  function save_events() {
2518
  global $wpdb;
 
2519
  if( !$this->can_manage('edit_events','edit_others_events') ) return apply_filters('em_event_save_events', false, $this, $event_ids, $post_ids);
2520
+ $event_ids = $post_ids = $event_dates = array();
2521
  if( $this->is_published() || 'future' == $this->post_status ){
2522
  //check if there's any events already created, if not (such as when an event is first submitted for approval and then published), force a reschedule.
2523
  if( $wpdb->get_var('SELECT COUNT(event_id) FROM '.EM_EVENTS_TABLE.' WHERE recurrence_id='. absint($this->event_id)) == 0 ){
2528
  $event = $this->to_array(true); //event template - for index
2529
  if( !empty($event['event_attributes']) ) $event['event_attributes'] = serialize($event['event_attributes']);
2530
  $post_fields = $wpdb->get_row('SELECT * FROM '.$wpdb->posts.' WHERE ID='.$this->post_id, ARRAY_A); //post to copy
 
2531
  $post_fields['post_type'] = 'event'; //make sure we'll save events, not recurrence templates
2532
  $meta_fields_map = $wpdb->get_results('SELECT meta_key,meta_value FROM '.$wpdb->postmeta.' WHERE post_id='.$this->post_id, ARRAY_A);
2533
  $meta_fields = array();
2552
  $event['recurrence'] = 0;
2553
 
2554
  //Let's start saving!
2555
+ $event_saves = $meta_inserts = array();
 
2556
  $recurring_date_format = apply_filters('em_event_save_events_format', 'Y-m-d');
2557
+ $post_name = $this->sanitize_recurrence_slug( $post_fields['post_name'], $this->start()->format($recurring_date_format)); //template sanitized post slug since we'll be using this
2558
+ //First thing - times. If we're changing event times, we need to delete all events and recreate them with the right times, no other way
2559
+
2560
  if( $this->recurring_reschedule ){
2561
  $this->delete_events(); //Delete old events beforehand, this will change soon
2562
  $matching_days = $this->get_recurrence_days(); //Get days where events recur
2570
  $EM_DateTime->setTimestamp($day)->setTimeString($event['event_start_time']);
2571
  $start_timestamp = $EM_DateTime->getTimestamp(); //for quick access later
2572
  //rewrite post fields if needed
2573
+ //set post slug, which may need to be sanitized for length as we pre/postfix a date for uniqueness
2574
+ $event_slug_date = $EM_DateTime->format( $recurring_date_format );
2575
+ $event_slug = $this->sanitize_recurrence_slug($post_name, $event_slug_date);
2576
+ $event_slug = apply_filters('em_event_save_events_recurrence_slug', $event_slug.'-'.$event_slug_date, $event_slug, $event_slug_date, $day, $this); //use this instead
2577
+ $post_fields['post_name'] = $event['event_slug'] = apply_filters('em_event_save_events_slug', $event_slug, $post_fields, $day, $matching_days, $this); //deprecated filter
2578
  //set start date
2579
  $event['event_start_date'] = $meta_fields['_event_start_date'] = $EM_DateTime->getDate();
2580
  $event['event_start'] = $meta_fields['_event_start'] = $EM_DateTime->getDateTime(true);
2643
  }
2644
  }else{
2645
  //we go through all event main data and meta data, we delete and recreate all meta data
 
2646
  //now unset some vars we don't need to deal with since we're just updating data in the wp_em_events and posts table
2647
  unset( $event['event_date_created'], $event['recurrence_id'], $event['recurrence'], $event['event_start_date'], $event['event_end_date'] );
2648
  $event['event_date_modified'] = current_time('mysql'); //since the recurrences are modified but not recreated
2661
  $event_dates[$event_array['event_id']] = $start_timestamp;
2662
  $post_ids[] = $event_array['post_id'];
2663
  //do we need to change the slugs?
2664
+ //(re)set post slug, which may need to be sanitized for length as we pre/postfix a date for uniqueness
2665
+ $EM_DateTime->setTimestamp($start_timestamp);
2666
+ $event_slug_date = $EM_DateTime->format( $recurring_date_format );
2667
+ $event_slug = $this->sanitize_recurrence_slug($post_name, $event_slug_date);
2668
+ $event_slug = apply_filters('em_event_save_events_recurrence_slug', $event_slug.'-'.$event_slug_date, $event_slug, $event_slug_date, $start_timestamp, $this); //use this instead
2669
+ $post_fields['post_name'] = $event['event_slug'] = apply_filters('em_event_save_events_slug', $event_slug, $post_fields, $start_timestamp, array(), $this); //deprecated filter
2670
  //adjust certain meta information relative to dates and times
2671
  if( !empty($this->recurrence_rsvp_days) && is_numeric($this->recurrence_rsvp_days) ){
2672
  $event_rsvp_days = $this->recurrence_rsvp_days >= 0 ? '+'. $this->recurrence_rsvp_days: $this->recurrence_rsvp_days;
2825
  wp_schedule_single_event( $time, 'publish_future_post', array( $post_id ) );
2826
  }
2827
  }
2828
+ return apply_filters('em_event_save_events', !in_array(false, $event_saves) && $result !== false, $this, $event_ids, $post_ids);
2829
  }elseif( !$this->is_published() && $this->get_previous_status() != $this->get_status() && defined('EM_FORCE_RECURRENCES_SAVE') && EM_FORCE_RECURRENCES_SAVE ){
2830
  $this->set_status_events($this->get_status());
2831
  }
2832
  return apply_filters('em_event_save_events', false, $this, $event_ids, $post_ids);
2833
  }
2834
 
2835
+ /**
2836
+ * Ensures a post slug is the correct length when the date postfix is added, which takes into account multibyte and url-encoded characters and WP unique suffixes.
2837
+ * If a url-encoded slug is nearing 200 characters (the data character limit in the db table), adding a date to the end will cause issues when saving to the db.
2838
+ * This function checks if the final slug is longer than 200 characters and removes one entire character rather than part of a hex-encoded character, until the right size is met.
2839
+ * @param string $post_name
2840
+ * @param string $post_slug_postfix
2841
+ * @return string
2842
+ */
2843
+ public function sanitize_recurrence_slug( $post_name, $post_slug_postfix ){
2844
+ if( strlen($post_name.'-'.$post_slug_postfix) > 200 ){
2845
+ if( preg_match('/^(.+)(\-[0-9]+)$/', $post_name, $post_name_parts) ){
2846
+ $post_name_decoded = urldecode($post_name_parts[1]);
2847
+ $post_name_suffix = $post_name_parts[2];
2848
+ }else{
2849
+ $post_name_decoded = urldecode($post_name);
2850
+ $post_name_suffix = '';
2851
+ }
2852
+ $post_name_maxlength = 200 - strlen( $post_name_suffix . '-' . $post_slug_postfix);
2853
+ if ( $post_name_parts[0] === $post_name_decoded.$post_name_suffix ){
2854
+ $post_name = substr( $post_name_decoded, 0, $post_name_maxlength );
2855
+ }else{
2856
+ $post_name = utf8_uri_encode( $post_name_decoded, $post_name_maxlength );
2857
+ }
2858
+ $post_name = rtrim( $post_name, '-' ). $post_name_suffix;
2859
+ }
2860
+ return apply_filters('em_event_sanitize_recurrence_slug', $post_name, $post_slug_postfix, $this);
2861
+ }
2862
+
2863
  /**
2864
  * Removes all reoccurring events.
2865
  * @param $recurrence_id
2932
  break;
2933
  case 'monthly':
2934
  //loop months starting this month by intervals
2935
+ $current_date = $this->start()->copy();
2936
+ $current_date->modify($current_date->format('Y-m-01 00:00:00')); //Start date on first day of month, done this way to avoid 'first day of' issues in PHP < 5.6
2937
  while( $current_date->getTimestamp() <= $this->end()->getTimestamp() ){
2938
  $last_day_of_month = $current_date->format('t');
2939
  //Now find which day we're talking about
2964
  $matching_days[] = $matching_date;
2965
  }
2966
  }
2967
+ //add the monthly interval to the current date, but set to 1st of current month first so we don't jump months where $current_date is 31st and next month there's no 31st (so a month is skipped)
2968
+ $current_date->modify($current_date->format('Y-m-01')); //done this way to avoid 'first day of ' PHP < 5.6 issues
2969
+ $current_date->add('P'.$this->recurrence_interval.'M');
2970
  }
2971
  break;
2972
  case 'yearly':
2974
  $EM_DateTime = $this->start()->copy();
2975
  while( $EM_DateTime <= $this->end() ){
2976
  $matching_days[] = $EM_DateTime->getTimestamp();
2977
+ $EM_DateTime->add('P'.absint($this->recurrence_interval).'Y');
2978
  }
2979
  break;
2980
  }
3170
  */
3171
  function em_event_gallery_override( $attr = array() ){
3172
  global $post;
3173
+ if( !empty($post->post_type) && $post->post_type == EM_POST_TYPE_EVENT && empty($attr['id']) && empty($attr['ids']) ){
3174
  //no id specified, so check if it's recurring and override id with recurrence template post id
3175
  $EM_Event = em_get_event($post->ID, 'post_id');
3176
  if( $EM_Event->is_recurrence() ){
classes/em-events.php CHANGED
@@ -26,7 +26,7 @@ class EM_Events extends EM_Object {
26
  * containing the ids of the events you'd like to obtain
27
  *
28
  * @param array $args
29
- * @return EM_Event array()
30
  */
31
  public static function get( $args = array(), $count=false ) {
32
  global $wpdb;
26
  * containing the ids of the events you'd like to obtain
27
  *
28
  * @param array $args
29
+ * @return EM_Event[]
30
  */
31
  public static function get( $args = array(), $count=false ) {
32
  global $wpdb;
classes/em-location.php CHANGED
@@ -272,8 +272,8 @@ class EM_Location extends EM_Object {
272
  $this->location_postcode = ( !empty($_POST['location_postcode']) ) ? wp_kses(wp_unslash($_POST['location_postcode']), array()):'';
273
  $this->location_region = ( !empty($_POST['location_region']) ) ? wp_kses(wp_unslash($_POST['location_region']), array()):'';
274
  $this->location_country = ( !empty($_POST['location_country']) ) ? wp_kses(wp_unslash($_POST['location_country']), array()):'';
275
- $this->location_latitude = ( !empty($_POST['location_latitude']) && is_numeric($_POST['location_latitude']) ) ? $_POST['location_latitude']:'';
276
- $this->location_longitude = ( !empty($_POST['location_longitude']) && is_numeric($_POST['location_longitude']) ) ? $_POST['location_longitude']:'';
277
  //Sort out event attributes - note that custom post meta now also gets inserted here automatically (and is overwritten by these attributes)
278
  if(get_option('dbem_location_attributes_enabled')){
279
  global $allowedtags;
@@ -781,7 +781,7 @@ class EM_Location extends EM_Object {
781
 
782
  function output_single($target = 'html'){
783
  $format = get_option ( 'dbem_single_location_format' );
784
- return apply_filters('em_location_output_single', $this->output($format, $target), $this, $target);
785
  }
786
 
787
  function output($format, $target="html") {
@@ -885,15 +885,17 @@ class EM_Location extends EM_Object {
885
  break;
886
  case '#_MAP': //Deprecated (but will remain)
887
  case '#_LOCATIONMAP':
888
- ob_start();
889
- $args = array();
890
- if( !empty($placeholders[3][$key]) ){
891
- $dimensions = explode(',', $placeholders[3][$key]);
892
- if(!empty($dimensions[0])) $args['width'] = $dimensions[0];
893
- if(!empty($dimensions[1])) $args['height'] = $dimensions[1];
894
- }
895
- $template = em_locate_template('placeholders/locationmap.php', true, array('args'=>$args,'EM_Location'=>$this));
896
- $replace = ob_get_clean();
 
 
897
  break;
898
  case '#_LOCATIONLONGITUDE':
899
  $replace = $this->location_longitude;
@@ -975,11 +977,13 @@ class EM_Location extends EM_Object {
975
  $link = esc_url($this->get_permalink());
976
  $replace = ($result == '#_LOCATIONURL' || $result == '#_LOCATIONPAGEURL') ? $link : '<a href="'.$link.'">'.esc_html($this->location_name).'</a>';
977
  break;
978
- case '#_LOCATIONEDITURL':
979
- case '#_LOCATIONEDITLINK':
 
 
980
  if( $this->can_manage('edit_locations','edit_others_locations') ){
981
  $link = esc_url($this->get_edit_url());
982
- $replace = ($result == '#_LOCATIONEDITURL') ? $link : '<a href="'.$link.'" title="'.esc_attr($this->location_name).'">'.esc_html(sprintf(__('Edit Location','events-manager'))).'</a>';
983
  }
984
  break;
985
  case '#_LOCATIONICALURL':
@@ -1028,6 +1032,10 @@ class EM_Location extends EM_Object {
1028
  $args['orderby'] = get_option('dbem_location_event_list_orderby');
1029
  $args['order'] = get_option('dbem_location_event_list_order');
1030
  $args['page'] = (!empty($_REQUEST['pno']) && is_numeric($_REQUEST['pno']) )? $_REQUEST['pno'] : 1;
 
 
 
 
1031
  $replace = EM_Events::output($args);
1032
  break;
1033
  case '#_LOCATIONNEXTEVENT':
@@ -1091,9 +1099,9 @@ class EM_Location extends EM_Object {
1091
  'key' => get_option('dbem_google_maps_browser_key')
1092
  ), $this);
1093
  if( get_option('dbem_gmap_embed_type') == 'place' ){
1094
- $args['q'] = $this->location_name.', '. $this->get_full_address();
1095
  }elseif( get_option('dbem_gmap_embed_type') == 'address' ){
1096
- $args['q'] = $this->get_full_address();
1097
  }else{
1098
  $args['q'] = $latlng;
1099
  }
272
  $this->location_postcode = ( !empty($_POST['location_postcode']) ) ? wp_kses(wp_unslash($_POST['location_postcode']), array()):'';
273
  $this->location_region = ( !empty($_POST['location_region']) ) ? wp_kses(wp_unslash($_POST['location_region']), array()):'';
274
  $this->location_country = ( !empty($_POST['location_country']) ) ? wp_kses(wp_unslash($_POST['location_country']), array()):'';
275
+ $this->location_latitude = ( !empty($_POST['location_latitude']) && is_numeric($_POST['location_latitude']) ) ? round($_POST['location_latitude'], 6):'';
276
+ $this->location_longitude = ( !empty($_POST['location_longitude']) && is_numeric($_POST['location_longitude']) ) ? round($_POST['location_longitude'], 6):'';
277
  //Sort out event attributes - note that custom post meta now also gets inserted here automatically (and is overwritten by these attributes)
278
  if(get_option('dbem_location_attributes_enabled')){
279
  global $allowedtags;
781
 
782
  function output_single($target = 'html'){
783
  $format = get_option ( 'dbem_single_location_format' );
784
+ return apply_filters('em_location_output_single', $this->output($format, $target), $this, $target);
785
  }
786
 
787
  function output($format, $target="html") {
885
  break;
886
  case '#_MAP': //Deprecated (but will remain)
887
  case '#_LOCATIONMAP':
888
+ if( get_option('dbem_gmap_is_active') ){
889
+ ob_start();
890
+ $args = array();
891
+ if( !empty($placeholders[3][$key]) ){
892
+ $dimensions = explode(',', $placeholders[3][$key]);
893
+ if(!empty($dimensions[0])) $args['width'] = $dimensions[0];
894
+ if(!empty($dimensions[1])) $args['height'] = $dimensions[1];
895
+ }
896
+ em_locate_template('placeholders/locationmap.php', true, array('args'=>$args,'EM_Location'=>$this));
897
+ $replace = ob_get_clean();
898
+ }
899
  break;
900
  case '#_LOCATIONLONGITUDE':
901
  $replace = $this->location_longitude;
977
  $link = esc_url($this->get_permalink());
978
  $replace = ($result == '#_LOCATIONURL' || $result == '#_LOCATIONPAGEURL') ? $link : '<a href="'.$link.'">'.esc_html($this->location_name).'</a>';
979
  break;
980
+ case '#_LOCATIONEDITURL': // Deprecated - always worked but documented as #_EDITLOCATIONURL
981
+ case '#_LOCATIONEDITLINK': // Deprecated - always worked but documented incorrectly as #_EDITLOCATIONLINK
982
+ case '#_EDITLOCATIONURL':
983
+ case '#_EDITLOCATIONLINK':
984
  if( $this->can_manage('edit_locations','edit_others_locations') ){
985
  $link = esc_url($this->get_edit_url());
986
+ $replace = ($result == '#_LOCATIONEDITURL' || $result == '#_EDITLOCATIONURL' ) ? $link : '<a href="'.$link.'" title="'.esc_attr($this->location_name).'">'.esc_html(sprintf(__('Edit Location','events-manager'))).'</a>';
987
  }
988
  break;
989
  case '#_LOCATIONICALURL':
1032
  $args['orderby'] = get_option('dbem_location_event_list_orderby');
1033
  $args['order'] = get_option('dbem_location_event_list_order');
1034
  $args['page'] = (!empty($_REQUEST['pno']) && is_numeric($_REQUEST['pno']) )? $_REQUEST['pno'] : 1;
1035
+ if( $target == 'email' ){
1036
+ $args['pagination'] = 0;
1037
+ $args['page'] = 1;
1038
+ }
1039
  $replace = EM_Events::output($args);
1040
  break;
1041
  case '#_LOCATIONNEXTEVENT':
1099
  'key' => get_option('dbem_google_maps_browser_key')
1100
  ), $this);
1101
  if( get_option('dbem_gmap_embed_type') == 'place' ){
1102
+ $args['q'] = urlencode($this->location_name.', '. $this->get_full_address());
1103
  }elseif( get_option('dbem_gmap_embed_type') == 'address' ){
1104
+ $args['q'] = urlencode($this->get_full_address());
1105
  }else{
1106
  $args['q'] = $latlng;
1107
  }
classes/em-mailer.php CHANGED
@@ -15,10 +15,10 @@ class EM_Mailer {
15
  * @param $subject
16
  * @param $body
17
  * @param $receiver
 
18
  */
19
  public function send($subject="no title",$body="No message specified", $receiver='', $attachments = array() ) {
20
  //TODO add an EM_Error global object, for this sort of error reporting. (@marcus like StatusNotice)
21
- global $smtpsettings, $phpmailer, $cformsSettings;
22
  $subject = html_entity_decode(wp_kses_data($subject)); //decode entities, but run kses first just in case users use placeholders containing html
23
  if( is_array($receiver) ){
24
  $receiver_emails = array();
@@ -38,7 +38,13 @@ class EM_Mailer {
38
  if( get_option('dbem_smtp_html') ){ //create filter to change content type to html in wp_mail
39
  add_filter('wp_mail_content_type','EM_Mailer::return_texthtml');
40
  }
41
- $send = wp_mail($receiver, $subject, $body, $headers);
 
 
 
 
 
 
42
  if(!$send){
43
  global $phpmailer;
44
  $this->errors[] = $phpmailer->ErrorInfo;
@@ -58,7 +64,7 @@ class EM_Mailer {
58
  $mail->SetLanguage('en', dirname(__FILE__).'/');
59
  $mail->PluginDir = dirname(__FILE__).'/phpmailer/';
60
  $mail->Host = get_option('dbem_smtp_host');
61
- $mail->port = get_option('dbem_rsvp_mail_port');
62
  $mail->Username = get_option('dbem_smtp_username');
63
  $mail->Password = get_option('dbem_smtp_password');
64
  $mail->From = get_option('dbem_mail_sender_address');
@@ -97,6 +103,7 @@ class EM_Mailer {
97
  if(get_option('dbem_rsvp_mail_SMTPAuth') == '1'){
98
  $mail->SMTPAuth = TRUE;
99
  }
 
100
  $send = $mail->Send();
101
  if(!$send){
102
  $this->errors[] = $mail->ErrorInfo;
15
  * @param $subject
16
  * @param $body
17
  * @param $receiver
18
+ * @param $attachments
19
  */
20
  public function send($subject="no title",$body="No message specified", $receiver='', $attachments = array() ) {
21
  //TODO add an EM_Error global object, for this sort of error reporting. (@marcus like StatusNotice)
 
22
  $subject = html_entity_decode(wp_kses_data($subject)); //decode entities, but run kses first just in case users use placeholders containing html
23
  if( is_array($receiver) ){
24
  $receiver_emails = array();
38
  if( get_option('dbem_smtp_html') ){ //create filter to change content type to html in wp_mail
39
  add_filter('wp_mail_content_type','EM_Mailer::return_texthtml');
40
  }
41
+ //prep attachments for WP Mail, which only accept a path
42
+ $wp_mail_attachments = array();
43
+ foreach( $attachments as $attachment ){
44
+ $wp_mail_attachments[] = $attachment['path'];
45
+ }
46
+ //send and handle errors
47
+ $send = wp_mail($receiver, $subject, $body, $headers, $wp_mail_attachments);
48
  if(!$send){
49
  global $phpmailer;
50
  $this->errors[] = $phpmailer->ErrorInfo;
64
  $mail->SetLanguage('en', dirname(__FILE__).'/');
65
  $mail->PluginDir = dirname(__FILE__).'/phpmailer/';
66
  $mail->Host = get_option('dbem_smtp_host');
67
+ $mail->Port = get_option('dbem_rsvp_mail_port');
68
  $mail->Username = get_option('dbem_smtp_username');
69
  $mail->Password = get_option('dbem_smtp_password');
70
  $mail->From = get_option('dbem_mail_sender_address');
103
  if(get_option('dbem_rsvp_mail_SMTPAuth') == '1'){
104
  $mail->SMTPAuth = TRUE;
105
  }
106
+ do_action('em_mailer_before_send', $mail, $subject, $body, $receiver, $attachments); //$mail can still be modified
107
  $send = $mail->Send();
108
  if(!$send){
109
  $this->errors[] = $mail->ErrorInfo;
classes/em-object.php CHANGED
@@ -1039,7 +1039,6 @@ class EM_Object {
1039
  * @param integer $count The number of total items to paginate through
1040
  * @param string $search_action The name of the action query var used to trigger a search - used in AJAX requests and normal searches
1041
  * @param array $default_args The default arguments and values this object accepts, used to compare against $args to create a querystring
1042
- * @param array $accepted_args Variables that can be passed on via a querystring and should be added to pagination links, objects should make use of this since the default may be EM_Object::get_default_search() due to late static binding issues
1043
  * @return string
1044
  * @uses em_paginate()
1045
  */
@@ -1269,7 +1268,11 @@ class EM_Object {
1269
  $return = array();
1270
  foreach($this->fields as $fieldName => $fieldArray){
1271
  if($inverted_array){
1272
- $return[$fieldArray['name']] = $fieldName;
 
 
 
 
1273
  }else{
1274
  $return[$fieldName] = $fieldArray['name'];
1275
  }
1039
  * @param integer $count The number of total items to paginate through
1040
  * @param string $search_action The name of the action query var used to trigger a search - used in AJAX requests and normal searches
1041
  * @param array $default_args The default arguments and values this object accepts, used to compare against $args to create a querystring
 
1042
  * @return string
1043
  * @uses em_paginate()
1044
  */
1268
  $return = array();
1269
  foreach($this->fields as $fieldName => $fieldArray){
1270
  if($inverted_array){
1271
+ if( !empty($fieldArray['name']) ){
1272
+ $return[$fieldArray['name']] = $fieldName;
1273
+ }else{
1274
+ $return[$fieldName] = $fieldName;
1275
+ }
1276
  }else{
1277
  $return[$fieldName] = $fieldArray['name'];
1278
  }
classes/em-options.php CHANGED
@@ -13,11 +13,12 @@ class EM_Options {
13
  * Get a specific setting form the EM options array. If no value is set, an empty array is provided by default.
14
  * @param string $option_name
15
  * @param mixed $default the default value to return
 
16
  * @param boolean $site if set to true it'll retrieve a site option in MultiSite instead
17
  * @return mixed
18
  */
19
- public static function get( $option_name, $default = array(), $site = false ){
20
- $data = $site ? get_site_option('dbem_data') : get_option('dbem_data');
21
  if( !empty($data[$option_name]) ){
22
  return $data[$option_name];
23
  }else{
@@ -29,13 +30,15 @@ class EM_Options {
29
  * Set a value in the EM options array. Returns result of storage, which may be false if no changes are made.
30
  * @param string $option_name
31
  * @param mixed $option_value
 
32
  * @param boolean $site if set to true it'll retrieve a site option in MultiSite instead
33
  * @return boolean
34
  */
35
- public static function set( $option_name, $option_value, $site = false ){
36
- $data = $site ? get_site_option('dbem_data') : get_option('dbem_data');
 
37
  $data[$option_name] = $option_value;
38
- return $site ? update_site_option('dbem_data', $data) : update_option('dbem_data', $data);
39
  }
40
 
41
  /**
@@ -44,17 +47,18 @@ class EM_Options {
44
  * @param string $option_name
45
  * @param string $option_key
46
  * @param mixed $option_value
 
47
  * @param boolean $site
48
  * @return boolean
49
  */
50
- public static function add( $option_name, $option_key, $option_value, $site = false ){
51
- $data = $site ? get_site_option('dbem_data') : get_option('dbem_data');
52
  if( empty($data[$option_name]) ){
53
  $data[$option_name] = array( $option_key => $option_value );
54
  }else{
55
  $data[$option_name][$option_key] = $option_value;
56
  }
57
- return $site ? update_site_option('dbem_data', $data) : update_option('dbem_data', $data);
58
  }
59
 
60
  /**
@@ -62,44 +66,62 @@ class EM_Options {
62
  *
63
  * @param string $option_name
64
  * @param string $option_key
65
- * @param string $site
 
66
  * @return boolean
67
  */
68
- public static function remove( $option_name, $option_key, $site = false ){
69
- $data = $site ? get_site_option('dbem_data') : get_option('dbem_data');
70
  if( !empty($data[$option_name][$option_key]) ){
71
  unset($data[$option_name][$option_key]);
72
  if( empty($data[$option_name]) ) unset($data[$option_name]);
73
- return $site ? update_site_option('dbem_data', $data) : update_option('dbem_data', $data);
74
  }
75
  return false;
76
  }
77
 
78
  /**
79
  * @see EM_Options::get()
 
 
 
 
80
  */
81
- public static function site_get( $option_name, $default = array() ){
82
- return self::get( $option_name, $default, true );
83
  }
84
 
85
  /**
86
  * @see EM_Options::set()
 
 
 
 
87
  */
88
- public static function site_set( $option_name, $option_value ){
89
- return self::set( $option_name, $option_value, true );
90
  }
91
 
92
  /**
93
  * @see EM_Options::add()
 
 
 
 
 
94
  */
95
- public static function site_add( $option_name, $option_key, $option_value ){
96
- return self::add( $option_name, $option_key, $option_value, true );
97
  }
98
 
99
  /**
100
  * @see EM_Options::remove()
 
 
 
 
101
  */
102
- public static function site_remove( $option_name, $option_key ){
103
- return self::remove( $option_name, $option_key, true );
104
  }
105
  }
13
  * Get a specific setting form the EM options array. If no value is set, an empty array is provided by default.
14
  * @param string $option_name
15
  * @param mixed $default the default value to return
16
+ * @param string $dataset
17
  * @param boolean $site if set to true it'll retrieve a site option in MultiSite instead
18
  * @return mixed
19
  */
20
+ public static function get( $option_name, $default = array(), $dataset = 'dbem_data', $site = false ){
21
+ $data = $site ? get_site_option($dataset) : get_option($dataset);
22
  if( !empty($data[$option_name]) ){
23
  return $data[$option_name];
24
  }else{
30
  * Set a value in the EM options array. Returns result of storage, which may be false if no changes are made.
31
  * @param string $option_name
32
  * @param mixed $option_value
33
+ * @param string $dataset
34
  * @param boolean $site if set to true it'll retrieve a site option in MultiSite instead
35
  * @return boolean
36
  */
37
+ public static function set( $option_name, $option_value, $dataset = 'dbem_data', $site = false ){
38
+ $data = $site ? get_site_option($dataset) : get_option($dataset);
39
+ if( empty($data) ) $data = array();
40
  $data[$option_name] = $option_value;
41
+ return $site ? update_site_option($dataset, $data) : update_option($dataset, $data);
42
  }
43
 
44
  /**
47
  * @param string $option_name
48
  * @param string $option_key
49
  * @param mixed $option_value
50
+ * @param string $dataset
51
  * @param boolean $site
52
  * @return boolean
53
  */
54
+ public static function add( $option_name, $option_key, $option_value, $dataset = 'dbem_data', $site = false ){
55
+ $data = $site ? get_site_option($dataset) : get_option($dataset);
56
  if( empty($data[$option_name]) ){
57
  $data[$option_name] = array( $option_key => $option_value );
58
  }else{
59
  $data[$option_name][$option_key] = $option_value;
60
  }
61
+ return $site ? update_site_option($dataset, $data) : update_option($dataset, $data);
62
  }
63
 
64
  /**
66
  *
67
  * @param string $option_name
68
  * @param string $option_key
69
+ * @param string $dataset
70
+ * @param boolean $site
71
  * @return boolean
72
  */
73
+ public static function remove( $option_name, $option_key, $dataset = 'dbem_data', $site = false ){
74
+ $data = $site ? get_site_option($dataset) : get_option($dataset);
75
  if( !empty($data[$option_name][$option_key]) ){
76
  unset($data[$option_name][$option_key]);
77
  if( empty($data[$option_name]) ) unset($data[$option_name]);
78
+ return $site ? update_site_option($dataset, $data) : update_option($dataset, $data);
79
  }
80
  return false;
81
  }
82
 
83
  /**
84
  * @see EM_Options::get()
85
+ * @param string $option_name
86
+ * @param mixed $default
87
+ * @param string $dataset
88
+ * @return boolean
89
  */
90
+ public static function site_get( $option_name, $default = array(), $dataset = 'dbem_data' ){
91
+ return self::get( $option_name, $default, $dataset, true );
92
  }
93
 
94
  /**
95
  * @see EM_Options::set()
96
+ * @param string $option_name
97
+ * @param mixed $option_value
98
+ * @param string $dataset
99
+ * @return boolean
100
  */
101
+ public static function site_set( $option_name, $option_value, $dataset = 'dbem_data' ){
102
+ return self::set( $option_name, $option_value, $dataset, true );
103
  }
104
 
105
  /**
106
  * @see EM_Options::add()
107
+ * @param string $option_name
108
+ * @param string $option_key
109
+ * @param mixed $option_value
110
+ * @param string $dataset
111
+ * @return boolean
112
  */
113
+ public static function site_add( $option_name, $option_key, $option_value, $dataset = 'dbem_data' ){
114
+ return self::add( $option_name, $option_key, $option_value, $dataset, true );
115
  }
116
 
117
  /**
118
  * @see EM_Options::remove()
119
+ * @param string $option_name
120
+ * @param string $option_key
121
+ * @param string $dataset
122
+ * @return boolean
123
  */
124
+ public static function site_remove( $option_name, $option_key, $dataset = 'dbem_data' ){
125
+ return self::remove( $option_name, $option_key, $dataset, true );
126
  }
127
  }
classes/em-permalinks.php CHANGED
@@ -10,7 +10,7 @@ if( !class_exists('EM_Permalinks') ){
10
  'booking_id',
11
  'category_id', 'category_slug',
12
  'ticket_id',
13
- 'calendar_day',
14
  'rss', 'ical','event_categories','event_locations'
15
  );
16
 
@@ -136,6 +136,7 @@ if( !class_exists('EM_Permalinks') ){
136
  }else{
137
  $events_slug = EM_POST_TYPE_EVENT_SLUG;
138
  $em_rules[$events_slug.'/(\d{4}-\d{2}-\d{2})$'] = 'index.php?post_type='.EM_POST_TYPE_EVENT.'&calendar_day=$matches[1]'; //event calendar date search
 
139
  if( get_option('dbem_rsvp_enabled') ){
140
  if( !get_option( 'dbem_my_bookings_page') || !is_object(get_post(get_option( 'dbem_my_bookings_page'))) ){ //only added if bookings page isn't assigned
141
  $em_rules[$events_slug.'/my\-bookings$'] = 'index.php?post_type='.EM_POST_TYPE_EVENT.'&bookings_page=1'; //page for users to manage bookings
10
  'booking_id',
11
  'category_id', 'category_slug',
12
  'ticket_id',
13
+ 'calendar_day', 'pno',
14
  'rss', 'ical','event_categories','event_locations'
15
  );
16
 
136
  }else{
137
  $events_slug = EM_POST_TYPE_EVENT_SLUG;
138
  $em_rules[$events_slug.'/(\d{4}-\d{2}-\d{2})$'] = 'index.php?post_type='.EM_POST_TYPE_EVENT.'&calendar_day=$matches[1]'; //event calendar date search
139
+ $em_rules[$events_slug.'/(\d{4}-\d{2}-\d{2})/page/?([0-9]{1,})/?$'] = 'index.php?post_type='.EM_POST_TYPE_EVENT.'&calendar_day=$matches[1]&paged=$matches[2]'; //event calendar date search paged
140
  if( get_option('dbem_rsvp_enabled') ){
141
  if( !get_option( 'dbem_my_bookings_page') || !is_object(get_post(get_option( 'dbem_my_bookings_page'))) ){ //only added if bookings page isn't assigned
142
  $em_rules[$events_slug.'/my\-bookings$'] = 'index.php?post_type='.EM_POST_TYPE_EVENT.'&bookings_page=1'; //page for users to manage bookings
classes/em-taxonomy-admin.php CHANGED
@@ -129,30 +129,35 @@ class EM_Taxonomy_Admin {
129
  public static function save( $term_id, $tt_id ){
130
  global $wpdb;
131
  if (!$term_id) return;
132
- if( !empty($_POST['term_color']) && preg_match('/^#[a-zA-Z0-9]{6}$/', $_POST['term_color']) ){
133
  //get results and save/update
134
- $prev_settings = $wpdb->get_results('SELECT meta_value FROM '.EM_META_TABLE." WHERE object_id='{$term_id}' AND meta_key='". self::$option_name ."-bgcolor'");
135
- if( count($prev_settings) > 0 ){
136
- $wpdb->update(EM_META_TABLE, array('object_id' => $term_id, 'meta_value' => $_POST['term_color']), array('object_id' => $term_id, 'meta_key' => self::$option_name .'-bgcolor'));
137
- }else{
138
- $wpdb->insert(EM_META_TABLE, array('object_id' => $term_id, 'meta_key' => self::$option_name .'-bgcolor', 'meta_value' => $_POST['term_color']));
 
 
 
139
  }
140
  }
141
  if( !empty($_POST['term_image']) ){
142
  //get results and save/update
 
143
  $prev_settings = $wpdb->get_results('SELECT meta_value FROM '.EM_META_TABLE." WHERE object_id='{$term_id}' AND meta_key='". self::$option_name ."-image'");
144
  if( count($prev_settings) > 0 ){
145
- $wpdb->update(EM_META_TABLE, array('object_id' => $term_id, 'meta_value' => $_POST['term_image']), array('object_id' => $term_id, 'meta_key' => self::$option_name .'-image'));
146
  }else{
147
- $wpdb->insert(EM_META_TABLE, array('object_id' => $term_id, 'meta_key' => self::$option_name .'-image', 'meta_value' => $_POST['term_image']));
148
  }
149
  if( !empty($_POST['term_image_id']) && is_numeric($_POST['term_image_id']) ){
150
  //get results and save/update
 
151
  $prev_settings = $wpdb->get_results('SELECT meta_value FROM '.EM_META_TABLE." WHERE object_id='{$term_id}' AND meta_key='". self::$option_name ."-image-id'");
152
  if( count($prev_settings) > 0 ){
153
- $wpdb->update(EM_META_TABLE, array('object_id' => $term_id, 'meta_value' => $_POST['term_image_id']), array('object_id' => $term_id, 'meta_key'=> self::$option_name .'-image-id'));
154
  }else{
155
- $wpdb->insert(EM_META_TABLE, array('object_id' => $term_id, 'meta_key'=> self::$option_name .'-image-id', 'meta_value' => $_POST['term_image_id']));
156
  }
157
  }
158
  }else{
129
  public static function save( $term_id, $tt_id ){
130
  global $wpdb;
131
  if (!$term_id) return;
132
+ if( !empty($_POST['term_color']) ){
133
  //get results and save/update
134
+ $color = sanitize_hex_color($_POST['term_color']);
135
+ if( $color ){
136
+ $prev_settings = $wpdb->get_results('SELECT meta_value FROM '.EM_META_TABLE." WHERE object_id='{$term_id}' AND meta_key='". self::$option_name ."-bgcolor'");
137
+ if( count($prev_settings) > 0 ){
138
+ $wpdb->update(EM_META_TABLE, array('object_id' => $term_id, 'meta_value' => $color), array('object_id' => $term_id, 'meta_key' => self::$option_name .'-bgcolor'));
139
+ }else{
140
+ $wpdb->insert(EM_META_TABLE, array('object_id' => $term_id, 'meta_key' => self::$option_name .'-bgcolor', 'meta_value' => $color));
141
+ }
142
  }
143
  }
144
  if( !empty($_POST['term_image']) ){
145
  //get results and save/update
146
+ $term_image = esc_url_raw($_POST['term_image']);
147
  $prev_settings = $wpdb->get_results('SELECT meta_value FROM '.EM_META_TABLE." WHERE object_id='{$term_id}' AND meta_key='". self::$option_name ."-image'");
148
  if( count($prev_settings) > 0 ){
149
+ $wpdb->update(EM_META_TABLE, array('object_id' => $term_id, 'meta_value' => $term_image), array('object_id' => $term_id, 'meta_key' => self::$option_name .'-image'));
150
  }else{
151
+ $wpdb->insert(EM_META_TABLE, array('object_id' => $term_id, 'meta_key' => self::$option_name .'-image', 'meta_value' => $term_image));
152
  }
153
  if( !empty($_POST['term_image_id']) && is_numeric($_POST['term_image_id']) ){
154
  //get results and save/update
155
+ $term_image_id = absint($_POST['term_image_id']);
156
  $prev_settings = $wpdb->get_results('SELECT meta_value FROM '.EM_META_TABLE." WHERE object_id='{$term_id}' AND meta_key='". self::$option_name ."-image-id'");
157
  if( count($prev_settings) > 0 ){
158
+ $wpdb->update(EM_META_TABLE, array('object_id' => $term_id, 'meta_value' => $term_image_id), array('object_id' => $term_id, 'meta_key'=> self::$option_name .'-image-id'));
159
  }else{
160
+ $wpdb->insert(EM_META_TABLE, array('object_id' => $term_id, 'meta_key'=> self::$option_name .'-image-id', 'meta_value' => $term_image_id));
161
  }
162
  }
163
  }else{
classes/em-taxonomy-term.php CHANGED
@@ -272,6 +272,10 @@ class EM_Taxonomy_Term extends EM_Object {
272
  $args['orderby'] = get_option('dbem_'. $this->option_name .'_event_list_orderby');
273
  $args['order'] = get_option('dbem_'. $this->option_name .'_event_list_order');
274
  $args['page'] = (!empty($_REQUEST['pno']) && is_numeric($_REQUEST['pno']) )? $_REQUEST['pno'] : 1;
 
 
 
 
275
  $replace = EM_Events::output($args);
276
  break;
277
  case '#_'. $ph .'NEXTEVENT':
272
  $args['orderby'] = get_option('dbem_'. $this->option_name .'_event_list_orderby');
273
  $args['order'] = get_option('dbem_'. $this->option_name .'_event_list_order');
274
  $args['page'] = (!empty($_REQUEST['pno']) && is_numeric($_REQUEST['pno']) )? $_REQUEST['pno'] : 1;
275
+ if( $target == 'email' ){
276
+ $args['pagination'] = 0;
277
+ $args['page'] = 1;
278
+ }
279
  $replace = EM_Events::output($args);
280
  break;
281
  case '#_'. $ph .'NEXTEVENT':
classes/em-ticket.php CHANGED
@@ -192,7 +192,7 @@ class EM_Ticket extends EM_Object{
192
  $result = $wpdb->query($sql);
193
  $this->feedback_message = __('Changes saved','events-manager');
194
  }else{
195
- //TODO better error handling
196
  $result = $wpdb->insert($table, $data, $this->get_types($data));
197
  $this->ticket_id = $wpdb->insert_id;
198
  $this->feedback_message = __('Ticket created','events-manager');
@@ -230,8 +230,14 @@ class EM_Ticket extends EM_Object{
230
  $this->ticket_min = ( !empty($post['ticket_min']) && is_numeric($post['ticket_min']) ) ? $post['ticket_min']:'';
231
  $this->ticket_max = ( !empty($post['ticket_max']) && is_numeric($post['ticket_max']) ) ? $post['ticket_max']:'';
232
  $this->ticket_spaces = ( !empty($post['ticket_spaces']) && is_numeric($post['ticket_spaces']) ) ? $post['ticket_spaces']:10;
 
 
 
 
 
 
 
233
  //Sort out date/time limits
234
- $this->ticket_price = ( !empty($post['ticket_price']) ) ? wp_kses_data($post['ticket_price']):'';
235
  $this->ticket_start = ( !empty($post['ticket_start']) ) ? wp_kses_data($post['ticket_start']):'';
236
  $this->ticket_end = ( !empty($post['ticket_end']) ) ? wp_kses_data($post['ticket_end']):'';
237
  $start_time = !empty($post['ticket_start_time']) ? $post['ticket_start_time'] : $this->get_event()->start()->format('H:i');
@@ -256,29 +262,19 @@ class EM_Ticket extends EM_Object{
256
  if( empty($this->ticket_meta['recurrences']) ){
257
  $this->ticket_meta['recurrences'] = array('start_days'=>false, 'start_time'=>false, 'end_days'=>false, 'end_time'=>false);
258
  }
259
- //start of ticket cut-off
260
- if( array_key_exists('ticket_start_recurring_days', $post) && is_numeric($post['ticket_start_recurring_days']) ){
261
- if( !empty($post['ticket_start_recurring_when']) && $post['ticket_start_recurring_when'] == 'after' ){
262
- $this->ticket_meta['recurrences']['start_days'] = absint($post['ticket_start_recurring_days']);
263
- }else{ //by default the start date is the point of reference
264
- $this->ticket_meta['recurrences']['start_days'] = absint($post['ticket_start_recurring_days']) * -1;
265
- }
266
- $this->ticket_meta['recurrences']['start_time'] = ( !empty($post['ticket_start_time']) ) ? $this->sanitize_time($post['ticket_start_time']) : $this->get_event()->start()->format('H:i');
267
- }else{
268
- unset($this->ticket_meta['recurrences']['start_days']);
269
- unset($this->ticket_meta['recurrences']['start_time']);
270
- }
271
- //end of ticket cut-off
272
- if( array_key_exists('ticket_end_recurring_days', $post) && is_numeric($post['ticket_end_recurring_days']) ){
273
- if( !empty($post['ticket_end_recurring_when']) && $post['ticket_end_recurring_when'] == 'after' ){
274
- $this->ticket_meta['recurrences']['end_days'] = absint($post['ticket_end_recurring_days']);
275
- }else{ //by default the end date is the point of reference
276
- $this->ticket_meta['recurrences']['end_days'] = absint($post['ticket_end_recurring_days']) * -1;
277
  }
278
- $this->ticket_meta['recurrences']['end_time'] = ( !empty($post['ticket_end_time']) ) ? $this->sanitize_time($post['ticket_end_time']) : $this->get_event()->start()->format('H:i');
279
- }else{
280
- unset($this->ticket_meta['recurrences']['end_days']);
281
- unset($this->ticket_meta['recurrences']['end_time']);
282
  }
283
  $this->ticket_start = $this->ticket_end = null;
284
  }
@@ -300,7 +296,11 @@ class EM_Ticket extends EM_Object{
300
  }
301
  }
302
  if( !empty($this->ticket_price) && !is_numeric($this->ticket_price) ){
303
- $this->add_error(__('Please enter a valid ticket price e.g. 10.50 (no currency signs)','events-manager'));
 
 
 
 
304
  }
305
  if ( count($missing_fields) > 0){
306
  // TODO Create friendly equivelant names for missing fields notice in validation
@@ -344,6 +344,8 @@ class EM_Ticket extends EM_Object{
344
 
345
  /**
346
  * Returns whether or not this ticket should be displayed based on availability and other ticket properties and general settings
 
 
347
  * @return boolean
348
  */
349
  function is_displayable( $ignore_member_restrictions = false, $ignore_guest_restrictions = false ){
@@ -382,6 +384,7 @@ class EM_Ticket extends EM_Object{
382
  /**
383
  * Calculates how much the individual ticket costs with applicable event/site taxes included.
384
  * @param boolean $format
 
385
  */
386
  function get_price_with_tax( $format = false ){
387
  $price = $this->get_price_without_tax() * (1 + $this->get_event()->get_tax_rate( true ));
@@ -392,6 +395,7 @@ class EM_Ticket extends EM_Object{
392
  /**
393
  * Calculates how much the individual ticket costs with taxes excluded.
394
  * @param boolean $format
 
395
  */
396
  function get_price_without_tax( $format = false ){
397
  if( $format ) return $this->format_price($this->ticket_price);
@@ -400,11 +404,18 @@ class EM_Ticket extends EM_Object{
400
 
401
  /**
402
  * Shows the ticket price which can contain long decimals but will show up to 2 decimal places and remove trailing 0s
403
- * For example: 10.010230 => 10.01023 and 10 => 10.00
 
 
404
  */
405
- function get_price_precise(){
406
  $price = $this->ticket_price * 1;
407
  if( floor($price) == (float) $price ) $price = number_format($price, 2, '.', '');
 
 
 
 
 
408
  return $price;
409
  }
410
 
192
  $result = $wpdb->query($sql);
193
  $this->feedback_message = __('Changes saved','events-manager');
194
  }else{
195
+ if( isset($data['ticket_id']) && empty($data['ticket_id']) ) unset($data['ticket_id']);
196
  $result = $wpdb->insert($table, $data, $this->get_types($data));
197
  $this->ticket_id = $wpdb->insert_id;
198
  $this->feedback_message = __('Ticket created','events-manager');
230
  $this->ticket_min = ( !empty($post['ticket_min']) && is_numeric($post['ticket_min']) ) ? $post['ticket_min']:'';
231
  $this->ticket_max = ( !empty($post['ticket_max']) && is_numeric($post['ticket_max']) ) ? $post['ticket_max']:'';
232
  $this->ticket_spaces = ( !empty($post['ticket_spaces']) && is_numeric($post['ticket_spaces']) ) ? $post['ticket_spaces']:10;
233
+ //sort out price and un-format in the event of special decimal/thousand seperators
234
+ $price = ( !empty($post['ticket_price']) ) ? wp_kses_data($post['ticket_price']):'';
235
+ if( preg_match('/^[0-9]*\.[0-9]+$/', $price) || preg_match('/^[0-9]+$/', $price) ){
236
+ $this->ticket_price = $price;
237
+ }else{
238
+ $this->ticket_price = str_replace( array( get_option('dbem_bookings_currency_thousands_sep'), get_option('dbem_bookings_currency_decimal_point') ), array('','.'), $price );
239
+ }
240
  //Sort out date/time limits
 
241
  $this->ticket_start = ( !empty($post['ticket_start']) ) ? wp_kses_data($post['ticket_start']):'';
242
  $this->ticket_end = ( !empty($post['ticket_end']) ) ? wp_kses_data($post['ticket_end']):'';
243
  $start_time = !empty($post['ticket_start_time']) ? $post['ticket_start_time'] : $this->get_event()->start()->format('H:i');
262
  if( empty($this->ticket_meta['recurrences']) ){
263
  $this->ticket_meta['recurrences'] = array('start_days'=>false, 'start_time'=>false, 'end_days'=>false, 'end_time'=>false);
264
  }
265
+ foreach( array('start', 'end') as $start_or_end ){
266
+ //start/end of ticket cut-off
267
+ if( array_key_exists('ticket_'.$start_or_end.'_recurring_days', $post) && is_numeric($post['ticket_'.$start_or_end.'_recurring_days']) ){
268
+ if( !empty($post['ticket_'.$start_or_end.'_recurring_when']) && $post['ticket_'.$start_or_end.'_recurring_when'] == 'after' ){
269
+ $this->ticket_meta['recurrences'][$start_or_end.'_days'] = absint($post['ticket_'.$start_or_end.'_recurring_days']);
270
+ }else{ //by default the start/end date is the point of reference
271
+ $this->ticket_meta['recurrences'][$start_or_end.'_days'] = absint($post['ticket_'.$start_or_end.'_recurring_days']) * -1;
272
+ }
273
+ $this->ticket_meta['recurrences'][$start_or_end.'_time'] = ( !empty($post['ticket_'.$start_or_end.'_time']) ) ? $this->sanitize_time($post['ticket_'.$start_or_end.'_time']) : $this->get_event()->$start_or_end()->format('H:i');
274
+ }else{
275
+ unset($this->ticket_meta['recurrences'][$start_or_end.'_days']);
276
+ unset($this->ticket_meta['recurrences'][$start_or_end.'_time']);
 
 
 
 
 
 
277
  }
 
 
 
 
278
  }
279
  $this->ticket_start = $this->ticket_end = null;
280
  }
296
  }
297
  }
298
  if( !empty($this->ticket_price) && !is_numeric($this->ticket_price) ){
299
+ $this->add_error(esc_html__('Please enter a valid ticket price e.g. 10.50 (no currency signs)','events-manager'));
300
+ }
301
+ if( !empty($this->ticket_min) && !empty($this->ticket_max) && $this->ticket_max < $this->ticket_min ) {
302
+ $error = esc_html__('Ticket %s has a higher minimum spaces requirement than the maximum spaces allowed.','events-manager');
303
+ $this->add_error( sprintf($error, '<em>'. esc_html($this->ticket_name) .'</em>'));
304
  }
305
  if ( count($missing_fields) > 0){
306
  // TODO Create friendly equivelant names for missing fields notice in validation
344
 
345
  /**
346
  * Returns whether or not this ticket should be displayed based on availability and other ticket properties and general settings
347
+ * @param bool $ignore_member_restrictions
348
+ * @param bool $ignore_guest_restrictions
349
  * @return boolean
350
  */
351
  function is_displayable( $ignore_member_restrictions = false, $ignore_guest_restrictions = false ){
384
  /**
385
  * Calculates how much the individual ticket costs with applicable event/site taxes included.
386
  * @param boolean $format
387
+ * @return float|int|string
388
  */
389
  function get_price_with_tax( $format = false ){
390
  $price = $this->get_price_without_tax() * (1 + $this->get_event()->get_tax_rate( true ));
395
  /**
396
  * Calculates how much the individual ticket costs with taxes excluded.
397
  * @param boolean $format
398
+ * @return float|int|string
399
  */
400
  function get_price_without_tax( $format = false ){
401
  if( $format ) return $this->format_price($this->ticket_price);
404
 
405
  /**
406
  * Shows the ticket price which can contain long decimals but will show up to 2 decimal places and remove trailing 0s
407
+ * For example: 10.010230 => 10.01023 and 10 => 10.00
408
+ * @param bool $format If true, the number is provided with localized digit separator and padded with 0, 2 or 4 digits
409
+ * @return float|int|string
410
  */
411
+ function get_price_precise( $format = false ){
412
  $price = $this->ticket_price * 1;
413
  if( floor($price) == (float) $price ) $price = number_format($price, 2, '.', '');
414
+ if( $format ){
415
+ $digits = strlen(substr(strrchr($price, "."), 1));
416
+ $precision = ( $digits > 2 ) ? 4 : 2;
417
+ $price = number_format( $price, $precision, get_option('dbem_bookings_currency_decimal_point','.'), '');
418
+ }
419
  return $price;
420
  }
421
 
classes/em-tickets-bookings.php CHANGED
@@ -4,7 +4,7 @@
4
  * @author marcus
5
  *
6
  */
7
- class EM_Tickets_Bookings extends EM_Object implements Iterator{
8
 
9
  /**
10
  * Array of EM_Ticket_Booking objects for a specific event
@@ -285,11 +285,15 @@ class EM_Tickets_Bookings extends EM_Object implements Iterator{
285
  public function next(){
286
  $var = next($this->tickets_bookings);
287
  return $var;
288
- }
289
  public function valid(){
290
  $key = key($this->tickets_bookings);
291
  $var = ($key !== NULL && $key !== FALSE);
292
  return $var;
293
- }
 
 
 
 
294
  }
295
  ?>
4
  * @author marcus
5
  *
6
  */
7
+ class EM_Tickets_Bookings extends EM_Object implements Iterator, Countable {
8
 
9
  /**
10
  * Array of EM_Ticket_Booking objects for a specific event
285
  public function next(){
286
  $var = next($this->tickets_bookings);
287
  return $var;
288
+ }
289
  public function valid(){
290
  $key = key($this->tickets_bookings);
291
  $var = ($key !== NULL && $key !== FALSE);
292
  return $var;
293
+ }
294
+ //Countable Implementation
295
+ public function count(){
296
+ return count($this->tickets_bookings);
297
+ }
298
  }
299
  ?>
em-actions.php CHANGED
@@ -236,7 +236,9 @@ function em_init_actions() {
236
  location_state AS `state`,
237
  location_region AS `region`,
238
  location_postcode AS `postcode`,
239
- location_country AS `country`
 
 
240
  FROM ".EM_LOCATIONS_TABLE."
241
  WHERE ( `location_name` LIKE %s ) AND location_status=1 $location_cond LIMIT 10
242
  ", $term);
@@ -467,7 +469,7 @@ function em_init_actions() {
467
  global $wpdb;
468
  if( //save just the booking meta, avoid extra unneccesary hooks and things to go wrong
469
  $EM_Booking->is_no_user() && $EM_Booking->get_person_post() &&
470
- $wpdb->update(EM_BOOKINGS_TABLE, array('booking_meta'=> serialize($EM_Booking->booking_meta)), array('booking_id'=>$EM_Booking->booking_id))
471
  ){
472
  $EM_Notices->add_confirm( $EM_Booking->feedback_message, true );
473
  $redirect = !empty($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : em_wp_get_referer();
236
  location_state AS `state`,
237
  location_region AS `region`,
238
  location_postcode AS `postcode`,
239
+ location_country AS `country`,
240
+ location_latitude AS `latitude`,
241
+ location_longitude AS `longitude`
242
  FROM ".EM_LOCATIONS_TABLE."
243
  WHERE ( `location_name` LIKE %s ) AND location_status=1 $location_cond LIMIT 10
244
  ", $term);
469
  global $wpdb;
470
  if( //save just the booking meta, avoid extra unneccesary hooks and things to go wrong
471
  $EM_Booking->is_no_user() && $EM_Booking->get_person_post() &&
472
+ $wpdb->update(EM_BOOKINGS_TABLE, array('booking_meta'=> serialize($EM_Booking->booking_meta)), array('booking_id'=>$EM_Booking->booking_id)) !== false
473
  ){
474
  $EM_Notices->add_confirm( $EM_Booking->feedback_message, true );
475
  $redirect = !empty($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : em_wp_get_referer();
em-events.php CHANGED
@@ -22,7 +22,7 @@ function em_content($page_content) {
22
  //general defaults
23
  $args = array(
24
  'owner' => false,
25
- 'pagination' => 1
26
  );
27
  $args['ajax'] = isset($args['ajax']) ? $args['ajax']:(!defined('EM_AJAX') || EM_AJAX );
28
  if( !post_password_required() && in_array($post->ID, array($events_page_id, $locations_page_id, $categories_page_id, $edit_bookings_page_id, $edit_events_page_id, $edit_locations_page_id, $my_bookings_page_id, $tags_page_id)) ){
@@ -34,6 +34,7 @@ function em_content($page_content) {
34
  if ( !empty($_REQUEST['calendar_day']) ) {
35
  //Events for a specific day
36
  $args = EM_Events::get_post_search( array_merge($args, $_REQUEST) );
 
37
  em_locate_template('templates/calendar-day.php',true, array('args'=>$args));
38
  }elseif ( is_object($EM_Event)) {
39
  em_locate_template('templates/event-single.php',true, array('args'=>$args));
22
  //general defaults
23
  $args = array(
24
  'owner' => false,
25
+ 'pagination' => 1,
26
  );
27
  $args['ajax'] = isset($args['ajax']) ? $args['ajax']:(!defined('EM_AJAX') || EM_AJAX );
28
  if( !post_password_required() && in_array($post->ID, array($events_page_id, $locations_page_id, $categories_page_id, $edit_bookings_page_id, $edit_events_page_id, $edit_locations_page_id, $my_bookings_page_id, $tags_page_id)) ){
34
  if ( !empty($_REQUEST['calendar_day']) ) {
35
  //Events for a specific day
36
  $args = EM_Events::get_post_search( array_merge($args, $_REQUEST) );
37
+ $args['limit'] = !empty($args['limit']) ? $args['limit'] : get_option('dbem_events_default_limit');
38
  em_locate_template('templates/calendar-day.php',true, array('args'=>$args));
39
  }elseif ( is_object($EM_Event)) {
40
  em_locate_template('templates/event-single.php',true, array('args'=>$args));
em-functions.php CHANGED
@@ -166,19 +166,19 @@ function em_get_countries($add_blank = false, $sort = true){
166
  global $em_countries_array;
167
  if( !is_array($em_countries_array) ){
168
  $em_countries_array_i18n = array();
169
- $em_countries_array_i18n['cs'] = array ('AF' => 'Afghanistan', 'AL' => 'Albánie', 'DZ' => 'Alžírsko', 'AS' => 'Americká Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarctica', 'AG' => 'Antigua a Barbuda', 'AR' => 'Argentina', 'AM' => 'Arménie', 'AW' => 'Aruba', 'AU' => 'Austrálie', 'AT' => 'Rakousko', 'AZ' => 'Ázerbájdžán', 'BS' => 'Bahamy', 'BH' => 'Bahrajn', 'BD' => 'Bangladéš', 'BB' => 'Barbados', 'BY' => 'Belorusko', 'BE' => 'Belgie', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhútán', 'BO' => 'Bolívie', 'BA' => 'Bosna a Hercegovina', 'BW' => 'Botswana', 'BR' => 'Brazílie', 'VG' => 'Britské Panenské ostrovy', 'BN' => 'Brunej', 'BG' => 'Bulharsko', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Pobreží slonoviny', 'KH' => 'Kambodža', 'CM' => 'Kamerun', 'CA' => 'Kanada', 'CV' => 'Kapverdy', 'KY'=>'Kajmanské ostrovy', 'CF' => 'Stredoafrická republika', 'TD' => 'Cad', 'CL' => 'Chile', 'CN' => 'Cína', 'CO' => 'Kolumbie', 'KM' => 'Komory', 'CR' => 'Kostarika', 'HR' => 'Chorvatsko', 'CU' => 'Kuba', 'CY' => 'Kypr', 'CZ' => 'Česká republika', 'KP' => 'Severní Korea', 'CD' => 'Democratic Republic of the Congo', 'DK' => 'Dánsko', 'DJ' => 'Džibuti', 'DM' => 'Dominika', 'DO' => 'Dominikánská republika', 'EC' => 'Ekvádor', 'EG' => 'Egypt', 'SV' => 'Salvador', 'XE' => 'England', 'GQ' => 'Rovníková Guinea', 'ER' => 'Eritrea', 'EE' => 'Estonsko', 'ET' => 'Etiopie', 'FJ' => 'Fidži', 'FI' => 'Finsko', 'FR' => 'Francie', 'PF' => 'Francouzská Polynésie', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Gruzie', 'DE' => 'Nemecko', 'GH' => 'Ghana', 'GR' => 'Recko', 'GL' => 'Grónsko', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guiné-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Madarsko', 'IS' => 'Island', 'IN' => 'Indie', 'ID' => 'Indonésie', 'IR' => 'Írán', 'IQ' => 'Irák', 'IE' => 'Irsko', 'IL' => 'Izrael', 'IT' => 'Itálie', 'JE'=>'Jersey', 'JM' => 'Jamajka', 'JP' => 'Japonsko', 'JO' => 'Jordánsko', 'KZ' => 'Kazachstán', 'KE' => 'Kena', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuvajt', 'KG' => 'Kyrgyzstán', 'LA' => 'Laos', 'LV' => 'Lotyšsko', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Libérie', 'LY' => 'Libye', 'LI' => 'Lichtenštejnsko', 'LT' => 'Litva', 'LU' => 'Lucembursko', 'MO' => 'Macao', 'MK' => 'Makedonie', 'MG' => 'Madagaskar', 'MW' => 'Malawi', 'MY' => 'Malajsie', 'MV' => 'Maledivy', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshallovy ostrovy', 'MQ' => 'Martinik', 'MU' => 'Mauricius', 'MR' => 'Mauritánie', 'MX' => 'Mexiko', 'FM' => 'Micronésie', 'MD' => 'Moldávie', 'MC' => 'Monako', 'MN' => 'Mongolsko', 'ME' => 'Cerná Hora', 'MA' => 'Maroko', 'MZ' => 'Mozambik', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibie', 'NR' => 'Nauru', 'NP' => 'Nepál', 'NL' => 'Holandsko', 'AN' => 'Nizozemské Antily', 'NC' => 'Nová Kaledonie', 'NZ' => 'Nový Zéland', 'NI' => 'Nikaragua', 'NE' => 'Niger', 'NG' => 'Nigérie', 'XI' => 'Northern Ireland', 'MP' => 'Severní Mariany', 'NO' => 'Norsko', 'OM' => 'Omán', 'PK' => 'Pákistán', 'PW' => 'Palau', 'PS' => 'Palestina', 'PA' => 'Panama', 'PG' => 'Papua-Nová Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Filipíny', 'PL' => 'Polsko', 'PT' => 'Portugalsko', 'PR' => 'Portoriko', 'QA' => 'Katar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Rumunsko', 'RU' => 'Rusko', 'RW' => 'Rwanda', 'ST' => 'Svatý Tomáš a Princuv ostrov', 'KN' => 'Svatý Kryštof a Nevis', 'LC' => 'Svatá Lucie', 'VC' => 'Svatý Vincenc a Grenadiny', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saúdská Arábie', 'XS' => 'Skotsko', 'SN' => 'Senegal', 'RS' => 'Srbsko', 'SC' => 'Seychely', 'SL' => 'Sierra Leone', 'SG' => 'Singapur', 'SK' => 'Slovensko', 'SI' => 'Slovinsko', 'SB' => 'Šalamounovy ostrovy', 'SO' => 'Somálsko', 'ZA' => 'Jihoafrická republika', 'KR' => 'Jižní Korea', 'ES' => 'Španělsko', 'LK' => 'Srí Lanka', 'SD' => 'Súdán', 'SR' => 'Surinam', 'SZ' => 'Svazijsko', 'SE' => 'Švédsko', 'CH' => 'Švýcarsko', 'SY' => 'Sýrie', 'TW' => 'Tchaj-wan', 'TJ' => 'Tádžikistán', 'TZ' => 'Tanzanie', 'TH' => 'Thajsko', 'TL' => 'Východní Timor', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad a Tobago', 'TN' => 'Tunisko', 'TR' => 'Turecko', 'TM' => 'Turkmenistán', 'TV' => 'Tuvalu', 'VI' => 'Americké Panenské ostrovy', 'UG' => 'Uganda', 'UA' => 'Ukrajina', 'AE' => 'Spojené arabské emiráty', 'GB' => 'Spojené království', 'US' => 'Spojené státy', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistán', 'VU' => 'Nové Hebridy', 'VA' => 'Vatikán', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Jemen', 'ZM' => 'Zambie', 'ZW' => 'Zimbabwe' );
170
- $em_countries_array_i18n['da'] = array ('AF' => 'Afghanistan', 'AL' => 'Albanien', 'DZ' => 'Algeriet', 'AS' => 'Amerikansk Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarktis', 'AG' => 'Antigua og Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenien', 'AW' => 'Aruba', 'AU' => 'Australien', 'AT' => 'Østrig', 'AZ' => 'Aserbajdsjan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgien', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnien-Hercegovina', 'BW' => 'Botswana', 'BR' => 'Brasilien', 'VG' => 'De Britiske Jomfruøer', 'BN' => 'Brunei', 'BG' => 'Bulgarien', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Côte d\'Ivoire', 'KH' => 'Cambodja', 'CM' => 'Cameroun', 'CA' => 'Canada', 'CV' => 'Kap Verde', 'KY'=>'Caymanøerne', 'CF' => 'Den Centralafrikanske Republik', 'TD' => 'Tchad', 'CL' => 'Chile', 'CN' => 'Kina', 'CO' => 'Colombia', 'KM' => 'Comorerne', 'CR' => 'Costa Rica', 'HR' => 'Kroatien', 'CU' => 'Cuba', 'CY' => 'Cypern', 'CZ' => 'Tjekkiet', 'KP' => 'Nordkorea', 'CD' => 'Congo', 'DK' => 'Danmark', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Den Dominikanske Republik', 'EC' => 'Ecuador', 'EG' => 'Egypten', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Ækvatorialguinea', 'ER' => 'Eritrea', 'EE' => 'Estland', 'ET' => 'Etiopien', 'FJ' => 'Fiji', 'FI' => 'Finland', 'FR' => 'Frankrig', 'PF' => 'Fransk Polynesien', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgien', 'DE' => 'Tyskland', 'GH' => 'Ghana', 'GR' => 'Grækenland', 'GL' => 'Grønland (Kalaallit Nunaat)', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hongkong', 'HU' => 'Ungarn', 'IS' => 'Island', 'IN' => 'Indien', 'ID' => 'Indonesien', 'IR' => 'Iran', 'IQ' => 'Irak', 'IE' => 'Irland', 'IL' => 'Israel', 'IT' => 'Italien', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JO' => 'Jordan', 'KZ' => 'Kasakhstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kirgisistan', 'LA' => 'Laos', 'LV' => 'Letland', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libyen', 'LI' => 'Liechtenstein', 'LT' => 'Litauen', 'LU' => 'Luxembourg', 'MO' => 'Macao', 'MK' => 'Makedonien', 'MG' => 'Madagaskar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Maldiverne', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshalløerne', 'MQ' => 'Martinique', 'MU' => 'Mauritius', 'MR' => 'Mauretanien', 'MX' => 'Mexico', 'FM' => 'Mikronesien', 'MD' => 'Moldova', 'MC' => 'Monaco', 'MN' => 'Mongoliet', 'ME' => 'Montenegro', 'MA' => 'Marokko', 'MZ' => 'Mozambique', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Nederlandene', 'AN' => 'De Nederlandske Antiller', 'NC' => 'Ny Kaledonien', 'NZ' => 'New Zealand', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Nordmarianerne', 'NO' => 'Norge', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papua Ny Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Filippinerne', 'PL' => 'Polen', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Rumænien', 'RU' => 'Rusland', 'RW' => 'Rwanda', 'ST' => 'São Tomé og Príncipe', 'KN' => 'Saint Kitts og Nevis', 'LC' => 'Saint Lucia', 'VC' => 'Saint Vincent og Grenadinerne', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saudi-Arabien', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychellerne', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovakiet', 'SI' => 'Slovenien', 'SB' => 'Salomonøerne', 'SO' => 'Somalia', 'ZA' => 'Sydafrika', 'KR' => 'Sydkorea', 'ES' => 'Spanien', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Surinam', 'SZ' => 'Swaziland', 'SE' => 'Sverige', 'CH' => 'Schweiz', 'SY' => 'Syrien', 'TW' => 'Taiwan', 'TJ' => 'Tadsjikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailand', 'TL' => 'Østtimor', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad og Tobago', 'TN' => 'Tunesien', 'TR' => 'Tyrkiet', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'De Amerikanske Jomfruøer', 'UG' => 'Uganda', 'UA' => 'Ukraine', 'AE' => 'De Forenede Arabiske Emirater', 'GB' => 'Det Forenede Kongerige', 'US' => 'USA', 'UY' => 'Uruguay', 'UZ' => 'Usbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vatikanstaten', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' );
171
- $em_countries_array_i18n['es'] = array ('AF' => 'Afganistán', 'AL' => 'Albania', 'DZ' => 'Argelia', 'AS' => 'Samoa Americana', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antártida', 'AG' => 'Antigua y Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Austria', 'AZ' => 'Azerbaiyán', 'BS' => 'Bahamas', 'BH' => 'Bahráin', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Bielorrusia', 'BE' => 'Bélgica', 'BZ' => 'Belice', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bután', 'BO' => 'Bolivia', 'BA' => 'Bosnia y Hercegovina', 'BW' => 'Botsuana', 'BR' => 'Brasil', 'VG' => 'Islas Vírgenes Británicas', 'BN' => 'Brunéi', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Costa de Marfil', 'KH' => 'Camboya', 'CM' => 'Camerún', 'CA' => 'Canadá', 'CV' => 'Cabo Verde', 'KY'=>'Islas Caimán', 'CF' => 'República Centroafricana', 'TD' => 'Chad', 'CL' => 'Chile', 'CN' => 'China', 'CO' => 'Colombia', 'KM' => 'Comoras', 'CR' => 'Costa Rica', 'HR' => 'Croacia', 'CU' => 'Cuba', 'CY' => 'Chipre', 'CZ' => 'República Checa', 'KP' => 'Corea del Norte', 'CD' => 'República Democrática del Congo', 'DK' => 'Dinamarca', 'DJ' => 'Yibuti', 'DM' => 'Dominica', 'DO' => 'República Dominicana', 'EC' => 'Ecuador', 'EG' => 'Egipto', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Guinea Ecuatorial', 'ER' => 'Eritrea', 'EE' => 'Estonia', 'ET' => 'Etiopía', 'FJ' => 'Fiyi', 'FI' => 'Finlandia', 'FR' => 'Francia', 'PF' => 'Polinesia Francesa', 'GA' => 'Gabón', 'GM' => 'Gambia', 'GE' => 'Georgia', 'DE' => 'Alemania', 'GH' => 'Ghana', 'GR' => 'Grecia', 'GL' => 'Groenlandia', 'GD' => 'Granada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haití', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hungría', 'IS' => 'Islandia', 'IN' => 'India', 'ID' => 'Indonesia', 'IR' => 'Irán', 'IQ' => 'Iraq', 'IE' => 'Irlanda', 'IL' => 'Israel', 'IT' => 'Italia', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japón', 'JO' => 'Jordania', 'KZ' => 'Kazajistán', 'KE' => 'Kenia', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kirguizistán', 'LA' => 'Laos', 'LV' => 'Letonia', 'LB' => 'Líbano', 'LS' => 'Lesoto', 'LR' => 'Liberia', 'LY' => 'Libia', 'LI' => 'Liechtenstein', 'LT' => 'Lituania', 'LU' => 'Luxemburgo', 'MO' => 'Macao', 'MK' => 'Macedonia', 'MG' => 'Madagascar', 'MW' => 'Malaui', 'MY' => 'Malasia', 'MV' => 'Maldivas', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Islas Marshall', 'MQ' => 'Martinica', 'MU' => 'Mauricio', 'MR' => 'Mauritania', 'MX' => 'México', 'FM' => 'Micronesia', 'MD' => 'Moldavia', 'MC' => 'Mónaco', 'MN' => 'Mongolia', 'ME' => 'Montenegro', 'MA' => 'Marruecos', 'MZ' => 'Mozambique', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Países Bajos', 'AN' => 'Antillas Neerlandesas', 'NC' => 'Nueva Caledonia', 'NZ' => 'Nueva Zelanda', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Islas Marianas del Norte', 'NO' => 'Noruega', 'OM' => 'Omán', 'PK' => 'Pakistán', 'PW' => 'Palaos', 'PS' => 'Palestine', 'PA' => 'Panamá', 'PG' => 'Papúa-Nueva Guinea', 'PY' => 'Paraguay', 'PE' => 'Perú', 'PH' => 'Filipinas', 'PL' => 'Polonia', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Rumania', 'RU' => 'Russia', 'RW' => 'Ruanda', 'ST' => 'Santo Tomé y Príncipe', 'KN' => 'San Cristóbal y Nieves', 'LC' => 'Santa Lucía', 'VC' => 'San Vicente y las Granadinas', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Arabia Saudí', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychelles', 'SL' => 'Sierra Leona', 'SG' => 'Singapur', 'SK' => 'Eslovaquia', 'SI' => 'Eslovenia', 'SB' => 'Islas Salomón', 'SO' => 'Somalia', 'ZA' => 'Sudáfrica', 'KR' => 'Corea del Sur', 'ES' => 'España', 'LK' => 'Sri Lanka', 'SD' => 'Sudán', 'SR' => 'Surinam', 'SZ' => 'Suazilandia', 'SE' => 'Suecia', 'CH' => 'Suiza', 'SY' => 'Siria', 'TW' => 'Taiwán', 'TJ' => 'Tayikistán', 'TZ' => 'Tanzania', 'TH' => 'Tailandia', 'TL' => 'Timor Oriental', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad y Tobago', 'TN' => 'Túnez', 'TR' => 'Turquía', 'TM' => 'Turkmenistán', 'TV' => 'Tuvalu', 'VI' => 'Islas Vírgenes Americanas', 'UG' => 'Uganda', 'UA' => 'Ucrania', 'AE' => 'Emiratos Árabes Unidos', 'GB' => 'Reino Unido', 'US' => 'Estados Unidos', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistán', 'VU' => 'Vanuatu', 'VA' => 'El Vaticano', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabue' );
172
- $em_countries_array_i18n['fr'] = array ('AF' => 'Afghanistan', 'AL' => 'Albanie', 'DZ' => 'Algérie', 'AS' => 'Samoa américaines', 'AD' => 'Andorre', 'AO' => 'Angola', 'AQ' => 'Antarctique', 'AG' => 'Antigua-et-Barbuda', 'AR' => 'Argentine', 'AM' => 'Arménie', 'AW' => 'Aruba', 'AU' => 'Australie', 'AT' => 'Autriche', 'AZ' => 'Azerbaïdjan', 'BS' => 'Bahamas', 'BH' => 'Bahreïn', 'BD' => 'Bangladesh', 'BB' => 'Barbade', 'BY' => 'Biélorussie', 'BE' => 'Belgique', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Bénin', 'BT' => 'Bhoutan', 'BO' => 'Bolivie', 'BA' => 'Bosnie-Herzégovine', 'BW' => 'Botswana', 'BR' => 'Brésil', 'VG' => 'Iles Vierges britanniques', 'BN' => 'Brunei', 'BG' => 'Bulgarie', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'C&ocirc;te D\'Ivoire', 'KH' => 'Cambodge', 'CM' => 'Cameroun', 'CA' => 'Canada', 'CV' => 'Cap-Vert', 'KY'=>'Iles Cayman', 'CF' => 'République centrafricaine', 'TD' => 'Tchad', 'CL' => 'Chili', 'CN' => 'Chine', 'CO' => 'Colombie', 'KM' => 'Comores', 'CR' => 'Costa Rica', 'HR' => 'Croatie', 'CU' => 'Cuba', 'CY' => 'Chypre', 'CZ' => 'République tchèque', 'KP' => 'Corée du Nord', 'CD' => 'République démocratique du Congo', 'DK' => 'Danemark', 'DJ' => 'Djibouti', 'DM' => 'Dominique', 'DO' => 'République dominicaine', 'EC' => 'Équateur', 'EG' => 'Égypte', 'SV' => 'Salvador', 'XE' => 'England', 'GQ' => 'Guinée équatoriale', 'ER' => 'Érythrée', 'EE' => 'Estonie', 'ET' => 'Éthiopie', 'FJ' => 'Iles Fidji', 'FI' => 'Finlande', 'FR' => 'France', 'PF' => 'Polynésie française', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Géorgie', 'DE' => 'Allemagne', 'GH' => 'Ghana', 'GR' => 'Grèce', 'GL' => 'Groenland', 'GD' => 'Grenade', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinée', 'GW' => 'Guinée-Bissao', 'GY' => 'Guyana', 'HT' => 'Haïti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hongrie', 'IS' => 'Islande', 'IN' => 'Inde', 'ID' => 'Indonésie', 'IR' => 'Iran', 'IQ' => 'Iraq', 'IE' => 'Irlande', 'IL' => 'Israël', 'IT' => 'Italie', 'JE'=>'Jersey', 'JM' => 'Jamaïque', 'JP' => 'Japon', 'JO' => 'Jordanie', 'KZ' => 'Kazakhstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Koweït', 'KG' => 'Kirghizistan', 'LA' => 'Laos', 'LV' => 'Lettonie', 'LB' => 'Liban', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libye', 'LI' => 'Liechtenstein', 'LT' => 'Lituanie', 'LU' => 'Luxembourg', 'MO' => 'Macao', 'MK' => 'Macédoine', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malaisie', 'MV' => 'Maldives', 'ML' => 'Mali', 'MT' => 'Malte', 'MH' => 'Iles Marshall', 'MQ' => 'Martinique', 'MU' => 'Maurice', 'MR' => 'Mauritanie', 'MX' => 'Mexique', 'FM' => 'Micronésie', 'MD' => 'Moldavie', 'MC' => 'Monaco', 'MN' => 'Mongolie', 'ME' => 'Montenegro', 'MA' => 'Maroc', 'MZ' => 'Mozambique', 'MM' => 'le Myanmar', 'NA' => 'Namibie', 'NR' => 'Nauru', 'NP' => 'Népal', 'NL' => 'Pays-Bas', 'AN' => 'Antilles néerlandaises', 'NC' => 'Nouvelle-Calédonie', 'NZ' => 'Nouvelle-Zélande', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Mariannes du Nord', 'NO' => 'Norvège', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papouasie-Nouvelle-Guinée', 'PY' => 'Paraguay', 'PE' => 'Pérou', 'PH' => 'Philippines', 'PL' => 'Pologne', 'PT' => 'Portugal', 'PR' => 'Porto Rico', 'QA' => 'Qatar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Roumanie', 'RU' => 'Russie', 'RW' => 'Rwanda', 'ST' => 'Sao Tomé-et-Principe', 'KN' => 'Saint-Christophe-et-Niévès', 'LC' => 'Sainte-Lucie', 'VC' => 'Saint-Vincent-et-les-Grenadines', 'WS' => 'Samoa', 'SM' => 'Saint-Marin', 'SA' => 'Arabie saoudite', 'XS' => 'Scotland', 'SN' => 'Sénégal', 'RS' => 'Serbia', 'SC' => 'Seychelles', 'SL' => 'Sierra Leone', 'SG' => 'Singapour', 'SK' => 'Slovaquie', 'SI' => 'Slovénie', 'SB' => 'Iles Salomon', 'SO' => 'Somalie', 'ZA' => 'Afrique du Sud', 'KR' => 'Corée du Sud', 'ES' => 'Espagne', 'LK' => 'Sri Lanka', 'SD' => 'Soudan', 'SR' => 'Suriname', 'SZ' => 'Swaziland', 'SE' => 'Suède', 'CH' => 'Suisse', 'SY' => 'Syrie', 'TW' => 'Taïwan', 'TJ' => 'Tadjikistan', 'TZ' => 'Tanzanie', 'TH' => 'Thaïlande', 'TL' => 'Timor Oriental', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinité-et-Tobago', 'TN' => 'Tunisie', 'TR' => 'Turquie', 'TM' => 'Turkménistan', 'TV' => 'Tuvalu', 'VI' => 'Iles Vierges américaines', 'UG' => 'Ouganda', 'UA' => 'Ukraine', 'AE' => 'Émirats arabes unis', 'GB' => 'Royaume-Uni', 'US' => 'États-Unis', 'UY' => 'Uruguay', 'UZ' => 'Ouzbékistan', 'VU' => 'Vanuatu', 'VA' => 'Saint-Siège', 'VE' => 'Venezuela', 'VN' => 'Viêt Nam', 'XW' => 'Wales', 'YE' => 'Yémen', 'ZM' => 'Zambie', 'ZW' => 'Zimbabwe' );
173
- $em_countries_array_i18n['de'] = array ('AF' => 'Afghanistan', 'AL' => 'Albanien', 'DZ' => 'Algerien', 'AS' => 'Amerikanisch-Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarktis', 'AG' => 'Antigua und Barbuda', 'AR' => 'Argentinien', 'AM' => 'Armenien', 'AW' => 'Aruba', 'AU' => 'Australien', 'AT' => 'Österreich', 'AZ' => 'Aserbaidschan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesch', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgien', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivien', 'BA' => 'Bosnien und Herzegowina', 'BW' => 'Botsuana', 'BR' => 'Brasilien', 'VG' => 'Britische Jungferninseln', 'BN' => 'Brunei Darussalam', 'BG' => 'Bulgarien', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'C&ocirc;te D\'Ivoire', 'KH' => 'Kambodscha', 'CM' => 'Kamerun', 'CA' => 'Kanada', 'CV' => 'Kap Verde', 'KY'=>'Kaimaninseln', 'CF' => 'Zentralafrikanische Republik', 'TD' => 'Tschad', 'CL' => 'Chile', 'CN' => 'China', 'CO' => 'Kolumbien', 'KM' => 'Komoren', 'CR' => 'Costa Rica', 'HR' => 'Kroatien', 'CU' => 'Kuba', 'CY' => 'Zypern', 'CZ' => 'Tschechische Republik', 'KP' => 'Demokratische Volksrepublik Korea', 'CD' => 'Demokratische Republik Kongo', 'DK' => 'Dänemark', 'DJ' => 'Dschibuti', 'DM' => 'Dominica', 'DO' => 'Dominikanische Republik', 'EC' => 'Ecuador', 'EG' => 'Ägypten', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Äquatorialguinea', 'ER' => 'Eritrea', 'EE' => 'Estland', 'ET' => 'Äthiopien', 'FJ' => 'Fidschi', 'FI' => 'Finnland', 'FR' => 'Frankreich', 'PF' => 'Französisch-Polynesien', 'GA' => 'Gabun', 'GM' => 'Gambia', 'GE' => 'Georgien', 'DE' => 'Deutschland', 'GH' => 'Ghana', 'GR' => 'Griechenland', 'GL' => 'Grönland', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'HongKong', 'HU' => 'Ungarn', 'IS' => 'Island', 'IN' => 'Indien', 'ID' => 'Indonesien', 'IR' => 'Iran', 'IQ' => 'Irak', 'IE' => 'Irland', 'IL' => 'Israel', 'IT' => 'Italien', 'JE'=>'Jersey', 'JM' => 'Jamaika', 'JP' => 'Japan', 'JO' => 'Jordanien', 'KZ' => 'Kasachstan', 'KE' => 'Kenia', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kirgisistan', 'LA' => 'Laos', 'LV' => 'Lettland', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libyen', 'LI' => 'Liechtenstein', 'LT' => 'Litauen', 'LU' => 'Luxemburg', 'MO' => 'Macau', 'MK' => 'Mazedonien', 'MG' => 'Madagaskar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Malediven', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshallinseln', 'MQ' => 'Martinique', 'MU' => 'Mauritius', 'MR' => 'Mauretanien', 'MX' => 'Mexiko', 'FM' => 'Mikronesien', 'MD' => 'Republik Moldau', 'MC' => 'Monaco', 'MN' => 'Mongolei', 'ME' => 'Montenegro', 'MA' => 'Marokko', 'MZ' => 'Mosambik', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Niederlande', 'AN' => 'Niederländische Antillen', 'NC' => 'Neukaledonien', 'NZ' => 'Neuseeland', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Nördliche Marianen', 'NO' => 'Norwegen', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papua-Neuguinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Philippinen', 'PL' => 'Polen', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Katar', 'CG' => 'Kongo', 'RN' => 'Réunion', 'RO' => 'Rumänien', 'RU' => 'Russische Föderation', 'RW' => 'Ruanda', 'ST' => 'São Tomé und Príncipe', 'KN' => 'St. Kitts und Nevis', 'LC' => 'St. Lucia', 'VC' => 'St. Vincent und die Grenadinen', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saudi-Arabien', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychellen', 'SL' => 'Sierra Leone', 'SG' => 'Singapur', 'SK' => 'Slowakei', 'SI' => 'Slowenien', 'SB' => 'Salomonen', 'SO' => 'Somalia', 'ZA' => 'Südafrika', 'KR' => 'Republik Korea', 'ES' => 'Spanien', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SZ' => 'Swasiland', 'SE' => 'Schweden', 'CH' => 'Schweiz', 'SY' => 'Syrien', 'TW' => 'Taiwan', 'TJ' => 'Tadschikistan', 'TZ' => 'Tansania', 'TH' => 'Thailand', 'TL' => 'Osttimor', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad und Tobago', 'TN' => 'Tunesien', 'TR' => 'Türkei', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'Amerikanische Jungferninseln', 'UG' => 'Uganda', 'UA' => 'Ukraine', 'AE' => 'Vereinigte Arabische Emirate', 'GB' => 'Vereinigtes Königreich', 'US' => 'Vereinigte Staaten', 'UY' => 'Uruguay', 'UZ' => 'Usbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vatikanstadt', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Jemen', 'ZM' => 'Sambia', 'ZW' => 'Simbabwe' );
174
- $em_countries_array_i18n['hu'] = array ('AF' => 'Afganisztán', 'AL' => 'Albánia', 'DZ' => 'Algéria', 'AS' => 'Amerikai Szamoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarktisz', 'AG' => 'Antigua és Barbuda', 'AR' => 'Argentína', 'AM' => 'Örményország', 'AW' => 'Aruba', 'AU' => 'Ausztrália', 'AT' => 'Ausztria', 'AZ' => 'Azerbajdzsán', 'BS' => 'Bahamas', 'BH' => 'Bahrein', 'BD' => 'Banglades', 'BB' => 'Barbados', 'BY' => 'Belorusszia', 'BE' => 'Belgium', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhután', 'BO' => 'Bolívia', 'BA' => 'Bosznia-Hercegovina', 'BW' => 'Botswana', 'BR' => 'Brazília', 'VG' => 'Brit Virgin-szigetek', 'BN' => 'Brunei Darussalam', 'BG' => 'Bulgária', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Côte d\'Ivoire (Elefántcsontpart)', 'KH' => 'Kambodzsa', 'CM' => 'Kamerun', 'CA' => 'Kanada', 'CV' => 'Zöld-foki-szigetek', 'KY'=>'Kajmán-szigetek', 'CF' => 'Közép-Afrikai Köztársaság', 'TD' => 'Csád', 'CL' => 'Chile', 'CN' => 'Kína', 'CO' => 'Kolumbia', 'KM' => 'Comore-szigetek', 'CR' => 'Costa Rica', 'HR' => 'Horvátország', 'CU' => 'Kuba', 'CY' => 'Ciprus', 'CZ' => 'Cseh Köztársaság', 'KP' => 'Koreai Népi Demokratikus Köztársaság', 'CD' => 'Kongói Demokratikus Köztársaság', 'DK' => 'Dánia', 'DJ' => 'Dzsibuti', 'DM' => 'Dominika', 'DO' => 'Dominikai Köztársaság', 'EC' => 'Ecuador', 'EG' => 'Egyiptom', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Egyenlítõi Guinea', 'ER' => 'Eritrea', 'EE' => 'Észtország', 'ET' => 'Etiópia', 'FJ' => 'Fidzsi', 'FI' => 'Finnország', 'FR' => 'Franciaország', 'PF' => 'Francia Polinézia', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'GrLzia', 'DE' => 'Németország', 'GH' => 'Ghána', 'GR' => 'Görögország', 'GL' => 'Grönland', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Bissau-Guinea', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Magyarország', 'IS' => 'Izland', 'IN' => 'India', 'ID' => 'Indonézia', 'IR' => 'Irán', 'IQ' => 'Irak', 'IE' => 'Írország', 'IL' => 'Izrael', 'IT' => 'Olaszország', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japán', 'JO' => 'Jordánia', 'KZ' => 'Kazahsztán', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuvait', 'KG' => 'Kirgizisztán', 'LA' => 'Lao Népi Demokratikus Köztársaság', 'LV' => 'Litvánia', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Libéria', 'LY' => 'Líbia', 'LI' => 'Liechtenstein', 'LT' => 'Litvánia', 'LU' => 'Luxemburg', 'MO' => 'Makaó', 'MK' => 'Macedónia', 'MG' => 'Madagaszkár', 'MW' => 'Malawi', 'MY' => 'Malajzia', 'MV' => 'Maldív-szigetek', 'ML' => 'Mali', 'MT' => 'Málta', 'MH' => 'Marshall-szigetek', 'MQ' => 'Martinique', 'MU' => 'Mauritius', 'MR' => 'Mauritánia', 'MX' => 'Mexikó', 'FM' => 'Mikronéziai Szövetségi Államok', 'MD' => 'Moldva', 'MC' => 'Monaco', 'MN' => 'Mongólia', 'ME' => 'Montenegro', 'MA' => 'Marokkó', 'MZ' => 'Mozambik', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namíbia', 'NR' => 'Nauru', 'NP' => 'Nepál', 'NL' => 'Hollandia', 'AN' => 'Holland Antillák', 'NC' => 'Új-Kaledónia', 'NZ' => 'Új-Zéland', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigéria', 'XI' => 'Northern Ireland', 'MP' => 'Észak-Mariana-szigetek', 'NO' => 'Norvégia', 'OM' => 'Omán', 'PK' => 'Pakisztán', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Pápua Új-Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Fülöp-szigetek', 'PL' => 'Lengyelország', 'PT' => 'Portugália', 'PR' => 'Puerto Rico', 'QA' => 'Katar', 'CG' => 'Kongó', 'RN' => 'Réunion', 'RO' => 'Románia', 'RU' => 'Orosz Föderáció', 'RW' => 'Ruanda', 'ST' => 'Sao Tome és Principe', 'KN' => 'Saint Kitts és Nevis', 'LC' => 'Szent Lucia', 'VC' => 'Saint Vincent és Grenadines', 'WS' => 'Szamoa', 'SM' => 'San Marino', 'SA' => 'SzaLd-Arábia', 'XS' => 'Scotland', 'SN' => 'Szenegál', 'RS' => 'Serbia', 'SC' => 'Seychelle-szigetek', 'SL' => 'Sierra Leone', 'SG' => 'SzingapLr', 'SK' => 'Szlovákia', 'SI' => 'Szlovénia', 'SB' => 'Salamon-szigetek', 'SO' => 'Szomália', 'ZA' => 'Dél-Afrika', 'KR' => 'Koreai Köztársaság', 'ES' => 'Spanyolország', 'LK' => 'Srí Lanka', 'SD' => 'Szudán', 'SR' => 'Suriname', 'SZ' => 'Szváziföld', 'SE' => 'Svédország', 'CH' => 'Svájc', 'SY' => 'Szíriai Arab Köztársaság', 'TW' => 'Tajvan', 'TJ' => 'Tádzsikisztán', 'TZ' => 'Tanzániai Egyesült Köztársaság', 'TH' => 'Thaiföld', 'TL' => 'Kelet-Timor', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad és Tobago', 'TN' => 'Tunézia', 'TR' => 'Törökország', 'TM' => 'Türkmenisztán', 'TV' => 'Tuvalu', 'VI' => 'Amerikai Virgin-szigetek', 'UG' => 'Uganda', 'UA' => 'Ukrajna', 'AE' => 'Egyesült Arab Emirátusok', 'GB' => 'Egyesült Királyság', 'US' => 'Egyesült Államok', 'UY' => 'Uruguay', 'UZ' => 'Üzbegisztán', 'VU' => 'Vanuatu', 'VA' => 'Vatikán', 'VE' => 'Venezuela', 'VN' => 'Vietnám', 'XW' => 'Wales', 'YE' => 'Jemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' );
175
- $em_countries_array_i18n['it'] = array ('AF' => 'Afghanistan', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AS' => 'Samoa americane', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antartide', 'AG' => 'Antigua e Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Austria', 'AZ' => 'Azerbaigian', 'BS' => 'Bahamas', 'BH' => 'Bahrein', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Bielorussia', 'BE' => 'Belgio', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnia-Erzegovina', 'BW' => 'Botswana', 'BR' => 'Brasile', 'VG' => 'Isole Vergini britanniche', 'BN' => 'Brunei', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Costa d\'Avorio', 'KH' => 'Cambogia', 'CM' => 'Camerun', 'CA' => 'Canada', 'CV' => 'Capo Verde', 'KY'=>'Isole Cayman', 'CF' => 'Repubblica Centrafricana', 'TD' => 'Ciad', 'CL' => 'Cile', 'CN' => 'Cina', 'CO' => 'Colombia', 'KM' => 'Comore', 'CR' => 'Costa Rica', 'HR' => 'Croazia', 'CU' => 'Cuba', 'CY' => 'Cipro', 'CZ' => 'Repubblica ceca', 'KP' => 'Corea del Nord', 'CD' => 'Congo', 'DK' => 'Danimarca', 'DJ' => 'Gibuti', 'DM' => 'Dominica', 'DO' => 'Dominican Republic', 'EC' => 'Ecuador', 'EG' => 'Egitto', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Guinea Equatoriale', 'ER' => 'Eritrea', 'EE' => 'Estonia', 'ET' => 'Etiopia', 'FJ' => 'Figi', 'FI' => 'Finlandia', 'FR' => 'Francia', 'PF' => 'Polinesia francese', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgia', 'DE' => 'Germania', 'GH' => 'Ghana', 'GR' => 'Grecia', 'GL' => 'Groenlandia', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Ungheria', 'IS' => 'Islanda', 'IN' => 'India', 'ID' => 'Indonesia', 'IR' => 'Iran', 'IQ' => 'Iraq', 'IE' => 'Irlanda', 'IL' => 'Israele', 'IT' => 'Italia', 'JE'=>'Jersey', 'JM' => 'Giamaica', 'JP' => 'Giappone', 'JO' => 'Giordania', 'KZ' => 'Kazakistan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kirghizistan', 'LA' => 'Laos', 'LV' => 'Lettonia', 'LB' => 'Libano', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libia', 'LI' => 'Liechtenstein', 'LT' => 'Lituania', 'LU' => 'Lussemburgo', 'MO' => 'Macao', 'MK' => 'Macedonia', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malesia', 'MV' => 'Maldive', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Isole Marshall', 'MQ' => 'Martinica', 'MU' => 'Maurizio', 'MR' => 'Mauritania', 'MX' => 'Messico', 'FM' => 'Micronesia', 'MD' => 'Moldavia', 'MC' => 'Monaco', 'MN' => 'Mongolia', 'ME' => 'Montenegro', 'MA' => 'Marocco', 'MZ' => 'Mozambico', 'MM' => 'Myanmar(Birmania)', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Paesi Bassi', 'AN' => 'Antille olandesi', 'NC' => 'Nuova Caledonia', 'NZ' => 'Nuova Zelanda', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Marianne settentrionali', 'NO' => 'Norvegia', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papua Nuova Guinea', 'PY' => 'Paraguay', 'PE' => 'Perù', 'PH' => 'Filippine', 'PL' => 'Polonia', 'PT' => 'Portogallo', 'PR' => 'Portorico', 'QA' => 'Qatar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Romania', 'RU' => 'Russia', 'RW' => 'Ruanda', 'ST' => 'São Tomé e Príncipe', 'KN' => 'Saint Christopher e Nevis', 'LC' => 'Saint Lucia', 'VC' => 'Saint Vincent e Grenadine', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Arabia Saudita', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seicelle', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovacchia', 'SI' => 'Slovenia', 'SB' => 'Isole Salomone', 'SO' => 'Somalia', 'ZA' => 'Sudafrica', 'KR' => 'Corea del Sud', 'ES' => 'Spagna', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SZ' => 'Swaziland', 'SE' => 'Svezia', 'CH' => 'Svizzera', 'SY' => 'Siria', 'TW' => 'Taiwan', 'TJ' => 'Tagikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailandia', 'TL' => 'Timor-Leste', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad e Tobago', 'TN' => 'Tunisia', 'TR' => 'Turchia', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'Isole Vergini americane', 'UG' => 'Uganda', 'UA' => 'Ucraina', 'AE' => 'Emirati arabi uniti', 'GB' => 'Regno Unito', 'US' => 'Stati Uniti', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vaticano', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' );
176
- $em_countries_array_i18n['nl'] = array ('AF' => 'Afghanistan', 'AL' => 'Albanië', 'DZ' => 'Algerije', 'AS' => 'Amerikaans-Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarctica', 'AG' => 'Antigua en Barbuda', 'AR' => 'Argentinië', 'AM' => 'Armenië', 'AW' => 'Aruba', 'AU' => 'Australië', 'AT' => 'Oostenrijk', 'AZ' => 'Azerbeidzjan', 'BS' => 'Bahamas', 'BH' => 'Bahrein', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'België', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnië en Herzegovina', 'BW' => 'Botswana', 'BR' => 'Brazilië', 'VG' => 'Britse Maagdeneilanden', 'BN' => 'Brunei', 'BG' => 'Bulgarije', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Ivoorkust', 'KH' => 'Cambodja', 'CM' => 'Kameroen', 'CA' => 'Canada', 'CV' => 'Kaapverdië', 'KY'=>'Caymaneilanden', 'CF' => 'Centraal-Afrikaanse Republiek', 'TD' => 'Tsjaad', 'CL' => 'Chili', 'CN' => 'China', 'CO' => 'Colombia', 'KM' => 'Comoren', 'CR' => 'Costa Rica', 'HR' => 'Kroatië', 'CU' => 'Cuba', 'CY' => 'Cyprus', 'CZ' => 'Tsjechië', 'KP' => 'Noord-Korea', 'CD' => 'Democratische Republiek Congo', 'DK' => 'Denemarken', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominicaanse Republiek', 'EC' => 'Ecuador', 'EG' => 'Egypte', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Equatoriaal-Guinea', 'ER' => 'Eritrea', 'EE' => 'Estland', 'ET' => 'Ethiopië', 'FJ' => 'Fiji', 'FI' => 'Finland', 'FR' => 'Frankrijk', 'PF' => 'Frans-Polynesië', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgië', 'DE' => 'Duitsland', 'GH' => 'Ghana', 'GR' => 'Griekenland', 'GL' => 'Groenland', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinee', 'GW' => 'Guinee-Bissau', 'GY' => 'Guyana', 'HT' => 'Haïti', 'HN' => 'Honduras', 'HK' => 'HongKong', 'HU' => 'Hongarije', 'IS' => 'IJsland', 'IN' => 'India', 'ID' => 'Indonesië', 'IR' => 'Iran', 'IQ' => 'Irak', 'IE' => 'Ierland', 'IL' => 'Israël', 'IT' => 'Italië', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JO' => 'Jordanië', 'KZ' => 'Kazachstan', 'KE' => 'Kenia', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Koeweit', 'KG' => 'Kirgizië', 'LA' => 'Laos', 'LV' => 'Letland', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libië', 'LI' => 'Liechtenstein', 'LT' => 'Litouwen', 'LU' => 'Luxemburg', 'MO' => 'Macau', 'MK' => 'Macedonië', 'MG' => 'Madagaskar', 'MW' => 'Malawi', 'MY' => 'Maleisië', 'MV' => 'Maldiven', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshalleilanden', 'MQ' => 'Martinique', 'MU' => 'Mauritius', 'MR' => 'Mauritanië', 'MX' => 'Mexico', 'FM' => 'Micronesia', 'MD' => 'Moldavië', 'MC' => 'Monaco', 'MN' => 'Mongolië', 'ME' => 'Montenegro', 'MA' => 'Marokko', 'MZ' => 'Mozambique', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibië', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Nederland', 'AN' => 'Nederlandse Antillen', 'NC' => 'Nieuw-Caledonië', 'NZ' => 'Nieuw-Zeeland', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Noordelijke Marianen', 'NO' => 'Noorwegen', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papoea-Nieuw-Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Filipijnen', 'PL' => 'Polen', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Roemenië', 'RU' => 'Rusland', 'RW' => 'Rwanda', 'ST' => 'Sao Tomé en Principe', 'KN' => 'Saint Kitts en Nevis', 'LC' => 'Saint Lucia', 'VC' => 'Saint Vincent en de Grenadines', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saudi-Arabië', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychellen', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slowakije', 'SI' => 'Slovenië', 'SB' => 'Salomonseilanden', 'SO' => 'Somalië', 'ZA' => 'Zuid-Afrika', 'KR' => 'Zuid-Korea', 'ES' => 'Spanje', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SZ' => 'Swaziland', 'SE' => 'Zweden', 'CH' => 'Zwitserland', 'SY' => 'Syrië', 'TW' => 'Taiwan', 'TJ' => 'Tadzjikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailand', 'TL' => 'Timor-Leste', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad en Tobago', 'TN' => 'Tunesië', 'TR' => 'Turkije', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'Amerikaanse Maagdeneilanden', 'UG' => 'Uganda', 'UA' => 'Oekraïne', 'AE' => 'Verenigde Arabische Emiraten', 'GB' => 'Verenigd Koninkrijk', 'US' => 'Verenigde Staten', 'UY' => 'Uruguay', 'UZ' => 'Oezbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vaticaanstad', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Jemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' );
177
- $em_countries_array_i18n['pt'] = array ('AF' => 'Afeganistão', 'AL' => 'Albânia', 'DZ' => 'Argélia', 'AS' => 'Samoa Americana', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antárctida', 'AG' => 'Antígua e Barbuda', 'AR' => 'Argentina', 'AM' => 'Arménia', 'AW' => 'Aruba', 'AU' => 'Austrália', 'AT' => 'Áustria', 'AZ' => 'Azerbaijão', 'BS' => 'Baamas', 'BH' => 'Barém', 'BD' => 'Bangladeche', 'BB' => 'Barbados', 'BY' => 'Bielorrússia', 'BE' => 'Bélgica', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benim', 'BT' => 'Butão', 'BO' => 'Bolívia', 'BA' => 'Bósnia e Herzegovina', 'BW' => 'Botsuana', 'BR' => 'Brasil', 'VG' => 'Ilhas Virgens Britânicas', 'BN' => 'Brunei', 'BG' => 'Bulgária', 'BF' => 'Burquina Faso', 'BI' => 'Burúndi', 'CI' => 'Costa do Marfim', 'KH' => 'Camboja', 'CM' => 'Camarões', 'CA' => 'Canadá', 'CV' => 'Cabo Verde', 'KY'=>'Ilhas Caimão', 'CF' => 'República Centro-Africana', 'TD' => 'Chade', 'CL' => 'Chile', 'CN' => 'China', 'CO' => 'Colômbia', 'KM' => 'Comores', 'CR' => 'Costa Rica', 'HR' => 'Croácia', 'CU' => 'Cuba', 'CY' => 'Chipre', 'CZ' => 'República Checa', 'KP' => 'Coreia do Norte', 'CD' => 'Congo-Kinshasa', 'DK' => 'Dinamarca', 'DJ' => 'Jibuti', 'DM' => 'Domínica', 'DO' => 'República Dominicana', 'EC' => 'Equador', 'EG' => 'Egipto', 'SV' => 'Salvador', 'XE' => 'England', 'GQ' => 'Guiné Equatorial', 'ER' => 'Eritreia', 'EE' => 'Estónia', 'ET' => 'Etiópia', 'FJ' => 'Fiji', 'FI' => 'Finlândia', 'FR' => 'França', 'PF' => 'Polinésia Francesa', 'GA' => 'Gabão', 'GM' => 'Gambia', 'GE' => 'Geórgia', 'DE' => 'Alemanha', 'GH' => 'Gana', 'GR' => 'Grécia', 'GL' => 'Gronelândia', 'GD' => 'Granada', 'GP' =>'Guadeloupe', 'GU' => 'Guame', 'GT' => 'Guatemala', 'GN' => 'Guiné', 'GW' => 'Guiné-Bissau', 'GY' => 'Guiana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hungria', 'IS' => 'Islândia', 'IN' => 'Índia', 'ID' => 'Indonésia', 'IR' => 'Irão', 'IQ' => 'Iraque', 'IE' => 'Irlanda', 'IL' => 'Israel', 'IT' => 'Itália', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japão', 'JO' => 'Jordânia', 'KZ' => 'Cazaquistão', 'KE' => 'Quénia', 'KI' => 'Quiribáti', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Quirguizistão', 'LA' => 'Laos', 'LV' => 'Letónia', 'LB' => 'Líbano', 'LS' => 'Lesoto', 'LR' => 'Libéria', 'LY' => 'Líbia', 'LI' => 'Listenstaine', 'LT' => 'Lituânia', 'LU' => 'Luxemburgo', 'MO' => 'Macau', 'MK' => 'Macedónia', 'MG' => 'Madagáscar', 'MW' => 'Malávi', 'MY' => 'Malásia', 'MV' => 'Maldivas', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Ilhas Marshall', 'MQ' => 'Martinica', 'MU' => 'Maurícia', 'MR' => 'Mauritânia', 'MX' => 'México', 'FM' => 'Micronésia', 'MD' => 'Moldávia', 'MC' => 'Mónaco', 'MN' => 'Mongólia', 'ME' => 'Montenegro', 'MA' => 'Marrocos', 'MZ' => 'Moçambique', 'MM' => 'Birmânia', 'NA' => 'Namíbia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Países Baixos', 'AN' => 'Antilhas Neerlandesas', 'NC' => 'Nova Caledónia', 'NZ' => 'Nova Zelândia', 'NI' => 'Nicarágua', 'NE' => 'Níger', 'NG' => 'Nigéria', 'XI' => 'Northern Ireland', 'MP' => 'Marianas do Norte', 'NO' => 'Noruega', 'OM' => 'Omã', 'PK' => 'Paquistão', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panamá', 'PG' => 'Papua-Nova Guiné', 'PY' => 'Paraguai', 'PE' => 'Peru', 'PH' => 'Filipinas', 'PL' => 'Polónia', 'PT' => 'Portugal', 'PR' => 'Porto Rico', 'QA' => 'Catar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Roménia', 'RU' => 'Rússia', 'RW' => 'Ruanda', 'ST' => 'São Tomé e Príncipe', 'KN' => 'São Cristóvão e Neves', 'LC' => 'Santa Lúcia', 'VC' => 'São Vicente e Granadinas', 'WS' => 'Samoa', 'SM' => 'São Marinho', 'SA' => 'Arábia Saudita', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seicheles', 'SL' => 'Serra Leoa', 'SG' => 'Singapura', 'SK' => 'Eslováquia', 'SI' => 'Eslovénia', 'SB' => 'Ilhas Salomão', 'SO' => 'Somália', 'ZA' => 'África do Sul', 'KR' => 'Coreia do Sul', 'ES' => 'Espanha', 'LK' => 'Sri Lanca', 'SD' => 'Sudão', 'SR' => 'Suriname', 'SZ' => 'Suazilândia', 'SE' => 'Suécia', 'CH' => 'Suíça', 'SY' => 'Síria', 'TW' => 'Taiwan', 'TJ' => 'Tajiquistão', 'TZ' => 'Tanzânia', 'TH' => 'Tailândia', 'TL' => 'Timor-Leste', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trindade e Tobago', 'TN' => 'Tunísia', 'TR' => 'Turquia', 'TM' => 'Turquemenistão', 'TV' => 'Tuvalu', 'VI' => 'Ilhas Virgens Americanas', 'UG' => 'Uganda', 'UA' => 'Ucrânia', 'AE' => 'Emiratos Árabes Unidos', 'GB' => 'Reino Unido', 'US' => 'Estados Unidos', 'UY' => 'Uruguai', 'UZ' => 'Usbequistão', 'VU' => 'Vanuatu', 'VA' => 'Vaticano', 'VE' => 'Venezuela', 'VN' => 'Vietname', 'XW' => 'Wales', 'YE' => 'Iémen', 'ZM' => 'Zâmbia', 'ZW' => 'Zimbabué' );
178
- $em_countries_array_i18n['ru'] = array ('AF' => 'Афганистан', 'AL' => 'Албания', 'DZ' => 'Алжир', 'AS' => 'Самоа (США)', 'AD' => 'Андорра', 'AO' => 'Ангола', 'AQ' => 'Антарктика', 'AG' => 'Антигуа и Барбуда', 'AR' => 'Аргентина', 'AM' => 'Армения', 'AW' => 'Аруба', 'AU' => 'Австралия', 'AT' => 'Австрия', 'AZ' => 'Азербайджан', 'BS' => 'Багамы', 'BH' => 'Бахрейн', 'BD' => 'Бангладеш', 'BB' => 'Барбадос', 'BY' => 'Беларусь', 'BE' => 'Бельгия', 'BZ' => 'Белиз', 'BM' => 'Bermuda', 'BJ' => 'Бенин', 'BT' => 'Бутан', 'BO' => 'Боливия', 'BA' => 'Босния-Герцеговина', 'BW' => 'Ботсвана', 'BR' => 'Бразилия', 'VG' => 'Вирджинские острова (Брит.)', 'BN' => 'Бруней', 'BG' => 'Болгария', 'BF' => 'Буркина-Фасо', 'BI' => 'Бурунди', 'CI' => 'Берег Слоновой Кости', 'KH' => 'Камбоджа', 'CM' => 'Камерун', 'CA' => 'Канада', 'CV' => 'Кабо-Верде', 'KY'=>'Каймановы острова', 'CF' => 'Центрально-Африканская Республика', 'TD' => 'Чад', 'CL' => 'Чили', 'CN' => 'Китай', 'CO' => 'Колумбия', 'KM' => 'Коморос', 'CR' => 'Коста Рикa', 'HR' => 'Хорватия', 'CU' => 'Куба', 'CY' => 'Кипр', 'CZ' => 'Чешская Республика', 'KP' => 'Северная Корея', 'CD' => 'Демократическая Республика Конго', 'DK' => 'Дания', 'DJ' => 'Джибути', 'DM' => 'Доминика', 'DO' => ' Доминиканская Республика', 'EC' => 'Эквадор', 'EG' => 'Египет', 'SV' => 'Сальвадор', 'XE' => 'Англия', 'GQ' => 'Экваториальная Гвинея', 'ER' => 'Эритрея', 'EE' => 'Эстония', 'ET' => 'Эфиопия', 'FJ' => 'Фиджи', 'FI' => 'Финляндия', 'FR' => 'Франция', 'PF' => ' Полинезия (Фр.)', 'GA' => 'Габон', 'GM' => 'Гамбия', 'GE' => 'Грузия', 'DE' => 'Германия', 'GH' => 'Гана', 'GR' => 'Греция', 'GL' => 'Гренландия', 'GD' => 'Гренада', 'GP' =>'Guadeloupe', 'GU' => 'Гуам (США)', 'GT' => 'Гватемала', 'GN' => 'Гвинея', 'GW' => 'Гвинея-Бисау', 'GY' => 'Гайана', 'HT' => 'Гаити', 'HN' => 'Гондурас', 'HK' => 'Гонг Конг', 'HU' => 'Венгрия', 'IS' => 'Исландия', 'IN' => 'Индия', 'ID' => 'Индонезия', 'IR' => 'Иран', 'IQ' => 'Ирак', 'IE' => 'Ирландия', 'IL' => 'Израйль', 'IT' => 'Италия', 'JE'=>'Jersey', 'JM' => 'Ямайка', 'JP' => 'Япония', 'JO' => 'Иордания', 'KZ' => 'Казахстан', 'KE' => 'Кения', 'KI' => 'Кирибати', 'KV' => 'Косово', 'KW' => 'Кувейт', 'KG' => 'Киргизия', 'LA' => 'Лаос', 'LV' => 'Латвия', 'LB' => 'Ливан', 'LS' => 'Лесото', 'LR' => 'Либерия', 'LY' => 'Либия', 'LI' => 'Лихтейнштейн', 'LT' => 'Литва', 'LU' => 'Люксембург', 'MO' => 'Макау', 'MK' => 'Македония', 'MG' => 'Мадагаскар', 'MW' => 'Малави', 'MY' => 'Малайзия', 'MV' => 'Мальдивы', 'ML' => 'Мали', 'MT' => 'Мальта', 'MH' => 'Маршальские острова', 'MQ' => 'Мартиника (Фр.)', 'MU' => 'Мавритий', 'MR' => 'Мавритания', 'MX' => 'Мексика', 'FM' => 'Микронезия', 'MD' => 'Молдова', 'MC' => 'Монако', 'MN' => 'Монголия', 'ME' => 'Черногория', 'MA' => 'Морокко', 'MZ' => 'Мозамбик', 'MM' => 'Бирма (Мьянма)', 'NA' => 'Намибия', 'NR' => 'Науру', 'NP' => 'Непал', 'NL' => 'Нидерланды', 'AN' => 'Антиллы (Нидерланды)', 'NC' => 'Новая Каледония (Фр.)', 'NZ' => 'Новая Зеландия', 'NI' => 'Никарагуаa', 'NE' => 'Нигер', 'NG' => 'Нигерия', 'XI' => 'Северной Ирландии', 'MP' => 'Северные Марианские острова', 'NO' => 'Норвегия', 'OM' => 'Оман', 'PK' => 'Пакистан', 'PW' => 'Палау', 'PS' => 'Палестина', 'PA' => 'Панама', 'PG' => 'Папуа Новая Гвинея', 'PY' => 'Парагвай', 'PE' => 'Перу', 'PH' => 'Филиппины', 'PL' => 'Польша', 'PT' => 'Португалия', 'PR' => 'Пуэрто-Рико', 'QA' => 'Катар', 'CG' => 'Конго', 'RN' => 'Réunion', 'RO' => 'Румыния', 'RU' => 'Россия', 'RW' => 'Руанда', 'ST' => 'Сан-Томе и Принсипи', 'KN' => 'Сент-Киттс Нэвис Ангуилла', 'LC' => 'Санта Лючия', 'VC' => 'Сент-Висент и Гренадины', 'WS' => 'Самоа', 'SM' => 'Сан-Марино', 'SA' => 'Саудовская Аравия', 'XS' => 'Шотландия', 'SN' => 'Сенегал', 'RS' => 'Сербии', 'SC' => 'Сейшеллы', 'SL' => 'Сьерра-Леоне', 'SG' => 'Сингапур', 'SK' => 'Словакия', 'SI' => 'Словения', 'SB' => 'Соломоновы острова', 'SO' => 'Сомали', 'ZA' => 'Южная Африка', 'KR' => 'Южная Корея', 'ES' => 'Испания', 'LK' => 'Шри Ланка', 'SD' => 'Судан', 'SR' => 'Суринам', 'SZ' => 'Свазиленд', 'SE' => 'Швеция', 'CH' => 'Швейцария', 'SY' => 'Сирия', 'TW' => 'Тайвань', 'TJ' => 'Таджикистан', 'TZ' => 'Танзания', 'TH' => 'Таиланд', 'TL' => 'Восточный Тимор', 'TG' => 'Того', 'TO' => 'Тонга', 'TT' => 'Тринидад и Тобаго', 'TN' => 'Тунис', 'TR' => 'Турция', 'TM' => 'Туркменистан', 'TV' => 'Тувалу', 'VI' => 'Вирджинские острова (США)', 'UG' => 'Уганда', 'UA' => 'Украина', 'AE' => 'Объединенные Арабские Эмираты', 'GB' => 'Великобритания', 'US' => 'США', 'UY' => 'Uruguay', 'UZ' => 'Узбекистан', 'VU' => 'Вануату', 'VA' => 'Ватикан', 'VE' => 'Венесуэла', 'VN' => 'Вьетнам', 'XW' => 'Уэльс', 'YE' => 'Йемен', 'ZM' => 'Замбия', 'ZW' => 'Зимбабве' );
179
- $em_countries_array_i18n['sv'] = array ('AF' => 'Afghanistan', 'AL' => 'Albanien', 'DZ' => 'Algeriet', 'AS' => 'Amerikanska Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarktis', 'AG' => 'Antigua och Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenien', 'AW' => 'Aruba', 'AU' => 'Australien', 'AT' => 'Österrike', 'AZ' => 'Azerbajdzjan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Vitryssland', 'BE' => 'Belgien', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnien och Hercegovina', 'BW' => 'Botswana', 'BR' => 'Brasilien', 'VG' => 'Brittiska Jungfruöarna', 'BN' => 'Brunei', 'BG' => 'Bulgarien', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Elfenbenskusten', 'KH' => 'Kambodja', 'CM' => 'Kamerun', 'CA' => 'Kanada', 'CV' => 'Kap Verde', 'KY'=>'Caymanöarna', 'CF' => 'Centralafrikanska republiken', 'TD' => 'Tchad', 'CL' => 'Chile', 'CN' => 'Kina', 'CO' => 'Colombia', 'KM' => 'Komorerna', 'CR' => 'Costa Rica', 'HR' => 'Kroatien', 'CU' => 'Kuba', 'CY' => 'Cypern', 'CZ' => 'Tjeckien', 'KP' => 'Nordkorea', 'CD' => 'Demokratiska republiken Kongo', 'DK' => 'Danmark', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominikanska republiken', 'EC' => 'Ecuador', 'EG' => 'Egypten', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Ekvatorialguinea', 'ER' => 'Eritrea', 'EE' => 'Estland', 'ET' => 'Etiopien', 'FJ' => 'Fiji', 'FI' => 'Finland', 'FR' => 'Frankrike', 'PF' => 'Franska Polynesien', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgien', 'DE' => 'Tyskland', 'GH' => 'Ghana', 'GR' => 'Grekland', 'GL' => 'Grönland', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Ungern', 'IS' => 'Island', 'IN' => 'Indien', 'ID' => 'Indonesien', 'IR' => 'Iran', 'IQ' => 'Irak', 'IE' => 'Irland', 'IL' => 'Israel', 'IT' => 'Italien', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JO' => 'Jordanien', 'KZ' => 'Kazakstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kirgizistan', 'LA' => 'Laos', 'LV' => 'Lettland', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libyen', 'LI' => 'Liechtenstein', 'LT' => 'Litauen', 'LU' => 'Luxemburg', 'MO' => 'Macao', 'MK' => 'Makedonien', 'MG' => 'Madagaskar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Maldiverna', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshallöarna', 'MQ' => 'Martinique', 'MU' => 'Mauritius', 'MR' => 'Mauretanien', 'MX' => 'Mexiko', 'FM' => 'Mikronesien', 'MD' => 'Moldavien', 'MC' => 'Monaco', 'MN' => 'Mongoliet', 'ME' => 'Montenegro', 'MA' => 'Marocko', 'MZ' => 'Moçambique', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Nederländerna', 'AN' => 'Nederländska Antillerna', 'NC' => 'Nya Kaledonien', 'NZ' => 'Nya Zeeland', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Nordmarianerna', 'NO' => 'Norge', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papua Nya Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Filippinerna', 'PL' => 'Polen', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'CG' => 'Kongo', 'RN' => 'Réunion', 'RO' => 'Rumänien', 'RU' => 'Ryssland', 'RW' => 'Rwanda', 'ST' => 'São Tomé och Príncipe', 'KN' => ' Saint Christopher och Nevis', 'LC' => 'Saint Lucia', 'VC' => 'Saint Vincent och Grenadinerna', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saudiarabien', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychellerna', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovakien', 'SI' => 'Slovenien', 'SB' => 'Salomonöarna', 'SO' => 'Somalia', 'ZA' => 'Sydafrika', 'KR' => 'Sydkorea', 'ES' => 'Spanien', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Surinam', 'SZ' => 'Swaziland', 'SE' => 'Sverige', 'CH' => 'Schweiz', 'SY' => 'Syrien', 'TW' => 'Taiwan', 'TJ' => 'Tadzjikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailand', 'TL' => 'Timor-Leste', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad och Tobago', 'TN' => 'Tunisien', 'TR' => 'Turkiet', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'Amerikanska Jungfruöarna', 'UG' => 'Uganda', 'UA' => 'Ukraina', 'AE' => 'Förenade Arabemiraten', 'GB' => 'Förenade kungariket', 'US' => 'Förenta staterna', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VA' => ' Heliga stolen', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' );
180
- $em_countries_array_i18n['en'] = array ('AF' => 'Afghanistan', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AS' => 'American Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarctica', 'AG' => 'Antigua and Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Austria', 'AZ' => 'Azerbaijan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgium', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnia and Herzegovina', 'BW' => 'Botswana', 'BR' => 'Brazil', 'VG' => 'British Virgin Islands', 'BN' => 'Brunei', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'C&ocirc;te D\'Ivoire', 'KH' => 'Cambodia', 'CM' => 'Cameroon', 'CA' => 'Canada', 'CV' => 'Cape Verde', 'KY'=>'Cayman Islands', 'CF' => 'Central African Republic', 'TD' => 'Chad', 'CL' => 'Chile', 'CN' => 'China', 'CO' => 'Colombia', 'KM' => 'Comoros', 'CR' => 'Costa Rica', 'HR' => 'Croatia', 'CU' => 'Cuba', 'CY' => 'Cyprus', 'CZ' => 'Czech Republic', 'KP' => 'Democratic People\'s Republic of Korea', 'CD' => 'Democratic Republic of the Congo', 'DK' => 'Denmark', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominican Republic', 'EC' => 'Ecuador', 'EG' => 'Egypt', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Equatorial Guinea', 'ER' => 'Eritrea', 'EE' => 'Estonia', 'ET' => 'Ethiopia', 'FJ' => 'Fiji', 'FI' => 'Finland', 'FR' => 'France', 'PF' => 'French Polynesia', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgia', 'DE' => 'Germany', 'GH' => 'Ghana', 'GR' => 'Greece', 'GL' => 'Greenland', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hungary', 'IS' => 'Iceland', 'IN' => 'India', 'ID' => 'Indonesia', 'IR' => 'Iran', 'IQ' => 'Iraq', 'IE' => 'Ireland', 'IL' => 'Israel', 'IT' => 'Italy', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JO' => 'Jordan', 'KZ' => 'Kazakhstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kyrgyzstan', 'LA' => 'Laos', 'LV' => 'Latvia', 'LB' => 'Lebanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libya', 'LI' => 'Liechtenstein', 'LT' => 'Lithuania', 'LU' => 'Luxembourg', 'MO' => 'Macao', 'MK' => 'Macedonia', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Maldives', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshall Islands', 'MQ' => 'Mauritania', 'MU' => 'Mauritius', 'MR' => 'Mauritania', 'MX' => 'Mexico', 'FM' => 'Micronesia', 'MD' => 'Moldova', 'MC' => 'Monaco', 'MN' => 'Mongolia', 'ME' => 'Montenegro', 'MA' => 'Morocco', 'MZ' => 'Mozambique', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Netherlands', 'AN' => 'Netherlands Antilles', 'NC' => 'New Caledonia', 'NZ' => 'New Zealand', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Northern Mariana Islands', 'NO' => 'Norway', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papua New Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Philippines', 'PL' => 'Poland', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Romania', 'RU' => 'Russia', 'RW' => 'Rwanda', 'ST' => 'S&agrave;o Tom&eacute; And Pr&iacute;ncipe', 'KN' => 'Saint Kitts and Nevis', 'LC' => 'Saint Lucia', 'VC' => 'Saint Vincent and the Grenadines', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saudi Arabia', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychelles', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovakia', 'SI' => 'Slovenia', 'SB' => 'Solomon Islands', 'SO' => 'Somalia', 'ZA' => 'South Africa', 'KR' => 'South Korea', 'ES' => 'Spain', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SZ' => 'Swaziland', 'SE' => 'Sweden', 'CH' => 'Switzerland', 'SY' => 'Syria', 'TW' => 'Taiwan', 'TJ' => 'Tajikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailand', 'TL' => 'Timor-Leste', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad and Tobago', 'TN' => 'Tunisia', 'TR' => 'Turkey', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'US Virgin Islands', 'UG' => 'Uganda', 'UA' => 'Ukraine', 'AE' => 'United Arab Emirates', 'GB' => 'United Kingdom', 'US' => 'United States', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vatican', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' );
181
- $em_countries_array_i18n['fi'] = array ('AF' => 'Afghanistan', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AS' => 'Amerikan Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarctica', 'AG' => 'Antigua ja Barbuda', 'AR' => 'Argentiina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Itävalta', 'AZ' => 'Azerbaidžan', 'BS' => 'Bahama', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Valko-Venäjä', 'BE' => 'Belgia', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnia ja Hertsegovina', 'BW' => 'Botswana', 'BR' => 'Brasilia', 'VG' => 'Brittiläiset Neitsytsaaret', 'BN' => 'Brunei', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Norsunluurannikko', 'KH' => 'Kambodža', 'CM' => 'Kamerun', 'CA' => 'Kanada', 'CV' => 'Kap Verde', 'KY'=>'Caymansaaret', 'CF' => 'Keski-Afrikan tasavalta', 'TD' => 'Tšad', 'CL' => 'Chile', 'CN' => 'Kiina', 'CO' => 'Kolumbia', 'KM' => 'Komorit', 'CR' => 'Costa Rica', 'HR' => 'Kroatia', 'CU' => 'Kuuba', 'CY' => 'Kypros', 'CZ' => 'Tšekki', 'KP' => 'Korean demokraattinen kansantasavalta', 'CD' => 'Kongon demokraattinen tasavalta', 'DK' => 'Tanska', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominikaaninen tasavalta', 'EC' => 'Ecuador', 'EG' => 'Egypti', 'SV' => 'El Salvador', 'XE' => 'Englanti', 'GQ' => 'Päiväntasaajan Guinea', 'ER' => 'Eritrea', 'EE' => 'Estonia', 'ET' => 'Etiopia', 'FJ' => 'Fiji', 'FI' => 'Suomi', 'FR' => 'Ranska', 'PF' => 'Ranskan Polynesia', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgia', 'DE' => 'Saksa', 'GH' => 'Ghana', 'GR' => 'Kreikka', 'GL' => 'Grönlanti', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Unkari', 'IS' => 'Islanti', 'IN' => 'Intia', 'ID' => 'Indonesia', 'IR' => 'Iran', 'IQ' => 'Irak', 'IE' => 'Irlanti', 'IL' => 'Israel', 'IT' => 'Italia', 'JE'=>'Jersey', 'JM' => 'Jamaika', 'JP' => 'Japani', 'JO' => 'Jordania', 'KZ' => 'Kazakstan', 'KE' => 'Kenia', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kirgisistan', 'LA' => 'Laos', 'LV' => 'Latvia', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libya', 'LI' => 'Liechtenstein', 'LT' => 'Lietua', 'LU' => 'Luxemburg', 'MO' => 'Macao', 'MK' => 'Makedonia', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malesia', 'MV' => 'Maldiivit', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshallinsaaret', 'MQ' => 'Mauritania', 'MU' => 'Mauritius', 'MR' => 'Mauritania', 'MX' => 'Mexico', 'FM' => 'Micronesia', 'MD' => 'Moldova', 'MC' => 'Monaco', 'MN' => 'Mongolia', 'ME' => 'Montenegro', 'MA' => 'Morokko', 'MZ' => 'Mozambik', 'MM' => 'Myanmar', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Alankomaat', 'AN' => 'Alankomaiden Antillit', 'NC' => 'Uusi-Kaledonia', 'NZ' => 'Uusi-Seelanti', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Pohjois-Irlanti', 'MP' => 'Pohjois-Mariaanit', 'NO' => 'Norja', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestina', 'PA' => 'Panama', 'PG' => 'Papua Uusi-Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Filippiinit', 'PL' => 'Puola', 'PT' => 'Portugali', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'CG' => 'Kongo', 'RN' => 'Réunion', 'RO' => 'Romania', 'RU' => 'Venäjä', 'RW' => 'Ruanda', 'ST' => 'São Tomé ja Príncipe', 'KN' => 'Saint Kitts jad Nevis', 'LC' => 'Saint Lucia', 'VC' => 'Saint Vincent ja Grenadiinit', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saudi Arabia', 'XS' => 'Skotlanti', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychelles', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovakia', 'SI' => 'Slovenia', 'SB' => 'Salomonsaaret', 'SO' => 'Somalia', 'ZA' => 'Etelä-Afrikka', 'KR' => 'Etelä Korea', 'ES' => 'Espanja', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SZ' => 'Swazimaa', 'SE' => 'Ruotsi', 'CH' => 'Sveitsi', 'SY' => 'Syria', 'TW' => 'Taiwan', 'TJ' => 'Tadžikistan', 'TZ' => 'Tansania', 'TH' => 'Thaimaa', 'TL' => 'Itä Timor', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad ja Tobago', 'TN' => 'Tunisia', 'TR' => 'Turkki', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'Yhdysvaltain Neitsytsaaret', 'UG' => 'Uganda', 'UA' => 'Ukraina', 'AE' => 'Arabiemiirikunnat', 'GB' => 'Yhdistynyt kuningaskunta', 'US' => 'Yhdysvallat', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vatikaani', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Yemen', 'ZM' => 'Sambia', 'ZW' => 'Zimbabwe' );
182
  $lang = substr(get_locale(), 0, 2);
183
  if( array_key_exists($lang, $em_countries_array_i18n) ){
184
  $em_countries_array = $em_countries_array_i18n[$lang];
@@ -226,12 +226,12 @@ function em_get_currencies(){
226
  return apply_filters('em_get_currencies',$currencies);
227
  }
228
 
229
- function em_get_currency_formatted($price, $currency=false, $format=false){
230
  $formatted_price = '';
231
  if(!$format) $format = get_option('dbem_bookings_currency_format','@#');
232
  if(!$currency) $currency = get_option('dbem_bookings_currency');
233
  $formatted_price = str_replace('@', em_get_currency_symbol(true,$currency), $format);
234
- $formatted_price = str_replace('#', number_format( $price, 2, get_option('dbem_bookings_currency_decimal_point','.'), get_option('dbem_bookings_currency_thousands_sep',',') ), $formatted_price);
235
  return apply_filters('em_get_currency_formatted', $formatted_price, $price, $currency, $format);
236
  }
237
 
166
  global $em_countries_array;
167
  if( !is_array($em_countries_array) ){
168
  $em_countries_array_i18n = array();
169
+ $em_countries_array_i18n['cs'] = array ('AF' => 'Afghanistan', 'AL' => 'Albánie', 'DZ' => 'Alžírsko', 'AS' => 'Americká Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarctica', 'AG' => 'Antigua a Barbuda', 'AR' => 'Argentina', 'AM' => 'Arménie', 'AW' => 'Aruba', 'AU' => 'Austrálie', 'AT' => 'Rakousko', 'AZ' => 'Ázerbájdžán', 'BS' => 'Bahamy', 'BH' => 'Bahrajn', 'BD' => 'Bangladéš', 'BB' => 'Barbados', 'BY' => 'Belorusko', 'BE' => 'Belgie', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhútán', 'BO' => 'Bolívie', 'BA' => 'Bosna a Hercegovina', 'BW' => 'Botswana', 'BR' => 'Brazílie', 'VG' => 'Britské Panenské ostrovy', 'BN' => 'Brunej', 'BG' => 'Bulharsko', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Pobreží slonoviny', 'KH' => 'Kambodža', 'CM' => 'Kamerun', 'CA' => 'Kanada', 'CV' => 'Kapverdy', 'KY'=>'Kajmanské ostrovy', 'CF' => 'Stredoafrická republika', 'TD' => 'Cad', 'CL' => 'Chile', 'CN' => 'Cína', 'CO' => 'Kolumbie', 'KM' => 'Komory', 'CR' => 'Kostarika', 'HR' => 'Chorvatsko', 'CU' => 'Kuba', 'CY' => 'Kypr', 'CZ' => 'Česká republika', 'KP' => 'Severní Korea', 'CD' => 'Democratic Republic of the Congo', 'DK' => 'Dánsko', 'DJ' => 'Džibuti', 'DM' => 'Dominika', 'DO' => 'Dominikánská republika', 'EC' => 'Ekvádor', 'EG' => 'Egypt', 'SV' => 'Salvador', 'XE' => 'England', 'GQ' => 'Rovníková Guinea', 'ER' => 'Eritrea', 'EE' => 'Estonsko', 'ET' => 'Etiopie','FO' => 'Faerské','FJ' => 'Fidži', 'FI' => 'Finsko', 'FR' => 'Francie', 'PF' => 'Francouzská Polynésie', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Gruzie', 'DE' => 'Nemecko', 'GH' => 'Ghana', 'GR' => 'Recko', 'GL' => 'Grónsko', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guiné-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Madarsko', 'IS' => 'Island', 'IN' => 'Indie', 'ID' => 'Indonésie', 'IR' => 'Írán', 'IQ' => 'Irák', 'IE' => 'Irsko', 'IL' => 'Izrael', 'IT' => 'Itálie', 'JE'=>'Jersey', 'JM' => 'Jamajka', 'JP' => 'Japonsko', 'JO' => 'Jordánsko', 'KZ' => 'Kazachstán', 'KE' => 'Kena', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuvajt', 'KG' => 'Kyrgyzstán', 'LA' => 'Laos', 'LV' => 'Lotyšsko', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Libérie', 'LY' => 'Libye', 'LI' => 'Lichtenštejnsko', 'LT' => 'Litva', 'LU' => 'Lucembursko', 'MO' => 'Macao', 'MK' => 'Makedonie', 'MG' => 'Madagaskar', 'MW' => 'Malawi', 'MY' => 'Malajsie', 'MV' => 'Maledivy', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshallovy ostrovy', 'MQ' => 'Martinik', 'MU' => 'Mauricius', 'MR' => 'Mauritánie', 'MX' => 'Mexiko', 'FM' => 'Micronésie', 'MD' => 'Moldávie', 'MC' => 'Monako', 'MN' => 'Mongolsko', 'ME' => 'Cerná Hora', 'MA' => 'Maroko', 'MZ' => 'Mozambik', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibie', 'NR' => 'Nauru', 'NP' => 'Nepál', 'NL' => 'Holandsko', 'AN' => 'Nizozemské Antily', 'NC' => 'Nová Kaledonie', 'NZ' => 'Nový Zéland', 'NI' => 'Nikaragua', 'NE' => 'Niger', 'NG' => 'Nigérie', 'XI' => 'Northern Ireland', 'MP' => 'Severní Mariany', 'NO' => 'Norsko', 'OM' => 'Omán', 'PK' => 'Pákistán', 'PW' => 'Palau', 'PS' => 'Palestina', 'PA' => 'Panama', 'PG' => 'Papua-Nová Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Filipíny', 'PL' => 'Polsko', 'PT' => 'Portugalsko', 'PR' => 'Portoriko', 'QA' => 'Katar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Rumunsko', 'RU' => 'Rusko', 'RW' => 'Rwanda', 'ST' => 'Svatý Tomáš a Princuv ostrov', 'KN' => 'Svatý Kryštof a Nevis', 'LC' => 'Svatá Lucie', 'VC' => 'Svatý Vincenc a Grenadiny', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saúdská Arábie', 'XS' => 'Skotsko', 'SN' => 'Senegal', 'RS' => 'Srbsko', 'SC' => 'Seychely', 'SL' => 'Sierra Leone', 'SG' => 'Singapur', 'SK' => 'Slovensko', 'SI' => 'Slovinsko', 'SB' => 'Šalamounovy ostrovy', 'SO' => 'Somálsko', 'ZA' => 'Jihoafrická republika', 'KR' => 'Jižní Korea', 'ES' => 'Španělsko', 'LK' => 'Srí Lanka', 'SD' => 'Súdán', 'SR' => 'Surinam', 'SZ' => 'Svazijsko', 'SE' => 'Švédsko', 'CH' => 'Švýcarsko', 'SY' => 'Sýrie', 'TW' => 'Tchaj-wan', 'TJ' => 'Tádžikistán', 'TZ' => 'Tanzanie', 'TH' => 'Thajsko', 'TL' => 'Východní Timor', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad a Tobago', 'TN' => 'Tunisko', 'TR' => 'Turecko', 'TM' => 'Turkmenistán', 'TV' => 'Tuvalu', 'VI' => 'Americké Panenské ostrovy', 'UG' => 'Uganda', 'UA' => 'Ukrajina', 'AE' => 'Spojené arabské emiráty', 'GB' => 'Spojené království', 'US' => 'Spojené státy', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistán', 'VU' => 'Nové Hebridy', 'VA' => 'Vatikán', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Jemen', 'ZM' => 'Zambie', 'ZW' => 'Zimbabwe' );
170
+ $em_countries_array_i18n['da'] = array ('AF' => 'Afghanistan', 'AL' => 'Albanien', 'DZ' => 'Algeriet', 'AS' => 'Amerikansk Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarktis', 'AG' => 'Antigua og Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenien', 'AW' => 'Aruba', 'AU' => 'Australien', 'AT' => 'Østrig', 'AZ' => 'Aserbajdsjan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgien', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnien-Hercegovina', 'BW' => 'Botswana', 'BR' => 'Brasilien', 'VG' => 'De Britiske Jomfruøer', 'BN' => 'Brunei', 'BG' => 'Bulgarien', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Côte d\'Ivoire', 'KH' => 'Cambodja', 'CM' => 'Cameroun', 'CA' => 'Canada', 'CV' => 'Kap Verde', 'KY'=>'Caymanøerne', 'CF' => 'Den Centralafrikanske Republik', 'TD' => 'Tchad', 'CL' => 'Chile', 'CN' => 'Kina', 'CO' => 'Colombia', 'KM' => 'Comorerne', 'CR' => 'Costa Rica', 'HR' => 'Kroatien', 'CU' => 'Cuba', 'CY' => 'Cypern', 'CZ' => 'Tjekkiet', 'KP' => 'Nordkorea', 'CD' => 'Congo', 'DK' => 'Danmark', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Den Dominikanske Republik', 'EC' => 'Ecuador', 'EG' => 'Egypten', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Ækvatorialguinea', 'ER' => 'Eritrea', 'EE' => 'Estland', 'ET' => 'Etiopien','FO' => 'Færøerne', 'FJ' => 'Fiji', 'FI' => 'Finland', 'FR' => 'Frankrig', 'PF' => 'Fransk Polynesien', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgien', 'DE' => 'Tyskland', 'GH' => 'Ghana', 'GR' => 'Grækenland', 'GL' => 'Grønland (Kalaallit Nunaat)', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hongkong', 'HU' => 'Ungarn', 'IS' => 'Island', 'IN' => 'Indien', 'ID' => 'Indonesien', 'IR' => 'Iran', 'IQ' => 'Irak', 'IE' => 'Irland', 'IL' => 'Israel', 'IT' => 'Italien', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JO' => 'Jordan', 'KZ' => 'Kasakhstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kirgisistan', 'LA' => 'Laos', 'LV' => 'Letland', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libyen', 'LI' => 'Liechtenstein', 'LT' => 'Litauen', 'LU' => 'Luxembourg', 'MO' => 'Macao', 'MK' => 'Makedonien', 'MG' => 'Madagaskar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Maldiverne', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshalløerne', 'MQ' => 'Martinique', 'MU' => 'Mauritius', 'MR' => 'Mauretanien', 'MX' => 'Mexico', 'FM' => 'Mikronesien', 'MD' => 'Moldova', 'MC' => 'Monaco', 'MN' => 'Mongoliet', 'ME' => 'Montenegro', 'MA' => 'Marokko', 'MZ' => 'Mozambique', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Nederlandene', 'AN' => 'De Nederlandske Antiller', 'NC' => 'Ny Kaledonien', 'NZ' => 'New Zealand', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Nordmarianerne', 'NO' => 'Norge', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papua Ny Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Filippinerne', 'PL' => 'Polen', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Rumænien', 'RU' => 'Rusland', 'RW' => 'Rwanda', 'ST' => 'São Tomé og Príncipe', 'KN' => 'Saint Kitts og Nevis', 'LC' => 'Saint Lucia', 'VC' => 'Saint Vincent og Grenadinerne', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saudi-Arabien', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychellerne', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovakiet', 'SI' => 'Slovenien', 'SB' => 'Salomonøerne', 'SO' => 'Somalia', 'ZA' => 'Sydafrika', 'KR' => 'Sydkorea', 'ES' => 'Spanien', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Surinam', 'SZ' => 'Swaziland', 'SE' => 'Sverige', 'CH' => 'Schweiz', 'SY' => 'Syrien', 'TW' => 'Taiwan', 'TJ' => 'Tadsjikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailand', 'TL' => 'Østtimor', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad og Tobago', 'TN' => 'Tunesien', 'TR' => 'Tyrkiet', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'De Amerikanske Jomfruøer', 'UG' => 'Uganda', 'UA' => 'Ukraine', 'AE' => 'De Forenede Arabiske Emirater', 'GB' => 'Det Forenede Kongerige', 'US' => 'USA', 'UY' => 'Uruguay', 'UZ' => 'Usbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vatikanstaten', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' );
171
+ $em_countries_array_i18n['es'] = array ('AF' => 'Afganistán', 'AL' => 'Albania', 'DZ' => 'Argelia', 'AS' => 'Samoa Americana', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antártida', 'AG' => 'Antigua y Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Austria', 'AZ' => 'Azerbaiyán', 'BS' => 'Bahamas', 'BH' => 'Bahráin', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Bielorrusia', 'BE' => 'Bélgica', 'BZ' => 'Belice', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bután', 'BO' => 'Bolivia', 'BA' => 'Bosnia y Hercegovina', 'BW' => 'Botsuana', 'BR' => 'Brasil', 'VG' => 'Islas Vírgenes Británicas', 'BN' => 'Brunéi', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Costa de Marfil', 'KH' => 'Camboya', 'CM' => 'Camerún', 'CA' => 'Canadá', 'CV' => 'Cabo Verde', 'KY'=>'Islas Caimán', 'CF' => 'República Centroafricana', 'TD' => 'Chad', 'CL' => 'Chile', 'CN' => 'China', 'CO' => 'Colombia', 'KM' => 'Comoras', 'CR' => 'Costa Rica', 'HR' => 'Croacia', 'CU' => 'Cuba', 'CY' => 'Chipre', 'CZ' => 'República Checa', 'KP' => 'Corea del Norte', 'CD' => 'República Democrática del Congo', 'DK' => 'Dinamarca', 'DJ' => 'Yibuti', 'DM' => 'Dominica', 'DO' => 'República Dominicana', 'EC' => 'Ecuador', 'EG' => 'Egipto', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Guinea Ecuatorial', 'ER' => 'Eritrea','FO' => 'Islas Faroe', 'EE' => 'Estonia', 'ET' => 'Etiopía', 'FJ' => 'Fiyi', 'FI' => 'Finlandia', 'FR' => 'Francia', 'PF' => 'Polinesia Francesa', 'GA' => 'Gabón', 'GM' => 'Gambia', 'GE' => 'Georgia', 'DE' => 'Alemania', 'GH' => 'Ghana', 'GR' => 'Grecia', 'GL' => 'Groenlandia', 'GD' => 'Granada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haití', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hungría', 'IS' => 'Islandia', 'IN' => 'India', 'ID' => 'Indonesia', 'IR' => 'Irán', 'IQ' => 'Iraq', 'IE' => 'Irlanda', 'IL' => 'Israel', 'IT' => 'Italia', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japón', 'JO' => 'Jordania', 'KZ' => 'Kazajistán', 'KE' => 'Kenia', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kirguizistán', 'LA' => 'Laos', 'LV' => 'Letonia', 'LB' => 'Líbano', 'LS' => 'Lesoto', 'LR' => 'Liberia', 'LY' => 'Libia', 'LI' => 'Liechtenstein', 'LT' => 'Lituania', 'LU' => 'Luxemburgo', 'MO' => 'Macao', 'MK' => 'Macedonia', 'MG' => 'Madagascar', 'MW' => 'Malaui', 'MY' => 'Malasia', 'MV' => 'Maldivas', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Islas Marshall', 'MQ' => 'Martinica', 'MU' => 'Mauricio', 'MR' => 'Mauritania', 'MX' => 'México', 'FM' => 'Micronesia', 'MD' => 'Moldavia', 'MC' => 'Mónaco', 'MN' => 'Mongolia', 'ME' => 'Montenegro', 'MA' => 'Marruecos', 'MZ' => 'Mozambique', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Países Bajos', 'AN' => 'Antillas Neerlandesas', 'NC' => 'Nueva Caledonia', 'NZ' => 'Nueva Zelanda', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Islas Marianas del Norte', 'NO' => 'Noruega', 'OM' => 'Omán', 'PK' => 'Pakistán', 'PW' => 'Palaos', 'PS' => 'Palestine', 'PA' => 'Panamá', 'PG' => 'Papúa-Nueva Guinea', 'PY' => 'Paraguay', 'PE' => 'Perú', 'PH' => 'Filipinas', 'PL' => 'Polonia', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Rumania', 'RU' => 'Russia', 'RW' => 'Ruanda', 'ST' => 'Santo Tomé y Príncipe', 'KN' => 'San Cristóbal y Nieves', 'LC' => 'Santa Lucía', 'VC' => 'San Vicente y las Granadinas', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Arabia Saudí', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychelles', 'SL' => 'Sierra Leona', 'SG' => 'Singapur', 'SK' => 'Eslovaquia', 'SI' => 'Eslovenia', 'SB' => 'Islas Salomón', 'SO' => 'Somalia', 'ZA' => 'Sudáfrica', 'KR' => 'Corea del Sur', 'ES' => 'España', 'LK' => 'Sri Lanka', 'SD' => 'Sudán', 'SR' => 'Surinam', 'SZ' => 'Suazilandia', 'SE' => 'Suecia', 'CH' => 'Suiza', 'SY' => 'Siria', 'TW' => 'Taiwán', 'TJ' => 'Tayikistán', 'TZ' => 'Tanzania', 'TH' => 'Tailandia', 'TL' => 'Timor Oriental', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad y Tobago', 'TN' => 'Túnez', 'TR' => 'Turquía', 'TM' => 'Turkmenistán', 'TV' => 'Tuvalu', 'VI' => 'Islas Vírgenes Americanas', 'UG' => 'Uganda', 'UA' => 'Ucrania', 'AE' => 'Emiratos Árabes Unidos', 'GB' => 'Reino Unido', 'US' => 'Estados Unidos', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistán', 'VU' => 'Vanuatu', 'VA' => 'El Vaticano', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabue' );
172
+ $em_countries_array_i18n['fr'] = array ('AF' => 'Afghanistan', 'AL' => 'Albanie', 'DZ' => 'Algérie', 'AS' => 'Samoa américaines', 'AD' => 'Andorre', 'AO' => 'Angola', 'AQ' => 'Antarctique', 'AG' => 'Antigua-et-Barbuda', 'AR' => 'Argentine', 'AM' => 'Arménie', 'AW' => 'Aruba', 'AU' => 'Australie', 'AT' => 'Autriche', 'AZ' => 'Azerbaïdjan', 'BS' => 'Bahamas', 'BH' => 'Bahreïn', 'BD' => 'Bangladesh', 'BB' => 'Barbade', 'BY' => 'Biélorussie', 'BE' => 'Belgique', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Bénin', 'BT' => 'Bhoutan', 'BO' => 'Bolivie', 'BA' => 'Bosnie-Herzégovine', 'BW' => 'Botswana', 'BR' => 'Brésil', 'VG' => 'Iles Vierges britanniques', 'BN' => 'Brunei', 'BG' => 'Bulgarie', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'C&ocirc;te D\'Ivoire', 'KH' => 'Cambodge', 'CM' => 'Cameroun', 'CA' => 'Canada', 'CV' => 'Cap-Vert', 'KY'=>'Iles Cayman', 'CF' => 'République centrafricaine', 'TD' => 'Tchad', 'CL' => 'Chili', 'CN' => 'Chine', 'CO' => 'Colombie', 'KM' => 'Comores', 'CR' => 'Costa Rica', 'HR' => 'Croatie', 'CU' => 'Cuba', 'CY' => 'Chypre', 'CZ' => 'République tchèque', 'KP' => 'Corée du Nord', 'CD' => 'République démocratique du Congo', 'DK' => 'Danemark', 'DJ' => 'Djibouti', 'DM' => 'Dominique', 'DO' => 'République dominicaine', 'EC' => 'Équateur', 'EG' => 'Égypte', 'SV' => 'Salvador', 'XE' => 'England', 'GQ' => 'Guinée équatoriale', 'ER' => 'Érythrée', 'EE' => 'Estonie', 'ET' => 'Éthiopie','FO' => 'Îles Féroé', 'FJ' => 'Iles Fidji', 'FI' => 'Finlande', 'FR' => 'France', 'PF' => 'Polynésie française', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Géorgie', 'DE' => 'Allemagne', 'GH' => 'Ghana', 'GR' => 'Grèce', 'GL' => 'Groenland', 'GD' => 'Grenade', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinée', 'GW' => 'Guinée-Bissao', 'GY' => 'Guyana', 'HT' => 'Haïti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hongrie', 'IS' => 'Islande', 'IN' => 'Inde', 'ID' => 'Indonésie', 'IR' => 'Iran', 'IQ' => 'Iraq', 'IE' => 'Irlande', 'IL' => 'Israël', 'IT' => 'Italie', 'JE'=>'Jersey', 'JM' => 'Jamaïque', 'JP' => 'Japon', 'JO' => 'Jordanie', 'KZ' => 'Kazakhstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Koweït', 'KG' => 'Kirghizistan', 'LA' => 'Laos', 'LV' => 'Lettonie', 'LB' => 'Liban', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libye', 'LI' => 'Liechtenstein', 'LT' => 'Lituanie', 'LU' => 'Luxembourg', 'MO' => 'Macao', 'MK' => 'Macédoine', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malaisie', 'MV' => 'Maldives', 'ML' => 'Mali', 'MT' => 'Malte', 'MH' => 'Iles Marshall', 'MQ' => 'Martinique', 'MU' => 'Maurice', 'MR' => 'Mauritanie', 'MX' => 'Mexique', 'FM' => 'Micronésie', 'MD' => 'Moldavie', 'MC' => 'Monaco', 'MN' => 'Mongolie', 'ME' => 'Montenegro', 'MA' => 'Maroc', 'MZ' => 'Mozambique', 'MM' => 'le Myanmar', 'NA' => 'Namibie', 'NR' => 'Nauru', 'NP' => 'Népal', 'NL' => 'Pays-Bas', 'AN' => 'Antilles néerlandaises', 'NC' => 'Nouvelle-Calédonie', 'NZ' => 'Nouvelle-Zélande', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Mariannes du Nord', 'NO' => 'Norvège', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papouasie-Nouvelle-Guinée', 'PY' => 'Paraguay', 'PE' => 'Pérou', 'PH' => 'Philippines', 'PL' => 'Pologne', 'PT' => 'Portugal', 'PR' => 'Porto Rico', 'QA' => 'Qatar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Roumanie', 'RU' => 'Russie', 'RW' => 'Rwanda', 'ST' => 'Sao Tomé-et-Principe', 'KN' => 'Saint-Christophe-et-Niévès', 'LC' => 'Sainte-Lucie', 'VC' => 'Saint-Vincent-et-les-Grenadines', 'WS' => 'Samoa', 'SM' => 'Saint-Marin', 'SA' => 'Arabie saoudite', 'XS' => 'Scotland', 'SN' => 'Sénégal', 'RS' => 'Serbia', 'SC' => 'Seychelles', 'SL' => 'Sierra Leone', 'SG' => 'Singapour', 'SK' => 'Slovaquie', 'SI' => 'Slovénie', 'SB' => 'Iles Salomon', 'SO' => 'Somalie', 'ZA' => 'Afrique du Sud', 'KR' => 'Corée du Sud', 'ES' => 'Espagne', 'LK' => 'Sri Lanka', 'SD' => 'Soudan', 'SR' => 'Suriname', 'SZ' => 'Swaziland', 'SE' => 'Suède', 'CH' => 'Suisse', 'SY' => 'Syrie', 'TW' => 'Taïwan', 'TJ' => 'Tadjikistan', 'TZ' => 'Tanzanie', 'TH' => 'Thaïlande', 'TL' => 'Timor Oriental', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinité-et-Tobago', 'TN' => 'Tunisie', 'TR' => 'Turquie', 'TM' => 'Turkménistan', 'TV' => 'Tuvalu', 'VI' => 'Iles Vierges américaines', 'UG' => 'Ouganda', 'UA' => 'Ukraine', 'AE' => 'Émirats arabes unis', 'GB' => 'Royaume-Uni', 'US' => 'États-Unis', 'UY' => 'Uruguay', 'UZ' => 'Ouzbékistan', 'VU' => 'Vanuatu', 'VA' => 'Saint-Siège', 'VE' => 'Venezuela', 'VN' => 'Viêt Nam', 'XW' => 'Wales', 'YE' => 'Yémen', 'ZM' => 'Zambie', 'ZW' => 'Zimbabwe' );
173
+ $em_countries_array_i18n['de'] = array ('AF' => 'Afghanistan', 'AL' => 'Albanien', 'DZ' => 'Algerien', 'AS' => 'Amerikanisch-Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarktis', 'AG' => 'Antigua und Barbuda', 'AR' => 'Argentinien', 'AM' => 'Armenien', 'AW' => 'Aruba', 'AU' => 'Australien', 'AT' => 'Österreich', 'AZ' => 'Aserbaidschan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesch', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgien', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivien', 'BA' => 'Bosnien und Herzegowina', 'BW' => 'Botsuana', 'BR' => 'Brasilien', 'VG' => 'Britische Jungferninseln', 'BN' => 'Brunei Darussalam', 'BG' => 'Bulgarien', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'C&ocirc;te D\'Ivoire', 'KH' => 'Kambodscha', 'CM' => 'Kamerun', 'CA' => 'Kanada', 'CV' => 'Kap Verde', 'KY'=>'Kaimaninseln', 'CF' => 'Zentralafrikanische Republik', 'TD' => 'Tschad', 'CL' => 'Chile', 'CN' => 'China', 'CO' => 'Kolumbien', 'KM' => 'Komoren', 'CR' => 'Costa Rica', 'HR' => 'Kroatien', 'CU' => 'Kuba', 'CY' => 'Zypern', 'CZ' => 'Tschechische Republik', 'KP' => 'Demokratische Volksrepublik Korea', 'CD' => 'Demokratische Republik Kongo', 'DK' => 'Dänemark', 'DJ' => 'Dschibuti', 'DM' => 'Dominica', 'DO' => 'Dominikanische Republik', 'EC' => 'Ecuador', 'EG' => 'Ägypten', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Äquatorialguinea', 'ER' => 'Eritrea', 'EE' => 'Estland', 'ET' => 'Äthiopien','FO' => 'Färöer Inseln', 'FJ' => 'Fidschi', 'FI' => 'Finnland', 'FR' => 'Frankreich', 'PF' => 'Französisch-Polynesien', 'GA' => 'Gabun', 'GM' => 'Gambia', 'GE' => 'Georgien', 'DE' => 'Deutschland', 'GH' => 'Ghana', 'GR' => 'Griechenland', 'GL' => 'Grönland', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'HongKong', 'HU' => 'Ungarn', 'IS' => 'Island', 'IN' => 'Indien', 'ID' => 'Indonesien', 'IR' => 'Iran', 'IQ' => 'Irak', 'IE' => 'Irland', 'IL' => 'Israel', 'IT' => 'Italien', 'JE'=>'Jersey', 'JM' => 'Jamaika', 'JP' => 'Japan', 'JO' => 'Jordanien', 'KZ' => 'Kasachstan', 'KE' => 'Kenia', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kirgisistan', 'LA' => 'Laos', 'LV' => 'Lettland', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libyen', 'LI' => 'Liechtenstein', 'LT' => 'Litauen', 'LU' => 'Luxemburg', 'MO' => 'Macau', 'MK' => 'Mazedonien', 'MG' => 'Madagaskar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Malediven', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshallinseln', 'MQ' => 'Martinique', 'MU' => 'Mauritius', 'MR' => 'Mauretanien', 'MX' => 'Mexiko', 'FM' => 'Mikronesien', 'MD' => 'Republik Moldau', 'MC' => 'Monaco', 'MN' => 'Mongolei', 'ME' => 'Montenegro', 'MA' => 'Marokko', 'MZ' => 'Mosambik', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Niederlande', 'AN' => 'Niederländische Antillen', 'NC' => 'Neukaledonien', 'NZ' => 'Neuseeland', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Nördliche Marianen', 'NO' => 'Norwegen', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papua-Neuguinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Philippinen', 'PL' => 'Polen', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Katar', 'CG' => 'Kongo', 'RN' => 'Réunion', 'RO' => 'Rumänien', 'RU' => 'Russische Föderation', 'RW' => 'Ruanda', 'ST' => 'São Tomé und Príncipe', 'KN' => 'St. Kitts und Nevis', 'LC' => 'St. Lucia', 'VC' => 'St. Vincent und die Grenadinen', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saudi-Arabien', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychellen', 'SL' => 'Sierra Leone', 'SG' => 'Singapur', 'SK' => 'Slowakei', 'SI' => 'Slowenien', 'SB' => 'Salomonen', 'SO' => 'Somalia', 'ZA' => 'Südafrika', 'KR' => 'Republik Korea', 'ES' => 'Spanien', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SZ' => 'Swasiland', 'SE' => 'Schweden', 'CH' => 'Schweiz', 'SY' => 'Syrien', 'TW' => 'Taiwan', 'TJ' => 'Tadschikistan', 'TZ' => 'Tansania', 'TH' => 'Thailand', 'TL' => 'Osttimor', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad und Tobago', 'TN' => 'Tunesien', 'TR' => 'Türkei', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'Amerikanische Jungferninseln', 'UG' => 'Uganda', 'UA' => 'Ukraine', 'AE' => 'Vereinigte Arabische Emirate', 'GB' => 'Vereinigtes Königreich', 'US' => 'Vereinigte Staaten', 'UY' => 'Uruguay', 'UZ' => 'Usbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vatikanstadt', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Jemen', 'ZM' => 'Sambia', 'ZW' => 'Simbabwe' );
174
+ $em_countries_array_i18n['hu'] = array ('AF' => 'Afganisztán', 'AL' => 'Albánia', 'DZ' => 'Algéria', 'AS' => 'Amerikai Szamoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarktisz', 'AG' => 'Antigua és Barbuda', 'AR' => 'Argentína', 'AM' => 'Örményország', 'AW' => 'Aruba', 'AU' => 'Ausztrália', 'AT' => 'Ausztria', 'AZ' => 'Azerbajdzsán', 'BS' => 'Bahamas', 'BH' => 'Bahrein', 'BD' => 'Banglades', 'BB' => 'Barbados', 'BY' => 'Belorusszia', 'BE' => 'Belgium', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhután', 'BO' => 'Bolívia', 'BA' => 'Bosznia-Hercegovina', 'BW' => 'Botswana', 'BR' => 'Brazília', 'VG' => 'Brit Virgin-szigetek', 'BN' => 'Brunei Darussalam', 'BG' => 'Bulgária', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Côte d\'Ivoire (Elefántcsontpart)', 'KH' => 'Kambodzsa', 'CM' => 'Kamerun', 'CA' => 'Kanada', 'CV' => 'Zöld-foki-szigetek', 'KY'=>'Kajmán-szigetek', 'CF' => 'Közép-Afrikai Köztársaság', 'TD' => 'Csád', 'CL' => 'Chile', 'CN' => 'Kína', 'CO' => 'Kolumbia', 'KM' => 'Comore-szigetek', 'CR' => 'Costa Rica', 'HR' => 'Horvátország', 'CU' => 'Kuba', 'CY' => 'Ciprus', 'CZ' => 'Cseh Köztársaság', 'KP' => 'Koreai Népi Demokratikus Köztársaság', 'CD' => 'Kongói Demokratikus Köztársaság', 'DK' => 'Dánia', 'DJ' => 'Dzsibuti', 'DM' => 'Dominika', 'DO' => 'Dominikai Köztársaság', 'EC' => 'Ecuador', 'EG' => 'Egyiptom', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Egyenlítõi Guinea', 'ER' => 'Eritrea', 'EE' => 'Észtország', 'ET' => 'Etiópia','FO' => 'Faroe Szigetek', 'FJ' => 'Fidzsi', 'FI' => 'Finnország', 'FR' => 'Franciaország', 'PF' => 'Francia Polinézia', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'GrLzia', 'DE' => 'Németország', 'GH' => 'Ghána', 'GR' => 'Görögország', 'GL' => 'Grönland', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Bissau-Guinea', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Magyarország', 'IS' => 'Izland', 'IN' => 'India', 'ID' => 'Indonézia', 'IR' => 'Irán', 'IQ' => 'Irak', 'IE' => 'Írország', 'IL' => 'Izrael', 'IT' => 'Olaszország', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japán', 'JO' => 'Jordánia', 'KZ' => 'Kazahsztán', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuvait', 'KG' => 'Kirgizisztán', 'LA' => 'Lao Népi Demokratikus Köztársaság', 'LV' => 'Litvánia', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Libéria', 'LY' => 'Líbia', 'LI' => 'Liechtenstein', 'LT' => 'Litvánia', 'LU' => 'Luxemburg', 'MO' => 'Makaó', 'MK' => 'Macedónia', 'MG' => 'Madagaszkár', 'MW' => 'Malawi', 'MY' => 'Malajzia', 'MV' => 'Maldív-szigetek', 'ML' => 'Mali', 'MT' => 'Málta', 'MH' => 'Marshall-szigetek', 'MQ' => 'Martinique', 'MU' => 'Mauritius', 'MR' => 'Mauritánia', 'MX' => 'Mexikó', 'FM' => 'Mikronéziai Szövetségi Államok', 'MD' => 'Moldva', 'MC' => 'Monaco', 'MN' => 'Mongólia', 'ME' => 'Montenegro', 'MA' => 'Marokkó', 'MZ' => 'Mozambik', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namíbia', 'NR' => 'Nauru', 'NP' => 'Nepál', 'NL' => 'Hollandia', 'AN' => 'Holland Antillák', 'NC' => 'Új-Kaledónia', 'NZ' => 'Új-Zéland', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigéria', 'XI' => 'Northern Ireland', 'MP' => 'Észak-Mariana-szigetek', 'NO' => 'Norvégia', 'OM' => 'Omán', 'PK' => 'Pakisztán', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Pápua Új-Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Fülöp-szigetek', 'PL' => 'Lengyelország', 'PT' => 'Portugália', 'PR' => 'Puerto Rico', 'QA' => 'Katar', 'CG' => 'Kongó', 'RN' => 'Réunion', 'RO' => 'Románia', 'RU' => 'Orosz Föderáció', 'RW' => 'Ruanda', 'ST' => 'Sao Tome és Principe', 'KN' => 'Saint Kitts és Nevis', 'LC' => 'Szent Lucia', 'VC' => 'Saint Vincent és Grenadines', 'WS' => 'Szamoa', 'SM' => 'San Marino', 'SA' => 'SzaLd-Arábia', 'XS' => 'Scotland', 'SN' => 'Szenegál', 'RS' => 'Serbia', 'SC' => 'Seychelle-szigetek', 'SL' => 'Sierra Leone', 'SG' => 'SzingapLr', 'SK' => 'Szlovákia', 'SI' => 'Szlovénia', 'SB' => 'Salamon-szigetek', 'SO' => 'Szomália', 'ZA' => 'Dél-Afrika', 'KR' => 'Koreai Köztársaság', 'ES' => 'Spanyolország', 'LK' => 'Srí Lanka', 'SD' => 'Szudán', 'SR' => 'Suriname', 'SZ' => 'Szváziföld', 'SE' => 'Svédország', 'CH' => 'Svájc', 'SY' => 'Szíriai Arab Köztársaság', 'TW' => 'Tajvan', 'TJ' => 'Tádzsikisztán', 'TZ' => 'Tanzániai Egyesült Köztársaság', 'TH' => 'Thaiföld', 'TL' => 'Kelet-Timor', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad és Tobago', 'TN' => 'Tunézia', 'TR' => 'Törökország', 'TM' => 'Türkmenisztán', 'TV' => 'Tuvalu', 'VI' => 'Amerikai Virgin-szigetek', 'UG' => 'Uganda', 'UA' => 'Ukrajna', 'AE' => 'Egyesült Arab Emirátusok', 'GB' => 'Egyesült Királyság', 'US' => 'Egyesült Államok', 'UY' => 'Uruguay', 'UZ' => 'Üzbegisztán', 'VU' => 'Vanuatu', 'VA' => 'Vatikán', 'VE' => 'Venezuela', 'VN' => 'Vietnám', 'XW' => 'Wales', 'YE' => 'Jemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' );
175
+ $em_countries_array_i18n['it'] = array ('AF' => 'Afghanistan', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AS' => 'Samoa americane', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antartide', 'AG' => 'Antigua e Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Austria', 'AZ' => 'Azerbaigian', 'BS' => 'Bahamas', 'BH' => 'Bahrein', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Bielorussia', 'BE' => 'Belgio', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnia-Erzegovina', 'BW' => 'Botswana', 'BR' => 'Brasile', 'VG' => 'Isole Vergini britanniche', 'BN' => 'Brunei', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Costa d\'Avorio', 'KH' => 'Cambogia', 'CM' => 'Camerun', 'CA' => 'Canada', 'CV' => 'Capo Verde', 'KY'=>'Isole Cayman', 'CF' => 'Repubblica Centrafricana', 'TD' => 'Ciad', 'CL' => 'Cile', 'CN' => 'Cina', 'CO' => 'Colombia', 'KM' => 'Comore', 'CR' => 'Costa Rica', 'HR' => 'Croazia', 'CU' => 'Cuba', 'CY' => 'Cipro', 'CZ' => 'Repubblica ceca', 'KP' => 'Corea del Nord', 'CD' => 'Congo', 'DK' => 'Danimarca', 'DJ' => 'Gibuti', 'DM' => 'Dominica', 'DO' => 'Dominican Republic', 'EC' => 'Ecuador', 'EG' => 'Egitto', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Guinea Equatoriale', 'ER' => 'Eritrea', 'EE' => 'Estonia', 'ET' => 'Etiopia','FO' => 'Isole Faroe', 'FJ' => 'Figi', 'FI' => 'Finlandia', 'FR' => 'Francia', 'PF' => 'Polinesia francese', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgia', 'DE' => 'Germania', 'GH' => 'Ghana', 'GR' => 'Grecia', 'GL' => 'Groenlandia', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Ungheria', 'IS' => 'Islanda', 'IN' => 'India', 'ID' => 'Indonesia', 'IR' => 'Iran', 'IQ' => 'Iraq', 'IE' => 'Irlanda', 'IL' => 'Israele', 'IT' => 'Italia', 'JE'=>'Jersey', 'JM' => 'Giamaica', 'JP' => 'Giappone', 'JO' => 'Giordania', 'KZ' => 'Kazakistan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kirghizistan', 'LA' => 'Laos', 'LV' => 'Lettonia', 'LB' => 'Libano', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libia', 'LI' => 'Liechtenstein', 'LT' => 'Lituania', 'LU' => 'Lussemburgo', 'MO' => 'Macao', 'MK' => 'Macedonia', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malesia', 'MV' => 'Maldive', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Isole Marshall', 'MQ' => 'Martinica', 'MU' => 'Maurizio', 'MR' => 'Mauritania', 'MX' => 'Messico', 'FM' => 'Micronesia', 'MD' => 'Moldavia', 'MC' => 'Monaco', 'MN' => 'Mongolia', 'ME' => 'Montenegro', 'MA' => 'Marocco', 'MZ' => 'Mozambico', 'MM' => 'Myanmar(Birmania)', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Paesi Bassi', 'AN' => 'Antille olandesi', 'NC' => 'Nuova Caledonia', 'NZ' => 'Nuova Zelanda', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Marianne settentrionali', 'NO' => 'Norvegia', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papua Nuova Guinea', 'PY' => 'Paraguay', 'PE' => 'Perù', 'PH' => 'Filippine', 'PL' => 'Polonia', 'PT' => 'Portogallo', 'PR' => 'Portorico', 'QA' => 'Qatar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Romania', 'RU' => 'Russia', 'RW' => 'Ruanda', 'ST' => 'São Tomé e Príncipe', 'KN' => 'Saint Christopher e Nevis', 'LC' => 'Saint Lucia', 'VC' => 'Saint Vincent e Grenadine', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Arabia Saudita', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seicelle', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovacchia', 'SI' => 'Slovenia', 'SB' => 'Isole Salomone', 'SO' => 'Somalia', 'ZA' => 'Sudafrica', 'KR' => 'Corea del Sud', 'ES' => 'Spagna', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SZ' => 'Swaziland', 'SE' => 'Svezia', 'CH' => 'Svizzera', 'SY' => 'Siria', 'TW' => 'Taiwan', 'TJ' => 'Tagikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailandia', 'TL' => 'Timor-Leste', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad e Tobago', 'TN' => 'Tunisia', 'TR' => 'Turchia', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'Isole Vergini americane', 'UG' => 'Uganda', 'UA' => 'Ucraina', 'AE' => 'Emirati arabi uniti', 'GB' => 'Regno Unito', 'US' => 'Stati Uniti', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vaticano', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' );
176
+ $em_countries_array_i18n['nl'] = array ('AF' => 'Afghanistan', 'AL' => 'Albanië', 'DZ' => 'Algerije', 'AS' => 'Amerikaans-Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarctica', 'AG' => 'Antigua en Barbuda', 'AR' => 'Argentinië', 'AM' => 'Armenië', 'AW' => 'Aruba', 'AU' => 'Australië', 'AT' => 'Oostenrijk', 'AZ' => 'Azerbeidzjan', 'BS' => 'Bahamas', 'BH' => 'Bahrein', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'België', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnië en Herzegovina', 'BW' => 'Botswana', 'BR' => 'Brazilië', 'VG' => 'Britse Maagdeneilanden', 'BN' => 'Brunei', 'BG' => 'Bulgarije', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Ivoorkust', 'KH' => 'Cambodja', 'CM' => 'Kameroen', 'CA' => 'Canada', 'CV' => 'Kaapverdië', 'KY'=>'Caymaneilanden', 'CF' => 'Centraal-Afrikaanse Republiek', 'TD' => 'Tsjaad', 'CL' => 'Chili', 'CN' => 'China', 'CO' => 'Colombia', 'KM' => 'Comoren', 'CR' => 'Costa Rica', 'HR' => 'Kroatië', 'CU' => 'Cuba', 'CY' => 'Cyprus', 'CZ' => 'Tsjechië', 'KP' => 'Noord-Korea', 'CD' => 'Democratische Republiek Congo', 'DK' => 'Denemarken', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominicaanse Republiek', 'EC' => 'Ecuador', 'EG' => 'Egypte', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Equatoriaal-Guinea', 'ER' => 'Eritrea', 'EE' => 'Estland', 'ET' => 'Ethiopië','FO' => 'Faeröer', 'FJ' => 'Fiji', 'FI' => 'Finland', 'FR' => 'Frankrijk', 'PF' => 'Frans-Polynesië', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgië', 'DE' => 'Duitsland', 'GH' => 'Ghana', 'GR' => 'Griekenland', 'GL' => 'Groenland', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinee', 'GW' => 'Guinee-Bissau', 'GY' => 'Guyana', 'HT' => 'Haïti', 'HN' => 'Honduras', 'HK' => 'HongKong', 'HU' => 'Hongarije', 'IS' => 'IJsland', 'IN' => 'India', 'ID' => 'Indonesië', 'IR' => 'Iran', 'IQ' => 'Irak', 'IE' => 'Ierland', 'IL' => 'Israël', 'IT' => 'Italië', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JO' => 'Jordanië', 'KZ' => 'Kazachstan', 'KE' => 'Kenia', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Koeweit', 'KG' => 'Kirgizië', 'LA' => 'Laos', 'LV' => 'Letland', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libië', 'LI' => 'Liechtenstein', 'LT' => 'Litouwen', 'LU' => 'Luxemburg', 'MO' => 'Macau', 'MK' => 'Macedonië', 'MG' => 'Madagaskar', 'MW' => 'Malawi', 'MY' => 'Maleisië', 'MV' => 'Maldiven', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshalleilanden', 'MQ' => 'Martinique', 'MU' => 'Mauritius', 'MR' => 'Mauritanië', 'MX' => 'Mexico', 'FM' => 'Micronesia', 'MD' => 'Moldavië', 'MC' => 'Monaco', 'MN' => 'Mongolië', 'ME' => 'Montenegro', 'MA' => 'Marokko', 'MZ' => 'Mozambique', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibië', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Nederland', 'AN' => 'Nederlandse Antillen', 'NC' => 'Nieuw-Caledonië', 'NZ' => 'Nieuw-Zeeland', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Noordelijke Marianen', 'NO' => 'Noorwegen', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papoea-Nieuw-Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Filipijnen', 'PL' => 'Polen', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Roemenië', 'RU' => 'Rusland', 'RW' => 'Rwanda', 'ST' => 'Sao Tomé en Principe', 'KN' => 'Saint Kitts en Nevis', 'LC' => 'Saint Lucia', 'VC' => 'Saint Vincent en de Grenadines', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saudi-Arabië', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychellen', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slowakije', 'SI' => 'Slovenië', 'SB' => 'Salomonseilanden', 'SO' => 'Somalië', 'ZA' => 'Zuid-Afrika', 'KR' => 'Zuid-Korea', 'ES' => 'Spanje', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SZ' => 'Swaziland', 'SE' => 'Zweden', 'CH' => 'Zwitserland', 'SY' => 'Syrië', 'TW' => 'Taiwan', 'TJ' => 'Tadzjikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailand', 'TL' => 'Timor-Leste', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad en Tobago', 'TN' => 'Tunesië', 'TR' => 'Turkije', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'Amerikaanse Maagdeneilanden', 'UG' => 'Uganda', 'UA' => 'Oekraïne', 'AE' => 'Verenigde Arabische Emiraten', 'GB' => 'Verenigd Koninkrijk', 'US' => 'Verenigde Staten', 'UY' => 'Uruguay', 'UZ' => 'Oezbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vaticaanstad', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Jemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' );
177
+ $em_countries_array_i18n['pt'] = array ('AF' => 'Afeganistão', 'AL' => 'Albânia', 'DZ' => 'Argélia', 'AS' => 'Samoa Americana', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antárctida', 'AG' => 'Antígua e Barbuda', 'AR' => 'Argentina', 'AM' => 'Arménia', 'AW' => 'Aruba', 'AU' => 'Austrália', 'AT' => 'Áustria', 'AZ' => 'Azerbaijão', 'BS' => 'Baamas', 'BH' => 'Barém', 'BD' => 'Bangladeche', 'BB' => 'Barbados', 'BY' => 'Bielorrússia', 'BE' => 'Bélgica', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benim', 'BT' => 'Butão', 'BO' => 'Bolívia', 'BA' => 'Bósnia e Herzegovina', 'BW' => 'Botsuana', 'BR' => 'Brasil', 'VG' => 'Ilhas Virgens Britânicas', 'BN' => 'Brunei', 'BG' => 'Bulgária', 'BF' => 'Burquina Faso', 'BI' => 'Burúndi', 'CI' => 'Costa do Marfim', 'KH' => 'Camboja', 'CM' => 'Camarões', 'CA' => 'Canadá', 'CV' => 'Cabo Verde', 'KY'=>'Ilhas Caimão', 'CF' => 'República Centro-Africana', 'TD' => 'Chade', 'CL' => 'Chile', 'CN' => 'China', 'CO' => 'Colômbia', 'KM' => 'Comores', 'CR' => 'Costa Rica', 'HR' => 'Croácia', 'CU' => 'Cuba', 'CY' => 'Chipre', 'CZ' => 'República Checa', 'KP' => 'Coreia do Norte', 'CD' => 'Congo-Kinshasa', 'DK' => 'Dinamarca', 'DJ' => 'Jibuti', 'DM' => 'Domínica', 'DO' => 'República Dominicana', 'EC' => 'Equador', 'EG' => 'Egipto', 'SV' => 'Salvador', 'XE' => 'England', 'GQ' => 'Guiné Equatorial', 'ER' => 'Eritreia', 'EE' => 'Estónia', 'ET' => 'Etiópia','FO' => 'ilhas Faroe', 'FJ' => 'Fiji', 'FI' => 'Finlândia', 'FR' => 'França', 'PF' => 'Polinésia Francesa', 'GA' => 'Gabão', 'GM' => 'Gambia', 'GE' => 'Geórgia', 'DE' => 'Alemanha', 'GH' => 'Gana', 'GR' => 'Grécia', 'GL' => 'Gronelândia', 'GD' => 'Granada', 'GP' =>'Guadeloupe', 'GU' => 'Guame', 'GT' => 'Guatemala', 'GN' => 'Guiné', 'GW' => 'Guiné-Bissau', 'GY' => 'Guiana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hungria', 'IS' => 'Islândia', 'IN' => 'Índia', 'ID' => 'Indonésia', 'IR' => 'Irão', 'IQ' => 'Iraque', 'IE' => 'Irlanda', 'IL' => 'Israel', 'IT' => 'Itália', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japão', 'JO' => 'Jordânia', 'KZ' => 'Cazaquistão', 'KE' => 'Quénia', 'KI' => 'Quiribáti', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Quirguizistão', 'LA' => 'Laos', 'LV' => 'Letónia', 'LB' => 'Líbano', 'LS' => 'Lesoto', 'LR' => 'Libéria', 'LY' => 'Líbia', 'LI' => 'Listenstaine', 'LT' => 'Lituânia', 'LU' => 'Luxemburgo', 'MO' => 'Macau', 'MK' => 'Macedónia', 'MG' => 'Madagáscar', 'MW' => 'Malávi', 'MY' => 'Malásia', 'MV' => 'Maldivas', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Ilhas Marshall', 'MQ' => 'Martinica', 'MU' => 'Maurícia', 'MR' => 'Mauritânia', 'MX' => 'México', 'FM' => 'Micronésia', 'MD' => 'Moldávia', 'MC' => 'Mónaco', 'MN' => 'Mongólia', 'ME' => 'Montenegro', 'MA' => 'Marrocos', 'MZ' => 'Moçambique', 'MM' => 'Birmânia', 'NA' => 'Namíbia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Países Baixos', 'AN' => 'Antilhas Neerlandesas', 'NC' => 'Nova Caledónia', 'NZ' => 'Nova Zelândia', 'NI' => 'Nicarágua', 'NE' => 'Níger', 'NG' => 'Nigéria', 'XI' => 'Northern Ireland', 'MP' => 'Marianas do Norte', 'NO' => 'Noruega', 'OM' => 'Omã', 'PK' => 'Paquistão', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panamá', 'PG' => 'Papua-Nova Guiné', 'PY' => 'Paraguai', 'PE' => 'Peru', 'PH' => 'Filipinas', 'PL' => 'Polónia', 'PT' => 'Portugal', 'PR' => 'Porto Rico', 'QA' => 'Catar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Roménia', 'RU' => 'Rússia', 'RW' => 'Ruanda', 'ST' => 'São Tomé e Príncipe', 'KN' => 'São Cristóvão e Neves', 'LC' => 'Santa Lúcia', 'VC' => 'São Vicente e Granadinas', 'WS' => 'Samoa', 'SM' => 'São Marinho', 'SA' => 'Arábia Saudita', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seicheles', 'SL' => 'Serra Leoa', 'SG' => 'Singapura', 'SK' => 'Eslováquia', 'SI' => 'Eslovénia', 'SB' => 'Ilhas Salomão', 'SO' => 'Somália', 'ZA' => 'África do Sul', 'KR' => 'Coreia do Sul', 'ES' => 'Espanha', 'LK' => 'Sri Lanca', 'SD' => 'Sudão', 'SR' => 'Suriname', 'SZ' => 'Suazilândia', 'SE' => 'Suécia', 'CH' => 'Suíça', 'SY' => 'Síria', 'TW' => 'Taiwan', 'TJ' => 'Tajiquistão', 'TZ' => 'Tanzânia', 'TH' => 'Tailândia', 'TL' => 'Timor-Leste', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trindade e Tobago', 'TN' => 'Tunísia', 'TR' => 'Turquia', 'TM' => 'Turquemenistão', 'TV' => 'Tuvalu', 'VI' => 'Ilhas Virgens Americanas', 'UG' => 'Uganda', 'UA' => 'Ucrânia', 'AE' => 'Emiratos Árabes Unidos', 'GB' => 'Reino Unido', 'US' => 'Estados Unidos', 'UY' => 'Uruguai', 'UZ' => 'Usbequistão', 'VU' => 'Vanuatu', 'VA' => 'Vaticano', 'VE' => 'Venezuela', 'VN' => 'Vietname', 'XW' => 'Wales', 'YE' => 'Iémen', 'ZM' => 'Zâmbia', 'ZW' => 'Zimbabué' );
178
+ $em_countries_array_i18n['ru'] = array ('AF' => 'Афганистан', 'AL' => 'Албания', 'DZ' => 'Алжир', 'AS' => 'Самоа (США)', 'AD' => 'Андорра', 'AO' => 'Ангола', 'AQ' => 'Антарктика', 'AG' => 'Антигуа и Барбуда', 'AR' => 'Аргентина', 'AM' => 'Армения', 'AW' => 'Аруба', 'AU' => 'Австралия', 'AT' => 'Австрия', 'AZ' => 'Азербайджан', 'BS' => 'Багамы', 'BH' => 'Бахрейн', 'BD' => 'Бангладеш', 'BB' => 'Барбадос', 'BY' => 'Беларусь', 'BE' => 'Бельгия', 'BZ' => 'Белиз', 'BM' => 'Bermuda', 'BJ' => 'Бенин', 'BT' => 'Бутан', 'BO' => 'Боливия', 'BA' => 'Босния-Герцеговина', 'BW' => 'Ботсвана', 'BR' => 'Бразилия', 'VG' => 'Вирджинские острова (Брит.)', 'BN' => 'Бруней', 'BG' => 'Болгария', 'BF' => 'Буркина-Фасо', 'BI' => 'Бурунди', 'CI' => 'Берег Слоновой Кости', 'KH' => 'Камбоджа', 'CM' => 'Камерун', 'CA' => 'Канада', 'CV' => 'Кабо-Верде', 'KY'=>'Каймановы острова', 'CF' => 'Центрально-Африканская Республика', 'TD' => 'Чад', 'CL' => 'Чили', 'CN' => 'Китай', 'CO' => 'Колумбия', 'KM' => 'Коморос', 'CR' => 'Коста Рикa', 'HR' => 'Хорватия', 'CU' => 'Куба', 'CY' => 'Кипр', 'CZ' => 'Чешская Республика', 'KP' => 'Северная Корея', 'CD' => 'Демократическая Республика Конго', 'DK' => 'Дания', 'DJ' => 'Джибути', 'DM' => 'Доминика', 'DO' => ' Доминиканская Республика', 'EC' => 'Эквадор', 'EG' => 'Египет', 'SV' => 'Сальвадор', 'XE' => 'Англия', 'GQ' => 'Экваториальная Гвинея', 'ER' => 'Эритрея', 'EE' => 'Эстония', 'ET' => 'Эфиопия','FO' => 'Фарерские острова', 'FJ' => 'Фиджи', 'FI' => 'Финляндия', 'FR' => 'Франция', 'PF' => ' Полинезия (Фр.)', 'GA' => 'Габон', 'GM' => 'Гамбия', 'GE' => 'Грузия', 'DE' => 'Германия', 'GH' => 'Гана', 'GR' => 'Греция', 'GL' => 'Гренландия', 'GD' => 'Гренада', 'GP' =>'Guadeloupe', 'GU' => 'Гуам (США)', 'GT' => 'Гватемала', 'GN' => 'Гвинея', 'GW' => 'Гвинея-Бисау', 'GY' => 'Гайана', 'HT' => 'Гаити', 'HN' => 'Гондурас', 'HK' => 'Гонг Конг', 'HU' => 'Венгрия', 'IS' => 'Исландия', 'IN' => 'Индия', 'ID' => 'Индонезия', 'IR' => 'Иран', 'IQ' => 'Ирак', 'IE' => 'Ирландия', 'IL' => 'Израйль', 'IT' => 'Италия', 'JE'=>'Jersey', 'JM' => 'Ямайка', 'JP' => 'Япония', 'JO' => 'Иордания', 'KZ' => 'Казахстан', 'KE' => 'Кения', 'KI' => 'Кирибати', 'KV' => 'Косово', 'KW' => 'Кувейт', 'KG' => 'Киргизия', 'LA' => 'Лаос', 'LV' => 'Латвия', 'LB' => 'Ливан', 'LS' => 'Лесото', 'LR' => 'Либерия', 'LY' => 'Либия', 'LI' => 'Лихтейнштейн', 'LT' => 'Литва', 'LU' => 'Люксембург', 'MO' => 'Макау', 'MK' => 'Македония', 'MG' => 'Мадагаскар', 'MW' => 'Малави', 'MY' => 'Малайзия', 'MV' => 'Мальдивы', 'ML' => 'Мали', 'MT' => 'Мальта', 'MH' => 'Маршальские острова', 'MQ' => 'Мартиника (Фр.)', 'MU' => 'Мавритий', 'MR' => 'Мавритания', 'MX' => 'Мексика', 'FM' => 'Микронезия', 'MD' => 'Молдова', 'MC' => 'Монако', 'MN' => 'Монголия', 'ME' => 'Черногория', 'MA' => 'Морокко', 'MZ' => 'Мозамбик', 'MM' => 'Бирма (Мьянма)', 'NA' => 'Намибия', 'NR' => 'Науру', 'NP' => 'Непал', 'NL' => 'Нидерланды', 'AN' => 'Антиллы (Нидерланды)', 'NC' => 'Новая Каледония (Фр.)', 'NZ' => 'Новая Зеландия', 'NI' => 'Никарагуаa', 'NE' => 'Нигер', 'NG' => 'Нигерия', 'XI' => 'Северной Ирландии', 'MP' => 'Северные Марианские острова', 'NO' => 'Норвегия', 'OM' => 'Оман', 'PK' => 'Пакистан', 'PW' => 'Палау', 'PS' => 'Палестина', 'PA' => 'Панама', 'PG' => 'Папуа Новая Гвинея', 'PY' => 'Парагвай', 'PE' => 'Перу', 'PH' => 'Филиппины', 'PL' => 'Польша', 'PT' => 'Португалия', 'PR' => 'Пуэрто-Рико', 'QA' => 'Катар', 'CG' => 'Конго', 'RN' => 'Réunion', 'RO' => 'Румыния', 'RU' => 'Россия', 'RW' => 'Руанда', 'ST' => 'Сан-Томе и Принсипи', 'KN' => 'Сент-Киттс Нэвис Ангуилла', 'LC' => 'Санта Лючия', 'VC' => 'Сент-Висент и Гренадины', 'WS' => 'Самоа', 'SM' => 'Сан-Марино', 'SA' => 'Саудовская Аравия', 'XS' => 'Шотландия', 'SN' => 'Сенегал', 'RS' => 'Сербии', 'SC' => 'Сейшеллы', 'SL' => 'Сьерра-Леоне', 'SG' => 'Сингапур', 'SK' => 'Словакия', 'SI' => 'Словения', 'SB' => 'Соломоновы острова', 'SO' => 'Сомали', 'ZA' => 'Южная Африка', 'KR' => 'Южная Корея', 'ES' => 'Испания', 'LK' => 'Шри Ланка', 'SD' => 'Судан', 'SR' => 'Суринам', 'SZ' => 'Свазиленд', 'SE' => 'Швеция', 'CH' => 'Швейцария', 'SY' => 'Сирия', 'TW' => 'Тайвань', 'TJ' => 'Таджикистан', 'TZ' => 'Танзания', 'TH' => 'Таиланд', 'TL' => 'Восточный Тимор', 'TG' => 'Того', 'TO' => 'Тонга', 'TT' => 'Тринидад и Тобаго', 'TN' => 'Тунис', 'TR' => 'Турция', 'TM' => 'Туркменистан', 'TV' => 'Тувалу', 'VI' => 'Вирджинские острова (США)', 'UG' => 'Уганда', 'UA' => 'Украина', 'AE' => 'Объединенные Арабские Эмираты', 'GB' => 'Великобритания', 'US' => 'США', 'UY' => 'Uruguay', 'UZ' => 'Узбекистан', 'VU' => 'Вануату', 'VA' => 'Ватикан', 'VE' => 'Венесуэла', 'VN' => 'Вьетнам', 'XW' => 'Уэльс', 'YE' => 'Йемен', 'ZM' => 'Замбия', 'ZW' => 'Зимбабве' );
179
+ $em_countries_array_i18n['sv'] = array ('AF' => 'Afghanistan', 'AL' => 'Albanien', 'DZ' => 'Algeriet', 'AS' => 'Amerikanska Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarktis', 'AG' => 'Antigua och Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenien', 'AW' => 'Aruba', 'AU' => 'Australien', 'AT' => 'Österrike', 'AZ' => 'Azerbajdzjan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Vitryssland', 'BE' => 'Belgien', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnien och Hercegovina', 'BW' => 'Botswana', 'BR' => 'Brasilien', 'VG' => 'Brittiska Jungfruöarna', 'BN' => 'Brunei', 'BG' => 'Bulgarien', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Elfenbenskusten', 'KH' => 'Kambodja', 'CM' => 'Kamerun', 'CA' => 'Kanada', 'CV' => 'Kap Verde', 'KY'=>'Caymanöarna', 'CF' => 'Centralafrikanska republiken', 'TD' => 'Tchad', 'CL' => 'Chile', 'CN' => 'Kina', 'CO' => 'Colombia', 'KM' => 'Komorerna', 'CR' => 'Costa Rica', 'HR' => 'Kroatien', 'CU' => 'Kuba', 'CY' => 'Cypern', 'CZ' => 'Tjeckien', 'KP' => 'Nordkorea', 'CD' => 'Demokratiska republiken Kongo', 'DK' => 'Danmark', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominikanska republiken', 'EC' => 'Ecuador', 'EG' => 'Egypten', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Ekvatorialguinea', 'ER' => 'Eritrea', 'EE' => 'Estland', 'ET' => 'Etiopien','FO' => 'Färöarna', 'FJ' => 'Fiji', 'FI' => 'Finland', 'FR' => 'Frankrike', 'PF' => 'Franska Polynesien', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgien', 'DE' => 'Tyskland', 'GH' => 'Ghana', 'GR' => 'Grekland', 'GL' => 'Grönland', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Ungern', 'IS' => 'Island', 'IN' => 'Indien', 'ID' => 'Indonesien', 'IR' => 'Iran', 'IQ' => 'Irak', 'IE' => 'Irland', 'IL' => 'Israel', 'IT' => 'Italien', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JO' => 'Jordanien', 'KZ' => 'Kazakstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kirgizistan', 'LA' => 'Laos', 'LV' => 'Lettland', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libyen', 'LI' => 'Liechtenstein', 'LT' => 'Litauen', 'LU' => 'Luxemburg', 'MO' => 'Macao', 'MK' => 'Makedonien', 'MG' => 'Madagaskar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Maldiverna', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshallöarna', 'MQ' => 'Martinique', 'MU' => 'Mauritius', 'MR' => 'Mauretanien', 'MX' => 'Mexiko', 'FM' => 'Mikronesien', 'MD' => 'Moldavien', 'MC' => 'Monaco', 'MN' => 'Mongoliet', 'ME' => 'Montenegro', 'MA' => 'Marocko', 'MZ' => 'Moçambique', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Nederländerna', 'AN' => 'Nederländska Antillerna', 'NC' => 'Nya Kaledonien', 'NZ' => 'Nya Zeeland', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Nordmarianerna', 'NO' => 'Norge', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papua Nya Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Filippinerna', 'PL' => 'Polen', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'CG' => 'Kongo', 'RN' => 'Réunion', 'RO' => 'Rumänien', 'RU' => 'Ryssland', 'RW' => 'Rwanda', 'ST' => 'São Tomé och Príncipe', 'KN' => ' Saint Christopher och Nevis', 'LC' => 'Saint Lucia', 'VC' => 'Saint Vincent och Grenadinerna', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saudiarabien', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychellerna', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovakien', 'SI' => 'Slovenien', 'SB' => 'Salomonöarna', 'SO' => 'Somalia', 'ZA' => 'Sydafrika', 'KR' => 'Sydkorea', 'ES' => 'Spanien', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Surinam', 'SZ' => 'Swaziland', 'SE' => 'Sverige', 'CH' => 'Schweiz', 'SY' => 'Syrien', 'TW' => 'Taiwan', 'TJ' => 'Tadzjikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailand', 'TL' => 'Timor-Leste', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad och Tobago', 'TN' => 'Tunisien', 'TR' => 'Turkiet', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'Amerikanska Jungfruöarna', 'UG' => 'Uganda', 'UA' => 'Ukraina', 'AE' => 'Förenade Arabemiraten', 'GB' => 'Förenade kungariket', 'US' => 'Förenta staterna', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VA' => ' Heliga stolen', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' );
180
+ $em_countries_array_i18n['en'] = array ('AF' => 'Afghanistan', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AS' => 'American Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarctica', 'AG' => 'Antigua and Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Austria', 'AZ' => 'Azerbaijan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgium', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnia and Herzegovina', 'BW' => 'Botswana', 'BR' => 'Brazil', 'VG' => 'British Virgin Islands', 'BN' => 'Brunei', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'C&ocirc;te D\'Ivoire', 'KH' => 'Cambodia', 'CM' => 'Cameroon', 'CA' => 'Canada', 'CV' => 'Cape Verde', 'KY'=>'Cayman Islands', 'CF' => 'Central African Republic', 'TD' => 'Chad', 'CL' => 'Chile', 'CN' => 'China', 'CO' => 'Colombia', 'KM' => 'Comoros', 'CR' => 'Costa Rica', 'HR' => 'Croatia', 'CU' => 'Cuba', 'CY' => 'Cyprus', 'CZ' => 'Czech Republic', 'KP' => 'Democratic People\'s Republic of Korea', 'CD' => 'Democratic Republic of the Congo', 'DK' => 'Denmark', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominican Republic', 'EC' => 'Ecuador', 'EG' => 'Egypt', 'SV' => 'El Salvador', 'XE' => 'England', 'GQ' => 'Equatorial Guinea', 'ER' => 'Eritrea', 'EE' => 'Estonia', 'ET' => 'Ethiopia','FO' => 'Faroe Islands', 'FJ' => 'Fiji', 'FI' => 'Finland', 'FR' => 'France', 'PF' => 'French Polynesia', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgia', 'DE' => 'Germany', 'GH' => 'Ghana', 'GR' => 'Greece', 'GL' => 'Greenland', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hungary', 'IS' => 'Iceland', 'IN' => 'India', 'ID' => 'Indonesia', 'IR' => 'Iran', 'IQ' => 'Iraq', 'IE' => 'Ireland', 'IL' => 'Israel', 'IT' => 'Italy', 'JE'=>'Jersey', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JO' => 'Jordan', 'KZ' => 'Kazakhstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kyrgyzstan', 'LA' => 'Laos', 'LV' => 'Latvia', 'LB' => 'Lebanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libya', 'LI' => 'Liechtenstein', 'LT' => 'Lithuania', 'LU' => 'Luxembourg', 'MO' => 'Macao', 'MK' => 'Macedonia', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Maldives', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshall Islands', 'MQ' => 'Mauritania', 'MU' => 'Mauritius', 'MR' => 'Mauritania', 'MX' => 'Mexico', 'FM' => 'Micronesia', 'MD' => 'Moldova', 'MC' => 'Monaco', 'MN' => 'Mongolia', 'ME' => 'Montenegro', 'MA' => 'Morocco', 'MZ' => 'Mozambique', 'MM' => 'Myanmar(Burma)', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Netherlands', 'AN' => 'Netherlands Antilles', 'NC' => 'New Caledonia', 'NZ' => 'New Zealand', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Northern Ireland', 'MP' => 'Northern Mariana Islands', 'NO' => 'Norway', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestine', 'PA' => 'Panama', 'PG' => 'Papua New Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Philippines', 'PL' => 'Poland', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'CG' => 'Republic of the Congo', 'RN' => 'Réunion', 'RO' => 'Romania', 'RU' => 'Russia', 'RW' => 'Rwanda', 'ST' => 'S&agrave;o Tom&eacute; And Pr&iacute;ncipe', 'KN' => 'Saint Kitts and Nevis', 'LC' => 'Saint Lucia', 'VC' => 'Saint Vincent and the Grenadines', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saudi Arabia', 'XS' => 'Scotland', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychelles', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovakia', 'SI' => 'Slovenia', 'SB' => 'Solomon Islands', 'SO' => 'Somalia', 'ZA' => 'South Africa', 'KR' => 'South Korea', 'ES' => 'Spain', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SZ' => 'Swaziland', 'SE' => 'Sweden', 'CH' => 'Switzerland', 'SY' => 'Syria', 'TW' => 'Taiwan', 'TJ' => 'Tajikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailand', 'TL' => 'Timor-Leste', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad and Tobago', 'TN' => 'Tunisia', 'TR' => 'Turkey', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'US Virgin Islands', 'UG' => 'Uganda', 'UA' => 'Ukraine', 'AE' => 'United Arab Emirates', 'GB' => 'United Kingdom', 'US' => 'United States', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vatican', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' );
181
+ $em_countries_array_i18n['fi'] = array ('AF' => 'Afghanistan', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AS' => 'Amerikan Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AQ' => 'Antarctica', 'AG' => 'Antigua ja Barbuda', 'AR' => 'Argentiina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Itävalta', 'AZ' => 'Azerbaidžan', 'BS' => 'Bahama', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Valko-Venäjä', 'BE' => 'Belgia', 'BZ' => 'Belize', 'BM' => 'Bermuda', 'BJ' => 'Benin', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnia ja Hertsegovina', 'BW' => 'Botswana', 'BR' => 'Brasilia', 'VG' => 'Brittiläiset Neitsytsaaret', 'BN' => 'Brunei', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'CI' => 'Norsunluurannikko', 'KH' => 'Kambodža', 'CM' => 'Kamerun', 'CA' => 'Kanada', 'CV' => 'Kap Verde', 'KY'=>'Caymansaaret', 'CF' => 'Keski-Afrikan tasavalta', 'TD' => 'Tšad', 'CL' => 'Chile', 'CN' => 'Kiina', 'CO' => 'Kolumbia', 'KM' => 'Komorit', 'CR' => 'Costa Rica', 'HR' => 'Kroatia', 'CU' => 'Kuuba', 'CY' => 'Kypros', 'CZ' => 'Tšekki', 'KP' => 'Korean demokraattinen kansantasavalta', 'CD' => 'Kongon demokraattinen tasavalta', 'DK' => 'Tanska', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominikaaninen tasavalta', 'EC' => 'Ecuador', 'EG' => 'Egypti', 'SV' => 'El Salvador', 'XE' => 'Englanti', 'GQ' => 'Päiväntasaajan Guinea', 'ER' => 'Eritrea', 'EE' => 'Estonia', 'ET' => 'Etiopia','FO' => 'Färsaaret', 'FJ' => 'Fiji', 'FI' => 'Suomi', 'FR' => 'Ranska', 'PF' => 'Ranskan Polynesia', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgia', 'DE' => 'Saksa', 'GH' => 'Ghana', 'GR' => 'Kreikka', 'GL' => 'Grönlanti', 'GD' => 'Grenada', 'GP' =>'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Unkari', 'IS' => 'Islanti', 'IN' => 'Intia', 'ID' => 'Indonesia', 'IR' => 'Iran', 'IQ' => 'Irak', 'IE' => 'Irlanti', 'IL' => 'Israel', 'IT' => 'Italia', 'JE'=>'Jersey', 'JM' => 'Jamaika', 'JP' => 'Japani', 'JO' => 'Jordania', 'KZ' => 'Kazakstan', 'KE' => 'Kenia', 'KI' => 'Kiribati', 'KV' => 'Kosovo', 'KW' => 'Kuwait', 'KG' => 'Kirgisistan', 'LA' => 'Laos', 'LV' => 'Latvia', 'LB' => 'Libanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libya', 'LI' => 'Liechtenstein', 'LT' => 'Lietua', 'LU' => 'Luxemburg', 'MO' => 'Macao', 'MK' => 'Makedonia', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malesia', 'MV' => 'Maldiivit', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshallinsaaret', 'MQ' => 'Mauritania', 'MU' => 'Mauritius', 'MR' => 'Mauritania', 'MX' => 'Mexico', 'FM' => 'Micronesia', 'MD' => 'Moldova', 'MC' => 'Monaco', 'MN' => 'Mongolia', 'ME' => 'Montenegro', 'MA' => 'Morokko', 'MZ' => 'Mozambik', 'MM' => 'Myanmar', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Alankomaat', 'AN' => 'Alankomaiden Antillit', 'NC' => 'Uusi-Kaledonia', 'NZ' => 'Uusi-Seelanti', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'XI' => 'Pohjois-Irlanti', 'MP' => 'Pohjois-Mariaanit', 'NO' => 'Norja', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestina', 'PA' => 'Panama', 'PG' => 'Papua Uusi-Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Filippiinit', 'PL' => 'Puola', 'PT' => 'Portugali', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'CG' => 'Kongo', 'RN' => 'Réunion', 'RO' => 'Romania', 'RU' => 'Venäjä', 'RW' => 'Ruanda', 'ST' => 'São Tomé ja Príncipe', 'KN' => 'Saint Kitts jad Nevis', 'LC' => 'Saint Lucia', 'VC' => 'Saint Vincent ja Grenadiinit', 'WS' => 'Samoa', 'SM' => 'San Marino', 'SA' => 'Saudi Arabia', 'XS' => 'Skotlanti', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychelles', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovakia', 'SI' => 'Slovenia', 'SB' => 'Salomonsaaret', 'SO' => 'Somalia', 'ZA' => 'Etelä-Afrikka', 'KR' => 'Etelä Korea', 'ES' => 'Espanja', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SZ' => 'Swazimaa', 'SE' => 'Ruotsi', 'CH' => 'Sveitsi', 'SY' => 'Syria', 'TW' => 'Taiwan', 'TJ' => 'Tadžikistan', 'TZ' => 'Tansania', 'TH' => 'Thaimaa', 'TL' => 'Itä Timor', 'TG' => 'Togo', 'TO' => 'Tonga', 'TT' => 'Trinidad ja Tobago', 'TN' => 'Tunisia', 'TR' => 'Turkki', 'TM' => 'Turkmenistan', 'TV' => 'Tuvalu', 'VI' => 'Yhdysvaltain Neitsytsaaret', 'UG' => 'Uganda', 'UA' => 'Ukraina', 'AE' => 'Arabiemiirikunnat', 'GB' => 'Yhdistynyt kuningaskunta', 'US' => 'Yhdysvallat', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vatikaani', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'XW' => 'Wales', 'YE' => 'Yemen', 'ZM' => 'Sambia', 'ZW' => 'Zimbabwe' );
182
  $lang = substr(get_locale(), 0, 2);
183
  if( array_key_exists($lang, $em_countries_array_i18n) ){
184
  $em_countries_array = $em_countries_array_i18n[$lang];
226
  return apply_filters('em_get_currencies',$currencies);
227
  }
228
 
229
+ function em_get_currency_formatted($price, $currency=false, $format=false, $precision = 2){
230
  $formatted_price = '';
231
  if(!$format) $format = get_option('dbem_bookings_currency_format','@#');
232
  if(!$currency) $currency = get_option('dbem_bookings_currency');
233
  $formatted_price = str_replace('@', em_get_currency_symbol(true,$currency), $format);
234
+ $formatted_price = str_replace('#', number_format( $price, $precision, get_option('dbem_bookings_currency_decimal_point','.'), get_option('dbem_bookings_currency_thousands_sep',',') ), $formatted_price);
235
  return apply_filters('em_get_currency_formatted', $formatted_price, $price, $currency, $format);
236
  }
237
 
em-ical.php CHANGED
@@ -74,31 +74,6 @@
74
  */
75
  function em_mb_ical_wordwrap($string){
76
  if( !defined('EM_MB_ICAL_WORDWRAP') || EM_MB_ICAL_WORDWRAP ){
77
- /*
78
- // Match anything 1 to $width chars long followed by whitespace or EOS, otherwise match anything $width chars long
79
- $search = '/(.{1,74})(?:\s|$)|(.{74})/uS';
80
- $replace = '$1$2'."\r\n ";
81
- $return = preg_replace($search, $replace, $string);
82
- return $return;
83
- return preg_replace('/\r\n $/', '', $return);
84
- */
85
- /*
86
- $str_len = mb_strlen($string,'UTF-8');
87
- $while = ceil($str_len / 74);
88
- $return = '';
89
- for($i = 1; $i < $while; $i++){
90
- preg_match('#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){74}#', $string, $matches);
91
- $return .= $matches[0]."\r\n ";
92
- $string = substr($string, strlen($matches[0]));
93
- }
94
- return $return.$string;
95
- */
96
- /*$strlen = strlen($string);
97
- $return = '';
98
- for( $i = 0; $i + 74 <= $strlen; $i = $i + 74 ){
99
- $return = mb_strcut
100
- }
101
- */
102
  $return = '';
103
  for ( $i = 0; strlen($string) > 0; $i++ ) {
104
  $linewidth = ($i == 0? 75 : 74);
74
  */
75
  function em_mb_ical_wordwrap($string){
76
  if( !defined('EM_MB_ICAL_WORDWRAP') || EM_MB_ICAL_WORDWRAP ){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  $return = '';
78
  for ( $i = 0; strlen($string) > 0; $i++ ) {
79
  $linewidth = ($i == 0? 75 : 74);
em-install.php CHANGED
@@ -238,8 +238,8 @@ function em_create_locations_table() {
238
  location_postcode VARCHAR( 10 ) NULL DEFAULT NULL,
239
  location_region VARCHAR( 200 ) NULL DEFAULT NULL,
240
  location_country CHAR( 2 ) NULL DEFAULT NULL,
241
- location_latitude FLOAT( 10, 6 ) NULL DEFAULT NULL,
242
- location_longitude FLOAT( 10, 6 ) NULL DEFAULT NULL,
243
  post_content longtext NULL DEFAULT NULL,
244
  location_status int(1) NULL DEFAULT NULL,
245
  location_private bool NOT NULL DEFAULT 0,
238
  location_postcode VARCHAR( 10 ) NULL DEFAULT NULL,
239
  location_region VARCHAR( 200 ) NULL DEFAULT NULL,
240
  location_country CHAR( 2 ) NULL DEFAULT NULL,
241
+ location_latitude DECIMAL( 9, 6 ) NULL DEFAULT NULL,
242
+ location_longitude DECIMAL( 9, 6 ) NULL DEFAULT NULL,
243
  post_content longtext NULL DEFAULT NULL,
244
  location_status int(1) NULL DEFAULT NULL,
245
  location_private bool NOT NULL DEFAULT 0,
em-shortcode.php CHANGED
@@ -43,7 +43,7 @@ function em_get_locations_map_shortcode($args){
43
  //add JSON style to map
44
  $style = '';
45
  if( !empty($args['map_style']) ){
46
- $style= base64_decode($args['map_style']);
47
  $style_json= json_decode($style);
48
  if( is_array($style_json) || is_object($style_json) ){
49
  $style = preg_replace('/[\r\n\t\s]/', '', $style);
@@ -81,7 +81,7 @@ function em_get_events_map_shortcode($args){
81
  //add JSON style to map
82
  $style = '';
83
  if( !empty($args['map_style']) ){
84
- $style= base64_decode($args['map_style']);
85
  $style_json= json_decode($style);
86
  if( is_array($style_json) || is_object($style_json) ){
87
  $style = preg_replace('/[\r\n\t\s]/', '', $style);
43
  //add JSON style to map
44
  $style = '';
45
  if( !empty($args['map_style']) ){
46
+ $style= wp_kses_data(base64_decode($args['map_style']));
47
  $style_json= json_decode($style);
48
  if( is_array($style_json) || is_object($style_json) ){
49
  $style = preg_replace('/[\r\n\t\s]/', '', $style);
81
  //add JSON style to map
82
  $style = '';
83
  if( !empty($args['map_style']) ){
84
+ $style= wp_kses_data(base64_decode($args['map_style']));
85
  $style_json= json_decode($style);
86
  if( is_array($style_json) || is_object($style_json) ){
87
  $style = preg_replace('/[\r\n\t\s]/', '', $style);
events-manager.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Events Manager
4
- Version: 5.9.5
5
  Plugin URI: http://wp-events-plugin.com
6
  Description: Event registration and booking management for WordPress. Recurring events, locations, google maps, rss, ical, booking registration and more!
7
  Author: Marcus Sykes
@@ -10,7 +10,7 @@ Text Domain: events-manager
10
  */
11
 
12
  /*
13
- Copyright (c) 2018, Marcus Sykes
14
 
15
  This program is free software; you can redistribute it and/or
16
  modify it under the terms of the GNU General Public License
@@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28
  */
29
 
30
  // Setting constants
31
- define('EM_VERSION', 5.95); //self expanatory
32
  define('EM_PRO_MIN_VERSION', 2.64); //self expanatory
33
  define('EM_PRO_MIN_VERSION_CRITICAL', 2.377); //self expanatory
34
  define('EM_DIR', dirname( __FILE__ )); //an absolute path to this directory
@@ -491,6 +491,8 @@ function em_init(){
491
  }
492
  //add custom functions.php file
493
  locate_template('plugins/events-manager/functions.php', true);
 
 
494
  }
495
  add_filter('init','em_init',1);
496
 
1
  <?php
2
  /*
3
  Plugin Name: Events Manager
4
+ Version: 5.9.6
5
  Plugin URI: http://wp-events-plugin.com
6
  Description: Event registration and booking management for WordPress. Recurring events, locations, google maps, rss, ical, booking registration and more!
7
  Author: Marcus Sykes
10
  */
11
 
12
  /*
13
+ Copyright (c) 2019, Marcus Sykes
14
 
15
  This program is free software; you can redistribute it and/or
16
  modify it under the terms of the GNU General Public License
28
  */
29
 
30
  // Setting constants
31
+ define('EM_VERSION', 5.96); //self expanatory
32
  define('EM_PRO_MIN_VERSION', 2.64); //self expanatory
33
  define('EM_PRO_MIN_VERSION_CRITICAL', 2.377); //self expanatory
34
  define('EM_DIR', dirname( __FILE__ )); //an absolute path to this directory
491
  }
492
  //add custom functions.php file
493
  locate_template('plugins/events-manager/functions.php', true);
494
+ //fire a loaded hook, most plugins should consider going through here to load anything EM related
495
+ do_action('events_manager_loaded');
496
  }
497
  add_filter('init','em_init',1);
498
 
includes/css/events_manager.css CHANGED
@@ -64,7 +64,7 @@ div#em-loading { position:absolute; width:100%; height:100%; background:#FFFFFF
64
  background:-moz-linear-gradient( center top, #C4DB99 5%, #A4C48A 100% );
65
  background:-ms-linear-gradient(top, #C4DB99, #A4C48A);
66
  background:-o-linear-gradient(top, #C4DB99, #A4C48A);
67
- background:linear-gradient(top, #C4DB99, #A4C48A);
68
  background-color:#A4C48A;
69
  }
70
  div.css-search div.em-search-main .em-search-submit img { border:none; padding:0; margin:0; box-shadow:none; border-radius:0; background:none; }
@@ -176,7 +176,7 @@ div#em-loading { position:absolute; width:100%; height:100%; background:#FFFFFF
176
  #em-bookings-table-export form, #em-bookings-table-settings form { height: 100%; overflow:auto; }
177
  /* Sorting */
178
  .em-bookings-table-overlay ul.em-bookings-cols-sortable { list-style-type: none; margin: 0; padding: 0 0 10px; float: left; margin-right: 10px; }
179
- .em-bookings-table-overlay ul.em-bookings-cols-sortable li { margin: 0 5px 5px 5px; padding: 3px 8px; font-size: 12px; width: 120px; font-weight:none; cursor:move; }
180
  .em-bookings-table-overlay ul.em-bookings-cols-sortable li.ui-state-highlight {}
181
  .em-bookings-table-overlay ul.em-bookings-cols-sortable li.ui-state-default { color:#999; }
182
  #em-bookings-export-cols-inactive, #em-bookings-cols-inactive { width:300px; }
@@ -223,13 +223,13 @@ Please edit your theme's CSS to override this
223
  height:auto !important;
224
  max-height:none !important;
225
  }
226
- .em-location-map img, .em-locations-map img, #em-map img {
227
- max-width:none !important;
228
- background:none !important;
229
- border:none !important;
230
- margin:0 !important;
231
- padding:0 !important;
232
- height:auto;
233
  width:auto;
234
  }
235
 
64
  background:-moz-linear-gradient( center top, #C4DB99 5%, #A4C48A 100% );
65
  background:-ms-linear-gradient(top, #C4DB99, #A4C48A);
66
  background:-o-linear-gradient(top, #C4DB99, #A4C48A);
67
+ background:linear-gradient(to top, #C4DB99, #A4C48A);
68
  background-color:#A4C48A;
69
  }
70
  div.css-search div.em-search-main .em-search-submit img { border:none; padding:0; margin:0; box-shadow:none; border-radius:0; background:none; }
176
  #em-bookings-table-export form, #em-bookings-table-settings form { height: 100%; overflow:auto; }
177
  /* Sorting */
178
  .em-bookings-table-overlay ul.em-bookings-cols-sortable { list-style-type: none; margin: 0; padding: 0 0 10px; float: left; margin-right: 10px; }
179
+ .em-bookings-table-overlay ul.em-bookings-cols-sortable li { margin: 0 5px 5px 5px; padding: 3px 8px; font-size: 12px; width: 120px; font-weight:normal; cursor:move; }
180
  .em-bookings-table-overlay ul.em-bookings-cols-sortable li.ui-state-highlight {}
181
  .em-bookings-table-overlay ul.em-bookings-cols-sortable li.ui-state-default { color:#999; }
182
  #em-bookings-export-cols-inactive, #em-bookings-cols-inactive { width:300px; }
223
  height:auto !important;
224
  max-height:none !important;
225
  }
226
+ .em-location-map img, .em-locations-map img, #em-map img {
227
+ max-width:none !important;
228
+ background:none !important;
229
+ border:none !important;
230
+ margin:0 !important;
231
+ padding:0 !important;
232
+ height:auto;
233
  width:auto;
234
  }
235
 
includes/css/events_manager_admin.css CHANGED
@@ -1,5 +1,5 @@
1
  div#em-loading { position:absolute; width:100%; height:100%; background:#FFFFFF url(../images/loading.gif) 50% 50% no-repeat; left:0px; top:0px; opacity:0.8; filter:alpha(opacity=80); z-index:9999; }
2
-
3
  #location_info td { vertical-align:top; text-align:left; }
4
  #location_info th { vertical-align:top; text-align:left; padding:5px 10px 0 0; }
5
 
@@ -8,10 +8,10 @@ p.warning { border: 2px solid #FD0000; background: #FF7146; color: #fff; font-we
8
 
9
  .switch-tab { background: #aaa; width: 100px; float: right; text-align: center; margin: 3px 1px 0 5px; padding: 2px; }
10
  .switch-tab a { color: #fff; text-decoration: none; }
11
- .switch-tab a:hover { color: #D54E21; }
12
 
13
  #events-pagination { text-align: center; }
14
- #events-pagination a { margin: 0 20px 0 20px; text-decoration: none; width: 80px; padding: 3px 0; background: #FAF4B7; border: 1px solid #ccc; border-top: none;}
15
  #new-event { float: left; }
16
 
17
  div#icon-events{ background:url('../images/calendar-32.png') no-repeat center; }
@@ -25,106 +25,123 @@ table.events-table .category { color:#888; }
25
  /* Events Add Page */
26
  #post-body .misc-pub-post-status.misc-event-duplicate-link:before { content: "\f132"; }
27
  #event-form #event-name, #location-form, #location-name { margin: 2px 0 7px; padding: 6px 5px; width: 98%; }
28
- /* Recurring Event Rescheduling */
29
- #event-form .reschedule-hidden, #post .reschedule-hidden { display:none; visibility:hidden; }
30
- #event-form .em-recurrence-reschedule, #post .em-recurrence-reschedule { padding:15px 20px; border-left: 4px solid #ffa500; }
31
- #event-form .em-recurrence-reschedule h4, #post .em-recurrence-reschedule h4 { margin-top:0px; }
32
- #event-form .recurrence-reschedule-warning, #post .recurrence-reschedule-warning { margin-bottom:25px; color:#c45500; }
33
- #event-form .recurrence-reschedule-warning p, #post .recurrence-reschedule-warning p { margin-top:0px; font-size:14px; }
34
- /*Locations*/
35
- div.em-location-data table { float:left; margin:0px 15px 0px 0px; }
36
- /* Location form */
37
- div.em-location-data table.em-location-data td, div.em-location-data table.em-location-data th { vertical-align:top; border:none; }
38
- div.em-location-data table.em-location-data { width:50%; float:left; border:none; }
39
- div.em-location-data .em-location-map-container, div.em-location-data .em-location-map-404, div.em-location-data .em-location-map-content { width: 400px; height: 300px; float:left; }
40
- div.em-location-data .em-location-map-404 { vertical-align:middle; text-align: center; }
41
- /* MS Global Categories */
42
- .ms-global-categories { line-height:1.8em; }
43
- /*Bookings */
44
- #event-rsvp-box { margin:10px; }
45
- #event-rsvp-options h4 { font-size:14px; }
46
- #event-rsvp-options label { font-weight:bold; }
47
- /*Tickets*/
48
- .em-tickets-row .ticket-status span.ticket_on { display:block; width:10px; height:10px; background:green; }
49
- .em-tickets-row .ticket-status span.ticket_off { display:block; width:10px; height:10px; background:red; }
50
- .em-tickets-row .ticket-status span.ticket_new { display:block; width:10px; height:10px; background:grey; }
51
- #em-tickets-form th { width:auto; }
52
- #em-tickets-form th.ticket-status { width:20px; }
53
- /* Ticket Forms */
54
- .em-ticket-form .ticket-options { margin-top:10px; }
55
- .em-ticket-form > div > div, #em-tickets-form .ticket-dates > div { clear:both; padding-top:4px; }
56
- .em-ticket-form label { display:block; float:left; min-width:105px; padding-right:5px; }
57
- #em-tickets-form .ticket-name input, #em-tickets-form .ticket-description textarea { width:50%}
58
- #em-tickets-form .em-ticket-form-actions { clear:both; }
59
- #em-tickets-form .ticket-spaces input, #em-tickets-form .ticket-price input { width:80px; }
60
- #em-tickets-form .ticket-dates input.em-date-input-loc { width:90px; }
61
- #em-tickets-form .ticket-dates-from-normal, #em-tickets-form .ticket-dates-from-recurring,
62
- #em-tickets-form .ticket-dates-to-normal, #em-tickets-form .ticket-dates-to-recurring { display:inline; }
63
- #em-tickets-form .ticket-required input, #em-tickets-form .ticket-roles input { width:auto; }
64
- #em-tickets-form .ticket-roles div { margin-left:110px; }
65
 
66
  /* Booking Form */
67
- .em-booking { margin:15px 0px 10px 0px; position:relative; }
68
- .em-booking-form { position:relative; clear:left; }
69
- .em-booking-form-details { padding:10px; width:360px; float:left; }
70
- .em-booking-form-details input.input, .em-booking-form-details textarea { width:250px; }
71
- .em-booking-form p { clear:left; }
72
- .em-booking-form label { display:block; float:left; }
73
- .em-booking-form span.input-group input { margin-left:-20px; }
74
- .em-booking-form span.input-group { display:block; margin-left:120px; }
75
- .em-booking-form label { display:inline-block; width:100px; }
76
- .em-booking-form p.input-field-data_privacy_consent label { display:block; width:100%; }
77
- .em-booking-form-details .em-booking-submit { width:auto; }
78
- /* Tickets */
79
- .em-tickets { margin-bottom:20px; }
80
- /* Message Errors */
81
- div.em-booking-message { margin:10px 0px; padding:10px; color:#333; border-radius:3px; }
82
- div.em-booking-message p { margin:10px 0px !important; padding:0px; color:#333; }
83
- div.em-booking-message-success { background-color:#f1fff0; border:1px solid #a8d144; }
84
- div.em-booking-message-error { background-color:#FFEBE8; border:1px solid #C00; }
85
-
 
 
 
 
 
86
  /* Booking admin area */
87
  #em-booking-details .inside { padding:5px 10px; }
88
  .stuffbox .inside h4 { font-size:16px; font-weight:normal; margin:10px 0px 20px; font-weight:bold; }
89
- /* Generic Table Info */
90
- table.em-form-fields td, table.em-form-fields th { text-align:left; vertical-align:top; }
91
- table.em-form-fields th { padding:0px 20px 5px 0px; }
92
- .em-tablenav-pagination.tablenav-pages a { width:auto; padding-top:4px; padding-bottom:5px;}
93
- .em-tablenav-pagination.tablenav-pages .current { font-size:16px; }
94
- /* Ticket table info */
95
- table.em-tickets-bookings-table { width:100%; border:1px #efefef solid; margin:10px 0px; }
96
- table.em-tickets-bookings-table tr.em-hr th { border-top: 1px solid #bbb; }
97
- table.em-tickets-bookings-table tfoot th:first-child { text-align:right; }
98
- table.em-tickets-bookings-table tfoot th:last-child { text-align:right; padding-right:20px; vertical-align:top; }
99
- table.em-tickets-bookings-table tfoot th em { font-size:12px; font-weight:normal; }
100
- table.em-tickets-bookings-table th, table.em-tickets-bookings-table td { padding:5px 5px; margin:0px; }
101
- table.em-tickets-bookings-table thead th, table.em-tickets-bookings-table tfoot th { background:#cdcdcd; text-align:center }
102
- table.em-tickets-bookings-table tbody td.ticket-type { text-align:left; padding-left:10px; }
103
- table.em-tickets-bookings-table tbody td { text-align:center; }
104
- /* Bookings Table */
105
- .em-bookings-table .em-bookings-table-export, .em-bookings-table .em-bookings-table-settings { float:left; display:block; margin:2px 5px; width:25px; height:25px; }
106
- .em-bookings-table .em-bookings-table-export { background:url(../images/csv.png) 0px 0px no-repeat; }
107
- .em-bookings-table .em-bookings-table-settings { background:url(../images/settings.png) 0px 0px no-repeat; }
108
- /* Settings & Export */
109
- #em-bookings-table-export, #em-bookings-table-settings { width:500px; height: 75%; }
110
- #em-bookings-table-export form, #em-bookings-table-settings form { height: 100%; overflow:auto; }
111
- /* Sorting */
112
- .em-bookings-table-overlay ul.em-bookings-cols-sortable { list-style-type: none; margin: 0; padding: 0 0 10px; float: left; margin-right: 10px; }
113
- .em-bookings-table-overlay ul.em-bookings-cols-sortable li { margin: 0 5px 5px 5px; padding: 3px 8px; font-size: 12px; width: 120px; font-weight:none; cursor:move; }
114
- .em-bookings-table-overlay ul.em-bookings-cols-sortable li.ui-state-highlight {}
115
- .em-bookings-table-overlay ul.em-bookings-cols-sortable li.ui-state-default { color:#999; }
116
- #em-bookings-export-cols-inactive, #em-bookings-cols-inactive { width:300px; }
117
- #em-bookings-export-cols-inactive li, #em-bookings-cols-inactive li { float:left; }
118
- /* Single Booking Edit View */
119
- #em-bookings-admin-booking .em-booking-single-info { display:none; }
120
- #em-bookings-admin-booking .em-booking-single-form { padding-right:20px; }
 
 
121
 
122
  /* Google Map Object */
 
 
 
 
 
 
 
 
 
 
123
  #location-balloon-content h3 { background:none; text-shadow:none; }
124
 
125
  /* Options Page */
126
  #em-options-form .inside { border-top: 1px solid #dedede; margin-top:0px; padding-top:10px; }
127
- #em-options-form h3 { font-size:16px; }
128
  #em-options-form td, #em-options-form th { vertical-align:top; }
129
  #em-options-form th { padding: 15px 20px; margin:0 !important; font-size:0.97em; }
130
  #em-options-form .em-boxheader { font-style:italic; margin:0; padding:10px 5px; }
@@ -140,6 +157,7 @@ table.em-caps-table th, table.em-caps-table td { width:auto !important; }
140
  .em-ml-options table { width:95%; }
141
  .em-ml-options table td { padding:0px 0px 5px; margin:0px; }
142
  .em-ml-options .lang { width:100px; }
 
143
 
144
  /* Widget Tables CSS */
145
  .em_obj .table-wrap{
@@ -151,7 +169,7 @@ table.em-caps-table th, table.em-caps-table td { width:auto !important; }
151
  .em-docs > h3 { font-size:18px; display:block; margin-top:50px; }
152
  .em-docs dl, .em-docs h2, .em-docs h3, .em-docs h4, .em-docs dl { clear:left; }
153
  .em-docs dl dt { display:block; float:left; min-width:160px; margin-right:10px; }
154
- .em-docs dl dd { display:block; margin-left:170px; }
155
  .em-docs-atts dl dt { min-width:110px !important; }
156
  .em-docs-atts dl dd { margin-left:120px !important; }
157
 
1
  div#em-loading { position:absolute; width:100%; height:100%; background:#FFFFFF url(../images/loading.gif) 50% 50% no-repeat; left:0px; top:0px; opacity:0.8; filter:alpha(opacity=80); z-index:9999; }
2
+
3
  #location_info td { vertical-align:top; text-align:left; }
4
  #location_info th { vertical-align:top; text-align:left; padding:5px 10px 0 0; }
5
 
8
 
9
  .switch-tab { background: #aaa; width: 100px; float: right; text-align: center; margin: 3px 1px 0 5px; padding: 2px; }
10
  .switch-tab a { color: #fff; text-decoration: none; }
11
+ .switch-tab a:hover { color: #D54E21; }
12
 
13
  #events-pagination { text-align: center; }
14
+ #events-pagination a { margin: 0 20px 0 20px; text-decoration: none; width: 80px; padding: 3px 0; background: #FAF4B7; border: 1px solid #ccc; border-top: none;}
15
  #new-event { float: left; }
16
 
17
  div#icon-events{ background:url('../images/calendar-32.png') no-repeat center; }
25
  /* Events Add Page */
26
  #post-body .misc-pub-post-status.misc-event-duplicate-link:before { content: "\f132"; }
27
  #event-form #event-name, #location-form, #location-name { margin: 2px 0 7px; padding: 6px 5px; width: 98%; }
28
+ /* Recurring Event Rescheduling */
29
+ #event-form .reschedule-hidden, #post .reschedule-hidden { display:none; visibility:hidden; }
30
+ #event-form .em-recurrence-reschedule, #post .em-recurrence-reschedule { padding:15px 20px; border-left: 4px solid #ffa500; }
31
+ #event-form .em-recurrence-reschedule h4, #post .em-recurrence-reschedule h4 { margin-top:0px; }
32
+ #event-form .recurrence-reschedule-warning, #post .recurrence-reschedule-warning { margin-bottom:25px; color:#c45500; }
33
+ #event-form .recurrence-reschedule-warning p, #post .recurrence-reschedule-warning p { margin-top:0px; font-size:14px; }
34
+ /*Locations*/
35
+ div.em-location-data table { float:left; margin:0px 15px 0px 0px; }
36
+ /* Location form */
37
+ div.em-location-data table.em-location-data td, div.em-location-data table.em-location-data th { vertical-align:top; border:none; }
38
+ div.em-location-data table.em-location-data { width:50%; float:left; border:none; }
39
+ div.em-location-data .em-location-map-container, div.em-location-data .em-location-map-404, div.em-location-data .em-location-map-content { width: 400px; height: 300px; float:left; }
40
+ div.em-location-data .em-location-map-404 { vertical-align:middle; text-align: center; }
41
+ /* MS Global Categories */
42
+ .ms-global-categories { line-height:1.8em; }
43
+ /*Bookings */
44
+ #event-rsvp-box { margin:10px; }
45
+ #event-rsvp-options h4 { font-size:14px; }
46
+ #event-rsvp-options label { font-weight:bold; }
47
+ /*Tickets*/
48
+ .em-tickets-row .ticket-status span.ticket_on { display:block; width:10px; height:10px; background:green; }
49
+ .em-tickets-row .ticket-status span.ticket_off { display:block; width:10px; height:10px; background:red; }
50
+ .em-tickets-row .ticket-status span.ticket_new { display:block; width:10px; height:10px; background:grey; }
51
+ #em-tickets-form th { width:auto; }
52
+ #em-tickets-form th.ticket-status { width:20px; }
53
+ /* Ticket Forms */
54
+ .em-ticket-form .ticket-options { margin-top:10px; }
55
+ .em-ticket-form > div > div, #em-tickets-form .ticket-dates > div { clear:both; padding-top:4px; }
56
+ .em-ticket-form label { display:block; float:left; min-width:105px; padding-right:5px; }
57
+ #em-tickets-form .ticket-name input, #em-tickets-form .ticket-description textarea { width:50%}
58
+ #em-tickets-form .em-ticket-form-actions { clear:both; }
59
+ #em-tickets-form .ticket-spaces input, #em-tickets-form .ticket-price input { width:80px; }
60
+ #em-tickets-form .ticket-dates input.em-date-input-loc { width:90px; }
61
+ #em-tickets-form .ticket-dates-from-normal, #em-tickets-form .ticket-dates-from-recurring,
62
+ #em-tickets-form .ticket-dates-to-normal, #em-tickets-form .ticket-dates-to-recurring { display:inline; }
63
+ #em-tickets-form .ticket-required input, #em-tickets-form .ticket-roles input { width:auto; }
64
+ #em-tickets-form .ticket-roles div { margin-left:110px; }
65
 
66
  /* Booking Form */
67
+ .em-booking { margin:15px 0px 10px 0px; position:relative; }
68
+ .em-booking-form { position:relative; clear:left; max-width:1200px; }
69
+ .em-booking-form-details { padding:10px; width:360px; float:left; }
70
+ .em-booking-form-details input.input, .em-booking-form-details textarea { width:250px; }
71
+ .em-booking-form p { clear:left; }
72
+ .em-booking-form label { display:block; float:left; }
73
+ .em-booking-form span.input-group input { margin-left:-20px; }
74
+ .em-booking-form span.input-group { display:block; margin-left:120px; }
75
+ .em-booking-form label { display:inline-block; width:100px; }
76
+ .em-booking-form p.input-field-data_privacy_consent label { display:block; width:100%; }
77
+ .em-booking-form-details .em-booking-submit { width:auto; }
78
+ /* Admin single booking view overrides */
79
+ #em-bookings-admin-booking .em-booking-form .em-form-fields th { max-width:300px; padding:10px 0 0; vertical-align: top; }
80
+ #em-bookings-admin-booking .em-booking-form .em-form-fields td { text-align:left; padding:10px 0 0 20px; }
81
+ #em-bookings-admin-booking .em-booking-form .em-form-fields span.input-group { display:block; margin-left:0; }
82
+ #em-bookings-admin-booking .em-booking-form .em-form-fields span.input-group input { margin-left:0; }
83
+ /* Tickets */
84
+ .em-tickets { margin-bottom:20px; }
85
+ /* Message Errors */
86
+ div.em-booking-message { margin:10px 0px; padding:10px; color:#333; border-radius:3px; }
87
+ div.em-booking-message p { margin:10px 0px !important; padding:0px; color:#333; }
88
+ div.em-booking-message-success { background-color:#f1fff0; border:1px solid #a8d144; }
89
+ div.em-booking-message-error { background-color:#FFEBE8; border:1px solid #C00; }
90
+
91
  /* Booking admin area */
92
  #em-booking-details .inside { padding:5px 10px; }
93
  .stuffbox .inside h4 { font-size:16px; font-weight:normal; margin:10px 0px 20px; font-weight:bold; }
94
+ /* Generic Table Info */
95
+ table.em-form-fields td, table.em-form-fields th { text-align:left; vertical-align:top; }
96
+ table.em-form-fields th { padding:0px 20px 5px 0px; }
97
+ .em-tablenav-pagination.tablenav-pages a { width:auto; padding-top:4px; padding-bottom:5px;}
98
+ .em-tablenav-pagination.tablenav-pages .current { font-size:16px; }
99
+ /* Ticket table info */
100
+ table.em-tickets-bookings-table { width:100%; border:1px #efefef solid; margin:10px 0px; }
101
+ table.em-tickets-bookings-table tr.em-hr th { border-top: 1px solid #bbb; }
102
+ table.em-tickets-bookings-table tfoot th:first-child { text-align:right; }
103
+ table.em-tickets-bookings-table th:last-child, table.em-tickets-bookings-table tbody td:last-child { text-align:right; padding-right:20px; vertical-align:top; }
104
+ table.em-tickets-bookings-table tfoot th em { font-size:12px; font-weight:normal; }
105
+ table.em-tickets-bookings-table th, table.em-tickets-bookings-table td { padding:5px 5px; margin:0px; }
106
+ table.em-tickets-bookings-table thead th, table.em-tickets-bookings-table tfoot th { background:#cdcdcd; text-align:center }
107
+ table.em-tickets-bookings-table tbody td.ticket-type { text-align:left; padding-left:10px; }
108
+ table.em-tickets-bookings-table tbody td { text-align:center; }
109
+ /* Bookings Table */
110
+ .em-bookings-table .em-bookings-table-export, .em-bookings-table .em-bookings-table-settings { float:left; display:block; margin:2px 5px; width:25px; height:25px; }
111
+ .em-bookings-table .em-bookings-table-export { background:url(../images/csv.png) 0px 0px no-repeat; }
112
+ .em-bookings-table .em-bookings-table-settings { background:url(../images/settings.png) 0px 0px no-repeat; }
113
+ /* Settings & Export */
114
+ #em-bookings-table-export, #em-bookings-table-settings { width:500px; height: 75%; }
115
+ #em-bookings-table-export form, #em-bookings-table-settings form { height: 100%; overflow:auto; }
116
+ /* Sorting */
117
+ .em-bookings-table-overlay ul.em-bookings-cols-sortable { list-style-type: none; margin: 0; padding: 0 0 10px; float: left; margin-right: 10px; }
118
+ .em-bookings-table-overlay ul.em-bookings-cols-sortable li { margin: 0 5px 5px 5px; padding: 3px 8px; font-size: 12px; width: 120px; font-weight:none; cursor:move; }
119
+ .em-bookings-table-overlay ul.em-bookings-cols-sortable li.ui-state-highlight {}
120
+ .em-bookings-table-overlay ul.em-bookings-cols-sortable li.ui-state-default { color:#999; }
121
+ #em-bookings-export-cols-inactive, #em-bookings-cols-inactive { width:300px; }
122
+ #em-bookings-export-cols-inactive li, #em-bookings-cols-inactive li { float:left; }
123
+ /* Single Booking Edit View */
124
+ #em-bookings-admin-booking .postbox h3, #em-bookings-admin-booking .stuffbox h3 { font-size:16px; }
125
+ #em-bookings-admin-booking .stuffbox .inside { padding: 0 12px 12px 12px; }
126
+ #em-bookings-admin-booking .em-booking-single-info { display:none; }
127
+ #em-bookings-admin-booking .em-booking-single-form { padding-right:20px; }
128
 
129
  /* Google Map Object */
130
+ #location-balloon-content {
131
+ margin: 0px 0px 0px 0px !important;
132
+ padding: 0px 12px 20px 0px !important;
133
+ font-size: 12px !important;
134
+ color: #000000 !important;
135
+ width: auto !important;
136
+ max-width: none !important;
137
+ height: auto !important;
138
+ max-height: none !important;
139
+ }
140
  #location-balloon-content h3 { background:none; text-shadow:none; }
141
 
142
  /* Options Page */
143
  #em-options-form .inside { border-top: 1px solid #dedede; margin-top:0px; padding-top:10px; }
144
+ #em-options-form h3 { font-size:16px; }
145
  #em-options-form td, #em-options-form th { vertical-align:top; }
146
  #em-options-form th { padding: 15px 20px; margin:0 !important; font-size:0.97em; }
147
  #em-options-form .em-boxheader { font-style:italic; margin:0; padding:10px 5px; }
157
  .em-ml-options table { width:95%; }
158
  .em-ml-options table td { padding:0px 0px 5px; margin:0px; }
159
  .em-ml-options .lang { width:100px; }
160
+ .em-menu-group .postbox.always-open .inside { display:block !important; }
161
 
162
  /* Widget Tables CSS */
163
  .em_obj .table-wrap{
169
  .em-docs > h3 { font-size:18px; display:block; margin-top:50px; }
170
  .em-docs dl, .em-docs h2, .em-docs h3, .em-docs h4, .em-docs dl { clear:left; }
171
  .em-docs dl dt { display:block; float:left; min-width:160px; margin-right:10px; }
172
+ .em-docs dl dd { display:block; margin-left:170px; }
173
  .em-docs-atts dl dt { min-width:110px !important; }
174
  .em-docs-atts dl dd { margin-left:120px !important; }
175
 
includes/js/events-manager.js CHANGED
@@ -671,12 +671,14 @@ jQuery(document).ready( function($){
671
  jQuery('input#location-state').val(ui.item.state);
672
  jQuery('input#location-region').val(ui.item.region);
673
  jQuery('input#location-postcode').val(ui.item.postcode);
 
 
674
  if( ui.item.country == '' ){
675
  jQuery('select#location-country option:selected').removeAttr('selected');
676
  }else{
677
  jQuery('select#location-country option[value="'+ui.item.country+'"]').attr('selected', 'selected');
678
  }
679
- jQuery('div.em-location-data input, div.em-location-data select').css('background-color','#ccc').attr('readonly','readonly');
680
  jQuery('#em-location-reset').show();
681
  jQuery('#em-location-search-tip').hide();
682
  jQuery(document).triggerHandler('em_locations_autocomplete_selected', [event, ui]);
@@ -687,7 +689,7 @@ jQuery(document).ready( function($){
687
  return jQuery( "<li></li>" ).data( "item.autocomplete", item ).append(html_val).appendTo( ul );
688
  };
689
  jQuery('#em-location-reset a').click( function(){
690
- jQuery('div.em-location-data input').css('background-color','#fff').val('').removeAttr('readonly');
691
  jQuery('div.em-location-data select').css('background-color','#fff');
692
  jQuery('div.em-location-data option:selected').removeAttr('selected');
693
  jQuery('input#location-id').val('');
@@ -703,12 +705,12 @@ jQuery(document).ready( function($){
703
  return false;
704
  });
705
  if( jQuery('input#location-id').val() != '0' && jQuery('input#location-id').val() != '' ){
706
- jQuery('div.em-location-data input, div.em-location-data select').css('background-color','#ccc').attr('readonly','readonly');
707
  jQuery('#em-location-reset').show();
708
  jQuery('#em-location-search-tip').hide();
709
  }
710
  }
711
-
712
  });
713
 
714
  function em_load_jquery_css(){
@@ -724,7 +726,7 @@ function em_load_jquery_css(){
724
  function em_setup_datepicker(wrap){
725
  wrap = jQuery(wrap);
726
  //default picker vals
727
- var datepicker_vals = { altFormat: "yy-mm-dd", changeMonth: true, changeYear: true, firstDay : EM.firstDay, yearRange:'-100:+10' };
728
  if( EM.dateFormat ) datepicker_vals.dateFormat = EM.dateFormat;
729
  if( EM.yearRange ) datepicker_vals.yearRange = EM.yearRange;
730
  jQuery(document).triggerHandler('em_datepicker', datepicker_vals);
@@ -855,9 +857,9 @@ function em_maps_load(){
855
  script.id = "google-maps";
856
  var proto = (EM.is_ssl) ? 'https:' : 'http:';
857
  if( typeof EM.google_maps_api !== 'undefined' ){
858
- script.src = proto + '//maps.google.com/maps/api/js?v=3&libraries=places&callback=em_maps&key='+EM.google_maps_api;
859
  }else{
860
- script.src = proto + '//maps.google.com/maps/api/js?v=3&libraries=places&callback=em_maps';
861
  }
862
  document.body.appendChild(script);
863
  }else if( typeof google === 'object' && typeof google.maps === 'object' && !em_maps_loaded ){
@@ -1027,6 +1029,7 @@ function em_maps() {
1027
  jQuery('#location-select-id, input#location-id').change( function(){get_map_by_id(jQuery(this).val());} );
1028
  jQuery('#location-name, #location-town, #location-address, #location-state, #location-postcode, #location-country').change( function(){
1029
  //build address
 
1030
  var addresses = [ jQuery('#location-address').val(), jQuery('#location-town').val(), jQuery('#location-state').val(), jQuery('#location-postcode').val() ];
1031
  var address = '';
1032
  jQuery.each( addresses, function(i, val){
671
  jQuery('input#location-state').val(ui.item.state);
672
  jQuery('input#location-region').val(ui.item.region);
673
  jQuery('input#location-postcode').val(ui.item.postcode);
674
+ jQuery('input#location-latitude').val(ui.item.latitude);
675
+ jQuery('input#location-longitude').val(ui.item.longitude);
676
  if( ui.item.country == '' ){
677
  jQuery('select#location-country option:selected').removeAttr('selected');
678
  }else{
679
  jQuery('select#location-country option[value="'+ui.item.country+'"]').attr('selected', 'selected');
680
  }
681
+ jQuery('div.em-location-data input, div.em-location-data select').css('background-color','#ccc').prop('readonly', true);
682
  jQuery('#em-location-reset').show();
683
  jQuery('#em-location-search-tip').hide();
684
  jQuery(document).triggerHandler('em_locations_autocomplete_selected', [event, ui]);
689
  return jQuery( "<li></li>" ).data( "item.autocomplete", item ).append(html_val).appendTo( ul );
690
  };
691
  jQuery('#em-location-reset a').click( function(){
692
+ jQuery('div.em-location-data input').css('background-color','#fff').val('').prop('readonly', false);
693
  jQuery('div.em-location-data select').css('background-color','#fff');
694
  jQuery('div.em-location-data option:selected').removeAttr('selected');
695
  jQuery('input#location-id').val('');
705
  return false;
706
  });
707
  if( jQuery('input#location-id').val() != '0' && jQuery('input#location-id').val() != '' ){
708
+ jQuery('div.em-location-data input, div.em-location-data select').css('background-color','#ccc').prop('readonly', true);
709
  jQuery('#em-location-reset').show();
710
  jQuery('#em-location-search-tip').hide();
711
  }
712
  }
713
+ jQuery(document).triggerHandler('em_javascript_loaded');
714
  });
715
 
716
  function em_load_jquery_css(){
726
  function em_setup_datepicker(wrap){
727
  wrap = jQuery(wrap);
728
  //default picker vals
729
+ var datepicker_vals = { altFormat: "yy-mm-dd", changeMonth: true, changeYear: true, firstDay : EM.firstDay, yearRange:'c-100:c+15' };
730
  if( EM.dateFormat ) datepicker_vals.dateFormat = EM.dateFormat;
731
  if( EM.yearRange ) datepicker_vals.yearRange = EM.yearRange;
732
  jQuery(document).triggerHandler('em_datepicker', datepicker_vals);
857
  script.id = "google-maps";
858
  var proto = (EM.is_ssl) ? 'https:' : 'http:';
859
  if( typeof EM.google_maps_api !== 'undefined' ){
860
+ script.src = proto + '//maps.google.com/maps/api/js?v=quarterly&libraries=places&callback=em_maps&key='+EM.google_maps_api;
861
  }else{
862
+ script.src = proto + '//maps.google.com/maps/api/js?v=quarterly&libraries=places&callback=em_maps';
863
  }
864
  document.body.appendChild(script);
865
  }else if( typeof google === 'object' && typeof google.maps === 'object' && !em_maps_loaded ){
1029
  jQuery('#location-select-id, input#location-id').change( function(){get_map_by_id(jQuery(this).val());} );
1030
  jQuery('#location-name, #location-town, #location-address, #location-state, #location-postcode, #location-country').change( function(){
1031
  //build address
1032
+ if( $(this).prop('readonly') === true ) return;
1033
  var addresses = [ jQuery('#location-address').val(), jQuery('#location-town').val(), jQuery('#location-state').val(), jQuery('#location-postcode').val() ];
1034
  var address = '';
1035
  jQuery.each( addresses, function(i, val){
readme.txt CHANGED
@@ -3,9 +3,10 @@ Contributors: netweblogic, nutsmuggler
3
  Donate link: http://wp-events-plugin.com
4
  Tags: bookings, calendar, tickets, events, buddypress, event management, google maps, maps, locations, registration
5
  Text Domain: events-manager
6
- Requires at least: 3.5
7
- Tested up to: 4.9.6
8
- Stable tag: 5.9.5
 
9
 
10
  Fully featured event registration management including recurring events, locations management, calendar, Google map integration, booking management
11
 
@@ -110,6 +111,58 @@ See our [FAQ](http://wp-events-plugin.com/documentation/faq/) page, which is upd
110
  6. Manage attendees with various booking reports
111
 
112
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  = 5.9.5 =
114
  * added new Google Maps display options to help prevent cost increases
115
  * fixed booking status emails getting resent when attempting to change status to same status
3
  Donate link: http://wp-events-plugin.com
4
  Tags: bookings, calendar, tickets, events, buddypress, event management, google maps, maps, locations, registration
5
  Text Domain: events-manager
6
+ Requires at least: 4.8
7
+ Tested up to: 5.3
8
+ Stable tag: 5.9.6
9
+ Requires PHP: 5.3
10
 
11
  Fully featured event registration management including recurring events, locations management, calendar, Google map integration, booking management
12
 
111
  6. Manage attendees with various booking reports
112
 
113
  == Changelog ==
114
+ = 5.9.6 =
115
+ * fixed monthly recurrence pattern issues with PHP <5.6
116
+ * fixed multiple minor PHP Warnings including Countable errors when saving a booking in PHP 7.2+
117
+ * added em_bookings_table_get_bookings_args filter, allowing ordering and more for bookings admin tables
118
+ * added Faroe Islands to countries list
119
+ * added custom dataset variable for EM_Options, added ability to save dbem_data array options in settings page
120
+ * fixed publishing issues with long multibyte character post titles in recurring events
121
+ * added em_mailer_before_send action to EM_Mailer->send() just before a mail is sent
122
+ * added em_javascript_loaded jQuery trigger
123
+ * added ability to send attachments via WP_Mail in EM_Mailer::send(), provided the transport used by it allows
124
+ * added recurring event placeholders #_RECURRINGDATERANGE, #_RECURRINGPATTERN, #_RECURRINGID
125
+ * fixed incorrectly named #_EDITLOCATIONURL and #_EDITLOCATIONLINK which were previouly (and still are) working under #_LOCATIONEDITLINK and #_LOCATIONEDITURL
126
+ * fixed pagination for calendar day archives when formatting is disabled
127
+ * added custom tabs hooks to settings page (including multisite which now has a default single tab)
128
+ * added id property to each EM_Admin_Notice that is output to screen
129
+ * optimized EM_Admin_Notices::add() so that strings are assumed to be hooks and no extra logic necessary to register the notice initially
130
+ * added em_booking_pre_calculate_price hook
131
+ * fixed potential PHP warning when editing other CPTs with galleries
132
+ * fixed some incorrect ticket end times related to saving rsvp end dates for recurring events in single ticket mode with blank end dates/times
133
+ * fixed inconsistent rsvp_end __set() compared to end and start properties,
134
+ * fixed event rsvp ending at 12:00 instead of event time when no date is supplied in single ticket mode,
135
+ * unified PHP get_post logic of start/end date/time recurrence info for tickets to reduce redundant code
136
+ * fixed invalid rsvp end date persisting unless changed when first saving an event with blank start date
137
+ * **potentially-breaking for custom code email filters** changed $output_type/$target method param in EM_Booking::email() calls to EM_Booking::output() function calls to 'email', use get_option('dbem_smtp_html') to determine whether to use HTML or not if using that format
138
+ * changed event category/tag and location lists to not include pagination in emails due to lack of predictability for pagination links
139
+ * added css tweaks to to admin single booking view and modify booking form in dashboard area
140
+ * fixed lack or confirm-redirect for no-user booking personal details editor when viewing a single booking
141
+ * fixed edit/delete links showing in post admin lists to users without the right caps (clicking these links had no result)
142
+ * added some strict_type future-proofing to EM_DateTime class
143
+ * added em_event_detach and em_event_attach filters
144
+ * fixed location coordinates not being supplied for examct Gmap pin placement when auto-complete attaching a location to an event,
145
+ * fixed double google API call when choosing an existing location via auto-complete search
146
+ * changed #_LOCATIONMAP so no 'map unavailable' messgage is shown if google maps are disabled
147
+ * fixed google maps location bubble CSS formatting issues in admin area
148
+ * changed datepicker to show relative year range dropdown selector according to currently selected date, allowing for flexible year selection
149
+ * fixed potential stored XSS vulnerability, many thanks to Tobias Fink of SBA-Research for a good eye and responsible (pending) disclosure
150
+ * fixed lack of validation when submitting tickets with higher min spaces than max spaces allowed in the ticket
151
+ * added username to exportable/viewable field columns in booking admin
152
+ * fixed embedded maps display errors when there is an & character in name or address
153
+ * fixed certain recurrence patterns with "last x of the month" skipping months
154
+ * fixed recurring events showing location meta boxes and columns when locations are disabled
155
+ * fixed event count not showing up in event profile tab
156
+ * fixed events admin table front-end showing location column when locations disabled,
157
+ * fixed location placeholders getting processed if locations are disabled
158
+ * fixed yearly recurring events not working for any value other than 1 yearly interval
159
+ * fixed precision inconsistencies between location coordinates in wp_postmeta and wp_em_locations by changing mysql FLOAT to DECIMAL and rounding numbers on $_POST retrieval
160
+ * fixed ticket prices input/display in event admin not accepting localized decimal separators
161
+ * fixed minor CSS validation errors in events_manager.css
162
+ * fixed #_BOOKINGDATE not working on first automated sent email
163
+ * fixed port assignation errors in SMTP mail settings
164
+ * pre-emptively hardened some lines of code as recommended by the wordpress security team
165
+
166
  = 5.9.5 =
167
  * added new Google Maps display options to help prevent cost increases
168
  * fixed booking status emails getting resent when attempting to change status to same status
templates/buddypress/profile.php CHANGED
@@ -12,7 +12,6 @@ if( user_can($bp->displayed_user->id,'edit_events') ){
12
  'format' => get_option('dbem_bp_events_list_format'),
13
  'format_footer' => get_option('dbem_bp_events_list_format_footer'),
14
  'no_results_msg' => false,
15
- 'owner' => $bp->displayed_user->id,
16
  'pagination'=>1
17
  );
18
  $args['limit'] = !empty($args['limit']) ? $args['limit'] : get_option('dbem_events_default_limit');
12
  'format' => get_option('dbem_bp_events_list_format'),
13
  'format_footer' => get_option('dbem_bp_events_list_format_footer'),
14
  'no_results_msg' => false,
 
15
  'pagination'=>1
16
  );
17
  $args['limit'] = !empty($args['limit']) ? $args['limit'] : get_option('dbem_events_default_limit');
templates/forms/event/bookings-ticket-form.php CHANGED
@@ -3,7 +3,7 @@
3
  * Used for both multiple and single tickets. $col_count will always be 1 in single ticket mode, and be a unique number for each ticket starting from 1
4
  * This form should have $EM_Ticket and $col_count available globally.
5
  */
6
- global $col_count, $EM_Ticket;
7
  $col_count = absint($col_count); //now we know it's a number
8
  ?>
9
  <div class="em-ticket-form">
@@ -17,7 +17,7 @@ $col_count = absint($col_count); //now we know it's a number
17
  <label><?php esc_html_e('Description','events-manager') ?></label>
18
  <textarea name="em_tickets[<?php echo $col_count; ?>][ticket_description]" class="ticket_description"><?php echo esc_html(wp_unslash($EM_Ticket->ticket_description)) ?></textarea>
19
  </div>
20
- <div class="ticket-price"><label><?php esc_html_e('Price','events-manager') ?></label><input type="text" name="em_tickets[<?php echo $col_count; ?>][ticket_price]" class="ticket_price" value="<?php echo esc_attr($EM_Ticket->get_price_precise()) ?>" /></div>
21
  <div class="ticket-spaces">
22
  <label title="<?php esc_attr_e('Enter a maximum number of spaces (required).','events-manager'); ?>"><?php esc_html_e('Spaces','events-manager') ?></label>
23
  <input type="text" name="em_tickets[<?php echo $col_count; ?>][ticket_spaces]" value="<?php echo esc_attr($EM_Ticket->ticket_spaces) ?>" class="ticket_spaces" />
@@ -44,7 +44,7 @@ $col_count = absint($col_count); //now we know it's a number
44
  <input type="hidden" name="em_tickets[<?php echo $col_count; ?>][ticket_start]" class="em-date-input ticket_start" value="<?php echo ( !empty($EM_Ticket->ticket_start) ) ? $EM_Ticket->start()->format("Y-m-d"):''; ?>" />
45
  </div>
46
  <div class="ticket-dates-from-recurring">
47
- <input type="text" name="em_tickets[<?php echo $col_count; ?>][ticket_start_recurring_days]" size="3" value="<?php if( !empty($EM_Ticket->ticket_meta['recurrences']) && is_numeric($EM_Ticket->ticket_meta['recurrences']['start_days'])) echo absint($EM_Ticket->ticket_meta['recurrences']['start_days']); ?>" />
48
  <?php esc_html_e('day(s)','events-manager'); ?>
49
  <select name="em_tickets[<?php echo $col_count; ?>][ticket_start_recurring_when]" class="ticket-dates-from-recurring-when">
50
  <option value="before" <?php if( isset($EM_Ticket->ticket_meta['recurrences']['start_days']) && $EM_Ticket->ticket_meta['recurrences']['start_days'] <= 0) echo 'selected="selected"'; ?>><?php echo esc_html(sprintf(_x('%s the event starts','before or after','events-manager'),__('Before','events-manager'))); ?></option>
3
  * Used for both multiple and single tickets. $col_count will always be 1 in single ticket mode, and be a unique number for each ticket starting from 1
4
  * This form should have $EM_Ticket and $col_count available globally.
5
  */
6
+ global $col_count, $EM_Ticket; /* @var EM_Ticket $EM_Ticket */
7
  $col_count = absint($col_count); //now we know it's a number
8
  ?>
9
  <div class="em-ticket-form">
17
  <label><?php esc_html_e('Description','events-manager') ?></label>
18
  <textarea name="em_tickets[<?php echo $col_count; ?>][ticket_description]" class="ticket_description"><?php echo esc_html(wp_unslash($EM_Ticket->ticket_description)) ?></textarea>
19
  </div>
20
+ <div class="ticket-price"><label><?php esc_html_e('Price','events-manager') ?></label><input type="text" name="em_tickets[<?php echo $col_count; ?>][ticket_price]" class="ticket_price" value="<?php echo esc_attr($EM_Ticket->get_price_precise(true)) ?>" /></div>
21
  <div class="ticket-spaces">
22
  <label title="<?php esc_attr_e('Enter a maximum number of spaces (required).','events-manager'); ?>"><?php esc_html_e('Spaces','events-manager') ?></label>
23
  <input type="text" name="em_tickets[<?php echo $col_count; ?>][ticket_spaces]" value="<?php echo esc_attr($EM_Ticket->ticket_spaces) ?>" class="ticket_spaces" />
44
  <input type="hidden" name="em_tickets[<?php echo $col_count; ?>][ticket_start]" class="em-date-input ticket_start" value="<?php echo ( !empty($EM_Ticket->ticket_start) ) ? $EM_Ticket->start()->format("Y-m-d"):''; ?>" />
45
  </div>
46
  <div class="ticket-dates-from-recurring">
47
+ <input type="text" name="em_tickets[<?php echo $col_count; ?>][ticket_start_recurring_days]" size="3" value="<?php if( !empty($EM_Ticket->ticket_meta['recurrences']['start_days']) && is_numeric($EM_Ticket->ticket_meta['recurrences']['start_days'])) echo absint($EM_Ticket->ticket_meta['recurrences']['start_days']); ?>" />
48
  <?php esc_html_e('day(s)','events-manager'); ?>
49
  <select name="em_tickets[<?php echo $col_count; ?>][ticket_start_recurring_when]" class="ticket-dates-from-recurring-when">
50
  <option value="before" <?php if( isset($EM_Ticket->ticket_meta['recurrences']['start_days']) && $EM_Ticket->ticket_meta['recurrences']['start_days'] <= 0) echo 'selected="selected"'; ?>><?php echo esc_html(sprintf(_x('%s the event starts','before or after','events-manager'),__('Before','events-manager'))); ?></option>
templates/forms/event/bookings.php CHANGED
@@ -96,7 +96,7 @@ $reschedule_warnings = !empty($EM_Event->event_id) && $EM_Event->is_recurring()
96
  </div>
97
  </td>
98
  <td class="ticket-price">
99
- <span class="ticket_price"><?php echo ($EM_Ticket->ticket_price) ? esc_html($EM_Ticket->get_price_precise()) : esc_html__('Free','events-manager'); ?></span>
100
  </td>
101
  <td class="ticket-limit">
102
  <span class="ticket_min">
96
  </div>
97
  </td>
98
  <td class="ticket-price">
99
+ <span class="ticket_price"><?php echo ($EM_Ticket->ticket_price) ? esc_html($EM_Ticket->get_price_precise(true)) : esc_html__('Free','events-manager'); ?></span>
100
  </td>
101
  <td class="ticket-limit">
102
  <span class="ticket_min">
templates/placeholders/bookingform.php CHANGED
@@ -26,9 +26,10 @@ if( !$is_open && !is_user_logged_in() && $EM_Event->get_bookings()->is_open(true
26
  }
27
  ?>
28
  <div id="em-booking" class="em-booking <?php if( get_option('dbem_css_rsvp') ) echo 'css-booking'; ?>">
29
- <?php
30
  // We are firstly checking if the user has already booked a ticket at this event, if so offer a link to view their bookings.
31
  $EM_Booking = $EM_Event->get_bookings()->has_booking();
 
32
  ?>
33
  <?php if( is_object($EM_Booking) && !get_option('dbem_bookings_double') ): //Double bookings not allowed ?>
34
  <p>
@@ -46,6 +47,7 @@ if( !$is_open && !is_user_logged_in() && $EM_Event->get_bookings()->is_open(true
46
  <?php if( $tickets_count > 0) : ?>
47
  <?php //Tickets exist, so we show a booking form. ?>
48
  <form class="em-booking-form" name='booking-form' method='post' action='<?php echo apply_filters('em_booking_form_action_url',''); ?>#em-booking'>
 
49
  <input type='hidden' name='action' value='booking_add'/>
50
  <input type='hidden' name='event_id' value='<?php echo $EM_Event->get_bookings()->event_id; ?>'/>
51
  <input type='hidden' name='_wpnonce' value='<?php echo wp_create_nonce('booking_add'); ?>'/>
@@ -105,4 +107,5 @@ if( !$is_open && !is_user_logged_in() && $EM_Event->get_bookings()->is_open(true
105
  <br class="clear" style="clear:left;" />
106
  <?php endif; ?>
107
  <?php endif; ?>
 
108
  </div>
26
  }
27
  ?>
28
  <div id="em-booking" class="em-booking <?php if( get_option('dbem_css_rsvp') ) echo 'css-booking'; ?>">
29
+ <?php
30
  // We are firstly checking if the user has already booked a ticket at this event, if so offer a link to view their bookings.
31
  $EM_Booking = $EM_Event->get_bookings()->has_booking();
32
+ do_action('em_booking_form_top');
33
  ?>
34
  <?php if( is_object($EM_Booking) && !get_option('dbem_bookings_double') ): //Double bookings not allowed ?>
35
  <p>
47
  <?php if( $tickets_count > 0) : ?>
48
  <?php //Tickets exist, so we show a booking form. ?>
49
  <form class="em-booking-form" name='booking-form' method='post' action='<?php echo apply_filters('em_booking_form_action_url',''); ?>#em-booking'>
50
+ <?php do_action('em_booking_form_header'); ?>
51
  <input type='hidden' name='action' value='booking_add'/>
52
  <input type='hidden' name='event_id' value='<?php echo $EM_Event->get_bookings()->event_id; ?>'/>
53
  <input type='hidden' name='_wpnonce' value='<?php echo wp_create_nonce('booking_add'); ?>'/>
107
  <br class="clear" style="clear:left;" />
108
  <?php endif; ?>
109
  <?php endif; ?>
110
+ <?php do_action('em_booking_form_bottom'); ?>
111
  </div>
templates/placeholders/locationmap.php CHANGED
@@ -20,7 +20,7 @@
20
  $map_url = $EM_Location->get_google_maps_embed_url();
21
  ?>
22
  <div class="em-location-map-container" style='position:relative; background: #CDCDCD; width: <?php echo $width ?>; height: <?php echo $height ?>;'>
23
- <iframe style="width:100%; height:100%;" frameborder="0" style="border:0" src="<?php echo esc_attr($map_url); ?>" allowfullscreen></iframe>
24
  </div>
25
  <?php
26
  }else{
20
  $map_url = $EM_Location->get_google_maps_embed_url();
21
  ?>
22
  <div class="em-location-map-container" style='position:relative; background: #CDCDCD; width: <?php echo $width ?>; height: <?php echo $height ?>;'>
23
+ <iframe style="width:100%; height:100%; border:0;" src="<?php echo esc_attr($map_url); ?>" allowfullscreen></iframe>
24
  </div>
25
  <?php
26
  }else{
templates/tables/events.php CHANGED
@@ -63,7 +63,9 @@
63
  */ ?>
64
  <th><?php _e ( 'Name', 'events-manager'); ?></th>
65
  <th>&nbsp;</th>
 
66
  <th><?php _e ( 'Location', 'events-manager'); ?></th>
 
67
  <th colspan="2"><?php _e ( 'Date and time', 'events-manager'); ?></th>
68
  </tr>
69
  </thead>
@@ -74,7 +76,6 @@
74
  /* @var $EM_Event EM_Event */
75
  $rowno++;
76
  $class = ($rowno % 2) ? 'alternate' : '';
77
- $location_summary = "<b>" . esc_html($EM_Event->get_location()->location_name) . "</b><br/>" . esc_html($EM_Event->get_location()->location_address) . " - " . esc_html($EM_Event->get_location()->location_town);
78
 
79
  if( $EM_Event->start()->getTimestamp() < time() && $EM_Event->end()->getTimestamp() < time() ){
80
  $class .= " past";
@@ -116,9 +117,11 @@
116
  <strong>+</strong>
117
  </a>
118
  </td>
 
119
  <td>
120
- <?php echo $location_summary; ?>
121
  </td>
 
122
  <td>
123
  <?php echo $EM_Event->output_dates(); ?>
124
  <br />
63
  */ ?>
64
  <th><?php _e ( 'Name', 'events-manager'); ?></th>
65
  <th>&nbsp;</th>
66
+ <?php if( get_option('dbem_locations_enabled') ): ?>
67
  <th><?php _e ( 'Location', 'events-manager'); ?></th>
68
+ <?php endif; ?>
69
  <th colspan="2"><?php _e ( 'Date and time', 'events-manager'); ?></th>
70
  </tr>
71
  </thead>
76
  /* @var $EM_Event EM_Event */
77
  $rowno++;
78
  $class = ($rowno % 2) ? 'alternate' : '';
 
79
 
80
  if( $EM_Event->start()->getTimestamp() < time() && $EM_Event->end()->getTimestamp() < time() ){
81
  $class .= " past";
117
  <strong>+</strong>
118
  </a>
119
  </td>
120
+ <?php if( get_option('dbem_locations_enabled') ): ?>
121
  <td>
122
+ <?php echo "<b>" . esc_html($EM_Event->get_location()->location_name) . "</b><br/>" . esc_html($EM_Event->get_location()->location_address) . " - " . esc_html($EM_Event->get_location()->location_town); ?>
123
  </td>
124
+ <?php endif; ?>
125
  <td>
126
  <?php echo $EM_Event->output_dates(); ?>
127
  <br />
templates/templates/bookings-event-printable.php CHANGED
@@ -11,7 +11,7 @@ global $EM_Event;
11
  <head>
12
  <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
13
  <title><?php echo sprintf(__('Bookings for %s','events-manager'), $EM_Event->name); ?></title>
14
- <link rel="stylesheet" href="<?php echo bloginfo('wpurl') ?>/wp-content/plugins/events-manager/includes/css/events_manager.css" type="text/css" media="screen" />
15
  </head>
16
  <body id="printable">
17
  <div id="container">
11
  <head>
12
  <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
13
  <title><?php echo sprintf(__('Bookings for %s','events-manager'), $EM_Event->name); ?></title>
14
+ <link rel="stylesheet" href="<?php echo EM_DIR_URI; ?>includes/css/events_manager.css" type="text/css" media="screen" />
15
  </head>
16
  <body id="printable">
17
  <div id="container">