<%@ 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}webupload/progress.css">
<body>
<%@ include file="../common/head.jsp"%>
<div class="screen main">
    <%@ include file="../common/left.jsp" %>
    <div class="main-content">
        <div class="tab-buttons">
            <a href="index.do?type=0" class="button button-16 <c:if test="${type==0}">active</c:if>">专题广告管理</a>
            <a href="index.do?type=1" class="button button-16 <c:if test="${type==1}">active</c:if>">专题栏目管理</a>
        </div>
        <form name="dataForm" action="export.do" method="post">
        <div class="search-group">
            <input type="hidden" id="type" name="type" value="${type}" />
            <div class="search-item">产品名称&nbsp;&nbsp;<input type="text" id="productName" name="productName" class="text {text:'请输入产品名称'}" value="${productName}"/></div>
            <div class="search-item">品牌名称&nbsp;&nbsp;<input type="text" id="brandName" name="brandName" class="text {text:'请输入品牌名称'}" value="${brandName}"/></div>
            <div class="search-item">广告主&nbsp;&nbsp;<input type="text" id="advMaster" name="advMaster" class="text {text:'请输入广告主'}" value="${advMaster}"/></div>
            <div class="search-item">播出环境
                <div class="select">
                    <select id="showEnv" name="showEnv">
                        <option value="">请选择</option>
                        <option value="0">电视剧</option>
                        <option value="1">综艺</option>
                        <option value="2">广告</option>
                    </select>
                </div>
            </div>
            <div class="search-item">播出媒体
                <select id="mediaName" name="mediaName">
                    <option value="">请选择</option>
                </select>
            </div>
            <div class="search-item">播出节目&nbsp;&nbsp;<input type="text" id="tvName" name="tvName" class="text {text:'请输入播出节目'}" value="${tvName}"/></div>
            <div class="search-item">联系方式&nbsp;&nbsp;<input type="text" id="phone" name="phone" class="text {text:'请输入联系方式'}" value="${phone}"/></div>
            
            <div class="search-item">播出日期&nbsp;&nbsp;<input type="text" name="showDateStart" id="showDateStart" class="text {text:'开始时间'}" size="14" /> - <input  type="text" name="showDateEnd" id="showDateEnd" class="text {text:'结束时间'}" size="14" /></div>
            <div class="search-item">播出时间&nbsp;&nbsp;<input type="text" name="showTimeStart" id="showTimeStart" class="text {text:'开始时间'}" size="14" /> - <input  type="text" name="showTimeEnd" id="showTimeEnd" class="text {text:'结束时间'}" size="14" /></div>
            <div class="search-item">刊例(万)&nbsp;&nbsp;<input type="text" name="priceMin" id="priceMin" class="text" size="14" /> - <input  type="text" name="priceMax" id="priceMax" class="text" size="14" /></div>
            <div class="search-item">时长(秒)&nbsp;&nbsp;<input type="text" name="showDurationMin" id="showDurationMin" class="text" size="14" /> - <input  type="text" name="showDurationMax" id="showDurationMax" class="text" size="14" /></div>
            
            <div class="search-item">
                <a href="javascript:void(0);" onclick="getList(1)" class="btn-radius">搜 索</a>
            </div>
        </div>
        </form>
        <div class="rFloat buttons">
            <c:if test="${funcMap['special_advertise_add'] eq 1}">
                <a href="javascript:platformModfiy('add','专题广告');" class="btn">+新增</a>
            </c:if>
            <a href="${staticPath}excel/电视硬广资源.xlsx" class="btn">下载模板</a>
            <c:if test="${funcMap['special_advertise_import'] eq 1}">
	            <span class="btn upfile">
	                <form id="fileForm" action="import_excel.do?type=${type}" method="post" enctype="multipart/form-data" target="hframe">
	                <span class="webuploader-pick">导入</span>
	                <input type="file" name="excelfile" id="excelfile" onchange="importExcel()"; />
	                <input type="hidden" id="isSure" name="isSure" >
	                </form>
	            </span>
            </c:if>
            <c:if test="${funcMap['special_advertise_export'] eq 1}">
                <a href="javascript:document.dataForm.submit();" class="btn">导出</a>
            </c:if>
        </div>
        已选 <span id="checkCount" class="orange">0</span> 条&nbsp;&nbsp;
        <c:if test="${funcMap['special_advertise_delete'] ne 1}">
            <a href="javascript:void(0);" onclick="delRecordBatch();" class="btn del" style="visibility:hidden;">xxxxxx</a>
        </c:if>

        <c:if test="${funcMap['special_advertise_delete'] eq 1}">
            <a href="javascript:void(0);" onclick="delRecordBatch();" class="btn del">批量删除</a>
        </c:if>
        <table class="table mTop10" cellpadding="0" cellspacing="0">
            <thead>
            <tr>
                <th width="44"><input type="checkbox" class="checkbox checkbox-white {click:checkAll}" name="all" value="" /></th>
                <th>产品名称</th>
                <th>品牌</th>
                <th>广告主</th>
                <th>媒体</th>
                <th>播出日期</th>
                <th>播出时间</th>
                <th>播出环境</th>
                <th>前节目</th>
                <th>联系方式</th>
                <th>时长(秒)</th>
                <th>刊例价格(万)</th>
                <th width="36">操作</th>
            </tr>
            </thead>
            <tbody id="list">
            </tbody>
        </table>
        <div class="mTop20">
            <div id="page" class="rFloat"></div>累计 <span id="count" class="orange">0</span> 条
        </div>
    </div>
    <div class="clear"></div>
</div>
<iframe name="hframe" style="display: none;"></iframe>
<%@ include file="../common/footer.jsp"%>
<script type="text/javascript" src="${staticPath}webupload/webuploader.min.js"></script>
<script type="text/javascript" src="${staticPath}webupload/upload.js"></script>
<script type="text/javascript" src="${staticPath}js/adspecial/adspecial.js"></script>
<script type="text/javascript">
var update_flag = "${funcMap['special_advertise_update']}", delete_flag = "${funcMap['special_advertise_delete']}";
$(function(){
    $.resetText();
    $(".text").input();
    $(".select").uiSelect();
    // 获取数据
    getList(1);
})
</script>