function get_single_event_header($event_id, $repeat_interval = '') { $event_datetime = new evo_datetime(); $pmv = get_post_custom($event_id); $adjusted_start_time = $event_datetime->get_int_correct_event_time($pmv, $repeat_interval); $formatted_time = eventon_get_formatted_time($adjusted_start_time); return get_eventon_cal_title_month($formatted_time['n'], $formatted_time['Y']); }
*/ global $eventon, $eventon_rs; echo $eventon->get_email_part('header'); $args = $args; $event_name = get_the_title($args['e_id']); $e_pmv = get_post_meta($args['e_id']); $rsvp_pmv = get_post_custom($args['rsvp_id']); $evo_options = get_option('evcal_options_evcal_1'); $evo_options_2 = $eventon_rs->opt2; $optRS = $eventon_rs->evors_opt; $lang = !empty($args['lang']) ? $args['lang'] : 'L1'; // language version //event time $repeat_interval = !empty($args['repeat_interval']) ? $args['repeat_interval'][0] : 0; $datetime = new evo_datetime(); $unix_start = $datetime->get_int_correct_event_time($e_pmv, $repeat_interval, 'start'); $unix_end = $datetime->get_int_correct_event_time($e_pmv, $repeat_interval, 'end'); $__date = $eventon_rs->frontend->_event_date($e_pmv, $unix_start, $unix_end); // location data $location = (!empty($e_pmv['evcal_location_name']) ? $e_pmv['evcal_location_name'][0] . ': ' : null) . (!empty($e_pmv['evcal_location']) ? $e_pmv['evcal_location'][0] : null); // styles $__styles_date = "font-size:48px; color:#ABABAB; font-weight:bold; margin-top:5px"; $__styles_em = "font-size:14px; font-weight:bold; text-transform:uppercase; display:block;font-style:normal"; $__styles_button = "font-size:14px; background-color:#" . (!empty($evo_options['evcal_gen_btn_bgc']) ? $evo_options['evcal_gen_btn_bgc'] : "237ebd") . "; color:#" . (!empty($evo_options['evcal_gen_btn_fc']) ? $evo_options['evcal_gen_btn_fc'] : "ffffff") . "; padding: 5px 10px; text-decoration:none; border-radius:4px; "; $__styles_01 = "font-size:30px; color:#303030; font-weight:bold; text-transform:uppercase; margin-bottom:0px; margin-top:0;"; $__styles_02 = "font-size:18px; color:#303030; font-weight:normal; text-transform:uppercase; display:block; font-style:italic; margin: 4px 0; line-height:110%;"; $__sty_lh = "line-height:110%;"; $__styles_02a = "color:#afafaf; text-transform:none"; $__styles_03 = "color:#afafaf; font-style:italic;font-size:14px; margin:0 0 10px 0;"; $__styles_04 = "color:#303030; text-transform:uppercase; font-size:18px; font-style:italic; padding-bottom:0px; margin-bottom:0px; line-height:110%;"; $__styles_05 = "padding-bottom:40px; ";
function evoRS_metabox_rsvp() { global $post, $eventon_rs, $ajde, $pagenow; $pmv = get_post_meta($post->ID); $optRS = $eventon_rs->evors_opt; // Debug email templates $show_debug_email = false; if ($show_debug_email) { $tt = $eventon_rs->frontend->_get_email_body(array('e_id' => '90', 'rsvp' => 'y', 'count' => '1', 'first_name' => 'Jason', 'last_name' => 'Miller', 'rsvp_id' => '709', 'email' => '*****@*****.**'), 'confirmation_email'); print_r($tt); } // get translated check-in status $_checkinST = !empty($pmv['status']) && $pmv['status'][0] == 'checked' ? 'checked' : 'check-in'; $checkin_status = $eventon_rs->frontend->get_checkin_status($_checkinST); wp_nonce_field(plugin_basename(__FILE__), 'evorsvp_nonce'); ?> <div class='eventon_mb' style='margin:-6px -12px -12px'> <div style='background-color:#ECECEC; padding:15px;'> <div style='background-color:#fff; border-radius:8px;'> <table id='evors_rsvp_tb' width='100%' class='evo_metatable'> <tr><td><?php _e('RSVP #', 'eventon'); ?> : </td><td><?php echo $post->ID; ?> </td></tr> <tr><td><?php _e('RSVP Status', 'eventon'); ?> : </td> <td><select name='rsvp'> <?php $savedrsvpO = !empty($pmv['rsvp']) ? $pmv['rsvp'][0] : false; foreach ($eventon_rs->rsvp_array_ as $rsvpOptions => $rsvpV) { echo "<option " . ($savedrsvpO && $rsvpOptions == $pmv['rsvp'][0] ? 'selected="selected"' : '') . " value='{$rsvpOptions}'>{$rsvpV}</option>"; } ?> </select> </td></tr> <tr><td><?php _e('Checkin Status', 'eventon'); ?> : </td><td><span class='rsvp_ch_st <?php echo $_checkinST; ?> ' data-status='<?php echo $_checkinST; ?> ' data-rsvpid='<?php echo $post->ID; ?> '><?php echo $checkin_status; ?> </span></td></tr> <tr><td><?php _e('First Name', 'eventon'); ?> :* </td> <td><input type='text' name='first_name' value='<?php echo !empty($pmv['first_name']) ? $pmv['first_name'][0] : ''; ?> '/> </td></tr> <tr><td><?php _e('Last Name', 'eventon'); ?> : </td> <td><input type='text' name='last_name' value='<?php echo !empty($pmv['last_name']) ? $pmv['last_name'][0] : ''; ?> '/> </td></tr> <tr><td><?php _e('Email Address', 'eventon'); ?> :* </td> <td><input type='text' name='email' value='<?php echo !empty($pmv['email']) ? $pmv['email'][0] : ''; ?> '/> </td></tr> <tr><td><?php _e('Count', 'eventon'); ?> : </td> <td><input type='text' name='count' value='<?php echo !empty($pmv['count']) ? $pmv['count'][0] : '1'; ?> '/></td></tr> <tr><td><?php _e('Phone', 'eventon'); ?> : </td> <td><input type='text' name='phone' value='<?php echo !empty($pmv['phone']) ? $pmv['phone'][0] : ''; ?> '/></td></tr> <tr><td><?php _e('Receive Email Updates', 'eventon'); ?> : </td> <td><?php echo $ajde->wp_admin->html_yesnobtn(array('id' => 'updates', 'input' => true, 'default' => !empty($pmv['updates']) && $pmv['updates'][0] == 'yes' ? 'yes' : 'no')); ?> </td></tr> <tr><td><?php _e('Event', 'eventon'); ?> : </td> <td><?php // event for rsvp if (empty($pmv['e_id'])) { $events = get_posts(array('posts_per_page' => -1, 'post_type' => 'ajde_events')); if ($events && count($events) > 0) { echo "<select name='e_id'>"; foreach ($events as $event) { echo "<option value='" . $event->ID . "'>" . get_the_title($event->ID) . "</option>"; } echo "</select>"; } wp_reset_postdata(); } else { echo '<a href="' . get_edit_post_link($pmv['e_id'][0]) . '">' . get_the_title($pmv['e_id'][0]) . '</a></td></tr>'; } // REPEATING interval if ($pagenow != 'post-new.php' && !empty($pmv['e_id'])) { $saved_ri = !empty($pmv['repeat_interval']) && $pmv['repeat_interval'][0] != '0' ? $pmv['repeat_interval'][0] : '0'; $event_pmv = get_post_custom($pmv['e_id'][0]); ?> <tr><td><?php _e('Event Date', 'eventon'); ?> : </td> <td><?php $repeatIntervals = unserialize($event_pmv['repeat_intervals'][0]); if ($repeatIntervals && count($repeatIntervals) > 0) { $datetime = new evo_datetime(); echo "<select name='repeat_interval'>"; $x = 0; $wp_date_format = get_option('date_format'); foreach ($repeatIntervals as $interval) { $time = $datetime->get_int_correct_event_time($event_pmv, $x); echo "<option value='" . $x . "' " . ($saved_ri == $x ? 'selected="selected"' : '') . ">" . date($wp_date_format . ' h:i:a', $time) . "</option>"; $x++; } echo "</select>"; } ?> </td></tr> <?php } // additional fields for ($x = 1; $x < 4; $x++) { // if fields is activated and name of the field is not empty if (evo_settings_val('evors_addf' . $x, $optRS) && !empty($optRS['evors_addf' . $x . '_1'])) { $FIELDTYPE = !empty($optRS['evors_addf' . $x . '_2']) ? $optRS['evors_addf' . $x . '_2'] : 'text'; if ($FIELDTYPE == 'text') { echo "<tr><td>" . $optRS['evors_addf' . $x . '_1'] . "</td>\r\n\t\t\t\t\t\t\t\t<td><input type='text' name='evors_addf'.{$x}.'_1' value='" . (!empty($pmv['evors_addf' . $x . '_1']) ? $pmv['evors_addf' . $x . '_1'][0] : '-') . "'/></td></tr>"; } else { echo "<tr><td>" . $optRS['evors_addf' . $x . '_1'] . "</td>\r\n\t\t\t\t\t\t\t\t<td><select name='evors_addf{$x}_1'>"; $OPTIONS = $eventon_rs->frontend->get_additional_field_options($optRS['evors_addf' . $x . '_4']); foreach ($OPTIONS as $slug => $options) { echo "<option " . (!empty($pmv['evors_addf' . $x . '_1']) && $slug == $pmv['evors_addf' . $x . '_1'][0] ? 'selected="selected"' : '') . " value='{$slug}'>{$options}</option>"; } echo "</select></td></tr>"; } } } // plugabble hook if (!empty($pmv['e_id'])) { do_action('eventonrs_rsvp_post_table', $post->ID, $pmv); } ?> </table> </div> </div> </div> <?php }
function get_correct_event_end_time($e_pmv, $__repeatInterval) { $datetime = new evo_datetime(); return $datetime->get_int_correct_event_time($e_pmv, $__repeatInterval, 'end'); }