예제 #1
0
function eme_get_all_caps() {
   global $wp_roles;
   $caps = array();
   $capabilities = array();

   foreach ( $wp_roles->roles as $role ) {
      if ($role['capabilities']) {
         foreach ( $role['capabilities'] as $cap=>$val ) {
           if (!preg_match("/^level/",$cap))
	      $capabilities[$cap]=eme_capNamesCB($cap);
         }
      }
   }

#   $sys_caps = get_option('syscaps');
#   if ( is_array($sys_caps) ) {
#      $capabilities = array_merge($sys_caps, $capabilities);
#   }

   asort($capabilities);
   return $capabilities;
}
예제 #2
0
function eme_options_page() {
   global $plugin_page;
   if ($plugin_page == 'eme-options') {
      $tab = isset( $_GET['tab'] ) ? esc_attr($_GET['tab']) : 'general';
      eme_admin_tabs($tab);
   ?>
<div class="wrap">
<div id='icon-options-general' class='icon32'><br />
</div>
<h1><?php _e ( 'Event Manager Options', 'eme' ); ?></h1>
<?php admin_show_warnings();?>
<p> 
<?php printf(__( "Please also check <a href='%s'>your profile</a> for some per-user EME settings.", 'eme' ),admin_url('profile.php')); ?>
</p>
<form id="eme_options_form" method="post" action="options.php">
<input type='hidden' name='tab' value='<?php echo $tab;?>' />
<?php
   settings_fields ( 'eme-options' );
   switch ( $tab ) {
	      case 'general' :
?>

<h3><?php _e ( 'General options', 'eme' ); ?></h3>
<table class="form-table">
   <?php
   eme_options_radio_binary ( __ ( 'Use dropdown for locations?' ), 'eme_use_select_for_locations', __ ( 'Select yes to select location from a drop-down menu; location selection will be faster, but you will lose the ability to insert locations with events.','eme' )."<br />".__ ( 'When the qtranslate plugin is installed and activated, this setting will be ignored and always considered \'Yes\'.','eme' ) );
   eme_options_radio_binary ( __ ( 'Use recurrence?' ), 'eme_recurrence_enabled', __ ( 'Select yes to enable the possibility to create recurrent events.','eme' ) ); 
   eme_options_radio_binary ( __ ( 'Use RSVP?' ), 'eme_rsvp_enabled', __ ( 'Select yes to enable the RSVP feature so people can register for an event and book places.','eme' ) );
   eme_options_radio_binary ( __ ( 'Use categories?' ), 'eme_categories_enabled', __ ( 'Select yes to enable the category features.','eme' ) );
   eme_options_radio_binary ( __ ( 'Use attributes?' ), 'eme_attributes_enabled', __ ( 'Select yes to enable the attributes feature.','eme' ) );
   eme_options_radio_binary ( __ ( 'Enable Google Maps integration?' ), 'eme_gmap_is_active', __ ( 'Check this option to enable Google Map integration.','eme' ) );
   eme_options_radio_binary ( __ ( 'Enable map scroll-wheel zooming?' ), 'eme_gmap_zooming', __ ( 'Yes, enables map scroll-wheel zooming. No, enables scroll-wheel page scrolling over maps. (It will be necessary to refresh your web browser on a map page to see the effect of this change.)', 'eme' ) );
   eme_options_radio_binary ( __ ( 'Always include JS in header?' ), 'eme_load_js_in_header', __ ( 'Some themes are badely designed and can have issues showing the google maps or advancing in the calendar. If so, try activating this option which will cause the javascript to always be included in the header of every page (off by default).','eme' ) );
   eme_options_radio_binary ( __ ( 'Use the client computer clock for the calendar', 'eme' ), 'eme_use_client_clock', __ ( 'Check this option if you want to use the clock of the client as base to calculate current day for the calendar.', 'eme' ) );
   eme_options_select ( __('Theme loop protection','eme'), 'eme_loop_protection', array ('simple' => __('Simple loop protection (default)','eme'), 'older' => __ ( 'Loop protection for older or misbehaving themes', 'eme' ), 'desperate' => __('Last attempt at loop protection (if all else fails)','eme')), __('Choose the level of loop protection against the_content filter you want. Depending on the theme you may need to change this.','eme') );
   eme_options_radio_binary ( __ ( 'Delete all EME data when upgrading or deactivating?', 'eme' ), 'eme_uninstall_drop_data', __ ( 'Check this option if you want to delete all EME data (database tables and options) when upgrading or deactivating the plugin.', 'eme' ) );
   eme_options_radio_binary ( __ ( 'Enable shortcodes in widgets', 'eme' ), 'eme_shortcodes_in_widgets', __ ( 'Check this option if you want to enable the use of shortcodes in widgets (affects shortcodes of any plugin used in widgets, so use with care).', 'eme' ) );
   eme_options_radio_binary ( __ ( 'Enable placeholders in event notes', 'eme' ), 'eme_enable_notes_placeholders', __ ( 'Check this option if you want to enable the use of placeholders in the event notes. By default placeholders in notes are not being touched at all so as not to interfere with possible format settings for other shortcodes you can/want to use, so use with care.', 'eme' ) );
   eme_options_radio_binary ( __ ( 'Allow deprecated placeholders', 'eme' ), 'eme_deprecated', __ ( 'Check this option if you want to use some deprecated placeholders.', 'eme' ) .' '.__('For more information, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?p=51559'>".__('the documentation', 'eme').'</a>' );
   eme_options_radio_binary ( __ ( 'Re-enable legacy placeholder syntax', 'eme' ), 'eme_legacy', __ ( 'Check this option if you want to re-enable the use of the older placeholder syntax with square brackets. Be aware of the fact that the new placeholder syntax will not work then.', 'eme' ) .' '.__('For more information, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?p=51559'>".__('the documentation', 'eme').'</a>' );
   ?>
</table>

<?php
	      break;
	      case 'seo' :
?>

<h3><?php _e ( 'Permalink options', 'eme' ); ?></h3>
<table class="form-table">
   <?php
   eme_options_radio_binary ( __ ( 'Enable event permalinks if possible?','eme' ), 'eme_seo_permalink', __ ( 'If Yes, EME will render SEO permalinks if permalinks are activated.', 'eme' ) . "<br \><strong>" . __ ( 'It is necessary to click \'Save Changes\' on the  WordPress \'Settings/Permalinks\' page before you will see the effect of this change.','eme' )."</strong>");
   eme_options_input_text ( __('Events permalink prefix', 'eme' ), 'eme_permalink_events_prefix', __( 'The permalink prefix used for events and the calendar.','eme') );
   eme_options_input_text ( __('Locations permalink prefix', 'eme' ), 'eme_permalink_locations_prefix', __( 'The permalink prefix used for locations.','eme') );
   ?>
</table>

<?php
	      break;
	      case 'access' :
?>

<h3><?php _e ( 'Access rights', 'eme' ); ?></h3>
<p><?php _e ( 'Tip: Use a plugin like "User Role Editor" to add/edit capabilities and roles.', 'eme' ); ?></p>
<table class="form-table">
   <?php
   eme_options_select (__('Add event','eme'), 'eme_cap_add_event', eme_get_all_caps (), sprintf(__('Permission needed to add a new event. Default: %s','eme'), eme_capNamesCB(DEFAULT_CAP_ADD_EVENT)) );
   eme_options_select (__('Author event','eme'), 'eme_cap_author_event', eme_get_all_caps (), sprintf(__('Permission needed to edit own events. Default: %s','eme'), eme_capNamesCB(DEFAULT_CAP_AUTHOR_EVENT)) );
   eme_options_select (__('Publish event','eme'), 'eme_cap_publish_event', eme_get_all_caps (), sprintf(__('Permission needed to make an event public. Default: %s','eme'), eme_capNamesCB(DEFAULT_CAP_PUBLISH_EVENT)) );
   eme_options_select (__('List events','eme'), 'eme_cap_list_events', eme_get_all_caps (), sprintf(__('Permission needed to just list all events, useful for CSV exports for bookings and such. Default: %s','eme'), eme_capNamesCB(DEFAULT_CAP_LIST_EVENTS)) . "<br /><b>". __('All your event admins need this as well, otherwise the menu will not show.','eme')."</b>" );
   eme_options_select (__('Edit events','eme'), 'eme_cap_edit_events', eme_get_all_caps (), sprintf(__('Permission needed to edit all events. Default: %s','eme'), eme_capNamesCB(DEFAULT_CAP_EDIT_EVENTS)) );
   eme_options_select (__('Add location','eme'), 'eme_cap_add_locations', eme_get_all_caps (), sprintf(__('Permission needed to add locations. Default: %s','eme'), eme_capNamesCB(DEFAULT_CAP_ADD_LOCATION)) );
   eme_options_select (__('Author location','eme'), 'eme_cap_author_locations', eme_get_all_caps (), sprintf(__('Permission needed to edit own locations. Default: %s','eme'), eme_capNamesCB(DEFAULT_CAP_AUTHOR_LOCATION)) );
   eme_options_select (__('Edit location','eme'), 'eme_cap_edit_locations', eme_get_all_caps (), sprintf(__('Permission needed to edit all locations. Default: %s','eme'), eme_capNamesCB(DEFAULT_CAP_EDIT_LOCATIONS)) );
   eme_options_select (__('Edit categories','eme'), 'eme_cap_categories', eme_get_all_caps (), sprintf(__('Permission needed to edit all categories. Default: %s','eme'), eme_capNamesCB(DEFAULT_CAP_CATEGORIES)) );
   eme_options_select (__('Edit templates','eme'), 'eme_cap_templates', eme_get_all_caps (), sprintf(__('Permission needed to edit all templates. Default: %s','eme'), eme_capNamesCB(DEFAULT_CAP_TEMPLATES)) );
   eme_options_select (__('View people','eme'), 'eme_cap_people', eme_get_all_caps (), sprintf(__('Permission needed to view registered people info. Default: %s','eme'), eme_capNamesCB(DEFAULT_CAP_PEOPLE)) );
   eme_options_select (__('Approve registrations','eme'), 'eme_cap_approve', eme_get_all_caps (), sprintf(__('Permission needed to approve pending registrations. Default: %s','eme'), eme_capNamesCB(DEFAULT_CAP_APPROVE)) );
   eme_options_select (__('Edit registrations','eme'), 'eme_cap_registrations', eme_get_all_caps (), sprintf(__('Permission needed to edit approved registrations. Default: %s','eme'), eme_capNamesCB(DEFAULT_CAP_REGISTRATIONS)) );
   eme_options_select (__('Send Mails','eme'), 'eme_cap_send_mails', eme_get_all_caps (), sprintf(__('Permission needed to send mails for own events. Default: %s','eme'), eme_capNamesCB(DEFAULT_CAP_SEND_MAILS)) );
   eme_options_select (__('Send Other Mails','eme'), 'eme_cap_send_other_mails', eme_get_all_caps (), sprintf(__('Permission needed to send mails for any event. Default: %s','eme'), eme_capNamesCB(DEFAULT_CAP_SEND_OTHER_MAILS)) );
   eme_options_select (__('Edit form fields','eme'), 'eme_cap_forms', eme_get_all_caps (), sprintf(__('Permission needed to edit form fields. Default: %s','eme'), eme_capNamesCB(DEFAULT_CAP_FORMS)) );
   eme_options_select (__('Cleanup','eme'), 'eme_cap_cleanup', eme_get_all_caps (), sprintf(__('Permission needed to execute cleanup actions. Default: %s','eme'), eme_capNamesCB(DEFAULT_CAP_CLEANUP)) );
   eme_options_select (__('Edit settings','eme'), 'eme_cap_settings', eme_get_all_caps (),sprintf(__('Permission needed to edit settings. Default: %s','eme'), eme_capNamesCB(DEFAULT_CAP_SETTINGS)) );
   ?>
</table>

<?php
	      break;
	      case 'events' :
?>

<h3><?php _e ( 'Events page', 'eme' ); ?></h3>
<table class="form-table">
   <?php
   eme_options_select ( __ ( 'Events page', 'eme' ), 'eme_events_page', eme_get_all_pages (), __ ( 'This option allows you to select which page to use as an events page.', 'eme' )."<br /><strong>".__ ( 'The content of this page (including shortcodes of any kind) will be ignored completely and dynamically replaced by events data.','eme' )."</strong>" );
   eme_options_radio_binary ( __ ( 'Show events page in lists?', 'eme' ), 'eme_list_events_page', __ ( 'Check this option if you want the events page to appear together with other pages in pages lists.', 'eme' )."<br /><strong>".__ ( 'This option should no longer be used, it will be deprecated. Using the [eme_events] shortcode in a self created page is recommended.', 'eme' )."</strong>" ); 
   eme_options_radio_binary ( __ ( 'Display calendar in events page?', 'eme' ), 'eme_display_calendar_in_events_page', __ ( 'This option allows to display the calendar in the events page, instead of the default list. It is recommended not to display both the calendar widget and a calendar page.','eme' ) );
   eme_options_input_text ( __('Number of events to show in lists', 'eme' ), 'eme_event_list_number_items', __( 'The number of events to show in a list if no specific limit is specified (used in the shortcode eme_events, RSS feed, the placeholders #_NEXTEVENTS and #_PASTEVENTS, ...). Use 0 for no limit.','eme') );
   eme_options_select (__('State for new event','eme'), 'eme_event_initial_state', eme_status_array(), __ ('Initial state for a new event','eme') );
   ?>
</table>
<h3><?php _e ( 'Events format', 'eme' ); ?></h3>
<table class="form-table">
   <?php
   eme_options_radio_binary ( __ ( 'Remove leading zeros from minutes?', 'eme' ), 'eme_time_remove_leading_zeros', __ ( 'PHP date/time functions have no notation to show minutes without leading zeros. Checking this option will return e.g. 9 for 09 and empty for 00.', 'eme' ) ); 
   eme_options_textarea ( __ ( 'Default event list format header', 'eme' ), 'eme_event_list_item_format_header', sprintf(__('This content will appear just above your code for the default event list format. If you leave this empty, the value <code>%s</code> will be used.','eme'),eme_sanitize_html(DEFAULT_EVENT_LIST_HEADER_FORMAT)));
   eme_options_textarea ( __ ( 'Default categories event list format header', 'eme' ), 'eme_cat_event_list_item_format_header', sprintf(__('This content will appear just above your code for the event list format when showing events for a specific category. If you leave this empty, the value <code>%s</code> will be used.','eme'),eme_sanitize_html(DEFAULT_CAT_EVENT_LIST_HEADER_FORMAT)));
   eme_options_textarea ( __ ( 'Default event list format', 'eme' ), 'eme_event_list_item_format', __ ( 'The format of any events in a list.<br/>Insert one or more of the following placeholders: <code>#_EVENTNAME</code>, <code>#_LOCATIONNAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_NOTES</code>.<br/> Use <code>#_EXCERPT</code> to show <code>#_NOTES</code> until you place a <code>&lt;!&ndash;&ndash;more&ndash;&ndash;&gt;</code> marker.<br/> Use <code>#_LINKEDNAME</code> for the event name with a link to the given event page.<br/> Use <code>#_EVENTPAGEURL</code> to print the event page URL and make your own customised links.<br/> Use <code>#_LOCATIONPAGEURL</code> to print the location page URL and make your own customised links.<br/>Use <code>#_EDITEVENTLINK</code> to add a link to edit page for the event, which will appear only when a user is logged in.<br/>To insert date and time values, use <a href="http://www.php.net/manual/en/function.date.php">PHP time format characters</a>  with a <code>#</code> symbol before them, i.e. <code>#m</code>, <code>#M</code>, <code>#j</code>, etc.<br/> For the end time, put <code>#@</code> in front of the character, e.g. <code>#@h</code>, <code>#@i</code>, etc.<br/> You can also create a date format without prepending <code>#</code> by wrapping it in #_{} or #@_{} (e.g. <code>#_{d/m/Y}</code>). If there is no end date, the value is not shown.<br/>Use <code>#_12HSTARTTIME</code> and <code>#_12HENDTIME</code> for AM/PM start-time/end-time notation, idem <code>#_24HSTARTTIME</code> and <code>#_24HENDTIME</code>.<br/>Feel free to use HTML tags as <code>li</code>, <code>br</code> and so on.<br/>For custom attributes, you use <code>#_ATT{key}{alternative text}</code>, the second braces are optional and will appear if the attribute is not defined or left blank for that event. This key will appear as an option when adding attributes to your event.', 'eme' )."<br />".__('Use <code>#_PAST_FUTURE_CLASS</code> to return a class name indicating this event is future or past (<code>eme-future-event</code> or <code>eme-past-event</code>), use the returned value in e.g. the li-statement for each event in the list of events','eme') .'<br />'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=25'>".__('the documentation', 'eme').'</a>' );
   eme_options_textarea ( __ ( 'Default event list format footer', 'eme' ), 'eme_event_list_item_format_footer', sprintf(__('This content will appear just below your code for the default event list format. If you leave this empty, the value <code>%s</code> will be used.','eme'),eme_sanitize_html(DEFAULT_EVENT_LIST_FOOTER_FORMAT)));
   eme_options_textarea ( __ ( 'Default categories event list format footer', 'eme' ), 'eme_cat_event_list_item_format_footer', sprintf(__('This content will appear just below your code for the default event list format when showing events for a specific category. If you leave this empty, the value <code>%s</code> will be used.','eme'),eme_sanitize_html(DEFAULT_CAT_EVENT_LIST_FOOTER_FORMAT)));
   eme_options_input_text ( __ ( 'Single event page title format', 'eme' ), 'eme_event_page_title_format', __ ( 'The format of a single event page title. Follow the previous formatting instructions.', 'eme' ) );
   eme_options_input_text ( __ ( 'Single event html title format', 'eme' ), 'eme_event_html_title_format', __ ( 'The format of a single event html page title. Follow the previous formatting instructions.', 'eme' ). __( ' The default is: ','eme'). eme_sanitize_html(DEFAULT_EVENT_HTML_TITLE_FORMAT));
   eme_options_textarea ( __ ( 'Default single event format', 'eme' ), 'eme_single_event_format', __ ( 'The format of a single event page.<br/>Follow the previous formatting instructions. <br/>Use <code>#_MAP</code> to insert a map.<br/>Use <code>#_CONTACTNAME</code>, <code>#_CONTACTEMAIL</code>, <code>#_CONTACTPHONE</code> to insert respectively the name, e-mail address and phone number of the designated contact person. <br/>Use <code>#_ADDBOOKINGFORM</code> to insert a form to allow the user to respond to your events reserving one or more places (RSVP).<br/> Use <code>#_REMOVEBOOKINGFORM</code> to insert a form where users, inserting their name and e-mail address, can remove their bookings.', 'eme' ).__('<br/>Use <code>#_ADDBOOKINGFORM_IF_NOT_REGISTERED</code> to insert the booking form only if the user has not registered yet. Similar use <code>#_REMOVEBOOKINGFORM_IF_REGISTERED</code> to insert the booking removal form only if the user has already registered before. These two codes only work for WP users.','eme').__('<br/> Use <code>#_DIRECTIONS</code> to insert a form so people can ask directions to the event.','eme').__('<br/> Use <code>#_CATEGORIES</code> to insert a comma-seperated list of categories an event is in.','eme').__('<br/> Use <code>#_ATTENDEES</code> to get a list of the names attending the event.','eme') .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=25'>".__('the documentation', 'eme').'</a>' );
   eme_options_input_text ( __ ( 'Monthly period date format', 'eme' ), 'eme_show_period_monthly_dateformat', __ ( 'The format of the date-string used when you use showperiod=monthly as an option to &#91;the eme_events] shortcode, also used for monthly pagination. Use php date() compatible settings.', 'eme') . __( ' The default is: ','eme'). DEFAULT_SHOW_PERIOD_MONTHLY_DATEFORMAT );
   eme_options_input_text ( __ ( 'Yearly period date format', 'eme' ), 'eme_show_period_yearly_dateformat', __ ( 'The format of the date-string used when you use showperiod=yearly as an option to &#91;the eme_events] shortcode, also used for yearly pagination. Use php date() compatible settings.', 'eme') . __( ' The default is: ','eme'). DEFAULT_SHOW_PERIOD_YEARLY_DATEFORMAT );
   eme_options_input_text ( __ ( 'Events page title', 'eme' ), 'eme_events_page_title', __ ( 'The title on the multiple events page.', 'eme' ) );
   eme_options_input_text ( __ ( 'No events message', 'eme' ), 'eme_no_events_message', __ ( 'The message displayed when no events are available.', 'eme' ) );
   ?>
</table>
<h3><?php _e ( 'Events filtering format', 'eme' ); ?></h3>
<table class="form-table">
   <?php
   eme_options_textarea ( __ ( 'Default event list filtering format', 'eme' ), 'eme_filter_form_format', __ ( 'This defines the layout of the event list filtering form when using the shortcode <code>[eme_filterform]</code>. Use <code>#_FILTER_CATS</code>, <code>#_FILTER_LOCS</code>, <code>#_FILTER_TOWNS</code>, <code>#_FILTER_WEEKS</code>, <code>#_FILTER_MONTHS</code>.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=28'>".__('the documentation', 'eme').'</a>' );
   ?>
</table>

<?php
	      break;
	      case 'calendar' :
?>

<h3><?php _e ( 'Calendar options', 'eme' ); ?></h3>
<table class="form-table">
   <?php
   eme_options_radio_binary ( __ ( 'Hide past events?', 'eme' ), 'eme_cal_hide_past_events', __ ( 'Check this option if you want to hide past events in the calendar.', 'eme' ) ); 
   ?>
</table>
<h3><?php _e ( 'Calendar format', 'eme' ); ?></h3>
<table class="form-table">
   <?php
   eme_options_input_text ( __ ( 'Small calendar title', 'eme' ), 'eme_small_calendar_event_title_format', __ ( 'The format of the title, corresponding to the text that appears when hovering on an eventful calendar day.', 'eme' ) );
   eme_options_input_text ( __ ( 'Small calendar title separator', 'eme' ), 'eme_small_calendar_event_title_separator', __ ( 'The separator appearing on the above title when more than one event is taking place on the same day.', 'eme' ) );
   eme_options_input_text ( __ ( 'Full calendar events format', 'eme' ), 'eme_full_calendar_event_format', __ ( 'The format of each event when displayed in the full calendar. Remember to include <code>li</code> tags before and after the event.', 'eme' ) );
   ?>
</table>

<?php
	      break;
	      case 'locations' :
?>

<h3><?php _e ( 'Locations format', 'eme' ); ?></h3>
<table class="form-table">
   <?php
   eme_options_textarea ( __ ( 'Default location list format header', 'eme' ), 'eme_location_list_format_header', sprintf(__( 'This content will appear just above your code for the default location list format. If you leave this empty, the value <code>%s</code> will be used.<br/>Used by the shortcode <code>[eme_locations]</code>', 'eme'),eme_sanitize_html(DEFAULT_LOCATION_LIST_HEADER_FORMAT)));
   eme_options_textarea ( __ ( 'Default location list item format', 'eme' ), 'eme_location_list_format_item', sprintf(__ ( 'The format of a location in a location list. If you leave this empty, the value <code>%s</code> will be used.<br/>See the documentation for a list of available placeholders for locations.<br/>Used by the shortcode <code>[eme_locations]</code>', 'eme' ),eme_sanitize_html(DEFAULT_LOCATION_EVENT_LIST_ITEM_FORMAT)) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=26'>".__('the documentation', 'eme').'</a>' );
   eme_options_textarea ( __ ( 'Default location list format footer', 'eme' ), 'eme_location_list_format_footer', sprintf(__( 'This content will appear just below your code for the default location list format. If you leave this empty, the value <code>%s</code> will be used.<br/>Used by the shortcode <code>[eme_locations]</code>', 'eme'),eme_sanitize_html(DEFAULT_LOCATION_LIST_FOOTER_FORMAT)));

   eme_options_input_text ( __ ( 'Single location page title format', 'eme' ), 'eme_location_page_title_format', __ ( 'The format of a single location page title.<br/>Follow the previous formatting instructions.', 'eme' ) );
   eme_options_input_text ( __ ( 'Single location html title format', 'eme' ), 'eme_location_html_title_format', __ ( 'The format of a single location html page title.<br/>Follow the previous formatting instructions.', 'eme' ). __( ' The default is: ','eme'). DEFAULT_LOCATION_HTML_TITLE_FORMAT);
   eme_options_textarea ( __ ( 'Default single location page format', 'eme' ), 'eme_single_location_format', __ ( 'The format of a single location page.<br/>Insert one or more of the following placeholders: <code>#_LOCATIONNAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code>.<br/> Use <code>#_MAP</code> to display a map of the event location, and <code>#_IMAGE</code> to display an image of the location.<br/> Use <code>#_NEXTEVENTS</code> to insert a list of the upcoming events, <code>#_PASTEVENTS</code> for a list of past events, <code>#_ALLEVENTS</code> for a list of all events taking place in this location.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=26'>".__('the documentation', 'eme').'</a>' );
   eme_options_textarea ( __ ( 'Default location balloon format', 'eme' ), 'eme_location_baloon_format', __ ( 'The format of the text appearing in the balloon describing the location in the map.<br/>Insert one or more of the following placeholders: <code>#_LOCATIONNAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code>,<code>#_IMAGE</code>, <code>#_LOCATIONPAGEURL</code> or <code>#_DIRECTIONS</code>.', 'eme' ) );
   eme_options_textarea ( __ ( 'Default location event list format', 'eme' ), 'eme_location_event_list_item_format', __ ( 'The format of the events list inserted in the location page through the <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> and <code>#_ALLEVENTS</code> element. <br/> Follow the events formatting instructions', 'eme' ) );
   eme_options_textarea ( __ ( 'Default no events message', 'eme' ), 'eme_location_no_events_message', __ ( 'The message to be displayed in the list generated by <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> and <code>#_ALLEVENTS</code> when no events are available.', 'eme' ) );
   ?>
</table>

<?php
	      break;
	      case 'rss' :
?>

<h3><?php _e ( 'RSS and ICAL feed format', 'eme' ); ?></h3>
<table class="form-table">
   <?php
   eme_options_input_text ( __ ( 'RSS main title', 'eme' ), 'eme_rss_main_title', __ ( 'The main title of your RSS events feed.', 'eme' ) );
   eme_options_input_text ( __ ( 'RSS main description', 'eme' ), 'eme_rss_main_description', __ ( 'The main description of your RSS events feed.', 'eme' ) );
   eme_options_input_text ( __ ( 'RSS title format', 'eme' ), 'eme_rss_title_format', __ ( 'The format of the title of each item in the events RSS feed.', 'eme' ) );
   eme_options_textarea ( __ ( 'RSS description format', 'eme' ), 'eme_rss_description_format', __ ( 'The format of the description of each item in the events RSS feed. Follow the previous formatting instructions.', 'eme' ) );
   eme_options_radio_binary ( __ ( 'RSS Pubdate usage', 'eme' ), 'eme_rss_show_pubdate', __ ( 'Show the event creation/modification date as PubDate info in the in the events RSS feed.', 'eme' ) );
   eme_options_radio_binary ( __ ( 'RSS Pubdate is start date', 'eme' ), 'eme_rss_pubdate_startdate', __ ( 'If you select this, the pubDate field in RSS will be the event start date, not the modification date.', 'eme' ) );
   eme_options_input_text ( __ ( 'ICAL title format', 'eme' ), 'eme_ical_title_format', __ ( 'The format of the title of each item in the events ICAL feed.', 'eme' ) );
   eme_options_input_text ( __ ( 'ICAL description format', 'eme' ), 'eme_ical_description_format', __ ( 'The format of the description of each item in the events ICAL feed. Follow the previous formatting instructions.', 'eme' ) );
   ?>
</table>

<?php
	      break;
	      case 'rsvp' :
?>

<h3><?php _e ( 'RSVP: registrations and bookings', 'eme' ); ?></h3>
<table class='form-table'>
     <?php
   $indexed_users[-1]=__('Event author','eme');
   $indexed_users+=eme_get_indexed_users();
   eme_options_select ( __ ( 'Default contact person', 'eme' ), 'eme_default_contact_person', $indexed_users, __ ( 'Select the default contact person. This user will be employed whenever a contact person is not explicitly specified for an event', 'eme' ) );
   eme_options_radio_binary ( __ ( 'By default enable registrations for new events?', 'eme' ), 'eme_rsvp_reg_for_new_events', __ ( 'Check this option if you want to enable registrations by default for new events.', 'eme' ) );
   eme_options_radio_binary ( __ ( 'By default require approval for registrations?', 'eme' ), 'eme_rsvp_require_approval', __ ( 'Check this option if you want by default that new registrations require approval.', 'eme' ) );
   eme_options_radio_binary ( __ ( 'By default require WP membership to be able to register?', 'eme' ), 'eme_rsvp_registered_users_only', __ ( 'Check this option if you want by default that only WP registered users can book for an event.', 'eme' ) );
   eme_options_radio_binary ( __ ( 'Check required fields upon submit?', 'eme' ), 'eme_rsvp_check_required_fields', __ ( 'Check this option if you want to check on the server-side if all required fields have been completed upon RSVP form submit. Consider using a captcha if disabling this.', 'eme' ) );
   eme_options_input_text ( __ ( 'Default number of spaces', 'eme' ), 'eme_rsvp_default_number_spaces', __ ( 'The default number of spaces an event has.', 'eme' ) );
   eme_options_input_text ( __ ( 'Min number of spaces to book', 'eme' ), 'eme_rsvp_addbooking_min_spaces', __ ( 'The minimum number of spaces a person can book in one go (it can be 0, for e.g. just an attendee list).', 'eme' ) );
   eme_options_input_text ( __ ( 'Max number of spaces to book', 'eme' ), 'eme_rsvp_addbooking_max_spaces', __ ( 'The maximum number of spaces a person can book in one go.', 'eme' ) );
   $eme_rsvp_number_days=get_option('eme_rsvp_number_days');
   $eme_rsvp_number_hours=get_option('eme_rsvp_number_hours');
   $eme_rsvp_end_target=get_option('eme_rsvp_end_target');
   ?>
   <tr valign="top" id='eme_rsvp_number_row'>
      <th scope="row"><?php _e('By default allow RSVP until this many', 'eme') ?></th>
      <td>
      <input name="eme_rsvp_number_days" type="text" id="eme_rsvp_number_days" value="<?php echo eme_sanitize_html($eme_rsvp_number_days); ?>" size="4" /> <?php _e('days', 'eme') ?>
      <input name="eme_rsvp_number_hours" type="text" id="eme_rsvp_number_hours" value="<?php echo eme_sanitize_html($eme_rsvp_number_hours); ?>" size="4" /> <?php _e('hours', 'eme') ?>
      <?php
      $eme_rsvp_end_target_list = array('start'=>__('starts','eme'),'end'=>__('ends','eme'));
      _e ( 'before the event ','eme' );
      echo eme_ui_select($eme_rsvp_end_target,'eme_rsvp_end_target',$eme_rsvp_end_target_list);
      ?>
      </td>
   </tr>
   <?php
   eme_options_input_text ( __ ( 'RSVP cancel cutoff', 'eme' ), 'eme_cancel_rsvp_days', __ ( 'Allow RSVP cancellation until this many days before the event starts.', 'eme' ) );
   eme_options_radio_binary ( __ ( 'Use captcha for booking form?', 'eme' ), 'eme_captcha_for_booking', __ ( 'Check this option if you want to use a captcha on the booking form, to thwart spammers a bit.', 'eme' ) );
   eme_options_radio_binary ( __ ( 'Hide fully booked events?', 'eme' ), 'eme_rsvp_hide_full_events', __ ( 'Check this option if you want to hide events that are fully booked from the calendar and events listing in the front.', 'eme' ) );
   eme_options_radio_binary ( __ ( 'Hide RSVP ended events?', 'eme' ), 'eme_rsvp_hide_rsvp_ended_events', __ ( 'Check this option if you want to hide events which RSVP registration period has already ended.', 'eme' ) );
   eme_options_input_text ( __ ( 'Add booking form submit text', 'eme' ), 'eme_rsvp_addbooking_submit_string', __ ( "The string of the submit button on the add booking form", 'eme' ) );
   eme_options_input_text ( __ ( 'Delete booking form submit text', 'eme' ), 'eme_rsvp_delbooking_submit_string', __ ( "The string of the submit button on the delete booking form", 'eme' ) );
   eme_options_input_text ( __ ( 'Attendees list format', 'eme' ), 'eme_attendees_list_format', __ ( "The format for the attendees list when using the <code>#_ATTENDEES</code> placeholder.", 'eme' ). __('For all placeholders you can use here, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=48'>".__('the documentation', 'eme').'</a>' );
   eme_options_radio_binary ( __ ( 'Attendees list ignore pending', 'eme' ), 'eme_attendees_list_ignore_pending', __ ( "Whether or not to ignore pending bookings when using the <code>#_ATTENDEES</code> placeholder.", 'eme' ));
   eme_options_input_text ( __ ( 'Bookings list header format', 'eme' ), 'eme_bookings_list_header_format', __ ( "The header format for the bookings list when using the <code>#_BOOKINGS</code> placeholder.", 'eme' ). sprintf(__(" The default is '%s'",'eme'),eme_sanitize_html(DEFAULT_BOOKINGS_LIST_HEADER_FORMAT)));
   eme_options_input_text ( __ ( 'Bookings list format', 'eme' ), 'eme_bookings_list_format', __ ( "The format for the bookings list when using the <code>#_BOOKINGS</code> placeholder.", 'eme' ). __('For all placeholders you can use here, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=45'>".__('the documentation', 'eme').'</a>' .__('For more information about form fields, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=44'>".__('the documentation', 'eme').'</a>' );
   eme_options_input_text ( __ ( 'Bookings list footer format', 'eme' ), 'eme_bookings_list_footer_format', __ ( "The footer format for the bookings list when using the <code>#_BOOKINGS</code> placeholder.", 'eme' ). sprintf(__(" The default is '%s'",'eme'),eme_sanitize_html(DEFAULT_BOOKINGS_LIST_FOOTER_FORMAT)));
   eme_options_radio_binary ( __ ( 'Bookings list ignore pending', 'eme' ), 'eme_bookings_list_ignore_pending', __ ( "Whether or not to ignore pending bookings when using the <code>#_BOOKINGS</code> placeholder.", 'eme' ));
   eme_options_textarea ( __ ( 'Booking recorded message', 'eme' ), 'eme_registration_recorded_ok_html', __ ( "The text (html allowed) shown to the user when the booking has been made successfully.", 'eme' ) );
   eme_options_radio_binary ( __ ( 'Show RSVP form again after booking?', 'eme' ), 'eme_rsvp_show_form_after_booking', __ ( "Uncheck this option if you don't want to show the RSVP booking form again after a successful booking.", 'eme' ) );
   ?>
</table>

<h3><?php _e ( 'RSVP: form format', 'eme' ); ?></h3>
<table class='form-table'>
   <?php
      eme_options_textarea (__('Form format','eme'),'eme_registration_form_format', __("The look and feel of the form for registrations. #_NAME, #_EMAIL and #_SEATS are obligated fields, if not present then the form will not be shown.",'eme')  .'<br/>'.__('For more information about form fields, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=44'>".__('the documentation', 'eme').'</a>');
      eme_options_textarea (__('Cancel form format','eme'),'eme_cancel_form_format', __("The look and feel of the cancel form for registrations. #_NAME and #_EMAIL are obligated fields, if not present then the form will not be shown.", 'eme').'<br/>'.__('For more information about form fields, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=5950'>".__('the documentation', 'eme').'</a>');
   ?>
</table>


<?php
	      break;
	      case 'mail' :
?>

<h3><?php _e ( 'RSVP: mail options', 'eme' ); ?></h3>
<table class='form-table'>
   <?php
   eme_options_radio_binary ( __ ( 'Enable the RSVP e-mail notifications?', 'eme' ), 'eme_rsvp_mail_notify_is_active', __ ( 'Check this option if you want to receive an email when someone books places for your events.', 'eme' ) );
   ?>
</table>
<table id="rsvp_mail_notify-data" class='form-table'>
   <?php
   eme_options_radio_binary ( __ ( 'Send HTML mails', 'eme' ), 'eme_rsvp_send_html', __ ( 'Check this option if you want to use html in the mails being sent.', 'eme' ) );
   eme_options_radio_binary ( __ ( 'Quick deny send mails', 'eme' ), 'eme_deny_mail_event_edit', __ ( 'Check this option if you want to sent mails when denying a registration while editing an event.', 'eme' ) );
   eme_options_input_text ( __ ( 'Contact person email subject format', 'eme' ), 'eme_contactperson_email_subject', __ ( 'The format of the email subject which will be sent to the contact person.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=27'>".__('the documentation', 'eme').'</a>' );
   eme_options_textarea ( __ ( 'Contact person email format', 'eme' ), 'eme_contactperson_email_body', __ ( 'The format of the email which will be sent to the contact person.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=27'>".__('the documentation', 'eme').'</a>' );
   eme_options_input_text ( __ ( 'Contact person cancelled email subject format', 'eme' ), 'eme_contactperson_cancelled_email_subject', __ ( 'The format of the email subject which will be sent to the contact person for a cancellation.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=27'>".__('the documentation', 'eme').'</a>' );
   eme_options_textarea ( __ ( 'Contact person cancelled email format', 'eme' ), 'eme_contactperson_cancelled_email_body', __ ( 'The format of the email which will be sent to the contact person for a cancellation.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=27'>".__('the documentation', 'eme').'</a>' );
   eme_options_input_text ( __ ( 'Contact person pending email subject format', 'eme' ), 'eme_contactperson_pending_email_subject', __ ( 'The format of the email subject which will be sent to the contact person if approval is needed.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=27'>".__('the documentation', 'eme').'</a>' );
   eme_options_textarea ( __ ( 'Contact person pending email format', 'eme' ), 'eme_contactperson_pending_email_body', __ ( 'The format of the email which will be sent to the contact person if approval is needed.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=27'>".__('the documentation', 'eme').'</a>' );
   eme_options_input_text ( __ ( 'Respondent email subject format', 'eme' ), 'eme_respondent_email_subject', __ ( 'The format of the email subject which will be sent to the respondent.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=27'>".__('the documentation', 'eme').'</a>' );
   eme_options_textarea ( __ ( 'Respondent email format', 'eme' ), 'eme_respondent_email_body', __ ( 'The format of the email which will be sent to the respondent.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=27'>".__('the documentation', 'eme').'</a>' );
   eme_options_input_text ( __ ( 'Registration pending email subject format', 'eme' ), 'eme_registration_pending_email_subject', __ ( 'The format of the email subject which will be sent to the respondent when the event requires registration approval.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=27'>".__('the documentation', 'eme').'</a>' );
   eme_options_textarea ( __ ( 'Registration pending email format', 'eme' ), 'eme_registration_pending_email_body', __ ( 'The format of the email which will be sent to the respondent when the event requires registration approval.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=27'>".__('the documentation', 'eme').'</a>' );
   eme_options_input_text ( __ ( 'Registration cancelled email subject format', 'eme' ), 'eme_registration_cancelled_email_subject', __ ( 'The format of the email subject which will be sent to the respondent when the respondent cancels the registrations for an event.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=27'>".__('the documentation', 'eme').'</a>' );
   eme_options_textarea ( __ ( 'Registration cancelled email format', 'eme' ), 'eme_registration_cancelled_email_body', __ ( 'The format of the email which will be sent to the respondent when the respondent cancels the registrations for an event.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=27'>".__('the documentation', 'eme').'</a>' );
   eme_options_input_text ( __ ( 'Registration denied email subject format', 'eme' ), 'eme_registration_denied_email_subject', __ ( 'The format of the email subject which will be sent to the respondent when the admin denies the registration request if the event requires registration approval.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=27'>".__('the documentation', 'eme').'</a>' );
   eme_options_textarea ( __ ( 'Registration denied email format', 'eme' ), 'eme_registration_denied_email_body', __ ( 'The format of the email which will be sent to the respondent when the admin denies the registration request if the event requires registration approval.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=27'>".__('the documentation', 'eme').'</a>' );
   eme_options_input_text ( __ ( 'Registration updated email subject format', 'eme' ), 'eme_registration_updated_email_subject', __ ( 'The format of the email subject which will be sent to the respondent when the admin updates the registration request.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=27'>".__('the documentation', 'eme').'</a>' );
   eme_options_textarea ( __ ( 'Registration updated email format', 'eme' ), 'eme_registration_updated_email_body', __ ( 'The format of the email which will be sent to the respondent when the admin updates the registration request.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=27'>".__('the documentation', 'eme').'</a>' );
   eme_options_input_text ( __ ( 'Notification sender name', 'eme' ), 'eme_mail_sender_name', __ ( "Insert the display name of the notification sender.", 'eme' ) );
   eme_options_input_text ( __ ( 'Notification sender address', 'eme' ), 'eme_mail_sender_address', __ ( "Insert the address of the notification sender. It must correspond with your Gmail account user if you use Gmail to send mails.", 'eme' ), "email" );
   eme_options_input_text ( __ ( 'Notification BCC address', 'eme' ), 'eme_mail_bcc_address', __ ( "Insert an address that will be added in Bcc to all outgoing mails. Can be left empty.", 'eme' ), "email" );
   eme_options_select ( __ ( 'Mail sending method', 'eme' ), 'eme_rsvp_mail_send_method', array ('smtp' => 'SMTP', 'mail' => __ ( 'PHP mail function', 'eme' ), 'sendmail' => 'Sendmail', 'qmail' => 'Qmail', 'wp_mail' => 'WP Mail' ), __ ( 'Select the method to send email notification.', 'eme' ) );
   eme_options_input_text (__( 'SMTP host','eme'), 'eme_smtp_host', __ ( "The SMTP host. Usually it corresponds to 'localhost'. If you use Gmail, set this value to 'ssl://smtp.gmail.com:465'.", 'eme' ) );
   eme_options_input_text ( __('Mail sending port','eme'), 'eme_smtp_port', __ ( "The port through which you e-mail notifications will be sent. Make sure the firewall doesn't block this port", 'eme' ) );
   eme_options_radio_binary ( __ ( 'Use SMTP authentication?', 'eme' ), 'eme_rsvp_mail_SMTPAuth', __ ( 'SMTP authentication is often needed. If you use Gmail, make sure to set this parameter to Yes', 'eme' ) );
   eme_options_input_text ( __ ( 'SMTP username', 'eme' ), 'eme_smtp_username', __ ( "Insert the username to be used to access your SMTP server.", 'eme' ) );
   eme_options_input_password ( __ ( 'SMTP password', 'eme' ), 'eme_smtp_password', __ ( "Insert the password to be used to access your SMTP server", 'eme' ) );
   eme_options_radio_binary ( __ ( 'Debug SMTP?', 'eme' ), 'eme_smtp_debug', __ ( 'Check this option if you have issues sending mail via SMTP. Only do this for debugging purposes and deactivate it afterwards!', 'eme' ) );
   ?>
   </div>
</table>

<?php
	      break;
	      case 'payments' :
            $events_page_link = eme_get_events_page(true, false);
?>

<h3><?php _e ( 'RSVP: price options', 'eme' ); ?></h3>
<table class='form-table'>
   <?php
   eme_options_select ( __ ( 'Default currency', 'eme' ), 'eme_default_currency', eme_currency_array(), __ ( 'Select the default currency for payments.', 'eme' ) );
   eme_options_input_text ( __ ( 'Default price', 'eme' ), 'eme_default_price', __ ( 'The default price for an event.', 'eme' ) );
   eme_options_textarea ( __ ( 'Payment form header format', 'eme' ), 'eme_payment_form_header_format', __ ( 'The format of the text shown above the payment buttons. If left empty, a standard text will be shown.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=27'>".__('the documentation', 'eme').'</a>' );
   eme_options_textarea ( __ ( 'Payment form footer format', 'eme' ), 'eme_payment_form_footer_format', __ ( 'The format of the text shown below the payment buttons. Default: empty.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=27'>".__('the documentation', 'eme').'</a>' );
   eme_options_textarea ( __ ( 'Multibooking payment form header format', 'eme' ), 'eme_multipayment_form_header_format', __ ( 'The format of the text shown above the payment buttons in the multibooking form. If left empty, a standard text will be shown.', 'eme' ).'<br/>'.__('Although the same placeholders as for the regular payment form header format can be used, it is advised to only use multibooking related placeholders.', 'eme') );
   eme_options_textarea ( __ ( 'Multibooking payment form footer format', 'eme' ), 'eme_multipayment_form_footer_format', __ ( 'The format of the text shown below the payment buttons in the multibooking form. Default: empty.', 'eme' ).'<br/>'.__('Although the same placeholders as for the regular payment form header format can be used, it is advised to only use multibooking related placeholders.', 'eme') );
   eme_options_radio_binary ( __ ( 'Show custom payment return page', 'eme' ), 'eme_payment_show_custom_return_page', __ ( 'Check this option if you want to define a custom page format for the sucess or failure of the payment.', 'eme' ) );
   eme_options_textarea ( __ ( 'Payment succes return page format', 'eme' ), 'eme_payment_succes_format', __ ( 'The format of the return page when the payment is succesfull.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=25'>".__('the documentation', 'eme').'</a>' );
   eme_options_textarea ( __ ( 'Payment failure return page format', 'eme' ), 'eme_payment_fail_format', __ ( 'The format of the return page when the payment failed or has been canceled.', 'eme' ) .'<br/>'.__('For all possible placeholders, see ', 'eme')."<a target='_blank' href='http://www.e-dynamics.be/wordpress/?cat=25'>".__('the documentation', 'eme').'</a>' );
   eme_options_radio_binary ( __ ( 'Add booking id to return page info', 'eme' ), 'eme_payment_add_bookingid_to_return', __ ( 'Check this option if you want to add the booking id to the return page. This will allow you to also use booking placeholders next to the regular event placeholders, but beware that other people can change the url and see other booking info then!', 'eme' ) );
   ?>
</table>

<h3><?php _e ( 'RSVP: paypal options', 'eme' ); ?></h3>
<table class='form-table'>
   <?php
      $notification_link = add_query_arg(array('eme_eventAction'=>'paypal_notification'),$events_page_link);
      eme_options_select ( __('PayPal live or test','eme'), 'eme_paypal_url', array (PAYPAL_SANDBOX_URL => __('Paypal Sandbox (for testing)','eme'), PAYPAL_LIVE_URL => __ ( 'Paypal Live', 'eme' )), __('Choose wether you want to test paypal in a paypal sandbox or go live and really use paypal.','eme') );
      eme_options_input_text (__('PayPal business info','eme'),'eme_paypal_business', __("Paypal business ID or email.",'eme'));
      eme_options_radio_binary ( __ ( 'Use paypal encryption?','eme' ), 'eme_paypal_s_encrypt', __ ( 'Select yes to encrypt the paypal button using certificates.','eme' ) );
      eme_options_radio_binary ( __ ( 'Ignore paypal tax setting?','eme' ), 'eme_paypal_no_tax', __ ( 'Select yes to ignore the tax setting in your paypal profile.','eme' ) );
      eme_options_input_text (__('Paypal public cert','eme'),'eme_paypal_s_paypalcert', __("Path to paypal public certificate file.",'eme'));
      eme_options_input_text (__('Own public cert','eme'),'eme_paypal_s_pubcert', __("Path to own public certificate file.",'eme'));
      eme_options_input_text (__('Own private key','eme'),'eme_paypal_s_privkey', __("Path to own private key file.",'eme'));
      eme_options_input_text (__('Certificate ID','eme'),'eme_paypal_s_certid', __("Certificate ID of your cert at paypal.",'eme'));
      eme_options_input_text (__('Extra charge','eme'),'eme_paypal_cost', __("Extra charge added when paying for an event. Can either be an absolute number or a percentage. E.g. 2 or 5%",'eme'));
      eme_options_input_text (__('Extra charge 2','eme'),'eme_paypal_cost2', __("Second extra charge added when paying for an event. Can either be an absolute number or a percentage. E.g. 2 or 5%",'eme'));
      eme_options_input_text (__('Payment button label','eme'),'eme_paypal_button_label', __('The text shown inside the payment button','eme'));
      eme_options_input_text (__('Payment button image','eme'),'eme_paypal_button_img_url', __('The url to an image for the payment button that replaces the standard submit button with the label mentioned above.','eme'));
      eme_options_input_text (__('Text above payment button','eme'),'eme_paypal_button_above', __('The text shown just above the payment button, you can use #_EXTRACHARGE and #_CURRENCY to indicate the extra charge calculated if wanted','eme'));
      eme_options_input_text (__('Text below payment button','eme'),'eme_paypal_button_below', __('The text shown just below the payment button, you can use #_EXTRACHARGE and #_CURRENCY to indicate the extra charge calculated if wanted','eme'));
      echo "<tr><td colspan='2'>".__('Info: the url for payment notifications is: ','eme').$notification_link.'</td></tr>';
   ?>
</table>

<h3><?php _e ( 'RSVP: 2Checkout options', 'eme' ); ?></h3>
<table class='form-table'>
   <?php
      $notification_link = add_query_arg(array('eme_eventAction'=>'2co_notification'),$events_page_link);

      eme_options_select ( __('2Checkout live or test','eme'), 'eme_2co_demo', array (2 => __('2Checkout Sandbox (for testing)','eme'), 1 => __('2Checkout Test (the "demo" mode)','eme'), 0 => __ ( '2Checkout Live', 'eme' )), __('Choose wether you want to test 2Checkout in a sandbox or go live and really use 2Checkout.','eme') );
      eme_options_input_text (__('2Checkout Account number','eme'),'eme_2co_business', __("2Checkout Account number.",'eme'));
      eme_options_input_password (__('2Checkout Secret','eme'),'eme_2co_secret', __("2Checkout secret.",'eme'));
      eme_options_input_text (__('Extra charge','eme'),'eme_2co_cost', __("Extra charge added when paying for an event. Can either be an absolute number or a percentage. E.g. 2 or 5%",'eme'));
      eme_options_input_text (__('Extra charge 2','eme'),'eme_2co_cost2', __("Second extra charge added when paying for an event. Can either be an absolute number or a percentage. E.g. 2 or 5%",'eme'));
      eme_options_input_text (__('Payment button label','eme'),'eme_2co_button_label', __('The text shown inside the payment button','eme'));
      eme_options_input_text (__('Payment button image','eme'),'eme_2co_button_img_url', __('The url to an image for the payment button that replaces the standard submit button with the label mentioned above.','eme'));
      eme_options_input_text (__('Text above payment button','eme'),'eme_2co_button_above', __('The text shown just above the payment button, you can use #_EXTRACHARGE and #_CURRENCY to indicate the extra charge calculated if wanted','eme'));
      eme_options_input_text (__('Text below payment button','eme'),'eme_2co_button_below', __('The text shown just below the payment button, you can use #_EXTRACHARGE and #_CURRENCY to indicate the extra charge calculated if wanted','eme'));
      echo "<tr><td colspan='2'>".__('Info: the url for payment notifications is: ','eme').$notification_link.'</td></tr>';
   ?>
</table>

<h3><?php _e ( 'RSVP: Webmoney options', 'eme' ); ?></h3>
<table class='form-table'>
   <?php
      $notification_link = add_query_arg(array('eme_eventAction'=>'webmoney_notification'),$events_page_link);

      eme_options_select ( __('Webmoney live or test','eme'), 'eme_webmoney_demo', array (1 => __('Webmoney Sandbox (for testing)','eme'), 0 => __ ( 'Webmoney Live', 'eme' )), __('Choose wether you want to test Webmoney in a sandbox or go live and really use Webmoney.','eme') );
      eme_options_input_text (__('Webmoney Purse','eme'),'eme_webmoney_purse', __("Webmoney Purse.",'eme'));
      eme_options_input_password (__('Webmoney Secret','eme'),'eme_webmoney_secret', __("Webmoney secret.",'eme'));
      eme_options_input_text (__('Extra charge','eme'),'eme_webmoney_cost', __("Extra charge added when paying for an event. Can either be an absolute number or a percentage. E.g. 2 or 5%",'eme'));
      eme_options_input_text (__('Extra charge 2','eme'),'eme_webmoney_cost2', __("Second extra charge added when paying for an event. Can either be an absolute number or a percentage. E.g. 2 or 5%",'eme'));
      eme_options_input_text (__('Payment button label','eme'),'eme_webmoney_button_label', __('The text shown inside the payment button','eme'));
      eme_options_input_text (__('Payment button image','eme'),'eme_webmoney_button_img_url', __('The url to an image for the payment button that replaces the standard submit button with the label mentioned above.','eme'));
      eme_options_input_text (__('Text above payment button','eme'),'eme_webmoney_button_above', __('The text shown just above the payment button, you can use #_EXTRACHARGE and #_CURRENCY to indicate the extra charge calculated if wanted','eme'));
      eme_options_input_text (__('Text below payment button','eme'),'eme_webmoney_button_below', __('The text shown just below the payment button, you can use #_EXTRACHARGE and #_CURRENCY to indicate the extra charge calculated if wanted','eme'));
      echo "<tr><td colspan='2'>".__('Info: the url for payment notifications is: ','eme').$notification_link.'</td></tr>';
   ?>
</table>

<h3><?php _e ( 'RSVP: First Data options', 'eme' ); ?></h3>
<table class='form-table'>
   <?php
      $notification_link = add_query_arg(array('eme_eventAction'=>'fdgg_notification'),$events_page_link);

      eme_options_select ( __('First Data live or test','eme'), 'eme_fdgg_url', array (FDGG_SANDBOX_URL => __('First Data Sandbox (for testing)','eme'), FDGG_LIVE_URL => __ ( 'First Data Live', 'eme' )), __('Choose wether you want to test First Data in a sandbox or go live and really use First Datal.','eme') );
      eme_options_input_text (__('First Data Store Name','eme'),'eme_fdgg_store_name', __("First Data Store Name.",'eme'));
      eme_options_input_password (__('First Data Shared Secret','eme'),'eme_fdgg_shared_secret', __("First Data Shared Secret.",'eme'));
      eme_options_input_text (__('Extra charge','eme'),'eme_fdgg_cost', __("Extra charge added when paying for an event. Can either be an absolute number or a percentage. E.g. 2 or 5%",'eme'));
      eme_options_input_text (__('Extra charge 2','eme'),'eme_fdgg_cost2', __("Second extra charge added when paying for an event. Can either be an absolute number or a percentage. E.g. 2 or 5%",'eme'));
      eme_options_input_text (__('Payment button label','eme'),'eme_fdgg_button_label', __('The text shown inside the payment button','eme'));
      eme_options_input_text (__('Payment button image','eme'),'eme_fdgg_button_img_url', __('The url to an image for the payment button that replaces the standard submit button with the label mentioned above.','eme'));
      eme_options_input_text (__('Text above payment button','eme'),'eme_fdgg_button_above', __('The text shown just above the payment button, you can use #_EXTRACHARGE and #_CURRENCY to indicate the extra charge calculated if wanted','eme'));
      eme_options_input_text (__('Text below payment button','eme'),'eme_fdgg_button_below', __('The text shown just below the payment button, you can use #_EXTRACHARGE and #_CURRENCY to indicate the extra charge calculated if wanted','eme'));
      echo "<tr><td colspan='2'>".__('Info: the url for payment notifications is: ','eme').$notification_link.'</td></tr>';
   ?>
</table>

<h3><?php _e ( 'RSVP: Mollie options', 'eme' ); ?></h3>
<table class='form-table'>
   <?php
      $notification_link = add_query_arg(array('eme_eventAction'=>'mollie_notification'),$events_page_link);

      eme_options_input_text (__('Mollie API key','eme'),'eme_mollie_api_key', __('Mollie API key','eme'));
      eme_options_input_text (__('Extra charge','eme'),'eme_mollie_cost', __("Extra charge added when paying for an event. Can either be an absolute number or a percentage. E.g. 2 or 5%",'eme'));
      eme_options_input_text (__('Extra charge 2','eme'),'eme_mollie_cost2', __("Second extra charge added when paying for an event. Can either be an absolute number or a percentage. E.g. 2 or 5%",'eme'));
      eme_options_input_text (__('Payment button label','eme'),'eme_mollie_button_label', __('The text shown inside the payment button','eme'));
      eme_options_input_text (__('Payment button image','eme'),'eme_mollie_button_img_url', __('The url to an image for the payment button that replaces the standard submit button with the label mentioned above.','eme'));
      eme_options_input_text (__('Text above payment button','eme'),'eme_mollie_button_above', __('The text shown just above the payment button, you can use #_EXTRACHARGE and #_CURRENCY to indicate the extra charge calculated if wanted','eme'));
      eme_options_input_text (__('Text below payment button','eme'),'eme_mollie_button_below', __('The text shown just below the payment button, you can use #_EXTRACHARGE and #_CURRENCY to indicate the extra charge calculated if wanted','eme'));
      echo "<tr><td colspan='2'>".__('Info: the url for payment notifications is: ','eme').$notification_link.'</td></tr>';
   ?>
</table>

<h3><?php _e ( 'RSVP: Sage Pay options', 'eme' ); ?></h3>
<table class='form-table'>
   <?php
      eme_options_select ( __('Sage Pay live or test','eme'), 'eme_sagepay_demo', array (1 => __('Sage Pay Sandbox (for testing)','eme'), 0 => __ ( 'Sage Pay Live', 'eme' )), __('Choose wether you want to test Sage Pay in a sandbox or go live and really use Sage Pay.','eme') );
      eme_options_input_text (__('Sage Pay Vendor Name','eme'),'eme_sagepay_vendor_name', __("Sage Pay Vendor Name",'eme'));
      eme_options_input_password (__('Sage Pay Test Password','eme'),'eme_sagepay_test_pwd', __("Sage Pay password for testing purposes",'eme'));
      eme_options_input_password (__('Sage Pay Live Password','eme'),'eme_sagepay_live_pwd', __("Sage Pay password when using Sage Pay for real",'eme'));
      eme_options_input_text (__('Extra charge','eme'),'eme_sagepay_cost', __("Extra charge added when paying for an event. Can either be an absolute number or a percentage. E.g. 2 or 5%",'eme'));
      eme_options_input_text (__('Extra charge 2','eme'),'eme_sagepay_cost2', __("Second extra charge added when paying for an event. Can either be an absolute number or a percentage. E.g. 2 or 5%",'eme'));
      eme_options_input_text (__('Payment button label','eme'),'eme_sagepay_button_label', __('The text shown inside the payment button','eme'));
      eme_options_input_text (__('Payment button image','eme'),'eme_sagepay_button_img_url', __('The url to an image for the payment button that replaces the standard submit button with the label mentioned above.','eme'));
      eme_options_input_text (__('Text above payment button','eme'),'eme_sagepay_button_above', __('The text shown just above the payment button, you can use #_EXTRACHARGE and #_CURRENCY to indicate the extra charge calculated if wanted','eme'));
      eme_options_input_text (__('Text below payment button','eme'),'eme_sagepay_button_below', __('The text shown just below the payment button, you can use #_EXTRACHARGE and #_CURRENCY to indicate the extra charge calculated if wanted','eme'));
      echo "<tr><td colspan='2'>".__('Info: for Sage Pay to work, your PHP installation must have the mcrypt module installed and activated. Search the internet for which extra PHP package to install and/or which line in php.ini to change.','eme').'</td></tr>';
   ?>
</table>

<h3><?php _e ( 'RSVP: Worldpay options', 'eme' ); ?></h3>
<table class='form-table'>
   <?php
      eme_options_select ( __('Worldpay live or test','eme'), 'eme_worldpay_demo', array (1 => __('Worldpay Sandbox (for testing)','eme'), 0 => __ ( 'Worldpay Live', 'eme' )), __('Choose wether you want to test Worldpay in a sandbox or go live and really use Worldpay.','eme') );
      eme_options_input_text (__('Worldpay installation ID','eme'),'eme_worldpay_instid', __("Worldpay installation ID",'eme'));
      eme_options_input_text (__('Worldpay MD5 secret','eme'),'eme_worldpay_md5_secret', __("Worldpay MD5 secret used when submitting payments",'eme'));
      eme_options_input_text (__('Worldpay MD5 parameters','eme'),'eme_worldpay_md5_parameters', __("Worldpay parameters used to generate the MD5 signature, separated by ':'. Only use these 4 in the order of your choice: instId,cartId,currency and/or amount",'eme'));
      eme_options_input_password (__('Worldpay Test Password','eme'),'eme_worldpay_test_pwd', __("Worldpay password for payment notifications when testing",'eme'));
      eme_options_input_password (__('Worldpay Live Password','eme'),'eme_worldpay_live_pwd', __("Worldpay password for payment notifications when using Worldpay for real",'eme'));
      eme_options_input_text (__('Extra charge','eme'),'eme_worldpay_cost', __("Extra charge added when paying for an event. Can either be an absolute number or a percentage. E.g. 2 or 5%",'eme'));
      eme_options_input_text (__('Extra charge 2','eme'),'eme_worldpay_cost2', __("Second extra charge added when paying for an event. Can either be an absolute number or a percentage. E.g. 2 or 5%",'eme'));
      eme_options_input_text (__('Payment button label','eme'),'eme_worldpay_button_label', __('The text shown inside the payment button','eme'));
      eme_options_input_text (__('Payment button image','eme'),'eme_worldpay_button_img_url', __('The url to an image for the payment button that replaces the standard submit button with the label mentioned above.','eme'));
      eme_options_input_text (__('Text above payment button','eme'),'eme_worldpay_button_above', __('The text shown just above the payment button, you can use #_EXTRACHARGE and #_CURRENCY to indicate the extra charge calculated if wanted','eme'));
      eme_options_input_text (__('Text below payment button','eme'),'eme_worldpay_button_below', __('The text shown just below the payment button, you can use #_EXTRACHARGE and #_CURRENCY to indicate the extra charge calculated if wanted','eme'));
   ?>
</table>

<?php
	      break;
	      case 'other' :
?>

<h3><?php _e ( 'CSV separator', 'eme' ); ?></h3>
<table class='form-table'>
   <?php
   eme_options_input_text ( __('CSV separator','eme'), 'eme_csv_separator', __('Set the separator used in CSV exports.','eme').sprintf(__(" The default is '%s'",'eme'),eme_sanitize_html(EME_DEFAULT_CSV_SEPARATOR)) );
   ?>
</table>

<h3><?php _e ( 'Images size', 'eme' ); ?></h3>
<table class='form-table'>
   <?php
   eme_options_select ( __('Thumbnail size','eme'), 'eme_thumbnail_size', eme_thumbnail_sizes(), __('Choose the default thumbnail size to be shown when using placeholders involving thumbnails like e.g. #_EVENTIMAGETHUMB, #_LOCATIONIMAGETHUMB, ...','eme') );
   ?>
</table>

<h3><?php _e ( 'Map options', 'eme' ); ?></h3>
<table class='form-table'>
   <?php
   eme_options_input_text ( __('Global map zoom factor','eme'), 'eme_global_zoom_factor', __('The zoom factor used for the global map (max: 14).','eme').sprintf(__(" The default is '%s'",'eme'),eme_sanitize_html(DEFAULT_GLOBAL_ZOOM_FACTOR)) );
   eme_options_input_text ( __('Individual map zoom factor','eme'), 'eme_indiv_zoom_factor', __('The zoom factor used when showing a single map (max: 14).','eme').sprintf(__(" The default is '%s'",'eme'),eme_sanitize_html(DEFAULT_INDIV_ZOOM_FACTOR))  );
   eme_options_select ( __('Global map type','eme'), 'eme_global_maptype', array('ROADMAP' => __('Road map view','eme'),'SATELLITE' => __('Google Earth satellite images','eme'),'HYBRID' => __('Hybrid: a mixture of normal and satellite views','eme'), 'TERRAIN' => __('Terrain: a physical map based on terrain information')), __('The map type used for the global map (max: 14).','eme').sprintf(__(" The default is '%s'",'eme'),eme_sanitize_html(DEFAULT_GLOBAL_MAPTYPE)) );
   eme_options_select ( __('Individual map type','eme'), 'eme_indiv_maptype', array('ROADMAP' => __('Road map view','eme'),'SATELLITE' => __('Google Earth satellite images','eme'),'HYBRID' => __('Hybrid: a mixture of normal and satellite views','eme'), 'TERRAIN' => __('Terrain: a physical map based on terrain information')), __('The map type used when showing a single map (max: 14).','eme').sprintf(__(" The default is '%s'",'eme'),eme_sanitize_html(DEFAULT_INDIV_MAPTYPE))  );
   ?>
</table>

<h3><?php _e ( 'Extra html headers', 'eme' ); ?></h3>
<table class="form-table">
   <?php
   eme_options_textarea ( __ ( 'Extra html header', 'eme' ), 'eme_html_header', __ ( 'Here you can define extra html headers, no placeholders can be used, no html will be stripped. Can be used to add custom javascript, ...', 'eme' ) );
   eme_options_textarea ( __ ( 'Extra html footer', 'eme' ), 'eme_html_footer', __ ( 'Here you can define extra html footer, no placeholders can be used, no html will be stripped. Can be used to add custom javascript, ...', 'eme' ) );
   eme_options_textarea ( __ ( 'Extra event html headers', 'eme' ), 'eme_event_html_headers_format', __ ( 'Here you can define extra html headers when viewing a single event, typically used to add meta tags for facebook or SEO. All event placeholders can be used, but will be stripped from resulting html.', 'eme' ) );
   eme_options_textarea ( __ ( 'Extra location html headers', 'eme' ), 'eme_location_html_headers_format', __ ( 'Here you can define extra html headers when viewing a single location, typically used to add meta tags for facebook or SEO. All location placeholders can be used, but will be stripped from resulting html.', 'eme' ) );
   ?>
</table>

<h3><?php _e ( 'Facebook info', 'eme' ); ?></h3>
<table class='form-table'>
   <?php
   eme_options_input_text ( __ ( 'Facebook app id', 'eme' ), 'eme_fb_app_id', __ ( 'Provide facebook app id. This is needed to be able to import info from a facebook event when creating a new event.', 'eme' ) );
   ?>
</table>
<?php
	      break;
         }
?>


<p class="submit"><input type="submit" class="button-primary" id="eme_options_submit" name="Submit" value="<?php _e ( 'Save Changes' )?>" /></p>
</form>
</div>
<?php
   }
}