<!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" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<link href="skin/css/style.css" rel="stylesheet" type="text/css" />
<title>添加采集项目</title>
<script src="skin/js/common.js" type="text/javascript"></script>
<script src="skin/js/main.js" type="text/javascript"></script>
<style type="text/css">
input {
	height:12px;
}
.txt {
	width:250px;
}
.tb2 td {
	padding:2px 5px 2px 5px;
	height:25px;
	text-align:left;
}
.tb2 .thc {
	text-align:center;
	line-height:30px;
	background-color: #F5F7F8;
	font-size:18px;
	font-weight:bold;
	color:#000
}
.tb2 .thr {
	text-align:center;
	height:20px
}
.label {
	padding:0;
	width:150px;
	text-align:right;
	border-right:1px solid #DEEFFA;
}
.rb1 {
	height:22px
}
.red {
	color:red
}
.blue {
	color:blue
}
form, fieldset {
	margin:0;
	padding:0
}
.tb td {
	text-align:left;
}
</style>
<script type="text/javascript">
function show(){
	var arg=arguments;
	for(var i=0;i<arg.length;i++){
		$(arg[i]).style.display="";
	}
}

function hide(){
	var arg=arguments;
	for(var i=0;i<arg.length;i++){
		$(arg[i]).style.display="none";
	}
}
</script>
</head>
<body>
<div class="r_main">
  <div class="r_content">
    <div class="r_content_1" align=center>
      <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tb">
        <thead>
          <tr class="thead">
            <th>&nbsp;<font color="#000000">操作选项： </font><a href="?childdir=www.1000ys.com">管理采集规则</a> | <a href="?action=wizard">添加采集规则</a> | <a href="?action=ClearCache" title="更改脚本文件名后请使用此功能" target="hiddensubmit">清除垃圾文件</a> | 支持破解防盗链：<span class="red"></span></th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>1. 通过本向导将传统的采集规则转换成采集规则</td>
          </tr>
        </tbody>
      </table>
      <table class="tb2">
        <thead>
          <tr>
            <th colspan="2" height="20" align="left"><span id="showurl">当前采集地址：<font color=red><?php echo $siteurl ?></font></span></th>
          </tr>
          <tr id="htmltable" style="<?php if(empty($showcode))echo 'display:none';?>">
            <th colspan="2"><textarea id="htmlcode" style="width:99%;height:200px;font-family:Fixedsys" wrap="off" readonly><?php 
            $content = !empty($showcode)?@file_get_contents($siteurl):'';
            $content = $coding=='gb2312'?gbutf8($content):$content;
            if(!$content) echo "读取URL出错";
            echo htmlspecialchars($content);
            ?>
</textarea></th>
          </tr>
          <tr>
            <th colspan="2" class="thc">使用采集规则向导生成采集规则</th>
          </tr>
          <tr>
            <th colspan="2" class="thr"><font id="stephit1">１. 设置基本参数</font>&nbsp;&nbsp;<font id="stephit2" color="red">２. 采集列表连接设置</font>&nbsp;&nbsp;<font id="stephit3">３. 采集内容与影片地址设置</font>&nbsp;&nbsp;<font id="stephit4">４. 在线模拟预览结果</font>&nbsp;&nbsp;<font id="stephit5">５. 完成向导并真实演示</font></th>
          </tr>
        </thead>
      </table>
      <form name="addruleform" id="addruleform" method="post" action="?action=editrulesingle">
        <input type='hidden' name='step' value='test' />
        <input type="hidden" name="id" value="<?php echo $id;?>" />
        <input type="hidden" name="itemname" value="<?php echo $itemname;?>" />
        <input type="hidden" name="siteurl" value="<?php echo $siteurl;?>" />
        <input type="hidden" name="coding" value="<?php echo $coding;?>" />
        <input type="hidden" name="sock" value="<?php echo $sock;?>" />
        <input type="hidden" name="playfrom" value="<?php echo $playfrom;?>" />
        <input type="hidden" name="autocls" value="<?php echo $autocls;?>" />
        <input type="hidden" name="classid" value="<?php echo $classid;?>" />
        <input type="hidden" name="getherday" value="<?php echo $getherday;?>" />
        <input type='hidden' name="intodatabase" value="<?php echo $intodatabase;?>" />
        <input type='hidden' name="listconfig" value="<?php echo urlencode($listconfig);?>" />
        <table class="tb2" id="step2">
          <tbody>
            <tr>
              <td class="label">列表开始代码：</td>
              <td><textarea name="lista" rows="6" cols="80" wrap="off"><?php echo getrulevalueh($loopstr,"lista");?></textarea></td>
            </tr>
            <tr>
              <td class="label">列表结束代码：</td>
              <td><textarea name="listb" rows="6" cols="80" wrap="off"><?php echo getrulevalueh($loopstr,"listb");?></textarea></td>
            </tr>
          <tbody>
            <tr>
              <td class="label red">获取图片方式：</td>
              <td><input type="radio" class="radio" name="picmode" value="1" onclick="show('picbody');"<?php if(getrulevalueh($loopstr,"picmode")==1) echo " checked"?>/>
                在列表页
                <input type="radio" class="radio" name="picmode" value="0" onclick="hide('picbody');"<?php if(getrulevalueh($loopstr,"picmode")==0) echo " checked"?>/>
                在内容页</td>
            </tr>
          </tbody>
          <tbody id="picbody" style="<?php if(getrulevalueh($loopstr,"picmode")!=1) echo "display:none"?>">
            <tr>
              <td class="label">图片开始代码：</td>
              <td><textarea name="pica" rows="4" cols="80" wrap="off"><?php echo getrulevalueh($loopstr,"pica");?></textarea></td>
            </tr>
            <tr>
              <td class="label">图片结束代码：</td>
              <td><textarea name="picb" rows="4" cols="80" wrap="off"><?php echo getrulevalueh($loopstr,"picb");?></textarea></td>
            </tr>
            <tr>
              <td class="label">图片替换规则：</td>
              <td><textarea name="pic_trim" id="pic_trim" rows="3" cols="40" wrap="off"></textarea>
                <input type="button" class="rb1" name="button" id="button" value="常用规则" onclick="SelTrim('pic_trim')" /></td>
            </tr>
          </tbody>
          <tbody>
            <tr>
              <td class="label">链接开始代码：</td>
              <td><textarea name="mlinka" rows="6" cols="80" wrap="off"><?php echo getrulevalueh($loopstr,"mlinka");?></textarea></td>
            </tr>
            <tr>
              <td class="label">链接结束代码：</td>
              <td><textarea name="mlinkb" rows="6" cols="80" wrap="off"><?php echo getrulevalueh($loopstr,"mlinkb");?></textarea></td>
            </tr>
        </table>
        <table class="tb2">
          <tbody>
            <tr>
              <td class="label"></td>
              <td><input type="button" class="rb1" name="back" value="返回上一步" onclick="javascript:history.back(-1)" />
                &nbsp;&nbsp;
                <input type="submit" name="Submit" class="rb1" value="保存信息并进入下一步设置" /></td>
            </tr>
          </tbody>
        </table>
      </form>
    </div>
  </div>
</div>
<div class="bottom">
  <table width="100%" cellspacing="5">
    <tr>
      <td align="center"><?php echo $cfg_powerby?></td>
    </tr>
  </table>
</div>
</body>
</html>
