<?php include $this->admin_tpl('meta','admin');?>
<title>采集列表 - YzmCMS内容管理系统</title>
</head>
<body>
<nav class="breadcrumb"><i class="yzm-iconfont yzm-iconai-home"></i> 首页 <span class="c-gray en">&gt;</span> 模块管理 <span class="c-gray en">&gt;</span> 采集管理 <span class="c-gray en">&gt;</span> 采集列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="yzm-iconfont yzm-iconshuaxin"></i></a></nav>
<div class="page-container">
  <div> 
		<form action="<?php echo ROUTE_A;?>" method="get">
		 <input type="hidden" value="<?php echo ROUTE_M;?>" name="m">
		 <input type="hidden" value="<?php echo ROUTE_C;?>" name="c">
		 <input type="hidden" value="search" name="a">
		 <span class="select-box inline">
			<select name="type" class="select">
			<option value="0">类型</option>
			<option <?php if(isset($_GET["type"]) && $_GET["type"]=='1'){ echo 'selected';} ?> value="1">节点ID</option>
			<option <?php if(isset($_GET["type"]) && $_GET["type"]=='2'){ echo 'selected';} ?> value="2">标题</option>
			</select>
		</span>		 
		 <span class="select-box inline">
			<select name="status" class="select">
				<option value="99">内容状态</option>
				<option <?php if(isset($_GET["status"]) && $_GET["status"]=='0'){echo 'selected';} ?> value="0">未采集</option>
				<option <?php if(isset($_GET["status"]) && $_GET["status"]=='1'){echo 'selected';} ?> value="1">已采集</option>	
				<option <?php if(isset($_GET["status"]) && $_GET["status"]=='2'){echo 'selected';} ?> value="2">已导入</option>
			</select>
		</span>
		 <input type="text" name="keyword"  class="input-text" style="width:170px" value="<?php if(isset($_GET["keyword"])) echo $_GET["keyword"]; ?>"><button name="dosubmit" class="btn btn-success btn-search" type="submit" value="1"><i class="yzm-iconfont yzm-iconsousuo"></i> 搜索</button>
		</form>	
  </div>
	<div class="cl mt-15 tb-top"> <span class="l"><a href="javascript:;" onclick="yzm_dels('id')" class="btn btn-danger radius"><i class="yzm-iconfont yzm-iconshanchu2"></i> 批量删除</a> <a href="javascript:;" onclick="collection_content_import()" class="btn btn-primary radius"><i class="yzm-iconfont yzm-icontongguo"></i> 导入选中</a></span></div>
	<form method="post" action="<?php echo U('collection_list_del');?>" id="myform">
	<table class="table table-border table-bg table-hover">
		<thead>
			<tr class="text-c">
				<th width="25"><input type="checkbox"></th>
				<th>节点ID</th>
				<th>内容状态</th>
				<th>标题</th>
				<th>原文地址</th>	
			</tr>
		</thead>
		<tbody>
			<?php 
			   foreach($data as $val){			   
			 ?>
			<tr class="text-c">
				<td><input type="checkbox" value="<?php echo $val['id']?>" name="id[]"></td>
				<td><?php echo $val['nodeid']?></td>
				<td><?php echo $val['status']=='0' ? '<span class="c-red">未采集<span>' : ($val['status']=='1' ? '<span style="color:green">已采集<span>' : '已导入');?></td>
				<td><?php echo $val['title'] ?></td>
				<td><a href="<?php echo $val['url']?>" target="_blank"><?php echo $val['url']?></a></td>							
			</tr>
			<?php 
			   }		 
			?>	
		</tbody>
	</table>
	<?php if(!$data){ ?><div class="yzm_no_data"><i class="yzm-iconfont yzm-iconshuoming"></i> 暂无数据</div><?php } ?>
	</form>
	<div id="page"><span class="page_left">共<?php echo $total?>条记录，共<?php echo $page->total()?>页，当前显示第<?php echo $page->getpage()?>页</span>
  <span class="page_right"><?php echo $page->getfull();?></span></div>
</div>
<?php include $this->admin_tpl('footer','admin');?> 
<script type="text/javascript">
//导入选中
function collection_content_import(){
	if ($("input[name='id[]']:checked").length<1){
	   layer.alert('请选择要操作的内容！');
	   return false;
	}	
	document.getElementById('myform').action='<?php echo U('collection_content_import');?>';
	document.getElementById('myform').submit();
}
</script>	
</body>
</html>