diff --git a/.htaccess b/.htaccess index 2b6e4b75..62adce5b 100644 --- a/.htaccess +++ b/.htaccess @@ -34,8 +34,8 @@ RewriteRule ^/(tours|vietnam|guide|cambodia|laos|myanmar|thailand|southeast-asia #orders RewriteRule ^/create-my-trip.htm$ /index.php/orders/tailormade/ [U,L] -RewriteRule ^/orders/triprequest.htm$ /index.php/orders/triprequest/ [U,L] -RewriteRule ^/orders/lantern_form$ /index.php/orders/lantern_form/ [U,L] +RewriteRule ^/orders/triprequest.htm$ /index.php/forms/triprequest/ [U,L] +RewriteRule ^/forms/lantern_form$ /index.php/forms/lantern_form/ [U,L] RewriteRule ^/orders/(lantern_save|tailormade_thankyou|tailormade_save|contactus_save|contactus_thankyou|asia_tour|asia_tour_save|asia_tour_thankyou|ch_tailormade_save|triprequest_save)$ /index.php/orders/$1 [U,L] RewriteRule ^/orders/inquiry_thankyou$ /index.php/orders/tailormade_thankyou [U,L] diff --git a/application/controllers/forms.php b/application/controllers/forms.php new file mode 100644 index 00000000..82aee2e1 --- /dev/null +++ b/application/controllers/forms.php @@ -0,0 +1,82 @@ +load->model('Orders_model'); + } + + //水灯节表单 + public function lantern_form(){ + $data = array(); + $data['location'] = $this->input->get_post('location'); + $data['TicketStandard'] = $this->input->get_post('TicketStandard'); + $data['ticketonlyselection'] = $this->input->get_post('ticketonlyselection'); + $data['date'] = $this->input->get_post('date'); + $data['travelNumber'] = $this->input->get_post('travelNumber'); + $data['totalprice'] = $this->input->get_post('totalprice'); + + $this->load->view('header'); + $this->load->view('orders/lantern_form',$data); + $this->load->view('footer'); + } + + //tailormade和产品页面 + public function triprequest($third_part_code = '') { + $data = array(); + $cli_sn = $this->input->get_post('cli_sn'); + $data['countrylist'] = ['Vietnam','Cambodia','India','Thailand','Myanmar','Japan','Laos','Nepal','Sri Lanka','China','Mongolia','Indonesia']; + if($cli_sn){ + $data['countryarr'] = array(); + $obj = $this->Orders_model->get_country($cli_sn); + foreach ($obj as $value){ + array_push($data['countryarr'],$value->CountryName); + } + $data['ic_title'] = $this->input->get_post('ic_title'); + $data['cli_no'] = $this->input->get_post('cli_no'); + $data['cli_sn'] = $cli_sn; + $data['cli_days'] = $this->input->get_post('cli_days'); + }else{ + $data['countryarr'] = []; + } + $data['action'] = '/orders/triprequest_save'; + $data['seo_title'] = "Create my trip | Asia Highlights"; + //$data['seo_keywords'] = $data['detail']->ic_seo_keywords; + //$data['seo_description'] = $data['detail']->ic_seo_description; + + $this->load->view('header', $data); + $this->load->view('orders/form-advanced'); + $this->load->view('footer'); + } + + //inquiry 表单移动端 + public function inquirymobile(){ + $data = array(); + $cli_sn = $this->input->get_post('cli_sn'); + $data['countrylist'] = ['Vietnam','Cambodia','India','Thailand','Myanmar','Japan','Laos','Nepal','Sri Lanka','China','Mongolia','Indonesia']; + if($cli_sn){ + $data['countryarr'] = array(); + $obj = $this->Orders_model->get_country($cli_sn); + foreach ($obj as $value){ + array_push($data['countryarr'],$value->CountryName); + } + $data['ic_title'] = $this->input->get_post('ic_title'); + }else{ + $data['countryarr'] = []; + } + $data['action'] = '/orders/triprequest_save'; + $data['seo_title'] = "Create my trip | Asia Highlights"; + //$data['seo_keywords'] = $data['detail']->ic_seo_keywords; + //$data['seo_description'] = $data['detail']->ic_seo_description; + + $this->load->view('header', $data); + $this->load->view('orders/inquiry_mobile'); + $this->load->view('footer'); + } + + +} \ No newline at end of file diff --git a/application/controllers/orders.php b/application/controllers/orders.php index d18acfe9..02ce6bd5 100644 --- a/application/controllers/orders.php +++ b/application/controllers/orders.php @@ -14,47 +14,6 @@ class Orders extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('Orders_model'); - - //第三合作网站配置 - $this->third_part = array( - 'EXPCH' => array( - 'url' => 'www.experienciaenchina.com', - 'email' => 'experienciaenchina@gmail.com' - ), - 'MESENLLA' => array( - 'url' => 'mesenlla.es', - 'email' => 'lmrcits@163.com' - ), - 'wayaway' => array( - 'url' => 'www.way-away.es', - 'email' => 'lmrcits@163.com' - ), - 'traba' => array( - 'url' => 'trabajoenchina.org', - 'email' => 'lmrcits@163.com' - ), - 'guias' => array( - 'url' => 'http://guias-viajar.com/china/', - 'email' => 'lmrcits@163.com' - ), - 'sapor' => array( - 'url' => 'http://www.saporedicina.com/es/viajar-en-tren-por-china/', - 'email' => 'lmrcits@163.com' - ), - 'saporit' => array( - 'url' => 'http://www.saporedicina.com/', - 'email' => 'lmrcits@163.com' - ), - 'ctooles' => array( - 'url' => 'http://www.chinese-tools.com/', - 'email' => 'lmrcits@163.com' - ), - 'ctoolfr' => array( - 'url' => 'http://www.chinese-tools.com/', - 'email' => 'lmrcits@163.com' - ) - ); - $this->site_code = strtolower($this->config->item('Site_Code')); //屏蔽掉非法IP49.157.0.226 if($this->input->ip_address() == '116.93.127.114' || $this->input->ip_address() == '116.202.14.3'){ @@ -67,23 +26,9 @@ class Orders extends CI_Controller { redirect(); } - //水灯节表单 - public function lantern_form(){ - $data = array(); - $data['ticketType'] = $this->input->get_post('TicketType'); - $data['TicketStandard'] = $this->input->get_post('TicketStandard'); - $data['ticketonlyselection'] = $this->input->get_post('ticketonlyselection'); - $data['date'] = $this->input->get_post('date'); - $data['travelNumber'] = $this->input->get_post('travelNumber'); - - $this->load->view('header'); - $this->load->view('orders/lantern_form',$data); - $this->load->view('footer'); - } - //水灯节表单入库 public function lantern_save() { - $this->form_validation->set_rules('Firstname', 'lang:Firstname', 'required'); + $this->form_validation->set_rules('fullname', 'lang:Firstname', 'required'); $this->form_validation->set_rules('email', 'lang:email', 'required|valid_email'); if ($this->form_validation->run() == false) { send_404(); @@ -144,9 +89,9 @@ class Orders extends CI_Controller { $this->Orders_model->COLI_ChildNum = $this->input->post('child_number'); $this->Orders_model->MEI_MailList = $this->input->post('email'); - $this->Orders_model->MEI_FirstName = $this->input->post('Firstname'); - $this->Orders_model->MEI_LastName = $this->input->post('Lastname'); - $fullname = $this->input->post('Firstname').$this->input->post('Lastname'); + $this->Orders_model->MEI_FirstName = $this->input->post('fullname'); + $this->Orders_model->MEI_LastName = $this->input->post('fullname'); + $fullname = $this->input->post('fullname'); $this->Orders_model->MEI_Nationality = $this->Orders_model->GetNationalityID($this->input->post('Nationality')); $this->Orders_model->COLI_ProductSN = $this->input->post('cli_sn'); @@ -163,42 +108,21 @@ class Orders extends CI_Controller { $this->Orders_model->SendMail($fullname, $this->input->post('email'), $this->config->item('Site_ServiceName'), $this->config->item('Site_ServiceEmail'),$emailtitle , $this->Orders_model->COLI_OrderDetailText); //发送邮件给客人 (20160504tailor_make) $this->Orders_model->SendMail($this->config->item('Site_ServiceName'), $this->config->item('Site_ServiceEmail'), $fullname, $this->input->post('email'), $emailtitle, $this->load->view('orders/newemail_template', '', true)); - - //价格计算后转到支付中心 - - //跳转到thankyou页面 - redirect(site_url('orders/asia_tour_thankyou')); + + //生成支付链接 + $this->load->library('Currency'); + $addurl = ''; + $totalprice = $this->input->post('totalprice'); + $total_rmb = $this->currency->get_USD_RMB_SUM($totalprice); + $signstr = 'currency=USD&order_id='.$this->Orders_model->COLI_ID.'_T&rmb_amount='.$total_rmb.'&total_amount='.$totalprice.'&key=7a46484300f04031b42fdd44559578e4'; + $sign = md5($signstr); + $addurl .= base64_encode('order_id='.$this->Orders_model->COLI_ID.'_T&subject=Booking Lantern Festival Tickets&body=Booking Lantern Festival Tickets&total_amount='.$totalprice.'¤cy=USD&rmb_amount='.$total_rmb.'&sign='.$sign.'&return_url=https://www.asiahighlights.com/orders/inquiry_thankyou'); + $payurl = 'https://secure.chinahighlights.com/pay/paymentservice/?'.$addurl; + //跳转到thankyou页面 + redirect($payurl); } } - //新版tailormade和产品页面 - public function triprequest($third_part_code = '') { - $data = array(); - $cli_sn = $this->input->get_post('cli_sn'); - $data['countrylist'] = ['Vietnam','Cambodia','India','Thailand','Myanmar','Japan','Laos','Nepal','Sri Lanka','China','Mongolia','Indonesia']; - if($cli_sn){ - $data['countryarr'] = array(); - $obj = $this->Orders_model->get_country($cli_sn); - foreach ($obj as $value){ - array_push($data['countryarr'],$value->CountryName); - } - $data['ic_title'] = $this->input->get_post('ic_title'); - $data['cli_no'] = $this->input->get_post('cli_no'); - $data['cli_sn'] = $cli_sn; - $data['cli_days'] = $this->input->get_post('cli_days'); - }else{ - $data['countryarr'] = []; - } - $data['action'] = '/orders/triprequest_save'; - $data['seo_title'] = "Create my trip | Asia Highlights"; - //$data['seo_keywords'] = $data['detail']->ic_seo_keywords; - //$data['seo_description'] = $data['detail']->ic_seo_description; - - $this->load->view('header', $data); - $this->load->view('orders/form-advanced'); - $this->load->view('footer'); - } - //新版tailormade入库程序 public function triprequest_save() { //$this->form_validation->set_rules('Destination', 'lang:Destination', 'required'); @@ -467,21 +391,6 @@ class Orders extends CI_Controller { $this->load->view('orders/r_thankyou/' . $this->site_code, $data); } - /** - * - * 联系我们 - * @author lmr - * - */ - public function contactus() { - //初始化html结构 - $data = array(); - $this->html_do->head($data, 'r'); - $this->load->view('orders/contact_us/' . $this->site_code, $data); - $this->html_do->foot($data, 'r'); - $this->output->cache(10086); - } - /** * * 联系我们订单入库 @@ -723,127 +632,6 @@ class Orders extends CI_Controller { $this->load->view('footer'); } - public function tailormade($third_part_code = '') { - $data = array(); - $data['anum'] = $this->input->post('anum', true); - $data['bnum'] = $this->input->post('bnum', true); - $data['cnum'] = $this->input->post('cnum', true); - $data['aq'] = $this->input->post('aq', true); - $data['date'] = $this->input->post('date', true); - $data['email'] = $this->input->post('email', true); - $data['realname'] = $this->input->post('realname', true); - $data['third_part_code'] = $third_part_code; - $data['seo_title'] = "Create a unique trip | Ease of Planning | Asia Highlights"; - // $data['seo_keywords'] = $data['detail']->ic_seo_keywords; - // $data['seo_description'] = $data['detail']->ic_seo_description; - $this->load->view('header', $data); - $this->load->view('orders/tailor_make'); - $this->load->view('footer'); - } - - public function tailormade_save() { - $this->form_validation->set_rules('realname', 'lang:realname', 'required'); - $this->form_validation->set_rules('nationality', 'lang:nationality', 'required'); - $this->form_validation->set_rules('email', 'lang:email', 'required|valid_email'); - $this->form_validation->set_rules('additionalrequirements', 'lang:additionalrequirements', 'required'); - $this->form_validation->set_rules('hotel', 'lang:hotel', 'required'); - $this->form_validation->set_rules('cli_tourdays', 'lang:cli_tourdays', 'required'); - if ($this->form_validation->run() == false) { - $data = array(); - foreach ($this->form_validation->_error_array as $key => $value) { - $data[] = array('name' => $key, 'value' => $value); - } - if ($this->input->post('no_ajax')) { - $vali_string = ''; - foreach ($data as $v) { - $vali_string .= $v['name'] . ' => ' . $v['value'] . ' '; - } - echo(''); - } else { - echo json_encode($data); - } - } else { - $this->Orders_model->COLI_ID = $this->Orders_model->MakeOrderNumber(); - $this->Orders_model->COLI_SenderIP = $this->input->ip_address(); - $this->Orders_model->COLI_OrderDetailText = ReplaceFieldName($_POST); - $this->Orders_model->COLI_Servicetype = 'T'; - $this->Orders_model->COLI_sourcetype = '32003'; - - //HT订单跟踪代码 - $COOKIE_inquireTrackFrom = get_cookie('inquireTrackFrom'); - if (!empty($COOKIE_inquireTrackFrom) && is_numeric($COOKIE_inquireTrackFrom)) { - $this->Orders_model->COLI_sourcetype = (int) $COOKIE_inquireTrackFrom; - delete_cookie('inquireTrackFrom'); - } - //Trace GOOGLE - $COOKIE_inquireTrackGoogle = get_cookie('inquireTrackGoogle'); - if (!empty($COOKIE_inquireTrackGoogle)) { - $this->Orders_model->COLI_OrderDetailText .= "\n\rGOOGLE关键字:" . $COOKIE_inquireTrackGoogle; - delete_cookie('inquireTrackGoogle'); - } - - $this->Orders_model->COLI_GroupType = '19006'; - $this->Orders_model->COLI_OrderType = '19006'; - if (is_numeric($this->input->post('adultsNumber'))) { - $this->Orders_model->COLI_PersonNum = $this->input->post('adultsNumber'); - } - if (is_numeric($this->input->post('ChildrenNumber'))) { - $this->Orders_model->COLI_ChildNum = $this->input->post('ChildrenNumber'); - } - if (is_numeric($this->input->post('BabiesNumber'))) { - $this->Orders_model->COLI_BabyNum = $this->input->post('BabiesNumber'); - } - $this->Orders_model->MEI_MailList = $this->input->post('email'); - $this->Orders_model->MEI_Mail = $this->input->post('email2'); - $pos = strstr($this->input->post('realname'), ' '); - if ($pos === false) { - $this->Orders_model->MEI_FirstName = $this->input->post('realname'); - } else { - $this->Orders_model->MEI_FirstName = str_replace($pos, '', $this->input->post('realname')); - $this->Orders_model->MEI_LastName = $pos; - } - $this->Orders_model->MEI_Nationality = $this->Orders_model->GetNationalityID($this-> - input->post('nationality')); - $this->COLI_ProductSN = ''; - if ($this->input->post('Date_Start')) { - $this->Orders_model->COLI_OrderStartDate = $this->input->post('Date_Start'); - } - $this->Orders_model->MEI_Gender = $this->input->post('gender'); - $this->Orders_model->MEI_Phone = $this->input->post('PhoneNo'); - - //是否来至第三方合作网站 - $third_webcode = $this->input->post('third_webcode'); - if (empty($third_webcode)) { - $third_webcode = $this->input->cookie('third_code'); - $this->input->set_cookie('third_code', '', ''); - $this->input->set_cookie('third%5Fcode', '', ''); - } - if (!empty($third_webcode)) { - $this->Orders_model->COLI_WebCode = $third_webcode; - } - - //指定操作人 - if ($this->input->post('COLI_OPI_SN')) { - $this->Orders_model->COLI_OPI_SN = $this->input->post('COLI_OPI_SN'); - } - $this->Orders_model->TourOrderSave(); - $this->Orders_model->SendMail($this->input->post('realname'), $this->input-> - post('email'), $this->config->item('Site_ServiceName'), $this->config->item('Site_ServiceEmail'), 'Tailor Made Orders', $this->Orders_model->COLI_OrderDetailText); - //发送邮件给客人 (20160504tailor_make) - $this->Orders_model->SendMail($this->config->item('Site_ServiceName'), $this->config->item('Site_ServiceEmail'), $this->input->post('realname'), $this->input-> - post('email'), 'Tailor Made Orders', $this->load->view('orders/email_template', '', true)); - - //是否AJAX提交? - $no_ajax = $this->input->post('no_ajax'); - if (empty($no_ajax)) { - $data[] = array('name' => 'go', 'value' => site_url('orders/tailormade_thankyou')); - echo json_encode($data); - } else { - $file_alias = $this->input->post('file_alias'); - redirect(site_url('orders/tailormade_thankyou' . $file_alias)); - } - } - } //ch 过来的 public function ch_tailormade_save() { $this->form_validation->set_rules('city', 'lang:city', 'required'); @@ -980,6 +768,7 @@ class Orders extends CI_Controller { } } } + public function tailormade_thankyou() { $data = array(); $data['seo_title'] = 'Asia Highlights Travel'; @@ -989,162 +778,6 @@ class Orders extends CI_Controller { $this->output->cache(99999); } - public function single_city_tour() { - $data = array(); - $this->html_do->head($data, 'r'); - $this->form_validation->set_rules('cli_no', 'lang:cli_no', 'required'); - $data['post_price'] = $this->input->post('cli_price'); - if ($this->form_validation->run() == false) { - redirect(); - } else { - $this->Tours_model->TopNum = 1; - $this->Tours_model->CLI_NO = $this->input->post('cli_no'); - $tourInfo = $this->Tours_model->GetInfo(); - if ($tourInfo) { - $data['country'] = $this->Site_model->GetCountry(); - $tourInfo->CLI_Price = $this->Tours_model->GetTourPrice($tourInfo->CLI_NO, $this-> - input->post('adultenum'), $this->input->post('cli_grade'), $this->input->post('season'), $this->input->post('starting_date')); - $data['postURL'] = site_url('orders/single-city-tour-save/'); - $data['tourInfo'] = $tourInfo; - $data['Header'] = $this->load->view('header', array('Navigation' => $this-> - Site_model->GetNavigation('single-city-tour')), true); - $this->load->view('orders/tour_simple/' . $this->site_code, $data); - } else { - redirect(); - } - } - } - - public function single_city_tour_save() { - $this->form_validation->set_rules('realname', 'lang:realname', 'required'); - $this->form_validation->set_rules('nationality', 'lang:nationality', 'required'); - $this->form_validation->set_rules('email', 'lang:email', 'required|valid_email'); - $this->form_validation->set_rules('starting_date', 'lang:starting_date', 'required'); - if ($this->form_validation->run() == false) { - $data = array(); - foreach ($this->form_validation->_error_array as $key => $value) { - $data[] = array('name' => $key, 'value' => $value); - } - echo json_encode($data); - } else { - $this->Orders_model->COLI_ID = $this->Orders_model->MakeOrderNumber(); - $this->Orders_model->COLI_SenderIP = $this->input->ip_address(); - $this->Orders_model->COLI_OrderDetailText = ReplaceFieldName($_POST); - $this->Orders_model->COLI_Servicetype = 'T'; - $this->Orders_model->COLI_sourcetype = '32001'; - - //HT订单跟踪代码 - $COOKIE_inquireTrackFrom = get_cookie('inquireTrackFrom'); - if (!empty($COOKIE_inquireTrackFrom) && is_numeric($COOKIE_inquireTrackFrom)) { - $this->Orders_model->COLI_sourcetype = (int) $COOKIE_inquireTrackFrom; - delete_cookie('inquireTrackFrom'); - } - - //Trace GOOGLE - $COOKIE_inquireTrackGoogle = get_cookie('inquireTrackGoogle'); - if (!empty($COOKIE_inquireTrackGoogle)) { - $this->Orders_model->COLI_OrderDetailText .= "\n\rGOOGLE关键字:" . $COOKIE_inquireTrackGoogle; - delete_cookie('inquireTrackGoogle'); - } - //utm广告跟踪链接 - $utm_source = get_cookie('__ah_utm_source'); - $utm_source_map = array( - 'google' => 78001, - 'newsletters' => 78005, - 'chinahighlights' => 99999 - ); - - if (!empty($utm_source) && array_key_exists($utm_source, $utm_source_map)) { - if($utm_source_map[$utm_source] != 99999){ - $this->Orders_model->COLI_LineClass = $utm_source_map[$utm_source]; - }else{ - $this->Orders_model->COLI_LineClass = ''; - } - - switch ($utm_source_map[$utm_source]){ - case 78001: - $this->Orders_model->COLI_sourcetype = 32034; - break; - case 78005: - $this->Orders_model->COLI_sourcetype = 32030; - break; - case 99999: - $this->Orders_model->COLI_sourcetype = 32108; - break; - } - - // 关联订单后统一删除 utm 的 cookie - delete_cookie('__ah_utm_source', '.asiahighlights.com'); - delete_cookie('__ah_utm_medium', '.asiahighlights.com'); - delete_cookie('__ah_utm_campaign', '.asiahighlights.com'); - } - - $this->Orders_model->COLI_GroupType = '19004'; - $this->Orders_model->COLI_OrderType = '19004'; - $this->Orders_model->COLI_Name = $this->input->post('cli_no') . ' ' . $this-> - input->post('cli_tourtitle'); - $this->Orders_model->COLI_PersonNum = $this->input->post('adultenum'); - $this->Orders_model->COLI_ChildNum = $this->input->post('childnum'); - $this->Orders_model->COLI_BabyNum = $this->input->post('babynum'); - $this->Orders_model->COLI_OrderStartDate = $this->input->post('starting_date'); - $this->Orders_model->COLI_Days = $this->input->post('cli_tourdays'); - - $this->Orders_model->MEI_MailList = $this->input->post('email'); - $this->Orders_model->MEI_Mail = $this->input->post('email2'); - $pos = strstr($this->input->post('realname'), ' '); - if ($pos === false) { - $this->Orders_model->MEI_FirstName = $this->input->post('realname'); - } else { - $this->Orders_model->MEI_FirstName = str_replace($pos, '', $this->input->post('realname')); - $this->Orders_model->MEI_LastName = $pos; - } - $this->Orders_model->MEI_Nationality = $this->Orders_model->GetNationalityID($this-> - input->post('nationality')); - $this->Orders_model->MEI_Gender = $this->input->post('gender'); - $this->Orders_model->MEI_Phone = $this->input->post('phoneno'); - if (empty($this->Orders_model->MEI_Phone) || !isset($this->Orders_model-> - MEI_Phone)) { - $this->Orders_model->MEI_Phone = @$this->input->post('PhoneNo'); - } - $this->Orders_model->COLI_ProductSN = $this->input->post('cli_sn'); - - //是否来至第三方合作网站 - $third_webcode = $this->input->post('third_webcode'); - if (empty($third_webcode)) { - $third_webcode = $this->input->cookie('third_code'); - $this->input->set_cookie('third_code', '', ''); - $this->input->set_cookie('third%5Fcode', '', ''); - } - if (!empty($third_webcode)) { - $this->Orders_model->COLI_WebCode = $third_webcode; - } - bind_email($this->Orders_model->MEI_MailList); - $this->Orders_model->TourOrderSave(); - $this->Orders_model->SendMail($this->input->post('realname'), $this->input-> - post('email'), $this->config->item('Site_ServiceName'), $this->config->item('Site_ServiceEmail'), 'Single City Tour Orders', $this->Orders_model->COLI_OrderDetailText); - //发送邮件给客人 - $this->Orders_model->SendMail($this->config->item('Site_ServiceName'), $this->config->item('Site_ServiceEmail'), $this->input->post('realname'), $this->input-> - post('email'), 'Single City Tour Orders', $this->load->view('orders/email_template', '', true)); - - //是否AJAX提交? - $no_ajax = $this->input->post('no_ajax'); - if (empty($no_ajax)) { - $data[] = array('name' => 'ok', 'value' => site_url('orders/single-city-tour-thankyou/')); - echo json_encode($data); - } else { - $file_alias = $this->input->post('file_alias'); - redirect(site_url('orders/single-city-tour-thankyou/' . $file_alias)); - } - } - } - - public function single_city_tour_thankyou() { - $data = array(); - $this->html_do->head($data, 'r'); - $data['PPCCode'] = $this->lang->line('PPC_single_city_tour'); - $this->load->view('orders/r_thankyou/' . $this->site_code, $data); - } - public function asia_tour() { $data = array(); @@ -1163,7 +796,7 @@ class Orders extends CI_Controller { $data['post_Starting_Date'] = $this->input->post('Starting_Date'); $this->load->view('header', $data); - $this->load->view('orders/inquiry_form'); + $this->load->view('orders/asia_tour_form'); $this->load->view('footer'); } @@ -1290,146 +923,4 @@ class Orders extends CI_Controller { $this->load->view('orders/thank_you', $data); $this->load->view('footer'); } - - public function group_tour() { - $this->form_validation->set_rules('cli_no', 'lang:cli_no', 'required'); - $data['post_price'] = $this->input->post('cli_price'); - if ($this->form_validation->run() == false) { - redirect(); - } else { - $data['country'] = $this->Site_model->GetCountry(); - $this->Tours_model->TopNum = 1; - $this->Tours_model->CLI_NO = $this->input->post('cli_no'); - $tourInfo = $this->Tours_model->GetInfo(); - if ($tourInfo) { - $tourInfo->CLI_Price = $this->Tours_model->GetGroupTourPrice($tourInfo->CLI_NO, $this->input->post('starting_date')); - $data['postURL'] = site_url('orders/group-tour-save/'); - $data['tourInfo'] = $tourInfo; - $data['Header'] = $this->load->view('header', array('Navigation' => $this-> - Site_model->GetNavigation('tour')), true); - $this->load->view('orders/tour', $data); - $this->load->view('footer'); - } else { - redirect(); - } - } - } - - public function group_tour_save() { - $this->form_validation->set_rules('realname', 'lang:realname', 'required'); - $this->form_validation->set_rules('nationality', 'lang:nationality', 'required'); - $this->form_validation->set_rules('email', 'lang:email', 'required|valid_email'); - if ($this->form_validation->run() == false) { - $data = array(); - foreach ($this->form_validation->_error_array as $key => $value) { - $data[] = array('name' => $key, 'value' => $value); - } - echo json_encode($data); - } else { - $this->Orders_model->COLI_ID = $this->Orders_model->MakeOrderNumber(); - $this->Orders_model->COLI_SenderIP = $this->input->ip_address(); - $this->Orders_model->COLI_OrderDetailText = ReplaceFieldName($_POST); - $this->Orders_model->COLI_Servicetype = 'T'; - $this->Orders_model->COLI_sourcetype = '32001'; - //增加订单跟踪代码 - if (isset($_COOKIE['inquireTrackFrom'])) { - if (is_numeric($_COOKIE['inquireTrackFrom'])) { - $this->Orders_model->COLI_sourcetype = (int) $_COOKIE['inquireTrackFrom']; - setcookie("inquireTrackFrom", $_COOKIE['inquireTrackFrom'], 0, '/'); - } - } - //Trace GOOGLE - if (isset($_COOKIE['inquireTrackGoogle'])) { - $google_str = get_para_from_url($_COOKIE['inquireTrackGoogle'], 'q'); - $this->Orders_model->COLI_OrderDetailText .= "\n\rGOOGLE关键字:" . $google_str; - setcookie("inquireTrackGoogle", $_COOKIE['inquireTrackGoogle'], 0, '/'); - $this->Orders_model->COLI_Keywords = $google_str; - } - - //utm广告跟踪链接 - $utm_source = get_cookie('__ah_utm_source'); - $utm_source_map = array( - 'google' => 78001, - 'newsletters' => 78005, - 'chinahighlights' => 99999 - ); - - if (!empty($utm_source) && array_key_exists($utm_source, $utm_source_map)) { - if($utm_source_map[$utm_source] != 99999){ - $this->Orders_model->COLI_LineClass = $utm_source_map[$utm_source]; - }else{ - $this->Orders_model->COLI_LineClass = ''; - } - - switch ($utm_source_map[$utm_source]){ - case 78001: - $this->Orders_model->COLI_sourcetype = 32034; - break; - case 78005: - $this->Orders_model->COLI_sourcetype = 32030; - break; - case 99999: - $this->Orders_model->COLI_sourcetype = 32108; - break; - } - - // 关联订单后统一删除 utm 的 cookie - delete_cookie('__ah_utm_source', '.asiahighlights.com'); - delete_cookie('__ah_utm_medium', '.asiahighlights.com'); - delete_cookie('__ah_utm_campaign', '.asiahighlights.com'); - } - - $this->Orders_model->COLI_GroupType = '19002'; - $this->Orders_model->COLI_OrderType = '19002'; - $this->Orders_model->COLI_Name = $this->input->post('cli_no') . ' ' . $this-> - input->post('cli_tourtitle'); - $this->Orders_model->COLI_PersonNum = $this->input->post('adultenum'); - $this->Orders_model->COLI_ChildNum = $this->input->post('childnum'); - $this->Orders_model->COLI_BabyNum = $this->input->post('babynum'); - $this->Orders_model->COLI_OrderStartDate = $this->input->post('starting_date'); - $this->Orders_model->COLI_Days = $this->input->post('cli_tourdays'); - - $this->Orders_model->MEI_MailList = $this->input->post('email'); - $this->Orders_model->MEI_Mail = $this->input->post('email2'); - $pos = strstr($this->input->post('realname'), ' '); - if ($pos === false) { - $this->Orders_model->MEI_FirstName = $this->input->post('realname'); - } else { - $this->Orders_model->MEI_FirstName = str_replace($pos, '', $this->input->post('realname')); - $this->Orders_model->MEI_LastName = $pos; - } - $this->Orders_model->MEI_Nationality = $this->Orders_model->GetNationalityID($this-> - input->post('nationality')); - $this->Orders_model->MEI_Gender = $this->input->post('gender'); - $this->Orders_model->MEI_Phone = $this->input->post('phoneno'); - $this->Orders_model->COLI_ProductSN = $this->input->post('cli_sn'); - bind_email($this->Orders_model->MEI_MailList); - $this->Orders_model->TourOrderSave(); - $this->Orders_model->SendMail($this->input->post('realname'), $this->input-> - post('email'), $this->config->item('Site_ServiceName'), $this->config->item('Site_ServiceEmail'), 'Group Tour Orders', $this->Orders_model->COLI_OrderDetailText); - //发送邮件给客人 - $this->Orders_model->SendMail($this->config->item('Site_ServiceName'), $this->config->item('Site_ServiceEmail'), $this->input->post('realname'), $this->input-> - post('email'), 'Group Tour Orders', $this->load->view('orders/email_template', '', true)); - $data[] = array('name' => 'ok', 'value' => site_url('orders/group-tour-thankyou/')); - echo json_encode($data); - } - } - - public function group_tour_thankyou() { - $data = array(); - $this->html_do->head($data, 'r'); - $data['PPCCode'] = $this->lang->line('PPC_group_tour'); - $this->load->view('orders/r_thankyou/' . $this->site_code, $data); - } - - public function tour_price() { - $CLI_Price = $this->Tours_model->GetTourPrice($this->input->post('cli_no'), $this-> - input->post('adultenum'), $this->input->post('cli_grade'), $this->input->post('season'), $this->input->post('starting_date')); - if ($CLI_Price === false) { - echo 'null'; - } else { - echo $CLI_Price->Tour_Price; - } - } - } diff --git a/application/views/orders/inquiry_form.php b/application/views/orders/asia_tour_form.php similarity index 99% rename from application/views/orders/inquiry_form.php rename to application/views/orders/asia_tour_form.php index 767be39b..ac088096 100644 --- a/application/views/orders/inquiry_form.php +++ b/application/views/orders/asia_tour_form.php @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/application/views/orders/lantern_form.php b/application/views/orders/lantern_form.php index 91ccb7de..65a9c29a 100644 --- a/application/views/orders/lantern_form.php +++ b/application/views/orders/lantern_form.php @@ -1,180 +1,172 @@ - - - - - - - -
-

Book Yi Peng Festival Ticket(s)

- -
-
-
-
-
-
-

Ticket Selection

-
-
-
- Which Location? - * -
- -
-
-
- Ticket Type - * -
-
- No. of travelers - * -
-
-
- -
-
-
-
-
- Select Date to Attend Yi Peng Festival - * -
- -
-
-
-
-
-
-
-

Your details

-
-
- Title - * -
-
- Full Name - * -
- -
-
-
- Email address - * -
-
-
- Nationality - * - + + +
+
+
+
+
+
+
+ +
+
+
+
+ Select services, ticket Type, quantity and date +
+
+
+
+
+
+ +
+
+
+
+ + Provide your personal information + +
+
+
+
+
+
+ +
+
+
+
+ Make a payment +
+
+
+
+
+
+ +
+
+
+
+ We get in touch with you within 24 hours with confirmation +
+
+
+
-
-
- Phone number -
-
- Only call if you ask, or for email issues -
-
- Tell us more to help us put together your ideal journey -
-
-
- - - - - - -
- -
-
- - Send My Inquiry - We never pass your information onto a third party. After submitting this form you will receive an email - confirmation and from time to time our newsletters.
-
-
-
- -
-
- - - +
+
+
+
+

+ Your Details... +

+
+ +
+ + +
+
+ + +
+
+ + +
+ +
+
+ + +
+
+ + +
+
+ All your ticket issues will be sent to your mailbox. +
+
+ + +
+
+ + +
+
+ Area code + number. Only call if you ask. +
+
+ + +
+ +
+
+
+ Location: +
+
+ Ticket Type: +
+
+ Date of event: +
+
+ Number of people: +
+
+
+ Total Price: + + USD + +
+
+
+
+
+ +
+ + + + + +
+ +
+
+
+
+ \ No newline at end of file diff --git a/application/views/orders/tailor_make.php b/application/views/orders/tailor_make.php deleted file mode 100644 index 75b648c0..00000000 --- a/application/views/orders/tailor_make.php +++ /dev/null @@ -1,340 +0,0 @@ - - - -
-
-
- -
-
The joy of travel starts at home! Your travel adventure starts the moment you start to map it out. We’re here to help you discover SE Asia in your way!
-
- -
-
-
-
-

1. Travelers? *

-
-
-
Adults (age 18+) - -
-
-
-
Youth (age 12-17) - -
-
-
-
Children (< age 12) - -
-
-
-
-
-

2. Tour Length *

-
-
- - days
-
-
Are your dates flexible?
- - Yes - - No
-
-
-

3. Date of Arrival*

-
-
- -
-
Flexible to arrive?
- - Yes - - No
-
- -
-
-

4. Where will you start and end the tour?

-
-
-
- -
-
-
-
- -
-
-
-
-
-

5. Hotel Style * - - (what's this?) - - - -

-
-
- -
-
- -
- -
- -
-
-
-
-

6. Guide v Freetime *

-
-
Ask for the full or half guiding service(guide and private transfer) as your travel experience and where to visit.
-
- -
-
- -
-
- -
-
-
-
-

7. What's your ideal trip? *

-
-
Tell us where you want to visit, what your must-sees and your interests are.
- *(3) means the suggested days in each place.
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-

8. Contact Details *

-
-
-
- - - -
-
-
-
- -
-
-
-
-
- -
-
-
-
- -
-
-
-
-
-
- -
- -
- -
-
-
-
-
-
diff --git a/css/inquiry-form.css b/css/asia_tour_form.css similarity index 100% rename from css/inquiry-form.css rename to css/asia_tour_form.css diff --git a/css/lantern-form-pc.css b/css/lantern-form-pc.css new file mode 100644 index 00000000..69fb8e05 --- /dev/null +++ b/css/lantern-form-pc.css @@ -0,0 +1,197 @@ +@charset "utf-8"; +@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i'); +body { font-family:'Hind Madurai', sans-serif} +/* new fonts */ + + /* latin */ + @font-face { + font-family: 'Alegreya Sans'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: local('Alegreya Sans Medium'), local('AlegreyaSans-Medium'), url(https://www.asiahighlights.com/css/fonts/5aUu9_-1phKLFgshYDvh6Vwt5alOqEp2iw.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; + } + /* latin */ + @font-face { + font-family: 'Alegreya Sans'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: local('Alegreya Sans Regular'), local('AlegreyaSans-Regular'), url(https://www.asiahighlights.com/css/fonts/5aUz9_-1phKLFgshYDvh6Vwt7VptvQ.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; + } + @font-face { + font-family: 'Alegreya Sans'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: local('Alegreya Sans Bold'), local('AlegreyaSans-Bold'), url(https://www.asiahighlights.com/css/fonts/5aUu9_-1phKLFgshYDvh6Vwt5eFIqEp2iw.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; + } + /* latin */ + @font-face { + font-family: 'Hind Madurai'; + font-style: normal; + font-weight: 300; + font-display: swap; + src: local('Hind Madurai Light'), local('HindMadurai-Light'), url(https://www.asiahighlights.com/css/fonts/f0Xu0e2p98ZvDXdZQIOcpqjfXaUXfsEp.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; + } + /* latin */ + @font-face { + font-family: 'Hind Madurai'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: local('Hind Madurai Regular'), local('HindMadurai-Regular'), url(https://www.asiahighlights.com/css/fonts/f0Xx0e2p98ZvDXdZQIOcpqjX9ocC.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; + } +/* CSS Document */ +#inquiryBox { display: block; margin:0 0 35px; background-color: #FFF;padding: 50px;border-radius: 4px;float: right;width: 100%;} +.wholeWrap{background: url(https://data.asiahighlights.com/image/lantern-pc-header.jpg) no-repeat fixed;background-size: 100%;padding-top:60px;padding-right: 15%;width: 100%;padding-bottom: 100px} +h3{ font-size: 20px; + font-weight: 500; + font-family: 'Alegreya Sans',sans-serif;margin-bottom: 10px;margin-top: 30px;} +.settleBlock{padding: 15px 0;width:100%;} +.settleMponey{font-size: 24px;font-weight: 700;border-top: 1px dashed #d1d1d1;border-bottom: 1px dashed #d1d1d1;padding: 15px 0; font-family: 'Alegreya Sans',sans-serif;} +.settleItems{font-size: 18px} +.totalPrice{color: #ad1818} +.settlePart{border-top: 1px dashed #d1d1d1;padding: 20px 0} +#inquiryBox h2 { font-size:32px;padding-bottom:10px; margin:0 0 15px;font-family: 'Alegreya Sans',sans-serif;font-weight: 700;} +#contactInfo { display: block; box-shadow:0 0 5px #999; border-radius:4px; margin:0 0 25px; padding:25px; background:#fff;} +#contactInfo h2 { font-size:24px; border-bottom:1px solid #d1d1d1; padding-bottom:20px; margin:0 0 00px;} +.labelTitle { display: block; font-size:16px; font-weight:400; color:#333; margin:30px 0 15px;} +.labelTitle .whatsThis { color:#a31022; font-size:13px;} +textarea { font-family:'Open Sans', sans-serif!important; font-size:16px; line-height:26px; padding:15px !important; border:1px solid #d1d1d1; background:#fff; width:100%; height:60px; border-radius:2px;margin-top: 10px;} +textarea:focus{border: 1px solid #7D9EC0;outline: none} +#contactInfo .subTitle { display: block; font-size:16px; font-weight:400; color:#333; margin:30px 0 15px;} +#contactInfo input { width:100%; font-size:14px; font-family:'Open Sans', sans-serif!important; border-radius:2px!important; padding:8px 15px; color:#777 !important; background:#fff; border:1px solid #d1d1d1;} +#inquiryBox label { font-weight: normal;} +#inquiryBox .checked {background: url(/pic/checked-icon.png) no-repeat left;} +#inquiryBox select { width:100%; font-size:14px; font-family:'Open Sans', sans-serif!important; border-radius:2px!important; padding:2px 10px; cursor:pointer; appearance: none; -moz-appearance: none; -webkit-appearance: none; background: url(/pic/select-tag.png) no-repeat 96% center #fff; background-size: 18px 10px; color:#777 !important; border:1px solid #d1d1d1;} +#inquiryBox select option { padding:5px 0 5px 10px;} +#contactInfo select { width:100%; font-size:14px; font-family:'Open Sans', sans-serif!important; border-radius:2px!important; padding:2px 10px; cursor:pointer; appearance: none; -moz-appearance: none; -webkit-appearance: none; background: url(/pic/select-tag.png) no-repeat 96% center #fff; background-size: 18px 10px; color:#777 !important;border:1px solid #d1d1d1;height:38px} +#contactInfo select option { padding:5px 0 5px 10px;} + +/* selection box */ + +.optionLable input{display: none;} +.checkboxGender input[type="radio"] + label{font-size: 18px;padding: 5px 0;border: 1px solid #d1d1d1;border-radius: 4px;display: block;margin-top: 10px;text-align: center;color: #999;font-family: 'Alegreya Sans',sans-serif;} +.checkboxGender input[type="radio"]:checked + label{background-color:#ad1818;color: #FFF;border-color: #ad1818} +.optionLable input[type="radio"] + label{width: 100%;font-size: 22px;padding: 5px 0;border: 1px solid #d1d1d1;border-radius: 4px;display: block;margin-top: 10px;text-align: center;color: #999;height: 65px;font-family: 'Alegreya Sans',sans-serif;} +.optionLable input[type="radio"]:checked + label{border: 1px solid #ad1818;color: #ad1818} +.checkboxLabel input[type="checkbox"] + label{font-size: 22px;padding: 5px 0;border: 1px solid #d1d1d1;border-radius: 4px;display: block;margin-top: 10px;text-align: center;color: #999;height: 65px;font-family: 'Alegreya Sans',sans-serif;padding-top: 15px;} +.checkboxLabel input[type="checkbox"]:checked + label{border: 1px solid #ad1818;color: #ad1818} +.checkboxLabel{display: inline-block;width: 49%;} +.checkboxLabel:nth-child(even){float: right} +.checkboxLabel input{display: none} +.selectionMemo{font-size: 14px;font-style: italic;font-weight: 300;margin-top:2px} +#inquiryBox .flexibleDate{display: inline-block; + margin-bottom: 10px; + padding: 5px 0 5px 30px;} +.genderSelection{text-align: center} +.checkboxGender{width: 32%;display: inline-block;} +.checkboxGender label{width: 100%} +.checkboxGender input{display: none} +.checkboxGender:nth-child(3){float: right} +.checkboxGender:nth-child(1){float: left} +.inputTerm label { + display: block; + width: 100%; + font-size: 18px; + position: absolute; + left: 20px; + top: calc(50% - 13px); + transition: all ease-in-out .5s; + pointer-events: none;height: 26px; + color: #999; +} +.inputTerm { + display: block; + width: 100%; + margin: 15px auto; + position: relative; +} +.inputTerm input:focus ~ label, .inputTerm input:valid~label{top:5px;font-size:12px;color:#999;transition:0.3s;text-transform:uppercase} +.inputTerm input:focus{border: 1px solid #7D9EC0;outline: none} +.inputTerm input { + width: 100%; + margin: 0; + font-size: 22px; + border: 1px solid #d1d1d1; + height: 60px; + padding: 15px 15px 0 20px; + border-radius: 4px; + color: #000; +} +.checkYes { + display: block; + width: 100%;margin-top: 5px;margin-bottom: 15px} +.checkBorder:checked { + background-color: #ad1818; + border-color: #ad1818;margin-right: 5px; +} +.checkBorder { + background-color: #fff; + border: 1px solid #c1c1c1;position: relative; + width: 20px; + height: 20px; + background-clip: border-box; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + margin: -0.15px 0.6px 0 0; + vertical-align: text-bottom; + border-radius: 2px; + -webkit-transition: background-color 0.25s; + transition: background-color 0.25s; + background-color: #fff; + border: 1px solid #d1d1d1 +} +.contactUs{border-top: 1px solid #d1d1d1;} +.contactUs p{margin-top: 15px;font-size: 18px;font-weight: normal} +p a + input[type=checkbox]+label { + color: #999; + font-size: 16px !important; +} +.checkYes label { + display: inline; + font-style: italic;font-size: 18px;color: #999 +} +input[type=checkbox]:checked+label{color: #000} + +.checkBorder:checked:after { + border-color: #fff; +} +.checkBorder:checked:after { + content: ''; + display: block; + height: 8px; + width: 14px; + border: 0 solid #FFF; + border-width: 0 0 2px 2px; + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); + position: absolute; + top: 3px; + left: 2px; +} +.formMemo{font-size: 14px;color: #999;margin-left:15px; display: block;margin-top: -10px; } + +.inquiryBtn{display:block;text-align:center;font-family:Georgia,"Times New Roman",Times,serif;font-size:24px} +input[type=submit]{background: linear-gradient(#ca3c3b,#ad1818); + text-align: center; + display: table; + border-radius: 60px; + min-width: 230px; + margin: 25px auto; + padding: 8px 30px;color: #FFF;font-family: 'Alegreya Sans',sans-serif;font-weight: 500;font-size: 20px;border:solid 0px} + input[type=submit]:hover{min-width: 250px} + + i{margin-left: 10px} + .workingSteps{font-size: 18px;color: #FFF;margin-top: 60px;overflow: hidden;} +.stepLogo img{width: 50px} +.detailedSteps strong{font-weight: 700} +.workingSteps:after{content: ""; background: #d1d1d1;height: 2px;} diff --git a/js/lantern.js b/js/lantern.js new file mode 100644 index 00000000..fda9bea2 --- /dev/null +++ b/js/lantern.js @@ -0,0 +1,96 @@ +var nums = 2; +var level = 1; +$('.confirmpeople').html(nums + ' people'); +totalprice(); + +//加减人数 +$('.minus').click(function(){ + nums = $('.travelNumber').val(); + if(nums>0){ + nums--; + $('.travelNumber').val(nums); + $('.confirmpeople').html(nums + ' people'); + totalprice(level,nums); + } +}); + +$('.plus').click(function(){ + nums = $('.travelNumber').val(); + nums++; + $('.travelNumber').val(nums); + $('.confirmpeople').html(nums + ' people'); + totalprice(level,nums); +}); + +//调整服务种类 +$('#TicketStandard').change(function(){ + var selectype = $('#TicketStandard').val(); + var addoption = ''; + + if(selectype == 'ticketonly'){ + addoption += ''; + addoption += ''; + addoption += ''; + addoption += ''; + } + + if(selectype == 'Ticket+ShuttleTransfer'){ + addoption += ''; + addoption += ''; + addoption += ''; + addoption += ''; + } + + $('#ticketonlyselection').html(addoption); +}); + +//确认票种 +$('#ticketonlyselection').change(function(){ + var tyicketype = $('#TicketStandard').val(); + var ticketonlyselection = $('#ticketonlyselection').val(); + + if(tyicketype != '' && ticketonlyselection != ''){ + $('.confirmNotice').html(ticketonlyselection); + + if(ticketonlyselection == 'Premium Ticket' || ticketonlyselection == 'Premium Ticket+Shuttle Transfer from Maya Shopping Center'){ + level = 3; + } + + if(ticketonlyselection == 'VIP Ticket' || ticketonlyselection == 'VIP Ticket+Shuttle Transfer from Maya Shopping Center'){ + level = 2; + } + + if(ticketonlyselection == 'Standard Ticket' || ticketonlyselection == 'Standard Ticket+Shuttle Transfer from Maya Shopping Center'){ + level = 1; + } + totalprice(); + } +}); + +//确认时间 +$('#selectdate').change(function(){ + var selectdate = $(this).val(); + $('#confirmdate').html(selectdate); +}); + + +//价格计算 +function totalprice(){ + switch(level){ + case 1 : + singleprice = 158; + break; + case 2 : + singleprice = 201; + break; + case 3 : + singleprice = 218; + break; + default: + singleprice = 158; + break; + } + $('.priceDetail').html('USD ' + singleprice*nums); + $('#totalprice').val(singleprice*nums); +} +