<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../common/common.jsp" %>
<title>专题广告分析</title>
<head>
 <link rel="stylesheet" type="text/css" href="${staticPath}css/jquery.datetimepicker.css" />   
</head>
<body>
<%@ include file="../common/head.jsp" %>
<div class="screen main bg-gray">
	<div class="radius-tabs top">
		<a href="${basePath}special_analysis/index.do" class="button active">专题广告分析</a>
		<a href="javascript:void(0);" onclick="toTheatreAnalysis()" class="button">央卫视剧场分析</a>
	</div>
	<div>
	    <form name="dataForm" class="search-form" action="export.do" method="post">
		<div class="search-group">
			<div class="buttons button-wrap inline search-item" id="tabMenu">
				<span class="btn btn-disabled" data-day="0">全部</span><span class="btn" data-day="7">最近一周</span><span class="btn btn-disabled" data-day="90">最近三月</span><span class="btn btn-disabled" data-day="365">最近一年</span>
			</div>    
		    <span class="search-item pRight30"><div class="twoContent"><input type="text" name="startDate" id="start_time" class="text {text:'开始时间'}" size="7" /><span>-</span><input type="text" name="endDate" id="end_time" class="text {text:'结束时间'}" size="7" /></div></span>
		    <div class="search-item pRight30">          
	            <select id="type" name="type">
	                <option value="" >全部</option>
	                <option value="0" <c:if test="${type==0}">selected="selected" </c:if>>产品广告</option>
	                <option value="1" <c:if test="${type==1}">selected="selected" </c:if>>栏目广告</option>
	            </select>
		    </div>
		    <div class="search-item pRight30"><input type="text" id="keyword" name="keyword" class="text {text:'请输入产品栏目/品牌/广告主/节目名称'}" value="${keyword}" size="30" /></div>
		</div>
        <div class="search-group">
			<div class="search-item pRight30">
				<select name="mediaName" id="mediaName">
		             <option value=""></option> 
		        </select>
	        </div>
            <div class="search-item pRight30">
              <select id="showEnv" name="showEnv">
                  <option value="">请选择</option>
                  <option value="0">新闻</option>
                  <option value="1">电视剧</option>
                  <option value="2">广告片</option>
                  <option value="3">栏目</option>
                  <option value="4">宣传片</option>
                  <option value="5">小品</option>
                  <option value="6">电影</option>
                  <option value="7">天气预报</option>
                  <option value="8">动画片</option>
                  <option value="9">记录片</option>
              </select>
            </div>
			<div class="search-item pRight30">
				<select id ="firstInd" name="firstInd">
					<option value=""></option>
				</select>
				<select id="secondInd" name="secondInd">
                    <option value=""></option>
                </select>
            </div>
			<div class="search-item"><a href="javascript:getBrandAnalysisList(1);" class="search-btn">搜 索</a><a onclick="javascript:setBenchmark();" class="search-btn">对 标</a></div>        
		</div>
		</form>
	</div>
	<div class="table-content">
		<div class="hd-title">专题广告电视投放一览<a href="javascript:document.dataForm.submit();" style="line-height: 16px;" class="rFloat btn">导出</a></div>
		<div class="">
			<table class="table table-gray" cellpadding="0" cellspacing="0">
				<thead>
				<tr>
					<th width="4%">序号</th>
					<th width="8%">媒体</th>
					<th width="6%">播出时间</th>
					<th width="8%">播出日期</th>
					<th width="7%">播出环境</th>
					<th width="8%">节目名称</th>
					<th width="6%">时长(分)</th>
					<th width="8%">产品/栏目</th>
					<th width="8%">品牌/内容</th>
					<th width="6%">一级行业</th>
					<th width="6%">二级行业</th>
					<th width="6%">广告主</th>
					<th width="7%">联系方式</th>
					<th width="6%">价格(万)</th>
					<th width="6%"><input type="checkbox" class="checkbox {click:checkAll}" name="all" value="对标" /></th>
				</tr>
				</thead>
				<tbody id="brand_analysis_list"></tbody>
			</table>
			<div class="mTop10">
				<div id="brand_analysis_page" class="rFloat"></div>
				累计 <span id="brand_analysis_count" class="blue">0</span> 条
			</div>
		</div>
	</div>
	<div class="analyse-tabs">
		<div class="tab-content-box">
			<div class="tab-content">
				<%@ include file="../analysis/brand_analysis_type1.jsp" %>
			</div>
		</div>
	</div>
</div>
<%@ include file="../common/footer.jsp" %>
<script type="text/javascript" src="${staticPath}js/analysis/special_analysis.js"></script>
<script type="text/javascript" src="${staticPath}js/common/jquery.datetimepicker.js"></script>
<script type="text/javascript" src="${staticPath}js/echart/echarts.common.min.js"></script>
<script type="text/javascript">
    $(function(){
        $.resetText();
        $.radio();
        $(".text").input();
        $(".table").hoverTable(true, true);
        $.checkbox();
        // 时间插件
        $("#start_time, #end_time").datetimepicker();
        // 初始化数据默认一周
        changeTab(7);  
        // 时间选期
        $("#tabMenu").tabMenu({removeClass:"btn-disabled",fun:function(obj, text){
                changeTab(obj.dataset.day);
            }});
    });
    
    // 点击跳转央卫视剧场分析
    function toTheatreAnalysis(keyword){
    	 var permission =  "${menuMap['ywjc_analysis']}";
    	 if (isEmpty(permission)){
    		 top.alert("您暂无权限，请联系管理员。");
    	     return false;
    	 }
    	 if (isEmpty(keyword)){
    		 keyword = '';
    	 }
    	 window.location.href = _PUBLIC_ + "theatre_analysis/index.do?keyword="+keyword;
    }
</script>
</body>
</html>