<?php
/*
'**************************************************************************************************
' 软件名称: 搜一次 Content Management System
' 版本编号: Version 1.X
' 官方网站: http://www.syccms.com
' 官方论坛：http://bbs.syccms.com
' 版权所有: 搜一次运营团队
' 法律顾问: 杭州市元茂律师事务所 严飞律师
' 郑重声明:
'    1、任何个人或组织不得在未经授权的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；
'    2、搜一次网络事业部保留此软件的法律追究权利
'**************************************************************************************************
*/
include "../../include/conn.php";
include "../../include/function.php";
include "../admin_version.php";
include "../admin_loginstate.php";
include_once("../../include/timing_set.php");
set_time_limit(0);

$action=SafeRequest("action","get");
if($action=="save"){
	$t_of=SafeRequest("t_of","post");
	$t_zy=RequestBox("t_zy");
	$t_xq=RequestBox("t_xq");
	$t_sj=RequestBox("t_sj");
	$strs="<?php"."\n";
	$strs.="define(\"t_of\",".$t_of.");\n";
	$strs.="define(\"t_zy\",\"".$t_zy."\");\n";
	$strs.="define(\"t_xq\",\"".$t_xq."\");\n";
	$strs.="define(\"t_sj\",\"".$t_sj."\");\n";
	$strs.="define(\"t_time\",\"".t_time."\");\n";
	$strs.="define(\"t_span\",\"\");\n";
	$strs.="?>";
	fwrite(fopen("../../include/timing_set.php","wb"),$strs);
	die("<script>window.location='admin_timing.php'</script>");
	}

function splitshow($def,$val){
	$arr=explode(',',$def);
	if(in_array($val,$arr)){
		echo "checked";
		}
	unset($arr);	
 	}
?>
<!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" language="javascript">var tentpath='<?php echo S_SitePath?>';</script>
<script src="../js/jquery.js"></script>
<script language="javascript" src="../js/alerts.js"></script>
</head>

<body>
<div class="r_main">
	<div class="r_content">
		<div class="r_content_1">
		<form name="form1" action="admin_timing.php?action=save" method="post">
        <table  border="0" cellpadding="0" cellspacing="0" class="tb_Style" width="98%" style="margin:0 auto;">
  		<tr>
   			 <td colspan="3" class="td_title" height="30">&nbsp;定时采集基本配置</td>
  		</tr>
  		<tr>
   			 <td class="td_border" height="30" width="100">&nbsp;定时开启:</td>
             <td colspan="2" class="td_border" height="30" align="left">&nbsp;<input type="radio" name="t_of" class="radio" checked="checked" value="0">开启&nbsp;<input type="radio" name="t_of" class="radio" <?php if(t_of=='1') echo "checked";?> value="1">关闭</td>
  		</tr>
        <tr>
        	<td class="td_border" height="30" width="100">&nbsp;资源库选择:</td>
            <td colspan="2" class="td_border" height="30" align="left">
`				<table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td>&nbsp;<input type="checkbox" name="t_zy[]" class="checkbox" value="1" <?php splitshow(t_zy,1);?>>皮皮资源&nbsp;</td>
                  <td>&nbsp;<input type="checkbox" name="t_zy[]" class="checkbox" value="5" <?php splitshow(t_zy,5);?>>优酷动漫&nbsp;</td>
                  <td>&nbsp;<input type="checkbox" name="t_zy[]" class="checkbox" value="6" <?php splitshow(t_zy,6);?>>优酷电影&nbsp;</td>
                  <td>&nbsp;<input type="checkbox" name="t_zy[]" class="checkbox" value="14" <?php splitshow(t_zy,14);?>>摔跤视频&nbsp;</td>
                </tr>
                <tr>
                  <td>&nbsp;<input type="checkbox" name="t_zy[]" class="checkbox" value="10" <?php splitshow(t_zy,10);?>>天线高清(电视)&nbsp;</td>
                  <td>&nbsp;<input type="checkbox" name="t_zy[]" class="checkbox" value="11" <?php splitshow(t_zy,11);?>>天线高清(电影)&nbsp;</td>
                  <td>&nbsp;<input type="checkbox" name="t_zy[]" class="checkbox" value="2" <?php splitshow(t_zy,2);?>>酷六高清电影(官方)&nbsp;</td>
                 <td>&nbsp;<input type="checkbox" name="t_zy[]" class="checkbox" value="3" <?php splitshow(t_zy,3);?>>酷六高清电视(官方)&nbsp;</td>
                </tr>
                <tr>
                  <td>&nbsp;<input type="checkbox" name="t_zy[]" class="checkbox" value="8" <?php splitshow(t_zy,8);?>>天线高清(游戏视频)&nbsp;</td>
                  <td>&nbsp;<input type="checkbox" name="t_zy[]" class="checkbox" value="17" <?php splitshow(t_zy,17);?>>优酷小视频(官方)&nbsp;</td>
                  <td>&nbsp;<input type="checkbox" name="t_zy[]" class="checkbox" value="16" <?php splitshow(t_zy,16);?>>PPVOD资源库(我要采集)&nbsp;</td>
                  <td>&nbsp;<input type="checkbox" name="t_zy[]" class="checkbox" value="9" <?php splitshow(t_zy,9);?>>Gvod资源库(kkkk.tv)&nbsp;</td>
                </tr>
                   <tr>
                  <td>&nbsp;<input type="checkbox" name="t_zy[]" class="checkbox" value="12" <?php splitshow(t_zy,12);?>>Gvod资源库(gvodzy)&nbsp;</td>
                  <td>&nbsp;<input type="checkbox" name="t_zy[]" class="checkbox" value="13" <?php splitshow(t_zy,13);?>>Gvod资源库(gvodzi)&nbsp;</td>
                  <td>&nbsp;<input type="checkbox" name="t_zy[]" class="checkbox" value="15" <?php splitshow(t_zy,15);?>>Gvod资源库(Fkvod)&nbsp;</td>
                  <td>&nbsp;<input type="checkbox" name="t_zy[]" class="checkbox" value="7" <?php splitshow(t_zy,7);?>>Qvod资源库(qvodzy)&nbsp;</td>
                </tr>
                <tr>
                	<td>&nbsp;<input type="checkbox" name="t_zy[]" class="checkbox" value="4" <?php splitshow(t_zy,4);?>>Qvod资源库(快播)&nbsp;</td>
                    <td>&nbsp;<input type="checkbox" name="t_zy[]" class="checkbox" value="18" <?php splitshow(t_zy,18);?>>久久音影(推荐)&nbsp;</td>
                </tr>
                <tr>
                	<td colspan="4" class="td_border"><font color="red">*注意:为保证前台页面的访问速度,不要选择过多的资源库</font></td>
                </tr>
              </table>

            </td>
        </tr>
		<tr>
        	<td class="td_border" height="30" width="100">&nbsp;周期选择:</td>
        	<td class="td_border" height="30" colspan="2">
            &nbsp;<input type="checkbox" name="t_xq[]" class="checkbox" value="1" <?php splitshow(t_xq,1);?>>周一
            &nbsp;<input type="checkbox" name="t_xq[]" class="checkbox" value="2" <?php splitshow(t_xq,2);?>>周二
            &nbsp;<input type="checkbox" name="t_xq[]" class="checkbox" value="3" <?php splitshow(t_xq,3);?>>周三
            &nbsp;<input type="checkbox" name="t_xq[]" class="checkbox" value="4" <?php splitshow(t_xq,4);?>>周四
            &nbsp;<input type="checkbox" name="t_xq[]" class="checkbox" value="5" <?php splitshow(t_xq,5);?>>周五
            &nbsp;<input type="checkbox" name="t_xq[]" class="checkbox" value="6" <?php splitshow(t_xq,6);?>>周六
            &nbsp;<input type="checkbox" name="t_xq[]" class="checkbox" value="0" <?php splitshow(t_xq,0);?>>周日
            </td>
        </tr>
		<tr>
        	<td class="td_border" width="100" height="30">&nbsp;时间选择:</td>
        	<td class="td_border"  colspan="2">
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="00" <?php splitshow(t_sj,'00');?>>00
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="01" <?php splitshow(t_sj,'01');?>>01
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="02" <?php splitshow(t_sj,'02');?>>02
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="03" <?php splitshow(t_sj,'03');?>>03
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="04" <?php splitshow(t_sj,'04');?>>04
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="05" <?php splitshow(t_sj,'05');?>>05
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="06" <?php splitshow(t_sj,'06');?>>06
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="07" <?php splitshow(t_sj,'07');?>>07
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="08" <?php splitshow(t_sj,'08');?>>08
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="09" <?php splitshow(t_sj,'09');?>>09
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="10" <?php splitshow(t_sj,'10');?>>10
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="11" <?php splitshow(t_sj,'11');?>>11<br/>
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="12" <?php splitshow(t_sj,'12');?>>12
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="13" <?php splitshow(t_sj,'13');?>>13
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="14" <?php splitshow(t_sj,'14');?>>14
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="15" <?php splitshow(t_sj,'15');?>>15
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="16" <?php splitshow(t_sj,'16');?>>16
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="17" <?php splitshow(t_sj,'17');?>>17
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="18" <?php splitshow(t_sj,'18');?>>18
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="19" <?php splitshow(t_sj,'19');?>>19
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="20" <?php splitshow(t_sj,'20');?>>20
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="21" <?php splitshow(t_sj,'21');?>>21
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="22" <?php splitshow(t_sj,'22');?>>22
            &nbsp;<input type="checkbox" name="t_sj[]" class="checkbox" value="23" <?php splitshow(t_sj,'23');?>>23
            </td>
        </tr>
        <tr>
        	<td class="td_border" height="30" width="100">&nbsp;其他选项:</td>
            <td class="td_border" height="30" colspan="2">&nbsp;</td>
         </tr> 
         <tr>
            <td class="td_border" height="30" colspan="3">&nbsp;<input type="submit" value="更新设置" class="rb1"></td>
         </tr>            
  </table>
  </form>
        </div>
    </div>
</div>

</body>
</html>