<!DOCTYPE html>
<html dir="ltr" lang="zh-TW">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
<title>管理後臺</title>
<meta name="robots" content="noindex, nofollow" />
<link href="less/page.less" rel="stylesheet/less">
<link href="css/main.css" rel="stylesheet">
<link href="css/page.css" rel="stylesheet">
<script src="/jquery/jquery-1.10.js"></script>
<script src="ckfinder/ckfinder.js"></script>
<!--tabs-->
<script src="/jquery/horizontalmenu/jquery.horizontalmenu.js"></script>
<!-- 瀏覽用燈箱片效果 -->
<link href="/jquery/fancybox-3.0/dist/jquery.fancybox.css" rel="stylesheet">
<script src="/jquery/fancybox-3.0/dist/jquery.fancybox.min.js"></script>
<script>
	if('<?# alertMsg ?>' != ''){
		alert('<?# alertMsg ?>');
		if('<?# goBack ?>' == 'Y') history.back();
	}
	if('<?# locationHref ?>' != '') location.href = '<?# locationHref ?>';
</script>
</head>
<body>
	<?# sidePage ?>
	<div class="pos_rel" id="content">
		<?# header ?>
		<form id="form1" name="form1" method="post">
            <input type="hidden" id="id" name="id" value="<?# id ?>" />
			<div class="row mt_10 mb_5 h3 page_title"><?# page_name ?></div>
			<div class="card">
				<div class="pos_rel bg_g_100 tabs_warp" id="tabs_warp">
					<div class="tabs_list">
						<a class="tabs_item" data-action="true" data-id="box1" href="javascript:void(0);"><?# page_name ?></a>
						<a class="tabs_item" data-id="box2" href="javascript:void(0);">信箱設定</a>
						<a class="tabs_item" data-id="box3" href="javascript:void(0);">Line設定</a>
						<a class="tabs_item" data-id="box4" href="javascript:void(0);">社群分享設定</a>
					</div>
				</div>
				<div id="tabs_box" class="card_body form_box">
					<div id="box1" class="d_md_flex flex_wrap tab_content" data-action="true">
						<div class="col_md_6 d_flex form_list list_typ2"><label>網站名稱</label><input type="text" id="webName" name="webName" value="<?# webName ?>" /></div>
						<div class="col_md_6 d_flex form_list list_typ2">
							<label>客服信箱</label>
							<font class="ml_5 d_block el-checkbox"><input type="checkbox" id="webEmailisShow" name="webEmailisShow" value="1"><span class="el-checkbox-style"></span><span>內頁顯示</span></font>
							<input type="text" id="webEmail" name="webEmail" value="<?# webEmail ?>" />
						</div>
						<div class="col_md_6 d_flex form_list list_typ2">
							<label>聯絡地址</label>
							<font class="ml_5 d_block el-checkbox"><input type="checkbox" id="webAddressisShow" name="webAddressisShow" value="1"><span class="el-checkbox-style"></span><span>內頁顯示</span></font>
							<input type="text" id="webAddress" name="webAddress" value="<?# webAddress ?>" />
						</div>
						<div class="col_md_6 d_flex form_list list_typ2">
							<label>聯絡電話</label>
							<font class="ml_5 d_block el-checkbox"><input type="checkbox" id="webPhoneisShow" name="webPhoneisShow" value="1"><span class="el-checkbox-style"></span><span>內頁顯示</span></font>
							<input type="text" id="webPhone" name="webPhone" value="<?# webPhone ?>" />
						</div>
						<div class="col_md_6 d_flex form_list list_typ2">
							<label>手機</label>
							<font class="ml_5 d_block el-checkbox"><input type="checkbox" id="webMobileShow" name="webMobileShow" value="1"><span class="el-checkbox-style"></span><span>內頁顯示</span></font>
							<input type="text" id="webMobile" name="webMobile" value="<?# webMobile ?>" />
						</div>
						<div class="col_md_6 d_flex form_list list_typ2">
							<label>聯絡傳真</label>
							<font class="ml_5 d_block el-checkbox"><input type="checkbox" id="webFaxisShow" name="webFaxisShow" value="1"><span class="el-checkbox-style"></span><span>內頁顯示</span></font>
							<input type="text" id="webFax" name="webFax" value="<?# webFax ?>" />
						</div>
						<div class="col_12 d_flex form_btn"><a class="ml_2 btn btn_tertiary" data-action="nextPage" href="javascript:void(0);">下一步</a></div>
					</div>
					<div id="box2" class="d_md_flex flex_wrap tab_content">
						<div class="col_md_6 d_flex form_list"><label>系統信箱一</label><input type="text" id="systemEmail1" name="systemEmail1" value="<?# systemEmail1 ?>" /></div>
						<div class="col_md_6 d_flex form_list"><label>系統信箱二</label><input type="text" id="systemEmail2" name="systemEmail2" value="<?# systemEmail2 ?>" /></div>
						<div class="col_md_6 d_flex form_list"><label>系統信箱三</label><input type="text" id="systemEmail3" name="systemEmail3" value="<?# systemEmail3 ?>" /></div>
						<div class="col_md_6 d_flex form_list"><label>系統信箱四</label><input type="text" id="systemEmail4" name="systemEmail4" value="<?# systemEmail4 ?>" /></div>
						<div class="col_md_6 d_flex form_list"><label>系統信箱五</label><input type="text" id="systemEmail5" name="systemEmail5" value="<?# systemEmail5 ?>" /></div>
						<div class="col_12 d_flex form_btn">
							<a class="ml_2 btn btn_orange" data-action="upPage" href="javascript:void(0);">上一步</a>
							<a class="ml_2 btn btn_tertiary" data-action="nextPage" href="javascript:void(0);">下一步</a>
						</div>
					</div>
					<div id="box3" class="d_md_flex flex_wrap tab_content">
						<div class="col_md_6 d_flex form_list"><label>Line分享開關</label><p><font class="checkbox"><input type="checkbox" id="LineOpen" name="LineOpen" value="1" /><span></span></font></p></div>
						<div class="col_md_6 d_flex form_list IsIndex"><label>Line內頁顯示</label><p><font class="checkbox"><input type="checkbox" id="lineTitleShow" name="lineTitleShow" value="1" /><span></span></font></p></div>
						<div class="col_md_6 d_flex form_list"><label>Line ID</label><input type="text" id="lineTitle" name="lineTitle" value="<?# lineTitle ?>" /></div>
						<div class="col_md_6 d_flex form_list">
							<label>Line QRcode</label>
							<p class="d_flex upBox">
								<a class="img_box"></a>
								<font class="col_12 in_group">
									<input type="text" id="lineQRCode" name="lineQRCode" data-action="Image" value="<?# lineQRCode ?>" />
									<b class="group"><a class="btn btn_dark" href="javascript:void(0);" data-action="btnImg" data-type="Images"><svg class="fa"><use xlink:href="svg/icons.svg#folder"></use></svg></a></b>
								</font>
							</p>
						</div>
						<div class="col_12 d_flex form_btn">
							<a class="ml_2 btn btn_orange" data-action="upPage" href="javascript:void(0);">上一步</a>
							<a class="ml_2 btn btn_tertiary" data-action="nextPage" href="javascript:void(0);">下一步</a>
						</div>
					</div>
					<div id="box4" class="d_md_flex flex_wrap tab_content">
						<div class="col_md_6 d_flex form_list"><label>社群分享標題</label><input type="text" id="OGTitle" name="OGTitle" value="<?# OGTitle ?>" /></div>
						<div class="col_md_6 d_flex form_list">
							<label>社群分享縮圖</label>
							<p class="d_flex upBox">
								<a class="img_box"></a>
								<font class="col_12 in_group">
									<input type="text" id="OGImage" name="OGImage" data-action="Image" value="<?# OGImage ?>" />
									<b class="group"><a class="btn btn_dark" href="javascript:void(0);" data-action="btnImg" data-type="Images"><svg class="fa"><use xlink:href="svg/icons.svg#folder"></use></svg></a></b>
								</font>
							</p>
						</div>
						<div class="col_12 form_list"><label>社群分享描述</label><textarea  id="OGDescription" name="OGDescription"><?# OGDescription ?></textarea></div>
						<div class="col_12 d_flex form_btn"><a class="ml_2 btn btn_orange" data-action="upPage" href="javascript:void(0);">上一步</a></div>
					</div>
				</div>
			</div>
            <div class="row mt_5 d_flex start_box"><a class="mr_2 btn btn_info" id="btnOK" href="javascript:void(0);">送出</a></div>
		</form>
		<?# footer ?>
	</div>
</body>
</html>
<script>
	$(function(){
		if('<?# webEmailisShow ?>' == '1') $('#webEmailisShow').prop('checked', true);
		if('<?# webAddressisShow ?>' == '1') $('#webAddressisShow').prop('checked', true);
		if('<?# webPhoneisShow ?>' == '1') $('#webPhoneisShow').prop('checked', true);
		if('<?# webFaxisShow ?>' == '1') $('#webFaxisShow').prop('checked', true);
		if('<?# webMobileShow ?>' == '1') $('#webMobileShow').prop('checked', true);
		if('<?# lineTitleShow ?>' == '1') $('#lineTitleShow').prop('checked', true);
		if('<?# LineOpen ?>' == '1') $('#LineOpen').prop('checked', true);
		
		$('#tabs_warp').horizontalmenu({
			itemClick: function (item) {
				$('#tabs_box .tab_content').removeAttr('data-action');
				$('#tabs_box .tab_content:eq(' + $(item).index() + ')').attr('data-action', 'true');
				return false;
			}
		});
		
		$('#btnOK').click(function(){
			var reEmail = /^[a-zA-Z0-9_\-\.]+@[a-zA-Z0-9_\-]+(\.[a-zA-Z0-9_\-]+)+$/;
			if($('#webEmail').val() != '' && !reEmail.test($('#webEmail').val())){
				alert('請填寫正確的信箱格式!');
				$('#webEmail').focus();
				tabchk(1);
				return false;
			}
			
			$('#form1').submit();
		});
	});
</script>