<?php
/* Smarty version 3.1.30, created on 2021-10-24 13:56:07
  from "D:\AppServ\www\secondTaipei\template\index.html" */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.30',
  'unifunc' => 'content_6174f577e95171_83961601',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '19359aadf7187df469d5c61da1bfbf077de9ab64' => 
    array (
      0 => 'D:\\AppServ\\www\\secondTaipei\\template\\index.html',
      1 => 1635054786,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:lib/header.tpl' => 1,
    'file:lib/footer.tpl' => 1,
  ),
),false)) {
function content_6174f577e95171_83961601 (Smarty_Internal_Template $_smarty_tpl) {
?>
<!DOCTYPE HTML>
<html>
	<?php $_smarty_tpl->_subTemplateRender("file:lib/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>

			
	
	<?php echo '<script'; ?>
>
		
		function goto_level(level){
			var height = 0;
			if ( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
				height = 60;
				 $('.navbar-collapse').collapse('hide');
			}else{
				height = 100;
			}
			$('html, body').animate({
				scrollTop: $('#' + level).offset().top - height
				}, 500
			);
		}
		
	<?php echo '</script'; ?>
>
	
	<!-- Google Tag Manager (noscript) -->
	<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NXRLNHG"
	height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
	<!-- End Google Tag Manager (noscript) -->
	
	<!-- Google Tag Manager (noscript) -->
	<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TMF6JMP"
	height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
	<!-- End Google Tag Manager (noscript) -->


	<div id="page">
		<div id="menu_bar">
		<nav class="navbar header_bar navbar-custom">
			<a class="navbar-home" onclick="goto_level('a0')">
				<img src="template/image/logo.png" class="img-fluid" width="120px"/>
			</a>
			<div class="tel"></div>
			<a href="tel:02-8631-6789" class="d-none d-sm-block header_bar_text_pos ">立即來電</a><font style="color:white" class="d-none d-sm-block "> &nbsp; | &nbsp;</font>
			<a href="#" onclick="goto_level('a9')" class="d-none d-sm-block header_bar_text_pos ">我要預約</a><font style="color:white" class="d-none d-sm-block "> &nbsp; | &nbsp;</font>
			<a href="#" onclick="goto_level('a8')" class="d-none d-sm-block header_bar_text_pos ">地圖導航</a><font style="color:white" class="d-none d-sm-block "> &nbsp; | &nbsp;</font>
			<a href="https://lin.ee/bJmCqN7" target="_blank" class="d-none d-sm-block header_bar_text_pos ">Line@</a><font style="color:white" class="d-none d-sm-block "> &nbsp; | &nbsp;</font>
			<a href="https://www.facebook.com/%E6%96%B0%E5%B8%82%E4%B8%80%E4%B8%81%E7%9B%AE-105919281187103/" target="_blank" class="d-none d-sm-block header_bar_text_pos ">FB諮詢</a> 
			
			<button class="navbar-toggler d-sm-none d-xs-block" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
				<i class="fa fa-bars" style="font-size:30px;color:white"></i>
			</button>
		</nav>
		
		<nav class="navbar navbar-expand-md flex-row" id="navMenuBar">
			<div class="collapse navbar-collapse" id="navbarNav">
				<ul class="navbar-nav" style="margin:0 auto">
					<li class="nav-item active">
						<a class="nav-link" href="#" onclick="goto_level('a1')">機能核心</a>
					</li>
					<li class="nav-item">
						<a class="nav-link" href="#" onclick="goto_level('a2')">四通八達</a>
					</li>
					<li class="nav-item">
						<a class="nav-link" href="#" onclick="goto_level('a3')">食衣住行</a>
					</li>
					<li class="nav-item">
						<a class="nav-link" href="#" onclick="goto_level('a4')">浪漫淡海</a>
					</li>
					<li class="nav-item">
						<a class="nav-link" href="#" onclick="goto_level('a5')">坪效住宅</a>
					</li>
					<li class="nav-item">
						<a class="nav-link" href="#" onclick="goto_level('a6')">名師團隊</a>
					</li>
					<li class="nav-item">
						<a class="nav-link" href="#" onclick="goto_level('a7')">基本資料</a>
					</li>
				</ul>
			</div>
		</nav>
		</div>
		
		<section id="a0">
			<div class="carousel slide d-none d-sm-block" data-ride="carousel">
				<img src="template/image/web/banner1.jpg" class="carousel_img">
			</div>
						
			<div class="carousel slide d-sm-none d-xs-block" data-ride="carousel" style="overflow-x:scroll;   ">
				<img src="template/image/mobile/banner1.jpg" class="carousel_img2">
			</div>
		</section>
		
		<section id="a1">
			<div class="carousel slide d-none d-sm-block" data-ride="carousel">
				<img src="template/image/web/a1_1.jpg" class="carousel_img">
			</div>
						
			<div class="carousel slide d-sm-none d-xs-block" data-ride="carousel" style="overflow-x:scroll;   ">
				<img src="template/image/mobile/a1_1.jpg" class="carousel_img2">
			</div>
		</section>
		
		<section id="a2">
			<div class="carousel slide d-none d-sm-block" data-ride="carousel">
				<img src="template/image/web/a2_1.jpg" class="carousel_img">
			</div>
						
			<div class="carousel slide d-sm-none d-xs-block" data-ride="carousel">
				<img src="template/image/mobile/a2_1.jpg" class="carousel_img">
			</div>
		</section>
		
		<section id="a3">
			<div class="carousel slide d-none d-sm-block" data-ride="carousel">
				<img src="template/image/web/a3_1.jpg" class="carousel_img">
			</div>
						
			<div class="carousel slide d-sm-none d-xs-block" data-ride="carousel">
				<img src="template/image/mobile/a3_1.jpg" class="carousel_img">
			</div>
		</section>		
		
		<section id="a4">
			<div class="carousel slide d-none d-sm-block" data-ride="carousel">
				<img src="template/image/web/a4_1.jpg" class="carousel_img">
			</div>
						
			<div class="carousel slide d-sm-none d-xs-block" data-ride="carousel">
				<img src="template/image/mobile/a4_1.jpg" class="carousel_img">
			</div>
		</section>		
		
		<section id="a5">
			<div class="carousel slide d-none d-sm-block" data-ride="carousel">
				<img src="template/image/web/a5_1.jpg" class="carousel_img">
			</div>
						
			<div class="carousel slide d-sm-none d-xs-block" data-ride="carousel">
				<img src="template/image/mobile/a5_1.jpg" class="carousel_img">
			</div>
		</section>	
		
		<section id="a6">
			<div class="carousel slide d-none d-sm-block" data-ride="carousel">
				<img src="template/image/web/a6_1.jpg" class="carousel_img">
			</div>
						
			<div class="carousel slide d-sm-none d-xs-block" data-ride="carousel">
				<img src="template/image/mobile/a6_1.jpg" class="carousel_img">
			</div>
		</section>	
		
		<section id="a7">
			<div class="col-12 page_info">
				<div class="row">
				
				
				
					<div class="col-lg-12">
						<h5 class="title_font base_info_title">基本資料</h5>
						<div class="base_info_content">
							投資興建：合康建築．合嘉建設<br/>
							建築設計：閣康聯合建築師事務所<br/>
							公設規劃：吉寬工程設計<br/>
							園藝規劃：綠第景觀<br/>
							建造號碼：109年淡建字第00062號<br/>
							廣告行銷：翰昌動力行銷
						</div>
					</div>
				</div>
			</div>
		</section>
		
		<section id="a8">			
			<div class="col-12">
				<?php echo '<script'; ?>
 src="https://maps.google.com/maps/api/js?sensor=false&key=AIzaSyAmYX_uU3z7Dqe2Su13FkVTeiD9GapRNo4"><?php echo '</script'; ?>
>
				<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3610.478321380774!2d121.4275823150094!3d25.18708698390097!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2zMjXCsDExJzEzLjUiTiAxMjHCsDI1JzQ3LjIiRQ!5e0!3m2!1szh-TW!2stw!4v1598703586880!5m2!1szh-TW!2stw"  width="100%" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>
			</div>
		</section>
		
		<section id="a9">
			<div class="col-12 page_contact">
			<div class="overlay"></div>
			<div class="col-md-10 col-lg-8 col-xl-7 mx-auto">
				<h2 class="mb-4 page_contact_title">靚化 新登場 線上優惠專案預約</h2>
				<div class="row">
					<div class="col-md-12"> 
						<div class="form-row mb-1 mb-md-3">
							<input type="email" class="form-control form-control-lg d-block" placeholder="請輸入姓名" id="contact_name"> 
						</div>
						<div class="form-row mb-1 mb-md-3">
							<input type="email" class="form-control form-control-lg d-block" placeholder="請輸入電話" id="contact_phone"> 
						</div>
						<div class="form-row mb-1 mb-md-3">
							<input type="email" class="form-control form-control-lg d-block" placeholder="請輸入電子郵件" id="contact_mail"> 
						</div>
						<div class="form-row mb-1 mb-md-3">
							<select class="form-control form-control-lg d-block" required="" id="contact_need">
								<option value="">方便聯繫時間？</option>
								<option value="上午12:00前">上午12:00前</option>
								<option value="下午13:00-18:00">下午13:00-18:00</option>
								<option value="任何時間皆可">任何時間皆可</option>
							</select>
						</div>
					</div>
				</div>

				<div class="row mt-2">  
					<div class="col-xl-12 mx-auto">
						<p class="text-left text-light mb-3">你所登錄的個人資料將做為以下用途<br>
						(一)本網站所載之相關事項通知(二)客戶管理與服務(三)本公司行銷業務之推廣本案實際內容以現場公布為準</p>
						<div class="form-check">
							<p class="text-left text-light">
							<label class="form-check-label">
							<input type="checkbox" class="form-check-input" id="agree_contact">
							本人已知悉以上個人資料蒐集聲明事項
							</label></p>
						</div>
					</div>
				</div>

				<div class="form-row">
					<div class="col-md-12">
					<a class="btn btn-block btn-lg btn-secondary" id="send_mail">送出表單</a>
					</div>
				</div>
			</div>
			</div>
		</section>
		
		<?php $_smarty_tpl->_subTemplateRender("file:lib/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>

	</div>
	
	<div class="gototop">
		<a href="#" onclick="goto_level('a0')"><i class="fa fa-arrow-up" style="color:white"></i></a>
	</div>
	
	<?php echo '<script'; ?>
>
		document.getElementById("menu_bar").style.top = "0px";
		
		$("#send_mail").click(function(){
			var contact_name = $("#contact_name").val();
			var contact_phone = $("#contact_phone").val();
			var contact_mail = $("#contact_mail").val();
			var contact_need = $("#contact_need").val();
			var agree_contact = $("#agree_contact").is(':checked') ? 1 : 0;
			var error_msg = "";
			
			if(contact_name == "") error_msg += "請輸入姓名\n";
			if(contact_phone == "") error_msg += "請輸入電話\n";
			if(contact_need == "") error_msg += "請選擇方便聯繫時間\n";
			if(agree_contact == 0) error_msg += "請同意透過電話或E-mail方式與您聯絡";
			
			if(error_msg != ""){
				swal({
					title: '系統訊息',
					text: error_msg,
					type: 'warning',
					showCancelButton: false, 
					showConfirmButton: true,
					confirmButtonText: '確定'
				});
				return false;
			}
			
			var date = new Date();
			var source = "";
			var medium = "";
			var searchParams = new URLSearchParams(window.location.search);
			if(searchParams.has('utm_source')) source = searchParams.get('utm_source');
			if(searchParams.has('utm_medium')) medium = searchParams.get('utm_medium');
			
			var is_google_form_success = "成功";

			// write data to google form
			$.ajax({
				type: "post",
				url: "https://script.google.com/macros/s/AKfycbxcTxOBRpg0IHVvoBvvmihpcCUIZr7jCP05Kon8/exec",
					data: {
						"projectName": "新市二丁目",
						"createTime": date.toISOString(),
						"customerName": contact_name,
						"customerPhone": contact_phone,
						"customerEmail": contact_mail,
						"source": source,
						"adSource": medium,
						"contactTime": contact_need
					},
					success: function(response) {
						if(response == "成功"){
							is_google_form_success = "成功";
						}else{
							is_google_form_success = "失敗";
						}
			
						var data = "&contact_name="+contact_name+
									"&contact_phone="+contact_phone+
									"&contact_mail="+contact_mail+
									"&contact_need="+contact_need+
									"&agree_contact="+agree_contact+
									"&source="+source+
									"&is_google_form_success="+is_google_form_success;
						
						// 發ajax去寄信
						$.ajax({
							type: "POST",
							url: "ajax/manage.php",
							data: "ajax=send_mail"+data,
							success: function(data){
								var obj = JSON.parse(data);
								if(obj.status == "1"){
									swal({
										title: '系統訊息',
										text: obj.msg,
										type: 'success'
									},function(isConfirms){
										$("#contact_name").val("");
										$("#contact_phone").val("");
										$("#contact_mail").val("");
										$("#contact_need").val("");
										$("#agree_contact").prop("checked", false);
									});
								}else{
									swal({
										title: '系統訊息',
										text: obj.msg,
										type: 'warning'
									});
								}
							}
						});
						window.location.href = 'template/done.html';
					}
				}
			);			
		});
		
	<?php echo '</script'; ?>
>
	
</html>

<?php }
}
