<?php
/*
'**************************************************************************************************
' 软件名称: 搜一次 Content Management System
' 版本编号: Version 1.X
' 官方网站: http://www.yixiu.cc
' 官方论坛：http://bbs.yixiu.cc
' 版权所有: 搜一次运营团队
' 郑重声明:
'    1、任何个人或组织不得在未经授权的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；
'    2、搜一次网络事业部保留此软件的法律追究权利
'**************************************************************************************************
*/
include "../../admin_loginstate.php";
include "../../../include/conn.php";
include "../../../include/function.php";
include "../../admin_version.php";
//在新版中，采集第几页到第几页在用户开始采集的时候进行设置

$sql = 'select count(1) as count from s_vodrule';
$res = $db->getOne($sql);
$count = 0; $data = array();
if ($res) {
	$count = $res['count'];
}

$sql = 'select id,name,targeturl,charset,player,collecttime from s_vodrule limit 0,20';
$data = $db->getAll($sql);

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link  href="../../images/style.css" rel="stylesheet" type="text/css" />
<link type="text/css" href="../../images/alerts.css" rel="stylesheet" media="screen" />
<title>自定义采集</title>
<script type="text/javascript">var tentpath='/';</script>
<script type="text/javascript" src="../../js/jquery.js"></script>
<script type="text/javascript" src="../../js/alerts.js"></script>
</head>

<body>
<div class="r_main">
	<div class="r_content">
		<div class="r_content_1">
				<form method="post" name="formb" action="../action=add" >
				<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"  class="tb_style" >
					<tr>
					  <td height="30" colspan="7" bgcolor="#FFFFFF" class="td_title">&nbsp;<a href="ruleadd_1.php">添加采集规则</a></td>
				  </tr>
					<tr>
						<td width="60" height="30" bgcolor="#FFFFFF" class="td_border">&nbsp; 编号</td>
						<td width="105" bgcolor="#FFFFFF" class="td_border">&nbsp;采集规则名</td>
						<td width="191"  bgcolor="#FFFFFF" class="td_border">&nbsp;采集站点链接</td>
						<td width="93" align="center" bgcolor="#FFFFFF" class="td_border">字符集</td>
						<td width="93" align="center" bgcolor="#FFFFFF" class="td_border">播放类型</td>
						<td width="175" align="center" bgcolor="#FFFFFF" class="td_border">最后采集时间</td>
						<td align="center" bgcolor="#FFFFFF" class="td_border">操 作</td>
					</tr>
					<?php if(!empty($data)): foreach ($data as $item) {?>
						<tr>
							<td height="30"><?php echo $item['id'];?></td>
							<td><?php echo $item['name'];?></td>
							<td><?php echo $item['targeturl'];?></td>
							<td align="center"><?php echo ($item['charset']==1)?'GB2312':'UTF-8';?></td>
							<td><?php echo $item['player'];?></td>
							<td><?php echo ($item['collecttime'])?date('Y-m-d H:i:s',$item['collecttime']):'';?></td>
							<td><a href="rulesetting.php?edit=<?php echo $item['id'];?>">采集</a>&nbsp;&nbsp;
								<a href="ruleadd_1.php?edit=<?php echo $item['id'];?>">编辑</a>&nbsp;&nbsp;
								<a href="">删除</a></td>
						</tr>
					<?php } else:?>
							<tr>
                            	<td colspan="7" class="td_border" height="30" align=center><b>暂无规则列表,请添加</b>！</td>
                            </tr> 					
					<?php endif;?>

				  
			  	  <tr>
                  	<td height="30"  colspan="3" class="td_border"><!--
                  	  &nbsp; &nbsp; <input name="export" type="button" class="rb1" id="export" onclick="window.location='admin_export.php?action=imp'" value="导入采集规则"/>-->
					   &nbsp; &nbsp; <input name="export" type="button" class="rb1" id="export" onclick="window.location='rulebind.php?action=class'" value="视频分类绑定"/></td>
				    <td height="30" colspan="4" align="right" class="td_border">总<font color=red>1</font>条记录&nbsp;当前<font color=red>1/</font>1页&nbsp;<a href=?action=main&pages=1>第一页</a><a href='?action=main&pages=1'>1</a>&nbsp;<a href=?action=main&pages=2>下一页</a>&nbsp;<a href=?action=main&pages=1>最后页</a>&nbsp;转<input type=text size=4 name='gopage' style='margin-top:4px;' value='1'/>&nbsp;<a style='cursor:pointer;' onclick=window.location='?action=main&pages='+gopage.value+''>GO>></a>&nbsp;&nbsp;</td>
			      </tr>
			  </table>
			  </form>
				</div>
		</div>
</div>
 
<?php require_once("../../admin_bottom.php");?>            
</body>
</html>
