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

hotfix/paypal-note
赵鹏 3 years ago
commit 2e95d10395

@ -519,8 +519,9 @@ class Info_amp extends CI_Controller
{ {
$json = $this->input->get_post('json'); $json = $this->input->get_post('json');
$icid = $this->input->get_post('icid'); $icid = $this->input->get_post('icid');
$action = $this->input->get_post('action') ? '_' . $this->input->get_post('action') : '';
if ($json && $icid) { if ($json && $icid) {
$code = $this->Logs_model->backup_meta($icid, $json, 'AMP_HISTORY'); $code = $this->Logs_model->backup_meta($icid, $json, 'AMP_HISTORY' . $action);
echo json_encode(array( echo json_encode(array(
"succ" => true, "succ" => true,
"info" => $this->Logs_model->pick_backup_meta($code) "info" => $this->Logs_model->pick_backup_meta($code)

@ -689,6 +689,9 @@ class Information extends CI_Controller
array('information' => $information), array('information' => $information),
true); true);
$template = str_replace('<!--@INFO-TOP-IMAGE@-->', $article_top_image_content, $template); $template = str_replace('<!--@INFO-TOP-IMAGE@-->', $article_top_image_content, $template);
$info_page_form_content = $this->load->view($template_path . '-info-page-form', false, true);
$information->ic_content = str_replace('<!--@INFO-PAGE-FORM@-->', $info_page_form_content, $information->ic_content);
} else { } else {
$template = str_replace('<!--@PRODUCT-JS@-->', '<script src="https://data.chinahighlights.com/js/flatpickr.js"></script>', $template); $template = str_replace('<!--@PRODUCT-JS@-->', '<script src="https://data.chinahighlights.com/js/flatpickr.js"></script>', $template);
$inquiry_form_template = $this->load->view($template_path . '-inquiry-form', array('meta_product_code' => $meta_product_code), true); $inquiry_form_template = $this->load->view($template_path . '-inquiry-form', array('meta_product_code' => $meta_product_code), true);
@ -1050,6 +1053,8 @@ class Information extends CI_Controller
$template_path . '-why-us-covid-mobile', array(), true); $template_path . '-why-us-covid-mobile', array(), true);
$information->ic_content = str_replace('<!--@WHY-US-COVID-MOBILE@-->', $why_us_covid_list_mobile, $information->ic_content); $information->ic_content = str_replace('<!--@WHY-US-COVID-MOBILE@-->', $why_us_covid_list_mobile, $information->ic_content);
$info_page_form_content = $this->load->view($template_path . '-info-page-form', false, true);
$information->ic_content = str_replace('<!--@INFO-PAGE-FORM@-->', $info_page_form_content, $information->ic_content);
if (is_file('D:/wwwroot/origin-www.globalhighlights.com/css/gh-global.css')) {//主样式表,内联模式,优先读取本地,没有在从网络读取,为了加速 if (is_file('D:/wwwroot/origin-www.globalhighlights.com/css/gh-global.css')) {//主样式表,内联模式,优先读取本地,没有在从网络读取,为了加速
$main_css_string = compress_css(file_get_contents('D:/wwwroot/origin-www.globalhighlights.com/css/gh-global.css')); $main_css_string = compress_css(file_get_contents('D:/wwwroot/origin-www.globalhighlights.com/css/gh-global.css'));

@ -8,7 +8,8 @@
<h3 style="text-align: center; font-size: 20px; line-height: 22px;">Start planning your tailor-made tour now. Your 1:1 travel consultant will reply within 1 working day.</h3> <h3 style="text-align: center; font-size: 20px; line-height: 22px;">Start planning your tailor-made tour now. Your 1:1 travel consultant will reply within 1 working day.</h3>
<form action="/orders/quick_inquiry_save" method="post" novalidate="" onsubmit="return validateQuickInquiryForm()"><input class="FullName" id="realname" name="name" placeholder="Your name" required="" type="text" value="" /> <form action="/orders/quick_inquiry_save" method="post" novalidate="" onsubmit="return validateQuickInquiryForm()">
<input class="FullName" id="realname" name="name" placeholder="Your name" required="" type="text" value="" />
<div id="realname_errmsg" style="display: none"> <div id="realname_errmsg" style="display: none">
<div class="requiredArea" style="margin-top:-10px;">Please enter your name</div> <div class="requiredArea" style="margin-top:-10px;">Please enter your name</div>
</div> </div>
@ -20,7 +21,7 @@
<div id="email_verify_errmsg" style="display: none"> <div id="email_verify_errmsg" style="display: none">
<div class="requiredArea" style="margin-top:-10px;">Please verify your email</div> <div class="requiredArea" style="margin-top:-10px;">Please verify your email</div>
</div> </div>
<input class="InquiryCalendar datepicker flatpickr-input" id="starting_date" name="starting_date" placeholder="Starting date" readonly="readonly" type="hidden" value="" /><input class="InquiryCalendar datepicker form-control input" placeholder="Starting date" readonly="readonly" tabindex="0" type="text" /> <input class="InquiryCalendar" id="starting_date" name="starting_date" placeholder="Starting date" readonly="readonly" />
<div id="starting_date_errmsg" style="display: none"> <div id="starting_date_errmsg" style="display: none">
<div class="requiredArea" style="margin-top:-10px;">Please enter your starting date</div> <div class="requiredArea" style="margin-top:-10px;">Please enter your starting date</div>
</div> </div>
@ -29,4 +30,54 @@
<input name="ic_title" type="hidden" value="YDFW-AH" /> <input name="ic_title" type="hidden" value="YDFW-AH" />
</form> </form>
</div> </div>
<script src="https://data.chinahighlights.com/js/flatpickr-4.6.1.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', () => {
flatpickr("#starting_date", {
dateFormat: "Y-m-d",
altInput: true,
altFormat: "F j, Y",
disableMobile: true,
minDate: "today"
});
});
function validateQuickInquiryForm() {
var result = true;
var realnameVal = document.getElementById("realname").value;
var emailVal = document.getElementById("email").value;
var startingDateVal = document.getElementById("starting_date").value;
var realnameErrEl = document.getElementById("realname_errmsg");
var emailErrEl = document.getElementById("email_errmsg");
var emailVerifyErrEl = document.getElementById("email_verify_errmsg");
var startingDateErrEl = document.getElementById("starting_date_errmsg");
realnameErrEl.style.display = 'none';
emailErrEl.style.display = 'none';
emailVerifyErrEl.style.display = 'none';
startingDateErrEl.style.display = 'none';
if (realnameVal === '') {
realnameErrEl.style.display = '';
result = false;
}
if (emailVal === '') {
emailErrEl.style.display = '';
result = false;
} else {
var emailPattern = /^[\w\-\.]+@[\w\-\.]+(\.\w+)+$/;
if (!emailPattern.test(emailVal)) {
emailVerifyErrEl.style.display = '';
result = false;
}
}
if (startingDateVal === '') {
startingDateErrEl.style.display = '';
result = false;
}
return result;
}
</script>

@ -18,4 +18,53 @@
<input name="nullemail" type="hidden"> <input name="cli_no" type="hidden" value="YDFW"><button class="sendButton" id="quick_inquiry_button" name="quick_inquiry_button" type="submit">Send My Inquiry</button></div> <input name="nullemail" type="hidden"> <input name="cli_no" type="hidden" value="YDFW"><button class="sendButton" id="quick_inquiry_button" name="quick_inquiry_button" type="submit">Send My Inquiry</button></div>
</form> </form>
</div> </div>
<script src="https://data.chinahighlights.com/js/flatpickr-4.6.1.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', () => {
flatpickr("#starting_date", {
dateFormat: "Y-m-d",
altInput: true,
altFormat: "F j, Y",
disableMobile: true,
minDate: "today"
});
});
function validateQuickInquiryForm() {
var result = true;
var realnameVal = document.getElementById("realname").value;
var emailVal = document.getElementById("email").value;
var startingDateVal = document.getElementById("starting_date").value;
var startingDateErrEl = document.getElementById("starting_date_errmsg");
var realnameErrEl = document.getElementById("realname_errmsg");
var emailErrEl = document.getElementById("email_errmsg");
var emailVerifyErrEl = document.getElementById("email_verify_errmsg");
if (realnameErrEl) realnameErrEl.style.display = 'none';
if (emailErrEl) emailErrEl.style.display = 'none';
if (emailVerifyErrEl) emailVerifyErrEl.style.display = 'none';
if (startingDateErrEl) startingDateErrEl.style.display = 'none';
if (realnameVal === '') {
realnameErrEl.style.display = '';
result = false;
}
if (emailVal === '') {
emailErrEl.style.display = '';
result = false;
} else {
var emailPattern = /^[\w\-\.]+@[\w\-\.]+(\.\w+)+$/;
if (!emailPattern.test(emailVal) && emailVerifyErrEl) {
emailVerifyErrEl.style.display = '';
result = false;
}
}
if (startingDateVal === '') {
startingDateErrEl.style.display = '';
result = false;
}
return result;
}
</script>

@ -23,7 +23,7 @@
<input name="nullemail" placeholder="Your alternative email?" type="hidden"> <input name="nullemail" placeholder="Your alternative email?" type="hidden">
<input id="url" name="url" type="hidden"> <input id="url" name="url" type="hidden">
<!--@INPUT_PRODUCT_CODE@--> <!--@INPUT_PRODUCT_CODE@-->
<input id="sourcetype" name="sourcetype" type="hidden" value="YDFW-GH"> <input id="sourcetype" name="sourcetype" type="hidden" value="32113">
<button class="sendButton" type="submit"> <button class="sendButton" type="submit">
Send My Inquiry Send My Inquiry
</button> </button>

Loading…
Cancel
Save