<!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>網站LOGO設置</h3>
                <div class="article" style="width: 100%;">
                    <form id="form1" name="form1" action="logoSet.php" method="post">
                        <fieldset style="width: 100%;">
                        	<div class="titleTyp"><p>頁首LOGO</p></div>
                            <div style=" background: rgba(75, 141, 248, 0.07); padding: 10px 0;">
                                <div class="writList">
                                	<label style="float: left;">圖片</label>
                                    <a id="aImg1" class="fancybox" style="float: left; margin: 0 10px;"><img id="imgImg1" style="width:50px; height:50px; border:0; display:none;" /></a>
                                    <input type="text" id="Image1" name="Image1" value="<?# Image1 ?>" />
                                    <input type="button" id="btnImg1" name="btnImg1" value="瀏覽" />
                                </div>
                                <p>
                                    <label>標題</label>
                                    <input type="text" id="Title1" name="Title1" value="<?# Title1 ?>" style="width: 300px;" />
                                </p>
                                <p>
                                    <label>超連結</label>
                                    <input type="text" id="Link1" name="Link1" value="<?# Link1 ?>" style="width: 300px;" />
                                </p>
                            </div>
                            <div class="titleTyp" style="background: #66CC96; margin: 5px 0 0;"><p>頁腳LOGO</p></div>
                            <div style="background: rgba(102, 204, 150, 0.11); padding: 10px 0;">
                                <div class="writList">
                                	<label style="float: left;">圖片</label>
                                    <a id="aImg2" class="fancybox" style="float: left; margin: 0 10px;"><img id="imgImg2" style="width:50px; height:50px; border:0; display:none;" /></a>
                                    <input type="text" id="Image2" name="Image2" value="<?# Image2 ?>" />
                                    <input type="button" id="btnImg2" name="btnImg2" value="瀏覽" />
                                </div>
                                <p>
                                    <label>標題</label>
                                    <input type="text" id="Title2" name="Title2" value="<?# Title2 ?>" style="width: 300px;" />
                                </p>
                                <p>
                                    <label>超連結</label>
                                    <input type="text" id="Link2" name="Link2" value="<?# Link2 ?>" style="width: 300px;" />
                                </p>
                            </div>
                            <div class="titleTyp" style="background: #CC6666; margin: 5px 0 0;"><p>預設圖片</p></div>
                            <div style="background: rgba(102, 204, 150, 0.11); padding: 10px 0;">
                                <div class="writList">
                                	<label style="float: left;">圖片</label>
                                    <a id="aImg3" class="fancybox" style="float: left; margin: 0 10px;"><img id="imgImg3" style="width:50px; height:50px; border:0; display:none;" /></a>
                                    <input type="text" id="Image3" name="Image3" value="<?# Image3 ?>" />
                                    <input type="button" id="btnImg3" name="btnImg3" value="瀏覽" />
                                </div>
                                <p style="display:none;">
                                    <label>標題</label>
                                    <input type="text" id="Title3" name="Title3" value="預設圖片" style="width: 300px;" />
                                </p>
                            </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();

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

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

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

		$('#btnImg2').click(function(){
			var finder = new CKFinder();
			finder.basePath = 'ckfinder/';
			finder.resourceType = 'Images';
			finder.selectActionFunction = SetFileField;
			finder.selectActionData = 'Image2';
			finder.popup();
		});
		
		$('#Image3').change(function(){
			if($(this).val() == ''){
				$('#imgImg3').attr('src','');
				$('#imgImg3').css('display','none');
				$('#aImg3').attr('href','');
			}else{
				$('#imgImg3').attr('src',$(this).val());
				$('#imgImg3').css('display','block');
				$('#aImg3').attr('href',$(this).val());
			}
		});
		$('#Image3').change();

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

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