<!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="webpageSet.php" method="post">
                        <fieldset>
                            <div style="overflow: hidden;">
                                <div class="list" style="height: 225px;">
                                    <div class="titleTyp"><p>文章橫幅廣告</p></div>
                                    <div style=" background: rgba(75, 141, 248, 0.07); padding: 10px 0;">
                                        <div class="writList">
                                            <label style="float: left;">圖片</label>
                                            <a data-id="4" class="fancybox" style="float: left; margin: 0 10px;"><img data-id="4" style="width:50px; height:50px; border:0; display:none;" /></a>
                                            <input type="text" data-action="Image" data-id="4" id="Image4" name="Image4" value="<?# Image4 ?>" />
                                            <input type="button" id="btnImg" data-action="btnImg" data-id="4" name="btnImg4" value="瀏覽" />
                                        </div>
                                        <p>
                                            <label>標題</label>
                                            <input type="text" id="Title4" name="Title4" value="<?# Title4 ?>" style="width: 300px;" />
                                        </p>
                                        <p>
                                            <label>超連結</label>
                                            <input type="text" id="Link4" name="Link4" value="<?# Link4 ?>" style="width: 300px;" />
                                        </p>
                                    </div>
                                </div>
                                <div class="list" style="height: 225px;">
                                    <div class="titleTyp"><p>產品橫幅廣告</p></div>
                                    <div style=" background: rgba(75, 141, 248, 0.07); padding: 10px 0;">
                                        <div class="writList">
                                            <label style="float: left;">圖片</label>
                                            <a data-id="5" class="fancybox" style="float: left; margin: 0 10px;"><img data-id="5" style="width:50px; height:50px; border:0; display:none;" /></a>
                                            <input type="text" data-action="Image" data-id="5" id="Image5" name="Image5" value="<?# Image5 ?>" />
                                            <input type="button" id="btnImg" data-action="btnImg" data-id="5" name="btnImg5" value="瀏覽" />
                                        </div>
                                        <p>
                                            <label>標題</label>
                                            <input type="text" id="Title5" name="Title5" value="<?# Title5 ?>" style="width: 300px;" />
                                        </p>
                                        <p>
                                            <label>超連結</label>
                                            <input type="text" id="Link5" name="Link5" value="<?# Link5 ?>" style="width: 300px;" />
                                        </p>
                                    </div>
                                </div>
                                <div class="list" style="height: 225px;">
                                    <div class="titleTyp"><p>最新消息橫幅廣告</p></div>
                                    <div style=" background: rgba(75, 141, 248, 0.07); padding: 10px 0;">
                                        <div class="writList">
                                            <label style="float: left;">圖片</label>
                                            <a data-id="6" class="fancybox"><img data-id="6" style="width:50px; height:50px; border:0; display:none;" /></a>
                                            <input type="text" data-action="Image" data-id="6" id="Image6" name="Image6" value="<?# Image6 ?>" />
                                            <input type="button" id="btnImg" data-action="btnImg" data-id="6" name="btnImg6" value="瀏覽" />
                                        </div>
                                        <p>
                                            <label>標題</label>
                                            <input type="text" id="Title6" name="Title6" value="<?# Title6 ?>" style="width: 300px;" />
                                        </p>
                                        <p>
                                            <label>超連結</label>
                                            <input type="text" id="Link6" name="Link6" value="<?# Link6 ?>" style="width: 300px;" />
                                        </p>
                                    </div>
                                </div>
                                <div class="list" style="height: 225px;">
                                    <div class="titleTyp"><p>問與答橫幅廣告</p></div>
                                    <div style=" background: rgba(75, 141, 248, 0.07); padding: 10px 0;">
                                        <div class="writList">
                                            <label style="float: left;">圖片</label>
                                            <a data-id="7" class="fancybox"><img data-id="7" style="width:50px; height:50px; border:0; display:none;" /></a>
                                            <input type="text" data-action="Image" data-id="7" id="Image7" name="Image7" value="<?# Image7 ?>" />
                                            <input type="button" id="btnImg" data-action="btnImg" data-id="7" name="btnImg7" value="瀏覽" />
                                        </div>
                                        <p>
                                            <label>標題</label>
                                            <input type="text" id="Title7" name="Title7" value="<?# Title7 ?>" style="width: 300px;" />
                                        </p>
                                        <p>
                                            <label>超連結</label>
                                            <input type="text" id="Link7" name="Link7" value="<?# Link7 ?>" style="width: 300px;" />
                                        </p>
                                    </div>
                                </div>
                                <div class="list" style="height: 225px;">
                                    <div class="titleTyp"><p>影音相本橫幅廣告</p></div>
                                    <div style=" background: rgba(75, 141, 248, 0.07); padding: 10px 0;">
                                        <div class="writList">
                                            <label style="float: left;">圖片</label>
                                            <a data-id="8" class="fancybox"><img data-id="8" style="width:50px; height:50px; border:0; display:none;" /></a>
                                            <input type="text" data-action="Image" data-id="8" id="Image8" name="Image8" value="<?# Image8 ?>" />
                                            <input type="button" id="btnImg" data-action="btnImg" data-id="8" name="btnImg8" value="瀏覽" />
                                        </div>
                                        <p>
                                            <label>標題</label>
                                            <input type="text" id="Title8" name="Title8" value="<?# Title8 ?>" style="width: 300px;" />
                                        </p>
                                        <p>
                                            <label>超連結</label>
                                            <input type="text" id="Link8" name="Link8" value="<?# Link8 ?>" style="width: 300px;" />
                                        </p>
                                    </div>
                                </div>
                                <div class="list" style="height: 225px;">
                                    <div class="titleTyp"><p>聯絡我們橫幅廣告</p></div>
                                    <div style=" background: rgba(75, 141, 248, 0.07); padding: 10px 0;">
                                        <div class="writList">
                                            <label style="float: left;">圖片</label>
                                            <a data-id="9" class="fancybox"><img data-id="9" style="width:50px; height:50px; border:0; display:none;" /></a>
                                            <input type="text" data-action="Image" data-id="9" id="Image9" name="Image9" value="<?# Image9 ?>" />
                                            <input type="button" id="btnImg" data-action="btnImg" data-id="9" name="btnImg9" value="瀏覽" />
                                        </div>
                                        <p>
                                            <label>標題</label>
                                            <input type="text" id="Title9" name="Title9" value="<?# Title9 ?>" style="width: 300px;" />
                                        </p>
                                        <p>
                                            <label>超連結</label>
                                            <input type="text" id="Link9" name="Link9" value="<?# Link9 ?>" style="width: 300px;" />
                                        </p>
                                    </div>
                                </div>
                                <div class="list" style="height: 225px;">
                                    <div class="titleTyp"><p>結帳橫幅廣告</p></div>
                                    <div style=" background: rgba(75, 141, 248, 0.07); padding: 10px 0;">
                                        <div class="writList">
                                            <label style="float: left;">圖片</label>
                                            <a data-id="10" class="fancybox"><img data-id="10" style="width:50px; height:50px; border:0; display:none;" /></a>
                                            <input type="text" data-action="Image" data-id="10" id="Image10" name="Image10" value="<?# Image10 ?>" />
                                            <input type="button" id="btnImg" data-action="btnImg" data-id="10" name="btnImg10" value="瀏覽" />
                                        </div>
                                        <p>
                                            <label>標題</label>
                                            <input type="text" id="Title10" name="Title10" value="<?# Title10 ?>" style="width: 300px;" />
                                        </p>
                                        <p>
                                            <label>超連結</label>
                                            <input type="text" id="Link10" name="Link10" value="<?# Link10 ?>" style="width: 300px;" />
                                        </p>
                                    </div>
                                </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:text[data-action="Image"]').change(function(){
			if($(this).val() == ''){
				$('img[data-id="'+$(this).data("id")+'"]').attr('src','');
				$('img[data-id="'+$(this).data("id")+'"]').css('display','none');
				$('a[data-id="'+$(this).data("id")+'"]').attr('href','');
			}else{
				$('img[data-id="'+$(this).data("id")+'"]').attr('src',$(this).val());
				$('img[data-id="'+$(this).data("id")+'"]').css('display','block');
				$('a[data-id="'+$(this).data("id")+'"]').attr('href',$(this).val());
			}
		});
		for(var i=4;i<11;i++){
			$('#Image'+i).change();
		}

		$('input:button[data-action="btnImg"]').click(function(){
			var finder = new CKFinder();
			finder.basePath = 'ckfinder/';
			finder.resourceType = 'Images';
			finder.selectActionFunction = SetFileField;
			finder.selectActionData = 'Image'+$(this).data("id");
			finder.popup();
		});

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