Beispiel #1
0
							<?php 
    if ($current_view == 'grid') {
        //echo '<div class="row image-box tour listing-style1 add-clearfix">';
        echo '<div class="tour-packages listing-style1 row add-clearfix image-box">';
        $before_article = '<div class="col-sm-6 col-md-4">';
        $after_article = '</div>';
    } elseif ($current_view == 'block') {
        echo '<div class="tour-packages listing-style2 row add-clearfix image-box">';
        $before_article = '<div class="col-sm-6 col-md-4">';
        $after_article = '</div>';
    } else {
        echo '<div class="tour-packages listing-style3 image-box">';
        $before_article = '';
        $after_article = '';
    }
    trav_get_template('tour-list.php', '/templates/tour/');
    ?>
							</div>
							<?php 
    if (!empty($trav_options['ajax_pagination'])) {
        ?>
								<?php 
        if (count($tour_list) >= $per_page) {
            ?>
									<a href="<?php 
            echo esc_url(add_query_arg(array('page' => $page + 1)));
            ?>
" class="uppercase full-width button btn-large btn-load-more-accs" data-view="<?php 
            echo esc_attr($current_view);
            ?>
" data-search-params="<?php 
Beispiel #2
0
 function trav_ajax_get_more_accs()
 {
     global $trav_options;
     $order_by_array = array('name' => 'acc_title', 'price' => 'cast(avg_price as unsigned)', 'rating' => 'review');
     $order_array = array('ASC', 'DESC');
     $s = isset($_REQUEST['s']) ? sanitize_text_field($_REQUEST['s']) : '';
     $rooms = isset($_REQUEST['rooms']) && is_numeric($_REQUEST['rooms']) ? sanitize_text_field($_REQUEST['rooms']) : 1;
     $adults = isset($_REQUEST['adults']) && is_numeric($_REQUEST['adults']) ? sanitize_text_field($_REQUEST['adults']) : 1;
     $kids = isset($_REQUEST['kids']) && is_numeric($_REQUEST['kids']) ? sanitize_text_field($_REQUEST['kids']) : 0;
     $min_price = isset($_REQUEST['min_price']) && is_numeric($_REQUEST['min_price']) ? sanitize_text_field($_REQUEST['min_price']) : 0;
     $max_price = isset($_REQUEST['max_price']) && (is_numeric($_REQUEST['max_price']) || $_REQUEST['max_price'] == 'no_max') ? sanitize_text_field($_REQUEST['max_price']) : 'no_max';
     $rating = isset($_REQUEST['rating']) && is_numeric($_REQUEST['rating']) ? sanitize_text_field($_REQUEST['rating']) : 0;
     $order_by = isset($_REQUEST['order_by']) && array_key_exists($_REQUEST['order_by'], $order_by_array) ? sanitize_text_field($_REQUEST['order_by']) : 'name';
     $order = isset($_REQUEST['order']) && in_array($_REQUEST['order'], $order_array) ? sanitize_text_field($_REQUEST['order']) : 'ASC';
     $acc_type = isset($_REQUEST['acc_type']) && is_array($_REQUEST['acc_type']) ? $_REQUEST['acc_type'] : array();
     $amenities = isset($_REQUEST['amenities']) && is_array($_REQUEST['amenities']) ? $_REQUEST['amenities'] : array();
     $per_page = isset($trav_options['acc_posts']) && is_numeric($trav_options['acc_posts']) ? $trav_options['acc_posts'] : 12;
     $date_from = isset($_REQUEST['date_from']) ? trav_sanitize_date($_REQUEST['date_from']) : '';
     $date_to = isset($_REQUEST['date_to']) ? trav_sanitize_date($_REQUEST['date_to']) : '';
     if (trav_strtotime($date_from) >= trav_strtotime($date_to)) {
         $date_from = '';
         $date_to = '';
     }
     $count = isset($_POST['count']) ? (int) $_POST['count'] : 0;
     $query_results = trav_acc_get_search_result($s, $date_from, $date_to, $rooms, $adults, $kids, $order_by_array[$order_by], $order, $count, $per_page, $min_price, $max_price, $rating, $acc_type, $amenities);
     global $acc_list;
     $results = $query_results;
     $acc_list = array();
     foreach ($results as $result) {
         $acc_list[] = $result->acc_id;
     }
     global $current_view, $before_article, $after_article;
     $current_view = isset($_POST['view']) ? sanitize_text_field($_POST['view']) : 'list';
     if ($current_view == 'block') {
         $before_article = '<div class="col-sms-6 col-sm-6 col-md-4">';
         $after_article = '</div>';
     } elseif ($current_view == 'grid') {
         $before_article = '<div class="col-sm-6 col-md-4">';
         $after_article = '</div>';
     } else {
         $before_article = '';
         $after_article = '';
     }
     if (!empty($results)) {
         trav_get_template('accommodation-list.php', '/templates/accommodation/');
     }
     exit;
 }
        echo sprintf($dt_dd, esc_html($label), esc_html(${$field}));
    }
}
?>
			</dl>
			<a href="<?php 
echo esc_url(get_permalink($acc_id));
?>
" class="button btn-small green"><?php 
_e("BOOK AGAIN", "trav");
?>
</a>
			<hr />

			<?php 
trav_get_template('acc-room-detail.php', '/templates/accommodation/');
?>
			<?php 
do_action('trav_acc_conf_completed_form_after', $booking_data);
?>
		</div>
	</div>
	<div class="sidebar col-sm-4 col-md-3">
		<?php 
do_action('trav_acc_conf_completed_sidebar_before', $booking_data);
?>
		<?php 
generated_dynamic_sidebar();
?>
		<?php 
do_action('trav_acc_conf_completed_sidebar_after', $booking_data);
Beispiel #4
0
?>
">
				<input type="hidden" name="action" value="<?php 
echo esc_attr($action);
?>
">
				<input type="hidden" name="transaction_id" value='<?php 
echo esc_attr($transaction_id);
?>
'>
				<?php 
wp_nonce_field('post-' . $post_id, '_wpnonce', false);
?>

				<?php 
trav_get_template('booking-form.php', '/templates/booking/');
?>

			</form>
			<?php 
do_action('trav_tour_booking_form_after', $booking_data);
?>

		</div>
	</div>
	<div class="sidebar col-sms-6 col-sm-4 col-md-3">
		<div class="booking-details travelo-box">

			<?php 
do_action('trav_tour_booking_sidebar_before', $booking_data);
?>
            if (!empty($booking_data['other'])) {
                $other_booking_data = unserialize($booking_data['other']);
            }
            $other_booking_data['pp_transaction_id'] = $payment_result['transaction_id'];
            $booking_data['deposit_paid'] = 1;
            $result = $wpdb->update(TRAV_TOUR_BOOKINGS_TABLE, array('deposit_paid' => $booking_data['deposit_paid'], 'status' => 1, 'other' => serialize($other_booking_data)), array('booking_no' => $booking_data['booking_no'], 'pin_code' => $booking_data['pin_code']));
        }
    }
}
if (!empty($deposit_rate) && empty($booking_data['deposit_paid'])) {
    do_action('trav_tour_deposit_payment_not_paid', $booking_data);
    // deposit payment not paid
}
if (empty($booking_data['mail_sent']) && !empty($booking_data['status']) && (empty($deposit_rate) || !empty($booking_data['deposit_paid']))) {
    do_action('trav_tour_conf_mail_not_sent', $booking_data);
    // mail is not sent
}
if (!empty($_REQUEST['transaction_id']) && !empty($_SESSION['booking_data'])) {
    unset($_SESSION['booking_data'][$_REQUEST['transaction_id']]);
    // unset session data for further action
}
if ($booking_data['status'] == 1) {
    // if upcomming
    trav_get_template('booking-success.php', '/templates/tour/');
} elseif ($booking_data['status'] == 0) {
    // if canceled
    trav_get_template('booking-cancelled.php', '/templates/tour/');
} elseif ($booking_data['status'] == 2) {
    // if completed
    trav_get_template('booking-completed.php', '/templates/tour/');
}
<?php

/**
 * The Template for displaying tours in a tour_type taxonomy . Simply includes the archive template.
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
trav_get_template('archive-tour.php');
Beispiel #7
0
							<?php 
get_search_form();
?>
						</div>
					</div>
				</div> -->
				<div class="page">
					<div class="post-content">
						<?php 
if (have_posts()) {
    ?>
							<div class="blog-infinite">
								<?php 
    while (have_posts()) {
        the_post();
        trav_get_template('loop-blog.php', '/templates');
    }
    ?>
							</div>
							<?php 
    global $ajax_paging;
    if (!empty($ajax_paging)) {
        next_posts_link(__('LOAD MORE POSTS', 'trav'));
    } else {
        echo paginate_links(array('type' => 'list'));
    }
    ?>
						<?php 
} else {
    ?>
							<div class="travelo-box">
Beispiel #8
0
<?php

$user_id = get_current_user_id();
?>
<h2><?php 
echo __('Your Wish List', 'trav');
?>
</h2>
<div class="row image-box listing-style2 add-clearfix">
	<?php 
global $acc_list, $before_article, $after_article, $current_view;
$acc_list = get_user_meta($user_id, 'wishlist', true);
if (!empty($acc_list)) {
    $current_view = 'block';
    $before_article = '<div class="col-sm-6 col-md-4">';
    $after_article = '</div>';
    trav_get_template('accommodation-list.php', '/templates/accommodation/');
} else {
    echo __('Your wishlist is empty.', 'trav');
}
?>
</div>
    if (!empty(${$field})) {
        echo sprintf($dt_dd, esc_html($label), esc_html(${$field}));
    }
}
?>
			</dl>
			<a href="<?php 
echo esc_url(get_permalink($tour_id));
?>
" class="button btn-small green"><?php 
_e("BOOK AGAIN", "trav");
?>
</a>
			<hr />
			<?php 
trav_get_template('tour-detail.php', '/templates/tour/');
?>
			<?php 
do_action('trav_tour_conf_cancel_form_after', $booking_data);
?>
		</div>
	</div>
	<div class="sidebar col-sm-4 col-md-3">
		<?php 
do_action('trav_tour_conf_cancel_sidebar_before', $booking_data);
?>
		<?php 
generated_dynamic_sidebar();
?>
		<?php 
do_action('trav_tour_conf_cancel_sidebar_after', $booking_data);
Beispiel #10
0
    if (get_option('users_can_register')) {
        ?>
        <div class="seperator"></div>
        <p><?php 
        echo __("Don't have an account?", 'trav');
        ?>
 <a href="#travelo-signup" class="goto-signup soap-popupbox"><?php 
        _e('Sign up', 'trav');
        ?>
</a></p>
        <?php 
    }
    ?>
    </div>
<?php 
}
$inner_disable = '';
if (is_page()) {
    $page_object = get_queried_object();
    $post_id = get_queried_object_id();
    $inner_disable = get_post_meta($post_id, 'trav_page_inner', true);
}
if (is_home() || is_front_page() || is_page_template('templates/template-home.php')) {
    //
} else {
    if (is_page() && $inner_disable == 'disable') {
        //
    } else {
        trav_get_template('inner-1.php', '/templates/inners');
    }
}
Beispiel #11
0
 function shortcode_dashboard($atts, $content = null)
 {
     ob_start();
     trav_get_template('main.php', '/templates/user');
     $output = ob_get_contents();
     ob_end_clean();
     return $output;
 }
Beispiel #12
0
 function trav_terms_form()
 {
     trav_get_template('terms-form.php', '/templates/booking/');
 }
<?php

/**
 * The Template for displaying accommodations in a accommodation_type category . Simply includes the archive template.
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
trav_get_template('archive-accommodation.php');
Beispiel #14
0
?>
</a></li>
	</ul>
	<div class="tab-content">
		<div id="dashboard" class="tab-pane fade in active">
			<?php 
trav_get_template('dashboard.php', '/templates/user');
?>
		</div>
		<div id="profile" class="tab-pane fade">
			<?php 
trav_get_template('profile.php', '/templates/user');
?>
		</div>
		<div id="booking" class="tab-pane fade">
			<?php 
trav_get_template('booking-history.php', '/templates/user');
?>
		</div>
		<div id="wishlist" class="tab-pane fade">
			<?php 
trav_get_template('wishlist.php', '/templates/user');
?>
		</div>
		<div id="settings" class="tab-pane fade">
			<?php 
trav_get_template('account.php', '/templates/user');
?>
		</div>
	</div>
</div>
                do_action('trav_payment_update_booking_error');
            } elseif (empty($update_status)) {
                do_action('trav_payment_update_booking_no_row');
            } else {
                do_action('trav_payment_update_booking_success');
            }
        }
    }
}
if (!empty($deposit_rate) && empty($booking_data['deposit_paid'])) {
    do_action('trav_acc_deposit_payment_not_paid', $booking_data);
    // deposit payment not paid
}
if (empty($booking_data['mail_sent']) && !empty($booking_data['status']) && (empty($deposit_rate) || !empty($booking_data['deposit_paid']))) {
    do_action('trav_acc_conf_mail_not_sent', $booking_data);
    // mail is not sent
}
if (!empty($_REQUEST['transaction_id']) && !empty($_SESSION['booking_data'])) {
    unset($_SESSION['booking_data'][$_REQUEST['transaction_id']]);
    // unset session data for further action
}
if ($booking_data['status'] == 1) {
    // if upcomming
    trav_get_template('booking-success.php', '/templates/accommodation/');
} elseif ($booking_data['status'] == 0) {
    // if canceled
    trav_get_template('booking-cancelled.php', '/templates/accommodation/');
} elseif ($booking_data['status'] == 2) {
    // if completed
    trav_get_template('booking-completed.php', '/templates/accommodation/');
}