/** * * @since 1.1.0 * */ function insert_comment_user() { if (STInput::post('comment_post_ID')) { $user = new STUser_f(); $user->st_write_review(); } }
/** *@since 1.1.7 **/ static function getListLocation() { if (!is_admin()) { $post_id = STInput::request('id'); } else { $post_id = STInput::request('post'); } $muti_location = STInput::request('multi_location'); if (empty($post_id) || !get_post_status($post_id) and empty($muti_location)) { $list_location = json_encode(""); } else { $list_location = get_post_meta($post_id, 'multi_location', true); if (empty($list_location) and !empty($muti_location)) { if (STUser_f::get_status_msg() != 'success') { $list_location = implode(',', $muti_location); } } if (!empty($list_location)) { if (is_array($list_location)) { foreach ($list_location as $key => $val) { $list_location[$key] = preg_replace("/(\\_)/", "", $list_location[$key]); } } else { $list_location = preg_replace("/(\\_)/", "", $list_location); $list_location = explode(",", $list_location); } $list_location = json_encode($list_location); } else { $list_location = get_post_meta($post_id, 'id_location', true); if (!empty($list_location)) { $arr = array($list_location); $list_location = json_encode($arr); } else { $list_location = get_post_meta($post_id, 'location_id', true); if (!empty($list_location)) { $arr = array($list_location); $list_location = json_encode($arr); } else { $list_location = json_encode(""); } } } } wp_localize_script('jquery', 'list_location', array('list' => $list_location)); }
<?php /** *@since 1.1.9 * use for Booking Hotel **/ ?> <div class="st-create"> <h2><?php _e("Add New Hotel Booking", ST_TEXTDOMAIN); ?> </h2> </div> <form action="" method="post" id="form-add-booking-partner" class="form-add-booking-partner <?php echo STUser_f::get_status_msg(); ?> "> <?php wp_nonce_field('add_booking_partner', 'add_booking_partner_field'); ?> <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> <div class="panel panel-default"> <div class="panel-heading" role="tab" id="headingOne"> <h2 class="panel-title"> <a style="font-size: 22px; font-weight: 400;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> <?php echo __('Customer Information', ST_TEXTDOMAIN); ?> </a> </h2> </div>
<div class="tab-pane fade " id="tab-discount-flash"> <div class='col-md-12'> <div class="form-group"> <label for="discount_text"><?php _e("Discount Text", ST_TEXTDOMAIN); ?> :</label> <input id="discount_text" name="discount_text" type="text" placeholder="<?php _e("Discount Text", ST_TEXTDOMAIN); ?> " class="form-control" value="<?php echo get_post_meta($post_id, 'discount_text', true); ?> "> <div class="st_msg"><?php echo STUser_f::get_msg_html($validator->error('discount_text'), 'danger'); ?> </div> </div> </div> </div> <div class="tab-pane fade " id="tab-custom-fields"> <?php $custom_field = st()->get_option('hotel_unlimited_custom_field'); if (!empty($custom_field) and is_array($custom_field)) { ?> <div class="row"> <?php foreach ($custom_field as $k => $v) { $key = str_ireplace('-', '_', 'st_custom_' . sanitize_title($v['title'])); $class = 'col-md-12';
<?php /** * @package WordPress * @subpackage Traveler * @since 1.0 * * User booking history * * Created by ShineTheme * */ $class_user = new STUser_f(); $html_all = $class_user->get_book_history(''); $html_pending = $class_user->get_book_history('pending'); $html_complete = $class_user->get_book_history('complete'); $html_canceled = $class_user->get_book_history('canceled'); ?> <div class="st-create"> <h2><?php STUser_f::get_title_account_setting(); ?> </h2> </div> <div class="tabbable"> <ul class="nav nav-tabs" id="myTab"> <li class="active"><a href="#tab-all" data-toggle="tab"><?php _e("All", ST_TEXTDOMAIN); ?> </a></li> <li><a href="#tab-pending" data-toggle="tab"><?php
} ?> <input value="<?php echo esc_html($value); ?> " type="text" placeholder="<?php _e('Zoom Level', ST_TEXTDOMAIN); ?> " id="bt_ot_gmap_input_zoom" class="number bt_ot_gmap_input_zoom form-control" name="<?php echo esc_attr($field_name); ?> [zoom]"/> <div class="st_msg"> <?php echo STUser_f::get_msg_html($validator->error('gmap[zoom]'), 'danger'); ?> </div> </label> <input type="hidden" class="bt_ot_gmap_input_type" name="<?php echo esc_attr($field_name); ?> [map_type]"/> </div> </div> <?php echo '</div>'; echo '</div>'; echo '</div>';
},500); $('.div_custom_month').hide(); }); }) </script> <?php } else { ?> <?php $start = $request_custom_date['start']; $end = $request_custom_date['end']; $this_data_info_month = STUser_f::st_get_data_reports_partner('all', 'custom_date', $start, $end); $data_js = STUser_f::_conver_array_to_data_js_reports($this_data_info_month['date'], 'all', $request_custom_date['type']); ?> <div class="st_div_canvas"> <div class="head_reports bg-green"> <div class="head_control"> <div class="head_time"> <span><?php _e("Info Month", ST_TEXTDOMAIN); ?> :<?php echo date_i18n('F j, Y', strtotime($start)); ?> - <?php echo date_i18n('F j, Y', strtotime($end)); ?> </span>
<?php /** * @package WordPress * @subpackage Traveler * @since 1.0 * * User loop tours * * Created by ShineTheme * */ $status = get_post_status(get_the_ID()); $icon_class = STUser_f::st_get_icon_status_partner(); ?> <li <?php post_class(); ?> > <a data-id="<?php the_ID(); ?> " data-id-user="******" data-placement="top" rel="tooltip" class="btn_remove_post_type cursor fa fa-times booking-item-wishlist-remove" data-original-title="<?php st_the_language('user_remove'); ?> "></a> <a rel="tooltip" data-original-title="<?php st_the_language('user_edit');
<?php /** * @package WordPress * @subpackage Traveler * @since 1.0 * * User setting * * Created by ShineTheme * */ ?> <div class="st-create"> <h2><?php STUser_f::get_title_account_setting(); ?> </h2> </div> <div class="row"> <div class="col-md-5"> <?php if (!empty($_REQUEST['status'])) { if ($_REQUEST['status'] == 'success') { echo '<div class="alert alert-' . $_REQUEST['status'] . '"> <button data-dismiss="alert" type="button" class="close"><span aria-hidden="true">×</span> </button> <p class="text-small">' . st_get_language('user_update_successfully') . '</p> </div>'; } }
} ?> <?php } ?> <?php } ?> </ul> </div> </div> <div class="user-content col-md-9"> <div class="st-page-bar"> <ul class="page-breadcrumb"> <?php echo STUser_f::st_get_breadcrumb_partner(); ?> </ul> </div> <?php if (!empty($_REQUEST['id_user'])) { echo st()->load_template('user/user', 'setting-info', get_object_vars($current_user)); } else { echo st()->load_template('user/user', $sc, get_object_vars($current_user)); } ?> </div> </div> </div> <div class="gap"></div> <?php
</div> </div> <div class="col-md-1"> <div class="form-group form-group-icon-left"> <div class="btn btn-danger btn_del_program" style="margin-top: 27px"> X </div> </div> </div> </div> </div> <div id="html_features" style="display: none"> <?php $list = STUser_f::get_list_value_taxonomy('st_cars'); ?> <?php if (!empty($list)) { ?> <div class="item"> <div class="col-md-4"> <div class="form-group form-group-icon-left"> <label for="features_taxonomy"><?php st_the_language('user_create_car_features_attributes'); ?> </label> <i class="fa fa-arrow-down input-icon input-icon-hightlight"></i> <?php if (!empty($list)) {
echo 'class="active"'; } ?> > <a href="<?php echo esc_url(add_query_arg('sc', 'wishlist', $user_link)); ?> "><i class="fa fa-heart-o"></i><?php st_the_language('user_wishlist'); ?> </a> </li> <?php if (STUser_f::check_lever_partner($lever[0]) and st()->get_option('partner_enable_feature') == 'on') { ?> <li <?php if ($sc == 'reports') { echo 'class="active"'; } ?> > <a href="<?php echo esc_url(add_query_arg('sc', 'reports', $user_link)); ?> "><i class="fa fa-book"></i><?php _e("Reports", ST_TEXTDOMAIN); ?> </a>
function st_cruise_add_review() { if (is_singular('cruise')) { return '<div class="text-right mb10"> <a class="btn btn-primary" href="' . get_comments_link() . '">' . __('Write a review', ST_TEXTDOMAIN) . '</a> <a class="btn_add_wishlist btn btn-primary" data-type="' . get_post_type(get_the_ID()) . '" data-id="' . get_the_ID() . '" > ' . STUser_f::get_icon_wishlist() . ' </a> </div>'; } }
<div class="form-group form-group-icon-left"> <label><?php st_the_language('user_create_hotel_description'); ?> </label> <textarea id="desc" name="desc" class="form-control"></textarea> <div class="st_msg console_msg_desc"></div> </div> <h4><?php st_the_language('user_create_hotel_detail'); ?> </h4> <div class="row"> <div class="col-md-12"> <?php $taxonomy = STUser_f::get_list_value_taxonomy('st_hotel'); if (!empty($taxonomy)) { ?> <div class="form-group form-group-icon-left"> <label> <?php st_the_language('user_create_hotel_attributes'); ?> </label> <div class="row"> <?php foreach ($taxonomy as $k => $v) { ?> <div class="col-md-3"> <div class="checkbox-inline checkbox-stroke"> <label> <i class="<?php
</label> </div> </div> <?php } ?> </div> </div> <?php } ?> </div> <div class="col-md-12"> <?php $taxonomy = STUser_f::get_list_value_taxonomy('hotel_room'); if (!empty($taxonomy)) { ?> <div class="form-group form-group-icon-left "> <label> <?php st_the_language('user_create_room_attributes'); ?> </label> <div class="row"> <?php foreach ($taxonomy as $k => $v) { ?> <div class="col-md-3"> <div class="checkbox-inline checkbox-stroke"> <label> <i class="<?php
</div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label for="room_description"><?php _e("Description", ST_TEXTDOMAIN); ?> :</label> <textarea id="room_description" rows="6" name="room_description" class="form-control"><?php echo stripslashes(STInput::request('room_description')); ?> </textarea> <div class="st_msg"><?php echo STUser_f::get_msg_html($validator->error('room_description'), 'danger'); ?> </div> </div> </div> </div> </div> <div class="tab-pane fade" id="tab-payment"> <?php $data_paypment = STPaymentGateways::$_payment_gateways; if (!empty($data_paypment) and is_array($data_paypment)) { foreach ($data_paypment as $k => $v) { ?> <div class="row"> <div class="col-md-4"> <div class="form-group form-group-icon-left">
* Created by ShineTheme * */ $format = TravelHelper::getDateFormat(); ?> <div class="st-create"> <h2><?php _e("Tours Booking", ST_TEXTDOMAIN); ?> </h2> </div> <?php $paged = get_query_var('paged') ? intval(get_query_var('paged')) : 1; $limit = 10; $offset = ($paged - 1) * $limit; $data_post = STUser_f::get_history_bookings('st_tours', $offset, $limit, $data->ID); $posts = $data_post['rows']; $total = ceil($data_post['total'] / $limit); ?> <table class="table table-bordered table-striped table-booking-history"> <thead> <tr> <th><?php _e("STT", ST_TEXTDOMAIN); ?> </th> <th><?php _e("Customer", ST_TEXTDOMAIN); ?> </th>
<?php /** * @package WordPress * @subpackage Traveler * @since 1.0 * * User overview * * Created by ShineTheme * */ $data = STUser_f::get_info_total_traveled(); wp_enqueue_script('st-gmap-init'); ?> <h4><?php st_the_language('user_total_traveled'); ?> </h4> <ul class="list list-inline user-profile-statictics mb30"> <?php $df = array(array('title' => 'Hotel', 'id_partner' => 'hotel'), array('title' => 'Rental', 'id_partner' => 'rental'), array('title' => 'Car', 'id_partner' => 'car'), array('title' => 'Tour', 'id_partner' => 'tour'), array('title' => 'Activity', 'id_partner' => 'activity')); ?> <?php $list_partner = st()->get_option('list_partner', $df); ?> <?php foreach ($list_partner as $k => $v) { ?> <?php if ($v['id_partner'] == 'hotel') {
</select> </div> </div> <div class="col-md-6 data_best-price-guarantee"> <div class="form-group"> <label for="best-price-guarantee-text"><?php st_the_language('user_create_activity_best_price_guarantee_text'); ?> :</label> <textarea class="form-control" name="best-price-guarantee-text"><?php echo get_post_meta($post_id, 'best-price-guarantee-text', true); ?> </textarea> </div> <div class="st_msg"><?php echo STUser_f::get_msg_html($validator->error('best-price-guarantee-text'), 'danger'); ?> </div> </div> </div> </div> <div class="tab-pane fade" id="tab-payment"> <?php $data_paypment = STPaymentGateways::$_payment_gateways; if (!empty($data_paypment) and is_array($data_paypment)) { foreach ($data_paypment as $k => $v) { ?> <div class="row"> <div class="col-md-4"> <div class="form-group form-group-icon-left">
</div> <div class="form-group form-group-icon-left"> <label><?php st_the_language('user_create_rental_description'); ?> </label> <textarea id="desc" name="desc" class="form-control"></textarea> <div class="st_msg console_msg_desc"></div> </div> <h4><?php st_the_language('user_create_rental_detail'); ?> </h4> <div class="row"><div class="col-md-12"> <?php $taxonomy = STUser_f::get_list_value_taxonomy('st_rental'); if (!empty($taxonomy)) { ?> <div class="form-group form-group-icon-left"> <label> <?php st_the_language('user_create_rental_attributes'); ?> </label> <div class="row"> <?php foreach ($taxonomy as $k => $v) { ?> <div class="col-md-3"> <div class="checkbox-inline checkbox-stroke"> <label> <i class="<?php
<?php /** * @package WordPress * @subpackage Traveler * @since 1.0 * * User html add to wishlist * * Created by ShineTheme * */ if (is_user_logged_in()) { ?> <?php $data = STUser_f::get_icon_wishlist(); ?> <?php if (!empty($title)) { ?> <div class=" clear mt20" style="margin-bottom: 10px;"> <?php if (!empty($title)) { echo '<span>' . $title . ': </span>'; } ?> <a data-placement="top" rel="tooltip" data-original-title="<?php echo balanceTags($data['original-title']); ?> " class="btn_add_wishlist btn btn-primary <?php if (!empty($class)) {
static function get_fist_year_reports() { $the_week = STUser_f::get_week_reports(); $last_7_days = date('Y-m-d', strtotime('today - 7 days')); $last_15_days = date('Y-m-d', strtotime('today - 30 days')); $last_60_days = date('Y-m-d', strtotime('today - 60 days')); $last_90_days = date('Y-m-d', strtotime('today - 90 days')); $yesterday = date('Y-m-d', strtotime('today - 1 days')); $defaut = array('d' => '', 'm' => '', 'y' => '', 'full' => '', 'last_7days' => $last_7_days, 'last_15days' => $last_15_days, 'last_60days' => $last_60_days, 'last_90days' => $last_90_days, 'yesterday' => $yesterday, 'date_now' => date('Y-m-d'), 'the_week' => $the_week, 'last_year' => date("Y") - 1); global $current_user; get_currentuserinfo(); $user_id = $current_user->ID; $query = array('post_type' => 'shop_order', 'post_status' => array('wc-completed'), 'posts_per_page' => 1, 'author' => $user_id, 'order' => "ASC", 'orderby' => "date"); query_posts($query); while (have_posts()) { the_post(); $defaut = array('d' => get_the_date("d"), 'm' => get_the_date("n"), 'y' => get_the_date("Y"), 'full' => get_the_date("Y-m-d"), 'last_7days' => $last_7_days, 'last_15days' => $last_15_days, 'last_60days' => $last_60_days, 'last_90days' => $last_90_days, 'yesterday' => $yesterday, 'date_now' => date('Y-m-d'), 'the_week' => $the_week, 'last_year' => date("Y") - 1); } return $defaut; }
<?php /** * @package WordPress * @subpackage Traveler * @since 1.0 * * form new login * * Created by ShineTheme * */ if (isset($_REQUEST['btn-reg'])) { STUser_f::registration_user(); } $class_form = ""; if (is_page_template('template-login.php')) { $class_form = 'form-group-ghost'; } $btn_sing_up = get_post_meta(get_the_ID(), 'btn_sing_up', true); if (empty($btn_sing_up)) { $btn_sing_up = __("Sign Up", ST_TEXTDOMAIN); } ?> <form method="post" action="<?php echo TravelHelper::build_url('url', STInput::get('url')); ?> "> <div class="form-group <?php echo esc_attr($class_form);
* Created by ShineTheme * */ $format = TravelHelper::getDateFormat(); ?> <div class="st-create"> <h2><?php _e("Activity Booking", ST_TEXTDOMAIN); ?> </h2> </div> <?php $paged = get_query_var('paged') ? intval(get_query_var('paged')) : 1; $limit = 10; $offset = ($paged - 1) * $limit; $data_post = STUser_f::get_history_bookings('st_activity', $offset, $limit, $data->ID); $posts = $data_post['rows']; $total = ceil($data_post['total'] / $limit); ?> <table class="table table-bordered table-striped table-booking-history"> <thead> <tr> <th><?php _e("STT", ST_TEXTDOMAIN); ?> </th> <th><?php _e("Customer", ST_TEXTDOMAIN); ?> </th>
<div class="form-group form-group-icon-left"> <label for="st_tour_external_booking"><?php _e("External Booking URL", ST_TEXTDOMAIN); ?> :</label> <i class="fa fa-link input-icon input-icon-hightlight"></i> <input id="st_tour_external_booking_link" name="st_tour_external_booking_link" type="text" placeholder="<?php _e("Eg: https://domain.com"); ?> " class="form-control" value="<?php echo get_post_meta($post_id, 'st_tour_external_booking_link', true); ?> "> <div class="st_msg"><?php echo STUser_f::get_msg_html($validator->error('st_tour_external_booking_link'), 'danger'); ?> </div> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="form-group form-group-icon-left"> <label for="tour_program"><?php _e("Tour's Program", ST_TEXTDOMAIN); ?> :</label> </div> </div> </div>
</div> <?php } ?> <div id="st_data_reports"></div> <?php } ?> </div> </div> <input type="hidden" class="st_reports_order_by" value="<?php echo STInput::request('order_by', 'month'); ?> "> <?php $data_js = STUser_f::get_js_reports($data_reports, $type, STInput::request('date_start'), STInput::request('date_end')); ?> <script class="code" type="text/javascript"> <?php echo $data_js['data_key']; echo $data_js['data_lable']; echo $data_js['data_value']; echo $data_js['data_ticks']; ?> jQuery(document).ready(function($){ if(data_value.length >0) { var data_reports = $.jqplot('st_data_reports', data_value, { title : '<?php echo esc_html($title); ?> ',
<h2 class="pull-left"><?php st_the_language('my_hotel'); ?> </h2> <a class="btn btn-default pull-right" href="<?php echo esc_url(add_query_arg('sc', 'create-hotel', get_permalink())); ?> "> <?php _e("Add New Hotel", ST_TEXTDOMAIN); ?> </a> </div> <div class="msg"> <?php echo STUser_f::get_msg(); ?> </div> <ul id="" class="booking-list booking-list-wishlist "> <?php $paged = get_query_var('paged') ? get_query_var('paged') : 1; $args = array('post_type' => 'st_hotel', 'post_status' => 'publish , draft , trash', 'author' => $data->ID, 'posts_per_page' => 10, 'paged' => $paged); $query = new WP_Query($args); if ($query->have_posts()) { while ($query->have_posts()) { $query->the_post(); echo st()->load_template('user/loop/loop', 'hotel', get_object_vars($data)); } } else { echo '<h5>' . st_get_language('no_hotel') . '</h5>'; }
function st_wp_title($title, $sep) { if (is_feed()) { return $title; } global $page, $paged; // Add the blog name //$title = get_bloginfo('name', 'display'); // // Add the blog description for the home/front page. // $site_description = get_bloginfo('description', 'display'); // if ($site_description && (is_home() || is_front_page())) { // $title .= " $sep $site_description"; // } // Add a page number if necessary: if (($paged >= 2 || $page >= 2) && !is_404()) { $title .= " {$sep} " . sprintf(__('Page %s', ST_TEXTDOMAIN), max($paged, $page)); } if (is_search()) { $post_type = STInput::get('post_type'); $s = STInput::get('s'); $location_id = STInput::get('location_id'); $extra = ''; if (post_type_exists($post_type)) { $post_type_obj = get_post_type_object($post_type); $extra .= ' ' . $post_type_obj->labels->singular_name; } if ($location_id and $location_name = get_the_title($location_id)) { $extra .= sprintf(__(' in %s', ST_TEXTDOMAIN), $location_name); } if ($extra) { $extra = __('Search for ', ST_TEXTDOMAIN) . $extra; } $title = $extra . $title; } if (is_page_template('template-user.php')) { $title_tmp = get_bloginfo('name', 'display'); $title = STUser_f::st_get_title_head_partner() . " | " . $title_tmp; } return $title; }
?> </label> </div> </div> <?php } ?> </div> </div> <?php } ?> </div> <div class="col-md-12"> <?php $taxonomy = STUser_f::get_list_value_taxonomy('cruise_cabin'); if (!empty($taxonomy)) { ?> <div class="form-group form-group-icon-left"> <label> <?php st_the_language('user_create_cruise_cabin_attributes'); ?> </label> <div class="row"> <?php foreach ($taxonomy as $k => $v) { ?> <div class="col-md-3"> <div class="checkbox-inline checkbox-stroke"> <label> <i class="<?php
</div> <div class="form-group form-group-icon-left"> <label> <?php st_the_language('user_create_tour_featured_image'); ?> </label> <input id="featured-image" name="featured-image" type="file" class=""> </div> <h4><?php st_the_language('user_create_tour_general'); ?> </h4> <div class="row"> <div class="col-md-12"> <?php $category = STUser_f::get_list_taxonomy('st_tour_type'); if (!empty($category)) { ?> <div class="form-group form-group-icon-left"> <label> <?php _e("Category", ST_TEXTDOMAIN); ?> </label> <div class="row"> <?php foreach ($category as $k => $v) { ?> <div class="col-md-3"> <div class="checkbox-inline checkbox-stroke"> <label> <input name="id_category[]" class="i-check" type="checkbox" value="<?php