<!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">
<link href="css/jquery.minicolors.css" rel="stylesheet">
<script src="/jquery/jquery-1.10.js"></script>
<script src="/js/jquery.minicolors.js"></script><!--顏色選擇器-->
<script src="ckeditor/ckeditor.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);">關於我們設置</a>
						<a class="tabs_item" data-id="box2" href="javascript:void(0);">最新消息設置</a>
						<a class="tabs_item" data-id="box3" href="javascript:void(0);">產品設置</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"><label>標題</label><input type="text" id="indexAboutTitle1" name="indexAboutTitle1" value="<?# indexAboutTitle1 ?>" /></div>
						<div class="col_md_6 d_flex form_list"><label>副標題</label><input type="text" id="indexAboutTitle2" name="indexAboutTitle2" value="<?# indexAboutTitle2 ?>" /></div>
						<div class="col_md_6 d_flex form_list"><label>超連結</label><input type="text" id="indexAboutLink" name="indexAboutLink" value="<?# indexAboutLink ?>" /></div>
						<div class="col_md_6 d_flex form_list"><label>連結文字</label><input type="text" id="indexAboutLinkT" name="indexAboutLinkT" value="<?# indexAboutLinkT ?>" /></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="indexAboutImage" name="indexAboutImage" data-action="Image" value="<?# indexAboutImage ?>" />
									<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_md_6 d_flex form_list yorn"><label>首頁顯示</label><p><font class="checkbox"><input type="checkbox" id="indexAboutShow" name="indexAboutShow" value="1" /><span></span></font></p></div>
						<div class="col_12 form_list"><label>簡介</label><textarea class="ckeditor" id="indexAboutIntroduction" name="indexAboutIntroduction"><?# indexAboutIntroduction ?></textarea></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="indexNTitle" name="indexNTitle" value="<?# indexNTitle ?>" /></div>
						<div class="col_md_6 d_flex form_list"><label>顯示數量</label><input type="text" id="indexNNO" name="indexNNO" value="<?# indexNNO ?>" placeholder="不填數量前台會顯示所有最新消息" /></div>
						<div class="col_md_6 d_flex form_list"><label>查看更多連結</label><input type="text" id="indexNMLink" name="indexNMLink" value="<?# indexNMLink ?>" /></div>
						<div class="col_md_6 d_flex form_list"><label>查看更多標題</label><input type="text" id="indexNMLinkTitle" name="indexNMLinkTitle" value="<?# indexNMLinkTitle ?>" /></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="indexNBImg" name="indexNBImg" data-action="Image" value="<?# indexNBImg ?>" />
									<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_md_6 d_flex form_list"><label>背景色</label><p><input class="form-control" type="text" id="indexNBColor" name="indexNBColor" data-position="bottom left" value="<?# indexNBColor ?>" style="padding-left: 40px; cursor:pointer;" maxlength="11" /></p></div>
						<div class="col_md_6 d_flex form_list yorn"><label>首頁顯示</label><p><font class="checkbox"><input type="checkbox" id="indexNShow" name="indexNShow" value="1" /><span></span></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="box3" class="d_md_flex flex_wrap tab_content">
						<div class="col_md_6 d_flex form_list"><label>主標題</label><input type="text" id="indexPTitle" name="indexPTitle" value="<?# indexPTitle ?>" /></div>
						<div class="col_md_6 d_flex form_list"><label>顯示數量</label><input type="text" id="indexPNO" name="indexPNO" value="<?# indexPNO ?>" placeholder="不填數量前台會顯示所有最新消息" /></div>
						<div class="col_md_6 d_flex form_list"><label>查看更多連結</label><input type="text" id="indexPMLink" name="indexPMLink" value="<?# indexPMLink ?>" /></div>
						<div class="col_md_6 d_flex form_list"><label>查看更多標題</label><input type="text" id="indexPMLinkTitle" name="indexPMLinkTitle" value="<?# indexPMLinkTitle ?>" /></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="indexPBImg" name="indexPBImg" data-action="Image" value="<?# indexPBImg ?>" />
									<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_md_6 d_flex form_list"><label>背景色</label><p><input class="form-control" type="text" id="indexPBColor" name="indexPBColor" data-position="bottom left" value="<?# indexPBColor ?>" style="padding-left: 40px; cursor:pointer;" maxlength="11" /></p></div>
						<div class="col_md_6 d_flex form_list yorn"><label>首頁顯示</label><p><font class="checkbox"><input type="checkbox" id="indexPShow" name="indexPShow" value="1" /><span></span></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="indexBTitle" name="indexBTitle" value="<?# indexBTitle ?>" /></div>
						<div class="col_md_6 d_flex form_list"><label>顯示數量</label><input type="text" id="indexBNO" name="indexBNO" value="<?# indexBNO ?>" placeholder="不填數量前台會顯示所有最新消息" /></div>
						<div class="col_md_6 d_flex form_list"><label>查看更多連結</label><input type="text" id="indexBMLink" name="indexBMLink" value="<?# indexBMLink ?>" /></div>
						<div class="col_md_6 d_flex form_list"><label>查看更多標題</label><input type="text" id="indexBMLinkTitle" name="indexBMLinkTitle" value="<?# indexBMLinkTitle ?>" /></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="indexBBImg" name="indexBBImg" data-action="Image" value="<?# indexBBImg ?>" />
									<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_md_6 d_flex form_list"><label>背景色</label><p><input class="form-control" type="text" id="indexBBColor" name="indexBBColor" data-position="bottom left" value="<?# indexBBColor ?>" style="padding-left: 40px; cursor:pointer;" maxlength="11" /></p></div>
						<div class="col_md_6 d_flex form_list yorn"><label>首頁顯示</label><p><font class="checkbox"><input type="checkbox" id="indexBShow" name="indexBShow" value="1" /><span></span></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></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('<?# indexAboutShow ?>' == '1') $('#indexAboutShow').prop('checked', true);
		if('<?# indexNShow ?>' == '1') $('#indexNShow').prop('checked', true);
		if('<?# indexPShow ?>' == '1') $('#indexPShow').prop('checked', true);
		if('<?# indexBShow ?>' == '1') $('#indexBShow').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(){
			if($('#indexNNO').val() != '' && $('#indexNNO').val() <= '0'){
                alert('最新消息顯示數量不可以小於1!');
                $('#indexNNO').focus();
				tabchk(2);
                return false;
			}
			if($('#indexPShow').val() != '' && $('#indexPShow').val() <= '0'){
                alert('產品置顯示數量不可以小於1!');
                $('#indexPShow').focus();
				tabchk(3);
                return false;
			}
			if($('#indexBNO').val() != '' && $('#indexBNO').val() <= '0'){
                alert('相本顯示數量不可以小於1!');
                $('#indexBNO').focus();
				tabchk(4);
                return false;
			}
			
			$('#form1').submit();
		});

		build_ckeditor('indexAboutIntroduction');
	});
</script>