<%@ 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="btn-radius">媒体管理</div>
        <div class="search-group">
            <div class="rFloat buttons">
            	<c:if test="${funcMap['platform_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['platform_import_excel'] eq 1}">
	                <span class="btn upfile">
		                <form id="fileForm" action="import_excel_for_advertise.do?type=2" method="post" enctype="multipart/form-data" target="hframe">
		                    <span class="webuploader-pick">导入表</span>
		                    <input type="file" name="excelfile" id="excelfile" onchange="importExcel()"; />
		                </form>
	                </span>
                </c:if>
                <c:if test="${funcMap['platform_import_pic'] eq 1}">
                	<div id="picker" class="btn"></div>
                </c:if>
                <c:if test="${funcMap['platform_export'] eq 1}">
                	<a href="javascript:document.dataForm.submit();" class="btn">导出</a>
                </c:if>
            </div>
            <form name="dataForm" action="ajax_platform_list.do" method="post">
            <input type="hidden" name="download" value="1" />
            <div class="search-item">媒体名称&nbsp;&nbsp;<input type="text" id="platformName" name="platformName" class="text {text:'请输入关键字'}" /></div>
            <div class="search-item">
                媒体类型
                <div class="select">
                    <select id="type" name="type">
                        <option value="">媒体类型</option>
                        <option value="1">电视频道</option>
                        <option value="2">视频平台</option>
                        <option value="3">其他</option>
                    </select>
                </div>
            </div>
            <div class="search-item">
                <a href="javascript:void(0);" onclick="getList(1)" class="btn-radius">搜 索</a>
            </div>
            </form>
        </div>
        <table class="table" cellpadding="0" cellspacing="0">
            <thead>
                <tr>
                    <th width="44">序号</th>
                    <th>媒体名称</th>
                    <th>媒体类型</th>
                    <th width="98" class="nop">媒体LOGO</th>
                    <th width="98">操作</th>
                </tr>
            </thead>
            <tbody id="list"></tbody>
        </table>
        <div class="mTop20">
            <div id="page" class="rFloat"></div>
            累计 <span id="count" class="blue">10</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/advertise/platform.js"></script>
<script type="text/javascript">
$(function(){
    $.resetText();
    $(".text").input();
    $(".select").uiSelect();
    $.checkbox();
    $(".table").hoverTable(true);
    getList(1);
    /*上传rar按钮初始化*/
    uploadRar('picker', '导入图片', 1, true, null, null,true,"myCallbcak");
})
function myCallbcak(url){
    alert("导入完成。", 1, function(){
    	getList(1);
    });
}
</script>
</body>
</html>