<?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> 采集管理 <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 class="cl tb-top"> 
	  <span class="l">
	  <a class="btn btn-primary radius" href="<?php echo U('add');?>"><i class="yzm-iconfont yzm-icontianjia"></i> 添加节点</a>
	  <a href="javascript:;" onclick="yzm_dels('id')" class="btn btn-danger radius"><i class="yzm-iconfont yzm-iconshanchu2"></i> 批量删除</a>  
	  </span> 
	  <span class="r">共有数据：<strong><?php echo $total?></strong> 条</span> 
  </div>
  <form method="post" action="<?php echo U('del');?>" id="myform">
  <table class="table table-border table-bg table-hover table-sort">
    <thead>
      <tr class="text-c">
		<th width="25"><input type="checkbox"></th>
		<th>节点ID</th>
		<th>节点名称</th>
		<th>最后采集时间</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['nodeid']?>" name="id[]"></td>
			<td><?php echo $val['nodeid']?></td>
			<td><?php echo $val['name']?></td>
			<td><?php echo $val['lastdate'] ? date('Y-m-d H:i:s',$val['lastdate']) : '从未采集';?></td>
			<td>
			<a href="<?php echo U('collection_list_url', array('id'=>$val['nodeid']));?>">[采集网址]</a>
            <a href="<?php echo U('collection_article_content', array('id'=>$val['nodeid']));?>">[采集内容]</a>
            <a href="<?php echo U('collection_list', array('keyword'=>$val['nodeid'], 'type'=>1, 'dosubmit'=>1));?>" class="c-red">[内容发布]</a>
			</td>
			<td><?php echo htmlspecialchars($val['sourcecharset']);?></td>
			<td>
			<a href="<?php echo U('collection_test', array('id'=>$val['nodeid']));?>"  class="btn-mini btn-success ml-5" style="text-decoration:none">测试采集</a>
			<a href="<?php echo U('edit', array('id'=>$val['nodeid']));?>"  class="btn-mini btn-primary ml-5" style="text-decoration:none">修改</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');?>
</body>
</html>