<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../common/common.jsp" %>
<link rel="stylesheet" type="text/css" href="${staticPath}css/jquery.datetimepicker.css" />
<title>节目管理</title>
</head>
<body>
<%@ include file="../common/head.jsp" %>
<div class="screen main">
<%@ include file="../common/left.jsp" %>
	<div class="main-content">
		<div class="btn-radius">节目管理</div>
		<form id="programForm">
		<div class="search-group">
			<div class="search-item">节目名称&nbsp;&nbsp;<input id="programName" type="text" name="programName" class="text {text:'请输入关键字'}" size="32" /></div>
			<div class="search-item">期/集&nbsp;&nbsp;<input id="showPhase" type="text" name="showPhase" class="text {text:'请输入关键字'}" size="32" /></div>
			<div class="search-item">
				类型&nbsp;
				<div class="select selectW320 {onchange:getOneCategorySelect,width:320}">
					<select id="type" name="type">
						<option value="">请选择</option>
						<option value="1">综艺</option>
						<option value="2">栏目</option>
						<option value="3">电视剧</option>
						<option value="4">电影</option>
					</select>
				</div>
			</div>
			<div class="mTop10">
				<div class="search-item">
					 一级分类&nbsp;
					<!--<div class="select selectW200 {onchange:getTwoCategory,width:200}">
						<select id="firstType" name="firstType">
							<option value="">一级分类</option>
						</select>
					</div> -->
					<div class="search-item">
      				  <input type="text" id="keywords1" arrow=true class="text textTips" name="firstType" />
 				   </div>
  				   <input type="hidden" id="firstType" />
				</div>
				<div class="search-item">
					二级分类&nbsp;
					<div class="search-item">
      				  <input type="text" id="keywords2" arrow=true class="text textTips" name="secondType" />
 				   </div>
  				   <input type="hidden" id="secondType"/>
					<!-- <div class="select selectW200 {width:200}">
						<select id="secondType" name="secondType">
							<option value="">二级分类</option>
						</select>
					</div> -->
				</div>
				<div class="search-item">首播日期&nbsp;&nbsp;<input type="text" name="startDate" id="start_time" class="text {text:'开始时间'}" size="14" /> - <input  type="text" name="endDate" id="end_time" class="text {text:'结束时间'}" size="14" /></div>
				<div class="search-item">
					<a href="javascript:getList(1)" class="btn-radius">搜 索</a>
				</div>
			</div>
		</div>
		</form>
		<div class="rFloat buttons">
			<c:if test="${funcMap['program_add'] eq 1}">
				<a href="javascript:programModfiy('add','节目')" class="btn">+新增</a>
			</c:if>
			<a href="${staticPath}excel/节目导入模板.rar" class="btn">下载模板</a>
			<c:if test="${funcMap['program_import_excel'] eq 1}">
				<a href="javascript:importExcel()" class="btn upfile">
					<form id="excelInfo" action="" method="POST" enctype="multipart/form-data" target="hframe">
						<input type="file" name="uploadfile" onchange="importExcel(this)"/><span>导入表</span>
					</form>
				</a>
			</c:if>
			<c:if test="${funcMap['program_export'] eq 1}">
				<a href="javascript:exportExcel()" class="btn">导出</a>
			</c:if>
			<c:if test="${funcMap['program_import_data'] eq 1}">
				<a href="javascript:programDataTemplate()" class="btn">导入数据</a>
			</c:if>
		</div>
		已选 <span id="checkCount" class="orange">0</span> 条&nbsp;&nbsp;
		<c:if test="${funcMap['program_all_delete'] eq 1}">
			<a href="javascript:delBatch()" 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 width="98">节目数据</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>
<%@ include file="../common/footer.jsp" %>
<iframe name="hframe" style="display: none;"></iframe>
<script type="text/javascript" src="${staticPath}js/common/jquery.datetimepicker.js"></script>
<script type="text/javascript" src="${staticPath}js/program/program.js"></script>
<script type="text/javascript">
var update_flag = "${funcMap['program_update']}",
	delete_flag = "${funcMap['program_delete']}",data_update_flag = "${funcMap['program_data_update']}";
$(function(){
	getList(1);
	$.resetText();
	$(".text").input();
	$(".select").uiSelect();
	$.checkbox();
	$("#start_time, #end_time").datetimepicker();
	$(".table").hoverTable(true);
	$("#keywords1").inputTips("ajax_program_category_list.do?type=1&level=1",2,"#firstType",200,null,true);
	$("#keywords2").inputTips("ajax_program_category_list.do?type=1&level=2",2,"#secondType",200,null,true);
});
</script>
</body>
</html>