Merge branch 'master' of github.com:hainatravel/information-system

master
赵鹏 1 year ago
commit 4fbebb3b2e

@ -94,21 +94,7 @@ class Confirm extends CI_Controller {
$MEI_ArrivalTime = str_replace("T", " ", $this->input->post('MEI_ArrivalDate').' '.$this->input->post('MEI_ArrivalTime'));
$MEI_DepartureTime = str_replace("T", " ", $this->input->post('MEI_DepartureDate').' '.$this->input->post('MEI_DepartureTime'));
// SQL Server datetime 类型的最小值和最大值
$min_date = '1753-01-01';
$max_date = '9999-12-31 23:59:59';
$min_datetime = new DateTime($min_date);
$max_datetime = new DateTime($max_date);
$MEI_Arrival_datetime = new DateTime($MEI_ArrivalTime);
$MEI_Departure_datetime = new DateTime($MEI_DepartureTime);
if ($MEI_Arrival_datetime < $min_datetime || $MEI_Arrival_datetime > $max_datetime) {
$MEI_ArrivalTime = NULL;
}
if ($MEI_Departure_datetime < $min_datetime || $MEI_Departure_datetime > $max_datetime) {
$MEI_DepartureTime = NULL;
}
//已经确认过
$had_save = $this->Order_model->get_visitor_link($COLI_SN, $visitor_link);

@ -210,7 +210,7 @@ class addorders extends CI_Controller{
$back_message .= '-此用户为黑名单用户,不自动出票';
}
if(strlen($people_info->BPE_Passport) > 18){
if(strlen($people_info->BPE_Passport) >= 18){
$auto_flag = 0;
$back_message .= '-护照位数大于18不自动出票';
}
@ -252,8 +252,7 @@ class addorders extends CI_Controller{
if(!empty($time_obj)){
$saletime = strtotime($time_obj->TST_saletime);
}else{
$saletime = strtotime("18:00"); //如果没有设置预售时间默认18点
$back_message .= '-没设置预售时间';
$saletime = strtotime("12:00"); //如果没有设置预售时间默认8点
}
//echo $saletime;
$sale_diff = (time() - $saletime) / 3600;

@ -330,7 +330,7 @@ class BIZ_train_model extends CI_Model {
//获取能够自动出票的订单列表2.0版本 20240130 zp (coli_state 11 我的订单 8 已收款 63 出票中 13 新订单(已支付))
function auto_check_ticket_2(){
$sql = "SELECT top 10 COLD_SN ,coli_id,COLD_SPFS,COLI_State,(SELECT TOP 1 GAI_Type FROM BIZ_GroupAccountInfo WHERE GAI_COLI_SN=bcli.COLI_SN AND ISNULL(DeleteFlag,0)=0) as GAI_Type
$sql = "SELECT distinct top 10 COLD_SN ,coli_id,COLD_SPFS,COLI_State,(SELECT TOP 1 GAI_Type FROM BIZ_GroupAccountInfo WHERE GAI_COLI_SN=bcli.COLI_SN AND ISNULL(DeleteFlag,0)=0) as GAI_Type
,cold_startdate
,isnull((select top 1 ts_autotimes from InfoManager.dbo.trainsystem where ts_cold_sn= bcld.cold_sn order by ts_id desc),0) as ts_autotimes
,(select top 1 ts_autolasttime from InfoManager.dbo.trainsystem where ts_cold_sn= bcld.cold_sn order by ts_id desc) as ts_autolasttime
@ -354,12 +354,7 @@ class BIZ_train_model extends CI_Model {
AND COLD_SN NOT IN ( select FOI_COLD_SN from BIZ_FlightsOrderInfo where FOI_COLD_SN=COLD_SN and FOI_TrainNetOrderNo>'')
and (COLD_StartDate between GETDATE() and CONVERT(varchar(100),GETDATE()+14,23)+' 23:59')
and isnull((select top 1 ts_autotimes from InfoManager.dbo.trainsystem where ts_cold_sn= bcld.cold_sn order by ts_id desc),0)<4
order by ISNULL(CAST((select TST_saletime from TrainSaleTime where TST_station_cn = (
SELECT TOP 1 TRS_StationCN
FROM TrainStation
WHERE TRS_Code = (select top 1 DepartAirport from BIZ_FlightsOrderInfo where FOI_COLD_SN = cold_sn)
and ISNULL(TRS_StationCN,'')<>''
)) as Time),'18:00')
order by COLD_StartDate
";
$query = $this->HT->query($sql);
return $query->result();

@ -1,60 +1,101 @@
<script
src="https://www.recaptcha.net/recaptcha/enterprise.js?render=6Lf828MhAAAAANNetijCXKwW5ARyhcJ-b1Hhslja"></script>
<script src="https://www.recaptcha.net/recaptcha/enterprise.js?render=6Lf828MhAAAAANNetijCXKwW5ARyhcJ-b1Hhslja"></script>
<div class="tmbottom">
<h3 style="font-size: 24px; line-height: 22px;">Chiang Mai CAD Yi Peng Festival 2024 - Secure Your Exclusive Tickets While You Can!</h3>
<form id='ticket_form' action="https://www.asiahighlights.com/orders/lantern_save" method="post">
<p style=" font-size: 22px;"><strong>Select Date:</strong></p>
<form id='ticket_form' action="https://www.asiahighlights.com/orders/lantern_save" method="post" >
<p style="font-size: 22px;"><strong>Select a Venue:</strong></p>
<div class="selectHotl" style="margin-bottom: 20px;">
<div class="optionLable">
<input type="radio" value="2024-11-15" id="november15th" name="ticket_date">
<input type="radio" value="CAD Khomloy Sky Lanterns Festival" checked id="Khomloy" name="Venue">
<label for="Khomloy">
<strong>CAD Khomloy Sky Lanterns Festival</strong>
<br>
The most spectacular one, over 8,000 seats
</label>
</div>
<div class="optionLable">
<input type="radio" value="Heritage Sky Lanterns Festival" id="Heritage" name="Venue">
<label for="Heritage">
<strong>Heritage Sky Lanterns Festival</strong>
<br>
The most cost-effective one, 4,500 seats
</label>
</div>
</div>
<p style="font-size: 22px;"><strong>Select Date:</strong></p>
<div class="selectHotl" style="margin-bottom: 20px;" id="ticket_date_november15th">
<div class="optionLable">
<input type="radio" value="2024-11-15" checked id="november15th" name="ticket_date">
<label for="november15th">
November 15th, 2024
</label>
</div>
<div class="optionLable">
<input type="radio" value="2024-11-16" checked id="november16th" name="ticket_date">
<div class="optionLable" id="ticket_date_november16th">
<input type="radio" value="2024-11-16" id="november16th" name="ticket_date">
<label for="november16th">
November 16th, 2024
</label>
</div>
</div>
<p style=" font-size: 22px;"><strong>Select an Available Ticket Type</strong></p>
<p style="font-size: 22px;"><strong>Select an Available Ticket Type</strong></p>
<div class="selectHotl" style="margin-bottom: 20px;">
<div class="optionLable" id="ticket_type_premium">
<input type="radio" value="Premium+Transfer+Dinner" id="Premium" name="ticket_type">
<label for="Premium" style="font-size:18px;">
<div class="optionLable" id="ticket_type_premium_khomloy">
<input type="radio" value="Premium+Transfer+Dinner" checked id="premium_khomloy" data-price="179" name="ticket_type">
<label for="premium_khomloy" style="font-size:18px;">
Premium+Transfer+Dinner
<div class="selectionMemo">
US$179 (6400THB)
</div>
<div id='premium_ticket_left' style="display: none;">0 left</div>
</label>
</div>
<div class="optionLable" id="vip_type_premium">
<input type="radio" value="VIP+Transfer+Dinner" id="VIP" name="ticket_type">
<label for="VIP" style="font-size:18px;">
<div class="optionLable" id="ticket_type_vip_khomloy">
<input type="radio" value="VIP+Transfer+Dinner" id="vip_khomloy" data-price="169" name="ticket_type">
<label for="vip_khomloy" style="font-size:18px;">
VIP+Transfer+Dinner
<div class="selectionMemo">
US$169 (5900THB)
</div>
<div id='vip_ticket_left' style="display: none;">0 left</div>
</label>
</div>
<div class="optionLable" id="ticket_type_standard">
<input type="radio" value="Standard+Transfer+Dinner" checked id="Standard" name="ticket_type">
<label for="Standard" style="font-size:18px;">
<div class="optionLable" id="ticket_type_standard_khomloy">
<input type="radio" value="Standard+Transfer+Dinner" id="standard_khomloy" data-price="129" name="ticket_type">
<label for="standard_khomloy" style="font-size:18px;">
Standard+Transfer+Dinner
<div class="selectionMemo">
US$129 (4600THB)
</div>
<div id='standard_ticket_left' style="display: none;">0 left</div>
</label>
</div>
<div class="optionLable" id="ticket_type_premium_heritage" style="display: none;">
<input type="radio" value="Premium service+Exclusive Hotel Transfer+Dinner" id="premium_heritage" data-price="159" name="ticket_type">
<label for="premium_heritage" style="font-size:18px;">
Premium service+<strong>Exclusive Hotel Transfer</strong>+Dinner
<div class="selectionMemo">
US$159 (5500THB)
</div>
</label>
</div>
<div class="optionLable" id="ticket_type_vip_heritage" style="display: none;">
<input type="radio" value="VIP Service+Shuttle Transfer+Dinner" id="vip_heritage" data-price="109" name="ticket_type">
<label for="vip_heritage" style="font-size:18px;">
VIP Service+Shuttle Transfer+Dinner
<div class="selectionMemo">
US$109 (3900THB)
</div>
</label>
</div>
</div>
<div id="ticket_type_errmsg" style="display: none">
<div class="requiredArea" style="margin-top:-10px;">Please select at least one option.</div>
</div>
<p style=" font-size: 22px;"><strong>Select Ticket Quantity</strong></p>
<p style="font-size: 22px;"><strong>Select Ticket Quantity</strong></p>
<div class="peopleSelect" style="width: auto;">
<span class="formMemo">
Adults and older children (8+ years old)
@ -71,18 +112,13 @@
<input class="minaddBtn addadult" id='plusButton' type="button" value="+">
</div>
</div>
<p style="display: inline-block;">Children under 8 years old enter free; 8-year-olds and above are charged the same as adults. You can buy a
ticket for your child under 8 if you would like her or him to enjoy the same provision.</p>
<div class="payonline_price">Total price: <strong id="totalPriceText">$129</strong></div>
<p style="margin-top: 50px;"><strong>Please provide correct personal information for your ticket
booking. Double
check.</strong></p>
<input class="FullName" id="ticket_realname" name="fullname"
placeholder="Your name * (exactly as in your passport)" required="" type="text" value="" />
placeholder="Your name * (exactly per passport)" required="" type="text" value="" />
<div id="ticket_realname_errmsg" style="display: none">
<div class="requiredArea" style="margin-top:-10px;">Please enter your name.</div>
</div>
@ -352,10 +388,7 @@
<div id="ticket_contact_errmsg" style="display: none">
<div class="requiredArea" style="margin-top:-10px;">Please enter your phone number.</div>
</div>
<textarea name="other_travels_name"
placeholder="For booking two/or more tickets, please fill in other traveler name(s) here: (per passport, e.g. Smith Sarah Jean)" ></textarea>
<textarea name="additional_requirements"
placeholder="If you have other requirements such as hotel booking, customized guided tour, private transport, or a full tour package, please let us know .... (optional)"></textarea>
<textarea name="other_travelers_names" placeholder="If booking two or more tickets,please fill in other traveler name(s) here:(per passport, e.g.Smith Sarah Jean)."></textarea>
<p style="
margin-top: 0;
@ -363,138 +396,150 @@
padding: 0;
">I prefer to be contacted via:</p>
<div class="checkYes">
<input type="checkbox" value="yes" name="contact_via_whatsapp" id="whatsapp" class="checkBorder">
<div class="checkYes">
<input type="checkbox" value="yes" name="contact_via_whatsapp" id="whatsapp" class="checkBorder" >
<label for="whatsapp">WhatsApp</label>
</div>
<div class="checkYes">
<input type="checkbox" value="yes" name="contact_via_iMessage" id="iMessage" class="checkBorder">
</div>
<div class="checkYes">
<input type="checkbox" value="yes" name="contact_via_iMessage" id="iMessage" class="checkBorder" >
<label for="iMessage">iMessage</label>
</div>
<div class="checkYes">
<input type="checkbox" value="yes" name="contact_via_phone_call" id="Phone" class="checkBorder">
</div>
<div class="checkYes">
<input type="checkbox" value="yes" name="contact_via_phone_call" id="Phone" class="checkBorder" >
<label for="Phone">Phone call</label>
</div>
<div class="checkYes">
<input type="checkbox" value="yes" name="contact_via_email" id="Email" class="checkBorder">
</div>
<div class="checkYes">
<input type="checkbox" value="yes" name="contact_via_email" id="Email" class="checkBorder" >
<label for="Email">Email</label>
</div>
<div class="checkYes">
<input type="checkbox" value="yes" name="contact_via_video_appointment" id="Video" class="checkBorder">
</div>
<div class="checkYes">
<input type="checkbox" value="yes" name="contact_via_video_appointment" id="Video" class="checkBorder" >
<label for="Video">Video appointment</label>
</div>
</div>
<input name="total_price" id="totalPriceHidden" type="hidden" value="10000" />
<input name="product_sn" id="product_sn" type="hidden" value="13949" />
<input name="product_code" id="cli_no" type="hidden" value="YDFW-AH" />
<input name="product_code" id="cli_no" type="hidden" value="YDFW-AH"/>
<input name="itinerary" type="hidden" value="<?php echo $information->ic_title; ?>" />
<button class="sendButton" id="submit_ticket_button" name="submit_ticket_form" type="button">Proceed to
Payment</button>
<button class="sendButton" id="submit_ticket_button" name="submit_ticket_form"
type="button">Proceed to Payment</button>
<p style=" text-align: center;
font-style: italic;
margin-top: -15px;
line-height: 20px;"><strong>Once we receive your payment, our travel advisor will contact you within 24 hours and send you your e-ticket.</strong></p>
</form>
</div>
<script>
function calcTotalPrice(ticketPrice, adultNumber) {
var totalPrice = ticketPrice * adultNumber;
if (adultNumber >= 10) {
totalPrice = totalPrice * 0.95;
}
return totalPrice.toFixed(2);
totalPrice = totalPrice.toFixed(2);
totalPriceHidden.value = totalPrice;
totalPriceText.innerText = '$' + totalPrice;
}
var adultNumberNode = document.getElementById("adultNumberValue");
var ticketDateList = document.querySelectorAll("input[name='ticket_date']");
var ticketTypeList = document.querySelectorAll("input[name='ticket_type']");
var ticket_type_premium_khomloy_div = document.getElementById("ticket_type_premium_khomloy");
var ticket_type_vip_khomloy_div = document.getElementById("ticket_type_vip_khomloy");
var ticket_type_standard_khomloy_div = document.getElementById("ticket_type_standard_khomloy");
var ticket_type_premium_heritage_div = document.getElementById("ticket_type_premium_heritage");
var ticket_type_vip_heritage_div = document.getElementById("ticket_type_vip_heritage");
var premium_khomloy_radio = document.getElementById("premium_khomloy");
var premium_heritage_radio = document.getElementById("premium_heritage");
var ticket_date_november15th = document.getElementById("ticket_date_november15th");
var ticket_date_november16th = document.getElementById("ticket_date_november16th");
var venueList = document.querySelectorAll("input[name='Venue']");
var totalPriceText = document.getElementById("totalPriceText");
var totalPriceHidden = document.getElementById("totalPriceHidden");
var adultNumberValue = parseInt(adultNumberNode.value);
var ticketPrice = 129;
totalPriceHidden.value = ticketPrice * adultNumberValue;
totalPriceText.innerText = '$' + ticketPrice;
var currentTicketPrice = 10000;
for (var i = 0; i < venueList.length; i++) {
var venueNode = venueList[i];
venueNode.addEventListener('click', function (event) {
var currentTarget = event.currentTarget;
if (currentTarget.id === 'Khomloy') {
setKhomloyTicket();
}
if (currentTarget.id === 'Heritage') {
setHeritageTicket();
}
});
}
for (var i = 0; i < ticketTypeList.length; i++) {
var ticketTypeNode = ticketTypeList[i];
var dataPrice = parseInt(ticketTypeNode.getAttribute('data-price'));
if (ticketTypeNode.checked) {
currentTicketPrice = dataPrice;
calcTotalPrice(currentTicketPrice, adultNumberValue);
}
ticketTypeNode.addEventListener('click', function (event) {
var currentTarget = event.currentTarget;
var adultNumberValue = parseInt(adultNumberNode.value);
if (currentTarget.value === 'Premium+Transfer+Dinner') {
ticketPrice = 179;
} else if (currentTarget.value === 'Standard+Transfer+Dinner') {
ticketPrice = 129;
} else if (currentTarget.value === 'VIP+Transfer+Dinner') {
ticketPrice = 169;
}
var totalPrice = calcTotalPrice(ticketPrice, adultNumberValue);
totalPriceText.innerText = '$' + totalPrice;
totalPriceHidden.value = totalPrice;
currentTicketPrice = parseInt(currentTarget.getAttribute('data-price'));
adultNumberValue = parseInt(adultNumberNode.value);
calcTotalPrice(currentTicketPrice, adultNumberValue);
});
}
var ticketDateList = document.querySelectorAll("input[name='ticket_date']");
var ticketTypePremium = document.getElementById("ticket_type_premium");
var vipTypePremium = document.getElementById("vip_type_premium");
var ticketTypeStandard = document.getElementById("ticket_type_standard");
function setKhomloyTicket() {
ticket_type_premium_khomloy_div.style.display = '';
ticket_type_vip_khomloy_div.style.display = '';
ticket_type_standard_khomloy_div.style.display = '';
var premiumOption = document.getElementById("Premium");
var vipOption = document.getElementById("VIP");
var standardOption = document.getElementById("Standard");
ticket_type_premium_heritage_div.style.display = 'none';
ticket_type_vip_heritage_div.style.display = 'none';
var premiumTicketLeft = document.getElementById("premium_ticket_left");
var vipTicketLeft = document.getElementById("vip_ticket_left");
var standardTicketLeft = document.getElementById("standard_ticket_left");
setNovember16thTicketLeft();
ticket_date_november15th.style.display = '';
ticket_date_november16th.style.display = '';
for (var i = 0; i < ticketDateList.length; i++) {
var ticketDateNode = ticketDateList[i];
ticketDateNode.addEventListener('click', function (event) {
var currentTarget = event.currentTarget;
standardOption.checked = false;
vipOption.checked = false;
premiumOption.checked = false;
if (currentTarget.id === 'november15th') {
setNovember15thTicketLeft();
} else { // november16th
setNovember16thTicketLeft();
}
});
premium_khomloy_radio.checked = true;
currentTicketPrice = parseInt(premium_khomloy_radio.getAttribute('data-price'));
adultNumberValue = parseInt(adultNumberNode.value);
calcTotalPrice(currentTicketPrice, adultNumberValue);
}
function setNovember15thTicketLeft() {
ticketPrice = 0;
totalPriceText.innerText = '$0';
totalPriceHidden.value = 0;
standardOption.disabled = false;
vipOption.disabled = false;
premiumOption.disabled = false;
premiumTicketLeft.innerText = 'sold out';
vipTicketLeft.innerText = 'sold out';
standardTicketLeft.innerText = 'sold out';
}
function setHeritageTicket() {
ticket_type_premium_khomloy_div.style.display = 'none';
ticket_type_vip_khomloy_div.style.display = 'none';
ticket_type_standard_khomloy_div.style.display = 'none';
ticket_type_premium_heritage_div.style.display = '';
ticket_type_vip_heritage_div.style.display = '';
function setNovember16thTicketLeft() {
standardOption.disabled = false;
vipOption.disabled = false;
premiumOption.disabled = false;
premiumTicketLeft.innerText = 'sold out';
vipTicketLeft.innerText = 'sold out';
standardTicketLeft.innerText = 'sold out';
ticket_date_november15th.style.display = '';
ticket_date_november16th.style.display = 'none';
premium_heritage_radio.checked = true;
currentTicketPrice = parseInt(premium_heritage_radio.getAttribute('data-price'));
adultNumberValue = parseInt(adultNumberNode.value);
calcTotalPrice(currentTicketPrice, adultNumberValue);
}
var plusButton = document.getElementById("plusButton");
var minusButton = document.getElementById("minusButton");
plusButton.addEventListener('click', function (event) {
var adultNumberValue = parseInt(adultNumberNode.value) + 1;
adultNumberValue = parseInt(adultNumberNode.value) + 1;
adultNumberNode.value = adultNumberValue;
var totalPrice = calcTotalPrice(ticketPrice, adultNumberValue);
totalPriceText.innerText = '$' + totalPrice;
totalPriceHidden.value = totalPrice;
calcTotalPrice(currentTicketPrice, adultNumberValue);
});
minusButton.addEventListener('click', function (event) {
var beforeValue = parseInt(adultNumberNode.value);
if (beforeValue > 1) {
var adultNumberValue = beforeValue - 1;
adultNumberValue = beforeValue - 1;
adultNumberNode.value = adultNumberValue;
var totalPrice = calcTotalPrice(ticketPrice, adultNumberValue);
totalPriceText.innerText = '$' + totalPrice;
totalPriceHidden.value = totalPrice;
calcTotalPrice(currentTicketPrice, adultNumberValue);
}
});
</script>

@ -2,17 +2,39 @@
<div class="tmbottom">
<h3 style="font-size: 24px; line-height: 22px;">Chiang Mai CAD Yi Peng Festival 2024 - Secure Your Exclusive Tickets While You Can!</h3>
<form id='ticket_form' action="https://www.asiahighlights.com/orders/lantern_save" method="post" >
<p style="font-size: 22px;"><strong>Select Date:</strong></p>
<p style="font-size: 22px;"><strong>Select a Venue:</strong></p>
<div class="selectHotl" style="margin-bottom: 20px;">
<div class="optionLable">
<input type="radio" value="2024-11-15" id="november15th" name="ticket_date">
<input type="radio" value="CAD Khomloy Sky Lanterns Festival" checked id="Khomloy" name="Venue">
<label for="Khomloy">
<strong>CAD Khomloy Sky Lanterns Festival</strong>
<br>
The most spectacular one, over 8,000 seats
</label>
</div>
<div class="optionLable">
<input type="radio" value="Heritage Sky Lanterns Festival" id="Heritage" name="Venue">
<label for="Heritage">
<strong>Heritage Sky Lanterns Festival</strong>
<br>
The most cost-effective one, 4,500 seats
</label>
</div>
</div>
<p style="font-size: 22px;"><strong>Select Date:</strong></p>
<div class="selectHotl" style="margin-bottom: 20px;" id="ticket_date_november15th">
<div class="optionLable">
<input type="radio" value="2024-11-15" checked id="november15th" name="ticket_date">
<label for="november15th">
November 15th, 2024
</label>
</div>
<div class="optionLable">
<input type="radio" value="2024-11-16" checked id="november16th" name="ticket_date">
<div class="optionLable" id="ticket_date_november16th">
<input type="radio" value="2024-11-16" id="november16th" name="ticket_date">
<label for="november16th">
November 16th, 2024
</label>
@ -21,36 +43,54 @@
<p style="font-size: 22px;"><strong>Select an Available Ticket Type</strong></p>
<div class="selectHotl" style="margin-bottom: 20px;">
<div class="optionLable" id="ticket_type_premium">
<input type="radio" value="Premium+Transfer+Dinner" id="Premium" name="ticket_type">
<label for="Premium" style="font-size:18px;">
<div class="optionLable" id="ticket_type_premium_khomloy">
<input type="radio" value="Premium+Transfer+Dinner" checked id="premium_khomloy" data-price="179" name="ticket_type">
<label for="premium_khomloy" style="font-size:18px;">
Premium+Transfer+Dinner
<div class="selectionMemo">
US$179 (6400THB)
</div>
<div id='premium_ticket_left' style="display: none;">0 left</div>
</label>
</div>
<div class="optionLable" id="vip_type_premium">
<input type="radio" value="VIP+Transfer+Dinner" id="VIP" name="ticket_type">
<label for="VIP" style="font-size:18px;">
<div class="optionLable" id="ticket_type_vip_khomloy">
<input type="radio" value="VIP+Transfer+Dinner" id="vip_khomloy" data-price="169" name="ticket_type">
<label for="vip_khomloy" style="font-size:18px;">
VIP+Transfer+Dinner
<div class="selectionMemo">
US$169 (5900THB)
</div>
<div id='vip_ticket_left' style="display: none;">0 left</div>
</label>
</div>
<div class="optionLable" id="ticket_type_standard">
<input type="radio" value="Standard+Transfer+Dinner" checked id="Standard" name="ticket_type">
<label for="Standard" style="font-size:18px;">
<div class="optionLable" id="ticket_type_standard_khomloy">
<input type="radio" value="Standard+Transfer+Dinner" id="standard_khomloy" data-price="129" name="ticket_type">
<label for="standard_khomloy" style="font-size:18px;">
Standard+Transfer+Dinner
<div class="selectionMemo">
US$129 (4600THB)
</div>
<div id='standard_ticket_left' style="display: none;">0 left</div>
</label>
</div>
<div class="optionLable" id="ticket_type_premium_heritage" style="display: none;">
<input type="radio" value="Premium service+Exclusive Hotel Transfer+Dinner" id="premium_heritage" data-price="159" name="ticket_type">
<label for="premium_heritage" style="font-size:18px;">
Premium service+<strong>Exclusive Hotel Transfer</strong>+Dinner
<div class="selectionMemo">
US$159 (5500THB)
</div>
</label>
</div>
<div class="optionLable" id="ticket_type_vip_heritage" style="display: none;">
<input type="radio" value="VIP Service+Shuttle Transfer+Dinner" id="vip_heritage" data-price="109" name="ticket_type">
<label for="vip_heritage" style="font-size:18px;">
VIP Service+Shuttle Transfer+Dinner
<div class="selectionMemo">
US$109 (3900THB)
</div>
</label>
</div>
</div>
<div id="ticket_type_errmsg" style="display: none">
<div class="requiredArea" style="margin-top:-10px;">Please select at least one option.</div>
@ -72,14 +112,13 @@
<input class="minaddBtn addadult" id='plusButton' type="button" value="+">
</div>
</div>
<p style="display: inline-block;">Children under 8 years old enter free; 8-year-olds and above are charged the same as adults. You can buy a ticket for your child under 8 if you would like her or him to enjoy the same provision.</p>
<div class="payonline_price">Total price: <strong id="totalPriceText">$129</strong></div>
<p style="margin-top: 50px;"><strong>Please provide correct personal information for your ticket
booking. Double
check.</strong></p>
<input class="FullName" id="ticket_realname" name="fullname"
placeholder="Your name * (exactly as in your passport)" required="" type="text" value="" />
placeholder="Your name * (exactly per passport)" required="" type="text" value="" />
<div id="ticket_realname_errmsg" style="display: none">
<div class="requiredArea" style="margin-top:-10px;">Please enter your name.</div>
</div>
@ -349,11 +388,7 @@
<div id="ticket_contact_errmsg" style="display: none">
<div class="requiredArea" style="margin-top:-10px;">Please enter your phone number.</div>
</div>
<textarea name="other_travelers_names" placeholder="For booking two/or more tickets, please fill in other traveler name(s) here: (per passport, e.g. Smith Sarah Jean)"></textarea>
<textarea name="additional_requirements"
placeholder="If you have other requirements such as hotel booking, customized guided tour, private transport, or a full tour package, please let us know .... (optional)"
></textarea>
<textarea name="other_travelers_names" placeholder="If booking two or more tickets,please fill in other traveler name(s) here:(per passport, e.g.Smith Sarah Jean)."></textarea>
<p style="
margin-top: 0;
margin-bottom: 10px;
@ -386,113 +421,125 @@
<input name="itinerary" type="hidden" value="<?php echo $information->ic_title; ?>" />
<button class="sendButton" id="submit_ticket_button" name="submit_ticket_form"
type="button">Proceed to Payment</button>
<p style=" text-align: center;
font-style: italic;
margin-top: -15px;
line-height: 20px;"><strong>Once we receive your payment, our travel advisor will contact you within 24 hours and send you your e-ticket.</strong></p>
</form>
</div>
<script>
function calcTotalPrice(ticketPrice, adultNumber) {
var totalPrice = ticketPrice * adultNumber;
if (adultNumber >= 10) {
totalPrice = totalPrice * 0.95;
}
return totalPrice.toFixed(2);
totalPrice = totalPrice.toFixed(2);
totalPriceHidden.value = totalPrice;
totalPriceText.innerText = '$' + totalPrice;
}
var adultNumberNode = document.getElementById("adultNumberValue");
var ticketDateList = document.querySelectorAll("input[name='ticket_date']");
var ticketTypeList = document.querySelectorAll("input[name='ticket_type']");
var ticket_type_premium_khomloy_div = document.getElementById("ticket_type_premium_khomloy");
var ticket_type_vip_khomloy_div = document.getElementById("ticket_type_vip_khomloy");
var ticket_type_standard_khomloy_div = document.getElementById("ticket_type_standard_khomloy");
var ticket_type_premium_heritage_div = document.getElementById("ticket_type_premium_heritage");
var ticket_type_vip_heritage_div = document.getElementById("ticket_type_vip_heritage");
var premium_khomloy_radio = document.getElementById("premium_khomloy");
var premium_heritage_radio = document.getElementById("premium_heritage");
var ticket_date_november15th = document.getElementById("ticket_date_november15th");
var ticket_date_november16th = document.getElementById("ticket_date_november16th");
var venueList = document.querySelectorAll("input[name='Venue']");
var totalPriceText = document.getElementById("totalPriceText");
var totalPriceHidden = document.getElementById("totalPriceHidden");
var adultNumberValue = parseInt(adultNumberNode.value);
var ticketPrice = 129;
totalPriceHidden.value = ticketPrice * adultNumberValue;
totalPriceText.innerText = '$' + ticketPrice;
var currentTicketPrice = 10000;
for (var i = 0; i < venueList.length; i++) {
var venueNode = venueList[i];
venueNode.addEventListener('click', function (event) {
var currentTarget = event.currentTarget;
if (currentTarget.id === 'Khomloy') {
setKhomloyTicket();
}
if (currentTarget.id === 'Heritage') {
setHeritageTicket();
}
});
}
for (var i = 0; i < ticketTypeList.length; i++) {
var ticketTypeNode = ticketTypeList[i];
var dataPrice = parseInt(ticketTypeNode.getAttribute('data-price'));
if (ticketTypeNode.checked) {
currentTicketPrice = dataPrice;
calcTotalPrice(currentTicketPrice, adultNumberValue);
}
ticketTypeNode.addEventListener('click', function (event) {
var currentTarget = event.currentTarget;
var adultNumberValue = parseInt(adultNumberNode.value);
if (currentTarget.value === 'Premium+Transfer+Dinner') {
ticketPrice = 179;
} else if (currentTarget.value === 'Standard+Transfer+Dinner') {
ticketPrice = 129;
} else if (currentTarget.value === 'VIP+Transfer+Dinner') {
ticketPrice = 169;
}
var totalPrice = calcTotalPrice(ticketPrice, adultNumberValue);
totalPriceText.innerText = '$' + totalPrice;
totalPriceHidden.value = totalPrice;
currentTicketPrice = parseInt(currentTarget.getAttribute('data-price'));
adultNumberValue = parseInt(adultNumberNode.value);
calcTotalPrice(currentTicketPrice, adultNumberValue);
});
}
var ticketDateList = document.querySelectorAll("input[name='ticket_date']");
var ticketTypePremium = document.getElementById("ticket_type_premium");
var vipTypePremium = document.getElementById("vip_type_premium");
var ticketTypeStandard = document.getElementById("ticket_type_standard");
function setKhomloyTicket() {
ticket_type_premium_khomloy_div.style.display = '';
ticket_type_vip_khomloy_div.style.display = '';
ticket_type_standard_khomloy_div.style.display = '';
var premiumOption = document.getElementById("Premium");
var vipOption = document.getElementById("VIP");
var standardOption = document.getElementById("Standard");
ticket_type_premium_heritage_div.style.display = 'none';
ticket_type_vip_heritage_div.style.display = 'none';
var premiumTicketLeft = document.getElementById("premium_ticket_left");
var vipTicketLeft = document.getElementById("vip_ticket_left");
var standardTicketLeft = document.getElementById("standard_ticket_left");
setNovember16thTicketLeft();
ticket_date_november15th.style.display = '';
ticket_date_november16th.style.display = '';
for (var i = 0; i < ticketDateList.length; i++) {
var ticketDateNode = ticketDateList[i];
ticketDateNode.addEventListener('click', function (event) {
var currentTarget = event.currentTarget;
standardOption.checked = false;
vipOption.checked = false;
premiumOption.checked = false;
if (currentTarget.id === 'november15th') {
setNovember15thTicketLeft();
} else { // november16th
setNovember16thTicketLeft();
}
});
premium_khomloy_radio.checked = true;
currentTicketPrice = parseInt(premium_khomloy_radio.getAttribute('data-price'));
adultNumberValue = parseInt(adultNumberNode.value);
calcTotalPrice(currentTicketPrice, adultNumberValue);
}
function setNovember15thTicketLeft() {
ticketPrice = 0;
totalPriceText.innerText = '$0';
totalPriceHidden.value = 0;
standardOption.disabled = false;
vipOption.disabled = false;
premiumOption.disabled = false;
premiumTicketLeft.innerText = 'sold out';
vipTicketLeft.innerText = 'sold out';
standardTicketLeft.innerText = 'sold out';
}
function setHeritageTicket() {
ticket_type_premium_khomloy_div.style.display = 'none';
ticket_type_vip_khomloy_div.style.display = 'none';
ticket_type_standard_khomloy_div.style.display = 'none';
ticket_type_premium_heritage_div.style.display = '';
ticket_type_vip_heritage_div.style.display = '';
function setNovember16thTicketLeft() {
standardOption.disabled = false;
vipOption.disabled = false;
premiumOption.disabled = false;
premiumTicketLeft.innerText = 'sold out';
vipTicketLeft.innerText = 'sold out';
standardTicketLeft.innerText = 'sold out';
ticket_date_november15th.style.display = '';
ticket_date_november16th.style.display = 'none';
premium_heritage_radio.checked = true;
currentTicketPrice = parseInt(premium_heritage_radio.getAttribute('data-price'));
adultNumberValue = parseInt(adultNumberNode.value);
calcTotalPrice(currentTicketPrice, adultNumberValue);
}
var plusButton = document.getElementById("plusButton");
var minusButton = document.getElementById("minusButton");
plusButton.addEventListener('click', function (event) {
var adultNumberValue = parseInt(adultNumberNode.value) + 1;
adultNumberValue = parseInt(adultNumberNode.value) + 1;
adultNumberNode.value = adultNumberValue;
var totalPrice = calcTotalPrice(ticketPrice, adultNumberValue);
totalPriceText.innerText = '$' + totalPrice;
totalPriceHidden.value = totalPrice;
calcTotalPrice(currentTicketPrice, adultNumberValue);
});
minusButton.addEventListener('click', function (event) {
var beforeValue = parseInt(adultNumberNode.value);
if (beforeValue > 1) {
var adultNumberValue = beforeValue - 1;
adultNumberValue = beforeValue - 1;
adultNumberNode.value = adultNumberValue;
var totalPrice = calcTotalPrice(ticketPrice, adultNumberValue);
totalPriceText.innerText = '$' + totalPrice;
totalPriceHidden.value = totalPrice;
calcTotalPrice(currentTicketPrice, adultNumberValue);
}
});
</script>

@ -2,7 +2,7 @@
<div class="mbottom30 TA_box">
<div id="TA_selfserveprop869" class="TA_selfserveprop">
<ul id="nIy5GW" class="TA_links mzjWpb">
<li id="njsYKpl5CGUI" class="HvAhA1TDlL"><a target="_blank" href="https://www.tripadvisor.com/Attraction_Review-g294212-d4006739-Reviews-The_Trippest_Mini_Group_Tours-Beijing.html" rel="nofollow"><img src="https://www.tripadvisor.com/img/cdsi/img2/branding/v2/Tripadvisor_lockup_horizontal_secondary_registered-11900-2.svg" alt="TripAdvisor" width="150px" /></a></li>
<li id="njsYKpl5CGUI" class="HvAhA1TDlL"><a target="_blank" href="https://www.tripadvisor.com/Attraction_Review-g294212-d4006739-Reviews-The_Trippest_Mini_Group_Tours-Beijing.html"><img src="https://www.tripadvisor.com/img/cdsi/img2/branding/v2/Tripadvisor_lockup_horizontal_secondary_registered-11900-2.svg" alt="TripAdvisor" width="150px" /></a></li>
</ul>
</div>
<script async src="https://www.jscache.com/wejs?wtype=selfserveprop&amp;uniq=869&amp;locationId=4006739&amp;lang=en_US&amp;rating=true&amp;nreviews=4&amp;writereviewlink=true&amp;popIdx=true&amp;iswide=true&amp;border=true&amp;display_version=2" data-loadtrk onload="this.loadtrk=true"></script>
@ -289,11 +289,6 @@
}
});
$(".inquirybutton").click(function(e){
const element = document.getElementById("inquirybutton");
element.scrollIntoView({ behavior: 'smooth' });
})
})
function CheckSubmit(){

@ -234,10 +234,6 @@
id="culture_clothes">Chinese Clothes</a></li>
<li class="start-nav-item"><a href="/travelguide/kungfu/" id="culture_kungfu">Chinese Kung
Fu</a></li>
<li class="start-nav-item"><a href="/zodiac-signs/" id="culture_zodiac_signs">Zodiac
Signs</a></li>
<li class="start-nav-item"><a href="/travelguide/culture/dream-meanings.htm"
id="culture_dream_meanings">Dream Meanings</a></li>
<li class="start-nav-item start-nav-item-last"><a href="/palm-reading/"
id="culture_palm_reading">Palm Reading</a></li>

@ -29,7 +29,7 @@
</div>
<div id="aR_tr" class="addTr">
<div class="searchBtn"><button type="submit" name="button" id="SearchTrainButton" value="" class="searchButtonLong">SEARCH</button>
<a class="shopcart hidden-xs" rel="nofollow" target="blank" href="https://biz.chinahighlights.com/china-trains/shopcart.asp" ><span id="shoppingnum" class="shopping-num default">0</span>Cart <i class="downarrow"></i></a>
<a class="shopcart hidden-xs" href="https://biz.chinahighlights.com/china-trains/shopcart.asp" ><span id="shoppingnum" class="shopping-num default">0</span>Cart <i class="downarrow"></i></a>
</div>
</div>

@ -273,10 +273,6 @@
id="culture_clothes_mobile">Chinese Clothes</a></li>
<li class="menu__item" role="menuitem"><a class="menu__link" href="/travelguide/kungfu/"
id="culture_kungfu_mobile">Chinese Kung Fu</a></li>
<li class="menu__item" role="menuitem"><a class="menu__link" href="/zodiac-signs/"
id="culture_zodiac_signs_mobile">Zodiac Signs</a></li>
<li class="menu__item" role="menuitem"><a class="menu__link" href="/travelguide/culture/dream-meanings.htm"
id="culture_dream_meanings_mobile">Dream Meanings</a></li>
<li class="menu__item" role="menuitem"><a class="menu__link" href="/palm-reading/"
id="culture_palm_reading_mobile">Palm Reading</a></li>
</ul>
@ -328,7 +324,6 @@
<li class="menu__item" role="menuitem"><a
href="https://www.asiahighlights.com/caucasus-central-asia/tours/kyrgyzstan-uzbekistan-turkmenistan" rel="nofollow"
class="menu__link" target="_blank">China-Kyrgyzstan-Uzbekistan-Turkmenistan</a></li>
</ul>
</div>

Loading…
Cancel
Save