function get_champ($o, $val) { switch ($o['type']) { case 'textarea': //echo ' <textarea rows="2" cols="40" name="'.$o['id'].'" id="'.$o['id'].'">'.$val.'</textarea>'; the_editor($var, $id = $o['id'], $prev_id = 'title', $media_buttons = true, $tab_index = 2); break; case 'text': echo ' <input type="text" style="width:100%;" name="' . $o['id'] . '" id="' . $o['id'] . '" value="' . $val . '"/>'; break; case 'checkbox': echo '<input type="checkbox" name="' . $o['id'] . '" id="' . $o['id'] . '" value="1" '; if ($val == 1) { echo 'checked="checked'; } echo '/><label for="' . $o['id'] . '">' . $o['name'] . '</label>'; break; case 'select': echo ' <select name="' . $o['id'] . '" style="width:100%;" id="' . $o['id'] . '"><option value="">-</option>'; foreach ($o['options'] as $opt) { echo '<option value="' . $opt . '"'; if ($opt == $val) { echo 'selected="selected"'; } echo '>' . $opt . '</option>'; } echo '</select>'; break; } }
function _page_content_hook() { $this->page_header(); $this->page_content(); $this->page_footer(); the_editor('', 'bogus_editor'); }
function adbarx_admin() { if ($_POST['nonce']) { if (!wp_verify_nonce($_POST['nonce'], 'adbarx_admin')) { die('Invalid Security Token'); } $this->options['remember'] = $_POST['showOnce'] == 'on' ? 1 : 0; $this->options['content'] = $_POST['content']; $this->options['title'] = $_POST['title']; if ($_POST['resetViews'] == 'on') { $this->options['cookie'] = 'adx_' . substr(md5(microtime()), 5, 20); } update_option('adbarx_options', $this->options); } add_filter('admin_head', array($this, 'adbarx_showEditor')); require_once PHPX_DIR . 'phpx_form.php'; $form = new phpx_form(); $form->instantReturn = true; $text = '<div class="wrap"><h2>Ad Bar X</h2>'; $text .= $form->startForm('themes.php?page=adbarx/includes/adbarx_functions.php', 'adbarxForm'); $text .= $form->hidden('nonce', wp_create_nonce('adbarx_admin')); print $text; the_editor(stripslashes($this->options['content']), 'content'); $text = '<br /><br />'; $text .= $form->textField('Bar Title', 'title', $this->options['title']); $text .= $form->checkBox('Show Adbar Once', 'showOnce', 1); $text .= $form->checkBox('Reset All Views', 'resetViews', 0); $text .= $form->endForm(); $text .= '</div>'; print $text; }
function editor($field) { //3.3 if (function_exists('wp_editor')) { wp_editor($this->parent->options->loading[$field], "wp_easy_scroll_posts[loading][{$field}]", array('media_buttons' => false, 'textarea_rows' => 5, 'teeny' => true)); } else { the_editor($this->parent->options->loading[$field], "wp_easy_scroll_posts[loading][{$field}]", null, false); } }
function admin_footer() { ?> <div style="display:none;"> <?php the_editor('', 'acf_settings'); ?> </div> <?php }
function field($args, $instance) { extract($args); $entries = is_array($entries) ? $entries['name'] : $entries; $title = apply_filters('widget_title', empty($instance['title']) ? __('Editor', 'custom-fields') : $instance['title'], $instance, $this->id_base); echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } the_editor($entries, $this->get_field_name('name'), 'title', false, 10); echo $after_widget; }
/** FUNCTION sparkCreateHomePageAdminMenu * applies actions to be run at admin init **/ function createHomePageAdminMenu() { if (!($homeGallery = get_option('home_gallery'))) { add_option('home_gallery', ''); } ?> <div class="wrap"> <form name="form1" method="post" action=""> <?php settings_fields('home_gallery'); do_settings_sections('home_gallery'); ?> <div id="poststuff"> <div id="post-body"> <div id="postdivrich" class="postarea"> <h3><?php _e('Content'); ?> </h3> <?php the_editor($homeGallery); ?> <?php wp_nonce_field('autosave', 'autosavenonce', false); ?> <?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?> <?php wp_nonce_field('getpermalink', 'getpermalinknonce', false); ?> <?php wp_nonce_field('samplepermalink', 'samplepermalinknonce', false); ?> <?php submit_button(); ?> </div> </div> </div> </form> </div> <?php }
function wk_core_richtexteditor($display, $name, $translation, $default, $media_buttons, $object_id = '', $object_type = 'post') { if ($object_type == 'post') { if ($object_id != 0) { //check if it is the post_title, the tags, or a post meta if ($name == 'post_content') { //fetch the post we are trying to edit $post = query_posts('p=' . $object_id); $value = $post[0]->post_title; } else { $value = get_post_meta($object_id, $name, true); } } else { $value = $default; } } else { //if user display then db value, or leave empty. //We dont use the default value because 1) object_id will never be 0 //2) we dont want to fill a field that the user left empty $user_info = get_userdata($object_id); $value = $user_info->{$name}; } if ($display) { ?> <p class="<?php echo $name; ?> "> <label for="<?php echo $name; ?> "><?php echo $translation; ?> </label> <?php the_editor($value, $name, '', $media_buttons, 0); ?> </p> <?php } else { echo '<input type="hidden" name="' . $name . '" value="' . $value . '" />'; } }
function milatTinyMCE() { add_filter('wp_default_editor', create_function('', 'return "html";')); if (get_bloginfo('version') < "3.2") { add_filter('wp_default_editor', create_function('', 'return "html";')); echo '<div id="poststuff"><div id="postdivrich" class="postarea">'; the_editor(stripcslashes(get_option('milat_yazi')), "milat_yazi", false, false); echo '</div></div>'; } else { if (get_bloginfo('version') < "3.3") { echo '<div id="poststuff"><div id="postdivrich" class="postarea">'; the_editor(stripcslashes(get_option('milat_yazi')), "milat_yazi", false, false); echo '</div></div>'; } else { wp_editor(stripcslashes(get_option('milat_yazi')), 'milat_yazi', array('media_buttons' => false, 'tinymce' => false, 'quicktags' => true, 'textarea_rows' => 7)); } } function _r($str, $bak) { if ($str == $bak) { return 'checked="checked"'; } } }
if (!empty($thispost->post_title)) { echo $thispost->post_title; } ?> " name="user_post_title" id="user_post_title" > </li> <li> <div style="clear: both;"></div> <!--<textarea name="user_post_desc" id="user_post_desc" style="width: 532px; height: 137px;"><?php if (!empty($thispost->post_content)) { echo $thispost->post_content; } ?> </textarea>--> <?php the_editor($thispost->post_content, 'user_post_desc'); ?> </li> <?php //div for excerpt ?> <?php //if(get_option('_wpup_excerpt')=="excerpt"){ ?>
function em_categories_edit_layout($message = "") { global $EM_Category, $EM_Notices; if (!is_object($EM_Category)) { $EM_Category = new EM_Category(); } //check that user can access this page if (is_object($EM_Category) && !$EM_Category->can_manage('edit_categories')) { ?> <div class="wrap"><h2><?php _e('Unauthorized Access', 'dbem'); ?> </h2><p><?php implode('<br/>', $EM_Category->get_errors()); ?> </p></div> <?php return; } ?> <div class='wrap'> <div id='icon-edit' class='icon32'> <br/> </div> <h2><?php echo __('Edit category', 'dbem'); ?> </h2> <?php echo $EM_Notices; ?> <div id='ajax-response'></div> <div id="poststuff" class="metabox-holder"> <div id="post-body"> <div id="post-body-content"> <form enctype='multipart/form-data' name='editcat' id='editcat' method='post' action='admin.php?page=events-manager-categories' class='validate'> <input type='hidden' name='action' value='category_save' /> <input type='hidden' name='category_id' value='<?php echo $EM_Category->id; ?> '/> <input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce('category_save'); ?> " /> <?php do_action('em_admin_category_form_header'); ?> <div id="category_description" class="postbox"> <h3><?php echo __('Category name', 'dbem'); ?> </h3> <div class="inside"> <input name='category_name' id='category-name' type='text' value='<?php echo $EM_Category->name; ?> ' size='40' /> <br /> <em><?php echo __('The name of the category', 'dbem'); ?> </em> </div> </div> <div id="category_description" class="postbox"> <h3> <?php _e('Details', 'dbem'); ?> </h3> <div class="inside"> <div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?> " class="postarea"> <?php the_editor($EM_Category->description); ?> </div> <br /> <em><?php _e('Details about the category', 'dbem'); ?> </em> </div> </div> <div id="category_description" class="stuffbox"> <h3> <?php _e('Category image', 'dbem'); ?> </h3> <div class="inside" style="padding:10px;"> <?php if ($EM_Category->get_image_url() != '') { ?> <img src='<?php echo $EM_Category->image_url; ?> ' alt='<?php echo $EM_Category->name; ?> '/> <?php } else { ?> <em><?php _e('No image uploaded for this category yet', 'dbem'); ?> </em> <?php } ?> <br /><br /> <label for='category_image'><?php _e('Upload/change picture', 'dbem'); ?> </label> <input id='locacategoryge' name='category_image' id='category_image' type='file' size='40' /> </div> </div> </div> <?php do_action('em_admin_category_form_footer'); ?> <p class='submit'><input type='submit' class='button-primary' name='submit' value='<?php echo __('Update category', 'dbem'); ?> ' /></p> </form> </div> </div> </div> </div> <?php }
function meta_options() { global $post; $es_options = get_option('es_options'); $custom = get_post_custom($post->ID); $alap_google_terkep_szelesseg = ($es_options['google_terkep_szelesseg'] and is_numeric($es_options['google_terkep_szelesseg'])) ? $es_options['google_terkep_szelesseg'] : ALAP_TERKEP_SZELESSEG; $alap_google_terkep_magassag = ($es_options['google_terkep_magassag'] and is_numeric($es_options['google_terkep_magassag'])) ? $es_options['google_terkep_magassag'] : ALAP_TERKEP_MAGASSAG; $alap_google_terkep_nagyitas = ($es_options['google_terkep_nagyitas'] and is_numeric($es_options['google_terkep_nagyitas'])) ? $es_options['google_terkep_nagyitas'] : ALAP_TERKEP_NAGYITAS; $cim = $custom["esemeny-helyszin"][0]; $kezdes = $custom["esemeny-idopont-kezdo"][0]; $befejezes = $custom["esemeny-idopont-befejezo"][0]; $terkep = $custom["esemeny-google-terkep"][0] ? 'checked="checked"' : ''; $lng = $custom["esemeny-google-terkep-lng"][0]; $lat = $custom["esemeny-google-terkep-lat"][0]; $sz = $custom["esemeny-google-terkep-szelesseg"][0] ? $custom["esemeny-google-terkep-szelesseg"][0] : $alap_google_terkep_szelesseg; $m = $custom["esemeny-google-terkep-magassag"][0] ? $custom["esemeny-google-terkep-magassag"][0] : $alap_google_terkep_magassag; $nagyitas = $custom["esemeny-google-terkep-nagyitas"][0] ? $custom["esemeny-google-terkep-nagyitas"][0] : $alap_google_terkep_nagyitas; $infobuborek = $custom["esemeny-google-terkep-info-buborek-tartalom"][0]; $mutato = $custom["esemeny-google-terkep-mutato-felirat"][0]; ?> <table class="form-table"> <tr valign="top"> <th scope="row"><label for="idopont-kezdo">KezdĹ‘ idĹ‘pont:</label></th> <td><input name="esemeny-idopont-kezdo" id="idopont-kezdo" size="16" value="<?php echo $kezdes; ?> " /></td> </tr> <tr valign="top"> <th scope="row"><label for="idopont-befejezo">BefejezĹ‘ idĹ‘pont:</label></th> <td><input name="esemeny-idopont-befejezo" id="idopont-befejezo" size="16" value="<?php echo $befejezes; ?> " /></td> </tr> <tr valign="top"> <th scope="row"><label for="esemeny-helyszin">HelyszĂn:</label></th> <td><input name="esemeny-helyszin" id="esemeny-helyszin" size="25" value="<?php echo $cim; ?> " /></td> </tr> <tr valign="top"> <th scope="row"><label for="esemeny-google-terkep">Kell tĂ©rkĂ©p az esemĂ©nyhez?</label></th> <td><input type="checkbox" name="esemeny-google-terkep" id="esemeny-google-terkep" <?php echo $terkep; ?> value="1" /></td> </tr> </table> <table class="form-table" id="terkep-adatok"> <tr><td colspan="2"><button id="terkepBetolto" type="button">TĂ©rkĂ©padatok frissĂtĂ©se</button></td></tr> <tr valign="top"> <th scope="row"><label for="esemeny-google-terkep-mutato-felirat">MutatĂł felirata:</label></th> <td><input name="esemeny-google-terkep-mutato-felirat" id="esemeny-google-terkep-mutato-felirat" value="<?php echo $mutato; ?> " ></td> </tr> <tr valign="top"> <th scope="row"><label for="esemeny-google-terkep-info-buborek-tartalom">InformáciĂłs buborĂ©k tartalma:</label></th> <td> <div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?> " class="postarea"> <?php the_editor(isset($infobuborek) ? $infobuborek : '', 'esemeny-google-terkep-info-buborek-tartalom'); ?> </div> </td> </tr> <tr valign="top"> <th scope="row"><label for="esemeny-google-terkep-lng">SzĂ©lessĂ©gi koordináta:</label></th> <td><input name="esemeny-google-terkep-lng" id="esemeny-google-terkep-lng" value="<?php echo $lng; ?> " size="8" ></td> </tr> <tr valign="top"> <th scope="row"><label for="esemeny-google-terkep-lat">HosszĂşsági koordináta:</label></th> <td><input name="esemeny-google-terkep-lat" id="esemeny-google-terkep-lat" value="<?php echo $lat; ?> " size="8" ></td> </tr> <tr valign="top"> <th scope="row"><label for="esemeny-google-terkep-szelesseg">TĂ©rkĂ©p szĂ©lessĂ©ge:</label></th> <td><input name="esemeny-google-terkep-szelesseg" id="esemeny-google-terkep-szelesseg" value="<?php echo $sz; ?> " size="3" >px</td> </tr> <tr valign="top"> <th scope="row"><label for="esemeny-google-terkep-magassag">TĂ©rkĂ©p magassága:</label></th> <td><input name="esemeny-google-terkep-magassag" id="esemeny-google-terkep-magassag" value="<?php echo $m; ?> " size="3" >px</td> </tr> <tr valign="top"> <th scope="row"><label for="esemeny-google-terkep-nagyitas">TĂ©rkĂ©p nagyĂtása:</label></th> <td><input name="esemeny-google-terkep-nagyitas" id="esemeny-google-terkep-nagyitas" value="<?php echo $nagyitas; ?> " size="2" ></td> </tr> </table> <?php }
_e('Assignment Title', 'bpsp'); ?> "/> </div> <div id="new-assignment-content-textarea"> <div id="editor-toolbar"> <div id="media-toolbar"> <?php echo bpsp_media_buttons(); ?> </div> <?php $content = $posted_data['content'] ? $posted_data['content'] : ''; ?> <?php the_editor($content, 'assignment[content]', 'assignment[title]', false); ?> </div> </div> <div id="new-assignment-content-options"> <input type="hidden" id="new-assignment-post-object" name="assignment[object]" value="group"/> <input type="hidden" id="new-assignment-post-in" name="assignment[group_id]" value="<?php echo $group_id; ?> "> <?php echo $nonce ? $nonce : ''; ?> <div id="new-assignment-content-submit"> <input type="submit" name="assignment[submit]" id="new-assignment-submit" value="<?php _e('Add a new assignment', 'bpsp');
</label></h3> <div class="inside"> <input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" value="<?php echo attribute_escape($comment->comment_author_url); ?> " tabindex="3" /> </div> </div> <div id="postdiv" class="postarea"> <h3><label for="content"><?php _e('Comment'); ?> </label></h3> <?php the_editor($comment->comment_content, 'content', 'newcomment_author_url', false, 4); wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?> </div> <?php do_meta_boxes('comment', 'normal', $comment); ?> <input type="hidden" name="c" value="<?php echo $comment->comment_ID; ?> " /> <input type="hidden" name="p" value="<?php echo $comment->comment_post_ID; ?>
function emodal_admin_modal_form_general_tab_settings_content() { ?> <tr> <th scope="row"> <label for="content"> <?php _e('Content', EMCORE_SLUG); ?> </label> </th> <td> <?php $settings = array('textarea_name' => 'modal[content]', 'wpautop' => false); if (!function_exists('wp_editor')) { the_editor(get_current_modal('content'), "content", $settings); } else { wp_editor(get_current_modal('content'), "content", $settings); } ?> <p class="description"><?php _e('Modal content. Can contain shortcodes.', EMCORE_SLUG); ?> </p> </td> </tr><?php }
if (isset($field['star']) and $field['star']) { global $frm_star_loaded; $frm_star_loaded = true; } } else { if ($field['type'] == 'rte' && is_admin()) { ?> <div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?> " class="postarea frm_full_rte"> <?php if (function_exists('wp_editor')) { wp_editor(str_replace('"', '"', $field['value']), $field_name, array('dfw' => true)); } else { the_editor(str_replace('"', '"', $field['value']), $field_name, 'title', false); } ?> </div> <?php } else { if ($field['type'] == 'rte') { global $frm_ajax_edit; if (function_exists('wp_editor') and !$frm_ajax_edit and isset($field['rte']) and $field['rte'] == 'mce') { $e_args = array('media_buttons' => false, 'textarea_name' => $field_name); if ($field['max']) { $e_args['textarea_rows'] = $field['max']; } if ($field['size']) { ?> <style type="text/css">#wp-field_<?php
public function wysiwyg($id, $label, $value, $desc) { $output = "\t" . '<p class=" . $id . ">' . "\n"; $output .= "\t" . "\t" . '<label for="' . THEME_OPTIONS . '[' . $id . ']' . '">' . $label . '</label><br/>' . "\n"; $info = THEME_OPTIONS . '[' . $id . ']'; ob_start(); the_editor($value, $info); $output .= ob_get_clean(); if ($desc) { $output .= "\t" . "\t" . '<br/><span class="desc"> ' . $desc . ' </span>' . "\n"; } $output .= "\t" . '</p>' . "\n"; return $output; }
wp_print_scripts('post'); wp_print_scripts('editor'); add_thickbox(); wp_print_scripts('media-upload'); if (function_exists('wp_tiny_mce')) { wp_tiny_mce(); } ?> <div class="wrap"> <div id="poststuff"> <div id="postdivrich"> <?php $content = $_POST['content']; ?> <?php the_editor($content, 'content', 'title', false, 2); ?> </div> </div> </div> <br /> </td> </tr> <tr> <td style="border: 0px;"> <nobr>Text Body:</nobr> </td> <td style="border: 0px;"> <textarea name="plaintext_body" id="text_body" rows="10" cols="90"><?php echo $_POST['plaintext_body']; ?>
function add_new_event_email() { ?> <!--Add event display--> <div class="metabox-holder"> <div class="postbox"> <h3><?php _e('Add an Email', 'event_espresso'); ?> </h3> <div class="inside"> <form id="add-edit-new-event-email" method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?> "> <input type="hidden" name="action" value="add"> <ul> <li><label for="email_name"><?php _e('Email Name', 'event_espresso'); ?> </label> <input type="text" name="email_name" size="25" /></li> <li><label for="email_subject"><?php _e('Email Subject Line', 'event_espresso'); ?> </label> <input type="text" name="email_subject" size="25" /></li> <li> <div id="descriptiondivrich" class="postarea"> <label for="email_text"><?php _e('Email Text', 'event_espresso'); ?> </label> <div class="postbox"> <?php if (function_exists('wp_editor')) { $args = array("textarea_rows" => 5, "textarea_name" => "email_text", "editor_class" => "my_editor_custom"); wp_editor("", "email_text", $args); } else { the_editor('', $id = 'event_desc', $prev_id = 'title', $media_buttons = true, $tab_index = 3); } //the_editor('', $id = 'email_text', $prev_id = 'title', $media_buttons = true, $tab_index = 3); ?> <table id="manage-event-email-form" cellspacing="0"> <tbody> <tr> <td class="aer-word-count"></td> <td class="autosave-info"> <span> <a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=custom_email_info"><?php _e('View Custom Email Tags', 'event_espresso'); ?> </a> | <a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=custom_email_example"> <?php _e('Email Example', 'event_espresso'); ?> </a> </span> </td> </tr> </tbody> </table> </div> </div> </li> <li> <p> <input class="button-primary" type="submit" name="Submit" value="<?php _e('Add Email'); ?> " id="add_new_email" /> </p> </li> </ul> </form> </div> </div> </div> <?php //espresso_tiny_mce(); }
<?php /* Marcus Begin Edit */ ?> <!-- Currently deactivated for editor test <textarea name="event[notes]" rows="8" cols="60"> <?php echo $event[$pref . 'notes']; ?> </textarea> --> <div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?> " class="postarea"> <?php the_editor($event['notes']); ?> </div> <?php /* Marcus End Edit */ ?> <br /> <?php _e('Details about the event', 'dbem'); ?> </div> </div> </div><!--/post-body-content--> <p class="submit"> <input type="submit" name="events_update" value="<?php _e('Submit Event', 'dbem');
/** * Show the Post Body Template. * @param integer $width The width of the editor in pixels. */ function cpm_show_post_body_template($width = 435) { global $cpm_config; ?> <?php if (function_exists('wp_tiny_mce')) { wp_tiny_mce(); } ?> <table class="form-table"> <tr> <td> <strong>Post body template:</strong> <div id="title"></div> <div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?> " class="postarea"> <?php the_editor(cpm_option('cpm-default-post-content')); ?> </div> <br /> (<em><?php _e("Available wildcards:", 'comicpress-manager'); ?> </em>) <ul> <li><strong>{category}</strong>: <?php _e("The name of the category", 'comicpress-manager'); ?> </li> <li><strong>{date}</strong>: <?php printf(__("The date of the comic (ex: <em>%s</em>)", 'comicpress-manager'), date("F j, Y", time())); ?> </li> <li><strong>{title}</strong>: <?php _e("The title of the comic", 'comicpress-manager'); ?> </li> </ul> </td> </tr> </table> <?php }
function my_calendar_print_group_fields($data, $mode, $event_id, $group_id = '') { global $user_ID, $wpdb; $mcdb = $wpdb; get_currentuserinfo(); $has_data = empty($data) ? false : true; $user = get_userdata($user_ID); $mc_input_administrator = get_option('mc_input_options_administrators') == 'true' && current_user_can('manage_options') ? true : false; $mc_input = get_option('mc_input_options'); ?> <div class="postbox-container jcd-wide"> <div class="metabox-holder"> <form method="post" action="<?php echo admin_url("admin.php?page=my-calendar-groups&mode=edit&event_id={$event_id}&group_id={$group_id}"); ?> "> <div> <input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce('my-calendar-nonce'); ?> " /> <input type="hidden" name="group_id" value="<?php if (!empty($data->event_group_id)) { echo $data->event_group_id; } else { echo mc_group_id(); } ?> " /> <input type="hidden" name="event_action" value="<?php echo $mode; ?> " /> <input type="hidden" name="event_id" value="<?php echo $event_id; ?> " /> <input type="hidden" name="event_author" value="<?php echo $user_ID; ?> " /> <input type="hidden" name="event_post" value="<?php echo $data->event_post; ?> " /> <input type="hidden" name="event_nonce_name" value="<?php echo wp_create_nonce('event_nonce'); ?> " /> </div> <div class="ui-sortable meta-box-sortables"> <div class="postbox"> <h3><?php _e('Manage Event Groups', 'my-calendar'); ?> </h3> <div class="inside"> <fieldset> <legend><?php _e('Enter your Event Information', 'my-calendar'); ?> </legend> <p> <label for="e_title"><?php _e('Event Title', 'my-calendar'); ?> <span><?php _e('(required)', 'my-calendar'); ?> </span><?php if (!mc_compare_group_members($group_id, 'event_title')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label><br /><input type="text" id="e_title" name="event_title" size="60" value="<?php if (!empty($data)) { echo stripslashes(esc_attr($data->event_title)); } ?> " /> </p> <?php $apply = mc_group_form($group_id, 'apply'); echo $apply; if ($data->event_repeats == 0 && ($data->event_recur == 'S1' || $data->event_recur == 'S')) { ?> <p> <input type="checkbox" value="1" id="e_span" name="event_span"<?php if (!empty($data) && $data->event_span == '1') { echo " checked=\"checked\""; } else { if (!empty($data) && $data->event_span == '0') { echo ""; } else { if (get_option('mc_event_span') == 'true') { echo " checked=\"checked\""; } } } ?> /> <label for="e_span"><?php _e('Selected dates are a single multi-day event.', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_span')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label> </p> <?php } else { ?> <div><input type='hidden' name='event_span' value='<?php echo $data->event_span; ?> ' /></div> <?php } ?> <?php if ($mc_input['event_desc'] == 'on' || $mc_input_administrator) { ?> <div id="group_description"><?php if (!empty($data)) { $description = $data->event_desc; } else { $description = ''; } ?> <label for="content"><?php _e('Event Description (<abbr title="hypertext markup language">HTML</abbr> allowed)', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_desc')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label><br /><?php if (version_compare(get_bloginfo('version'), '3.3', '>=')) { wp_editor(stripslashes($description), 'content', array('textarea_rows' => 10)); } else { the_editor(stripslashes($description)); } ?> </div> <?php } ?> <?php if ($mc_input['event_short'] == 'on' || $mc_input_administrator) { ?> <p> <label for="e_short"><?php _e('Event Short Description (<abbr title="hypertext markup language">HTML</abbr> allowed)', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_short')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label><br /><textarea id="e_short" name="event_short" rows="2" cols="80"><?php if (!empty($data)) { echo stripslashes(esc_attr($data->event_short)); } ?> </textarea> </p> <?php } if (mc_show_edit_block('event_image')) { ?> <div class='mc-image-upload field-holder'> <?php if (!empty($data->event_image)) { ?> <div class="event_image"><img src="<?php if ($has_data) { echo esc_attr($data->event_image); } ?> " alt="" /></div> <?php } else { ?> <div class="event_image"></div> <?php } ?> <input type="hidden" name="event_image_id" value="" class="textfield" id="e_image_id" /> <label for="e_image"><?php _e("Add an image:", 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_image')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label> <input type="text" name="event_image" id="e_image" size="60" value="<?php if ($has_data) { echo esc_attr($data->event_image); } ?> " placeholder="http://yourdomain.com/image.jpg" /> <a href="#" class="button textfield-field"><?php _e("Upload", 'my-calendar'); ?> </a> </div> <?php } else { ?> <div> <input type="hidden" name="event_image" value="<?php if ($has_data) { echo esc_attr($data->event_image); } ?> " /> <?php if (!empty($data->event_image)) { ?> <div class="event_image"><img src="<?php echo esc_attr($data->event_image); ?> " alt="" /></div> <?php } ?> </div> <?php } ?> <p> <label for="e_host"><?php _e('Event Host', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_host')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label> <select id="e_host" name="event_host"> <?php // Grab all the categories and list them $userList = my_calendar_getUsers(); foreach ($userList as $u) { echo '<option value="' . $u->ID . '"'; if (is_object($data) && $data->event_host == $u->ID) { echo ' selected="selected"'; } else { if (is_object($u) && $u->ID == $user->ID && empty($data->event_host)) { echo ' selected="selected"'; } } $display_name = $u->display_name == '' ? $u->user_nicename : $u->display_name; echo ">{$display_name}</option>\n"; } ?> </select> </p> <?php if ($mc_input['event_category'] == 'on' || $mc_input_administrator) { ?> <p> <label for="e_category"><?php _e('Event Category', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_category')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label> <select id="e_category" name="event_category"> <?php echo mc_category_select($data); ?> </select> </p> <?php } else { ?> <div> <input type="hidden" name="event_category" value="1" /> </div> <?php } ?> <?php if ($mc_input['event_link'] == 'on' || $mc_input_administrator) { ?> <p> <label for="e_link"><?php _e('Event Link (Optional)', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_link')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label> <input type="text" id="e_link" name="event_link" size="40" value="<?php if (!empty($data)) { echo esc_url($data->event_link); } ?> " /> <input type="checkbox" value="1" id="e_link_expires" name="event_link_expires"<?php if (!empty($data) && $data->event_link_expires == '1') { echo " checked=\"checked\""; } else { if (!empty($data) && $data->event_link_expires == '0') { echo ""; } else { if (get_option('mc_event_link_expires') == 'true') { echo " checked=\"checked\""; } } } ?> /> <label for="e_link_expires"><?php _e('Link will expire after event.', 'my-calendar'); ?> </label> </p> <?php } ?> </fieldset> <p> <input type="submit" name="save" class="button-primary" value="<?php _e('Edit Event Group', 'my-calendar'); ?> " /> </p> </div> </div> </div> <?php if ($mc_input['event_open'] == 'on' || $mc_input_administrator) { // add a "don't change" option here ?> <div class="ui-sortable meta-box-sortables"> <div class="postbox"> <h3><?php _e('Event Registration Options', 'my-calendar'); ?> </h3> <div class="inside"> <fieldset> <legend><?php _e('Event Registration Status', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_open')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </legend> <?php echo apply_filters('mc_event_registration', '', $has_data, $data, 'admin'); ?> </fieldset> </div> </div> </div> <?php } else { ?> <div> <input type="hidden" name="event_open" value="<?php echo $has_data ? $data->event_open : '2'; ?> " /> <input type="hidden" name="event_tickets" value="<?php echo $has_data ? esc_attr($data->event_tickets) : ''; ?> " /> <input type="hidden" name="event_registration" value="<?php echo $has_data ? esc_attr($data->event_registration) : ''; ?> " /> </div> <?php } ?> <?php if ($mc_input['event_location'] == 'on' || $mc_input['event_location_dropdown'] == 'on' || $mc_input_administrator) { ?> <div class="ui-sortable meta-box-sortables"> <div class="postbox"> <h3><?php _e('Event Location', 'my-calendar'); ?> </h3> <div class="inside location_form"> <fieldset> <legend><?php _e('Event Location', 'my-calendar'); ?> </legend> <?php } ?> <?php if ($mc_input['event_location_dropdown'] == 'on' || $mc_input_administrator) { ?> <?php $locations = $mcdb->get_results("SELECT location_id,location_label FROM " . my_calendar_locations_table() . " ORDER BY location_label ASC"); if (!empty($locations)) { ?> <p> <label for="location_preset"><?php _e('Choose a preset location:', 'my-calendar'); ?> </label> <select name="location_preset" id="location_preset"> <option value="none"> -- </option> <?php foreach ($locations as $location) { echo "<option value=\"" . $location->location_id . "\">" . stripslashes($location->location_label) . "</option>"; } ?> </select> </p> <?php } else { ?> <input type="hidden" name="location_preset" value="none" /> <p><a href="<?php echo admin_url("admin.php?page=my-calendar-locations"); ?> "><?php _e('Add recurring locations for later use.', 'my-calendar'); ?> </a></p> <?php } ?> <?php } else { ?> <input type="hidden" name="location_preset" value="none" /> <?php } ?> <?php if ($mc_input['event_location'] == 'on' || $mc_input_administrator) { ?> <p> <label for="e_label"><?php _e('Name of Location (e.g. <em>Joe\'s Bar and Grill</em>)', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_label')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label><br /><input type="text" id="e_label" name="event_label" size="40" value="<?php if (!empty($data)) { esc_attr_e(stripslashes($data->event_label)); } ?> " /> </p> <p> <label for="e_street"><?php _e('Street Address', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_street')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label> <input type="text" id="e_street" name="event_street" size="40" value="<?php if (!empty($data)) { esc_attr_e(stripslashes($data->event_street)); } ?> " /> </p> <p> <label for="e_street2"><?php _e('Street Address (2)', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_street2')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label> <input type="text" id="e_street2" name="event_street2" size="40" value="<?php if (!empty($data)) { esc_attr_e(stripslashes($data->event_street2)); } ?> " /> </p> <p> <label for="e_city"><?php _e('City', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_city')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label> <input type="text" id="e_city" name="event_city" size="40" value="<?php if (!empty($data)) { esc_attr_e(stripslashes($data->event_city)); } ?> " /> <label for="e_state"><?php _e('State/Province', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_state')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label> <input type="text" id="e_state" name="event_state" size="10" value="<?php if (!empty($data)) { esc_attr_e(stripslashes($data->event_state)); } ?> " /> </p> <p> <label for="e_postcode"><?php _e('Postal Code', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_postcode')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label> <input type="text" id="e_postcode" name="event_postcode" size="10" value="<?php if (!empty($data)) { esc_attr_e(stripslashes($data->event_postcode)); } ?> " /> <label for="e_region"><?php _e('Region', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_region')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label> <input type="text" id="e_region" name="event_region" size="40" value="<?php if (!empty($data)) { esc_attr_e(stripslashes($data->event_region)); } ?> " /> </p> <p> <label for="e_country"><?php _e('Country', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_country')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label> <input type="text" id="e_country" name="event_country" size="10" value="<?php if (!empty($data)) { esc_attr_e(stripslashes($data->event_country)); } ?> " /> </p> <p> <label for="e_zoom"><?php _e('Initial Zoom', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_zoom')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label> <select name="event_zoom" id="e_zoom"> <option value="16"<?php if (!empty($data) && $data->event_zoom == 16) { echo " selected=\"selected\""; } ?> ><?php _e('Neighborhood', 'my-calendar'); ?> </option> <option value="14"<?php if (!empty($data) && $data->event_zoom == 14) { echo " selected=\"selected\""; } ?> ><?php _e('Small City', 'my-calendar'); ?> </option> <option value="12"<?php if (!empty($data) && $data->event_zoom == 12) { echo " selected=\"selected\""; } ?> ><?php _e('Large City', 'my-calendar'); ?> </option> <option value="10"<?php if (!empty($data) && $data->event_zoom == 10) { echo " selected=\"selected\""; } ?> ><?php _e('Greater Metro Area', 'my-calendar'); ?> </option> <option value="8"<?php if (!empty($data) && $data->event_zoom == 8) { echo " selected=\"selected\""; } ?> ><?php _e('State', 'my-calendar'); ?> </option> <option value="6"<?php if (!empty($data) && $data->event_zoom == 6) { echo " selected=\"selected\""; } ?> ><?php _e('Region', 'my-calendar'); ?> </option> </select> </p> <p> <label for="e_phone"><?php _e('Phone', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_phone')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label> <input type="text" id="e_phone" name="event_phone" size="32" value="<?php if (!empty($data)) { esc_attr_e(stripslashes($data->event_phone)); } ?> " /> </p> <p> <label for="e_url"><?php _e('Location URL', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_url')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label> <input type="text" id="e_url" name="event_url" size="40" value="<?php if (!empty($data)) { esc_attr_e(stripslashes($data->event_url)); } ?> " /> </p> <fieldset> <legend><?php _e('GPS Coordinates (optional)', 'my-calendar'); ?> </legend> <p> <label for="e_latitude"><?php _e('Latitude', 'my-calendar'); if (!mc_compare_group_members($group_id, 'event_latitude')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } if (!mc_compare_group_members($group_id, 'event_longitude')) { echo " <span>" . __('Fields do not match', 'my-calendar') . "</span>"; } ?> </label> <input type="text" id="e_latitude" name="event_latitude" size="10" value="<?php if (!empty($data)) { esc_attr_e(stripslashes($data->event_latitude)); } ?> " /> <label for="e_longitude"><?php _e('Longitude', 'my-calendar'); ?> </label> <input type="text" id="e_longitude" name="event_longitude" size="10" value="<?php if (!empty($data)) { esc_attr_e(stripslashes($data->event_longitude)); } ?> " /> </p> </fieldset> <fieldset> <legend><?php _e('Location Accessibility', 'my-calendar'); ?> </legend> <ul class='checkboxes'> <?php $access = apply_filters('mc_venue_accessibility', get_option('mc_location_access')); $access_list = ''; if (!empty($data)) { $location_access = unserialize($data->event_access); } else { $location_access = array(); } foreach ($access as $k => $a) { $id = "loc_access_{$k}"; $label = $a; $checked = ''; if (is_array($location_access)) { $checked = in_array($k, $location_access) ? " checked='checked'" : ''; } $item = sprintf('<li><input type="checkbox" id="%1$s" name="event_access[]" value="%4$s" class="checkbox" %2$s /> <label for="%1$s">%3$s</label></li>', $id, $checked, $label, $k); $access_list .= $item; } echo $access_list; ?> </ul> </fieldset> <?php } ?> <?php if ($mc_input['event_location'] == 'on' || $mc_input['event_location_dropdown'] == 'on' || $mc_input_administrator) { ?> </fieldset> </div> </div> </div> <?php } ?> <p> <input type="submit" name="save" class="button-secondary" value="<?php _e('Edit Event Group', 'my-calendar'); ?> " /> </p> </form> </div> </div> <?php }
function html_edit_spider_event($row, $calendar_id, $id, $cal_name) { global $wpdb; $calendar = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "spidercalendar_calendar"); ?> <style> .calendar .button { display:table-cell !important; } </style> <script language="javascript" type="text/javascript"> function submitform(pressbutton){ document.getElementById('adminForm').action=document.getElementById('adminForm').action+"&task="+pressbutton; document.getElementById('adminForm').submit(); } function submitbutton(pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel_event') { submitform( pressbutton ); return; } if(form.date.value.search(/^[0-9]{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])/)) { alert('Invalid Date'); } else if(form.date.value.search(/^[0-9]{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])/)) { alert('Invalid Date'); } else if(form.selhour_from.value=="" && form.selminute_from.value=="" && form.selhour_to.value=="" && form.selminute_to.value=="") submitform( pressbutton ); else if(form.selhour_from.value!="" && form.selminute_from.value!="" && form.selhour_to.value=="" && form.selminute_to.value=="") submitform( pressbutton ); else if(form.selhour_from.value!="" && form.selminute_from.value!="" && form.selhour_to.value!="" && form.selminute_to.value!="") submitform( pressbutton ); else alert('Invalid Time'); } function checkhour(id) { if(typeof(event)!='undefined') { var e = event; // for trans-browser compatibility var charCode = e.which || e.keyCode; if (charCode > 31 && (charCode < 48 || charCode > 57)) return false; hour=""+document.getElementById(id).value+String.fromCharCode(e.charCode); hour=parseFloat(hour); if(document.getSelection()!='') return true; if((hour<0) || (hour>23)) return false; } return true; } function checkminute(id) { if(typeof(event)!='undefined') { var e = event; // for trans-browser compatibility var charCode = e.which || e.keyCode; if (charCode > 31 && (charCode < 48 || charCode > 57)) return false; minute=""+document.getElementById(id).value+String.fromCharCode(e.charCode); minute=parseFloat(minute); if(document.getSelection()!='') return true; if((minute<0) || (minute>59)) return false; } return true; } function checknumber(id) { if(typeof(event)!='undefined') { var e = event; // for trans-browser compatibility var charCode = e.which || e.keyCode; if (charCode > 31 && (charCode < 48 || charCode > 57)) return false; } return true; } function check12hour(id) { if(typeof(event)!='undefined') { var e = event; // for trans-browser compatibility var charCode = e.which || e.keyCode; input=document.getElementById(id); if(charCode==48 && input.value.length==0) return false; if (charCode > 31 && (charCode < 48 || charCode > 57)) return false; hour=""+document.getElementById(id).value+String.fromCharCode(e.charCode); hour=parseFloat(hour); if(document.getSelection()!='') return true; if((hour<0) || (hour>12)) return false; } return true; } function add_0(id) { input=document.getElementById(id); if(input.value.length==1) { input.value='0'+input.value; input.setAttribute("value", input.value); } } function change_type(type) { if(document.getElementById('daily1').value=='') document.getElementById('daily1').value=1; if(document.getElementById('weekly1').value=='') document.getElementById('weekly1').value=1; if(document.getElementById('monthly1').value=='') document.getElementById('monthly1').value=1; if(document.getElementById('yearly1').value=='') document.getElementById('yearly1').value=1; switch(type) { case 'no_repeat': document.getElementById('daily').setAttribute('style','display:none'); document.getElementById('weekly').setAttribute('style','display:none'); document.getElementById('monthly').setAttribute('style','display:none'); document.getElementById('year_month').setAttribute('style','display:none'); document.getElementById('repeat_until').setAttribute('style','display:none'); document.getElementById('month').value=''; document.getElementById('date_end').value='' break; case 'daily': document.getElementById('daily').removeAttribute('style'); document.getElementById('repeat_until').removeAttribute('style'); document.getElementById('weekly').setAttribute('style','display:none'); document.getElementById('monthly').setAttribute('style','display:none'); document.getElementById('repeat').innerHTML='Day(s)' document.getElementById('repeat_input').onchange=function onchange(event) {return input_value('daily1')}; document.getElementById('month').value=''; document.getElementById('year_month').setAttribute('style','display:none'); document.getElementById('repeat_input').value=document.getElementById('daily1').value; break; case 'weekly': document.getElementById('daily').removeAttribute('style'); document.getElementById('weekly').removeAttribute('style'); document.getElementById('monthly').setAttribute('style','display:none'); document.getElementById('repeat').innerHTML='Week(s) on :' document.getElementById('repeat_input').onchange=function onchange(event) {return input_value('weekly1')}; document.getElementById('month').value=''; document.getElementById('year_month').setAttribute('style','display:none'); document.getElementById('repeat_until').removeAttribute('style'); document.getElementById('repeat_input').value=document.getElementById('weekly1').value; break; case 'monthly': document.getElementById('daily').removeAttribute('style'); document.getElementById('weekly').setAttribute('style','display:none'); document.getElementById('monthly').removeAttribute('style'); document.getElementById('repeat').innerHTML='Month(s)' document.getElementById('repeat_input').value=document.getElementById('monthly1').value; document.getElementById('month').value=''; document.getElementById('year_month').setAttribute('style','display:none'); document.getElementById('repeat_until').removeAttribute('style'); document.getElementById('repeat_input').onchange=function onchange(event) {return input_value('monthly1')}; break; case 'yearly': document.getElementById('daily').removeAttribute('style'); document.getElementById('year_month').removeAttribute('style'); document.getElementById('weekly').setAttribute('style','display:none'); document.getElementById('monthly').removeAttribute('style'); document.getElementById('repeat').innerHTML='Year(s) in ' document.getElementById('repeat_input').value=document.getElementById('yearly1').value; document.getElementById('month').value=''; document.getElementById('repeat_until').removeAttribute('style'); document.getElementById('repeat_input').onchange=function onchange(event) {return input_value('yearly1')}; break; } } function week_value() { var value=''; for(i=1; i<=7; i++) { if (document.getElementById('week_'+i).checked) { value=value+document.getElementById('week_'+i).value+','; } } document.getElementById('week').value=value; } function radio_month() { if(document.getElementById('radio1').checked==true) { document.getElementById('monthly_list').disabled=true; document.getElementById('month_week').disabled=true; document.getElementById('month').disabled=false; } else { document.getElementById('month').disabled=true; document.getElementById('monthly_list').disabled=false; document.getElementById('month_week').disabled=false; } } function input_value(id) { document.getElementById(id).value=document.getElementById('repeat_input').value; } </script> <style> fieldset{ border: 2px solid #4f9bc6 ;/*#CCA383 1462a5*/ width: 100%; background: #fafbfd; padding: 13px; margin-top: 20px; -webkit-border-radius: 8px; -moz-border-radius: 8px; border-radius: 8px; } </style> <table width="95%"> <tr> <td width="100%" style="font-size:14px; font-weight:bold"><a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-3.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a><br> This section allows you to create/edit the events of a particular calendar.<br /> You can add unlimited number of events for each calendar. <a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-3.html" target="_blank" style="color:blue; text-decoration:none;">More...</a></td> <td colspan="7" align="right" style="font-size:16px;"> <a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;"> <img src="<?php echo plugins_url('images/header.png', __FILE__); ?> " border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br> Get the full version </a> </td> </tr> <tbody><tr> <td width="100%"><?php echo "<h2>" . 'Edit an event for calendar <font style="color:red">' . $cal_name . "</font></h2>"; ?> </td> <td align="right"><input type="button" onclick="submitbutton('save_event')" value="Save" class="button-secondary action"> </td> <td align="right"><input type="button" onclick="submitbutton('apply_event')" value="Apply" class="button-secondary action"> </td> <td align="right"><input type="button" onclick="window.location.href='admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?> &task=show_manage_event'" value="Cancel" class="button-secondary action"> </td> </tr></tbody></table> <form action="admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?> &id=<?php echo $id; ?> " method="post" id="adminForm" name="adminForm"> <table width="95%"><tr><td style="width:45%"> <div style="width:95%"> <fieldset class="adminform"> <legend> Event Details </legend> <table class="admintable"> <tr> <td class="key"> <label for="message"> Title: </label> </td> <td> <input type="text" id="title" name="title" size="41" value="<?php echo htmlspecialchars($row->title, ENT_QUOTES); ?> " /> </td> </tr> <tr> <td class="key"> <label for="message"> Date: </label> </td> <td> <input class="inputbox" style="width:90px" type="text" name="date" id="date" size="10" maxlength="10" value="<?php echo $row->date; ?> " /> <?php if ($row->date_end == '0000-00-00') { $row->date_end = ""; } ?> <input type="reset" class="button" value="..." onclick="return showCalendar('date','%Y-%m-%d');" /> </td> </tr> <tr> <td class="key"> <label for="message"> Time: </label> </td> <td> <?php if (!$row->time) { $from[0] = ""; $from[1] = ""; $to[0] = ""; $to[1] = ""; } else { $from_to = explode("-", $row->time); $from = explode(":", $from_to[0]); if (isset($from_to[1])) { $to = explode(":", $from_to[1]); } else { $to[0] = ""; $to[1] = ""; } } ?> <?php if ($calendar->time_format == 0) { ?> <input type="text" id="selhour_from" name="selhour_from" size="1" style="text-align:right" onkeypress="return checkhour('selhour_from')" value="<?php echo $from[0]; ?> " title="from" onblur="add_0('selhour_from')"/> <b>:</b> <input type="text" id="selminute_from" name="selminute_from" size="1" style="text-align:right" onkeypress="return checkminute('selminute_from')" value="<?php echo substr($from[1], 0, 2); ?> " title="from" onblur="add_0('selminute_from')"/> <span style="font-size:12px"> - </span> <input type="text" id="selhour_to" name="selhour_to" size="1" style="text-align:right" onkeypress="return checkhour('selhour_to')" value="<?php echo $to[0]; ?> " title="to" onblur="add_0('selhour_to')" /> <b>:</b> <input type="text" id="selminute_to" name="selminute_to" size="1" style="text-align:right" onkeypress="return checkminute('selminute_to')" value="<?php echo substr($to[1], 0, 2); ?> " title="to" onblur="add_0('selminute_to')"/> <?php } if ($calendar->time_format == 1) { ?> <input type="text" id="selhour_from" name="selhour_from" size="1" style="text-align:right" onkeypress="return check12hour('selhour_from')" value="<?php echo $from[0]; ?> " title="from" onblur="add_0('selhour_from')"/> <b>:</b> <input type="text" id="selminute_from" name="selminute_from" size="1" style="text-align:right" onkeypress="return checkminute('selminute_from')" value="<?php echo substr($from[1], 0, 2); ?> " title="from" onblur="add_0('selminute_from')"/> <select id="select_from" name="select_from" > <option <?php if (substr($from[1], 2, 2) == "AM") { echo 'selected="selected"'; } ?> >AM</option> <option <?php if (substr($from[1], 2, 2) == "PM") { echo 'selected="selected"'; } ?> >PM</option> </select> <span style="font-size:12px"> - </span> <input type="text" id="selhour_to" name="selhour_to" size="1" style="text-align:right" onkeypress="return check12hour('selhour_to')" value="<?php echo $to[0]; ?> " title="to" onblur="add_0('selhour_to')" /> <b>:</b> <input type="text" id="selminute_to" name="selminute_to" size="1" style="text-align:right" onkeypress="return checkminute('selminute_to')" value="<?php echo substr($to[1], 0, 2); ?> " title="to" onblur="add_0('selminute_to')"/> <select id="select_to" name="select_to"> <option <?php if (substr($to[1], 2, 2) == "AM") { echo 'selected="selected"'; } ?> >AM</option> <option <?php if (substr($to[1], 2, 2) == "PM") { echo 'selected="selected"'; } ?> >PM</option> </select> <?php } ?> </td> </tr> <tr> <td class="key"> <label for="note">Note: </label> </td> <td > <div id="poststuff" style="width:100% !important;" > <div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?> " class="postarea" ><?php the_editor($row->text_for_date, "text_for_date"); ?> </div> </div> </td> </tr> <tr> <td class="key"> <label for="note"> Published: </label> </td> <td > <input type="radio" name="published" id="published0" value="0" <?php cheched($row->published, '0'); ?> class="inputbox"> <label for="published0">No</label> <input type="radio" name="published" id="published1" value="1" <?php cheched($row->published, '1'); ?> class="inputbox"> <label for="published1">Yes</label> </td> </tr> </table> </fieldset> </div> </td> <td style="padding-left:25px; vertical-align:top !important; width:45%"> <div style="width:100%"> <fieldset class="adminform"> <legend> Repeat Event </legend> <table> <tr> <td valign="top" > <input type="radio" value="no_repeat" name="repeat_method" <?php if ($row->repeat_method == 'no_repeat') { echo 'checked="checked"'; } ?> checked="checked" onchange="change_type('no_repeat')" />Don't repeat this event<br/> <input type="radio" value="daily" name="repeat_method" <?php if ($row->repeat_method == 'daily') { echo 'checked="checked"'; } ?> onchange="change_type('daily')" />Repeat daily<br/> <input type="radio" value="weekly" name="repeat_method" <?php if ($row->repeat_method == 'weekly') { echo 'checked="checked"'; } ?> onchange="change_type('weekly')" />Repeat weekly<br/> <input type="radio" value="monthly" name="repeat_method" <?php if ($row->repeat_method == 'monthly') { echo 'checked="checked"'; } ?> onchange="change_type('monthly')" />Repeat monthly<br/> <input type="radio" value="yearly" name="repeat_method" <?php if ($row->repeat_method == 'yearly') { echo 'checked="checked"'; } ?> onchange="change_type('yearly')" />Repeat yearly<br/> </td> <td style="padding-left:10px" valign="top"> <div id="daily" style="display:<?php if ($row->repeat_method == 'no_repeat') { echo 'none'; } ?> "> Repeat every <input type="text" id="repeat_input" size="5" name="repeat" onkeypress="return checknumber(repeat_input)" value="<?php echo $row->repeat; ?> " /> <label id="repeat"><?php if ($row->repeat_method == 'daily') { echo 'Day(s)'; } if ($row->repeat_method == 'weekly') { echo 'Week(s) on :'; } if ($row->repeat_method == 'monthly') { echo 'Month(s)'; } if ($row->repeat_method == 'yearly') { echo 'Year(s) in'; } ?> </label> <label id="year_month" style="display:<?php if ($row->repeat_method != 'yearly') { echo 'none'; } ?> "> <select name="year_month" id="year_month" class="inputbox"> <option value="1" <?php echo selectted($row->year_month, '1'); ?> >January</option> <option value="2" <?php echo selectted($row->year_month, '2'); ?> >February</option> <option value="3" <?php echo selectted($row->year_month, '3'); ?> >March</option> <option value="4" <?php echo selectted($row->year_month, '4'); ?> >April</option> <option value="5" <?php echo selectted($row->year_month, '5'); ?> >May</option> <option value="6" <?php echo selectted($row->year_month, '6'); ?> >June</option> <option value="7" <?php echo selectted($row->year_month, '7'); ?> >July</option> <option value="8" <?php echo selectted($row->year_month, '8'); ?> >August</option> <option value="9" <?php echo selectted($row->year_month, '9'); ?> >September</option> <option value="10" <?php echo selectted($row->year_month, '10'); ?> >October</option> <option value="11" <?php echo selectted($row->year_month, '11'); ?> >November</option> <option value="12" <?php echo selectted($row->year_month, '12'); ?> >December</option> </select></label> <input type="hidden" value="<?php if ($row->repeat_method == 'daily') { echo $row->repeat; } ?> " id="daily1" /> <input type="hidden" value="<?php if ($row->repeat_method == 'weekly') { echo $row->repeat; } ?> " id="weekly1" /> <input type="hidden" value="<?php if ($row->repeat_method == 'monthly') { echo $row->repeat; } ?> " id="monthly1" /> <input type="hidden" value="<?php if ($row->repeat_method == 'yearly') { echo $row->repeat; } ?> " id="yearly1" /> </div><br /> <div class="key" id="weekly" style="display:<?php if ($row->repeat_method != 'weekly') { echo 'none'; } ?> "> <input type="checkbox" value="Mon" id="week_1" onchange="week_value()" <?php if (in_array('Mon', explode(',', $row->week))) { echo 'checked="checked"'; } ?> />Mon <input type="checkbox" value="Tue" id="week_2" onchange="week_value()" <?php if (in_array('Tue', explode(',', $row->week))) { echo 'checked="checked"'; } ?> />Tue <input type="checkbox" value="Wed" id="week_3" onchange="week_value()" <?php if (in_array('Wed', explode(',', $row->week))) { echo 'checked="checked"'; } ?> />Wed <input type="checkbox" value="Thu" id="week_4" onchange="week_value()" <?php if (in_array('Thu', explode(',', $row->week))) { echo 'checked="checked"'; } ?> />Thu <input type="checkbox" value="Fri" id="week_5" onchange="week_value()" <?php if (in_array('Fri', explode(',', $row->week))) { echo 'checked="checked"'; } ?> />Fri <input type="checkbox" value="Sat" id="week_6" onchange="week_value()" <?php if (in_array('Sat', explode(',', $row->week))) { echo 'checked="checked"'; } ?> />Sat <input type="checkbox" value="Sun" id="week_7" onchange="week_value()" <?php if (in_array('Sun', explode(',', $row->week))) { echo 'checked="checked"'; } ?> />Sun <input type="hidden" name="week" id="week" value="<?php echo $row->week; ?> " /> </div><br /> <div class="key" id="monthly" style="display:<?php if ($row->repeat_method != 'monthly' && $row->repeat_method != 'yearly') { echo 'none'; } ?> "> <input type="radio" id="radio1" name="month_type" onchange="radio_month()" value="1" checked="checked" <?php if ($row->month_type == 1) { echo 'checked="checked"'; } ?> />on the: <input type="text" name="month" size="3" onkeypress="return checknumber(month)" id="month" value="<?php echo $row->month; ?> " /><br/> <input type="radio" id="radio2" name="month_type" onchange="radio_month()" value="2" <?php if ($row->month_type == 2) { echo 'checked="checked"'; } ?> />on the: <select name="monthly_list" id="monthly_list" class="inputbox"> <option <?php echo selectted($row->monthly_list, '1'); ?> value="1">First</option> <option <?php echo selectted($row->monthly_list, '8'); ?> value="8">Second</option> <option <?php echo selectted($row->monthly_list, '15'); ?> value="15">Third</option> <option <?php echo selectted($row->monthly_list, '22'); ?> value="22">Fourth</option> <option <?php echo selectted($row->monthly_list, 'last'); ?> value="last">Last</option> </select> <select name="month_week" id="month_week" class="inputbox"> <option <?php echo selectted($row->month_week, 'Mon'); ?> value="Mon">Monday</option> <option <?php echo selectted($row->month_week, 'Tue'); ?> value="Tue">Tuesday</option> <option <?php echo selectted($row->month_week, 'Wed'); ?> value="Wed">Wednesday</option> <option <?php echo selectted($row->month_week, 'Thu'); ?> value="Thu">Thursday</option> <option <?php echo selectted($row->month_week, 'Fri'); ?> value="Fri">Friday</option> <option <?php echo selectted($row->month_week, 'Sat'); ?> value="Sat">Saturday</option> <option <?php echo selectted($row->month_week, 'Sun'); ?> value="Sun">Sunday</option> </select> </div> <br /> <script> window.onload=radio_month(); </script> </td> </tr> <tr id="repeat_until" style="display:<?php if ($row->repeat_method == 'no_repeat') { echo 'none'; } ?> "> <td> Repeat until: </td> <td> <input style="width:90px" class="inputbox" type="text" name="date_end" id="date_end" size="10" maxlength="10" value="<?php echo $row->date_end; ?> " /> <input type="reset" class="button" value="..." onclick="return showCalendar('date_end','%Y-%m-%d');" /> </td> </tr> </table> </fieldset> </div> </td></tr></table> <input type="hidden" name="option" value="com_spidercalendar" /> <input type="hidden" name="id" value="<?php echo $row->id; ?> " /> <input type="hidden" name="cid[]" value="<?php echo $row->id; ?> " /> <input type="hidden" name="task" value="event" /> <input type="hidden" name="calendar" value="<?php echo $lists['calendar']; ?> " /> </form> <?php }
if (!empty($_POST['title'])) { echo $_POST['title']; } ?> " tabindex="1" size="90" name="title" /> </p> <!--<p><label for="description">Description</label><br /> <textarea id="description" tabindex="3" name="description" cols="50" rows="6"></textarea> </p>--> <div id="poststuff" style=" width: 70%; " > <label for="title"><strong>Description</strong></label> <?php if (!empty($_POST['description'])) { $content = $_POST['description']; } the_editor($content, $id = 'description', $prev_id = 'title', $media_buttons = true, $tab_index = 2); ?> </div> <p style="padding-top: 10px;"> <label for="taille"><strong>Taille de l'equipe: </strong></label> <select name="taille" id="taille" > <option value="indeterminĂ©e" >indeterminée</option> <option value="1" <?php if (!empty($_POST['taille']) && $_POST['taille'] == "1") { echo "selected=\"selected\""; } ?> >1</option> <option value="2" <?php
function edit_event($event_id = 0) { global $wpdb, $org_options, $espresso_premium; ob_start(); $SQL = "SELECT e.*, ev.id as venue_id\n\t FROM " . EVENTS_DETAIL_TABLE . " e\n\t LEFT JOIN " . EVENTS_VENUE_REL_TABLE . " vr ON e.id = vr.event_id\n\t LEFT JOIN " . EVENTS_VENUE_TABLE . " ev ON vr.venue_id = ev.id\n\t WHERE e.id = %d"; $events = $wpdb->get_results($wpdb->prepare($SQL, $event_id)); if (!is_array($events) || count($events) <= 0) { event_espresso_edit_list(); #echo "<div class='updated fade below-h2'><p>"; #_e("Event is not available any more!","eventespresso"); #echo "</p></div>"; return 1; } foreach ($events as $event) { $event_id = $event->id; $event_name = htmlentities(stripslashes($event->event_name), ENT_QUOTES, 'UTF-8'); $event_desc = htmlentities(stripslashes($event->event_desc), ENT_QUOTES, 'UTF-8'); $display_desc = $event->display_desc; $display_reg_form = $event->display_reg_form; $member_only = $event->member_only; $phone = stripslashes_deep($event->phone); $externalURL = stripslashes_deep($event->externalURL); //Early discounts $early_disc = stripslashes_deep($event->early_disc); $early_disc_date = stripslashes_deep($event->early_disc_date); $early_disc_percentage = stripslashes_deep($event->early_disc_percentage); $post_id = $event->post_id; $post_type = $event->post_type; $event_identifier = stripslashes_deep($event->event_identifier); $registration_start = $event->registration_start; $registration_end = $event->registration_end; $registration_startT = $event->registration_startT; $resitration_endT = $event->registration_endT; $timezone_string = $event->timezone_string; $start_date = $event->start_date; $end_date = $event->end_date; $tax_percentage = $event->tax_percentage; $tax_mode = $event->tax_mode; $start_time = isset($event->start_time) ? $event->start_time : ''; $end_time = isset($event->end_time) ? $event->end_time : ''; $reg_limit = $event->reg_limit; $additional_limit = $event->additional_limit; $allow_overflow = $event->allow_overflow; $overflow_event_id = $event->overflow_event_id; $allow_multiple = $event->allow_multiple; $event_cost = unserialize(isset($event->event_cost) ? $event->event_cost : ''); $is_active = $event->is_active; $status = array(); $status = event_espresso_get_is_active($event_id); $event_status = $event->event_status; $conf_mail = stripslashes_deep($event->conf_mail); $send_mail = stripslashes_deep($event->send_mail); $use_coupon_code = $event->use_coupon_code; $alt_email = $event->alt_email; $address = stripslashes_deep($event->address); $address2 = stripslashes_deep($event->address2); $city = stripslashes_deep($event->city); $state = stripslashes_deep($event->state); $zip = stripslashes_deep($event->zip); $country = stripslashes_deep($event->country); $venue_id = stripslashes_deep($event->venue_id); $venue_title = stripslashes_deep($event->venue_title); $venue_url = stripslashes_deep($event->venue_url); $venue_phone = stripslashes_deep($event->venue_phone); $venue_image = stripslashes_deep($event->venue_image); $email_id = $event->email_id; $ticket_id = $event->ticket_id; $wp_user = $event->wp_user; $date_submitted = $event->submitted != '0000-00-00 00:00:00' ? empty($event->submitted) ? '' : event_date_display($event->submitted, get_option('date_format')) : 'N/A'; $google_map_link = espresso_google_map_link(array('address' => $address, 'city' => $city, 'state' => $state, 'zip' => $zip, 'country' => $country)); //Virtual location $virtual_url = stripslashes_deep($event->virtual_url); $virtual_phone = stripslashes_deep($event->virtual_phone); $question_groups = unserialize($event->question_groups); global $event_meta; $event_meta = unserialize($event->event_meta); $recurrence_id = $event->recurrence_id; $visible_on = $event->visible_on; $require_pre_approval = $event->require_pre_approval; if (function_exists('event_espresso_edit_event_groupon')) { $use_groupon_code = $event->use_groupon_code; } } $values = array(array('id' => 'Y', 'text' => __('Yes', 'event_espresso')), array('id' => 'N', 'text' => __('No', 'event_espresso'))); //If user is an event manager, then show only their events if (function_exists('espresso_is_my_event') && espresso_is_my_event($event_id) != true) { echo '<h2>' . __('Sorry, you do not have permission to edit this event.', 'event_espresso') . '</h2>'; return; } ?> <!--Update event display--> <div id="submitdiv" class="postbox"> <div class="handlediv" title="Click to toggle"><br /> </div> <h3 class='hndle'> <span> <?php _e('Quick Overview', 'event_espresso'); ?> </span> </h3> <div class="inside"> <div class="submitbox" id="submitpost"> <div id="minor-publishing"> <div id="minor-publishing-actions" class="clearfix"> <div id="preview-action"> <a class="preview button" href="<?php echo espresso_reg_url($event_id); ?> " target="_blank" id="event-preview" tabindex="5"> <?php _e('View Event', 'event_espresso'); ?> </a> <input type="hidden" name="event-preview" id="event-preview" value="" /> </div> <div id="copy-action"> <a class="preview button" href="admin.php?page=events&action=copy_event&event_id=<?php echo $event_id; ?> " id="post-copy" tabindex="4" onclick="return confirm('<?php _e('Are you sure you want to copy ' . $event_name . '?', 'event_espresso'); ?> ')"> <?php _e('Duplicate Event', 'event_espresso'); ?> </a> <input type="hidden" name="event-copy" id="event-copy" value="" /> </div> </div> <!-- /minor-publishing-actions --> <div id="misc-publishing-actions"> <div class="misc-pub-section curtime" id="visibility"> <span id="timestamp"> <?php _e('Start Date', 'event_espresso'); ?> <b> <?php echo event_date_display($start_date); ?> <?php echo event_date_display($start_time, get_option('time_format')); ?> </b> </span> </div> <div class="misc-pub-section"> <label for="post_status"> <?php _e('Current Status:', 'event_espresso'); ?> </label> <span id="post-status-display"> <?php echo $status['display']; ?> </span> </div> <div class="misc-pub-section" id="visibility"> <img src="<?php echo EVENT_ESPRESSO_PLUGINFULLURL; ?> images/icons/group.png" width="16" height="16" alt="<?php _e('View Attendees', 'event_espresso'); ?> " /> <?php echo !empty($number_attendees) ? __('Attendees', 'event_espresso') : '<a href="admin.php?page=events&event_admin_reports=list_attendee_payments&event_id=' . $event_id . '">' . __('Attendees', 'event_espresso') . '</a>'; ?> : <?php echo get_number_of_attendees_reg_limit($event_id, 'num_attendees_slash_reg_limit'); ?> </div> <div class="misc-pub-section <?php echo function_exists('espresso_is_admin') && espresso_is_admin() == true && $espresso_premium == true ? '' : 'misc-pub-section-last'; ?> " id="visibility2"> <a href="admin.php?page=events&event_admin_reports=event_newsletter&event_id=<?php echo $event_id; ?> " title="<?php _e('Email Event Attendees', 'event_espresso'); ?> "><img src="<?php echo EVENT_ESPRESSO_PLUGINFULLURL; ?> images/icons/email_go.png" width="16" height="16" alt="<?php _e('Newsletter', 'event_espresso'); ?> " /></a> <a href="admin.php?page=events&event_admin_reports=event_newsletter&event_id=<?php echo $event_id; ?> " title="<?php _e('Email Event Attendees', 'event_espresso'); ?> "> <?php _e('Email Event Attendees', 'event_espresso'); ?> </a></div> <?php if (function_exists('espresso_is_admin') && espresso_is_admin() == true && $espresso_premium == true) { $user_name = espresso_user_meta($wp_user, 'user_firstname') != '' ? espresso_user_meta($wp_user, 'user_firstname') . ' ' . espresso_user_meta($wp_user, 'user_lastname') . ' (<a href="user-edit.php?user_id=' . $wp_user . '">' . espresso_user_meta($wp_user, 'user_nicename') . '</a>)' : espresso_user_meta($wp_user, 'display_name') . ' (<a href="user-edit.php?user_id=' . $wp_user . '">' . espresso_user_meta($wp_user, 'user_nicename') . '</a>)'; $user_company = espresso_user_meta($wp_user, 'company') != '' ? espresso_user_meta($wp_user, 'company') : ''; $user_organization = espresso_user_meta($wp_user, 'organization') != '' ? espresso_user_meta($wp_user, 'organization') : ''; $user_co_org = $user_company != '' ? $user_company : $user_organization; echo '<div class="misc-pub-section misc-pub-section-last" id="visibility3">'; echo '<ul>'; echo '<li><strong>' . __('Submitted By:', 'event_espresso') . '</strong> ' . $user_name . '</li>'; echo '<li><strong>' . __('Email:', 'event_espresso') . '</strong> ' . espresso_user_meta($wp_user, 'user_email') . '</li>'; echo $user_co_org != '' ? '<li><strong>' . __('Organization:', 'event_espresso') . '</strong> ' . espresso_user_meta($wp_user, 'company') . '</li>' : ''; echo '<li><strong>' . __('Date Submitted:', 'event_espresso') . '</strong> ' . $date_submitted . '</li>'; echo '</ul>'; echo '</div>'; } ?> </div> <!-- /misc-publishing-actions --> </div> <!-- /minor-publishing --> <div id="major-publishing-actions" class="clearfix"> <?php if ($recurrence_id > 0) { ?> <div id="delete-action"> <a class="submitdelete deletion" href="admin.php?page=events&action=delete_recurrence_series&recurrence_id=<?php echo $recurrence_id; ?> " onclick="return confirm('<?php _e('Are you sure you want to delete ' . $event_name . '?', 'event_espresso'); ?> ')"> <?php _e('Delete all events in this series', 'event_espresso'); ?> </a> </div> <?php } else { ?> <div id="delete-action"> <a class="submitdelete deletion" href="admin.php?page=events&action=delete&event_id=<?php echo $event_id; ?> " onclick="return confirm('<?php _e('Are you sure you want to delete ' . $event_name . '?', 'event_espresso'); ?> ')"> <?php _e('Delete Event', 'event_espresso'); ?> </a> </div> <?php } ?> <div id="publishing-action"> <input class="button-primary" type="submit" name="Submit" value="<?php _e('Update Event', 'event_espresso'); ?> " id="save_event_setting" /> </div> <!-- /publishing-action --> </div> <!-- /major-publishing-actions --> </div> <!-- /submitpost --> </div> <!-- /inside --> </div> <!-- /submitdiv --> <?php if ($espresso_premium == true) { do_action('action_hook_espresso_edit_event_right_column_top', $event_id); } $advanced_options = ''; if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/event-management/advanced_settings.php')) { require_once EVENT_ESPRESSO_PLUGINFULLPATH . "includes/admin-files/event-management/advanced_settings.php"; } else { //Display Lite version options $status = array(array('id' => 'A', 'text' => __('Active', 'event_espresso')), array('id' => 'D', 'text' => __('Deleted', 'event_espresso'))); $advanced_options = '<p><strong>' . __('Advanced Options:', 'event_espresso') . '</strong></p>' . '<p><label>' . __('Is this an active event? ', 'event_espresso') . '</label>' . __(select_input('is_active', $values, $is_active)) . '</p>' . '<p><label>' . __('Display description? ', 'event_espresso') . '</label>' . select_input('display_desc', $values, $display_desc) . '</p>' . '<p><label>' . __('Display registration form? ', 'event_espresso') . '</label>' . select_input('display_reg_form', $values, $display_reg_form) . '</p>'; } //Display Lite version options - End espresso_postbox('event-status', 'Event Options', '<p><label for"reg-limit">' . __('Attendee Limit', 'event_espresso') . ': </label><input name="reg_limit" id="reg-limit" size="10" type="text" value="' . $reg_limit . '" /><br />' . '<span>(' . __('leave blank for unlimited', 'event_espresso') . ')</span></p>' . '<p><label>' . __('Allow group registrations?', 'event_espresso') . '</label> ' . select_input('allow_multiple', $values, $allow_multiple) . '</p>' . '<p><label for="addit-limit">' . __('Max Group Registrants', 'event_espresso') . ':</label> <input type="text" id="addit-limit" name="additional_limit" value="' . $additional_limit . '" size="4" />' . '</p>' . $advanced_options); if (function_exists('espresso_ticket_dd') && $espresso_premium == true) { ?> <div id="event-category" class="postbox"> <div class="handlediv" title="Click to toggle"><br> </div> <h3 class="hndle"> <span> <?php _e('Custom Tickets', 'event_espresso'); ?> </span> </h3> <div class="inside"> <?php echo espresso_ticket_dd($ticket_id); ?> </div> </div> <?php } if ($espresso_premium == true) { ?> <div id="featured-image-options" class="postbox"> <div class="handlediv" title="Click to toggle"><br /> </div> <h3 class="hndle"> <span> <?php _e('Featured Image', 'event_espresso'); ?> </span> </h3> <div class="inside"> <div id="featured-image"> <?php if (!empty($event_meta['event_thumbnail_url'])) { $event_thumb = $event_meta['event_thumbnail_url']; } else { $event_thumb = ''; } ?> <label for="upload_image"> <?php _e('Add Featured Image', 'event_espresso'); ?> </label> <input id="upload_image" type="hidden" size="36" name="upload_image" value="<?php echo $event_thumb; ?> " /> <input id="upload_image_button" type="button" value="<?php _e('Upload Image', 'event_espresso'); ?> " /> <?php if ($event_thumb) { ?> <p class="event-featured-thumb"><img style="width: 100%;" src="<?php echo $event_thumb; ?> " alt="" /></p> <a id='remove-image' href='#' title='<?php _e('Remove Image', 'event_espresso'); ?> ' onclick='return false;'><?php _e('Remove Image', 'event_espresso'); ?> </a> <?php } ?> </div> </div> </div> <?php } /* * Added for seating chart addon */ if (defined('ESPRESSO_SEATING_CHART')) { $seating_chart_id = 0; $seating_chart_event = $wpdb->get_row("select * from " . EVENTS_SEATING_CHART_EVENT_TABLE . " where event_id = {$event_id}"); if ($seating_chart_event !== NULL) { $seating_chart_id = $seating_chart_event->seating_chart_id; } ?> <div style="display: block;" id="seating_chart-options" class="postbox"> <div class="handlediv" title="Click to toggle"><br /> </div> <h3 class="hndle"><span> <?php _e('Seating chart', 'event_espresso'); ?> </span></h3> <div class="inside"> <p> <select name="seating_chart_id" id="seating_chart_id" style="float:none;"> <option value="0" <?php if ($seating_chart_id == 0) { echo 'selected="selected"'; } ?> ><?php _e('None', 'event_espresso'); ?> </option> <?php $seating_charts = $wpdb->get_results("select * from " . EVENTS_SEATING_CHART_TABLE . " order by name"); foreach ($seating_charts as $seating_chart) { ?> <option value="<?php echo $seating_chart->id; ?> " <?php if ($seating_chart_id == $seating_chart->id) { echo 'selected="selected"'; } ?> ><?php echo $seating_chart->name; ?> </option> <?php } ?> </select> <?php do_action('espresso_seating_chart_select', $event_id); ?> <?php do_action('ee_seating_chart_js'); ?> <?php do_action('ee_seating_chart_css'); ?> <?php do_action('ee_seating_chart_flush_expired_seats'); ?> </p> </div> </div> <?php } /* * End */ ###### Modification by wp-developers to introduce attendee pre-approval requirement ########## if (isset($org_options['use_attendee_pre_approval']) && $org_options['use_attendee_pre_approval'] == 'Y' && $espresso_premium == true) { ?> <div id="attendee-pre-approval-options" class="postbox"> <div class="handlediv" title="Click to toggle"><br /> </div> <h3 class="hndle"> <span> <?php _e('Attendee pre-approval required?', 'event_espresso'); ?> </span> </h3> <div class="inside"> <p class="pre-approve"> <?php $pre_approval_values = array(array('id' => '1', 'text' => __('Yes', 'event_espresso')), array('id' => '0', 'text' => __('No', 'event_espresso'))); echo select_input("require_pre_approval", $pre_approval_values, $require_pre_approval); ?> </p> </div> </div> <?php } ########## END ################################# if (defined('EVENT_ESPRESSO_MEMBERS_DIR') && $espresso_premium == true) { ?> <div id="member-options" class="postbox"> <div class="handlediv" title="Click to toggle"><br> </div> <h3 class="hndle"> <span> <?php _e('Member Options', 'event_espresso'); ?> </span> </h3> <div class="inside"> <p><?php echo event_espresso_member_only($member_only); ?> </p> </div> </div> <!-- /member-options --> <?php } if (defined('EVENTS_MAILCHIMP_ATTENDEE_REL_TABLE') && $espresso_premium == true) { MailChimpView::event_list_selection(); } ?> <div id="event-categories" class="postbox"> <div class="handlediv" title="Click to toggle"><br> </div> <h3 class="hndle"> <span> <?php _e('Event Category', 'event_espresso'); ?> </span> </h3> <div class="inside"> <?php echo event_espresso_get_categories($event_id); ?> </div> </div> <!-- /event-category --> <?php if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/event-management/promotions_box.php')) { require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/event-management/promotions_box.php'; } ?> <!-- /event-promotions --> <?php echo espresso_event_question_groups($question_groups, $event_meta['add_attendee_question_groups'], $event); ?> <!-- /event-questions --> <?php do_action('action_hook_espresso_staff_cb', $event_id, $recurrence_id); if (defined('EVENTS_GROUPON_CODES_TABLE') && $espresso_premium == true) { ?> <div id="groupon-options" class="postbox"> <div class="handlediv" title="Click to toggle"><br> </div> <h3 class="hndle"> <span> <?php _e('Groupon Options', 'event_espresso'); ?> </span> </h3> <div class="inside"> <p><?php echo event_espresso_edit_event_groupon($use_groupon_code); ?> </p> </div> </div> <!-- /groupon-options --> <?php } if ($espresso_premium == true) { do_action('action_hook_espresso_edit_event_right_column_bottom', $event_id); } $sidebar_content = ob_get_clean(); ob_start(); ?> <div id="titlediv"> <strong> <?php _e('Event Title', 'event_espresso'); ?> </strong> <div id="titlewrap"> <label class="screen-reader-text" for="title"> <?php _e('Event Title', 'event_espresso'); ?> </label> <input type="text" name="event" size="30" tabindex="1" value="<?php echo $event_name; ?> " id="title" autocomplete="off" /> </div> <!-- /titlewrap --> <div class="inside"> <div id="edit-slug-box"> <strong> <?php _e('Unique Event Identifier:', 'event_espresso'); ?> </strong> <input disabled="disabled" type="text" size="30" tabindex="2" name="event_identifier" id="event_identifier" value ="<?php echo $event_identifier; ?> " /> <?php echo '<a href="#" class="button" onclick="prompt('Event Shortcode:', \'[SINGLEEVENT single_event_id="\' + jQuery(\'#event_identifier\').val() + \'"]\'); return false;">' . __('Shortcode') . '</a>'; ?> <?php echo '<a href="#" class="button" onclick="prompt('Short URL:', \'' . espresso_reg_url($event_id) . '\'); return false;">' . __('Short URL') . '</a>'; ?> <?php echo '<a href="#" class="button" onclick="prompt('Full URL:', \'' . home_url() . '/?page_id=' . $org_options['event_page_id'] . '&regevent_action=register&event_id=' . $event_id . '\'); return false;">' . __('Full URL') . '</a>'; ?> </div> <!-- /edit-slug-box --> </div> <!-- /.inside --> </div> <!-- /titlediv --> <div id="descriptiondivrich" class="postarea"> <strong> <?php _e('Event Description', 'event_espresso'); ?> </strong> <?php if (function_exists('wp_editor')) { $args = array("textarea_rows" => 5, "textarea_name" => "event_desc", "editor_class" => "my_editor_custom"); wp_editor(espresso_admin_format_content($event_desc), "event_desc", $args); } else { /* This is the editor used by WordPress. It is very very hard to find documentation for this thing, so I pasted everything I could find below. param: string $content Textarea content. param: string $id Optional, default is 'content'. HTML ID attribute value. param: string $prev_id Optional, default is 'title'. HTML ID name for switching back and forth between visual editors. param: bool $media_buttons Optional, default is true. Whether to display media buttons. param: int $tab_index Optional, default is 2. Tabindex for textarea element. */ //the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2) //the_editor(espresso_admin_format_content($event_desc), $id = 'event_desc'/* , $prev_id = 'title', $media_buttons = true, $tab_index = 3 */); the_editor(espresso_admin_format_content($event_desc), $id = 'event_desc'); } ?> <table id="post-status-info" cellspacing="0"> <tbody> <tr> <td id="wp-word-count"></td> <td class="autosave-info"><span id="autosave"> </span></td> </tr> </tbody> </table> </div> <!-- /postdivrich --> <?php $main_post_content = ob_get_clean(); ob_start(); ?> <div id="normal-sortables" class="meta-box-sortables ui-sortable"> <div style="display: block;" id="event-date-time" class="postbox"> <div class="handlediv" title="Click to toggle"><br> </div> <h3 class="hndle"> <span> <?php _e('Event Date/Times', 'event_espresso'); ?> </span> </h3> <div class="inside"> <table width="100%" border="0" cellpadding="5"> <tr valign="top"> <td class="a"><fieldset id="add-reg-dates"> <legend> <?php _e('Registration Dates', 'event_espresso'); ?> </legend> <p> <label for="registration_start"> <?php echo __('Registration Start:', 'event_espresso'); ?> </label> <input type="text" class="datepicker" size="15" id="registration_start" name="registration_start" value="<?php echo $registration_start; ?> " /> </p> <p> <label for="registration_end"><?php echo __('Registration End:', 'event_espresso'); ?> </label> <input type="text" class="datepicker" size="15" id="registration_end" name="registration_end" value="<?php echo $registration_end; ?> " /> </p> </fieldset> <fieldset> <legend> <?php _e('Event Dates', 'event_espresso'); ?> </legend> <p> <label for="start_date"><?php echo __('Event Start Date', 'event_espresso'); ?> </label> <input type="text" class="datepicker" size="15" id="start_date" name="start_date" value="<?php echo $start_date; ?> " /> </p> <p> <label for="end_date"><?php echo __('Event End Date', 'event_espresso'); ?> </label> <input type="text" class="datepicker" size="15" id="end_date" name="end_date" value="<?php echo $end_date; ?> " /> </p> </fieldset> <?php if (isset($org_options['use_event_timezones']) && $org_options['use_event_timezones'] == 'Y' && $espresso_premium == true) { ?> <fieldset id="event-timezone"> <p> <label> <?php _e('Event Timezone', 'event_espresso'); ?> :</label> <?php echo eventespresso_ddtimezone($event_id); ?> </p> </fieldset> <?php } ?> </td> <?php // ADD TIME REGISTRATION ?> <td class="b"><fieldset id="add-register-times"> <legend> <?php _e('Registration Times', 'event_espresso'); ?> </legend> <?php echo event_espresso_timereg_editor($event_id); ?> </fieldset> <fieldset id="add-event-times"> <legend> <?php _e('Event Times', 'event_espresso'); ?> </legend> <?php echo event_espresso_time_editor($event_id); ?> </fieldset> <?php if ((!isset($org_options['use_event_timezones']) || $org_options['use_event_timezones'] != 'Y') && $espresso_premium == true) { ?> <p><span class="run-in"> <?php _e('Current Time', 'event_espresso'); ?> :</span> <span class="current-date"> <?php echo date(get_option('date_format')) . ' ' . date(get_option('time_format')); ?> </span> <a class="change-date-time" href="options-general.php" target="_blank"> <?php _e('Change timezone and date format settings?', 'event_espresso'); ?> </a></p> <?php } ?> </td> </tr> </table> </div> </div> <?php /** * Load the recurring events form if the add-on has been installed. * */ if (defined('EVENT_ESPRESSO_RECURRENCE_TABLE') && $espresso_premium == true) { require_once EVENT_ESPRESSO_RECURRENCE_FULL_PATH . "functions/re_view_functions.php"; //For now, only the recurring events will show the form if ($recurrence_id > 0) { event_espresso_re_form($recurrence_id); } } ?> <div id="event-pricing" class="postbox"> <?php defined('EVENT_ESPRESSO_MEMBERS_DIR') ? $members_active = 'class="members-active"' : ($members_active = ''); ?> <div class="handlediv" title="Click to toggle"><br> </div> <h3 class="hndle"> <span> <?php _e('Event Pricing', 'event_espresso'); ?> </span> </h3> <div class="inside"> <table <?php echo $members_active; ?> width="100%" border="0" cellpadding="5"> <tr valign="top"> <td id="standard-pricing" class="a"><?php event_espresso_multi_price_update($event_id); //Standard pricing ?> </td> <?php //If the members addon is installed, define member only event settings if (defined('EVENT_ESPRESSO_MEMBERS_DIR') && $espresso_premium == true) { ?> <td id="member-pricing" class="b"><?php echo event_espresso_member_only_pricing($event_id); //Show the the member only pricing options. ?> </td> <?php } ?> </tr> </table> </div> </div> <h2> <?php _e('Advanced Options', 'event_espresso'); ?> </h2> <?php if ($espresso_premium == true) { do_action('action_hook_espresso_edit_event_left_column_advanced_options_top', $event_id); } ?> <div id="event-location" class="postbox"> <div class="handlediv" title="Click to toggle"><br /> </div> <h3 class="hndle"> <span> <?php _e('Additional Event/Venue Information', 'event_espresso'); ?> </span> </h3> <div class="inside"> <table width="100%" border="0" cellpadding="5"> <tr valign="top"> <?php if (function_exists('espresso_venue_dd') && $org_options['use_venue_manager'] == 'Y' && $espresso_premium == true) { $ven_type = 'class="use-ven-manager"'; ?> <td <?php echo $ven_type; ?> ><fieldset id="venue-manager"> <legend><?php echo __('Venue Information', 'event_espresso'); ?> </legend> <?php if (!espresso_venue_dd()) { ?> <p class="info"><b> <?php _e('You have not created any venues yet.', 'event_espresso'); ?> </b></p> <p><a href="admin.php?page=event_venues"><?php echo __('Add venues to the Venue Manager', 'event_espresso'); ?> </a></p> <?php } else { ?> <?php echo espresso_venue_dd($venue_id); ?> <?php } ?> </fieldset></td> <?php } else { $ven_type = 'class="manual-venue"'; ?> <td <?php echo $ven_type; ?> ><fieldset> <legend> <?php _e('Physical Location', 'event_espresso'); ?> </legend> <p> <label for="phys-addr"> <?php _e('Address:', 'event_espresso'); ?> </label> <input size="20" id="phys-addr" tabindex="100" type="text" value="<?php echo $address; ?> " name="address" /> </p> <p> <label for="phys-addr-2"> <?php _e('Address 2:', 'event_espresso'); ?> </label> <input size="20" id="phys-addr-2" tabindex="101" type="text" value="<?php echo $address2; ?> " name="address2" /> </p> <p> <label for="phys-city"> <?php _e('City:', 'event_espresso'); ?> </label> <input size="20" id="phys-city" tabindex="102" type="text" value="<?php echo $city; ?> " name="city" /> </p> <p> <label for="phys-state"> <?php _e('State:', 'event_espresso'); ?> </label> <input size="20" id="phys-state" tabindex="103" type="text" value="<?php echo $state; ?> " name="state" /> </p> <p> <label for="zip-postal"> <?php _e('Zip/Postal Code:', 'event_espresso'); ?> </label> <input size="20" id="zip-postal" tabindex="104" type="text" value="<?php echo $zip; ?> " name="zip" /> </p> <p> <label for="phys-country"> <?php _e('Country:', 'event_espresso'); ?> </label> <input size="20" id="phys-country" tabindex="105" type="text" value="<?php echo $country; ?> " name="country" /> </p> <p> <?php _e('Google Map Link (for email):', 'event_espresso'); ?> <br /> <?php echo $google_map_link; ?> </p> </fieldset></td> <td <?php echo $ven_type; ?> > <fieldset> <legend> <?php _e('Venue Information', 'event_espresso'); ?> </legend> <p> <label for="ven-title"> <?php _e('Title:', 'event_espresso'); ?> </label> <input size="20"id="ven-title" tabindex="106" type="text" value="<?php echo $venue_title; ?> " name="venue_title" /> </p> <p> <label for="ven-website"> <?php _e('Website:', 'event_espresso'); ?> </label> <input size="20" id="ven-website" tabindex="107" type="text" value="<?php echo $venue_url; ?> " name="venue_url" /> </p> <p> <label for="ven-phone"> <?php _e('Phone:', 'event_espresso'); ?> </label> <input size="20" id="ven-phone" tabindex="108" type="text" value="<?php echo $venue_phone; ?> " name="venue_phone" /> </p> <p> <label for="ven-image"> <?php _e('Image:', 'event_espresso'); ?> </label> <input size="20" id="ven-image" tabindex="110" type="text" value="<?php echo $venue_image; ?> " name="venue_image" /> </p> <?php } ?> </td> <td <?php echo $ven_type; ?> ><fieldset id="virt-location"> <legend> <?php _e('Virtual Location', 'event_espresso'); ?> </legend> <p> <label for="virt-phone"> <?php _e('Phone:', 'event_espresso'); ?> </label> <input size="20" id="virt-phone" type="text" tabindex="111" value="<?php echo $phone; ?> " name="phone" /> </p> <p> <label for="url-event"> <?php _e('URL of Event:', 'event_espresso'); ?> </label> <textarea id="url-event" cols="30" rows="4" tabindex="112" name="virtual_url"><?php echo $virtual_url; ?> </textarea> </p> <p> <label for="call-in-num"> <?php _e('Call in Number:', 'event_espresso'); ?> </label> <input id="call-in-num" size="20" tabindex="113" type="text" value="<?php echo $virtual_phone; ?> " name="virtual_phone" /> </p> </fieldset></td> </tr> </table> </div> </div> <!-- /event-location--> <?php if ($espresso_premium == true) { ?> <div id="event-meta" class="postbox"> <div class="handlediv" title="Click to toggle"><br> </div> <h3 class="hndle"> <span> <?php _e('Event Meta', 'event_espresso'); ?> </span> </h3> <div class="inside"> <?php event_espresso_meta_edit($event_meta); ?> </div> </div> <?php } ?> <!-- /event-meta--> <div id="confirmation-email" class="postbox"> <div class="handlediv" title="Click to toggle"><br /> </div> <h3 class="hndle"> <span> <?php _e('Email Confirmation:', 'event_espresso'); ?> </span> </h3> <div class="inside"> <div id="emaildescriptiondivrich" class="postarea"> <div class="email-conf-opts"> <p><?php echo __('Send custom confirmation emails for this event?', 'event_espresso') . ' ' . select_input('send_mail', $values, $send_mail); ?> <?php echo '<a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=custom_email_info"><img src="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/question-frame.png" width="16" height="16" /></a>'; ?> </p> <?php if ($espresso_premium == true) { ?> <p> <?php _e('Use a ', 'event_espresso'); ?> <a href="admin.php?page=event_emails" target="_blank"> <?php _e('pre-existing email', 'event_espresso'); ?> </a>? <?php echo espresso_db_dropdown('id', 'email_name', EVENTS_EMAIL_TABLE, 'email_name', $email_id, 'desc') . ' <a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=email_manager_info"><img src="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/question-frame.png" width="16" height="16" /></a>'; ?> </p> <br /> <em>OR</em> <?php } ?> <p> <?php _e('Create a custom email:', 'event_espresso'); ?> <?php echo '<a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=event_custom_emails"><img src="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/question-frame.png" width="16" height="16" /></a>'; ?> </p> </div> <div class="postbox"> <?php //echo '<p>version_compare ='.(version_compare($wp_version, $wp_min_version) >= 0).'</p>'; if (function_exists('wp_editor')) { $args = array("textarea_rows" => 5, "textarea_name" => "conf_mail", "editor_class" => "my_editor_custom"); wp_editor(espresso_admin_format_content($conf_mail), "conf_mail", $args); } else { echo '<textarea name="conf_mail" class="theEditor" id="conf_mail">' . espresso_admin_format_content($conf_mail) . '</textarea>'; espresso_tiny_mce(); } ?> <?php /* ?> <textarea name="conf_mail" class="theEditor" id="conf_mail"><?php echo espresso_admin_format_content($conf_mail); ?></textarea><?php */ ?> <table id="email-confirmation-form" cellspacing="0"> <tr> <td class="aer-word-count"></td> <td class="autosave-info"><span><a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=custom_email_info"> <?php _e('View Custom Email Tags', 'event_espresso'); ?> </a> | <a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=custom_email_example"> <?php _e('Email Example', 'event_espresso'); ?> </a></span></td> </tr> </table> </div> </div> </div> </div> <!-- /confirmation-email--> <?php if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/event-management/edit_event_post.php')) { require_once EVENT_ESPRESSO_PLUGINFULLPATH . "includes/admin-files/event-management/edit_event_post.php"; } ?> </div> <!-- /normal-sortables--> <?php $center_metabox_content = ob_get_clean(); espresso_choose_layout($main_post_content, $sidebar_content, $center_metabox_content); include_once 'create_events_help.php'; ?> <?php wp_nonce_field('espresso_verify_update_event_nonce', 'nonce_verify_update_event'); //Security check using nonce ?> <input type="hidden" name="edit_action" value="update"> <input type="hidden" name="date_submitted" value="<?php echo $date_submitted; ?> "> <input type="hidden" name="recurrence_id" value="<?php echo $recurrence_id; ?> "> <input type="hidden" name="action" value="edit"> <input type="hidden" name="event_id" value="<?php echo $event_id; ?> "> <script type="text/javascript" charset="utf-8"> //<![CDATA[ jQuery(document).ready(function() { postboxes.add_postbox_toggles('events'); jQuery(".datepicker" ).datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true }); //Image upload var header_clicked = false; jQuery('#upload_image_button').click(function() { formfield = jQuery('#upload_image').attr('name'); tb_show('', 'media-upload.php?type=image&TB_iframe=1'); jQuery('p.event-featured-thumb').addClass('old'); header_clicked = true; return false; }); window.original_send_to_editor = window.send_to_editor; window.send_to_editor = function(html) { if(header_clicked) { imgurl = jQuery('img',html).attr('src'); jQuery('#' + formfield).val(imgurl); jQuery('#featured-image').append("<p id='image-display'><img class='show-selected-image' src='"+imgurl+"' alt='' /></p>"); header_clicked = false; tb_remove(); } else { window.original_send_to_editor(html); } } // process the remove link in the metabox jQuery('#remove-image').click(function(){ var answer = confirm("<?php _e("Do you really want to delete this image? Please remember to update your event to complete the removal.", 'event_espresso'); ?> "); if (answer){ jQuery("#upload_image").val(''); jQuery("p.event-featured-thumb").remove(); jQuery("p#image-display").remove(); jQuery('#remove-image').remove(); jQuery("#show_thumb_in_lists, #show_on_calendar, #show_thumb_in_regpage").val(false); } return false; }); }); //]]> </script> <?php }
<?php if (is_numeric($values['form_id'])) { FrmProFieldsHelper::get_shortcode_select($values['form_id']); } ?> </div> <div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?> " class="postarea frm_full_rte"> <?php if (function_exists('wp_editor')) { wp_editor($values['content'], 'content'); } else { the_editor($values['content'], 'content', 'title', false); } ?> </div> </td> </tr> <tr class="form-field"> <th valign="top" scope="row"><?php _e('After Content', 'formidable'); ?> <img src="<?php echo FRM_IMAGES_URL; ?> /tooltip.png" alt="?" class="frm_help" title="<?php _e('This content will not be repeated. This would be a good place to close any HTML tags from the Before Content field.', 'formidable');
function dbem_event_form($event, $title, $element) { global $localised_date_formats; // change prefix according to event/recurrence $_GET['action'] == "edit_recurrence" ? $pref = "recurrence_" : ($pref = "event_"); $_GET['action'] == "edit_recurrence" ? $form_destination = "edit.php?page=events-manager/events-manager.php&action=update_recurrence&recurrence_id=" . $element : ($form_destination = "edit.php?page=events-manager/events-manager.php&action=update_event&event_id=" . $element); $locale_code = substr(get_locale(), 0, 2); $localised_date_format = $localised_date_formats[$locale_code]; $hours_locale = "24"; // Setting 12 hours format for those countries using it if (preg_match("/en|sk|zh|us|uk/", $locale_code)) { $hours_locale = "12"; } $localised_example = str_replace("yy", "2008", str_replace("mm", "11", str_replace("dd", "28", $localised_date_format))); $localised_end_example = str_replace("yy", "2008", str_replace("mm", "11", str_replace("dd", "28", $localised_date_format))); if ($event[$pref . 'start_date'] != "") { preg_match("/(\\d{4})-(\\d{2})-(\\d{2})/", $event[$pref . 'start_date'], $matches); $year = $matches[1]; $month = $matches[2]; $day = $matches[3]; $localised_date = str_replace("yy", $year, str_replace("mm", $month, str_replace("dd", $day, $localised_date_format))); } else { $localised_date = ""; } if ($event[$pref . 'end_date'] != "") { preg_match("/(\\d{4})-(\\d{2})-(\\d{2})/", $event[$pref . 'end_date'], $matches); $end_year = $matches[1]; $end_month = $matches[2]; $end_day = $matches[3]; $localised_end_date = str_replace("yy", $end_year, str_replace("mm", $end_month, str_replace("dd", $end_day, $localised_date_format))); } else { $localised_end_date = ""; } // if($event[$pref.'rsvp']) // echo (dbem_bookings_table($event[$pref.'id'])); $freq_options = array("daily" => __('Daily', 'dbem'), "weekly" => __('Weekly', 'dbem'), "monthly" => __('Monthly', 'dbem')); $days_names = array(1 => __('Mon'), 2 => __('Tue'), 3 => __('Wed'), 4 => __('Thu'), 5 => __('Fri'), 6 => __('Sat'), 7 => __('Sun')); $saved_bydays = explode(",", $event['recurrence_byday']); $weekno_options = array("1" => __('first', 'dbem'), '2' => __('second', 'dbem'), '3' => __('third', 'dbem'), '4' => __('fourth', 'dbem'), '-1' => __('last', 'dbem')); $event[$pref . 'rsvp'] ? $event_RSVP_checked = "checked='checked'" : ($event_RSVP_checked = ''); ?> <form id="eventForm" method="post" action="<?php echo $form_destination; ?> "> <div class="wrap"> <div id="icon-events" class="icon32"><br /></div> <h2><?php echo $title; ?> </h2> <?php if ($event['recurrence_id']) { ?> <p id='recurrence_warning'> <?php if (isset($_GET['action']) && $_GET['action'] == 'edit_recurrence') { _e('WARNING: This is a recurrence.', 'dbem'); ?> <br /> <?php _e('Modifying these data all the events linked to this recurrence will be rescheduled', 'dbem'); } else { _e('WARNING: This is a recurring event.', 'dbem'); _e('If you change these data and save, this will become an independent event.', 'dbem'); } ?> </p> <?php } ?> <?php /* Marcus Begin Edit */ //This is an edit for WP 2.8 for styling fix ?> <div id="poststuff" class="metabox-holder has-right-sidebar"> <!-- SIDEBAR --> <div id="side-info-column" class='inner-sidebar'> <div id='side-sortables'> <!-- recurrence postbox --> <div class="postbox "> <div class="handlediv" title="Fare clic per cambiare."><br /> </div> <h3 class='hndle'><span> <?php _e("Recurrence", 'dbem'); ?> </span></h3> <div class="inside"> <?php if (!$event['event_id']) { ?> <?php if ($event['recurrence_id'] != "") { $recurrence_YES = "checked='checked'"; } ?> <p> <input id="event-recurrence" type="checkbox" name="repeated_event" value="1" <?php echo $recurrence_YES; ?> /> <?php _e('Repeated event', 'dbem'); ?> </p> <div id="event_recurrence_pattern"> <p>Frequency: <select id="recurrence-frequency" name="recurrence_freq"> <?php dbem_option_items($freq_options, $event[$pref . 'freq']); ?> </select> </p> <p> <?php _e('Every', 'dbem'); ?> <input id="recurrence-interval" name='recurrence_interval' size='2' value='<?php echo $event['recurrence_interval']; ?> '> </input> <span class='interval-desc' id="interval-daily-singular"> <?php _e('day', 'dbem'); ?> </span> <span class='interval-desc' id="interval-daily-plural"> <?php _e('days', 'dbem'); ?> </span> <span class='interval-desc' id="interval-weekly-singular"> <?php _e('week', 'dbem'); ?> </span> <span class='interval-desc' id="interval-weekly-plural"> <?php _e('weeks', 'dbem'); ?> </span> <span class='interval-desc' id="interval-monthly-singular"> <?php _e('month', 'dbem'); ?> </span> <span class='interval-desc' id="interval-monthly-plural"> <?php _e('months', 'dbem'); ?> </span> </p> <p class="alternate-selector" id="weekly-selector"> <?php dbem_checkbox_items('recurrence_bydays[]', $days_names, $saved_bydays); ?> </p> <p class="alternate-selector" id="monthly-selector"> <?php _e('Every', 'dbem'); ?> <select id="monthly-modifier" name="recurrence_byweekno"> <?php dbem_option_items($weekno_options, $event['recurrence_byweekno']); ?> </select> <select id="recurrence-weekday" name="recurrence_byday"> <?php dbem_option_items($days_names, $event['recurrence_byday']); ?> </select> </p> </div> <p id="recurrence-tip"> <?php _e('Check if your event happens more than once according to a regular pattern', 'dbem'); ?> </p> <?php } else { if (!$event['recurrence_id']) { echo "<p>" . __('This is\'t a recurrent event', 'dbem') . ".</p>"; } else { $recurrence = dbem_get_recurrence($event['recurrence_id']); ?> <p> <?php echo $recurrence['recurrence_description']; ?> <br /> <a href="<?php bloginfo('wpurl'); ?> /wp-admin/edit.php?page=events-manager/events-manager.php&action=edit_recurrence&recurrence_id=<?php echo $recurrence['recurrence_id']; ?> "> <?php _e('Reschedule', 'dbem'); ?> </a></p> <?php } ?> <?php } ?> </div> </div> <div class="postbox "> <div class="handlediv" title="Fare clic per cambiare."><br /> </div> <h3 class='hndle'><span> <?php _e('Contact Person', 'dbem'); ?> </span></h3> <div class="inside"> <p>Contact: <?php wp_dropdown_users(array('name' => 'event_contactperson_id', 'show_option_none' => __("Select...", 'dbem'), 'selected' => $event['event_contactperson_id'])); ?> </p> </div> </div> <div class="postbox "> <div class="handlediv" title="Fare clic per cambiare."><br /> </div> <h3 class='hndle'><span>RSVP</span></h3> <div class="inside"> <p> <input id="rsvp-checkbox" name='event_rsvp' value='1' type='checkbox' <?php echo $event_RSVP_checked; ?> /> <?php _e('Enable registration for this event', 'dbem'); ?> </p> <div id='rsvp-data'> <?php if ($event['event_contactperson_id'] != NULL) { $selected = $event['event_contactperson_id']; } else { $selected = '0'; } ?> <p> <?php _e('Spaces'); ?> : <input id="seats-input" type="text" name="event_seats" size='5' value="<?php echo $event[$pref . 'seats']; ?> " /> </p> <?php if ($event['event_rsvp']) { ?> <?php dbem_bookings_compact_table($event[$pref . 'id']); ?> <?php } ?> </div> </div> </div> <?php /* Marcus Begin Edit */ //adding the category selection box ?> <div class="postbox "> <div class="handlediv" title="Fare clic per cambiare."><br /> </div> <h3 class='hndle'><span> <?php _e('Category', 'dbem'); ?> </span></h3> <div class="inside"> <p>Category: <select name="event_category_id"> <?php $categories = dbem_get_categories(); ?> <option value="">Select...</option> <?php foreach ($categories as $category) { $event_category = dbem_get_event_category($event['event_id']); $selected = $category['category_id'] == $event_category['category_id'] ? "selected='selected'" : ''; ?> <option value="<?php echo $category['category_id']; ?> " <?php echo $selected; ?> > <?php echo $category['category_name']; ?> </option> <?php } ?> </select> </p> </div> </div> </div> <?php /* Marcus End Edit */ ?> </div> <!-- END OF SIDEBAR --> <div id="post-body"> <div id="post-body-content"> <?php /* Marcus End Edit */ ?> <div id="event_name" class="stuffbox"> <h3> <?php _e('Name', 'dbem'); ?> </h3> <div class="inside"> <input type="text" name="event_name" value="<?php echo $event[$pref . 'name']; ?> " /> <br /> <?php _e('The event name. Example: Birthday party', 'dbem'); ?> </div> </div> <div id="event_start_date" class="stuffbox"> <h3 id='event-date-title'> <?php _e('Event date', 'dbem'); ?> </h3> <h3 id='recurrence-dates-title'> <?php _e('Recurrence dates', 'dbem'); ?> </h3> <div class="inside"> <input id="localised-date" type="text" name="localised_event_date" value="<?php echo $localised_date; ?> " style="display: none;" /> <input id="date-to-submit" type="text" name="event_date" value="<?php echo $event[$pref . 'start_date']; ?> " style="background: #FCFFAA" /> <input id="localised-end-date" type="text" name="localised_event_end_date" value="<?php echo $localised_end_date; ?> " style="display: none;" /> <input id="end-date-to-submit" type="text" name="event_end_date" value="<?php echo $event[$pref . 'end_date']; ?> " style="background: #FCFFAA" /> <br /> <span id='event-date-explanation'> <?php _e('The event date.', 'dbem'); /* Marcus Begin Edit */ echo " "; _e('When not reoccurring, this event spans between the beginning and end date.', 'dbem'); /* Marcus End Edit */ ?> </span><span id='recurrence-dates-explanation'> <?php _e('The recurrence beginning and end date.', 'dbem'); ?> </span> </div> </div> <div id="event_end_day" class="stuffbox"> <h3> <?php _e('Event time', 'dbem'); ?> </h3> <div class="inside"> <input id="start-time" type="text" size="8" maxlength="8" name="event_start_time" value="<?php echo $event[$pref . 'start_' . $hours_locale . "h_time"]; ?> " /> - <input id="end-time" type="text" size="8" maxlength="8" name="event_end_time" value="<?php echo $event[$pref . 'end_' . $hours_locale . "h_time"]; ?> " /> <br /> <?php _e('The time of the event beginning and end', 'dbem'); ?> . </div> </div> <div id="location_coordinates" class="stuffbox" style='display: none;'> <h3> <?php _e('Coordinates', 'dbem'); ?> </h3> <div class="inside"> <input id='location-latitude' name='location_latitude' type='text' value='<?php echo $event['location_latitude']; ?> ' size='15' /> - <input id='location-longitude' name='location_longitude' type='text' value='<?php echo $event['location_longitude']; ?> ' size='15' /> </div> </div> <div id="location_name" class="stuffbox"> <h3> <?php _e('Location', 'dbem'); ?> </h3> <div class="inside"> <table id="dbem-location-data"> <tr> <th><?php _e('Name:'); ?> </th> <td><input id="location-name" type="text" name="location_name" value="<?php echo $event['location_name']; ?> " /></td> <?php $gmap_is_active = get_option('dbem_gmap_is_active'); ?> <?php if ($gmap_is_active) { ?> <td rowspan='6'><div id='map-not-found' style='width: 400px; font-size: 140%; text-align: center; margin-top: 100px; display: hide'> <p> <?php _e('Map not found'); ?> </p> </div> <div id='event-map' style='width: 400px; height: 300px; background: green; display: hide; margin-right: 8px'></div></td> <?php } // end of IF_GMAP_ACTIVE ?> </tr> <tr> <td colspan='2'><p> <?php _e('The name of the location where the event takes place. You can use the name of a venue, a square, etc', 'dbem'); ?> </p></td> </tr> <tr> <th><?php _e('Address:'); ?> </th> <td><input id="location-address" type="text" name="location_address" value="<?php echo $event['location_address']; ?> " /></td> </tr> <tr> <td colspan='2'><p> <?php _e('The address of the location where the event takes place. Example: 21, Dominick Street', 'dbem'); ?> </p></td> </tr> <tr> <th><?php _e('Town:'); ?> </th> <td><input id="location-town" type="text" name="location_town" value="<?php echo $event['location_town']; ?> " /></td> </tr> <tr> <td colspan='2'><p> <?php _e('The town where the location is located. If you\'re using the Google Map integration and want to avoid geotagging ambiguities include the country in the town field. Example: Verona, Italy.', 'dbem'); ?> </p></td> </tr> </table> </div> </div> <div id="event_notes" class="postbox"> <h3> <?php _e('Details', 'dbem'); ?> </h3> <div class="inside"> <?php /* Marcus Begin Edit */ ?> <!-- Currently deactivated for editor test <textarea name="event_notes" rows="8" cols="60"> <?php echo $event[$pref . 'notes']; ?> </textarea> --> <div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?> " class="postarea"> <?php the_editor($event[$pref . 'notes']); ?> </div> <?php /* Marcus End Edit */ ?> <br /> <?php _e('Details about the event', 'dbem'); ?> </div> </div> </div> <p class="submit"> <input type="submit" name="events_update" value="<?php _e('Submit Event', 'dbem'); ?> »" /> </p> </div> </div> </div> </form> <?php }
function dbem_locations_table_layout($locations, $new_location, $message = "") { $destination = get_bloginfo('url') . "/wp-admin/admin.php"; $new_location = is_array($new_location) ? $new_location : array(); ob_start(); ?> <div class='wrap nosubsub'> <div id='icon-edit' class='icon32'> <br/> </div> <h2><?php echo __('Locations', 'dbem'); ?> </h2> <?php if ($message != "") { ?> <div id='message' class='updated fade below-h2' style='background-color: rgb(255, 251, 204);'> <p><?php echo $message; ?> </p> </div> <?php } ?> <div id='col-container'> <div id='col-right'> <div class='col-wrap'> <form id='bookings-filter' method='get' action='<?php echo $destination; ?> '> <input type='hidden' name='page' value='locations'/> <input type='hidden' name='action' value='edit_location'/> <input type='hidden' name='event_id' value='<?php echo $event_id; ?> '/> <?php if (count($locations) > 0) { ?> <table class='widefat'> <thead> <tr> <th class='manage-column column-cb check-column' scope='col'><input type='checkbox' class='select-all' value='1'/></th> <th><?php echo __('Name', 'dbem'); ?> </th> <th><?php echo __('Address', 'dbem'); ?> </th> <th><?php echo __('Town', 'dbem'); ?> </th> </tr> </thead> <tfoot> <tr> <th class='manage-column column-cb check-column' scope='col'><input type='checkbox' class='select-all' value='1'/></th> <th><?php echo __('Name', 'dbem'); ?> </th> <th><?php echo __('Address', 'dbem'); ?> </th> <th><?php echo __('Town', 'dbem'); ?> </th> </tr> </tfoot> <tbody> <?php foreach ($locations as $this_location) { ?> <tr> <td><input type='checkbox' class ='row-selector' value='<?php echo $this_location['location_id']; ?> ' name='locations[]'/></td> <td><a href='<?php echo get_bloginfo('url'); ?> /wp-admin/admin.php?page=locations&action=edit&location_ID=<?php echo $this_location['location_id']; ?> '><?php echo $this_location['location_name']; ?> </a></td> <td><?php echo $this_location['location_address']; ?> </td> <td><?php echo $this_location['location_town']; ?> </td> </tr> <?php } ?> </tbody> </table> <div class='tablenav'> <div class='alignleft actions'> <input type='hidden' name='action2' value='delete'/> <input class='button-secondary action' type='submit' name='doaction2' value='Delete'/> <br class='clear'/> </div> <br class='clear'/> </div> <?php } else { ?> <p><?php echo __('No venues have been inserted yet!', 'dbem'); ?> </p> <?php } ?> </form> </div> </div> <!-- end col-right --> <div id='col-left'> <div class='col-wrap'> <div class='form-wrap'> <div id='ajax-response'/> <h3><?php echo __('Add location', 'dbem'); ?> </h3> <form enctype='multipart/form-data' name='addlocation' id='addlocation' method='post' action='admin.php?page=locations' class='add:the-list: validate'> <input type='hidden' name='action' value='addlocation' /> <div class='form-field form-required'> <label for='location_name'><?php echo __('Location name', 'dbem'); ?> </label> <input id='location-name' name='location_name' id='location_name' type='text' value='<?php echo $new_location['location_name']; ?> ' size='40' /> <p><?php echo __('The name of the location', 'dbem'); ?> .</p> </div> <div class='form-field'> <label for='location_address'><?php echo __('Location address', 'dbem'); ?> </label> <input id='location-address' name='location_address' id='location_address' type='text' value='<?php echo $new_location['location_address']; ?> ' size='40' /> <p><?php echo __('The address of the location', 'dbem'); ?> .</p> </div> <div class='form-field '> <label for='location_town'><?php echo __('Location town', 'dbem'); ?> </label> <input id='location-town' name='location_town' id='location_town' type='text' value='<?php echo $new_location['location_town']; ?> ' size='40' /> <p><?php echo __('The town of the location', 'dbem'); ?> .</p> </div> <div class='form-field' style='display:none;'> <label for='location_latitude'>LAT</label> <input id='location-latitude' name='location_latitude' type='text' value='<?php echo $new_location['location_latitude']; ?> ' size='40' /> </div> <div class='form-field' style='display:none;'> <label for='location_longitude'>LONG</label> <input id='location-longitude' name='location_longitude' type='text' value='<?php echo $new_location['location_longitude']; ?> ' size='40' /> </div> <div class='form-field'> <label for='location_image'><?php echo __('Location image', 'dbem'); ?> </label> <input id='location-image' name='location_image' id='location_image' type='file' size='35' /> <p><?php echo __('Select an image to upload', 'dbem'); ?> .</p> </div> <?php $gmap_is_active = get_option('dbem_gmap_is_active'); if ($gmap_is_active) { ?> <div id='map-not-found' style='width: 450px; font-size: 140%; text-align: center; margin-top: 20px; display: hide'><p><?php echo __('Map not found'); ?> </p></div> <div id='event-map' style='width: 450px; height: 300px; background: green; display: hide; margin-right:8px'></div> <br style='clear:both;' /> <?php } ?> <div id="poststuff"> <label for='location_description'><?php _e('Location description', 'dbem'); ?> </label> <div class="inside"> <div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?> " class="postarea"> <?php the_editor($new_location['location_description']); ?> </div> <?php _e('A description of the Location. You may include any kind of info here.', 'dbem'); ?> </div> </div> <p class='submit'><input type='submit' class='button' name='submit' value='<?php echo __('Add location', 'dbem'); ?> ' /></p> </form> </div> </div> </div> <!-- end col-left --> </div> </div> <?php echo ob_get_clean(); }
<fieldset id="titlediv"> <legend><?php _e('Title') ?></legend> <div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo $post->post_title; ?>" id="title" /></div> </fieldset> <fieldset id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>"> <legend><?php _e('Post') ?> <?php if ( 'publish' == $post->post_status ) { ?> <a href="<?php echo clean_url(get_permalink($post->ID)); ?>" class="view-link" target="_blank"><?php _e('View »'); ?></a> <?php } elseif ( 'edit' == $action ) { ?> <a href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" class="view-link" target="_blank"><?php _e('Preview »'); ?></a> <?php } ?> </legend> <?php the_editor($post->post_content); ?> </fieldset> <?php echo $form_pingback ?> <?php echo $form_prevstatus ?> <p class="submit"> <span id="autosave"></span> <?php echo $saveasdraft; ?> <input type="submit" name="submit" value="<?php _e('Save') ?>" style="font-weight: bold;" tabindex="4" /> <?php if ('publish' != $post->post_status || 0 == $post_ID) { ?> <?php if ( current_user_can('publish_posts') ) : ?> <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" />
function wysiwyg_render_meta_box1() { global $post; $meta_box_id1 = WYSIWYG_META_BOX_ID1; $editor_id1 = WYSIWYG_EDITOR_ID1; $value = get_post_meta($post->ID, 'car_title', true); //Add CSS & jQuery goodness to make this work like the original WYSIWYG echo "Title : <input type='text' name='car_title' value='" . $value . "'>\n\t\t\t\t\t\t\t<style type='text/css'>\n\t\t\t\t\t\t\t\t\t#{$meta_box_id1} #edButtonHTML, #{$meta_box_id1} #edButtonPreview {background-color: #F1F1F1; border-color: #DFDFDF #DFDFDF #CCC; color: #999;}\n\t\t\t\t\t\t\t\t\t#{$editor_id1}{width:100%;}\n\t\t\t\t\t\t\t\t\t#{$meta_box_id1} #editorcontainer{background:#fff !important;}\n\t\t\t\t\t\t\t\t\t#{$meta_box_id1} #editor_id1_fullscreen{display:none;}\n\t\t\t\t\t\t\t\t\tinput{margin:2% 0 2% 0;}\n\t\t\t\t\t\t\t</style>\n\t\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\t\t\tjQuery(function(\$){\n\t\t\t\t\t\t\t\t\t\t\t\$('#{$meta_box_id1} #editor-toolbar > a').click(function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\$('#{$meta_box_id1} #editor-toolbar > a').removeClass('active');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\$(this).addClass('active');\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif(\$('#{$meta_box_id1} #edButtonPreview').hasClass('active')){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\$('#{$meta_box_id1} #ed_toolbar').hide();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\$('#{$meta_box_id1} #edButtonPreview').click(function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\$('#{$meta_box_id1} #ed_toolbar').hide();\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\$('#{$meta_box_id1} #edButtonHTML').click(function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\$('#{$meta_box_id1} #ed_toolbar').show();\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\n\t\t\t\t//Tell the uploader to insert content into the correct WYSIWYG editor\n\t\t\t\t\$('#media-buttons a').bind('click', function(){\n\t\t\t\t var customEditor = \$(this).parents('#{$meta_box_id1}');\n\t\t\t\t if(customEditor.length > 0){\n\t\t\t\t edCanvas = document.getElementById('{$editor_id1}');\n\t\t\t\t }\n\t\t\t\t else{\n\t\t\t\t edCanvas = document.getElementById('content');\n\t\t\t\t }\n\t\t\t\t});\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t"; //Create The Editor $content = get_post_meta($post->ID, WYSIWYG_META_KEY1, true); the_editor($content, $editor_id1); //Clear The Room! echo "<div style='clear:both; display:block;'></div>"; }