function password_fields() { echo '</table>' . "\r\n"; $default_text = __('<p>To update your password, enter a new password below and confirm your new password. ' . 'Leaving these fields blank will keep your current password.</p>'); echo parent::__text('profile_pass_intro', $default_text); echo '<table class="mdjm-user-profile-display">' . "\r\n"; // New Password echo '<tr>' . "\r\n"; echo '<td><label for="new_password">' . __('New Password') . ':</label><br>' . "\r\n"; echo '<input name="new_password" id="new_password" type="password" /></td>' . "\r\n"; // Confirm Password echo '<td><label for="new_password_confirm">' . __('Confirm') . ':</label><br>' . "\r\n"; echo '<input name="new_password_confirm" id="new_password_confirm" type="password" /></td>' . "\r\n"; echo '</tr>' . "\r\n"; }
function display_quote($event_id) { global $mdjm, $my_mdjm, $post; $online_template = MDJM()->events->retrieve_quote($event_id); if (empty($online_template) || !is_string(get_post_status($online_template))) { if (MDJM_DEBUG == true) { MDJM()->debug->log_it('The online template associated with event with ID ' . $event_id . ' could not be found in ' . __METHOD__, true); } parent::display_notice(4, sprintf(__('Unable to process request. Please %scontact us%s for assistance', 'mobile-dj-manager'), '<a href="' . mdjm_get_formatted_url(MDJM_CONTACT_PAGE, false) . '">', '</a>')); return; } if (!$this->update_event_quote($event_id, $online_template)) { if (MDJM_DEBUG == true) { MDJM()->debug->log_it('Unable to update quote post for event with ID ' . $event_id . ' in ' . __METHOD__, true); } } $post = get_post($online_template); // Make sure we have the template if (!is_object($post)) { if (MDJM_DEBUG == true) { MDJM()->debug->log_it('The online template with ID ' . $online_template . ' could not be retrieved in ' . __METHOD__, true); } parent::display_notice(4, sprintf(__('Unable to process request. Please %scontact us%s for assistance', 'mobile-dj-manager'), '<a href="' . mdjm_get_formatted_url(MDJM_CONTACT_PAGE, false) . '">', '</a>')); return; } $eventinfo = MDJM()->events->event_detail($event_id); // Make sure we have the event info if (empty($eventinfo)) { if (MDJM_DEBUG == true) { MDJM()->debug->log_it('Could not retrieve event information for event ' . $event_id . ' in ' . __METHOD__, true); } parent::display_notice(4, sprintf(__('Unable to process request. Please %scontact us%s for assistance', 'mobile-dj-manager'), '<a href="' . mdjm_get_formatted_url(MDJM_CONTACT_PAGE, false) . '">', '</a>')); return; } // Display the online quotation /* -- Retrieve the quote content -- */ $content = $post->post_content; $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); /* -- Shortcode replacements -- */ $content = $mdjm->filter_content($my_mdjm['me']->ID, $event_id, $content); if (!empty($content)) { if ($this->button_loc == 'before' || $this->button_loc == 'both') { $this->display_book_button($event_id); } print $content; if ($this->button_loc == 'after' || $this->button_loc == 'both') { $this->display_book_button($event_id); } } else { parent::display_notice(4, sprintf(__('An error has occured, please %scontact us%s for assistance', 'mobile-dj-manager'), '<a href="' . mdjm_get_formatted_url(MDJM_CONTACT_PAGE, false) . '">', '</a>')); } }
function client_form() { global $my_mdjm, $mdjm, $mdjm_settings; /* -- Playlist Additions -- */ if (isset($_POST['submit']) && $_POST['submit'] == 'Add Song') { $this->add_song(); } /* -- Playlist Removal -- */ if (isset($_GET['remove_song']) && !empty($_GET['remove_song'])) { $this->remove_song($_GET['remove_song']); } /* -- Enqueue jQuery validation -- */ wp_enqueue_script('mdjm-validation'); /* WELCOME TEXT */ echo parent::__text('playlist_welcome', '<p>Welcome to the ' . MDJM_COMPANY . ' event playlist management system.</p>'); /* INTRO TEXT */ echo parent::__text('playlist_intro', '<p>Use this tool to let your DJ know the songs that you would like played (or perhaps not played) ' . 'during your event on <strong>' . date('l, jS F Y', $this->eventinfo['date']) . '</strong>.</p>'); /* If client has more than one event, allow them to switch between events */ if (count($my_mdjm['active']) > 1) { ?> <?php /* EDITING PLAYLIST TEXT */ echo parent::__text('playlist_edit', '<p>You are currently editing the playlist for your event on ' . date('l, jS F Y', $this->eventinfo['date']) . '. To edit the playlist for one of your other events, ' . 'return to the <a href="' . mdjm_get_formatted_url(MDJM_HOME, false) . '">' . MDJM_APP . ' home page</a> and select Edit Playlist from the drop down list displayed next to the event for ' . 'which you want to edit the playlist.</p>'); } // if( count( $my_mdjm['active'] ) > 1 ) $num_songs = MDJM()->events->count_playlist_entries($this->event->ID); /* Display the form to add songs to playlist */ if (MDJM()->events->playlist_status($this->eventinfo['date'])) { // Display form echo '<hr />' . "\r\n"; echo '<div id="mdjm-playlist-container">' . "\r\n"; echo '<div id="mdjm-playlist-table">' . "\r\n"; echo '<form action="' . mdjm_get_formatted_url(MDJM_PLAYLIST_PAGE) . 'event_id=' . $this->event->ID . '" method="post" enctype="multipart/form-data" name="client-playlist" id="client-playlist">' . "\r\n"; wp_nonce_field('manage_playlist', '__mdjm_playlist') . "\r\n"; echo '<table id="mdjm-playlist-display">' . "\r\n"; echo '<tr>' . "\r\n"; echo '<td><label for="playlist_song">' . __('Song Name') . '</label>:<br />' . '<input name="playlist_song" id="playlist_song" type="text" size="25" class="required" /></td>' . "\r\n"; echo '<td><label for="playlist_artist">' . __('Artist') . '</label>?<br />' . '<input name="playlist_artist" id="playlist_artist" type="text" size="25" class="required" /></td>' . "\r\n"; echo '<td><label for="playlist_when">' . __('When to Play') . '</label>:<br />' . '<select name="playlist_when" id="playlist_when">' . "\r\n"; $pl_when = explode("\n", $mdjm_settings['playlist']['playlist_cats']); foreach ($pl_when as $when) { echo '<option value="' . $when . '">' . $when . '</option>' . "\r\n"; } // foreach( $pl_when as $when ) echo '</select></td>' . "\r\n"; echo '<td><label for="playlist_info">' . __('Info') . '</label>:<br />' . '<textarea name="playlist_info" id="playlist_info" placeholder="Optional: add information if you selected Other from the drop down list">' . '</textarea></td>' . "\r\n"; echo '</tr>' . "\r\n"; echo '<tr>' . "\r\n"; echo '<td colspan="4" style="text-align: left;"><input name="submit" id="submit" type="submit" value="Add Song" /></td>' . "\r\n"; echo '</tr>' . "\r\n"; // End the table display echo '</table>' . "\r\n"; echo '</form>' . "\r\n"; echo '</div>' . "\r\n"; // End div mdjm-playlist-table echo '</div>' . "\r\n"; // End div mdjm-playlist-container } else { echo parent::display_notice(1, parent::__text('playlist_closed', '<p>Additions to your playlist are disabled to allow your ' . MDJM_DJ . ' to prepare for your event.</p>')); if ($num_songs > 0) { echo '<p>' . __('Existing playlist entries are displayed below') . '.</p>'; } } /* -- Display existing entries if we have them -- */ if ($num_songs > 0) { // Songs to display $categories = MDJM()->events->get_playlist_by_cat($this->event->ID); echo '<div id="mdjm_song_container">' . "\r\n"; foreach ($categories as $category => $songs) { echo '<table class="mdjm_song_table">' . "\r\n"; echo '<tr>' . "\r\n"; echo '<th colspan="4">' . $category . '</th>' . "\r\n"; echo '</tr>' . "\r\n"; foreach ($songs as $song) { echo '<tr>' . "\r\n"; echo '<td>' . $song->song . '</td>' . "\r\n"; echo '<td>' . $song->artist . '</td>' . "\r\n"; if ($category == 'Guest Added') { echo '<td>' . $song->added_by . '</td>' . "\r\n"; } else { echo '<td>' . (!empty($song->info) ? stripslashes($song->info) : '') . '</td>' . "\r\n"; } echo '<td style="text-align: right;"><a href="' . mdjm_get_formatted_url(MDJM_PLAYLIST_PAGE) . 'remove_song=' . $song->id . '">' . __('Remove') . '</a></td>' . "\r\n"; echo '</tr>' . "\r\n"; } echo '<tr>' . "\r\n"; echo '<td colspan="4" style="font-weight: bold; border-top: 2px solid;">' . count($songs) . _n(' Song', ' Songs', count($songs)) . '</td>' . "\r\n"; echo '</tr>' . "\r\n"; echo '</table>' . "\r\n"; } // End foreach echo '</div>' . "\r\n"; // End div mdjm_song_container } // if( $num_songs > 0 ) }