<!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=utf-8">
<title>计划任务</title>
<link href="css_body.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="main.js"></script>
<style type="text/css">
<!--
.STYLE1 {
	color: #FF3300;
	font-weight: bold;
}
-->
</style>
</head>
<body>
<div class="bodytitle">
	<div class="bodytitleleft"></div>
	<div class="bodytitletxt">计划任务</div>
</div>
<table width="96%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#E2F5BC;">
    <tr> 
      <td height="20" colspan="2" bgcolor="#EDF9D5">
	  <table width="98%" border="0" cellpadding="0" cellspacing="0">
          <tr> 
            <td width="30%" height="18"><strong>&nbsp;&nbsp;计划任务：</strong></td>
            <td width="70%" align="right">&nbsp;</td>
          </tr>
        </table>       </td>
    </tr>
  </tr>
  <tr> 
    <td height="200" valign="top" colspan="2" bgcolor="#ffffff" style="padding:6px">
	<form action="makehtml_task.php" method="post" name="form1">
	<input type="hidden" name="action" value="save">
	<table width="98%" border="0" align="center" cellpadding="3" cellspacing="0" style="padding:3px">
      <tr>
        <td height="35" colspan="2"><span class="STYLE1">本计划任务功能需要结合客户端才能管理，由于考虑客户端配置的复杂性，客户端暂时只提供给商业授权用户下载。</span></td>
        </tr>
      <tr>
        <td height="35" bgcolor="#F9FEEF">
        	<strong>是否开放远程控制：</strong><br />
          通过远程管理密码，可以跳过登陆步骤执行一些功能）
        </td>
        <td bgcolor="#F9FEEF">
        	<input name="usermtools" type="radio" value="1" <?php echo ($row['usermtools']=='1' ? "checked='checked'" : ""); ?> />
          开放
          <input name="usermtools" type="radio" value="0" <?php echo ($row['usermtools']=='0' ? "checked='checked'" : ""); ?> />
          不开放
         </td>
      </tr>
      <tr>
        <td width="18%" height="35"><strong>远程管理密码：</strong></td>
        <td width="82%">
        	<input name="rmpwd" type="text" id="rmpwd" size="40" value="<?php echo $row['rmpwd']; ?>" />
          （３２个字符以内，只允许使用 a-z,0-9,!,@,# 这几种字符）<br />
          客户端安全证书：<font color='red'><?php echo(trim($row['rmpwd'])=='' ? '请先设置好密码才能生成证书！' : md5(trim($row['rmpwd']).$cfg_cookie_encode)); ?></font>
         </td>
      </tr>
      <tr>
        <td height="41" bgcolor="#F9FEEF"><strong>执行操作：</strong></td>
        <td bgcolor="#F9FEEF">
		       <input name="tasks[]" type="checkbox" class="np" id="tasks" value="mhday"<?php echo (ereg('mhday',$row['tasks']) ? " checked='checked'" : ""); ?>/>
           更新当天文档的HTML
           <input name="tasks[]" type="checkbox" class="np" id="tasks" value="mhall"<?php echo (ereg('mhall',$row['tasks']) ? " checked='checked'" : ""); ?>/>
           更新所有文档HTML<br />
           <input name="tasks[]" type="checkbox" class="np" id="tasks" value="opdb"<?php echo (ereg('opdb',$row['tasks']) ? " checked='checked'" : ""); ?>/>
           优化数据库
           <input name="tasks[]" type="checkbox" class="np" id="tasks" value="uplikeid"<?php echo (ereg('uplikeid',$row['tasks']) ? " checked='checked'" : ""); ?>/>
           更新相关文档
           <input name="tasks[]" type="checkbox" class="np" id="tasks" value="getkw"<?php echo (ereg('getkw',$row['tasks']) ? " checked='checked'" : ""); ?>/>
           自动提取关键字
           <input name="tasks[]" type="checkbox" class="np" id="tasks" value="autoct"<?php echo (ereg('autoct',$row['tasks']) ? " checked='checked'" : ""); ?>/>
           自动采集
      </td>
      </tr>
      <tr>
        <td height="65"><strong>指定HTML更新条件：</strong></td>
        <td>栏目ID：<?php 
			$seltypeids = 0;
			$cid = trim($row['typeid']);
			if(!empty($cid)){
			  $seltypeids = $dsql->GetOne("Select ID,typename From #@__arctype where ID='$cid' ");
			}
			$opall=1;
			if(is_array($seltypeids)){
			   echo GetTypeidSel('form1','typeid','selbt1',0,$seltypeids['ID'],$seltypeids['typename']);
			}else{
			   echo GetTypeidSel('form1','typeid','selbt1',0,0,'请选择...');
			}
        ?>
          <br /><br />
          起始ID：
          <input name="startid" type="text" id="startid" size="10" value="<?php echo $row['startid']; ?>"/>
          结束ID：
          <input name="endid" type="text" id="endid" size="10" value="<?php echo $row['endid']; ?>"/></td>
      </tr>
      <tr>
        <td height="46" bgcolor="#F9FEEF"><strong>指定采集节点：</strong></td>
        <td bgcolor="#F9FEEF">
        	<input name="nodes" type="text" id="nodes" size="60" value="<?php echo $row['nodes']; ?>"/>
          (用id1,id2,id3...表示)
       </td>
      </tr>
      <tr>
        <td height="46"><strong>执行时间：</strong></td>
        <td>
        	<input name="dotime" type="text" id="dotime" size="20" value="<?php echo $row['dotime']; ?>"/> 格式为：00:00:00 (时/分/秒)
        </td>
      </tr>
      <tr>
        <td height="46" bgcolor="#F9FEEF"><strong>执行频率：</strong></td>
        <td bgcolor="#F9FEEF"> 　
        <input name="degree" type="radio" value="allday" <?php echo ($row['degree']=='allday' ? "checked='checked'" : ""); ?> />
        每天&nbsp;
        <input type="radio" name="degree" value="onlyday" <?php echo ($row['degree']=='onlyday' ? "checked='checked'" : ""); ?>  />
        仅当天
      </td>
      </tr>
      
      <tr>
        <td height="64">&nbsp;</td>
        <td><input type="submit" name="Submit" value="保存配置" /></td>
      </tr>
    </table>
	</form>
	</td>
  </tr>
</table>
</body>
</html>
