<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理後臺</title>
<meta name="keywords" content="管理後臺" />
<meta name="description" content="管理後臺" />
<script src="/jquery/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="ckfinder/ckfinder.js"></script>
<!-- 瀏覽用燈箱片效果 -->
<link rel="stylesheet" href="/jquery/fancybox/source/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
<script type="text/javascript" src="/jquery/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
</head>
<body>
	<div class="wrapper">
    	<?# header ?>
    	<div class="wrap">
        	<?# sidePage ?>
            <div class="contentMain">
            	<h3>網路資源設置</h3>
                <div class="article" style="width: 100%;">
                    <form id="form1" name="form1" action="outsideSet.php" method="post">
                        <fieldset style="width: 100%;">
                            <div style="overflow: hidden;">
                            	<div class="titleTyp"><p>LINE</p></div>
                                <div style=" background: rgba(75, 141, 248, 0.07); padding: 10px 0;">
                                    <p>
                                        <label>Line ID</label>
                                        <input type="text" id="lineTitle" name="lineTitle" value="<?# lineTitle ?>" style="width: 300px;" />
                                    </p>
                                    <div class="writList">
                                        <label style="float: left;">QRCode</label>
                                        <a id="aQRCode" class="fancybox"><img id="imgQRCode" style="width:50px; height:50px; border:0; display:none;" /></a>
                                        <input type="text" id="lineQRCode" name="lineQRCode" value="<?# lineQRCode ?>" />
                                        <input type="button" id="btnQRCode" name="btnQRCode" value="瀏覽" />
                                    </div>
                                </div>
                                <div class="titleTyp" style="background: #66CC96; margin: 5px 0 0;"><p>臉書粉絲團</p></div>
                                <div style="background: rgba(102, 204, 150, 0.11); padding: 10px 0;">
                                    <p>
                                        <label>網址</label>
                                        <input type="text" id="fbFansURL" name="fbFansURL" value="<?# fbFansURL ?>" style="width: 300px" />
                                    </p>
                                    <div class="writList">
                                        <label>臉書模組</label>
                                        <div class="ckeList">
                                            <ul>
                                                <li>
                                                    <input type="radio" name="fbFansFriendFace" value="1" />顯示好友頭像&nbsp;&nbsp;
                                                    <input type="radio" name="fbFansFriendFace" value="0" />不顯示好友頭像
                                                </li>
                                                <li>
                                                    <input type="radio" name="fbFansCoverPhoto" value="1" />顯示封面
                                                    <input type="radio" name="fbFansCoverPhoto" value="0" style="margin: 0 0 0 37px;" />不顯示封面
                                                </li>
                                                <li>
                                                    <input type="radio" name="fbFansPagePost" value="1" />顯示頁面內容&nbsp;&nbsp;
                                                    <input type="radio" name="fbFansPagePost" value="0" />不顯示頁面內容
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                    <div class="writList">
                                    	<label>內頁顯示</label>
                                        <input type="checkbox" name="fbFansSidePageShow[]" value="40" />文章
                                        <input type="checkbox" name="fbFansSidePageShow[]" value="50" />產品
                                        <input type="checkbox" name="fbFansSidePageShow[]" value="60" />最新消息
                                        <input type="checkbox" name="fbFansSidePageShow[]" value="70" />問與答
                                        <input type="checkbox" name="fbFansSidePageShow[]" value="80" />相本
                                        <input type="checkbox" name="fbFansSidePageShow[]" value="90" />聯絡表單
                                        <input type="checkbox" name="fbFansSidePageShow[]" value="100" />訂單
                                    </div>
                                    <div class="writList">
                                    	<label>內頁顯示樣式</label>
                                        <div class="ckeList">
                                            <ul>
                                                <li><input type="radio" name="fbFansSidePageType" value="1" />預設LOGO</li>
                                                <li>
                                                    <input type="radio" name="fbFansSidePageType" value="2" />自訂LOGO
                                                    <a id="aLOGO" class="fancybox"><img id="imgLOGO" style="width:50px; height:50px; border:0; display:none;" /></a>
                                                    <input type="text" id="fbFansLOGO" name="fbFansLOGO" value="<?# fbFansLOGO ?>" />
                                                    <input type="button" id="btnLOGO" name="btnLOGO" value="瀏覽" />
                                                </li>
                                                <li><input type="radio" name="fbFansSidePageType" value="3" />臉書元件</li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                                <div class="titleTyp" style="background: #852b99; margin: 5px 0 0;"><p>Google MAP</p></div>
                                <div style="background: rgba(133, 43, 153, 0.15); padding: 10px 0;">
                                    <p>
                                        <label>地址</label>
                                        <input type="text" id="googlemapAddress" name="googlemapAddress" value="<?# googlemapAddress ?>" style="width: 300px;" />
                                    </p>
                                    <p>
                                    	<label>首頁顯示</label>
                                        <input type="radio" name="googlemapIndex" value="1" />首頁顯示
                                        <input type="radio" name="googlemapIndex" value="0" />首頁不顯示
                                    </p>
                                    <p>
                                    	<label>側邊顯示</label>
                                    	<input type="checkbox" name="googlemapSidePageShow[]" value="40" />文章
                                        <input type="checkbox" name="googlemapSidePageShow[]" value="50" />產品
                                        <input type="checkbox" name="googlemapSidePageShow[]" value="60" />最新消息
                                        <input type="checkbox" name="googlemapSidePageShow[]" value="70" />問與答
                                        <input type="checkbox" name="googlemapSidePageShow[]" value="80" />相本
                                        <input type="checkbox" name="googlemapSidePageShow[]" value="90" />聯絡表單
                                        <input type="checkbox" name="googlemapSidePageShow[]" value="100" />訂單
                                    </p>
                                    <p>
                                    	<label>聯絡表單顯示</label>
                                        <input type="radio" name="googlemapMain" value="1" />聯絡表單顯示
                                        <input type="radio" name="googlemapMain" value="0" />聯絡表單不顯示
                                    </p>
                                </div>
                                <div class="titleTyp" style="background: #C66; margin: 5px 0 0;"><p>Youtube</p></div>
                                <div style="background: rgba(204, 102, 102, 0.14); padding: 10px 0;">
                                    <p>
                                        <label>分享網址</label>
                                        <input type="text" id="youtubeURL" name="youtubeURL" value="<?# youtubeURL ?>" style="width: 300px;" />
                                    </p>
                                    <p>
                                    	<label>內頁顯示</label>
                                    	<input type="checkbox" name="youtubeSidePageShow[]" value="40" />文章
                                        <input type="checkbox" name="youtubeSidePageShow[]" value="50" />產品
                                        <input type="checkbox" name="youtubeSidePageShow[]" value="60" />最新消息
                                        <input type="checkbox" name="youtubeSidePageShow[]" value="70" />問與答
                                        <input type="checkbox" name="youtubeSidePageShow[]" value="80" />相本
                                        <input type="checkbox" name="youtubeSidePageShow[]" value="90" />聯絡表單
                                        <input type="checkbox" name="youtubeSidePageShow[]" value="100" />訂單
                                    </p>
                                </div>
                                <div class="titleTyp" style="background: #667BCC; margin: 5px 0 0;"><p>Google Analytics</p></div>
                                <div style="background: rgba(102, 123, 204, 0.17); padding: 10px 0;">
                                    <p>
                                        <label>原始碼</label>
                                        <textarea id="headHTML" name="headHTML" style="width:540px; height:200px;"><?# headHTML ?></textarea>
                                    </p>
                                </div>
                                <div class="titleTyp" style="background: #667BCC; margin: 5px 0 0;"><p>Google Tag Manager</p></div>
                                <div style="background: rgba(102, 123, 204, 0.17); padding: 10px 0;">
                                    <p>
                                        <label>原始碼</label>
                                        <textarea id="bodyTopHTML" name="bodyTopHTML" style="width:540px; height:200px;"><?# bodyTopHTML ?></textarea>
                                    </p>
                                </div>
                            </div>
                            <p>
	                            <input type="button" id="btnOK" name="btnOK" value="確 定" />
							</p>
                        </fieldset>
                    </form>
                </div>
            </div>
        </div>
        <?# footer ?>
    </div>
<script>
<!--
	function SetFileField(fileUrl,data){
		$('#'+data["selectActionData"]).val(fileUrl);
		$('#'+data["selectActionData"]).change();
	}
	$(function(){
		$(".fancybox").fancybox();

		$('input:radio[name="fbFansFriendFace"][value="<?# fbFansFriendFace ?>"]').attr('checked',true);
		$('input:radio[name="fbFansCoverPhoto"][value="<?# fbFansCoverPhoto ?>"]').attr('checked',true);
		$('input:radio[name="fbFansPagePost"][value="<?# fbFansPagePost ?>"]').attr('checked',true);
		$('input:radio[name="fbFansSidePageType"][value="<?# fbFansSidePageType ?>"]').attr('checked',true);
		
		<php:repeater id="listPS">
			<template>
				$('input:checkbox[name="fbFansSidePageShow[]"][value="<?# Value ?>"]').attr('checked',true);
			</template>
		</php:repeater>
		
		$('input:radio[name="googlemapIndex"][value="<?# googlemapIndex ?>"]').attr('checked',true);
		$('input:radio[name="googlemapMain"][value="<?# googlemapMain ?>"]').attr('checked',true);
		
		<php:repeater id="listGMSPS">
			<template>
				$('input:checkbox[name="googlemapSidePageShow[]"][value="<?# Value ?>"]').attr('checked',true);
			</template>
		</php:repeater>
		
		<php:repeater id="listYSPS">
			<template>
				$('input:checkbox[name="youtubeSidePageShow[]"][value="<?# Value ?>"]').attr('checked',true);
			</template>
		</php:repeater>

		$('#lineQRCode').change(function(){
			if($(this).val() == ''){
				$('#imgQRCode').attr('src','');
				$('#imgQRCode').css('display','none');
				$('#aQRCode').attr('href','');
			}else{
				$('#imgQRCode').attr('src',$(this).val());
				$('#imgQRCode').css('display','block');
				$('#aQRCode').attr('href',$(this).val());
			}
		});
		$('#lineQRCode').change();

		$('#btnQRCode').click(function(){
			var finder = new CKFinder();
			finder.basePath = 'ckfinder/';
			finder.resourceType = 'Images';
			finder.selectActionFunction = SetFileField;
			finder.selectActionData = 'lineQRCode';
			finder.popup();
		});

		$('#fbFansLOGO').change(function(){
			if($(this).val() == ''){
				$('#imgLOGO').attr('src','');
				$('#imgLOGO').css('display','none');
				$('#aLOGO').attr('href','');
			}else{
				$('#imgLOGO').attr('src',$(this).val());
				$('#imgLOGO').css('display','block');
				$('#aLOGO').attr('href',$(this).val());
			}
		});
		$('#fbFansLOGO').change();

		$('#btnLOGO').click(function(){
			var finder = new CKFinder();
			finder.basePath = 'ckfinder/';
			finder.resourceType = 'Images';
			finder.selectActionFunction = SetFileField;
			finder.selectActionData = 'fbFansLOGO';
			finder.popup();
		});

		$('#btnOK').click(function(){
			$('#form1').submit();
		});
	});
//-->
</script>
</body>
</html>