예제 #1
0
 function __construct($args = '')
 {
     global $mdjm, $clientzone_loaded, $mdjm_settings;
     // Must be authenticated
     if (!is_user_logged_in()) {
         parent::login();
     } elseif (empty($mdjm_settings['templates']['online_enquiry'])) {
         parent::display_notice(4, sprintf(__('This option is disabled for your event. Please %scontact us%s for assistance', 'mobile-dj-manager'), '<a href="' . mdjm_get_formatted_url(MDJM_CONTACT_PAGE, false) . '">', '</a>'));
     } elseif (!$this->should_i_be_here()) {
         // do validation
         parent::display_notice(4, sprintf(__('An error is stopping your access to this quotation. Please %scontact us%s for assistance', 'mobile-dj-manager'), '<a href="' . mdjm_get_formatted_url(MDJM_CONTACT_PAGE, false) . '">', '</a>'));
     } else {
         if (isset($_GET['message'], $_GET['class'])) {
             parent::display_message($_GET['message'], $_GET['class']);
         }
         // Possible button settings
         $button_loc = array('before', 'after', 'both');
         $button_align = array('left', 'center', 'right');
         // Define button settings
         $this->book_button = !empty($args['book_button']) ? true : false;
         $this->button_loc = !empty($args['button_loc']) && in_array($button_loc) ? $args['button_loc'] : 'both';
         $this->button_align = !empty($args['button_align']) && in_array($button_loc) ? $args['button_align'] : 'center';
         $this->button_text = !empty($args['button_text']) ? $args['button_text'] : __('Book this Event', 'mobile-dj-manager');
         $this->button_class = !empty($args['button_class']) ? $args['button_class'] : false;
         $this->display_quote($_GET['event_id']);
     }
 }
예제 #2
0
 function __construct()
 {
     global $mdjm, $my_mdjm, $post;
     if (!is_user_logged_in()) {
         $playlist = isset($_GET['mdjmeventid']) ? $this->playlist_exists($_GET['mdjmeventid']) : false;
         // Incorrect playlist code (or not found)
         if (isset($_GET['mdjmeventid']) && empty($playlist)) {
             parent::display_notice(4, 'No event found. Please check the URL you have been sent and try again');
         } elseif (isset($_GET['mdjmeventid']) && !empty($playlist)) {
             $this->eventinfo = MDJM()->events->event_detail($this->event->ID);
             $post = $this->event;
             $this->guest_form($playlist);
         } else {
             parent::login();
         }
     } else {
         if (isset($_GET['event_id']) && !empty($_GET['event_id'])) {
             $this->event = get_post($_GET['event_id']);
         } else {
             $this->event = $my_mdjm['next'][0];
         }
         $post = $this->event;
         $this->eventinfo = MDJM()->events->event_detail($this->event->ID);
         $this->client_form();
     }
 }
예제 #3
0
 function __construct()
 {
     if (!is_user_logged_in()) {
         parent::login();
     } else {
         // We need the custom fields
         $this->fields = get_option('mdjm_client_fields');
         foreach ($this->fields as $key => $row) {
             $field[$key] = $row['position'];
         }
         // Sort the fields into a positional array
         array_multisort($field, SORT_ASC, $this->fields);
         $this->profile_header();
         $this->display_profile();
         $this->profile_footer();
     }
 }