function do_add_to_cart($array = array())
 {
     $default = array('item_id' => '', 'number_room' => 1, 'price' => '', 'check_in' => '', 'check_out' => '', 'adult' => 1, 'children' => 0);
     extract(wp_parse_args($array, $default));
     $data = array('check_in' => $check_in, 'check_out' => $check_out, 'currency' => TravelHelper::get_default_currency('symbol'), 'adult' => $adult, 'children' => $children);
     STCart::add_cart($item_id, $number_room, $price, $data);
 }
 public function product_cat_column($columns, $column, $id)
 {
     if ($column == 'icon') {
         $icon = get_tax_meta($id, 'st_icon');
         $columns .= '<i style="font-size:24px" class="' . TravelHelper::handle_icon($icon) . '"></i>';
     }
     return $columns;
 }
Example #3
0
 static function getListDate($start, $end)
 {
     $start = new DateTime($start);
     $end = new DateTime($end . ' +1 day');
     $list = array();
     foreach (new DatePeriod($start, new DateInterval('P1D'), $end) as $day) {
         $list[] = $day->format(TravelHelper::getDateFormat());
     }
     return $list;
 }
Example #4
0
 function add_scripts()
 {
     if (TravelHelper::is_https()) {
         wp_register_script('gmap-api', 'https://maps.google.com/maps/api/js?sensor=false&amp;language=en&amp;libraries=places', null, false, true);
     } else {
         wp_register_script('gmap-api', 'http://maps.google.com/maps/api/js?sensor=false&amp;language=en&amp;libraries=places', null, false, true);
     }
     wp_register_script('gmapv3', $this->_url . 'js/gmap3.min.js', array('jquery', 'gmap-api'), false, true);
     wp_register_script('bt-gmapv3-init', $this->_url . 'js/init.js', array('gmapv3'), false, true);
     wp_register_style('bt-gmapv3', $this->_url . 'css/bt-gmap.css');
 }
 /**
  *
  *
  * @since 1.1.3
  * */
 static function _format_money()
 {
     $data = STInput::post('money_data', array());
     if (!empty($data)) {
         foreach ($data as $key => $value) {
             $data[$key] = TravelHelper::format_money($value);
         }
     }
     echo json_encode(array('status' => 1, 'money_data' => $data));
     die;
 }
 /**
  *
  *
  * @since 1.1.1
  * */
 function init_metabox()
 {
     //Room
     $this->metabox[] = array('id' => 'room_metabox', 'title' => __('Room Setting', ST_TEXTDOMAIN), 'desc' => '', 'pages' => array('hotel_room'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('label' => __('General', ST_TEXTDOMAIN), 'id' => 'room_reneral_tab', 'type' => 'tab'), array('label' => __('Hotel', ST_TEXTDOMAIN), 'id' => 'room_parent', 'type' => 'post_select_ajax', 'desc' => __('Choose the hotel that the room belong', ST_TEXTDOMAIN), 'post_type' => 'st_hotel', 'placeholder' => __('Search for a Hotel', ST_TEXTDOMAIN)), array('label' => __('Number of Room', ST_TEXTDOMAIN), 'id' => 'number_room', 'type' => 'text', 'desc' => __('Number of rooms available for book', ST_TEXTDOMAIN), 'std' => 1), array('label' => __('Gallery', ST_TEXTDOMAIN), 'id' => 'gallery', 'type' => 'gallery'), array('label' => __('Hotel Room Layout', ST_TEXTDOMAIN), 'id' => 'st_custom_layout', 'post_type' => 'st_layouts', 'desc' => __('Hotel Room Layout', ST_TEXTDOMAIN), 'type' => 'select', 'choices' => st_get_layout('hotel_room')), array('label' => __('Room Price', ST_TEXTDOMAIN), 'id' => 'room_price_tab', 'type' => 'tab'), array('label' => sprintf(__('Price (%s)', ST_TEXTDOMAIN), TravelHelper::get_default_currency('symbol')), 'id' => 'price', 'type' => 'text', 'desc' => __('Per night', ST_TEXTDOMAIN)), array('label' => __('Discount Rate', ST_TEXTDOMAIN), 'id' => 'discount_rate', 'type' => 'text', 'desc' => __('Discount by %', ST_TEXTDOMAIN)), array('label' => __('Sale Schedule', ST_TEXTDOMAIN), 'id' => 'is_sale_schedule', 'type' => 'on-off', 'std' => 'off'), array('label' => __('Sale Price Date From', ST_TEXTDOMAIN), 'desc' => __('Sale Price Date From', ST_TEXTDOMAIN), 'id' => 'sale_price_from', 'type' => 'date-picker', 'condition' => 'is_sale_schedule:is(on)'), array('label' => __('Sale Price Date To', ST_TEXTDOMAIN), 'desc' => __('Sale Price Date To', ST_TEXTDOMAIN), 'id' => 'sale_price_to', 'type' => 'date-picker', 'condition' => 'is_sale_schedule:is(on)'), array('label' => __('Additional paid options', ST_TEXTDOMAIN), 'desc' => __('Additional paid options', ST_TEXTDOMAIN), 'id' => 'paid_options', 'type' => 'list-item', 'settings' => array(array('id' => 'price', 'type' => 'text', 'std' => 0, 'label' => __('Price', ST_TEXTDOMAIN)))), array('id' => 'deposit_payment_status', 'label' => __("Deposit payment options", ST_TEXTDOMAIN), 'desc' => __('You can select <code>Disallow Deposit</code>, <code>Deposit by percent</code>, <code>Deposit by amount</code>'), 'type' => 'select', 'choices' => array(array('value' => '', 'label' => __('Disallow Deposit', ST_TEXTDOMAIN)), array('value' => 'percent', 'label' => __('Deposit by percent', ST_TEXTDOMAIN)), array('value' => 'amount', 'label' => __('Deposit by amount', ST_TEXTDOMAIN)))), array('label' => __('Deposit payment amount', ST_TEXTDOMAIN), 'desc' => __('Leave empty for disallow deposit payment', ST_TEXTDOMAIN), 'id' => 'deposit_payment_amount', 'type' => 'text', 'condition' => 'deposit_payment_status:not()'), array('label' => __('Room Facility', ST_TEXTDOMAIN), 'id' => 'room_detail_tab', 'type' => 'tab'), array('label' => __('Adults Number', ST_TEXTDOMAIN), 'id' => 'adult_number', 'type' => 'text', 'desc' => __('Number of Adults in room', ST_TEXTDOMAIN), 'std' => 1), array('label' => __('Children Number', ST_TEXTDOMAIN), 'id' => 'children_number', 'type' => 'text', 'desc' => __('Number of Children in room', ST_TEXTDOMAIN), 'std' => 0), array('label' => __('Beds Number', ST_TEXTDOMAIN), 'id' => 'bed_number', 'type' => 'text', 'desc' => __('Number of Beds in room', ST_TEXTDOMAIN), 'std' => 0), array('label' => __('Room footage (square feet)', ST_TEXTDOMAIN), 'desc' => __('Room footage (square feet)', ST_TEXTDOMAIN), 'id' => 'room_footage', 'type' => 'text'), array('label' => __('Room external booking', ST_TEXTDOMAIN), 'id' => 'st_room_external_booking', 'type' => 'on-off', 'std' => "off"), array('label' => __('Room external booking', ST_TEXTDOMAIN), 'id' => 'st_room_external_booking_link', 'type' => 'text', 'std' => "", 'condition' => 'st_room_external_booking:is(on)', 'desc' => "<em>" . __('Notice: Must be http://...', ST_TEXTDOMAIN) . "</em>")));
     $data_paypment = STPaymentGateways::$_payment_gateways;
     if (!empty($data_paypment) and is_array($data_paypment)) {
         $this->metabox[0]['fields'][] = array('label' => __('Payment', ST_TEXTDOMAIN), 'id' => 'payment_detail_tab', 'type' => 'tab');
         foreach ($data_paypment as $k => $v) {
             $this->metabox[0]['fields'][] = array('label' => $v->get_name(), 'id' => 'is_meta_payment_gateway_' . $k, 'type' => 'on-off', 'desc' => $v->get_name(), 'std' => 'on');
         }
     }
     parent::register_metabox($this->metabox);
 }
Example #7
0
 static function _get_car_cant_order_by_id($car_id, $check_in, $check_out, $order_item_id = '')
 {
     if (!TravelHelper::checkTableDuplicate('st_cars')) {
         return true;
     }
     global $wpdb;
     $string = "";
     if (!empty($order_item_id)) {
         $string = " AND order_item_id NOT IN ('{$order_item_id}') ";
     }
     $sql = "SELECT\r\n\t\t\tst_booking_id as car_id,\r\n\t\t\tmt.meta_value as number_car,\r\n\t\t\tmt.meta_value - COUNT(st_booking_id) as car_free\r\n\t\t\tFROM {$wpdb->prefix}st_order_item_meta\r\n\t\t\tINNER JOIN {$wpdb->prefix}postmeta as mt ON mt.post_id = st_booking_id AND mt.meta_key = 'number_car'\r\n\t\t\tWHERE\r\n\t\t\tst_booking_post_type = 'st_cars'\r\n\t\t\tAND status NOT IN ('trash', 'canceled')\r\n\t\t\tAND st_booking_id = '{$car_id}'\r\n\t\t\tAND (\r\n\t\t\t\t({$check_in} < check_in_timestamp AND {$check_out} > check_out_timestamp)\r\n\t\t\t\tOR(\r\n\t\t\t\t{$check_in} BETWEEN check_in_timestamp AND check_out_timestamp\r\n\t\t\t)\r\n\t\t\t\tOR(\r\n\t\t\t\t{$check_out} BETWEEN check_in_timestamp AND check_out_timestamp\r\n\t\t\t)\r\n\t\t\t)\r\n\t\t\t{$string}\r\n\t\t\tGROUP BY st_booking_id\r\n\t\t\tHAVING (mt.meta_value - COUNT(st_booking_id) <= 0)";
     $result = $wpdb->get_results($sql, ARRAY_A);
     if (is_array($result) && count($result)) {
         return false;
     }
     return true;
 }
 public function _save_post($id)
 {
     if (!TravelHelper::checkTableDuplicate('st_hotel')) {
         return;
     }
     if (isset($_GET['post_type']) && $_GET['post_type'] == 'st_hotel' && isset($_GET['section']) && $_GET['section'] == 'edit_order_item' && isset($_GET['order_item_id'])) {
         $item_id = $_GET['order_item_id'];
         $status = $_POST['status'];
         if ($status == 'canceled') {
             $status = 'trash';
         }
         global $wpdb;
         $table = $wpdb->prefix . 'st_order_item_meta';
         $data = array('status' => $status);
         $where = array('order_item_id' => $item_id);
         $rs = $wpdb->update($table, $data, $where);
     }
 }
Example #9
0
 static function _get_disable_date()
 {
     $disable = array();
     $activity_id = STInput::request('activity_id', '');
     $activity_id = apply_filters('st_get_post_id_origin', $activity_id);
     if (empty($activity_id)) {
         echo json_encode($disable);
         die;
     }
     $year = STInput::request('year', date('Y'));
     global $wpdb;
     $sql = "SELECT\r\n\t\t\t\torigin_id as activity_id,\r\n\t\t\t\tcheck_in_timestamp as check_in,\r\n\t\t\t\tcheck_out_timestamp as check_out,\r\n\t\t\t\tadult_number,\r\n\t\t\t\tchild_number,\r\n\t\t\t\tinfant_number\r\n\t\t\t\tFROM\r\n\t\t\t\t\t{$wpdb->prefix}st_order_item_meta\r\n\t\t\t\tWHERE\r\n\t\t\t\t\tst_booking_post_type = 'st_activity'\r\n\t\t\t\tAND origin_id = '{$activity_id}'\r\n\t\t\t\tAND status NOT IN ('trash', 'canceled')\r\n\t\t\t\tAND YEAR (\r\n\t\t\t\t\tFROM_UNIXTIME(check_in_timestamp)\r\n\t\t\t\t) = {$year}\r\n\t\t\t\tAND YEAR (\r\n\t\t\t\t\tFROM_UNIXTIME(check_out_timestamp)\r\n\t\t\t\t) = {$year}";
     $result = $wpdb->get_results($sql, ARRAY_A);
     if (is_array($result) && count($result)) {
         $list_date = array();
         foreach ($result as $key => $val) {
             $list_date[] = array('check_in' => $val['check_in'], 'check_out' => $val['check_out'], 'adult_number' => $val['adult_number'], 'child_number' => $val['child_number'], 'infant_number' => $val['infant_number']);
         }
     }
     if (isset($list_date) && count($list_date)) {
         $min_max = self::_get_minmax($activity_id, $year);
         if (is_array($min_max) && count($min_max)) {
             $max_people = intval(get_post_meta($activity_id, 'max_people', true));
             for ($i = intval($min_max['check_in']); $i <= intval($min_max['check_out']); $i = strtotime('+1 day', $i)) {
                 $people = 0;
                 foreach ($result as $key => $date) {
                     if ($i == intval($date['check_in'])) {
                         $people += intval($date['adult_number']) + intval($date['child_number']) + intval($date['infant_number']);
                     }
                 }
                 if ($people >= $max_people) {
                     $disable[] = date(TravelHelper::getDateFormat(), $i);
                 }
             }
         }
     }
     if (count($disable)) {
         echo json_encode($disable);
         die;
     }
     echo json_encode($disable);
     die;
 }
Example #10
0
            _e('review', ST_TEXTDOMAIN);
        }
        ?>
                                </p>
                            <?php 
    }
    ?>
                            <?php 
    if (!empty($offer)) {
        ?>
                                <p class="mb0">
                                    <?php 
        if ($offer > 1) {
            printf(__('%d offers from %s', ST_TEXTDOMAIN), $offer, TravelHelper::format_money($min_price));
        } else {
            printf(__('%d offer from %s', ST_TEXTDOMAIN), $offer, TravelHelper::format_money($min_price));
        }
        ?>
                                </p>
                            <?php 
    }
    ?>
                        </div>
                    </div>
                </a>
            </div>
        </div>
<?php 
}
?>
</div>
    ?>
                        </td>
                    </tr>
                    <?php 
}
?>
                    <tr>
                        <td  style="border-bottom: 1px dashed #ccc;padding:10px;">
                            <strong><?php 
echo __('Pay Amount :', ST_TEXTDOMAIN);
?>
</strong>
                        </td>
                        <td style="border-bottom: 1px dashed #ccc;padding:10px;">
                            <?php 
echo TravelHelper::format_money($total_price);
?>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>

    </tfoot>


            </table>
            <?php 
echo st()->load_template('email/booking_customer_infomation', null, array('order_id' => $order_id));
?>
        </td>
wp_nonce_field('submit_form_order', 'travel_order');
?>

    <?php 
$info_price = STCars::get_info_price();
$cars_price = $info_price['price'];
$count_sale = $info_price['discount'];
if (!empty($count_sale)) {
    $price = $info_price['price'];
    $price_sale = $info_price['price_old'];
}
$pick_up_date = TravelHelper::convertDateFormat(STInput::request('pick-up-date'));
if (!$pick_up_date) {
    $pick_up_date = date('m/d/Y', strtotime("now"));
}
$drop_off_date = TravelHelper::convertDateFormat(STInput::request('drop-off-date'));
if (!$drop_off_date) {
    $drop_off_date = date('m/d/Y', strtotime("+1 day"));
}
$pick_up_time = STInput::request('pick-up-time', '12:00 PM');
$drop_off_time = STInput::request('drop-off-time', '12:00 PM');
$pick_up = STInput::request('pick-up');
$drop_off = STInput::request('drop-off');
$start = $pick_up_date . ' ' . $pick_up_time;
$start = strtotime($start);
$end = $drop_off_date . ' ' . $drop_off_time;
$end = strtotime($end);
$time = STCars::get_date_diff($start, $end);
$data_price_tmp = $cars_price * $time;
$data = array('price_cars' => $cars_price, "pick_up" => $pick_up, "drop_off" => $drop_off, 'date_time' => array("pick_up_date" => $pick_up_date, "pick_up_time" => $pick_up_time, "drop_off_date" => $drop_off_date, "drop_off_time" => $drop_off_time, "total_time" => $time));
?>
 function add_col_content($column_name, $post_ID)
 {
     if ($column_name == 'activity_date') {
         $check_in = get_post_meta($post_ID, 'check_in', true);
         $check_out = get_post_meta($post_ID, 'check_out', true);
         $date = mysql2date('d/m/Y', $check_in) . ' <i class="fa fa-long-arrow-right"></i> ' . mysql2date('d/m/Y', $check_out);
         if (!empty($check_in) and !empty($check_out)) {
             echo balanceTags($date);
         } else {
             _e('none', ST_TEXTDOMAIN);
         }
     }
     if ($column_name == 'duration') {
         $parent = get_post_meta($post_ID, 'duration', true);
         if ($parent) {
             echo esc_html($parent);
         }
     }
     if ($column_name == 'price') {
         $price = get_post_meta($post_ID, 'price', true);
         $type_price = get_post_meta($post_ID, 'type_price', true);
         if ($type_price != 'people_price') {
             echo '<strong>' . TravelHelper::format_money($price) . '</strong>';
         } else {
             $adult_price = get_post_meta($post_ID, 'adult_price', true);
             $child_price = get_post_meta($post_ID, 'child_price', true);
             echo '<span>' . __('Adult Price', ST_TEXTDOMAIN) . ' : ' . TravelHelper::format_money($adult_price) . '</span><br>';
             echo '<span>' . __('Child Price', ST_TEXTDOMAIN) . ' : ' . TravelHelper::format_money($child_price) . '</span><br>';
         }
     }
     if ($column_name == 'activity_time') {
         $time = get_post_meta($post_ID, 'activity-time', true);
         if ($time) {
             echo esc_html($time);
         }
     }
 }
    <label for="field-hotel-location"><?php 
    echo esc_html($title);
    ?>
</label>
    <i class="fa fa-map-marker input-icon"></i>
   <select id="field-hotel-location" name="location_id" class="form-control" <?php 
    echo esc_attr($is_required);
    ?>
>
       <option value=""><?php 
    _e('-- Select --', ST_TEXTDOMAIN);
    ?>
</option>
       <?php 
    foreach ($list_location as $key => $value) {
        $name = TravelHelper::showNameLocation($value->ID);
        $name = explode('||', $name);
        $name = $name[0];
        ?>
               <option <?php 
        selected($value->ID, $location_id);
        ?>
 value="<?php 
        echo $value->ID;
        ?>
"><?php 
        echo $name;
        ?>
</option>
           <?php 
    }
Example #15
0
if (!empty($get)) {
    foreach ($get as $key => $value) {
        if (is_array($value)) {
            if (!empty($value)) {
                if (!empty($value) and is_array($value)) {
                    foreach ($value as $key2 => $value2) {
                        if (!empty($value2) and is_array($value2)) {
                            foreach ($value2 as $key3 => $value3) {
                                echo "<input  type='hidden' name='{$key}[{$key2}][{$key3}]' value='{$value3}' >";
                            }
                        }
                    }
                }
            }
        } else {
            if ($key != "price_range") {
                echo "<input type='hidden' name='{$key}' value='{$value}' >";
            }
        }
    }
}
$data_min_max = TravelerObject::get_min_max_price('st_cars');
echo '<input type="text" name="price_range" value="' . STInput::get('price_range') . '" class="price-slider" data-symbol="' . TravelHelper::get_current_currency('symbol') . '" data-min="' . $data_min_max['price_min'] . '" data-max="' . $data_min_max['price_max'] . '" data-step="' . st()->get_option('search_price_range_step', 0) . '">';
?>
    <button style="margin-top: 4px;" type="submit" class="btn btn-primary"><?php 
st_the_language('car_filter');
?>
</button>
</form>

Example #16
0
                break;
            case "taxonomy":
                $terms = get_terms($value->taxonomy);
                $key = $value->taxonomy;
                foreach ($terms as $key2 => $value2) {
                    $current = STInput::get('taxonomy');
                    if (isset($current[$key])) {
                        $current = $current[$value->taxonomy];
                    } else {
                        $current = '';
                    }
                    $checked = TravelHelper::checked_array(explode(',', $current), $value2->term_id);
                    if ($checked) {
                        $link = TravelHelper::build_url_array('taxonomy', $value->taxonomy, $value2->term_id, false);
                    } else {
                        $link = TravelHelper::build_url_array('taxonomy', $value->taxonomy, $value2->term_id);
                    }
                    ?>
                                    <div class="checkbox">
                                        <label>
                                            <input <?php 
                    if ($checked) {
                        echo "checked";
                    }
                    ?>
 value="<?php 
                    echo esc_attr($value2->term_id);
                    ?>
" name="star_rate" data-url="<?php 
                    echo esc_url($link);
                    ?>
Example #17
0
                        <?php 
    }
} else {
    ?>
                        <?php 
    $check_in = get_post_meta(get_the_ID(), 'check_in', true);
    $check_out = get_post_meta(get_the_ID(), 'check_out', true);
    if (!empty($check_out) and !empty($check_out)) {
        ?>
                            <i class="fa fa-calendar"></i>
                            <span class=""><?php 
        st_the_language('holiday_date');
        ?>
 : </span>
                            <?php 
        $format = TravelHelper::getDateFormat();
        $date = date_i18n($format, strtotime($check_in)) . ' <i class="fa fa-long-arrow-right"></i> ' . date_i18n($format, strtotime($check_out));
        echo balanceTags($date);
    }
    ?>
                    <?php 
}
?>
                </small>
            </p>
            <?php 
$is_st_show_number_user_book = st()->get_option('st_show_number_user_book', 'off');
if ($is_st_show_number_user_book == 'on') {
    ?>
            <p class="mb0">
                <small>
 static function getRentalInfo()
 {
     $rental_id = intval(STInput::request('rental_id', ''));
     $data = array('price' => '', 'extras' => 'None', 'adult_html' => '', 'child_html' => '');
     if ($rental_id <= 0 || get_post_type($rental_id) != 'st_rental') {
         echo json_encode($data);
     } else {
         $adult_number = intval(get_post_meta($rental_id, 'rental_max_adult', true));
         if ($adult_number <= 0) {
             $adult_number = 1;
         }
         $adult_html = '<select name="adult_number" class="form-control" style="width: 100px;">';
         for ($i = 1; $i <= $adult_number; $i++) {
             $adult_html .= '<option value="' . $i . '">' . $i . '</option>';
         }
         $adult_html .= '</select>';
         $child_number = intval(get_post_meta($rental_id, 'rental_max_children', true));
         if ($child_number <= 0) {
             $child_number = 0;
         }
         $child_html = '<select name="child_number" class="form-control" style="width: 100px;">';
         for ($i = 0; $i <= $child_number; $i++) {
             $child_html .= '<option value="' . $i . '">' . $i . '</option>';
         }
         $child_html .= '</select>';
         $html = '';
         $price = floatval(get_post_meta($rental_id, 'price', true));
         $extras = get_post_meta($rental_id, 'extra_price', true);
         if (is_array($extras) && count($extras)) {
             $html = '<table class="table">';
             foreach ($extras as $key => $val) {
                 $html .= '
             <tr>
                 <td width="80%">
                     <label for="' . $val['extra_name'] . '" class="ml20">' . $val['title'] . ' (' . TravelHelper::format_money($val['extra_price']) . ')' . '</label>
                     <input type="hidden" name="extra_price[price][' . $val['extra_name'] . ']" value="' . $val['extra_price'] . '">
                     <input type="hidden" name="extra_price[title][' . $val['extra_name'] . ']" value="' . $val['title'] . '">
                 </td>
                 <td width="20%">
                     <select style="width: 100px" class="form-control" name="extra_price[value][' . $val['extra_name'] . ']" id="">';
                 $max_item = intval($val['extra_max_number']);
                 if ($max_item <= 0) {
                     $max_item = 1;
                 }
                 for ($i = 0; $i <= $max_item; $i++) {
                     $html .= '<option value="' . $i . '">' . $i . '</option>';
                 }
                 $html .= '
                     </select>
                 </td>
             </tr>';
             }
             $html .= '</table>';
         }
         $data['price'] = TravelHelper::format_money_from_db($price, false);
         $data['extras'] = $html;
         $data['adult_html'] = $adult_html;
         $data['child_html'] = $child_html;
         echo json_encode($data);
     }
     die;
 }
Example #19
0
         }
         echo __("Duration", ST_TEXTDOMAIN) . ": " . $duration;
     }
     ?>
                         </td>
                         <td class="post-title page-title column-title">
                            <?php 
     $price = get_post_meta($post_id, 'total_price', true);
     $currency = get_post_meta($post_id, 'currency', true);
     $rate = floatval(get_post_meta($post_id, 'currency_rate', true));
     echo TravelHelper::format_money_from_db($price, $currency, $rate);
     ?>
                         </td>
                         <td class="post-title page-title column-title">
                             <?php 
     echo date(TravelHelper::getDateFormat(), strtotime($value->post_date));
     ?>
                         </td>
                         <td class="post-title page-title column-title">
                             <?php 
     echo get_post_meta($order_id, 'status', true);
     ?>
                         </td>
                         <td class="post-title page-title column-title">
                             <?php 
     echo STPaymentGateways::get_gatewayname(get_post_meta($order_id, 'payment_method', true));
     ?>
                         </td>
                     </tr>
                 <?php 
 }
                        <?php 
        echo '<span class="onsale">' . $price_old . '</span> <i class="fa fa-arrow-right "></i>';
        ?>
                        <?php 
    }
    ?>
                        <strong><?php 
    echo TravelHelper::format_money($price_car);
    ?>
</strong>
                        <small>/<?php 
    echo STCars::get_price_unit();
    ?>
</small>
                    </p>
                </li>
                <li>
                    <p class="booking-item-payment-price-title"><?php 
    st_the_language('car_total');
    ?>
 </p>
                    <p class="booking-item-payment-price-amount"><?php 
    echo TravelHelper::format_money($item['data']['price_total']);
    ?>
                    </p>
                </li>
            </ul>
        </li>
    </ul>
<?php 
}
Example #21
0
                <?php 
    if ('0' == $comment->comment_approved) {
        ?>
                    <p class="alert alert-danger comment-awaiting-moderation"><?php 
        st_the_language('your_comment_is_awaiting_moderation');
        ?>
</p>
                <?php 
    }
    ?>
                <div class="comment-content">
                    <?php 
    $max_string = 200;
    $text = get_comment_text();
    echo TravelHelper::add_read_more($text, $max_string);
    ?>
                </div>

                <div class="<?php 
    /*if($max_string<strlen($text))*/
    echo 'booking-item-review-more-content';
    ?>
">
                    <?php 
    do_action('st_review_more_content', $comment_id);
    ?>
                    <?php 
    do_action('st_review_stats_' . get_post_type() . '_content', $comment_id);
    ?>
                </div>
		      					
		      				</div>
      					</div>
      					<div class="col-xs-12 col-sm-6">
      						<div class="form-group">
		      					<label for="check_out" class="head_bol"><?php 
_e('Check Out', ST_TEXTDOMAIN);
?>
 <span class="text-small text-danger">(*)</span>:</label>
		      					<?php 
$check_out = isset($_POST['check_out']) ? $_POST['check_out'] : '';
?>
		      					<div class="input-group">
			      					<span class="input-group-addon" id="basic-checkout"><i class="fa fa-calendar"></i></span>
								  	<input readonly aria-describedby="basic-checkout" data-date-format="<?php 
echo TravelHelper::getDateFormatJs();
?>
" autocomplete="off" type="text" name="check_out" id="check_out" value="<?php 
echo $check_out;
?>
" class="form-control">
							  	</div>
		      				</div>
      					</div>
      				</div>
      				<div class="form-group">
      					<input type="hidden" name="action" value="booking_form_submit">
      					<input type="hidden" name="booking_by" value="partner">
      					<input type="hidden" name="sc" value="<?php 
echo $_GET['sc'];
?>
                         <?php 
 if ($item_id) {
     echo "<a href='" . get_edit_post_link($item_id) . "' target='_blank'>" . get_the_title($item_id) . "</a>";
 }
 ?>
                     </td>
                     <td class="post-title page-title column-title">
                         <?php 
 echo get_post_meta($post_id, 'item_number', true);
 ?>
                     </td>
                     <td class="post-title page-title column-title">
                         <?php 
 $price = get_post_meta($post_id, 'total_price', true);
 $currency = get_post_meta($order_id, 'st_currency', true);
 echo TravelHelper::format_money_raw($price, $currency);
 ?>
                     </td>
                     <td class="post-title page-title column-title">
                         <?php 
 echo date(get_option('date_format'), strtotime($value->post_date));
 ?>
                     </td>
                     <td class="post-title page-title column-title">
                         <?php 
 echo get_post_meta($order_id, 'status', true);
 ?>
                     </td>
                     <td class="post-title page-title column-title">
                         <?php 
 echo STPaymentGateways::get_gatewayname(get_post_meta($order_id, 'payment_method', true));
Example #24
0
    ?>
            <?php 
}
?>

            <p class="mb0 text-darken item_price_map">
                <?php 
if ($is_sale) {
    echo "<span class='booking-item-old-price'>" . TravelHelper::format_money($orgin_price) . "</span>";
}
?>
                <?php 
if ($show_price == 'on' || $price) {
    ?>
                    <span class="text-lg lh1em text-color"><?php 
    echo TravelHelper::format_money($price);
    ?>
</span><small> /<?php 
    st_the_language('rental_night');
    ?>
</small>
                <?php 
}
?>
            </p>
            <a class="btn btn-primary btn_book" href="<?php 
echo esc_url($link);
?>
"><?php 
_e("Book Now", ST_TEXTDOMAIN);
?>
Example #25
0
                <ul class="booking-item-features booking-item-features-expand mb30 clearfix">
                    <?php 
            foreach ($terms as $key2 => $value2) {
                ?>
                        <li class="<?php 
                if ($item_col) {
                    echo 'col-sm-' . $item_col;
                }
                ?>
">
                            <?php 
                if (function_exists('get_tax_meta')) {
                    ?>
                                <i class="<?php 
                    echo TravelHelper::handle_icon(get_tax_meta($value2->term_id, 'st_icon'));
                    ?>
"></i>
                            <?php 
                }
                ?>
                            <span class="booking-item-feature-title"><?php 
                echo esc_html($value2->name);
                ?>
</span>
                        </li>
                    <?php 
            }
            ?>

                </ul>
Example #26
0
            </div>
            <div class="row mt10">
                <div class="col-md-6 col-sm-6 col-xs-6">
                   <p class="mb0 text-darken">
                       <i class="fa fa-money">&nbsp;</i>
                       <?php 
_e('Price', ST_TEXTDOMAIN);
?>
:
                      <span> <?php 
echo STHoliday::get_price_html(false, false, ' <br> -');
?>
</span>
                   </p>
                </div>
                <div class="col-md-6 col-sm-6 col-xs-6 text-right">
                    <i class="fa fa-thumbs-o-up icon-like"> &nbsp;</i>
                    <ul class="icon-group  text-color pull-right">
                        <?php 
echo TravelHelper::rate_to_string(STReview::get_avg_rate());
?>
                    </ul>

                </div>
            </div>
        </div>
    </div>
    <div class="gap"></div>
</div>

Example #27
0
</a></h5>
                        <?php 
        if ($address = get_post_meta(get_the_ID(), 'address', TRUE)) {
            ?>
                            <p class="mb0">
                                <small> <?php 
            echo esc_html($address);
            ?>
</small>
                            </p>
                        <?php 
        }
        ?>
                        <p class="mb0 text-darken"><span
                                class="text-lg lh1em"><?php 
        echo TravelHelper::format_money(STHotel::get_avg_price());
        ?>
</span>
                            <small> <?php 
        st_the_language('avg/night');
        ?>
</small>
                        </p>
                    </div>
                </div>
            </div>
        <?php 
    }
    ?>
    </div>
<?php 
Example #28
0
                                if (!empty($v_info['cars_equipment_taxonomy_id'])) {
                                    if ($v->term_id == $v_info['cars_equipment_taxonomy_id']) {
                                        $dk_check = true;
                                        $data_info = $v_info['cars_equipment_taxonomy_info'];
                                        $data_title_info = "";
                                        if (!empty($v_info['title'])) {
                                            $data_title_info = $v_info['title'];
                                        }
                                    }
                                }
                            }
                        }
                        if ($i < $limit) {
                            if ($dk_check == true) {
                                echo '<li title="" data-placement="top" rel="tooltip" data-original-title="' . $data_title_info . '">
                                                                        <i class="' . TravelHelper::handle_icon(get_tax_meta($v->term_id, 'st_icon', true)) . '"></i>
                                                                        <span class="booking-item-feature-sign">' . $data_info . '</span>
                                                                    </li>';
                            } else {
                                /*echo '<li title="" data-placement="top" rel="tooltip" data-original-title="'.esc_html($v->name).'">
                                        <i class="'.TravelHelper::handle_icon(get_tax_meta($v->term_id, 'st_icon',true)).'"></i>
                                  </li>';*/
                            }
                        }
                        $i++;
                    }
                }
            }
        }
    }
}
        echo date(get_option('date_format'), strtotime($data['data']['check_in']));
        ?>
                    <?php 
    }
    ?>
                    <?php 
    if (isset($data['data']['check_out'])) {
        ?>
                    <?php 
        st_the_language('to');
        echo date(get_option('date_format'), strtotime($data['data']['check_out']));
        ?>
                    <?php 
    }
    ?>
</small>
                </p>
            </div>
            <div class="col-xs-3">
                <p class="text-right"><span class="text-lg">
                    <?php 
    $money = STCart::get_hotel_price($data['data'], $data['price'], $data['number']);
    echo TravelHelper::format_money($money);
    ?>
                </span>
                </p>
            </div>
        </div>
    </li>
    <?php 
}
Example #30
0
                                        <div class="row">
                                            <div class="col-md-3">
                                                <div class="checkbox-inline checkbox-stroke">
                                                    <label for="check_all">
                                                        <i class="fa fa-cogs"></i>
                                                        <input name="check_all" class="i-check check_all"
                                                               type="checkbox"/><?php 
            _e("All", ST_TEXTDOMAIN);
            ?>
                                                    </label>
                                                </div>
                                            </div>
                                            <?php 
            foreach ($category as $k => $v) {
                $icon = get_tax_meta($k, 'st_icon');
                $icon = TravelHelper::handle_icon($icon);
                $check = '';
                if (STUser_f::st_check_post_term_partner($post_id, $value, $k) == true) {
                    $check = 'checked';
                }
                ?>
                                                <div class="col-md-3">
                                                    <div class="checkbox-inline checkbox-stroke">
                                                        <label for="taxonomy">
                                                            <i class="<?php 
                echo esc_html($icon);
                ?>
"></i>
                                                            <input name="taxonomy[]" class="i-check item_tanoxomy"
                                                                   type="checkbox" <?php 
                echo esc_html($check);